From 9a1feafe1e8415dba3036ebe45e2dc52cb04fea4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 19:37:22 +0000 Subject: [PATCH 1/3] test(agda): UsesK sets --safe in its pragma, and only --safe The mathesis census reads every Agda file with no `OPTIONS --safe` as an estate-policy break (proof-holes.sh), so this fixture counted as one. Its pragma now sets --safe alone. It still leaves out --without-K and --cubical-compatible, which implies --without-K. Under Agda's defaults, which have K, the file is accepted, as checked locally with no flags. The gate's refusal therefore still shows that its own command line runs with --without-K. The correspondence doc says so. The receipt is unaffected, because fixtures are not in the input set. Agda-source session (estate proof policy), Kernel group follow-up. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX --- docs/agda-lean-correspondence.adoc | 5 +++-- tests/reject-agda/UsesK.agda | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/agda-lean-correspondence.adoc b/docs/agda-lean-correspondence.adoc index da0792d..4ec5b69 100644 --- a/docs/agda-lean-correspondence.adoc +++ b/docs/agda-lean-correspondence.adoc @@ -136,6 +136,7 @@ kernel is trusted. Agda's trusted base in this cone is `Agda.Primitive`'s one signature, extension the identity, no preference. It claims `no-return` for that algebra, and the gate requires Agda to refuse it. So the strictness hypothesis of `no-return` is load-bearing, as falsifier F2 is on the Lean side -(`Marches/Freewheel.lean`). `tests/reject-agda/UsesK.agda` has no `OPTIONS` -pragma and proves K. Its refusal shows that the gate's own command line runs +(`Marches/Freewheel.lean`). `tests/reject-agda/UsesK.agda` proves K. Its pragma +sets `--safe` alone, so the file checks under Agda's defaults, which have K. +Its refusal by the gate therefore shows that the gate's own command line runs with `--without-K`. diff --git a/tests/reject-agda/UsesK.agda b/tests/reject-agda/UsesK.agda index aa91f71..5a791dd 100644 --- a/tests/reject-agda/UsesK.agda +++ b/tests/reject-agda/UsesK.agda @@ -1,6 +1,9 @@ +{-# OPTIONS --safe #-} -- Expected rejection: axiom K (every self-equality is refl) is not --- provable without K. This file deliberately has no OPTIONS pragma, so the --- refusal comes from the gate's own command line: it shows that +-- provable without K. The pragma deliberately sets --safe alone, not +-- --without-K or --cubical-compatible (which implies it): Agda's default +-- has K, and this file checks without the gate's flags. So the refusal +-- comes from the gate's own command line, and shows that -- scripts/check-agda.sh runs with --without-K in force. -- expect: because K has been disabled module UsesK where From 2c4f9a24cf6ad2b1460dd327d77488fb1cf84300 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 19:39:59 +0000 Subject: [PATCH 2/3] proofs(agda): Compose group in Agda MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit proofs/agda/Marches/Compose.agda is the Agda source of Marches/Compose.lean. It has the same constructors and the same theorems: - the two-region positions, labels and interface; - stratified preference (`CBetter`, `ctrans`, `cirrefl`); - the typed step and trace judgments; - `no-back-cross` and `no-a-label-in-B`; - `step-worsens`, `trace-cbe`, `trace-worsens` and `wt-cycles-are-empty`. Prelude gains `⊥-elim`. A new fixture, tests/reject-agda/BackCross.agda, offers a crossing from B back into A, and it must be refused. Agda reports UnsupportedIndexedMatch warnings for ctrans, cirrefl and trace-worsens. Those concern computation under Cubical transports, not the statements, so they stay visible, as in januskey. Agda-source session (estate proof policy), Compose group. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX --- proofs/agda/All.agda | 1 + proofs/agda/Marches/Compose.agda | 122 +++++++++++++++++++++++++++++++ proofs/agda/Marches/Prelude.agda | 3 + tests/reject-agda/BackCross.agda | 16 ++++ 4 files changed, 142 insertions(+) create mode 100644 proofs/agda/Marches/Compose.agda create mode 100644 tests/reject-agda/BackCross.agda diff --git a/proofs/agda/All.agda b/proofs/agda/All.agda index 97472de..eeac012 100644 --- a/proofs/agda/All.agda +++ b/proofs/agda/All.agda @@ -6,3 +6,4 @@ module All where import Marches.Prelude import Marches.Basic import Marches.Kernel +import Marches.Compose diff --git a/proofs/agda/Marches/Compose.agda b/proofs/agda/Marches/Compose.agda new file mode 100644 index 0000000..3f294ec --- /dev/null +++ b/proofs/agda/Marches/Compose.agda @@ -0,0 +1,122 @@ +{-# OPTIONS --safe --without-K --cubical-compatible #-} +{- + Marches — Typed region composition (Agda source of + `Marches/Compose.lean`). + + Two regions (path algebras) A and B, joined by ONE typed crossing + morphism τ : A → B. The composite carries a STRATIFIED preference: + within-region preference is inherited; every A-position is strictly + preferred to every B-position (Gao–Rexford-style stratification, + here taken as the interface type's meaning). + + The well-formedness of a cross-region trace is a TYPING JUDGMENT + (`Trace`). Ill-typed moves — an A-label fired from B, or a crossing + fired from B back into A — have NO constructor: they are + unconstructible, not detected. + + Headline theorems: + • trace-worsens : every well-typed non-empty trace strictly worsens. + • wt-cycles-are-empty : a well-typed trace that returns to its start + is empty — no well-typed routing loop exists. + • no-back-cross, no-a-label-in-B : the ill-typed moves are underivable. +-} +module Marches.Compose where + +open import Marches.Prelude +open import Marches.Basic + +-- Positions of the composite system: inside A or inside B. +data Pos (A B : PathAlgebra) : Set where + inA : Carrier A → Pos A B + inB : Carrier B → Pos A B + +-- Labels of the composite system: A-labels, B-labels, one crossing. +data CLabel (A B : PathAlgebra) : Set where + la : Label A → CLabel A B + lb : Label B → CLabel A B + cross : CLabel A B + +-- A typed interface: just the crossing morphism. Order-preservation of +-- `τ` is deliberately not required (rung 2; see the Lean file). +record Interface (A B : PathAlgebra) : Set where + field + τ : Carrier A → Carrier B + +open Interface public + +-- Stratified preference on the composite. +data CBetter (A B : PathAlgebra) : Pos A B → Pos A B → Set where + aa : ∀ {x y} → better A x y → CBetter A B (inA x) (inA y) + bb : ∀ {x y} → better B x y → CBetter A B (inB x) (inB y) + ab : ∀ {x y} → CBetter A B (inA x) (inB y) + +ctrans : (A B : PathAlgebra) → ∀ {p q r : Pos A B} → + CBetter A B p q → CBetter A B q r → CBetter A B p r +ctrans A B (aa hxy) (aa hyz) = aa (trans A hxy hyz) +ctrans A B (aa hxy) ab = ab +ctrans A B (bb hxy) (bb hyz) = bb (trans B hxy hyz) +ctrans A B ab (bb _) = ab + +cirrefl : (A B : PathAlgebra) → ∀ (p : Pos A B) → ¬ CBetter A B p p +cirrefl A B (inA x) (aa h) = irrefl A x h +cirrefl A B (inB x) (bb h) = irrefl B x h + +-- One well-typed step of the composite system. +data Step (A B : PathAlgebra) (I : Interface A B) : + CLabel A B → Pos A B → Pos A B → Set where + la : ∀ {l x} → Step A B I (la l) (inA x) (inA (ext A l x)) + lb : ∀ {l x} → Step A B I (lb l) (inB x) (inB (ext B l x)) + cross : ∀ {x} → Step A B I cross (inA x) (inB (τ I x)) + +-- Well-typed traces: the typing judgment on label words. +data Trace (A B : PathAlgebra) (I : Interface A B) : + Pos A B → List (CLabel A B) → Pos A B → Set where + nil : ∀ {p} → Trace A B I p [] p + cons : ∀ {p q r l ls} → + Step A B I l p q → Trace A B I q ls r → Trace A B I p (l ∷ ls) r + +-- Negative theorem: crossing back from B is unconstructible. +no-back-cross : (A B : PathAlgebra) (I : Interface A B) + (x : Carrier B) (q : Pos A B) → ¬ Step A B I cross (inB x) q +no-back-cross A B I x q () + +-- Negative theorem: an A-label cannot fire from inside B. +no-a-label-in-B : (A B : PathAlgebra) (I : Interface A B) + (l : Label A) (x : Carrier B) (q : Pos A B) → ¬ Step A B I (la l) (inB x) q +no-a-label-in-B A B I l x q () + +-- Every well-typed step strictly worsens (given strict regions). +step-worsens : (A B : PathAlgebra) (I : Interface A B) → + StrictlyInflationary A → StrictlyInflationary B → + ∀ {l p q} → Step A B I l p q → CBetter A B p q +step-worsens A B I hA hB (la {l} {x}) = aa (hA l x) +step-worsens A B I hA hB (lb {l} {x}) = bb (hB l x) +step-worsens A B I hA hB cross = ab + +-- Helper: a well-typed trace worsens-or-stays. +trace-cbe : (A B : PathAlgebra) (I : Interface A B) → + StrictlyInflationary A → StrictlyInflationary B → + ∀ {p ls q} → Trace A B I p ls q → CBetter A B p q ⊎ p ≡ q +trace-cbe A B I hA hB nil = inj₂ refl +trace-cbe A B I hA hB (cons hstep htail) with trace-cbe A B I hA hB htail +... | inj₁ h2 = inj₁ (ctrans A B (step-worsens A B I hA hB hstep) h2) +... | inj₂ he = inj₁ (subst (CBetter A B _) he (step-worsens A B I hA hB hstep)) + +-- Headline: every well-typed NON-EMPTY trace strictly worsens. +trace-worsens : (A B : PathAlgebra) (I : Interface A B) → + StrictlyInflationary A → StrictlyInflationary B → + ∀ {p q : Pos A B} {l : CLabel A B} {ls : List (CLabel A B)} → + Trace A B I p (l ∷ ls) q → CBetter A B p q +trace-worsens A B I hA hB (cons hstep htail) with trace-cbe A B I hA hB htail +... | inj₁ h2 = ctrans A B (step-worsens A B I hA hB hstep) h2 +... | inj₂ he = subst (CBetter A B _) he (step-worsens A B I hA hB hstep) + +-- Headline: a well-typed trace returning to its start is empty. +-- No well-typed routing loop exists — by construction. +wt-cycles-are-empty : (A B : PathAlgebra) (I : Interface A B) → + StrictlyInflationary A → StrictlyInflationary B → + ∀ {p : Pos A B} {ls : List (CLabel A B)} → + Trace A B I p ls p → ls ≡ [] +wt-cycles-are-empty A B I hA hB {ls = []} ht = refl +wt-cycles-are-empty A B I hA hB {p} {ls = l ∷ ls} ht = + ⊥-elim (cirrefl A B p (trace-worsens A B I hA hB ht)) diff --git a/proofs/agda/Marches/Prelude.agda b/proofs/agda/Marches/Prelude.agda index 557c014..2c6dde4 100644 --- a/proofs/agda/Marches/Prelude.agda +++ b/proofs/agda/Marches/Prelude.agda @@ -31,3 +31,6 @@ sym refl = refl subst : {X : Set} (P : X → Set) {x y : X} → x ≡ y → P x → P y subst P refl px = px + +⊥-elim : {X : Set} → ⊥ → X +⊥-elim () diff --git a/tests/reject-agda/BackCross.agda b/tests/reject-agda/BackCross.agda new file mode 100644 index 0000000..847ffb8 --- /dev/null +++ b/tests/reject-agda/BackCross.agda @@ -0,0 +1,16 @@ +{-# OPTIONS --safe --without-K --cubical-compatible #-} +-- Expected rejection: a crossing fired from B back into A has no +-- constructor, so no term of that step type can be written. The `cross` +-- constructor only starts in A; offering it for a start in B must be +-- refused. This pins that `Marches.Compose.no-back-cross` is a fact about +-- the typing judgment, not a vacuous negation. +-- expect: != inB x of type Pos A B +module BackCross where + +open import Marches.Prelude +open import Marches.Basic +open import Marches.Compose + +back : (A B : PathAlgebra) (I : Interface A B) (x : Carrier B) (y : Carrier A) → + Step A B I cross (inB x) (inA y) +back A B I x y = cross From 9392318f9a7936fcf9493c5f2625b084e79c034f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 19:41:12 +0000 Subject: [PATCH 3/3] docs(proofs): Compose group reconciled; receipt retaken; PWG-2i for 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs/agda-lean-correspondence.adoc gains the Compose section. It compares the eight theorems binder by binder and adds residual R4: Agda's UnsupportedIndexedMatch warnings concern computation under Cubical transports, not the statements. PROOF-STATUS.adoc: - the Agda receipt is retaken at 2c4f9a2, digest 6e9394f…, with five input files; - the lineage: the Kernel-only receipt at 660e1c6 is superseded, and its digest still holds on main at 08f6a79; - the Lean re-check of Compose reports no axioms; - the census is PWG-2i 12 and ungraded 199, of 211. README, ROADMAP and STATE are updated to match. Agda-source session (estate proof policy), Compose group. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX --- PROOF-STATUS.adoc | 66 +++++++++++------- README.adoc | 4 +- ROADMAP.adoc | 4 ++ STATE.adoc | 21 ++++++ docs/agda-lean-correspondence.adoc | 107 +++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 27 deletions(-) diff --git a/PROOF-STATUS.adoc b/PROOF-STATUS.adoc index 8cbf5d7..58826dc 100644 --- a/PROOF-STATUS.adoc +++ b/PROOF-STATUS.adoc @@ -27,18 +27,17 @@ group in ROADMAP order. A group with no Agda proof yet stays `OPEN`. == Grades -The four theorems of the Kernel group are *`PWG-2i`*. The Agda leg is -`PROVEN` under the §2.1 invocation, which is `PWG-3`. The Lean leg is `PROVEN` -with no axioms, and its statements are `RECONCILED` with the Agda ones in +The twelve theorems of the Kernel and Compose groups are *`PWG-2i`*. The +Agda leg is `PROVEN` under the §2.1 invocation, which is `PWG-3`. The Lean leg +is `PROVEN` with no axioms, and its statements are `RECONCILED` with the Agda ones in `docs/agda-lean-correspondence.adoc`. Their Rocq leg is `OPEN`, so they still owe §2's second recheck (§8.4: a grade is not a discharge). Every other theorem is *`ungraded`*, because no Agda witness exists for it yet. `foundation_diverse` is false throughout. Grade census (§8.4), denominator 211 theorems in the `Marches` namespace: -`PWG-1` 0, `PWG-2ii` 0, `PWG-2i` 4, `PWG-3` 0, `ungraded` 207. None of the four -rests on an axiom. The 235 -definitions in the same namespace are not proof obligations and are not +`PWG-1` 0, `PWG-2ii` 0, `PWG-2i` 12, `PWG-3` 0, `ungraded` 199. None of the +twelve rests on an axiom. The 235 definitions in the same namespace are not proof obligations and are not counted; the axiom census below covers both kinds. [cols="1,1,1,1",options="header"] @@ -47,14 +46,16 @@ counted; the axiom census below covers both kinds. |Agda (source) |`source` (`proofs/agda`) -|`PROVEN` for the Kernel group (receipt below); `OPEN` for every other group +|`PROVEN` for the Kernel and Compose groups (receipt below); `OPEN` for +every other group |— |Lean |`re-proved` (written by hand in Lean from 2026-07, before the Agda; not transported) |`PROVEN` or `PROVEN-WITH-AXIOMS`, per group below -|`RECONCILED` for the Kernel group (`docs/agda-lean-correspondence.adoc`); +|`RECONCILED` for the Kernel and Compose groups +(`docs/agda-lean-correspondence.adoc`); for every other group, target-only evidence (§3) with no Agda statement to compare against @@ -66,8 +67,8 @@ compare against == Agda leg receipt -Taken 2026-11-16 at `660e1c61cfdc138452d9a9b4e9bd550cbfebe8fc`, the commit -that added `proofs/agda`, with `scripts/check-agda.sh` (cold: no interface +Taken 2026-11-16 at `2c4f9a24cf6ad2b1460dd327d77488fb1cf84300`, the commit +that added the Compose group, with `scripts/check-agda.sh` (cold: no interface files are read). Checker: Agda `2.7.0.1`, the release archive accepted at SHA-256 `975b515a14877ab6bce5bfc641e16c4a3ee52ca5d7f846577dee80aa2145db8a` (`scripts/setup-agda.sh`). There is no standard library or other Agda @@ -75,34 +76,45 @@ library. The same script runs in CI as the `agda` job of `ci.yml`. ---- $ agda --safe --without-K --cubical-compatible --no-libraries --ignore-interfaces -i proofs/agda proofs/agda/All.agda -import cone: Agda.Builtin.Equality Agda.Builtin.List Agda.Primitive All Marches.Basic Marches.Kernel Marches.Prelude -postulate scan: 4 files, 0 postulate(s) +import cone: Agda.Builtin.Equality Agda.Builtin.List Agda.Primitive All Marches.Basic Marches.Compose Marches.Kernel Marches.Prelude +postulate scan: 5 files, 0 postulate(s) prover-supplied: Agda.Primitive postulates exactly Level _⊔_ lsuc lzero, each bound by its BUILTIN pragma; no other postulate [PASS] postulate scan: cone clean, both controls behave [PASS] refused as expected: a postulate, by the command-line --safe +[PASS] refused as expected: tests/reject-agda/BackCross.agda (!= inB x of type Pos A B) [PASS] refused as expected: tests/reject-agda/FreewheelReturns.agda (should be empty) [PASS] refused as expected: tests/reject-agda/UsesK.agda (because K has been disabled) inputs-manifest: - 6d72ba84f01be6ee0f1eb968c24211ef4ff6a2f9b709b5ac68f841362595c917 proofs/agda/All.agda + 38de6553ed30a7336981a5fb13f53cbb2efbaed5a5ff6b477865ae6b8d612f44 proofs/agda/All.agda 6d11fd6646fe9c4e974f2ad86a0c273f071f4a4502dead8535b31a7a2e57ce96 proofs/agda/Marches/Basic.agda + dcd484ce3576e629028b64cd1ce00cc0fe8c11080a9154b5e8f7a2eb07225184 proofs/agda/Marches/Compose.agda 19980896daff2a787ef2b91f584e7d3568d80316f6bc31c2454de7b609bb663b proofs/agda/Marches/Kernel.agda - ecfec1a4105f5f6cf36272fa278774ebfb6c88e11f9bf3c662d7326f0ab3039c proofs/agda/Marches/Prelude.agda -inputs-sha256: 4f589dfe6d2719a058dd182b52cf7cccfeb4817c542831df6a9b963348821567 + 62971d5bfc832c8c527f0c2d291efa847e483abe381c5c3897e7be4eb6146000 proofs/agda/Marches/Prelude.agda +inputs-sha256: 6e9394f6bd195444d2869efcedd4203f577342c89763a7bd68ac9a77c8bc6f7d [check-agda] OK ---- The digest is the §8.5.1 one. The policy's shell line (`printf '%s\n' PATH… | LC_ALL=C sort | xargs -d '\n' sha256sum -- | sha256sum`) gives the same value. Axioms: none. The trusted base is the four -`Agda.Primitive` primitives named above. +`Agda.Primitive` primitives named above. The log also carries Agda's +`UnsupportedIndexedMatch` warnings for `ctrans`, `cirrefl` and +`trace-worsens`. They concern computation under Cubical transports, not the +statements (residual R4 in `docs/agda-lean-correspondence.adoc`). + +*Lineage.* The receipt above supersedes the first one, taken at `660e1c6` +for the Kernel group alone (inputs digest `4f589df…`), because the input +set has grown. A squash merge replaced `660e1c6` on `main` with `08f6a79`, +where the same four input files gave the same digest. *Scope of this receipt.* It is a local run at the commit named. CI runs the same gate on every commit and prints the same fields, but no job yet records them. The machine-readable proof receipt of §8.5.1 (`verification/receipts/*_praxis.deed`, read by `deed_lint.js`) is `OPEN`. Until it exists, the grades here are derived by hand from these records, -and none of them is `PWG-1`. A squash merge will replace `660e1c6` on `main`. The receipt still describes -the merge commit while the four input files are unchanged there: an echo +and none of them is `PWG-1`. A squash merge will replace `2c4f9a2` on +`main`. The receipt still describes the merge commit while its input files +are unchanged there: an echo (§8.5.2) with an `inputs-sha256` witness, to be written into the machine-readable receipt when it exists. @@ -148,14 +160,17 @@ A CI job that emits a full §8.2 receipt per commit is `OPEN` (see the plan below). When the Lean inputs change, this receipt is superseded and must be retaken. -The Kernel group's Lean leg was re-checked on 2026-11-16 at `660e1c6`, whose -`Marches/` tree is the same `7ef83e4` as above. Lean `v4.35.0` (release +The Kernel group's Lean leg was re-checked on 2026-11-16 at `660e1c6`, and the +Compose group's at `2c4f9a2`. Both commits have +the same `Marches/` tree, `7ef83e4`, as above. Lean `v4.35.0` (release archive accepted at SHA-256 `7289597a44543246c9227b8cae501767e095ce17f6d448b95fc4a8dc97268f6d`): `lake build` completed (19 jobs), there is no `sorry`, the BadGadget `#eval` prints the same orbit, and `#print axioms` reports "does not depend on any axioms" for `strict_implies_inflationary`, `run_le`, `run_worsens` and -`no_return`. +`no_return`, and for Compose's `ctrans`, `cirrefl`, `no_back_cross`, +`no_a_label_in_B`, `step_worsens`, `trace_cbe`, `trace_worsens` and +`wt_cycles_are_empty`. == Theorem groups @@ -179,9 +194,10 @@ are not headline theorems and no row below depends on them. `run-le`): `PWG-2i` |Two-region composition (`Compose`) -|`trace_worsens`, `wt_cycles_are_empty`, `no_back_cross`, `no_a_label_in_B` -|`PROVEN` -|`OPEN` +|`trace_worsens`, `wt_cycles_are_empty`, `no_back_cross`, `no_a_label_in_B`, +with `ctrans`, `cirrefl`, `step_worsens`, `trace_cbe` +|`PROVEN`, `RECONCILED` +|`PROVEN`: `PWG-2i` |Gao–Rexford table (`GaoRexford`, namespace `GR`) |`gr_inflationary`, `gr_not_strict`, `valley_dies`, `peer_route_not_upward` @@ -253,7 +269,7 @@ import, checked by `lake build`, but it inherits the same `OPEN` Agda status. == Plan: closing the Agda gap Owner decision 2026-11-09: record the gap here now; the Agda port is the -next body of work. Progress: Kernel group done 2026-11-16 (steps 1 and 2). +next body of work. Progress: Kernel and Compose groups done 2026-11-16 (steps 1 and 2). . *Agda source.* Port the groups above to Agda in this repository (`--safe --without-K`, no postulates, the §2.1 canonical invocation), group diff --git a/README.adoc b/README.adoc index 493436e..f58ca1f 100644 --- a/README.adoc +++ b/README.adoc @@ -54,8 +54,8 @@ graded machinery (see `ROADMAP.adoc`). no axioms. `PROVEN-WITH-AXIOMS` means the kernel accepted it and it rests on the Lean built-in axioms named in the row. Under the estate proof policy marches is theory, so Agda is the source of truth (`proofs/agda`). The port -goes group by group. So far only the Kernel group is graded: its four -theorems are `PWG-2i` (Agda `PROVEN`, Lean leg reconciled, Rocq leg `OPEN`). +goes group by group. So far the Kernel and Compose groups are graded: their +twelve theorems are `PWG-2i` (Agda `PROVEN`, Lean leg reconciled, Rocq leg `OPEN`). Every other theorem is ungraded. `PROOF-STATUS.adoc` records each witness leg, the receipts, the axiom census and the plan for the rest of the port. diff --git a/ROADMAP.adoc b/ROADMAP.adoc index 6ff58b6..a47a292 100644 --- a/ROADMAP.adoc +++ b/ROADMAP.adoc @@ -112,6 +112,10 @@ CI; `docs/agda-lean-correspondence.adoc` |met 2026-11-16 (`PWG-2i`) |Two-region composition (`Compose`) +|`proofs/agda/Marches/Compose.agda`; `tests/reject-agda/BackCross.agda` +|met 2026-11-16 (`PWG-2i`) + +|Gao–Rexford table (`GaoRexford`) |— |next |=== diff --git a/STATE.adoc b/STATE.adoc index 7c1fae7..0622ae9 100644 --- a/STATE.adoc +++ b/STATE.adoc @@ -1,5 +1,26 @@ = STATE — cross-session log +== 2026-11-16 — Agda source, Compose group (Agda-source session) + +* `proofs/agda/Marches/Compose.agda` ports `Marches/Compose.lean`: the same + constructors and eight theorems (`ctrans`, `cirrefl`, `no-back-cross`, + `no-a-label-in-B`, `step-worsens`, `trace-cbe`, `trace-worsens`, + `wt-cycles-are-empty`). Agda warns `UnsupportedIndexedMatch` for three of + them: they rely on constructor injectivity, which Cubical Agda cannot yet + compute along transports. This concerns computation, not the statements + (residual R4). The warnings stay visible. +* New fixture `BackCross.agda`: a crossing from B into A is refused. + `UsesK.agda` now sets `--safe` alone, because the mathesis census counts + an Agda file without `--safe` as a policy break. It is still accepted + under Agda's defaults, so its refusal still tests the gate's command line. +* Receipt at `2c4f9a2`: PASS, inputs digest `6e9394f…`. It supersedes + `660e1c6`'s, whose four files give the same `4f589df…` on `main` at + `08f6a79` (the echo). The Lean re-check reports no axioms for the eight + theorems. The census is `PWG-2i` 12 and `ungraded` 199 of 211. +* Next group: `GaoRexford`. Its Lean leg uses `propext`, so `PWG-2i` waits + on that axiom's disposition (c), or on an Agda-side match that needs no + axiom. + == 2026-11-16 — Agda source, Kernel group (Agda-source session) * `proofs/agda` holds the Agda source for the Kernel group: `PathAlgebra`, diff --git a/docs/agda-lean-correspondence.adoc b/docs/agda-lean-correspondence.adoc index 4ec5b69..a5ddf78 100644 --- a/docs/agda-lean-correspondence.adoc +++ b/docs/agda-lean-correspondence.adoc @@ -140,3 +140,110 @@ hypothesis of `no-return` is load-bearing, as falsifier F2 is on the Lean side sets `--safe` alone, so the file checks under Agda's defaults, which have K. Its refusal by the gate therefore shows that the gate's own command line runs with `--without-K`. + +== Two-region composition group (`Compose`) + +State: `RECONCILED`, 2026-11-16. Residuals R1–R3 of the Kernel group apply, +with R1 now also covering the judgments `CBetter`, `Step` and `Trace`. R4 +below is new. + +=== Definitions + +[cols="2,2,3",options="header"] +|=== +|Agda (`proofs/agda/Marches/Compose.agda`) |Lean (`Marches/Compose.lean`) |Comparison + +|`Pos A B`: `inA`, `inB` +|`Pos A B`: `inA`, `inB` +|The same two constructors over `Carrier A` and `Carrier B`. Lowest +universe on both sides. + +|`CLabel A B`: `la`, `lb`, `cross` +|`CLabel A B`: `la`, `lb`, `cross` +|The same three constructors. + +|`Interface A B`, a record with one field `τ : Carrier A → Carrier B` +|`Interface A B`, a structure with one field `τ` +|The same. Neither side requires `τ` to preserve order. + +|`CBetter A B : Pos A B → Pos A B → Set`: `aa`, `bb`, `ab` +|`CBetter A B : Pos A B → Pos A B → Prop`: `aa`, `bb`, `ab` +|The same constructors with the same indices and implicit arguments. `Set` +against `Prop` (R1). + +|`Step A B I : CLabel A B → Pos A B → Pos A B → Set`: `la`, `lb`, `cross` +|`Step A B I`, the same three constructors, in `Prop` +|`la` from `inA x` to `inA (ext A l x)`; `lb` from `inB x` to +`inB (ext B l x)`; `cross` from `inA x` to `inB (τ I x)`. There is no +constructor that starts a crossing or an A-label in B (R1). + +|`Trace A B I : Pos A B → List (CLabel A B) → Pos A B → Set`: `nil`, `cons` +|`Trace A B I`, the same two constructors, in `Prop` +|`nil` at any position. `cons` puts a step in front of a trace. The indices +are the same (R1). +|=== + +=== Theorems + +[cols="2,2,3",options="header"] +|=== +|Agda |Lean |Proposition (both), in the binder order of both + +|`ctrans` +|`Marches.ctrans` +|`∀ A B {p q r}, CBetter A B p q → CBetter A B q r → CBetter A B p r` + +|`cirrefl` +|`Marches.cirrefl` +|`∀ A B (p : Pos A B), ¬ CBetter A B p p` + +|`no-back-cross` +|`Marches.no_back_cross` +|`∀ A B I (x : Carrier B) (q : Pos A B), ¬ Step A B I cross (inB x) q` + +|`no-a-label-in-B` +|`Marches.no_a_label_in_B` +|`∀ A B I (l : Label A) (x : Carrier B) q, ¬ Step A B I (la l) (inB x) q` + +|`step-worsens` +|`Marches.step_worsens` +|`∀ A B I, StrictlyInflationary A → StrictlyInflationary B → +∀ {l p q}, Step A B I l p q → CBetter A B p q` + +|`trace-cbe` +|`Marches.trace_cbe` +|`∀ A B I, StrictlyInflationary A → StrictlyInflationary B → +∀ {p ls q}, Trace A B I p ls q → CBetter A B p q ∨ p = q` + +|`trace-worsens` +|`Marches.trace_worsens` +|`∀ A B I, StrictlyInflationary A → StrictlyInflationary B → +∀ {p q l ls}, Trace A B I p (l :: ls) q → CBetter A B p q` + +|`wt-cycles-are-empty` +|`Marches.wt_cycles_are_empty` +|`∀ A B I, StrictlyInflationary A → StrictlyInflationary B → +∀ {p ls}, Trace A B I p ls p → ls = []` +|=== + +The hypotheses are the same in both: two path algebras, one interface and +the strictness of each region. Lean reports no axioms for any of the eight +theorems (`#print axioms`). + +=== Residual assumption R4 + +R4. *Index matching under `--cubical-compatible`.* For `ctrans`, `cirrefl` +and `trace-worsens`, Agda warns `UnsupportedIndexedMatch`: the clauses rely +on constructor injectivity (of `inA`, `inB` and `_∷_`), which Cubical Agda +cannot yet compute along transports. The warning is about how these +functions compute when applied to transports. It is not about whether their +types are inhabited, and Agda accepts the terms under the canonical flags. +The gate keeps the warnings visible rather than silencing them +(januskey does the same). + +=== Negative control + +`tests/reject-agda/BackCross.agda` offers the `cross` constructor for a step +that starts in B, and the gate requires Agda to refuse it +(`inA _ != inB x of type Pos A B`). So `no-back-cross` states a fact about +the judgment, not a vacuous negation.