Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 41 additions & 25 deletions PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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

Expand All @@ -66,43 +67,54 @@ 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
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.

Expand Down Expand Up @@ -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

Expand All @@ -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`
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 4 additions & 0 deletions ROADMAP.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
|===
Expand Down
21 changes: 21 additions & 0 deletions STATE.adoc
Original file line number Diff line number Diff line change
@@ -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`,
Expand Down
112 changes: 110 additions & 2 deletions docs/agda-lean-correspondence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,114 @@ 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`.

== 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.
1 change: 1 addition & 0 deletions proofs/agda/All.agda
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ module All where
import Marches.Prelude
import Marches.Basic
import Marches.Kernel
import Marches.Compose
Loading
Loading