Skip to content

applied: Rocq and Lean re-proofs of APP-1 to APP-4 (WO 4.2, 3 of 3) - #84

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/mathesis-stage-3-reanchoring-s2qr20
Nov 12, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/mathesis-stage-3-reanchoring-s2qr20

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

This is the third and last pull request for WO 4.2. It re-proves APP-1 to APP-4 in Rocq and Lean, as PROOF-POLICY §1 requires for theory. Each leg also re-proves the laws of the integer instance.

Each leg restates the Agda definitions of verification/proofs/agda/Applied/ clause for clause and proves every theorem again. Neither leg is a translation. With this PR, WO 4.2 is done.

Changes

  • verification/proofs/coq/Cohort.v: the Rocq leg (Rocq 8.18.0). The gate's Print Assumptions finds all 82 theorems closed under the global context. The standard library's PeanoNat and Lia prove the natural-number arithmetic. Unset Lia Cache keeps lia from writing a cache file beside the source.
  • verification/proofs/lean4/Cohort.lean: the Lean leg (Lean 4.29.0, core only). The gate's audit finds no axiom in any of the 95 theorems. The Lean gate rejects propext, which shaped this leg:
    • the proofs use no simp, omega or ac_rfl, because each of them brings propext in;
    • Lean compiles overlapping patterns with propext, so meet, zipWith, kand and denominator list their cases without overlap; each is the same function;
    • core Lean's Int lemmas use propext, so the leg uses Agda's integer type, with the same operations.
  • Both legs: natLt and monus copy Agda.Builtin.Nat's _<_ and _-_, recursing on the second argument as Agda's do, so that the same terms reduce.
  • docs/status/PROOF-STATUS.adoc: a record of APP-1 to APP-4. It holds the two legs and the statement comparison (§2.2): by reading, item by item, with every encoding difference listed. It notes that no receipt yet records these legs.
  • Other documents:
    • PROOF-NEEDS: all four are proved in all three provers.
    • The EXPLAINME ledger reads "15 proven of 17 legs; 1 argued, 1 open".
    • The README, the ROADMAP (WO 4.2 done) and the applied documents are updated.
    • The deed :added list gains the two files, and the Rocq and Lean manifests list them as gated.

RSR Quality Checklist

Required

  • Tests pass (Agda, Rocq and Lean gates; their planted controls; golden-path controls)
  • No banned language patterns; SPDX headers on the new files; no secrets; no private names; no U+2014

As Applicable

  • docs/status/ROADMAP.adoc updated
  • Proof obligations updated (APP-1 to APP-4: proved in Agda, Rocq and Lean; no receipt yet)

Testing

I ran these in this session on main 3d24e93 plus this change:

  • just check-proofs: the Agda, Rocq and Lean gates all report RESULT: PASS.
    • Rocq 8.18.0, from the Ubuntu archive: the CI version.
    • Lean 4.29.0, from the upstream release: the CI version.
    • Agda 2.6.3, locally. CI checks Agda with 2.7.0.1.
  • bash tests/proofs/gate_controls_test.sh coq and lean4: in each, the clean control passes and the planted escape fails.
  • bash tests/golden/check_controls_test.sh: all three controls fail as they should.
  • just check-views passes, and so do validate-claude-md, validate-coapt, validate-state, validate-rsr and validate-repo-map.
  • The canon deed lint passes, and every changed AsciiDoc file renders without a warning.

Next

Receipts for APP-1 to APP-4 need a CI run on the merged commit. Until those exist, no grade is derived for these obligations.

Screenshots

Not applicable.



Generated by Claude Code

The third of three pull requests for WO 4.2 (owner rulings
2026-11-12). Each leg restates the Agda definitions of
verification/proofs/agda/Applied/ clause for clause and re-proves
every theorem, the laws of the integer instance included.

- verification/proofs/coq/Cohort.v: Rocq 8.18.0; the gate finds all 82
  theorems closed under the global context. The standard library's
  PeanoNat and Lia prove the natural-number arithmetic; `Unset Lia Cache`
  keeps lia from writing a file.
- verification/proofs/lean4/Cohort.lean: Lean 4.29.0, core only; the
  gate finds no axiom in any of the 95 theorems. No simp, omega or
  ac_rfl, which bring propext in; overlapping patterns are listed case
  by case for the same reason, and natLt and monus recurse on their
  second argument as Agda's do.
- PROOF-STATUS records the legs and how the statements were compared;
  PROOF-NEEDS, EXPLAINME (15 proven of 17 legs), README, ROADMAP and
  the applied documents follow; the deed lists the two new files.

No receipt records APP-1 to APP-4 yet, so no grade is derived for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zo9dheFQzYYWV49hAk
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3d24e93 and e066868.

Files selected for processing: 13

  • EXPLAINME.adoc
  • README.adoc
  • applied-systems/finance/cohort-economics/README.adoc
  • applied-systems/finance/cohort-economics/modes.adoc
  • applied-systems/methods/types-and-assurance.adoc
  • docs/status/PROOF-NEEDS.adoc
  • docs/status/PROOF-STATUS.adoc
  • docs/status/ROADMAP.adoc
  • mathesis_chora.deed
  • verification/proofs/coq/Cohort.v
  • verification/proofs/coq/MANIFEST
  • verification/proofs/lean4/Cohort.lean
  • verification/proofs/lean4/MANIFEST
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 12, 2026 03:38
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T03:38:14.608326Z
We couldn’t complete this review. Comment @codex review to try again.
e066868 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath merged commit eb1fb10 into main Nov 12, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants