Repository navigation
applied: Agda proofs of APP-1 to APP-4 (WO 4.2, 2 of 3) - #83
Conversation
The second of three pull requests for WO 4.2 (owner rulings 2026-11-12). Every new module is gated in the Agda manifest; the gate finds no postulate in any import cone. - Applied/Status.agda: the order of evidence statuses, and `Covers u v`: v is given with a status at least u. zipWith and map pass it to their arguments. - Applied/Missing.agda: APP-1 and APP-4, for any number structure. For each output of a period (members, receipts, payments, closing cash, shortfall, support minutes, both tests) and for each cohort kind: if the output is given with status u, every input that it depends on is given with a status at least u. Once a closing balance is missing, every later one is missing. A "yes" verdict needs every period to be a known "yes"; a known breach decides a verdict; the funding gap needs every shortfall. - Applied/Cash.agda: APP-2 (`cash-identity`: the last closing balance is the opening balance plus, summed over the periods, receipts minus payments; both sides are missing together) and APP-3 (`gap-sound`, `gap-least`), for any ordered abelian group (`Laws`). - Applied/IntLaws.agda: the integer instance of the worked examples satisfies `Laws` (owner ruling 2026-11-12), built on Agda.Builtin only, so APP-2 and APP-3 hold for the model as it runs. - Applied/Cohort.agda: the local helpers of cohortAt are now top-level (`joined`, `renewed`) so that the proofs can name them; the worked examples check unchanged. - PROOF-NEEDS, PROOF-STATUS, EXPLAINME, README, ROADMAP and the applied documents: the Agda leg is proved; the Rocq and Lean legs are open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zo9dheFQzYYWV49hAk
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |



Summary
This is the second of three pull requests for WO 4.2. It proves the four obligations of the cohort model in Agda, for the model as it runs. Following your ruling of 2026-11-12, the PR also proves that the integer instance of the worked examples satisfies the laws that APP-2 and APP-3 need.
Every new module is gated in the Agda manifest, and the gate finds no postulate in any import cone. The Rocq and Lean re-proofs are the third pull request.
Changes
Applied/Status.agda: the order of evidence statuses, andCovers u v: the value v is given, with a status at least u.zipWithandmappass it to their arguments.Applied/Missing.agda: APP-1 and APP-4, for any number structure. One statement carries both. If an output is given with status u, then every input that it depends on is given with a status at least u. This holds for:Also proved:
Applied/Cash.agda: APP-2 and APP-3, for any ordered abelian group (Laws).cash-identity: the last closing balance is the opening balance plus, summed over the periods, receipts minus payments. When a value is missing, both sides are missing together.gap-sound: adding the gap to the previous balance meets every floor.gap-least: any non-negative amount that meets every floor is at least the gap.Applied/IntLaws.agda: the integer instance satisfiesLaws. It usesAgda.Builtinonly.So the theorems apply to the arithmetic that the examples use, and the laws are shown to be satisfiable.
Applied/Cohort.agda: the two local helpers ofcohortAtare now top-level functions (joined,renewed), so that the proofs can name them. The worked examples check unchanged.Documents:
PROOF-NEEDS,PROOF-STATUS, the EXPLAINME ledger ("7 proven of 17 legs; 1 argued, 9 open"), the README, the ROADMAP and the applied documents now say that the Agda leg is proved and the Rocq and Lean legs are open.RSR Quality Checklist
Required
As Applicable
docs/status/ROADMAP.adocupdatedPROOF-NEEDSAPP-1 to APP-4: Agda leg proved)Testing
I ran these in this session on
main0c624b8plus this change:bash scripts/check-proofs.sh agda: all 10 gated modules pass, and the axiom audit finds no postulate in any import cone. Manifest coverage passes.bash tests/golden/check_controls_test.sh: stale catalogue, failing proof and missing read as zero all fail as they should.just check-viewspasses, and so dovalidate-claude-md,validate-coapt,validate-state,validate-rsrandvalidate-repo-map.Screenshots
Not applicable.
Generated by Claude Code
Summary by CodeRabbit
Documentation
Verification