Repository navigation
proofs(agda): the wager experiment for coercions and roles (stages 0 and 1) - #87
Conversation
Stage 0 of the systemet wager experiment for coercions and roles. Local branch only. Nothing is pushed. - Pin Agda 2.8.0 and agda/cubical v0.9 (TOOLCHAIN.adoc). - Add the agda MANIFEST, the library file and a toolchain anchor module. - Record the gate-failure tests: false lemma, postulate, hole. - Record the Stage 0 design choices (DESIGN-CHOICES.adoc). - Add the one-page plan (PLAN.adoc). Known red gate: scripts/check-proof-status.sh needs a marker line in docs/status/PROOF-STATUS.adoc. The task forbids an edit of that file. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
Definitions of the target calculus and the Stage 1 statements. T0 proofs follow in the next commit. - Grade: operations, the 15 law fields of the Lean class, a Boolean law checker for finite carriers, the Affine and two-point lattice instances. - L1: signature, graded kinds, types, DefEq, total nf by evaluation, and DefEq t u <-> nf t = nf u (completeness and soundness). - L1: graded kinding judgement. - L2: literals and trope transitions, terms, reduction, and the declarative graded typing judgement with subusage. - Statements.agda: L1-Equality, T0-Substitution, T0-Preservation, T0-Progress as types only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
T0 is proved for each signature and each GradeAlgebra: graded substitution, preservation and progress. - L2/UsageLaws: laws of usage vectors and usage matrices. - L2/Renaming, L2/Substitution: typing under renaming and under a parallel substitution with a usage matrix. - L2/Preservation: inversion through t-conv and t-sub, the peel lemma for trope values, preservation. - L2/Progress: canonical forms and progress (no law is used). - Proofs.agda: one inhabitant for each statement of Statements.agda. Statements.agda is unchanged since the previous commit. - Examples/Stage1: accepted and rejected closed examples for each Stage 1 theorem, with the Affine and the two-point lattice algebra. - RELATION-LEDGER (no ADDED entry), RULE-DIFF-LEDGER (empty), DESIGN-CHOICES (DC-1.1 to DC-1.6), VERDICT draft, gate watch record. T0 uses 14 of the 15 law fields. It does not use le-antisym. Known red gate: scripts/check-proof-status.sh (marker line in docs/status/PROOF-STATUS.adoc, which the task forbids to edit). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
The owner asked for the push and for the updates that put the repository in a consistent state. - docs/status/PROOF-STATUS.adoc: marker line gate:agda gated=29, one summary row and one section for the wager experiment. The section says that the experiment claims no ET obligation. - .github/workflows/proofs.yml: an agda job. It installs the pinned Agda 2.8.0 tarball (checksum-verified) and the pinned cubical v0.9 commit, and runs scripts/check-proofs.sh agda. - verification/proofs/README.adoc: the layout shows agda/. - Justfile: the test recipe also runs the Agda gate. - CHANGELOG.adoc: one entry. - Wager notes: VERDICT, TOOLCHAIN, PLAN and DESIGN-CHOICES (DC-1.7) record the change. Not changed: docs/theory/OBLIGATIONS.adoc, AFFIRMATION.adoc and each .a2ml file. A new obligation needs an ADR from the owner. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
|
Caution Review failedThe pull request is closed. Summary
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. |
|
CI status on the head Pass, and from this pull request: Fail, but not from this pull request. Each of these 4 checks also fails on
I did not widen this pull request to fix these checks. Generated by Claude Code |



Summary
This draft adds an experiment in Cubical Agda. The experiment decides, for a defined fragment, the strong form of the systemet wager: grades (L2), conversion-only equality (L1) and tropes can replace the coercions and roles of System FC.
A proof is a success. A machine-checked counterexample is also a success.
Status: stages 0 and 1 of 7 are complete. The claim is not decided yet. Keep this pull request as a draft until
verification/proofs/agda/Wager/VERDICT.adocis final.The experiment claims no ET obligation. It does not change
docs/theory/OBLIGATIONS.adoc,AFFIRMATION.adocor any.a2mlfile. A new obligation needs an ADR from the owner.Changes
verification/proofs/agda/Wager/: the target calculus and its metatheory (29 Agda modules,--cubical --safe, nopostulate).Statements.agda: each headline theorem as a type only, with a plain-English reading. Review this file first.Proofs.agda: one inhabitant for each statement.DefEq, a totalnf, andDefEq t u ↔ nf t ≡ nf u.Affine {0,1,ω}with the systemet order, and the 2-point lattice.Examples/Stage1.agda: one accepted and one rejected closed example for each theorem.VERDICT.adoc(draft),RELATION-LEDGER.adoc(no ADDED entry),RULE-DIFF-LEDGER.adoc(empty),DESIGN-CHOICES.adoc,TOOLCHAIN.adoc,PLAN.adoc.verification/proofs/agda/MANIFESTandwager.agda-lib..github/workflows/proofs.yml: anagdajob. It installs the pinned Agda 2.8.0 tarball (checksum-verified) and the pinnedagda/cubicalv0.9 commit, and runsscripts/check-proofs.sh agda. It uses the two actions that the workflow already uses.docs/status/PROOF-STATUS.adoc: the marker linegate:agda gated=29, one summary row and one section for the experiment.verification/proofs/README.adoc,Justfile(testrecipe),CHANGELOG.adoc: small updates for the new prover directory.Findings of Stage 1 that the owner can check in
VERDICT.adoc:GradeAlgebrahas 15 law fields and one derived law. The documents say 16 laws.Affine, the grades0and1are not comparable, so an unused binder of grade1is rejected. The anytype order0 ≤ 1 ≤ ωaccepts it.le-antisym. It usesa · 0 = 0.RSR Quality Checklist
Required
just testor equivalent). Run in the session:scripts/check-proofs.sh agda(PASS, 29 modules),scripts/scan-dangerous.sh(PASS),scripts/check-proof-status.sh(PASS),scripts/check-root-shape.sh(PASS),scripts/check-no-md-in-docs.sh(PASS). Not run in the session: the Lean4 gate (no Lean toolchain there). CI runs it.UnsupportedIndexedMatch);DESIGN-CHOICES.adoc(DC-0.3) gives the reason.unsafeblocks without// SAFETY:comments (none exist).envfiles includedAs Applicable
.machine_readable/6a2/STATE.a2mlupdated. Not done on purpose: this is a file of the owner..machine_readable/6a2/ECOSYSTEM.a2mlupdated. Not applicable..machine_readable/6a2/META.a2mlupdated. Not applicable: no ADR is filed.TOPOLOGY.mdupdated. Not applicable.CHANGELOGor release notes updatedagda/cubicalare MIT-style. CI downloads them at pinned versions. Nothing is vendored.Testing
postulate(rejected by--safeand by the danger scan), a hole, and a wrong grade table each fail the gate.TOOLCHAIN.adochas the record.--guardednessis on in each file, because the stock cubical v0.9 library forces it on each importer. No file uses coinduction (DC-0.2).Screenshots
Not applicable.
Generated by Claude Code