diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 161e9ef..ff6430d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -35,9 +35,9 @@ Ledger: `+L4-bond-merge+`, `+L4-lifting+`, `+A2-chain+` and `+retention-order+` Lean legs, with receipts from CI run 44006871652 on `+d5234b1+`. The census moves from 28 obligations (`+PWG-3+` 18, ungraded 10) to 28 (`+PWG-3+` 15, `+PWG-2ii+` 7, ungraded 6). The derivation does not reach `+PWG-1+`, because the receipts are not at -the ledger's source commit. Whether the core-Lean leg may count, given the -2026-11-09 ruling that Lean is a generator and not a leg, is put to the owner. -If it may not, the seven rows derive `+PWG-2i+`. +the ledger's source commit. The core-Lean leg counts by owner ruling of 2026-11-17, +which ADR 0005 records in its amendment: the 2026-11-09 ruling ("Lean is a +generator, not a leg") covers the Mathlib development only. ==== Fixed diff --git a/README.adoc b/README.adoc index e32b087..41f1baa 100644 --- a/README.adoc +++ b/README.adoc @@ -174,9 +174,9 @@ under `reference`, never as a leg, so it can neither raise nor lower a grade. Both are rechecked in Rocq (`verification/proofs/rocq/`) and in core Lean with no Mathlib (`verification/proofs/lean4/ratified-order/`). The ledger grades L4 as four obligations and A2 as two (owner ruling 2026-11-16). All six, and the -retention order (a decidable preorder), derive `PWG-2ii`. Whether the core-Lean -leg may count is put to the owner (PROOF-STATUS, *Recheck legs of the order -laws and L4*). Completeness of the chain, which spec §7 also uses, is proved in +retention order (a decidable preorder), derive `PWG-2ii`. The core-Lean leg counts +by owner ruling of 2026-11-17, which ADR 0005 records in its amendment: Lean with +Mathlib stays a generator, never a leg. Completeness of the chain, which spec §7 also uses, is proved in no prover. The atom factorisation (O1's carrier half, proved on the ratified `GradeR` in `EffectAtomsRatified.lean`; O1-coord stays open) and the tropical factorisations diff --git a/docs/decisions/0005-v0.2-consolidation-o5-and-prover-roles.adoc b/docs/decisions/0005-v0.2-consolidation-o5-and-prover-roles.adoc index 7099f3f..ab95857 100644 --- a/docs/decisions/0005-v0.2-consolidation-o5-and-prover-roles.adoc +++ b/docs/decisions/0005-v0.2-consolidation-o5-and-prover-roles.adoc @@ -118,3 +118,85 @@ decided by this ADR. * *Leave O5 as the workbench proposal* — rejected: an obligation cited by the checker's firewalls must live in the checker's spec, not in a proposal downstream cannot cite as normative. + +== Amendment, 2026-11-17: D4 and D5, the §2 recheck legs + +*Status of this amendment:* owner rulings of 2026-11-09 and 2026-11-17, recorded +here. The ADR as a whole stays *Proposed* until the owner accepts it. + +*Why.* D4 made "Lean 4 + Mathlib" this repository's provenance prover. PROOF-POLICY +§2 (standards `3-practice/PROOF-POLICY.adoc`) defines no such role. It requires +every Agda theory proof to be rechecked in Rocq and in Lean, with no Mathlib: "a +proof that needs a large external library to compile is a dependency, not a proof +the estate owns". Two owner rulings close that gap. + +* *2026-11-09, Lean as a generator.* The Mathlib development (the + `grade-boundary` and `grade-factorisation` packages) keeps Mathlib and keeps its + purpose: finding and stress-testing theorems, which are then restated in core + Agda. It is never a §2 leg. The ledger records each of its legs as + `route: re-proved, state: BRIDGE-PENDING`, which does not count (§2.2, §8.2). +* *2026-11-17, rechecked in Rocq and Lean.* Theory goes in Agda and is rechecked + in Rocq and Lean, with no Mathlib. Asked whether the 2026-11-09 ruling also + covers a Lean leg that imports nothing, the owner ruled that it does not. Such a + leg is a §2 recheck leg, and it counts when its correspondence is `RECONCILED`. + +*D4, as amended (prover roles).* + +[cols="1,3"] +|=== +| Prover | Role + +| Agda +| The normative kernel, unchanged: Theorem B and every theory obligation, under the +§2.1 invocation `agda --safe --without-K --cubical-compatible`. + +| Rocq +| A §2 recheck leg, route `re-proved`: `verification/proofs/rocq/`, with no +`Require` beyond the prelude. Gate: `scripts/check-recheck-legs.sh rocq`. + +| Lean, core +| A §2 recheck leg, route `re-proved`: `verification/proofs/lean4/ratified-order/`, +with no import (no Mathlib). Gate: `scripts/check-recheck-legs.sh lean`. Lean is +an independent kernel of the same dependent-type family as Agda and Rocq, so +§8.3's `+foundation-diverse+` tag is not earned by it. + +| Lean + Mathlib +| A generator, never a leg (2026-11-09): `verification/proofs/lean4/grade-boundary/` +and `grade-factorisation/`. Its results become gradeable only once restated in +core Agda. Its rows stay `BRIDGE-PENDING`. + +| Idris2 +| The executable reference, unchanged. PROOF-POLICY §8.1 keeps it off the PWG +ladder, so the ledger records it under `reference`, never as a leg. + +| Rust +| The fast core, unchanged. It is validated against the reference over the +conformance corpus and proves nothing. +|=== + +*D5, as amended.* D5 removed three mint templates, among them +`verification/proofs/coq/TypeSafety.v`, because they were never instantiated and +the Coq recipe skipped silently. That reasoning stands. The Rocq development added +on 2026-11-17 is different in kind. It is an instantiated recheck leg. Its gate +asserts the Coq version, fails on a missing prover, fails on any axiom and on an +empty audit, and runs planted controls in CI. The repository therefore has four +proof developments (Agda, Rocq, Lean, Idris2) plus the Rust fast core. "Three +provers" in D5 and its consequences is superseded by this table. + +*Consequences of the amendment.* + +* `docs/status/PROOF-STATUS.adoc` no longer marks the core-Lean legs as awaiting + the owner. The paragraph there on the 2026-11-09 ruling points here instead of + to an amendment "tracked separately". +* The seven rows whose Rocq and core-Lean legs count (`L4-fate`, `L4-fidelity`, + `L4-bond-merge`, `L4-lifting`, `A2-directions`, `A2-chain`, `retention-order`) + keep their derived `PWG-2ii`. No grade moves because of this amendment: it records + the ruling the ledger already followed. +* A new theory result reaches `PWG-2ii` only by the same route: an Agda source, + then a Rocq leg and a core-Lean leg, each with a recorded §2.2 correspondence + and a receipt. A Mathlib Lean proof of it is welcome as a generator, and it + counts for nothing on the ladder. +* Not changed by this amendment: `just proof-status` and the other recipes D5 + touched still describe the developments they ran on 2026-10-27. Bringing them in + line with this table is upkeep (doctrine 16), and it is tracked as such rather + than done here. diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index 65cd427..8c1c804 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -353,9 +353,9 @@ their titles state, and that theory "goes in Agda, rechecked in Rocq and Lean", with no Mathlib. The 2026-11-09 ruling below ("Lean is a generator, not a leg") was given about the Mathlib development, for the Mathlib reason. The Lean leg here is a separate file with no import at all. It is recorded `RECONCILED` and it -counts. *That reading is put to the owner for confirmation.* If the owner keeps -every Lean row off the ladder, the Lean legs of the seven rows become -`BRIDGE-PENDING`, and those rows derive `PWG-2i` instead of `PWG-2ii`. +counts. Asked on 2026-11-17, the owner confirmed that reading. The 2026-11-09 +ruling covers the Mathlib development only, and a core-Lean leg is a §2 recheck +leg. ADR 0005 records both rulings in its amendment of 2026-11-17. [cols="1,3"] |=== @@ -426,16 +426,16 @@ Mathlib cone therefore never enters the trusted base, and no Lean row here is or will be a §2 recheck leg. The ledger records every Lean leg of the Mathlib development as `route: re-proved, state: BRIDGE-PENDING`, which does not count (§2.2, §8.2). (The core-Lean legs added on 2026-11-17 for the seven order and L4 -rows import nothing, Mathlib included, and are recorded `RECONCILED`. Whether this -ruling also covers them is put to the owner: see <>.) The +rows import nothing, Mathlib included, and are recorded `RECONCILED`. The owner +ruled on 2026-11-17 that this ruling does not cover them: see <> +and ADR 0005, amendment of 2026-11-17.) The two Lean-only obligations — the O1 atom factorisation and the tropical (B′) sighting — stay `ungraded` until an Agda statement of them exists at all; tier-2 membership has its Agda witnesses already and stays `ungraded` only until the exhaustive step joins them. The census at the head of this section is the authoritative split. -The amendment to ADR 0005 D4 implementing this is tracked separately; until it -lands, the ADR and the policy disagree on paper and this paragraph is the -operative reading. +ADR 0005 records this ruling, and the 2026-11-17 one, in its amendment of +2026-11-17 (D4 and D5, the §2 recheck legs). One measurable cost of the dependency, worth keeping in view: `Trope.nine_families` is proved by `rfl` yet reports `[propext, Classical.choice, Quot.sound]`, reaching