From 2ac921a219dc5478c435f25ed772c5cad4a14854 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 19:35:44 +0000 Subject: [PATCH 01/22] Refuse a grade that stands on a receipt recording failure scripts/pwg-derive.sh read a receipt's state but never its result. Measured against main 0dceab6: flipping this repository's Agda receipt to "result": "fail" while leaving "state": "current" left the derived census byte-identical -- 17 PWG-3 grades still published on a receipt recording the checker rejecting the development -- and pwg-check.sh exited 0. A grade may not outlive the run that earned it. usable_receipt and pwg3_receipt now both require result == "pass", and rule 3 constrains result to the closed vocabulary pass|fail so an unrecognised value is an error rather than a silent non-pass. With the fix the same planted receipt collapses the census to PWG-3 0, ungraded 24. Canaries 20 and 21 plant those two cases. Both were confirmed to FAIL against the pre-fix scripts and pass against these, so they are evidence rather than decoration; the suite is 21/21. Two refusals worth recording, each tried and rejected on evidence: SC1112 could not be fixed the obvious way. That comment sits inside the single-quoted jq program, so swapping the Unicode right-quote for a plain apostrophe terminated the string and broke the script -- caught at once by the suite's own live-ledger canary. The comment is reworded to contain no apostrophe, and the block carries a warning saying why. SC2030/SC2031 were not silenced. The meta-canary shadowed PASS/FAIL inside a command substitution to discard the probe's deliberate failure, which tainted ten later reads of the real counters; silencing those to keep one deliberate shadow would blind the check where it does genuine work. It now reads the probe's verdict line instead, so the warnings go by construction. shellcheck 0.11.0 --severity=style, the version and severity CI pins, is clean over every tracked *.sh with no disable added. CHANGELOG also corrects two stale claims that merged with #114: an internal 18/18 vs 19/19 contradiction, and a "both theory groups ungraded" line the published census (17 PWG-3, 7 ungraded) contradicts. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01J4QvDh3p24SCUjyM9HHT31 --- CHANGELOG.adoc | 49 ++++++++++++++++++++++++----- scripts/pwg-check.sh | 2 +- scripts/pwg-derive.sh | 24 +++++++++++--- scripts/test-gate-falsifiability.sh | 33 ++++++++++++++++--- 4 files changed, 91 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 976f692..7d148b1 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,35 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* *A receipt that records FAILURE no longer supports a grade (2026-11-16).* +`+scripts/pwg-derive.sh+` read a receipt's `+state+` but never its `+result+`. +Measured against `+main+` `+0dceab6+`: flipping this repository's Agda receipt to +`+"result": "fail"+` while leaving `+"state": "current"+` left the derived census +*byte-identical* — 17 `+PWG-3+` grades still published on a receipt recording the +checker *rejecting* the development — and `+scripts/pwg-check.sh+` exited `+0+`. +A grade may not outlive the run that earned it; a regressed run is §8.2 evidence +of the opposite. `+usable_receipt+` and `+pwg3_receipt+` now both require +`+result == "pass"+`, and rule 3 constrains `+result+` to the closed vocabulary +`+pass|fail+` so an unrecognised value is an error rather than a silent +non-pass. With the fix the same planted receipt collapses the census to +`+PWG-3+` 0, `+ungraded+` 24. Canaries 20 and 21 plant exactly these two cases +and were confirmed to FAIL against the pre-fix scripts; the suite is now +*21/21*. ++ +Two things this change did *not* do are worth recording, because each was tried +and rejected on evidence. The ShellCheck `+SC1112+` warning on `+pwg-derive.sh+` +could not be fixed the obvious way: that comment sits inside the single-quoted +`+jq+` program, so replacing the Unicode right-quote with a plain apostrophe +*terminated the string* and broke the script — caught immediately by the suite's +own live-ledger canary. The comment is reworded to contain no apostrophe at all, +and the block now carries a warning saying why. And `+SC2030+`/`+SC2031+` were +not silenced: the meta-canary shadowed `+PASS+`/`+FAIL+` inside a command +substitution to discard the probe's deliberate failure, which tainted *ten* +later reads of the real counters. It now reads the probe's verdict line instead, +so the warnings go away by construction rather than by suppression. +`+shellcheck 0.11.0 --severity=style+` — the version and severity CI pins — is +clean over every tracked `+*.sh+`, with no disable added. + * *A comment marker inside a string literal is no longer read as a comment (2026-11-09).* `+tests/lib/strip-proof-comments.awk+` tracked block comments with no notion of string literals, so `+def m : String := "/-"+` opened a block @@ -65,7 +94,8 @@ count is now part of the claim. + Added canary 19, the *meta-canary*: it breaks one canary's own `+jq+` program and asserts the suite reports FAILURE. It fails against the pre-fix harness, which -is what makes it evidence rather than decoration. The suite is *19/19*, and all +is what makes it evidence rather than decoration. The suite stands at *21/21* +once the receipt-result canaries recorded below are counted, and all four breakages — a corrupted transform, a no-op fixture, a dropped group, and a suite that cannot see its own breakage — were each confirmed to fail it. @@ -102,7 +132,8 @@ Wired: `+just pwg+` (census and per-obligation grades), `+just pwg-render+` job in `+proofs.yml+` that needs no prover because the kernels already ran. + Falsified, not assumed: `+scripts/test-gate-falsifiability.sh+` gains seven PWG -canaries plus a control, and the suite now runs 18/18. Two are load-bearing — +canaries plus a control, taking the suite to 18 cases at that point (it stands at +*21/21* after the later entries in this same block). Two are load-bearing — removing the import cone collapses all 17 `+PWG-3+` to `+ungraded+` (census `+ungraded+` 24), and flipping one Lean leg to `+RECONCILED+` lifts that obligation to `+PWG-2i+` — so they fire only if the published table really is @@ -113,11 +144,15 @@ receipts, the derivation returns `+PWG-1+`. * *Proof Witness Grades recorded, and the proof records reconciled with the sources (2026-11-09).* `+docs/status/PROOF-STATUS.adoc+` gains the §8.5 PWG record -that `+PROOF-POLICY.adoc+` §8 (owner ruling 2026-11-04) requires, with both theory -groups derived as `+ungraded+` — Theorem B for want of a §2.1-conformant *receipt* -(its flags in force already are §2.1), the Lean-witnessed results for want of an -Agda *source* — plus the §1.1 import-cone record and a census in the form §8.4 -rule 7 allows. Four published rows narrowed to what the provers actually state: L3 +that `+PROOF-POLICY.adoc+` §8 (owner ruling 2026-11-04) requires, plus the §1.1 +import-cone record and a census in the form §8.4 rule 7 allows. *As first +drafted this entry read "both theory groups derived as `+ungraded+`"; that +reading was superseded within this same block* by the evidence ledger below, +which records the §2.1-conformant Agda receipt the first reading treated as +missing, and so derives `+PWG-3+` for 17 of the 24 theory obligations and +`+ungraded+` for 7 — on the two §8.1 grounds originally named: no +§2.1-conformant receipt, or no Agda source at all. The published census is the +derived one, and `+scripts/pwg-check.sh+` fails on any drift between them. Four published rows narrowed to what the provers actually state: L3 (two-sidedness is stated only for `+Falsified+` in Agda), L4 (Agda covers fate and fidelity; Lean covers fate; bond, merge and the grade-level lifting have an Idris2 leg only, which §8.1 excludes from the ladder), Target 3 (`+_↝_+` has two diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index b33b977..c3cc80a 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -79,7 +79,7 @@ badr=$(jq -r ' (if ($v.checker_version // "" | length) > 0 then empty else "\($k): no checker_version (8.2)" end), (if ($v.invocation // "" | length) > 0 then empty else "\($k): no invocation (8.2)" end), (if ($v.inputs_digest // "" | length) > 0 then empty else "\($k): no inputs_digest (8.2)" end), - (if ($v.result // "" | length) > 0 then empty else "\($k): no result (8.2)" end), + (if ($v.result // "" | test("^(pass|fail)$")) then empty else "\($k): result must be pass|fail (8.2 -- the derivation reads it; an unrecognised value must not be treated as a pass)" end), (if ($v.evidence // "" | length) > 0 then empty else "\($k): no evidence pointer" end), (if ($v.state // "" | test("^(current|superseded|regressed)$")) then empty else "\($k): state must be current|superseded|regressed (8.4 rule 5)" end), (if ($v | has("axioms")) then empty else "\($k): no axioms list (8.4 rule 6 — axioms travel with the grade)" end) ] diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index 02360ad..72542c8 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -40,14 +40,29 @@ command -v jq >/dev/null || { echo "pwg-derive: jq is required" >&2; exit 2; } # --------------------------------------------------------------------------- # shellcheck disable=SC2016 # single quotes are REQUIRED: $a/$c/$l/$t/$R below are # jq variables, and the shell must not expand them. +# +# CONSEQUENCE, and it has bitten twice: NO APOSTROPHE MAY APPEAR ANYWHERE INSIDE +# THIS BLOCK, comments included. One closes the string, and what follows is read +# as shell. Write "the receipt of the leg", never "the leg's receipt". The first +# occurrence here was a Unicode right-quote, which survived only because it is +# not an ASCII apostrophe; "fixing" SC1112 by swapping in a plain one broke the +# script. Reword instead. DERIVE=' # A section 5 token that means the kernel accepted it. def accepted: . == "PROVEN" or . == "PROVEN-WITH-AXIOMS"; - # A receipt is usable when it is the current one and names a full 40-char commit - # (8.2 PWG-1: "the source repository and its full 40-character commit"). + # A receipt is usable when it is the current one, RECORDS A PASS, and names a + # full 40-char commit (8.2 PWG-1: "the source repository and its full + # 40-character commit"). + # + # The result check is load-bearing, not decorative. Measured 2026-11-16 against + # main 0dceab6: flipping the Agda receipt of this ledger to "result": "fail" while + # leaving "state": "current" left the census byte-identical -- 17 PWG-3 grades + # published on a receipt that records the checker REJECTING the development -- + # and scripts/pwg-check.sh exited 0. A grade may not outlive the run that + # earned it; a regressed run is 8.2 evidence of the opposite. def usable_receipt($rs): $rs - | map(select(.state == "current" and (.commit | test("^[0-9a-f]{40}$")))) + | map(select(.state == "current" and .result == "pass" and (.commit | test("^[0-9a-f]{40}$")))) | length > 0; # 8.2 PWG-3 additionally requires the receipt to record the checker version, @@ -55,6 +70,7 @@ DERIVE=' def pwg3_receipt($rs): $rs | map(select( .state == "current" + and .result == "pass" and (.commit | test("^[0-9a-f]{40}$")) and (.checker_version // "" | length > 0) and (.stdlib_pin // "" | length > 0) @@ -69,7 +85,7 @@ DERIVE=' # PROVEN-WITH-AXIOMS and its 2.2 correspondence state is RECONCILED." And: # a waived leg, an unavailable leg and any BRIDGE-PENDING leg do not count. # Also require at least one current receipt with a full 40-character commit, - # resolving the leg’s receipt IDs through the supplied receipt map. + # resolving the receipt IDs of the leg through the supplied receipt map. def counts($leg; $receipts): ($leg.token | accepted) and $leg.state == "RECONCILED" diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 2fe424c..348aa10 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -225,6 +225,22 @@ pwg_canaries() { pwg_case reject "flipping a Lean leg to RECONCILED changes the grade and is rejected" \ '(.theorems[] | select(.id == "L1") | .legs.lean.state) |= "RECONCILED"' \ "not the derived one" + # R11. A grade may not outlive the run that earned it. Measured against main + # 0dceab6 these two PASSED the gate: the derivation read .state but never + # .result, so a receipt recording the checker REJECTING the development still + # carried 17 PWG-3 grades, and an unrecognised result was not a pass but was + # not an error either. Both canaries FAIL against the pre-fix scripts. + # "fail" is a LEGITIMATE recorded value, so rule 3 admits it; the rejection + # must come from the grades themselves collapsing. Measured 2026-11-16: with + # the Agda receipt at result=fail the census goes PWG-3 17 -> 0 and ungraded + # 7 -> 24, so the published table is no longer the derived one. Against the + # pre-fix scripts the census was byte-identical and this canary did not fire. + pwg_case reject "a receipt that records result=fail cannot support a grade" \ + '.receipts["agda-c0eb4f1"].result = "fail"' \ + "not the derived one" + pwg_case reject "a receipt result outside the closed vocabulary is rejected" \ + '.receipts["agda-c0eb4f1"].result = "probably-fine"' \ + "result must be pass|fail" } # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. @@ -234,10 +250,17 @@ pwg_canaries() { # reports FAILURE. Measured: this canary FAILS against the pre-fix harness. meta_canary() { local out - out=$( PASS=0; FAIL=0 - pwg_case reject "meta-probe (expected to be reported as FAILING)" '.theorems[0].pwg = ' >/dev/null 2>&1 - printf 'FAILCOUNT=%s' "$FAIL" ) - if printf '%s' "$out" | grep -q 'FAILCOUNT=1'; then + # Isolation by subshell is the POINT: the meta-probe is MEANT to fail, and its + # failure must not reach the suite tally. Read its VERDICT LINE rather than a + # counter. An earlier version shadowed PASS/FAIL inside the substitution to + # discard them; that worked, but ShellCheck then marked every later read of + # those names SC2031 across the whole tally block, and silencing ten warnings + # on the real counters to keep one deliberate shadow is a bad trade -- it + # blinds the check where it would do genuine work. Nothing is assigned here + # that the outer shell reads, so the warnings go away by construction instead + # of by suppression. + out=$( pwg_case reject "meta-probe (expected to be reported as FAILING)" '.theorems[0].pwg = ' 2>&1 ) + if printf '%s\n' "$out" | grep -q '^FAIL '; then ok "a canary whose own jq program is broken is reported as FAILURE (meta-canary)" else bad "a BROKEN canary still reported PASS — the suite cannot detect its own breakage" @@ -251,7 +274,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=19 +EXPECTED_CASES=21 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 From c8d6c5cb9df63c45fe9b52ff8944d3c2817f03e0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 19:38:27 +0000 Subject: [PATCH 02/22] Narrow two prose claims to what the provers actually state Both were raised in review on #114 and merged unaddressed. README said psiBond "separates honest from deceptive bonds". The Lean file states one pair: psiBond_separates_honest_deceptive is psiBond Bond.severed != psiBond Bond.misbound, by total != unknown. The general claim is believed and is a single `cases` away -- psiBond intact and psiBond withheld are both Q 0, and Q_ne_unknown is already in the same file -- but it is not a theorem today, so the README no longer asserts it. It is not added here because no Lean toolchain was available to check it, and an unverified theorem in a proof file is precisely what these gates exist to stop. INTERFACE-REPORT's F4 checklist said "the deceptive tier is forward-closed (L5)". The same checklist refutes that two bullets above: the fate TIER is not closed under the composition on the RIGHT, and fate-tier-meet-hom-fails is the witness -- dropped |>f atten unknown reduces to dropped, which is honestLossy, although atten unknown is tier-deceptive, because collapse discards the fidelity coordinate the deceptive unknown was living in. What Agda proves is deceptive-absorbs-|>: the grade-level PREDICATE, closed in its LEFT argument. Both qualifications now appear, with the distinction TB/Tier.agda already drew in a comment ("does not launder the GRADE-level deceptive predicate") lifted into the report. No proof statement, carrier or ADR decision is changed; this makes the prose match the proofs. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01J4QvDh3p24SCUjyM9HHT31 --- CHANGELOG.adoc | 22 +++++++++++++++++++ README.adoc | 9 ++++++-- .../agda/theorem-b/INTERFACE-REPORT.adoc | 16 ++++++++++++-- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 7d148b1..58a2e3a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,28 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* *Two prose claims narrowed to what the provers actually state (2026-11-16).* +Both were raised in review on #114 and merged unaddressed. ++ +`+README.adoc+` said `+psiBond+` "separates honest from deceptive bonds". The Lean +file states one pair: `+psiBond_separates_honest_deceptive+` is +`+psiBond Bond.severed ≠ psiBond Bond.misbound+`, by `+total ≠ unknown+`. The +general claim is believed and is a single `+cases+` away — `+psiBond intact+` and +`+psiBond withheld+` are both `+Q 0+`, and `+Q_ne_unknown+` is already in the same +file — but it is *not* a theorem today, so the README no longer asserts it. It is +not added here because no Lean toolchain was available to check it, and an +unverified theorem in a proof file is the thing these gates exist to stop. ++ +`+INTERFACE-REPORT.adoc+`'s F4 checklist said "the deceptive tier is +forward-closed (L5)". The checklist refutes that two bullets above: the fate +*tier* is not closed under `+▷+` on the right, and `+fate-tier-meet-hom-fails+` is +the witness — `+dropped ▷f atten unknown+` reduces to `+dropped+`, which is +`+honestLossy+`, although `+atten unknown+` is tier-deceptive. What Agda proves is +`+deceptive-absorbs-▷+`: the grade-level *predicate*, closed in its *left* +argument. Both qualifications now appear, with the distinction `+TB/Tier.agda+` +already drew in a comment ("does not launder the GRADE-level deceptive +predicate") lifted into the report. + * *A receipt that records FAILURE no longer supports a grade (2026-11-16).* `+scripts/pwg-derive.sh+` read a receipt's `+state+` but never its `+result+`. Measured against `+main+` `+0dceab6+`: flipping this repository's Agda receipt to diff --git a/README.adoc b/README.adoc index b05686d..95bd613 100644 --- a/README.adoc +++ b/README.adoc @@ -74,8 +74,13 @@ rejects them at validation, naming the offending coordinate. The alternative | `verification/proofs/lean4/grade-boundary/` | The grade-algebra ground truth (Lean 4 + Mathlib): the three-tier honest/deceptive cancellation boundary. No `sorryAx` and no user axiom; the kernel reports `propext` and `Quot.sound`, and `Classical.choice` in three theorems. | `verification/proofs/lean4/grade-factorisation/` | The tropical factorisation probe (Lean 4 + Mathlib): imports the carrier and decides whether the grade admits a commutative cost-quotient. Verdict *(B) factors but veridicality-blind* on the *pre-ratification* carrier; re-run on the ratified carrier it becomes *(B′) sighted on the fate axis* — `piR` separates honest `Dropped` from deceptive `Falsified`, and reads the four fate slots -only; `psiBond` separates honest from deceptive bonds -(`GradeFactorisation.lean`). A precondition only; does not address recursion (CO-1). +only; on the bond axis `psiBond` is proved to separate the honest `severed` from +the deceptive `misbound` (`psiBond_separates_honest_deceptive`, via +`total ≠ unknown`, in `GradeFactorisation.lean`). That is the *one pair* the file +states; the general "separates every honest bond from every deceptive one" is +believed and is a single `cases` away — `psiBond intact = psiBond withheld = Q 0` +and `Q_ne_unknown` is already in the file — but it is not currently a theorem, +so it is not claimed here. A precondition only; does not address recursion (CO-1). | `verification/proofs/agda/theorem-b/` | Theorem B — the deferred calculus metatheory (Agda `--safe --without-K --cubical-compatible`, the PROOF-POLICY §2.1 invocation; zero postulates): intrinsic graded calculus, value-substitution, subject reduction (β/let; `fix` open), Honest Generation. | `verification/proofs/INTEGRATION-REPORT.adoc` | How the three streams reconcile: the unified R-id ↔ Lean ↔ Agda ↔ status table, the convergence (central open problem), and the divergence adjudication. | `docs/CONTRIBUTING-A-FRONTEND.adoc` | How a new front-end targets the IR (the portability contract). diff --git a/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc b/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc index 8ba8317..ab6cf69 100644 --- a/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc +++ b/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc @@ -279,9 +279,21 @@ realised dynamically: the deceptive states are unreachable by construction. (`cut-symmetric-fails`) and the tier finding (`fate-tier-meet-hom-fails`) both DEPEND on F2 and would be false under a commutative model. * F4 (three-tier boundary) is preserved as a *structure* subject reduction respects: - the cancellative core is closed and cancels; the deceptive tier is forward-closed - (L5); the honest-but-lossy middle is shown non-cancellative by witnesses; and the + the cancellative core is closed and cancels; the GRADE-LEVEL deceptive predicate + is closed under `▷` in its LEFT argument (`deceptive-absorbs-▷`, total — L5); + the honest-but-lossy middle is shown non-cancellative by witnesses; and the one place a clean homomorphism would over-claim is exhibited as a refuted finding. + *Both qualifications on that second clause are load-bearing, and an earlier + draft of this line carried neither.* It read "the deceptive tier is + forward-closed", which this very checklist refutes two bullets up: the fate + TIER is not closed under `▷` on the RIGHT, and `fate-tier-meet-hom-fails` is + the witness — `dropped ▷f atten unknown` reduces to `dropped`, which is + `honestLossy`, although `atten unknown` is tier-deceptive, because collapse + discards the fidelity coordinate the deceptive `unknown` was living in. What + is forward-closed is the grade-level *predicate* from the left, which is a + different statement and the one Agda proves. `TB/Tier.agda` records the + distinction explicitly: the collapse "does not launder the GRADE-level + deceptive predicate". No statement was silently restricted to make it go through; every scoping choice (presence-coarseness, `fuse` omission, `fix` NOT-REACHED) is stated explicitly. From f37b92c2c5781045718f55daa3d64fa8ba8818d0 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 19:54:26 +0000 Subject: [PATCH 03/22] fix(pwg): reject receipt results with trailing newlines --- CHANGELOG.adoc | 10 ++++++---- scripts/pwg-check.sh | 2 +- scripts/test-gate-falsifiability.sh | 7 ++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 58a2e3a..2448e00 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -155,7 +155,7 @@ job in `+proofs.yml+` that needs no prover because the kernels already ran. + Falsified, not assumed: `+scripts/test-gate-falsifiability.sh+` gains seven PWG canaries plus a control, taking the suite to 18 cases at that point (it stands at -*21/21* after the later entries in this same block). Two are load-bearing — +*22/22* after the later entries in this same block). Two are load-bearing — removing the import cone collapses all 17 `+PWG-3+` to `+ungraded+` (census `+ungraded+` 24), and flipping one Lean leg to `+RECONCILED+` lifts that obligation to `+PWG-2i+` — so they fire only if the published table really is @@ -172,9 +172,11 @@ drafted this entry read "both theory groups derived as `+ungraded+`"; that reading was superseded within this same block* by the evidence ledger below, which records the §2.1-conformant Agda receipt the first reading treated as missing, and so derives `+PWG-3+` for 17 of the 24 theory obligations and -`+ungraded+` for 7 — on the two §8.1 grounds originally named: no -§2.1-conformant receipt, or no Agda source at all. The published census is the -derived one, and `+scripts/pwg-check.sh+` fails on any drift between them. Four published rows narrowed to what the provers actually state: L3 +`+ungraded+` for 7 — on three §8.1 grounds: no §2.1-conformant receipt, no +Agda source at all, or an incomplete Agda leg. The last applies to +`+retention-order+` and `+tier2-membership+`: their Agda token is `+OPEN+` +despite a current, passing Agda receipt, as the ledger and breakdown above record. +The published census is the derived one, and `+scripts/pwg-check.sh+` fails on any drift between them. Four published rows narrowed to what the provers actually state: L3 (two-sidedness is stated only for `+Falsified+` in Agda), L4 (Agda covers fate and fidelity; Lean covers fate; bond, merge and the grade-level lifting have an Idris2 leg only, which §8.1 excludes from the ladder), Target 3 (`+_↝_+` has two diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index c3cc80a..34a4907 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -79,7 +79,7 @@ badr=$(jq -r ' (if ($v.checker_version // "" | length) > 0 then empty else "\($k): no checker_version (8.2)" end), (if ($v.invocation // "" | length) > 0 then empty else "\($k): no invocation (8.2)" end), (if ($v.inputs_digest // "" | length) > 0 then empty else "\($k): no inputs_digest (8.2)" end), - (if ($v.result // "" | test("^(pass|fail)$")) then empty else "\($k): result must be pass|fail (8.2 -- the derivation reads it; an unrecognised value must not be treated as a pass)" end), + (if ($v.result == "pass" or $v.result == "fail") then empty else "\($k): result must be pass|fail (8.2 -- the derivation reads it; an unrecognised value must not be treated as a pass)" end), (if ($v.evidence // "" | length) > 0 then empty else "\($k): no evidence pointer" end), (if ($v.state // "" | test("^(current|superseded|regressed)$")) then empty else "\($k): state must be current|superseded|regressed (8.4 rule 5)" end), (if ($v | has("axioms")) then empty else "\($k): no axioms list (8.4 rule 6 — axioms travel with the grade)" end) ] diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 348aa10..5460b77 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -241,6 +241,11 @@ pwg_canaries() { pwg_case reject "a receipt result outside the closed vocabulary is rejected" \ '.receipts["agda-c0eb4f1"].result = "probably-fine"' \ "result must be pass|fail" + # `$` in a regex can match before a final newline. Require the vocabulary + # diagnostic so rejection for derived-table drift cannot mask this defect. + pwg_case reject "a receipt result with a trailing newline is rejected" \ + '.receipts["agda-c0eb4f1"].result = "pass\n"' \ + "result must be pass[|]fail" } # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. @@ -274,7 +279,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=21 +EXPECTED_CASES=22 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 From da0d68012d0c0f5f2d95611119181a41a5e4465e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 22:28:08 +0000 Subject: [PATCH 04/22] Anchor every PWG vocabulary and commit check at the true string end jq's `$` matches before a final newline, so a 40-hex commit followed by "\n" passed rule 3 and both derivation predicates: measured, the whole gate accepted it and the grade stood on a malformed provenance field. The state, token, 2.2-state and route vocabularies had the same hole. All seven anchors are now \A...\z (f37b92c had fixed the eighth, `result`, by exact equality). Canaries 23 and 24 plant a trailing newline on a commit and on a token. Both FAIL against the pre-fix scripts (the commit case is accepted outright; the token case is rejected only for derived-table drift, not for the vocabulary) and PASS against the fix. Suite 24/24. CHANGELOG: the suite count read 21/21 in two places and 22/22 in a third; all three now read 24/24, and the entry records the anchor fix. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- CHANGELOG.adoc | 17 +++++++++++++---- scripts/pwg-check.sh | 10 +++++----- scripts/pwg-derive.sh | 4 ++-- scripts/test-gate-falsifiability.sh | 11 ++++++++++- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2448e00..fabe935 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -44,8 +44,17 @@ of the opposite. `+usable_receipt+` and `+pwg3_receipt+` now both require `+pass|fail+` so an unrecognised value is an error rather than a silent non-pass. With the fix the same planted receipt collapses the census to `+PWG-3+` 0, `+ungraded+` 24. Canaries 20 and 21 plant exactly these two cases -and were confirmed to FAIL against the pre-fix scripts; the suite is now -*21/21*. +and were confirmed to FAIL against the pre-fix scripts. Canary 22 plants a +`+result+` of `+"pass\n"+`: jq's `+$+` anchor matches before a final newline, so +the rule-3 check admitted it. Rule 3 now compares `+result+` by exact equality. ++ +The same defect sat in the seven sibling anchors: the commit check in rule 3 +and in both derivation predicates, and the `+state+`, token, §2.2-state and route +vocabularies. Measured: a 40-hex commit followed by a newline passed the *whole* +gate, derivation included, so a malformed provenance field could carry a grade. +All seven are now anchored with `+\A…\z+`. Canaries 23 and 24 plant a trailing newline on a +commit and on a token; both FAIL against the pre-fix scripts and PASS against +the fix. The suite is now *24/24*. + Two things this change did *not* do are worth recording, because each was tried and rejected on evidence. The ShellCheck `+SC1112+` warning on `+pwg-derive.sh+` @@ -116,7 +125,7 @@ count is now part of the claim. + Added canary 19, the *meta-canary*: it breaks one canary's own `+jq+` program and asserts the suite reports FAILURE. It fails against the pre-fix harness, which -is what makes it evidence rather than decoration. The suite stands at *21/21* +is what makes it evidence rather than decoration. The suite stands at *24/24* once the receipt-result canaries recorded below are counted, and all four breakages — a corrupted transform, a no-op fixture, a dropped group, and a suite that cannot see its own breakage — were each confirmed to fail it. @@ -155,7 +164,7 @@ job in `+proofs.yml+` that needs no prover because the kernels already ran. + Falsified, not assumed: `+scripts/test-gate-falsifiability.sh+` gains seven PWG canaries plus a control, taking the suite to 18 cases at that point (it stands at -*22/22* after the later entries in this same block). Two are load-bearing — +*24/24* after the later entries in this same block). Two are load-bearing — removing the import cone collapses all 17 `+PWG-3+` to `+ungraded+` (census `+ungraded+` 24), and flipping one Lean leg to `+RECONCILED+` lifts that obligation to `+PWG-2i+` — so they fire only if the published table really is diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index 34a4907..b907ee1 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -74,14 +74,14 @@ missing=$(jq -r ' badr=$(jq -r ' .receipts | to_entries[] | .key as $k | .value as $v - | [ (if ($v.commit // "" | test("^[0-9a-f]{40}$")) then empty else "\($k): commit is not a full 40-char sha" end), + | [ (if ($v.commit // "" | test("\\A[0-9a-f]{40}\\z")) then empty else "\($k): commit is not a full 40-char sha" end), (if ($v.checker // "" | length) > 0 then empty else "\($k): no checker" end), (if ($v.checker_version // "" | length) > 0 then empty else "\($k): no checker_version (8.2)" end), (if ($v.invocation // "" | length) > 0 then empty else "\($k): no invocation (8.2)" end), (if ($v.inputs_digest // "" | length) > 0 then empty else "\($k): no inputs_digest (8.2)" end), (if ($v.result == "pass" or $v.result == "fail") then empty else "\($k): result must be pass|fail (8.2 -- the derivation reads it; an unrecognised value must not be treated as a pass)" end), (if ($v.evidence // "" | length) > 0 then empty else "\($k): no evidence pointer" end), - (if ($v.state // "" | test("^(current|superseded|regressed)$")) then empty else "\($k): state must be current|superseded|regressed (8.4 rule 5)" end), + (if ($v.state // "" | test("\\A(current|superseded|regressed)\\z")) then empty else "\($k): state must be current|superseded|regressed (8.4 rule 5)" end), (if ($v | has("axioms")) then empty else "\($k): no axioms list (8.4 rule 6 — axioms travel with the grade)" end) ] | .[]' "$LEDGER") \ || die "rule 3 (receipt completeness) could not be evaluated over this ledger: malformed theorem/leg/receipt shape" @@ -93,7 +93,7 @@ badr=$(jq -r ' badtok=$(jq -r ' [ .theorems[] as $t | ($t.legs | to_entries[]) - | select((.value.token // "") | test("^(PROVEN|PROVEN-WITH-AXIOMS|TESTED|ASSUMED|OPEN)$") | not) + | select((.value.token // "") | test("\\A(PROVEN|PROVEN-WITH-AXIOMS|TESTED|ASSUMED|OPEN)\\z") | not) | "\($t.id)/\(.key): token \(.value.token)" ] | .[]' "$LEDGER") \ || die "rule 4 (section 5 tokens) could not be evaluated over this ledger: malformed theorem/leg/receipt shape" @@ -102,7 +102,7 @@ badtok=$(jq -r ' badstate=$(jq -r ' [ .theorems[] as $t | ($t.legs | to_entries[]) - | select((.value.state // "") | test("^(AGDA-PENDING|AGDA-VERIFIED|COQ-CHECKED|LEAN-CHECKED|BRIDGE-PENDING|RECONCILED|COUNTEREXAMPLE|QUARANTINED|NOT-INVENTORIED)$") | not) + | select((.value.state // "") | test("\\A(AGDA-PENDING|AGDA-VERIFIED|COQ-CHECKED|LEAN-CHECKED|BRIDGE-PENDING|RECONCILED|COUNTEREXAMPLE|QUARANTINED|NOT-INVENTORIED)\\z") | not) | "\($t.id)/\(.key): state \(.value.state)" ] | .[]' "$LEDGER") \ || die "rule 4 (2.2 states) could not be evaluated over this ledger: malformed theorem/leg/receipt shape" @@ -111,7 +111,7 @@ badstate=$(jq -r ' badroute=$(jq -r ' [ .theorems[] as $t | ($t.legs | to_entries[]) - | select((.value.route // "") | test("^(transported|re-proved|waived|unavailable)$") | not) + | select((.value.route // "") | test("\\A(transported|re-proved|waived|unavailable)\\z") | not) | "\($t.id)/\(.key): route \(.value.route)" ] | .[]' "$LEDGER") \ || die "rule 4 (8.5 routes) could not be evaluated over this ledger: malformed theorem/leg/receipt shape" diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index 72542c8..b1f9e80 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -62,7 +62,7 @@ DERIVE=' # and scripts/pwg-check.sh exited 0. A grade may not outlive the run that # earned it; a regressed run is 8.2 evidence of the opposite. def usable_receipt($rs): $rs - | map(select(.state == "current" and .result == "pass" and (.commit | test("^[0-9a-f]{40}$")))) + | map(select(.state == "current" and .result == "pass" and (.commit | test("\\A[0-9a-f]{40}\\z")))) | length > 0; # 8.2 PWG-3 additionally requires the receipt to record the checker version, @@ -71,7 +71,7 @@ DERIVE=' | map(select( .state == "current" and .result == "pass" - and (.commit | test("^[0-9a-f]{40}$")) + and (.commit | test("\\A[0-9a-f]{40}\\z")) and (.checker_version // "" | length > 0) and (.stdlib_pin // "" | length > 0) and (.import_cone // "" | length > 0) diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 5460b77..82a6a44 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -246,6 +246,15 @@ pwg_canaries() { pwg_case reject "a receipt result with a trailing newline is rejected" \ '.receipts["agda-c0eb4f1"].result = "pass\n"' \ "result must be pass[|]fail" + # The same defect in the seven sibling anchors: jq's $ accepts a final + # newline, so a 40-hex commit + "\n" and a token + "\n" were admitted. The + # anchors are now \\A...\\z. Both canaries FAIL against the pre-fix scripts. + pwg_case reject "a receipt commit with a trailing newline is rejected" \ + '.receipts["agda-c0eb4f1"].commit += "\n"' \ + "not a full 40-char sha" + pwg_case reject "a section 5 token with a trailing newline is rejected" \ + '.theorems[0].legs.agda.token += "\n"' \ + "section 5 closed vocabulary" } # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. @@ -279,7 +288,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=22 +EXPECTED_CASES=24 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 From bedc32f27c6aabe40c2f882ccb1abc959e061916 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:05:42 +0000 Subject: [PATCH 05/22] Contain the dispatch job's egress instead of auditing it Hypatia RE002 (high, gating) on main 0dceab6, scheduled run 43656845018: instant-sync.yml ran harden-runner with `egress-policy: audit`, which records but never blocks, on a push-to-main job that holds FARM_DISPATCH_TOKEN. That is the one current high finding keeping the Hypatia gate red on main and on every PR. The job's only outbound call is repository-dispatch's POST to api.github.com; action downloads happen at job set-up, before the hardening step arms. So the policy is now `block` with that single endpoint allowed, the same shape the estate's other block-mode instant-sync workflows use. Fixed at the source; nothing baselined. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .github/workflows/instant-sync.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/instant-sync.yml b/.github/workflows/instant-sync.yml index 01efebf..ce15e2a 100644 --- a/.github/workflows/instant-sync.yml +++ b/.github/workflows/instant-sync.yml @@ -18,14 +18,18 @@ jobs: env: HAS_DISPATCH_TOKEN: ${{ secrets.FARM_DISPATCH_TOKEN != '' }} steps: - # This job holds FARM_DISPATCH_TOKEN; monitor its outbound egress - # (Hypatia RE001). Audit mode first: record every endpoint without - # risking the dispatch; tighten to block+allowlist once a main run - # shows the observed set. - - name: Harden runner (egress audit) + # This job holds FARM_DISPATCH_TOKEN, so its egress is CONTAINED, not + # merely audited (Hypatia RE001/RE002: audit mode is telemetry-only and + # never blocks). The only outbound call any step makes is + # repository-dispatch's POST /repos/{repo}/dispatches on api.github.com; + # action tarballs are fetched at job set-up, before this step arms. Same + # shape as the estate's other block-mode instant-sync workflows. + - name: Harden runner (egress block) uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 with: - egress-policy: audit + egress-policy: block + allowed-endpoints: > + api.github.com:443 - name: Trigger Propagation if: env.HAS_DISPATCH_TOKEN == 'true' uses: peter-evans/repository-dispatch@v4.0.1 From 7c289cbcf8a753d7032b29df8c36dd9072083b4d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:06:50 +0000 Subject: [PATCH 06/22] Give the push/schedule Hypatia lane its fleet report-backs The scheduled grid on main (run 43656845018) rendered rhodibot, glambot and finishingbot permanently orange: the reusable downloads the `fleet-report-backs` artifact by default, but only fork-governance.yml (the PR lane) ran the fleet producer, so this lane never had one (`Artifact not found for name: fleet-report-backs`). Add the same `fleet` job, at the same gitbot-fleet pin, and run the scan after it whatever its result, exactly as fork-governance.yml does. The producer checks out `pull_request.head.sha || github.sha`, so it serves push and schedule events unchanged. Fixed in this caller rather than upstream: the reusable's behaviour (missing artifact => orange, the truth) is correct; the caller was not supplying the evidence. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .github/workflows/hypatia-scan.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 651c6a8..aa12fa7 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -22,7 +22,23 @@ permissions: security-events: write jobs: + # The same producer fork-governance.yml runs on PRs. Without it this lane's + # reusable downloads `fleet-report-backs` (its default), finds no such + # artifact, and renders every enrolled fleet row 🟠 indeterminate — on + # every push and scheduled run, permanently. The reusable checks out + # `github.event.pull_request.head.sha || github.sha`, so it serves + # push/schedule unchanged. Same pin as fork-governance.yml. + fleet: + name: Fleet report-backs + uses: hyperpolymath/gitbot-fleet/.github/workflows/fleet-report-back-reusable.yml@8906f47f945d4675d7375eb78898ed0f1c48cc95 + permissions: + contents: read + scan: + # After the fleet job whatever its result: a dead fleet job renders as + # orange fleet rows, never as a missing gate. + needs: [fleet] + if: ${{ always() }} # Explicit on the calling job (a job-level block replaces, never merges # with, the workflow-level one). The previous pin (cc58c0c…) no longer # exists in standards, so this gate failed at startup with zero jobs — From 94e10e2d9eec98f848b41daee2092acb9eb5df5b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:11:37 +0000 Subject: [PATCH 07/22] Resolve every PWG witness name against the sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing read the ledger's `declarations`. Measured on main 0dceab6: 13 of 91 distinct witness names resolved to no declaration -- ASCII transliterations (`|>` for `▷`, `|=` for `⊑`, `beta-` for `β-`, `-r` for `ʳ`), kebab-case spellings of camelCase lemmas (`fate-deceptive-unique` for `fateDeceptiveUnique`), `gmonoid-unit` for the pair `gmonoid-unitL`/`gmonoid-unitR`, and a Lean name in a namespace that does not hold it. L2's only Agda witness and all three veridicality-derivation witnesses were among them, on rows published PWG-3. scripts/pwg-names.sh inventories declared names (Agda column-0 signatures, data constructors and module names, private blocks excluded; Lean declarations qualified by the namespace stack), reading through the comment stripper so commented-out names do not count. pwg-check rule 6 resolves every agda and lean witness against it: Agda exactly, Lean exactly or by a namespace suffix. The 13 names are corrected in the ledger; nothing else in it changes, and no grade moves. Canaries 25 and 26 plant the ASCII spelling that was live on main and a Lean name in the wrong namespace. Both FAIL against the pre-rule-6 gate and PASS with it. The old ledger fails rule 6 on exactly the 13. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- scripts/pwg-check.sh | 46 +++++++++++- scripts/pwg-names.sh | 106 ++++++++++++++++++++++++++++ scripts/test-gate-falsifiability.sh | 23 +++++- verification/pwg.json | 2 +- 4 files changed, 173 insertions(+), 4 deletions(-) create mode 100755 scripts/pwg-names.sh diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index b907ee1..0c13ede 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -16,7 +16,9 @@ # fields 8.2 requires, including a full 40-character commit; # 4. every section 5 token and every 2.2 state comes from its closed vocabulary; # 5. the table and census published in docs/status/PROOF-STATUS.adoc are -# byte-identical to what scripts/pwg-derive.sh produces. +# byte-identical to what scripts/pwg-derive.sh produces; +# 6. every agda and lean witness name the ledger cites resolves to a +# declaration in the sources (scripts/pwg-names.sh). # # Fails loudly and says which rule broke. Usage: pwg-check.sh [REPO_ROOT] set -uo pipefail @@ -138,8 +140,48 @@ else fi fi +# --- 6. every cited witness names a declaration that exists ---------------- +# Measured 2026-11-16 against main 0dceab6: 13 of the ledger's 91 distinct +# witness names resolved to nothing in the sources -- ASCII transliterations +# (`|>` for `▷`, `beta-` for `β-`), a kebab-case spelling of a camelCase name, a +# lemma split in two (`gmonoid-unit` vs `gmonoid-unitL`/`-unitR`), a wrong Lean +# namespace -- including L2's ONLY Agda witness, on a row published PWG-3. The +# grade was derived from tokens and receipts; nothing checked that the token's +# witness existed. scripts/pwg-names.sh inventories the declared names; this rule +# resolves every agda and lean leg's `declarations` against it. Agda names must +# match exactly (a module name is also a valid citation); a Lean name may omit a +# leading namespace prefix, so it resolves if some declaration equals it or ends +# with `.`. Name resolution, not proof: the receipt still carries that. +NAMES="$ROOT/scripts/pwg-names.sh" +if [ ! -f "$NAMES" ]; then + die "scripts/pwg-names.sh is missing -- rule 6 (witness names resolve) cannot be checked" +elif ! inventory=$(bash "$NAMES" "$ROOT" 2>&1); then + die "rule 6 could not build the declaration inventory:"$'\n'"$inventory" +else + dangling=$(jq -r ' + .theorems[] as $t + | ($t.legs | to_entries[]) | select(.key == "agda" or .key == "lean") + | .key as $l | (.value.declarations // [])[] + | "\($l)\t\($t.id)\t\(.)"' "$LEDGER" \ + | INV="$inventory" awk -F'\t' ' + BEGIN { + n = split(ENVIRON["INV"], rows, "\n") + for (i = 1; i <= n; i++) { split(rows[i], f, "\t"); have[f[1] "\t" f[2]] = 1; if (f[1] == "lean") lean[++ln] = f[2] } + } + { + ok = (($1 "\t" $3) in have) + if (!ok && $1 == "lean") + for (i = 1; i <= ln && !ok; i++) { + L = lean[i]; m = length($3) + if (length(L) > m && substr(L, length(L) - m) == "." $3) ok = 1 + } + if (!ok) print $2 "/" $1 ": " $3 + }') || die "rule 6 (witness names resolve) could not be evaluated over this ledger" + [ -n "$dangling" ] && die "witness name(s) that resolve to no declaration in the sources:"$'\n'"$dangling" +fi + if [ "$fail" -eq 0 ]; then n=$(jq -e '.theorems | length' "$LEDGER") || die "the ledger has no .theorems array" - echo "PASS: PWG ledger well-formed, no asserted grades, $n obligation(s) derived, published table and census match" + echo "PASS: PWG ledger well-formed, no asserted grades, every witness name resolves, $n obligation(s) derived, published table and census match" fi exit "$fail" diff --git a/scripts/pwg-names.sh b/scripts/pwg-names.sh new file mode 100755 index 0000000..80f925a --- /dev/null +++ b/scripts/pwg-names.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +# +# Inventory of the declarations the PWG ledger may cite as witnesses. +# +# Emits one line per exported declaration, `\t`, +# read from the sources with comments stripped (tests/lib/strip-proof-comments.awk, +# which fails loudly on an unterminated comment or string). scripts/pwg-check.sh +# rule 6 resolves every `declarations` entry in verification/pwg.json against this +# list, so a witness that names nothing — a transliterated or renamed identifier — +# is a gate failure, not a silent row. +# +# This is a NAME inventory, not a kernel. It establishes that the cited name is +# declared where the ledger says; that the declaration proves the stated +# obligation is the receipt's business (PROOF-POLICY 8.2), not this script's. +# +# agda : top-level (column-0) signatures in verification/proofs/agda/theorem-b/TB/, +# qualified by the file's module (TB.). `a b : T` declares both. +# Declarations inside a `private` block are not exported and are not +# listed. Constructors and record fields are not listed. +# lean : theorem/lemma/def/abbrev/instance/structure/inductive/class/axiom/opaque +# declarations under verification/proofs/lean4/ (no .lake), qualified by +# the enclosing `namespace` stack. `section`/`end` are tracked so an +# `end` closes the right scope. +# +# Usage: pwg-names.sh [REPO_ROOT] +set -euo pipefail +ROOT="${1:-$(cd "$(dirname "$0")/.." && pwd)}" +STRIP="$ROOT/tests/lib/strip-proof-comments.awk" +[ -f "$STRIP" ] || { echo "pwg-names: comment stripper missing at tests/lib/strip-proof-comments.awk" >&2; exit 2; } + +AGDA_DIR="$ROOT/verification/proofs/agda/theorem-b/TB" +LEAN_DIR="$ROOT/verification/proofs/lean4" +[ -d "$AGDA_DIR" ] || { echo "pwg-names: no Agda sources at $AGDA_DIR" >&2; exit 2; } +[ -d "$LEAN_DIR" ] || { echo "pwg-names: no Lean sources at $LEAN_DIR" >&2; exit 2; } + +n=0 +while IFS= read -r -d '' f; do + mod="TB.$(basename "$f" .agda)" + awk -f "$STRIP" "$f" | awk -v mod="$mod" ' + BEGIN { print "agda\t" mod } + # A column-0 line ends a private block or a data block; an indented line + # continues it. + /^[^ \t]/ { priv = 0; indata = 0 } + /^private[ \t]*$/ { priv = 1; next } + priv { next } + # Constructors of a top-level `data … where` are exported as TB... + /^data[ \t].*[ \t]where[ \t]*$/ { indata = 1; next } + indata && /^[ \t]+[^ \t]/ { + if (!match($0, / :( |$)/)) next + head = substr($0, 1, RSTART - 1); sub(/^[ \t]+/, "", head) + k = split(head, toks, /[ \t]+/) + for (j = 1; j <= k; j++) if (toks[j] != "") print "agda\t" mod "." toks[j] + next + } + /^[^ \t]/ { + # `name : T` or a signature continued on the next line (`name :`). + if (!match($0, / :( |$)/)) next + colon = RSTART + head = substr($0, 1, colon - 1) + k = split(head, toks, /[ \t]+/) + if (toks[1] ~ /^(data|record|module|open|import|infix|infixl|infixr|pattern|syntax|postulate|abstract|mutual|instance|variable|field|constructor)$/) next + for (j = 1; j <= k; j++) if (toks[j] != "") print "agda\t" mod "." toks[j] + }' + n=$((n + 1)) +done < <(find "$AGDA_DIR" -name '*.agda' -print0 | sort -z) +[ "$n" -gt 0 ] || { echo "pwg-names: found no .agda files -- an empty inventory would resolve nothing" >&2; exit 1; } + +n=0 +while IFS= read -r -d '' f; do + awk -f "$STRIP" "$f" | awk ' + function joined( s, i) { s = ""; for (i = 1; i <= depth; i++) if (ns[i] != "") s = s ns[i] "."; return s } + { + line = $0 + sub(/^[ \t]+/, "", line) + if (match(line, /^namespace[ \t]+[^ \t]+/)) { + name = line; sub(/^namespace[ \t]+/, "", name); sub(/[ \t].*$/, "", name) + c = split(name, parts, ".") + for (i = 1; i <= c; i++) { depth++; ns[depth] = parts[i]; kind[depth] = (i == 1 ? "ns" : "nsc") } + next + } + if (line ~ /^(noncomputable[ \t]+)?section([ \t]|$)/) { depth++; ns[depth] = ""; kind[depth] = "sec"; next } + if (line ~ /^end([ \t]|$)/) { + # `end A.B` closes the components A and B; a bare `end` or `end S` closes one scope. + name = line; sub(/^end[ \t]*/, "", name); sub(/[ \t].*$/, "", name) + c = (name == "") ? 1 : split(name, parts, ".") + if (depth > 0 && kind[depth] == "sec") c = 1 + for (i = 1; i <= c && depth > 0; i++) depth-- + next + } + # strip attributes and modifiers + while (match(line, /^@\[[^]]*\][ \t]*/)) line = substr(line, RLENGTH + 1) + while (match(line, /^(private|protected|noncomputable|unsafe|partial|nonrec|scoped|local)[ \t]+/)) { + if (line ~ /^private[ \t]/) priv = 1 + line = substr(line, RLENGTH + 1) + } + if (match(line, /^(theorem|lemma|def|abbrev|instance|structure|inductive|class|axiom|opaque)[ \t]+[^ \t:({[]+/)) { + name = substr(line, 1, RLENGTH); sub(/^[a-z]+[ \t]+/, "", name) + if (!priv) print "lean\t" joined() name + } + priv = 0 + }' + n=$((n + 1)) +done < <(find "$LEAN_DIR" -name '*.lean' -not -path '*/.lake/*' -print0 | sort -z) +[ "$n" -gt 0 ] || { echo "pwg-names: found no .lean files -- an empty inventory would resolve nothing" >&2; exit 1; } diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 82a6a44..90cc850 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -156,6 +156,15 @@ pwg_case() { cp "$ROOT/scripts/pwg-derive.sh" "$d/scripts/" 2>/dev/null || { rm -rf "$d"; bad "$label (no pwg-derive.sh to copy)"; return; } cp "$ROOT/scripts/pwg-check.sh" "$d/scripts/" 2>/dev/null || { rm -rf "$d"; bad "$label (no pwg-check.sh to copy)"; return; } cp "$ROOT/docs/status/PROOF-STATUS.adoc" "$d/docs/status/" 2>/dev/null || { rm -rf "$d"; bad "$label (no PROOF-STATUS.adoc to copy — rule 5 would be untested)"; return; } + # Rule 6 resolves witness names against the real sources: carry the inventory + # script, the comment stripper it reads through, and the Agda/Lean sources. + cp "$ROOT/scripts/pwg-names.sh" "$d/scripts/" 2>/dev/null || { rm -rf "$d"; bad "$label (no pwg-names.sh to copy — rule 6 would be untested)"; return; } + mkdir -p "$d/tests/lib" "$d/verification/proofs/agda/theorem-b" + if ! { cp "$ROOT/tests/lib/strip-proof-comments.awk" "$d/tests/lib/" \ + && cp -r "$ROOT/verification/proofs/agda/theorem-b/TB" "$d/verification/proofs/agda/theorem-b/" \ + && (cd "$ROOT/verification/proofs" && find lean4 -name '*.lean' -not -path '*/.lake/*' -print0 | xargs -0 cp --parents -t "$d/verification/proofs/"); }; then + rm -rf "$d"; bad "$label (could not copy the sources rule 6 resolves against)"; return + fi if [ "$jqprog" = "IDENTITY" ]; then cp "$ROOT/verification/pwg.json" "$d/verification/pwg.json" elif [ "$jqprog" = "PRETTY" ]; then @@ -255,6 +264,18 @@ pwg_canaries() { pwg_case reject "a section 5 token with a trailing newline is rejected" \ '.theorems[0].legs.agda.token += "\n"' \ "section 5 closed vocabulary" + # R12. A witness must name something. Measured against main 0dceab6: 13 of 91 + # distinct witness names resolved to no declaration (L2's only Agda witness + # among them) and the gate passed, because nothing read `declarations`. Both + # canaries FAIL against the pre-rule-6 gate. The first plants the exact ASCII + # transliteration that was live on main; the second a Lean name whose + # namespace exists but holds no such declaration. + pwg_case reject "an Agda witness spelled in ASCII (|> for ▷) does not resolve" \ + '(.theorems[] | select(.id == "L3") | .legs.agda.declarations) |= map(sub("▷"; "|>"))' \ + "resolve to no declaration" + pwg_case reject "a Lean witness in the wrong namespace does not resolve" \ + '(.theorems[] | select(.id == "L1") | .legs.lean.declarations) = ["Trope.Bond.comp_assoc"]' \ + "resolve to no declaration" } # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. @@ -288,7 +309,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=24 +EXPECTED_CASES=26 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 diff --git a/verification/pwg.json b/verification/pwg.json index 2ca1fc8..de74ada 100644 --- a/verification/pwg.json +++ b/verification/pwg.json @@ -1 +1 @@ -{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unit"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-|>"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL","TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Coverage differs by prover. Agda covers the fate coordinate and the fidelity dimension; Lean covers fate only (FateA.le is defined on Fate alone). Bond and merge have an Idris2 restatement only, which 8.1 excludes from the ladder. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for gradeCompose that spec section 7's Knaster-Tarski argument invokes is not mechanised in Idris2. Bond, merge and the grade-level lifting have no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL","Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity), in full"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-|>","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.|=-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"What is proved is the two directional facts of A2. Totality is stated in Lean (FateA.le_total); transitivity and antisymmetry are not mechanised in any prover, so 'chain' is stronger than the mechanised content.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fate-deceptive-unique","TB.Honest.bond-deceptive-unique","TB.Honest.merge-deceptive-unique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-|>"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancel-r","TB.Tier.core-closed-|>"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Delta.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.beta-app","TB.Reduction.beta-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} +{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL","TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Coverage differs by prover. Agda covers the fate coordinate and the fidelity dimension; Lean covers fate only (FateA.le is defined on Fate alone). Bond and merge have an Idris2 restatement only, which 8.1 excludes from the ladder. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for gradeCompose that spec section 7's Knaster-Tarski argument invokes is not mechanised in Idris2. Bond, merge and the grade-level lifting have no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL","Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity), in full"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"What is proved is the two directional facts of A2. Totality is stated in Lean (FateA.le_total); transitivity and antisymmetry are not mechanised in any prover, so 'chain' is stronger than the mechanised content.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} From 3f6796f5bb6672f03de71486ba08348f11fe82b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:13:35 +0000 Subject: [PATCH 08/22] Make PWG-2ii reachable: PWG-1 is about which commit receipts describe The derivation's top branch granted PWG-1 when usable_receipt held for all three witnesses -- but with both recheck legs counting, every conjunct of usable_receipt already held, so "2ii" could never be returned and PWG-1 was granted on exactly PWG-2ii evidence. Latent (no obligation has two counting legs yet), but measured: with both legs of L1 counting and every receipt recording commit ffff..., the old derivation returned PWG-1. PROOF-POLICY 8.2/8.5.2: PWG-1 needs every counted witness to have a current receipt that DESCRIBES the source commit; a receipt from another commit still counts toward 3, 2i and 2ii. The branch now tests exactly that (receipt commit == the ledger's source commit; this ledger records no echo chains, so none are followed -- the conservative reading). Canaries 27 (control: same commit derives PWG-1) and 28 (other commit derives PWG-2ii) read the derived grade directly, since table drift cannot tell 1 from 2ii. Canary 28 FAILS against the pre-fix derivation. Published grades unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- scripts/pwg-derive.sh | 21 +++++++++++++---- scripts/test-gate-falsifiability.sh | 35 +++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index b1f9e80..20c50bc 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -92,7 +92,16 @@ DERIVE=' and ($leg.route != "waived" and $leg.route != "unavailable") and usable_receipt([$leg.receipts[] | $receipts[.]]); - .receipts as $R + # 8.2 PWG-1 / 8.5.2: a receipt DESCRIBES the source commit when its commit is + # the source commit of the ledger. (8.5.2 also admits an echo chain to it; this + # ledger records no echoes, so a receipt from any other commit does not + # describe it -- the conservative reading, and it still counts toward 3/2i/2ii.) + def describes($rs; $src): $rs + | map(select(.state == "current" and .result == "pass" and .commit == $src)) + | length > 0; + + .commit as $src + | .receipts as $R | .theorems | map( . as $t @@ -110,9 +119,13 @@ DERIVE=' elif $legs == 0 then "3" elif $legs == 1 then "2i" else - (if (usable_receipt($ar) - and usable_receipt([$c.receipts[] | $R[.]]) - and usable_receipt([$l.receipts[] | $R[.]])) + # Both legs count, so every conjunct of usable_receipt already holds + # for all three witnesses: testing it here (as this branch once did) + # made "2ii" unreachable and granted PWG-1 on PWG-2ii evidence. The + # rung above 2ii is about WHICH COMMIT the receipts describe. + (if (describes($ar; $src) + and describes([$c.receipts[] | $R[.]]; $src) + and describes([$l.receipts[] | $R[.]]; $src)) then "1" else "2ii" end) end ) as $grade diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 90cc850..f152b9e 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -278,6 +278,37 @@ pwg_canaries() { "resolve to no declaration" } +# --- the top of the ladder: PWG-2ii and PWG-1 are different rungs ---------- +# The table-drift gate cannot tell 1 from 2ii (either way the published row stops +# matching), so these canaries read the DERIVED grade directly. Both legs of L1 +# are made to count; the only variable is the commit the receipts record. +# Measured 2026-11-16: against the pre-fix derivation a receipt commit of all +# f's derived PWG-1 -- "2ii" was unreachable, because the branch tested only +# conjuncts that counting had already implied. The 2ii canary FAILS against it. +derive_case() { + local want="$1" label="$2" commit="$3" d got + d=$(scratch) + if ! jq -cS --arg c "$commit" ' + .receipts["rocq-canary"] = (.receipts["lean-boundary-c0eb4f1"] + {commit: $c}) + | .receipts["lean-boundary-c0eb4f1"].commit = $c + | (.theorems[] | select(.id == "L1") | .legs) |= + (.lean.state = "RECONCILED" + | .rocq = {declarations: [], receipts: ["rocq-canary"], route: "re-proved", state: "RECONCILED", token: "PROVEN"})' \ + "$ROOT/verification/pwg.json" > "$d/pwg.json" 2>/dev/null; then + rm -rf "$d"; bad "$label (the canary's OWN jq transform failed)"; return + fi + got=$(bash "$ROOT/scripts/pwg-derive.sh" --ledger "$d/pwg.json" --json 2>/dev/null | jq -r '.[] | select(.id == "L1") | .pwg') + rm -rf "$d" + if [ "$got" = "$want" ]; then ok "$label"; else bad "$label (derived PWG-$got, expected PWG-$want)"; fi +} +ladder_canaries() { + local src + src=$(jq -r '.commit' "$ROOT/verification/pwg.json") + derive_case 1 "both legs counting, receipts on the source commit, derive PWG-1 (control)" "$src" + derive_case 2ii "both legs counting, receipts on another commit, derive PWG-2ii, not PWG-1" \ + "$(printf '%040d' 0 | tr 0 f)" +} + # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. # A canary whose jq program is broken writes an empty ledger; the gate then rejects # it for being invalid JSON rather than for the planted drift, and the canary passes @@ -304,12 +335,12 @@ meta_canary() { wellknown_canaries; valid_canary; live_canary c_weak_crypto; c_plaintext_http; c_secret -pwg_canaries +pwg_canaries; ladder_canaries meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=26 +EXPECTED_CASES=28 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 From f2830231dc0edf389fad0b05326aa8bd27f4f9c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:13:59 +0000 Subject: [PATCH 09/22] Correct INTERFACE-REPORT where it stated the retired carrier as current MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The F2 checklist said `fate-tier-meet-hom-fails` depends on F2 and "would be false under a commutative model". The carrier IS commutative (TB.Grade.grade-comm) and the theorem is proved on it, with the new witness `dropped ▷f atten unknown`. It also named `grade-not-comm` and `cut-symmetric-fails` as live; neither exists (replaced by grade-comm and cut-grade-comm). - Target 1 said F2 "holds definitionally" via `dropped ▷f falsified = dropped`; TB/Grade.agda now defines that clause as `= falsified` (A1). The heading drops "NON-COMMUTATIVE" and a note marks the F2 sentences as the pre-ratification record. - "CF is refuted by both F2 and L5" -> by L5, and by F2 only on the old carrier. "honesty is closed under the non-commutative ▷" -> under ▷. - GradeBoundary.lean's axiom bound was given as propext/Quot.sound only; its own audit footer names propext, Classical.choice and Quot.sound. Stated as that upper bound. Every name cited is checked against scripts/pwg-names.sh. Prose only; no statement, proof or grade changes. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .../agda/theorem-b/INTERFACE-REPORT.adoc | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc b/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc index ab6cf69..38b4d07 100644 --- a/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc +++ b/verification/proofs/agda/theorem-b/INTERFACE-REPORT.adoc @@ -63,7 +63,8 @@ modality; `EchoIndexed.agda` — indexed functoriality; these are the It sits ON TOP of the *FROZEN INTERFACE* — the grade algebra established in Lean 4 (`verification/proofs/lean4/grade-boundary/GradeBoundary.lean`, sorry-free, axioms -`propext`/`Quot.sound` only). The four established facts are re-established in Agda +at most Lean/Mathlib's standard axioms `propext`, `Classical.choice` and +`Quot.sound`, as that file's own axiom-audit footer states). The four established facts are re-established in Agda here as the foundation (`TB.Grade`), then the calculus metatheory is built over them. [IMPORTANT] @@ -95,7 +96,7 @@ deceptive (`falsified`/`misbound`/`conflated`/`unknown`, left zeros ⇒ L5 irrev Fences respected: spec is v0.2, ratified carrier R-2026-07-07 (O1 seven-effects completeness OUT OF SCOPE, untouched); "CF" (cancellative+conical ⇒ special-Frobenius) NOT assumed — it is -refuted-as-universal by both F2 and L5. +refuted-as-universal by L5 (and, on the pre-ratification carrier only, by F2). == Module → fact → status map (the merge key) @@ -130,10 +131,21 @@ refuted-as-universal by both F2 and L5. == Per-target verdict -=== Target 1 — encode the grade as a NON-COMMUTATIVE graded structure (intrinsic) — *PROVED* +=== Target 1 — encode the grade as a graded structure (intrinsic) — *PROVED* + +[NOTE] +==== +As first set, this target read "NON-COMMUTATIVE". On the ratified carrier +(R-2026-07-07) the product is commutative (`grade-comm`) and +`dropped ▷f falsified = falsified` (`TB/Grade.agda`, the `_▷f_` clause marked +(A1)). The sentences below that present F2 or a non-commutative ▷ as current +describe the pre-ratification carrier and are kept as the record of it; the +rest of the paragraph (the intrinsic calculus) is current. +==== `TB.Grade` ports the carrier (Δ, Fate, Bond, Merge, Grade) and ▷ clause-for-clause -from the Lean, with first-argument-match so F2 holds *definitionally* +from the Lean, with first-argument-match so F2 held *definitionally* on the +pre-ratification carrier (`dropped ▷f falsified = dropped ≠ falsified = falsified ▷f dropped`). F1/F2/F3 and the F4 absorbing lemmas are re-established. `TB.Syntax` is the *intrinsic* calculus `Γ ⊢ A ! g` (a derivation is a well-typed-and-well-graded term): variables carry ε; @@ -257,7 +269,7 @@ above records.) lemmas, `deceptiveDuals = (falsified, misbound, conflated)`) and Generation (`Move`, `moveFate/Bond/Merge`, `movesHonest*`, `genFate/genBond/genMerge`) from the Idris ground truth. The new content is the *calculus metatheorem*: honesty is closed -under the non-commutative ▷ (`honest-closed-▷`, via per-coordinate +under ▷ (`honest-closed-▷`, via per-coordinate `fate/bond/merge-honest`), and every writable effect atom is honest (`ε/atten/drop/sever/predicate-atom-honest`). Therefore a term built from the writable effects can NEVER produce a deceptive grade @@ -276,8 +288,13 @@ realised dynamically: the deceptive states are unreachable by construction. * F2 (non-commutativity) is *mandatory* and live: `grade-not-comm` is a pinned theorem; ▷ is a bare non-commutative function; no commutative bundle is instantiated for `Grade`/`Fate`; the substitution refutation - (`cut-symmetric-fails`) and the tier finding (`fate-tier-meet-hom-fails`) both - DEPEND on F2 and would be false under a commutative model. + (`cut-symmetric-fails`) depended on F2. [CORRECTED 2026-11-16] None of + `grade-not-comm` and `cut-symmetric-fails` exists any more (they are + replaced by `grade-comm` and `cut-grade-comm`). The tier finding + `fate-tier-meet-hom-fails` is *not* among the F2-dependent results: it is + proved on the ratified, COMMUTATIVE carrier with a new witness + (`dropped ▷f atten unknown = dropped`; collapse discards the fidelity + coordinate), so it holds under a commutative model. * F4 (three-tier boundary) is preserved as a *structure* subject reduction respects: the cancellative core is closed and cancels; the GRADE-LEVEL deceptive predicate is closed under `▷` in its LEFT argument (`deceptive-absorbs-▷`, total — L5); From fd373238521ada518f692ce01514b44204ccbfb2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:15:51 +0000 Subject: [PATCH 10/22] Grade L4 and A2 by their parts (owner ruling: split) "L4 (monotonicity), in full" and "Fate is a chain (A2)" derived PWG-3 from Agda legs whose own notes conceded partial coverage, while retention-order and tier2-membership, in the same position, were OPEN. L4 -> L4-fate, L4-fidelity (PWG-3; the existing Agda witnesses, split by coordinate), L4-bond-merge (Idris2 reference only: ungraded) and L4-lifting (mechanised nowhere: ungraded). A2 -> A2-directions (PWG-3) and A2-chain (ungraded: transitivity and antisymmetry are mechanised in no prover, so the Lean leg's token is OPEN as well; it was BRIDGE-PENDING and never counted). Census: 24 theory obligations (PWG-3 17, ungraded 7) -> 28 (PWG-3 18, ungraded 10). Table regenerated with the pwg-render steps; the census line replaced. PROOF-STATUS and README prose point at the parts. CHANGELOG records this PR as one entry. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- CHANGELOG.adoc | 41 +++++++++++++++++++++++++++++++++++ README.adoc | 6 ++++- docs/status/PROOF-STATUS.adoc | 32 ++++++++++++++++++++++----- verification/pwg.json | 2 +- 4 files changed, 73 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fabe935..0a59a7a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,47 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* *Every PWG witness name now resolves, the ladder's top two rungs are +distinct, and L4 and A2 are graded by their parts (2026-11-16).* ++ +_Witness names._ Nothing read the ledger's `+declarations+`: 13 of 91 distinct +witness names named nothing in the sources — ASCII transliterations +(`+|>+` for `+▷+`, `+|=+` for `+⊑+`, `+beta-+` for `+β-+`, `+-r+` for `+ʳ+`), +kebab-case spellings of camelCase lemmas, `+gmonoid-unit+` for the pair +`+gmonoid-unitL+`/`+gmonoid-unitR+`, and a Lean name in the wrong namespace. L2's +only Agda witness and all three veridicality-derivation witnesses were among them, +on rows published `+PWG-3+`. `+scripts/pwg-names.sh+` inventories the declared +names (through the comment stripper) and `+scripts/pwg-check.sh+` rule 6 resolves +every Agda and Lean witness against it. The 13 are corrected; no grade moved. +Canaries 25–26 fail against the pre-rule-6 gate. ++ +_Ladder._ With both recheck legs counting, the derivation's `+PWG-1+` test +re-checked conjuncts counting already implied, so `+PWG-2ii+` was unreachable and +`+PWG-1+` was granted on `+PWG-2ii+` evidence (measured: receipts recording commit +`+ffff…+` derived `+PWG-1+`). §8.2/§8.5.2 make `+PWG-1+` a question of which commit +the receipts describe; the branch now requires each counted witness's receipt to +record the ledger's source commit. Latent — no obligation has two counting legs. +Canaries 27–28 read the derived grade; 28 fails against the pre-fix derivation. +The suite stands at *28/28*. ++ +_L4 and A2, split (owner ruling 2026-11-16)._ "L4 (monotonicity), in full" and +"Fate is a chain (A2)" derived `+PWG-3+` from Agda legs whose own notes conceded they +covered only part of the statement. L4 is now four obligations — `+L4-fate+` and +`+L4-fidelity+` (`+PWG-3+`), `+L4-bond-merge+` and `+L4-lifting+` (ungraded) — and A2 +two: `+A2-directions+` (`+PWG-3+`) and `+A2-chain+` (ungraded; transitivity and +antisymmetry are mechanised in no prover, so its Lean leg is `+OPEN+` too). The +census moves from 24 theory obligations (`+PWG-3+` 17, ungraded 7) to 28 +(`+PWG-3+` 18, ungraded 10). The denominator changed because the obligations +did; no evidence changed. ++ +_INTERFACE-REPORT._ It said `+fate-tier-meet-hom-fails+` "would be false under a +commutative model"; the carrier is commutative (`+grade-comm+`) and the theorem +holds on it. It named `+grade-not-comm+` and `+cut-symmetric-fails+` as live (both +replaced), stated the retired clause `+dropped ▷f falsified = dropped+` as +definitional (the ratified clause is `+= falsified+`), and gave +`+GradeBoundary.lean+`'s axiom bound as `+propext+`/`+Quot.sound+` only, where the +file's own footer names three. All corrected; prose only. + * *Two prose claims narrowed to what the provers actually state (2026-11-16).* Both were raised in review on #114 and merged unaddressed. + diff --git a/README.adoc b/README.adoc index 95bd613..e72eead 100644 --- a/README.adoc +++ b/README.adoc @@ -171,7 +171,11 @@ under `reference`, never as a leg, so it can neither raise nor lower a grade. And *L4 in full* is proved by none of the three: Agda covers the fate coordinate and the fidelity dimension, Lean covers fate, and bond and merge have an Idris2 restatement only. Idris2 establishes coordinate-level monotonicity only; the -lifting for `gradeCompose` is not mechanised in Idris2. The atom +lifting for `gradeCompose` is mechanised in no prover. The ledger therefore +grades L4 as four obligations (`L4-fate` and `L4-fidelity` at `PWG-3`; +`L4-bond-merge` and `L4-lifting` ungraded), and A2 as two (`A2-directions` at +`PWG-3`; `A2-chain` ungraded, because transitivity and antisymmetry are +mechanised 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 — pre-ratification `GradeFactorisation.lean` veridicality-blind, ratified diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index d2508bc..e387fd0 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -36,7 +36,7 @@ toc::[] | Agda `TB.Grade.{falsified-absorbL,falsified-absorbR,misbound-absorbL,conflated-absorbL,unknown-absorbL,total-absorb-Q}`, `TB.Tier.deceptive-absorbs-▷`; Lean `FateA.falsified_two_sided_zero`, `GradeR.gBotR_two_sided_zero`. | L4 (monotonicity), in full -| stem:[\triangleright] is monotone in both arguments w.r.t. stem:[\sqsubseteq] on every coordinate of the ratified carrier. Coverage differs by prover: the Agda covers the fate coordinate (`fateL4Mono{R,L}`) and the fidelity dimension (`dplusMono{R,L}`) only; the bond and merge coordinates have an Idris2 restatement only. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for `gradeCompose` that spec §7's Knaster–Tarski argument invokes is not mechanised in Idris2. Per PROOF-POLICY §8.1 Idris2 is an engineering prover and is not on the PWG ladder, so bond, merge and the grade-level lifting currently have no gradeable theory leg. +| stem:[\triangleright] is monotone in both arguments w.r.t. stem:[\sqsubseteq] on every coordinate of the ratified carrier. Coverage differs by prover: the Agda covers the fate coordinate (`fateL4Mono{R,L}`) and the fidelity dimension (`dplusMono{R,L}`) only; the bond and merge coordinates have an Idris2 restatement only. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for `gradeCompose` that spec §7's Knaster–Tarski argument invokes is mechanised in no prover. Per PROOF-POLICY §8.1 Idris2 is an engineering prover and is not on the PWG ladder, so bond, merge and the grade-level lifting currently have no gradeable theory leg. The PWG ledger therefore grades L4 as four obligations, `L4-fate`, `L4-fidelity`, `L4-bond-merge` and `L4-lifting` (owner ruling 2026-11-16); L4 in full is their conjunction. | Idris2 `Trope.Soundness.{fateL4MonoR,fateL4MonoL}`, `Trope.Order.{bondComposeMono,mergeComposeMono}`; Agda `TB.Order.{fateL4MonoR,fateL4MonoL}`; Lean `FateA.{comp_mono_right,comp_mono_left}` (fate coordinate only; `FateA.le` is defined on `Fate` alone and the Lean tree carries no `Bond`, `Merge` or `GradeR` order). | L5 (deception infectiousness) @@ -52,7 +52,7 @@ toc::[] | Idris2 `Trope.Laws.decGradeLte`, `Trope.Coords.{fateLteRefl,bondLteRefl,mergeLteRefl}`, `Trope.Fidelity.dLteRefl`, `Trope.Order.{fateLteTrans,bondLteTrans,mergeLteTrans,dLteTrans}`, `Trope.Soundness.gradeLteTrans`. | Fate is a chain (A2) -| `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`; the v0.1 antichain is dissolved in the stated direction only. +| `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`; the v0.1 antichain is dissolved in the stated direction only. That `Fate` is a chain (a total order) is not mechanised: Lean states totality and reflexivity (`FateA.le_total`, `FateA.le_refl`), and transitivity and antisymmetry are proved in no prover. The PWG ledger grades the two directional facts (`A2-directions`) and the chain (`A2-chain`, ungraded) separately (owner ruling 2026-11-16). | Idris2 `Trope.Soundness.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`; Agda `TB.Order.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`. | Veridicality Derivation @@ -181,11 +181,26 @@ leg, so they can neither raise nor lower a grade. | 0 of 2 | re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` -| L4 (monotonicity), in full +| L4 (monotonicity): fate coordinate | `3` | 0 of 2 | re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` +| L4 (monotonicity): fidelity dimension +| `3` +| 0 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` + +| L4 (monotonicity): bond and merge coordinates +| `ungraded` +| 0 of 2 +| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` + +| L4 (monotonicity): grade-level lifting for gradeCompose +| `ungraded` +| 0 of 2 +| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` + | L5 (deception infectiousness) | `3` | 0 of 2 @@ -201,10 +216,15 @@ leg, so they can neither raise nor lower a grade. | 0 of 2 | re-proved · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` -| Fate is a chain (A2) +| A2 directional facts: Dropped below Predicated, not conversely | `3` | 0 of 2 -| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` +| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` + +| Fate is a chain (A2) +| `ungraded` +| 0 of 2 +| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `OPEN` · `BRIDGE-PENDING` | Veridicality Derivation | `3` @@ -293,7 +313,7 @@ leg, so they can neither raise nor lower a grade. |=== // PWG-TABLE:END -*Census* (PROOF-POLICY §8.4 rule 7, never a percentage): of 24 theory obligations in this repository, `PWG-3` 17, `PWG-2i` 0, `PWG-2ii` 0, `PWG-1` 0, `ungraded` 7. No obligation here carries `+foundation-diverse` (§8.3). +*Census* (PROOF-POLICY §8.4 rule 7, never a percentage): of 28 theory obligations in this repository, `PWG-3` 18, `PWG-2i` 0, `PWG-2ii` 0, `PWG-1` 0, `ungraded` 10. No obligation here carries `+foundation-diverse` (§8.3). Read the census as the policy intends: seventeen obligations have a kernel-checked Agda witness with a complete §8.2 receipt at the current commit, and *none* has a diff --git a/verification/pwg.json b/verification/pwg.json index de74ada..f2dea74 100644 --- a/verification/pwg.json +++ b/verification/pwg.json @@ -1 +1 @@ -{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL","TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Coverage differs by prover. Agda covers the fate coordinate and the fidelity dimension; Lean covers fate only (FateA.le is defined on Fate alone). Bond and merge have an Idris2 restatement only, which 8.1 excludes from the ladder. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for gradeCompose that spec section 7's Knaster-Tarski argument invokes is not mechanised in Idris2. Bond, merge and the grade-level lifting have no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL","Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity), in full"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"What is proved is the two directional facts of A2. Totality is stated in Lean (FateA.le_total); transitivity and antisymmetry are not mechanised in any prover, so 'chain' is stronger than the mechanised content.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} +{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction and holds only when all four do.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. The Lean tree carries no fidelity order on the ratified carrier, so there is no Lean leg.","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. Idris2 restatement only, which 8.1 excludes from the ladder; no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Mechanised in no prover, Idris2 included.","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Lean states totality and reflexivity (FateA.le_total, FateA.le_refl); transitivity and antisymmetry are mechanised in no prover, so every leg is OPEN. The directional facts are A2-directions.","reference":{},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} From 62e2d0f852f12800b3b4cfa13e9ca4ed83cf3125 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:20:08 +0000 Subject: [PATCH 11/22] Let the comment stripper nest where the languages nest Lean /- -/, Agda and Idris2 {- -}, and Coq (* *) block comments nest; the stripper closed on the first close token. Measured against the old stripper: a forbidden word inside a nested comment leaked into the dangerous-construct scan (fail-loud), and an unterminated NESTED comment exited 0, a truncated scan reported as complete. A depth counter per open token now follows each language's rule; C-style /* */ stays flat. Canaries 29-30 plant both; both FAIL against the old stripper and PASS with the fix (suite 30/30). Over all 38 tracked source files the new stripper's output is byte-identical to the old (no file nests today), so no gate verdict on the tree changes. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- scripts/test-gate-falsifiability.sh | 30 +++++++++++++++++++++++++++-- tests/lib/strip-proof-comments.awk | 24 +++++++++++++---------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index f152b9e..f0c3581 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -309,6 +309,32 @@ ladder_canaries() { "$(printf '%040d' 0 | tr 0 f)" } +# --- the comment stripper every dangerous-construct gate reads through ------ +# Lean /- -/, Agda/Idris2 {- -} and Coq (* *) block comments NEST. Measured +# 2026-11-16 against the pre-fix stripper: a forbidden word inside a nested +# comment leaked into the scan (fail-loud), and an unterminated NESTED comment +# exited 0 -- a truncated scan reported as complete. Both canaries FAIL against +# the pre-fix stripper. The fixture words are assembled at runtime (see the +# header: a literal would trip the very scanners these canaries guard). +strip_canaries() { + local d strip="$ROOT/tests/lib/strip-proof-comments.awk" w + w="so""rry" + d=$(scratch) + printf '/- outer /- inner -/ %s stays inside -/\ntheorem t : True := trivial\n' "$w" > "$d/nested.lean" + if awk -f "$strip" "$d/nested.lean" 2>/dev/null | grep -qw "$w"; then + bad "a word inside a NESTED Lean comment leaks into the scan" + else + ok "a word inside a NESTED Lean comment is stripped" + fi + printf '{- a {- b -} c\nx : Set\n' > "$d/open.agda" + if awk -f "$strip" "$d/open.agda" >/dev/null 2>&1; then + bad "an unterminated NESTED Agda comment was reported as a complete scan" + else + ok "an unterminated NESTED Agda comment fails the stripper loudly" + fi + rm -rf "$d" +} + # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. # A canary whose jq program is broken writes an empty ledger; the gate then rejects # it for being invalid JSON rather than for the planted drift, and the canary passes @@ -335,12 +361,12 @@ meta_canary() { wellknown_canaries; valid_canary; live_canary c_weak_crypto; c_plaintext_http; c_secret -pwg_canaries; ladder_canaries +pwg_canaries; ladder_canaries; strip_canaries meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=28 +EXPECTED_CASES=30 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 diff --git a/tests/lib/strip-proof-comments.awk b/tests/lib/strip-proof-comments.awk index fef8a42..64f4b62 100644 --- a/tests/lib/strip-proof-comments.awk +++ b/tests/lib/strip-proof-comments.awk @@ -27,17 +27,21 @@ # # Handles: (* *) /- -/ {- -} /* */ plus the line forms -- and // # -# KNOWN LIMITATION, deliberately not fixed here: Lean 4 block comments NEST, and -# this stripper closes on the first `-/`. That direction is fail-LOUD (an honest -# file can be failed for text inside a nested comment), not fail-open, so it is a -# separable change rather than a hole. Tracked separately. -BEGIN { inblk = 0; instr = 0 } +# Block comments NEST where the language says they do: Lean 4 `/- -/`, Agda and +# Idris2 `{- -}`, Coq/Rocq `(* *)`. C-style `/* */` does not nest. Until +# 2026-11-16 this stripper closed on the first close token, so text after an inner +# `-/` was read as code: fail-LOUD (an honest file failed for words inside a +# nested comment), and the remaining outer close token could then open nothing +# while the real remainder of the comment leaked into the scan. A depth counter +# per open token now matches each language's own rule. +BEGIN { inblk = 0; depth = 0; instr = 0 } { line = $0; out = ""; i = 1; n = length(line) while (i <= n) { two = substr(line, i, 2) if (inblk) { - if (two == close_tok) { inblk = 0; i += 2; continue } + if (two == close_tok) { depth--; if (depth == 0) inblk = 0; i += 2; continue } + if (nests && two == open_tok) { depth++; i += 2; continue } i++; continue } if (instr) { @@ -46,10 +50,10 @@ BEGIN { inblk = 0; instr = 0 } if (c == "\"") { instr = 0; i++; continue } i++; continue } - if (two == "(*") { inblk = 1; close_tok = "*)"; i += 2; continue } - if (two == "/-") { inblk = 1; close_tok = "-/"; i += 2; continue } - if (two == "{-") { inblk = 1; close_tok = "-}"; i += 2; continue } - if (two == "/*") { inblk = 1; close_tok = "*/"; i += 2; continue } + if (two == "(*") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "*)"; i += 2; continue } + if (two == "/-") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "-/"; i += 2; continue } + if (two == "{-") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "-}"; i += 2; continue } + if (two == "/*") { inblk = 1; depth = 1; nests = 0; open_tok = two; close_tok = "*/"; i += 2; continue } if (two == "--" || two == "//") { break } c = substr(line, i, 1) if (c == "'" && substr(line, i - 1, 1) !~ /[A-Za-z0-9_'?!]/) { From e13534f18e6624d459d8ca5f7d0a6d8e82c20bc6 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:20:42 +0000 Subject: [PATCH 12/22] State psiBond's separation in general, not for one pair MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit psiBond_separates_honest_deceptive states only psiBond severed ≠ psiBond misbound, and the README was narrowed to that in #117. The owner ruled to prove the general form instead: psiBond_separates_all_honest says every bond other than misbound (the only deceptive bond) is separated from it, by cases: intact and withheld cost Q 0 (Q_ne_unknown 0), severed costs total (total_ne_unknown), and misbound is excluded by the hypothesis. A #print axioms receipt line is added so the CI axiom audit covers it. NOT kernel-checked here: no Lean toolchain can be installed in this session (the network policy refuses the Lean release and cache hosts). The CI lean-build job (lake build --wfail, leanchecker, axiom audit) is the check, and the README says so instead of calling it verified. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- README.adoc | 11 ++++++----- .../grade-factorisation/GradeFactorisation.lean | 12 ++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.adoc b/README.adoc index e72eead..f61b3ef 100644 --- a/README.adoc +++ b/README.adoc @@ -76,11 +76,12 @@ rejects them at validation, naming the offending coordinate. The alternative separates honest `Dropped` from deceptive `Falsified`, and reads the four fate slots only; on the bond axis `psiBond` is proved to separate the honest `severed` from the deceptive `misbound` (`psiBond_separates_honest_deceptive`, via -`total ≠ unknown`, in `GradeFactorisation.lean`). That is the *one pair* the file -states; the general "separates every honest bond from every deceptive one" is -believed and is a single `cases` away — `psiBond intact = psiBond withheld = Q 0` -and `Q_ne_unknown` is already in the file — but it is not currently a theorem, -so it is not claimed here. A precondition only; does not address recursion (CO-1). +`total ≠ unknown`, in `GradeFactorisation.lean`), and in general: every honest +bond is separated from `misbound`, the only deceptive one +(`psiBond_separates_all_honest`, by `cases`: `intact` and `withheld` cost `Q 0`, +`severed` costs `total`, and neither equals `unknown`). The general form was added +2026-11-16; its kernel check is the CI `lean-build` job (`lake build --wfail`, +leanchecker and the axiom audit), which is the receipt this claim rests on. A precondition only; does not address recursion (CO-1). | `verification/proofs/agda/theorem-b/` | Theorem B — the deferred calculus metatheory (Agda `--safe --without-K --cubical-compatible`, the PROOF-POLICY §2.1 invocation; zero postulates): intrinsic graded calculus, value-substitution, subject reduction (β/let; `fix` open), Honest Generation. | `verification/proofs/INTEGRATION-REPORT.adoc` | How the three streams reconcile: the unified R-id ↔ Lean ↔ Agda ↔ status table, the convergence (central open problem), and the divergence adjudication. | `docs/CONTRIBUTING-A-FRONTEND.adoc` | How a new front-end targets the IR (the portability contract). diff --git a/verification/proofs/lean4/grade-factorisation/GradeFactorisation.lean b/verification/proofs/lean4/grade-factorisation/GradeFactorisation.lean index b0a736c..2fb409e 100644 --- a/verification/proofs/lean4/grade-factorisation/GradeFactorisation.lean +++ b/verification/proofs/lean4/grade-factorisation/GradeFactorisation.lean @@ -346,6 +346,17 @@ specific to the fate axis. -/ theorem psiBond_separates_honest_deceptive : psiBond Bond.severed ≠ psiBond Bond.misbound := total_ne_unknown +/-- The general form: `psiBond` separates *every* honest bond from the deceptive +`misbound`. `intact` and `withheld` cost `Q 0` (`Q_ne_unknown`), `severed` costs +`total` (`total_ne_unknown`); the `misbound` case is excluded by hypothesis. -/ +theorem psiBond_separates_all_honest (b : Bond) (h : b ≠ Bond.misbound) : + psiBond b ≠ psiBond Bond.misbound := by + cases b with + | intact => exact Q_ne_unknown 0 + | withheld => exact Q_ne_unknown 0 + | severed => exact total_ne_unknown + | misbound => exact absurd rfl h + /-! # Deliverable 5 — the complement: F2 non-commutativity lives entirely in `ker`-direction Because the target is commutative, `π` is blind to **all** non-commutativity, the F2 @@ -427,6 +438,7 @@ open Trope.Factorisation -- D4 localisation: bond-veridicality IS tropically separable #print axioms psiBond_hom #print axioms psiBond_separates_honest_deceptive +#print axioms psiBond_separates_all_honest -- D5: complement / F2 confinement #print axioms pi_blind_to_noncomm #print axioms grade_F2_noncomm From e1a8cee93d7a0b6ed797beca85a329357f7888e6 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:41:32 +0000 Subject: [PATCH 13/22] Let operators cancel the Hypatia scan Review on #119: `if: always()` keeps the scan job running even when an operator cancels the workflow. `!cancelled()` still runs the scan after the fleet job succeeds or fails -- the property the guard exists for -- but honours cancellation. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .github/workflows/hypatia-scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index aa12fa7..e58b89e 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -38,7 +38,7 @@ jobs: # After the fleet job whatever its result: a dead fleet job renders as # orange fleet rows, never as a missing gate. needs: [fleet] - if: ${{ always() }} + if: ${{ !cancelled() }} # Explicit on the calling job (a job-level block replaces, never merges # with, the workflow-level one). The previous pin (cc58c0c…) no longer # exists in standards, so this gate failed at startup with zero jobs — From a79d5146e91691290772b11c9b2b5ed15cfae698 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:43:10 +0000 Subject: [PATCH 14/22] Close a tab-split hole in rule 6; correct the A2-chain and census prose Review on #119: - Rule 6 interpolated raw citations into tab-separated records, so a real name with "\tjunk" appended split into an extra field the resolver ignored and the real prefix resolved. Measured: the planted citation passed the pre-fix gate. Each field is now JSON-escaped (lossless; ordinary and Unicode names unchanged), a record without exactly three fields is reported, and canary 29 plants the case (FAILS against the previous rule 6). Suite 29/29. - A2-chain said transitivity is mechanised in no prover. Idris2's Trope.Order.fateLteTrans proves it, off the ladder (8.1). The note, the ledger reference, PROOF-STATUS, README and CHANGELOG now say so; antisymmetry is still cited nowhere and no grade changes. - The PROOF-STATUS census paragraph still read seventeen / seven. It now matches the derived 18 / 10, with the ten ungraded rows split by cause (Lean-only, A2-chain, Idris2-only incl. L4-bond-merge, L4-lifting mechanised nowhere, incomplete Agda leg). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- CHANGELOG.adoc | 12 ++++++++---- README.adoc | 5 +++-- docs/status/PROOF-STATUS.adoc | 18 +++++++++++------- scripts/pwg-check.sh | 9 ++++++++- scripts/test-gate-falsifiability.sh | 8 +++++++- verification/pwg.json | 2 +- 6 files changed, 38 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 0a59a7a..ecc8ba4 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -22,7 +22,10 @@ only Agda witness and all three veridicality-derivation witnesses were among the on rows published `+PWG-3+`. `+scripts/pwg-names.sh+` inventories the declared names (through the comment stripper) and `+scripts/pwg-check.sh+` rule 6 resolves every Agda and Lean witness against it. The 13 are corrected; no grade moved. -Canaries 25–26 fail against the pre-rule-6 gate. +Canaries 25–26 fail against the pre-rule-6 gate. Review then found that a +citation with a tab and text appended split into an extra field the resolver +ignored, so the real prefix resolved; each field is now JSON-escaped before +resolution, and canary 29 (which fails against the first version) plants it. + _Ladder._ With both recheck legs counting, the derivation's `+PWG-1+` test re-checked conjuncts counting already implied, so `+PWG-2ii+` was unreachable and @@ -31,14 +34,15 @@ re-checked conjuncts counting already implied, so `+PWG-2ii+` was unreachable an the receipts describe; the branch now requires each counted witness's receipt to record the ledger's source commit. Latent — no obligation has two counting legs. Canaries 27–28 read the derived grade; 28 fails against the pre-fix derivation. -The suite stands at *28/28*. +The suite stands at *29/29*. + _L4 and A2, split (owner ruling 2026-11-16)._ "L4 (monotonicity), in full" and "Fate is a chain (A2)" derived `+PWG-3+` from Agda legs whose own notes conceded they covered only part of the statement. L4 is now four obligations — `+L4-fate+` and `+L4-fidelity+` (`+PWG-3+`), `+L4-bond-merge+` and `+L4-lifting+` (ungraded) — and A2 -two: `+A2-directions+` (`+PWG-3+`) and `+A2-chain+` (ungraded; transitivity and -antisymmetry are mechanised in no prover, so its Lean leg is `+OPEN+` too). The +two: `+A2-directions+` (`+PWG-3+`) and `+A2-chain+` (ungraded; Lean states only +totality and reflexivity, transitivity is proved in Idris2 off the ladder, and +antisymmetry is cited nowhere, so its Lean leg is `+OPEN+` too). The census moves from 24 theory obligations (`+PWG-3+` 17, ungraded 7) to 28 (`+PWG-3+` 18, ungraded 10). The denominator changed because the obligations did; no evidence changed. diff --git a/README.adoc b/README.adoc index e72eead..12493c2 100644 --- a/README.adoc +++ b/README.adoc @@ -174,8 +174,9 @@ restatement only. Idris2 establishes coordinate-level monotonicity only; the lifting for `gradeCompose` is mechanised in no prover. The ledger therefore grades L4 as four obligations (`L4-fate` and `L4-fidelity` at `PWG-3`; `L4-bond-merge` and `L4-lifting` ungraded), and A2 as two (`A2-directions` at -`PWG-3`; `A2-chain` ungraded, because transitivity and antisymmetry are -mechanised in no prover). The atom +`PWG-3`; `A2-chain` ungraded, because no ladder prover states the whole chain: +Lean has totality and reflexivity, Idris2 transitivity off the ladder, and +antisymmetry is cited nowhere). The atom factorisation (O1's carrier half, proved on the ratified `GradeR` in `EffectAtomsRatified.lean`; O1-coord stays open) and the tropical factorisations — pre-ratification `GradeFactorisation.lean` veridicality-blind, ratified diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index e387fd0..8c3a8b9 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -52,7 +52,7 @@ toc::[] | Idris2 `Trope.Laws.decGradeLte`, `Trope.Coords.{fateLteRefl,bondLteRefl,mergeLteRefl}`, `Trope.Fidelity.dLteRefl`, `Trope.Order.{fateLteTrans,bondLteTrans,mergeLteTrans,dLteTrans}`, `Trope.Soundness.gradeLteTrans`. | Fate is a chain (A2) -| `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`; the v0.1 antichain is dissolved in the stated direction only. That `Fate` is a chain (a total order) is not mechanised: Lean states totality and reflexivity (`FateA.le_total`, `FateA.le_refl`), and transitivity and antisymmetry are proved in no prover. The PWG ledger grades the two directional facts (`A2-directions`) and the chain (`A2-chain`, ungraded) separately (owner ruling 2026-11-16). +| `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`; the v0.1 antichain is dissolved in the stated direction only. That `Fate` is a chain (a total order) is not mechanised as one claim: Lean states totality and reflexivity (`FateA.le_total`, `FateA.le_refl`), Idris2 proves transitivity (`Trope.Order.fateLteTrans`, an engineering restatement §8.1 keeps off the ladder), and antisymmetry has no cited proof in any prover. The PWG ledger grades the two directional facts (`A2-directions`) and the chain (`A2-chain`, ungraded) separately (owner ruling 2026-11-16). | Idris2 `Trope.Soundness.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`; Agda `TB.Order.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`. | Veridicality Derivation @@ -315,20 +315,24 @@ leg, so they can neither raise nor lower a grade. *Census* (PROOF-POLICY §8.4 rule 7, never a percentage): of 28 theory obligations in this repository, `PWG-3` 18, `PWG-2i` 0, `PWG-2ii` 0, `PWG-1` 0, `ungraded` 10. No obligation here carries `+foundation-diverse` (§8.3). -Read the census as the policy intends: seventeen obligations have a kernel-checked +Read the census as the policy intends: eighteen obligations have a kernel-checked Agda witness with a complete §8.2 receipt at the current commit, and *none* has a counting recheck leg. `PWG-3` is not a discharge (§8.4 rule 1) — every one of the -seventeen still owes both its §2 legs. The seven `ungraded` rows split three ways, +eighteen still owes both its §2 legs. The ten `ungraded` rows split five ways, and the distinction is the useful part. *Two* are Lean-only with no Agda source at -all: the O1 atom factorisation and the tropical (B′) sighting. *Three* are -Idris2-only, where an engineering restatement is not a leg (§8.1). *Two* have a +all: the O1 atom factorisation and the tropical (B′) sighting. *One*, `A2-chain`, +has no Agda source and only a partial Lean statement (totality and reflexivity; +Idris2 adds transitivity off the ladder; antisymmetry is cited nowhere). *Four* are +Idris2-only, where an engineering restatement is not a leg (§8.1): HC-4 coherence, +exact grade soundness, T-Sub soundness and `L4-bond-merge`. *One*, `L4-lifting`, is +mechanised in no prover at all. *Two* have a real but incomplete Agda leg, so the Agda token is `OPEN`: the retention order proves reflexivity but neither transitivity nor decidability, and tier-2 membership proves six of the non-cancellativity witnesses (`TB.Tier`, fate and bond) plus the positive `Q-cancelʳ`, but not the exhaustive characterisation — there is no Agda counterpart of `grade_leftCancel_iff`, and no Agda witness on the merge coordinate. -§8.1 makes all three causes `ungraded` alike; only the second is about engineering -provers. A missing Agda source and a partial one are different debts, and the +§8.1 makes all five causes `ungraded` alike; only the Idris2-only group is about +engineering provers. A missing Agda source and a partial one are different debts, and the ledger records which one each row carries rather than flattening both to "Lean-only". diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index 0c13ede..51cab5d 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -162,12 +162,19 @@ else .theorems[] as $t | ($t.legs | to_entries[]) | select(.key == "agda" or .key == "lean") | .key as $l | (.value.declarations // [])[] - | "\($l)\t\($t.id)\t\(.)"' "$LEDGER" \ + # Lossless: each field is JSON-escaped (quotes dropped), so a tab or + # newline inside a citation stays INSIDE its field as a visible \t / \n + # and the name then matches nothing. Interpolating raw let a citation + # with "\tjunk" appended split into an extra field the resolver ignored, + # and the original name resolved. Ordinary names, Unicode included, + # come through @json unchanged. + | [$l, $t.id, .] | map(@json | .[1:-1]) | join("\t")' "$LEDGER" \ | INV="$inventory" awk -F'\t' ' BEGIN { n = split(ENVIRON["INV"], rows, "\n") for (i = 1; i <= n; i++) { split(rows[i], f, "\t"); have[f[1] "\t" f[2]] = 1; if (f[1] == "lean") lean[++ln] = f[2] } } + NF != 3 { print "malformed citation record: " $0; next } { ok = (($1 "\t" $3) in have) if (!ok && $1 == "lean") diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index f152b9e..3218ad4 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -276,6 +276,12 @@ pwg_canaries() { pwg_case reject "a Lean witness in the wrong namespace does not resolve" \ '(.theorems[] | select(.id == "L1") | .legs.lean.declarations) = ["Trope.Bond.comp_assoc"]' \ "resolve to no declaration" + # A real name with a tab and text appended. The first rule-6 version split + # the citation on the tab and resolved the real prefix, ignoring the rest; + # this canary FAILS against it. Review on #119. + pwg_case reject "a witness with a tab-joined suffix does not resolve" \ + '(.theorems[] | select(.id == "L1") | .legs.agda.declarations) |= map(. + "\tjunk")' \ + "resolve to no declaration" } # --- the top of the ladder: PWG-2ii and PWG-1 are different rungs ---------- @@ -340,7 +346,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=28 +EXPECTED_CASES=29 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 diff --git a/verification/pwg.json b/verification/pwg.json index f2dea74..96ced48 100644 --- a/verification/pwg.json +++ b/verification/pwg.json @@ -1 +1 @@ -{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction and holds only when all four do.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. The Lean tree carries no fidelity order on the ratified carrier, so there is no Lean leg.","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. Idris2 restatement only, which 8.1 excludes from the ladder; no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Mechanised in no prover, Idris2 included.","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Lean states totality and reflexivity (FateA.le_total, FateA.le_refl); transitivity and antisymmetry are mechanised in no prover, so every leg is OPEN. The directional facts are A2-directions.","reference":{},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} +{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction and holds only when all four do.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. The Lean tree carries no fidelity order on the ratified carrier, so there is no Lean leg.","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. Idris2 restatement only, which 8.1 excludes from the ladder; no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Mechanised in no prover, Idris2 included.","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Lean states totality and reflexivity (FateA.le_total, FateA.le_refl); Idris2 proves transitivity (Trope.Order.fateLteTrans), which PROOF-POLICY 8.1 keeps off the ladder; antisymmetry has no cited proof in any prover. No ladder leg states the whole claim, so every leg is OPEN. The directional facts are A2-directions.","reference":{"idris2":{"declarations":["Trope.Order.fateLteTrans"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} From 7b71c310e4f93a499268cc442e9eab764e7343b6 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:43:38 +0000 Subject: [PATCH 15/22] Record the stripper and psiBond changes in the CHANGELOG The two commits on this branch had no CHANGELOG entry, and after the merge from #119 the suite count would have read 29/29 against a 31-case suite. One entry now records both changes and the 31/31 count, and the earlier entry's count is marked as of its own point. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- CHANGELOG.adoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index ecc8ba4..af0500c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,19 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* *The comment stripper nests where the languages nest, and `+psiBond+` separation +is stated in general (2026-11-16).* Lean `+/- -/+`, Agda and Idris2 `+{- -}+` and Coq +`+(* *)+` block comments nest; `+tests/lib/strip-proof-comments.awk+` closed on the +first close token, so a forbidden word inside a nested comment leaked into the +dangerous-construct scan, and an unterminated nested comment exited `+0+` (a +truncated scan reported as complete). A depth counter per open token fixes both; +C-style `+/* */+` stays flat, and over all 38 tracked sources the output is +unchanged. Canaries 30–31 plant both cases and fail against the old stripper; the +suite stands at *31/31*. Separately, `+psiBond_separates_all_honest+` +(`+GradeFactorisation.lean+`) states that every bond other than `+misbound+` is +separated from it, by `+cases+` over `+Q_ne_unknown+` and `+total_ne_unknown+`, with a +`+#print axioms+` line; its kernel check is the CI `+lean-build+` job. + * *Every PWG witness name now resolves, the ladder's top two rungs are distinct, and L4 and A2 are graded by their parts (2026-11-16).* + @@ -34,7 +47,7 @@ re-checked conjuncts counting already implied, so `+PWG-2ii+` was unreachable an the receipts describe; the branch now requires each counted witness's receipt to record the ledger's source commit. Latent — no obligation has two counting legs. Canaries 27–28 read the derived grade; 28 fails against the pre-fix derivation. -The suite stands at *29/29*. +The suite stood at *29/29* at that point (*31/31* after the entry above). + _L4 and A2, split (owner ruling 2026-11-16)._ "L4 (monotonicity), in full" and "Fate is a chain (A2)" derived `+PWG-3+` from Agda legs whose own notes conceded they From c5c51470478e19810ceacb48f0e63362b36f8a32 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:51:31 +0000 Subject: [PATCH 16/22] Prove L4 in full and A2 (Fate is a chain); recheck both in Rocq and core Lean (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The owner ruled on 2026-11-17 to **prove, not narrow**: L4 and A2 must be proved as their titles state them. This PR is **stacked on #119**, which splits L4 into four parts and A2 into two (ruling of 2026-11-16). It proves the parts #119 leaves ungraded (`L4-bond-merge`, `L4-lifting`, `A2-chain`), plus `retention-order`. It adds the repository's first Rocq leg and a Mathlib-free Lean leg for all seven rows. #119's branch is not edited. **Derived result** (`pwg-derive.sh`, never hand-written): all seven rows reach **PWG-2ii**. They do not reach PWG-1, because the receipts are from run 44006871652 on `d5234b1`, not from the ledger's source commit. **Census of 28 theory obligations:** `PWG-3` 15, `PWG-2i` 0, `PWG-2ii` 7, `PWG-1` 0, `ungraded` 6. The previous census, of the same 28, was `PWG-3` 18, ungraded 10. ### ⚠️ One owner decision this PR does not take PROOF-STATUS records an owner ruling from 2026-11-09: *"Lean is a generator, not a leg … no Lean row here is or will be a §2 recheck leg."* That ruling gives the Mathlib dependency as its reason. The Lean leg added here imports nothing, and today's instruction says theory is "rechecked in Rocq and Lean". The leg is therefore recorded `RECONCILED` and counts, and the conflict is written into PROOF-STATUS (*Recheck legs of the order laws and L4*). If the owner means the 2026-11-09 ruling to cover this leg too, flip its seven Lean `state` fields to `BRIDGE-PENDING`. The seven rows then derive **PWG-2i**. It is a one-field change per row. ## Changes - **Agda** (normative, `--safe --without-K --cubical-compatible`): - `TB/OrderLaws.agda`: `fateLte-{trans,antisym,total}`, packaged as `fate-isTotalOrder : IsTotalOrder _≡_ _≤F_` (A2-chain); `dLte-isTotalOrder`; and `⊑-trans`, `⊑-dec`, `⊑-isPreorder` (retention-order). - `TB/Monotone.agda`: `bondL4Mono{R,L}` and `mergeL4Mono{R,L}` (L4-bond-merge); `gradeL4Mono{R,L}` and `▷-mono` (L4-lifting). The left forms follow from the right forms by commutativity. - `TB/Bridge.agda`: see the bridge bullet below. - **Rocq leg** (`verification/proofs/rocq/RatifiedOrder.v`): Coq 8.18.0, no `Require`. It restates the carrier clause for clause and re-proves everything above. - **Lean leg** (`verification/proofs/lean4/ratified-order/RatifiedOrder.lean`): Lean 4.16.0. Core only, with no import and no `simp`, `omega` or `decide`. - **Definition bridge**: - Each leg proves six numeral-list tables by computation. They give the values of `fateLte`, `▷f`, `bondLte`, `▷b`, `mergeLte` and `▷m`, and the literals are the same in all three provers. - Bond and Merge are covered exhaustively. Fate is covered on 9 points (81 pairs). - **Measured:** changing `withheld ▷b intact` to `intact` leaves every theorem provable in both legs. Only `bridge_bcomp` catches it. - **Gate** (`scripts/check-recheck-legs.sh rocq|lean|controls`): - Asserts the pinned prover version. - Runs an axiom audit over every declaration. It fails on any axiom and on an empty audit domain. - Runs six planted controls, and each must be caught. CI runs them in a new `recheck-legs` job. - **Ledger and docs** (commit `131a33c`): - Three new receipts. - Agda legs become `PROVEN` for the four previously ungraded rows. - Rocq and Lean legs become `RECONCILED` on all seven rows. - PROOF-STATUS gets the derived table and census, the L4, A2 and retention rows, new census prose, and a full §2.2 correspondence record. README and CHANGELOG follow. ## RSR Quality Checklist ### Required - [x] Tests pass: `pwg-check.sh` PASS (table and census match), `test-gate-falsifiability.sh` 29/29, `tests/aspect_tests.sh` PASS=3 - [x] Code is formatted; ledger JCS-canonical (`jq -cS . | cmp`) - [x] Linter is clean: ShellCheck 0.11.0, SHA-256 matching `quality.yml`'s pin, at `--severity=style` over all tracked `*.sh` - [x] No banned language patterns (bash only) - [x] No `unsafe` blocks without `// SAFETY:` comments - [x] No banned functions (no `Admitted`, `sorry` or `postulate`) - [x] SPDX license headers present on all new files - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] Documentation updated: PROOF-STATUS, README - [x] `CHANGELOG` updated ## Testing **Kernel runs.** CI run [44006871652](https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652) on `d5234b1`, with the same results reproduced locally: | Check | Tool / version | Command | Exit | Observed | |---|---|---|---|---| | Agda | Agda 2.7.0.1, agda-stdlib v2.0 | `agda --safe --without-K --cubical-compatible All.agda ; … Smoke.agda` | 0 | `PASS: All.agda + Smoke.agda typecheck` | | Agda cone | mathesis `scan-postulates.sh` | over the 12 first-party modules of the 145-module cone | 0 | `12 files, 0 postulate(s)` | | Rocq | coqc 8.18.0 | `bash scripts/check-recheck-legs.sh rocq` | 0 | `closed under the global context for 49 of 49`, file sha256 `89085ae4…` | | Lean | Lean 4.16.0 (`128a1e6b0a82`) | `bash scripts/check-recheck-legs.sh lean` | 0 | `axioms: none for 49 of 49 declared theorem(s)`, file sha256 `74c33f13…` | | Controls | both | `bash scripts/check-recheck-legs.sh controls` | 0 | 6 of 6 caught, each for its stated reason | | Agda negative controls (local) | Agda 2.7.0.1 | an antitone bond lemma; antisymmetry concluding `x ≡ present` | 42 / 42 | rejected | **Not established:** - Completeness of the chain is not proved in any prover. Spec §7 uses it ("each coordinate is a complete chain"), but the A2 title does not claim it. - The `L4Monotonicity.lean` docstring that says "complete chain" (audit finding 12) is untouched. - The other 15 `PWG-3` rows still owe both recheck legs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3 --------- Co-authored-by: Claude --- .github/workflows/proofs.yml | 46 ++ CHANGELOG.adoc | 31 + README.adoc | 19 +- docs/status/PROOF-STATUS.adoc | 160 +++-- scripts/check-recheck-legs.sh | 178 ++++++ verification/proofs/agda/theorem-b/All.agda | 3 + verification/proofs/agda/theorem-b/Smoke.agda | 12 + .../proofs/agda/theorem-b/TB/Bridge.agda | 126 ++++ .../proofs/agda/theorem-b/TB/Monotone.agda | 109 ++++ .../proofs/agda/theorem-b/TB/OrderLaws.agda | 346 ++++++++++ .../lean4/ratified-order/RatifiedOrder.lean | 567 +++++++++++++++++ .../lean4/ratified-order/lean-toolchain | 1 + verification/proofs/rocq/RatifiedOrder.v | 592 ++++++++++++++++++ verification/pwg.json | 2 +- 14 files changed, 2127 insertions(+), 65 deletions(-) create mode 100755 scripts/check-recheck-legs.sh create mode 100644 verification/proofs/agda/theorem-b/TB/Bridge.agda create mode 100644 verification/proofs/agda/theorem-b/TB/Monotone.agda create mode 100644 verification/proofs/agda/theorem-b/TB/OrderLaws.agda create mode 100644 verification/proofs/lean4/ratified-order/RatifiedOrder.lean create mode 100644 verification/proofs/lean4/ratified-order/lean-toolchain create mode 100644 verification/proofs/rocq/RatifiedOrder.v diff --git a/.github/workflows/proofs.yml b/.github/workflows/proofs.yml index b47f846..fe9cff4 100644 --- a/.github/workflows/proofs.yml +++ b/.github/workflows/proofs.yml @@ -27,6 +27,8 @@ on: paths: - 'verification/proofs/lean4/**' - 'verification/proofs/agda/**' + - 'verification/proofs/rocq/**' + - 'scripts/check-recheck-legs.sh' - 'verification/pwg.json' - 'scripts/pwg-derive.sh' - 'scripts/pwg-check.sh' @@ -207,6 +209,50 @@ jobs: fi echo "PASS: All.agda + Smoke.agda typecheck (${AGDA_FLAGS[*]}; --safe => postulate-free by construction)" + # PROOF-POLICY §2 recheck legs for the ratified-carrier order laws and L4 in + # full (TB.OrderLaws, TB.Monotone): a Rocq leg and a core-only Lean leg. No + # Mathlib, so unlike the lean-build packages below these legs can count + # (PROOF-POLICY §2: "No Mathlib, in Lean or elsewhere"). The gate is + # scripts/check-recheck-legs.sh, which runs the same way locally: pinned + # prover version asserted, compile, an axiom audit that fails on any axiom + # AND on an empty audit domain, then six planted controls that must each be + # caught (Admitted, sorry, a user axiom, an empty domain, and a definition + # drift that only the TB.Bridge tables can see). + # TOOLCHAIN: Ubuntu 24.04's coq package is Coq 8.18.0 (the version mathesis + # pins; the script refuses any other). Lean 4.16.0 (the repo's pin) is the + # GitHub release archive, checked against the SHA-256 observed 2026-11-17. + recheck-legs: + name: "Recheck legs (Rocq 8.18.0, Lean 4.16.0 core): order laws + L4" + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - name: Install Coq 8.18.0 (apt) and Lean 4.16.0 (pinned, checksummed) + shell: bash + env: + LEAN_URL: https://github.com/leanprover/lean4/releases/download/v4.16.0/lean-4.16.0-linux.tar.zst + LEAN_SHA256: cdd31f1064783fff163be53e285722102f16767e65e6fb7f7cb1c232514e0c3a + run: | + set -euo pipefail + sudo apt-get update -q + sudo apt-get install -y -q --no-install-recommends coq zstd + cd "$RUNNER_TEMP" + curl --fail --proto '=https' --proto-redir '=https' --tlsv1.2 -sSL -o lean.tar.zst "$LEAN_URL" + echo "$LEAN_SHA256 lean.tar.zst" | sha256sum -c - + tar --zstd -xf lean.tar.zst + echo "$PWD/lean-4.16.0-linux/bin" >> "$GITHUB_PATH" + - name: Rocq leg (compile + Print Assumptions on every declaration) + shell: bash + run: bash scripts/check-recheck-legs.sh rocq + - name: Lean leg (check + collectAxioms on every declared theorem) + shell: bash + run: bash scripts/check-recheck-legs.sh lean + - name: Planted controls (each must be caught) + shell: bash + run: bash scripts/check-recheck-legs.sh controls + # The Lean developments actually built. `lean-source-honesty` above is a cheap # syntactic guard that runs in seconds on every push; this is the semantic one, # and it is what makes ADR 0003's "grade-algebra ground truth" a measured claim diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index ecc8ba4..161e9ef 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -8,6 +8,37 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. === [Unreleased] +==== Added + +* *L4 in full and A2 (Fate is a chain) proved, and rechecked in Rocq and +core Lean (2026-11-17).* ++ +The owner ruled to prove, not narrow. `+TB/Monotone.agda+` proves bond and merge +monotonicity and the lifting to the grade composition (one argument at a time, and +both at once as `+▷-mono+`). `+TB/OrderLaws.agda+` proves that `+fateLte+` is +transitive, antisymmetric and total (`+fate-isTotalOrder : IsTotalOrder _≡_ _≤F_+`), +and that `+⊑+` is a decidable preorder. No existing definition changed. ++ +The repository's first Rocq development, `+verification/proofs/rocq/RatifiedOrder.v+` +(Coq 8.18.0, no `+Require+`), and a core-Lean file with no import, +`+verification/proofs/lean4/ratified-order/RatifiedOrder.lean+` (Lean 4.16.0, no +Mathlib), re-prove all of it. `+TB/Bridge.agda+` pins six restated definitions to +the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the +same six literals. A planted one-clause drift that keeps every theorem true is +caught only by the bridge, in both legs. `+scripts/check-recheck-legs.sh+` is the +gate. It asserts the prover version, audits every declaration for axioms, fails +on an empty audit, and runs six planted controls. CI runs it as the new +`+recheck-legs+` job. ++ +Ledger: `+L4-bond-merge+`, `+L4-lifting+`, `+A2-chain+` and `+retention-order+` gain +`+PROVEN+` Agda legs. All seven L4/A2/retention rows gain `+RECONCILED+` Rocq and +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+`. + ==== Fixed * *Every PWG witness name now resolves, the ladder's top two rungs are diff --git a/README.adoc b/README.adoc index 12493c2..e32b087 100644 --- a/README.adoc +++ b/README.adoc @@ -168,15 +168,16 @@ Idris2 does not state L3, L6, conicality or the cancellation boundary; L5 is Agda-only. Where Idris2 does restate a result, PROOF-POLICY §8.1 keeps it off the Proof Witness Grade ladder as an engineering restatement — the ledger records it under `reference`, never as a leg, so it can neither raise nor lower a grade. -And *L4 in full* is proved by none of the three: Agda covers the fate coordinate -and the fidelity dimension, Lean covers fate, and bond and merge have an Idris2 -restatement only. Idris2 establishes coordinate-level monotonicity only; the -lifting for `gradeCompose` is mechanised in no prover. The ledger therefore -grades L4 as four obligations (`L4-fate` and `L4-fidelity` at `PWG-3`; -`L4-bond-merge` and `L4-lifting` ungraded), and A2 as two (`A2-directions` at -`PWG-3`; `A2-chain` ungraded, because no ladder prover states the whole chain: -Lean has totality and reflexivity, Idris2 transitivity off the ladder, and -antisymmetry is cited nowhere). The atom +*L4 in full* and *A2* (Fate is a chain) are proved in Agda since 2026-11-17. +`TB.Monotone` adds the bond and merge coordinates and the lifting to +`gradeCompose`, and `TB.OrderLaws` adds transitivity, antisymmetry and totality. +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 +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 — pre-ratification `GradeFactorisation.lean` veridicality-blind, ratified diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index 8c3a8b9..65cd427 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -36,8 +36,8 @@ toc::[] | Agda `TB.Grade.{falsified-absorbL,falsified-absorbR,misbound-absorbL,conflated-absorbL,unknown-absorbL,total-absorb-Q}`, `TB.Tier.deceptive-absorbs-▷`; Lean `FateA.falsified_two_sided_zero`, `GradeR.gBotR_two_sided_zero`. | L4 (monotonicity), in full -| stem:[\triangleright] is monotone in both arguments w.r.t. stem:[\sqsubseteq] on every coordinate of the ratified carrier. Coverage differs by prover: the Agda covers the fate coordinate (`fateL4Mono{R,L}`) and the fidelity dimension (`dplusMono{R,L}`) only; the bond and merge coordinates have an Idris2 restatement only. Idris2 establishes coordinate-level monotonicity only; the grade-level lifting for `gradeCompose` that spec §7's Knaster–Tarski argument invokes is mechanised in no prover. Per PROOF-POLICY §8.1 Idris2 is an engineering prover and is not on the PWG ladder, so bond, merge and the grade-level lifting currently have no gradeable theory leg. The PWG ledger therefore grades L4 as four obligations, `L4-fate`, `L4-fidelity`, `L4-bond-merge` and `L4-lifting` (owner ruling 2026-11-16); L4 in full is their conjunction. -| Idris2 `Trope.Soundness.{fateL4MonoR,fateL4MonoL}`, `Trope.Order.{bondComposeMono,mergeComposeMono}`; Agda `TB.Order.{fateL4MonoR,fateL4MonoL}`; Lean `FateA.{comp_mono_right,comp_mono_left}` (fate coordinate only; `FateA.le` is defined on `Fate` alone and the Lean tree carries no `Bond`, `Merge` or `GradeR` order). +| stem:[\triangleright] is monotone in both arguments w.r.t. stem:[\sqsubseteq] on every coordinate of the ratified carrier, and the grade composition is too. *Proved in full in Agda since 2026-11-17* (owner ruling: prove, not narrow): fate (`TB.Order.fateL4Mono{R,L}`), fidelity (`TB.Order.dplusMono{R,L}`), bond and merge (`TB.Monotone.{bondL4Mono,mergeL4Mono}{R,L}`), and the grade-level lifting for `gradeCompose` that spec §7 invokes (`TB.Monotone.gradeL4Mono{R,L}`, and `TB.Monotone.▷-mono` for both arguments at once). Each part is rechecked in Rocq and in core Lean (see *Recheck legs of the order laws and L4* below). The PWG ledger grades L4 as four obligations, `L4-fate`, `L4-fidelity`, `L4-bond-merge` and `L4-lifting` (owner ruling 2026-11-16); L4 in full is their conjunction. Spec §7 also uses that each coordinate is a *complete* chain; completeness is not part of L4 or A2 and is proved in no prover. +| Agda `TB.Order.{fateL4MonoR,fateL4MonoL,dplusMonoR,dplusMonoL}`, `TB.Monotone.{bondL4MonoR,bondL4MonoL,mergeL4MonoR,mergeL4MonoL,gradeL4MonoR,gradeL4MonoL,▷-mono}`; Rocq (`verification/proofs/rocq/RatifiedOrder.v`) and core Lean (`TropeRatified.*`, `verification/proofs/lean4/ratified-order/`) the same names (`▷-mono` is `gcomp_mono`); Idris2 `Trope.Soundness.{fateL4MonoR,fateL4MonoL}`, `Trope.Order.{bondComposeMono,mergeComposeMono}` (reference, §8.1); Mathlib Lean `FateA.{comp_mono_right,comp_mono_left}` (fate only, `BRIDGE-PENDING`). | L5 (deception infectiousness) | Once a coordinate is at its deceptive bottom no composition restores an honest value; applying any further effect to a deceptive term keeps it deceptive. A corollary of L3. @@ -48,12 +48,12 @@ toc::[] | Lean `GradeR.instCommMonoid`, `FateA.comp_comm`; Agda `TB.Grade.grade-comm`. | Retention order is a decidable preorder -| stem:[\sqsubseteq] is decidable, reflexive and transitive on grades. -| Idris2 `Trope.Laws.decGradeLte`, `Trope.Coords.{fateLteRefl,bondLteRefl,mergeLteRefl}`, `Trope.Fidelity.dLteRefl`, `Trope.Order.{fateLteTrans,bondLteTrans,mergeLteTrans,dLteTrans}`, `Trope.Soundness.gradeLteTrans`. +| stem:[\sqsubseteq] is decidable, reflexive and transitive on grades. Proved in Agda since 2026-11-17, and rechecked in Rocq and core Lean. +| Agda `TB.Order.⊑-refl`, `TB.OrderLaws.{⊑-trans,⊑-dec,⊑-isPreorder}`; Rocq and core Lean `gle_refl`, `gle_trans`, `gle_dec`; Idris2 (reference) `Trope.Laws.decGradeLte`, `Trope.Coords.{fateLteRefl,bondLteRefl,mergeLteRefl}`, `Trope.Fidelity.dLteRefl`, `Trope.Order.{fateLteTrans,bondLteTrans,mergeLteTrans,dLteTrans}`, `Trope.Soundness.gradeLteTrans`. | Fate is a chain (A2) -| `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`; the v0.1 antichain is dissolved in the stated direction only. That `Fate` is a chain (a total order) is not mechanised as one claim: Lean states totality and reflexivity (`FateA.le_total`, `FateA.le_refl`), Idris2 proves transitivity (`Trope.Order.fateLteTrans`, an engineering restatement §8.1 keeps off the ladder), and antisymmetry has no cited proof in any prover. The PWG ledger grades the two directional facts (`A2-directions`) and the chain (`A2-chain`, ungraded) separately (owner ruling 2026-11-16). -| Idris2 `Trope.Soundness.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`; Agda `TB.Order.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`. +| `Fate` is a chain: stem:[\sqsubseteq] on `Fate` is reflexive, transitive, antisymmetric and total, ordered Falsified ⊏ Dropped ⊏ Predicated ⊏ Atten(unknown) ⊏ Atten(total) ⊏ … ⊏ Atten(Q 0) ⊏ Present. In particular `Dropped ⊑ Predicated` and `Predicated ⋢ Dropped`, which dissolve the v0.1 antichain. Proved in Agda since 2026-11-17 as `fate-isTotalOrder : IsTotalOrder _≡_ _≤F_` (owner ruling: prove, not narrow); the fidelity order is a chain as well. The PWG ledger grades the two directional facts (`A2-directions`) and the chain (`A2-chain`) separately (owner ruling 2026-11-16). Completeness of the chain is not claimed here and is proved in no prover. +| Agda `TB.OrderLaws.{fate-isTotalOrder,fateLte-trans,fateLte-antisym,fateLte-total,dLte-isTotalOrder}`, `TB.Order.{fateLte-refl,fateDroppedLtePredicated,fatePredicatedNotLteDropped}`; Rocq and core Lean `fate_isTotalOrder`, `fateLte_{refl,trans,antisym,total}` and the two directional facts; Idris2 (reference) `Trope.Soundness.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`, `Trope.Order.fateLteTrans`; Mathlib Lean `FateA.{le_total,le_refl}` (`BRIDGE-PENDING`). | Veridicality Derivation | Exactly three deceptive duals, one per coordinate kind (`Falsified`, `Misbound`, `Conflated`), each the unique deceptive inhabitant of its coordinate. @@ -182,24 +182,24 @@ leg, so they can neither raise nor lower a grade. | re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` | L4 (monotonicity): fate coordinate -| `3` -| 0 of 2 -| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | L4 (monotonicity): fidelity dimension -| `3` -| 0 of 2 -| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | L4 (monotonicity): bond and merge coordinates -| `ungraded` -| 0 of 2 -| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | L4 (monotonicity): grade-level lifting for gradeCompose -| `ungraded` -| 0 of 2 -| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | L5 (deception infectiousness) | `3` @@ -212,19 +212,19 @@ leg, so they can neither raise nor lower a grade. | re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `PROVEN-WITH-AXIOMS` · `BRIDGE-PENDING` | Retention order is a decidable preorder -| `ungraded` -| 0 of 2 -| re-proved · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | A2 directional facts: Dropped below Predicated, not conversely -| `3` -| 0 of 2 -| re-proved · `PROVEN` · `AGDA-VERIFIED` · unavailable · `OPEN` · `NOT-INVENTORIED` · unavailable · `OPEN` · `NOT-INVENTORIED` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | Fate is a chain (A2) -| `ungraded` -| 0 of 2 -| unavailable · `OPEN` · `AGDA-PENDING` · unavailable · `OPEN` · `NOT-INVENTORIED` · re-proved · `OPEN` · `BRIDGE-PENDING` +| `2ii` +| 2 of 2 +| re-proved · `PROVEN` · `AGDA-VERIFIED` · re-proved · `PROVEN` · `RECONCILED` · re-proved · `PROVEN` · `RECONCILED` | Veridicality Derivation | `3` @@ -313,32 +313,79 @@ leg, so they can neither raise nor lower a grade. |=== // PWG-TABLE:END -*Census* (PROOF-POLICY §8.4 rule 7, never a percentage): of 28 theory obligations in this repository, `PWG-3` 18, `PWG-2i` 0, `PWG-2ii` 0, `PWG-1` 0, `ungraded` 10. No obligation here carries `+foundation-diverse` (§8.3). - -Read the census as the policy intends: eighteen obligations have a kernel-checked -Agda witness with a complete §8.2 receipt at the current commit, and *none* has a -counting recheck leg. `PWG-3` is not a discharge (§8.4 rule 1) — every one of the -eighteen still owes both its §2 legs. The ten `ungraded` rows split five ways, -and the distinction is the useful part. *Two* are Lean-only with no Agda source at -all: the O1 atom factorisation and the tropical (B′) sighting. *One*, `A2-chain`, -has no Agda source and only a partial Lean statement (totality and reflexivity; -Idris2 adds transitivity off the ladder; antisymmetry is cited nowhere). *Four* are -Idris2-only, where an engineering restatement is not a leg (§8.1): HC-4 coherence, -exact grade soundness, T-Sub soundness and `L4-bond-merge`. *One*, `L4-lifting`, is -mechanised in no prover at all. *Two* have a -real but incomplete Agda leg, so the Agda token is `OPEN`: the retention order -proves reflexivity but neither transitivity nor decidability, and tier-2 membership -proves six of the non-cancellativity witnesses (`TB.Tier`, fate and bond) plus the -positive `Q-cancelʳ`, but not the exhaustive characterisation — there is no Agda -counterpart of `grade_leftCancel_iff`, and no Agda witness on the merge coordinate. -§8.1 makes all five causes `ungraded` alike; only the Idris2-only group is about -engineering provers. A missing Agda source and a partial one are different debts, and the -ledger records which one each row carries rather than flattening both to -"Lean-only". - -Nothing can reach `PWG-2i`, `PWG-2ii` or `PWG-1` from where this tree stands: no -Rocq development exists in this repository at all, so the ladder has a missing -rung that is independent of any Agda work. +*Census* (PROOF-POLICY §8.4 rule 7, never a percentage): of 28 theory obligations in this repository, `PWG-3` 15, `PWG-2i` 0, `PWG-2ii` 7, `PWG-1` 0, `ungraded` 6. No obligation here carries `+foundation-diverse` (§8.3). + +Read the census as the policy intends. *Seven* obligations are at `PWG-2ii`: +the four parts of L4, both parts of A2, and the retention order. Each has a +kernel-checked Agda witness and two counting recheck legs, a Rocq leg and a +core-Lean leg (`verification/proofs/rocq/RatifiedOrder.v`, +`verification/proofs/lean4/ratified-order/RatifiedOrder.lean`, both +`RECONCILED`; see *Recheck legs of the order laws and L4*). None of them is +`PWG-1`: their receipts are from CI run 44006871652 on `d5234b1`, not from the +ledger's source commit, and the derivation (§8.2, §8.5.2) does not carry a grade +across commits. *Fifteen* obligations are at `PWG-3`: a kernel-checked Agda +witness with a complete §8.2 receipt and no counting recheck leg. `PWG-3` is not a +discharge (§8.4 rule 1); each of the fifteen still owes both its §2 legs. + +The six `ungraded` rows split three ways. *Two* are Lean-only with no Agda source +at all: the O1 atom factorisation and the tropical (B′) sighting. *Three* are +Idris2-only, where an engineering restatement is not a leg (§8.1): HC-4 +coherence, exact grade soundness and T-Sub soundness. *One* has a real but +incomplete Agda leg, so its Agda token is `OPEN`: tier-2 membership proves six of +the non-cancellativity witnesses (`TB.Tier`, fate and bond) plus the positive +`Q-cancelʳ`, but not the exhaustive characterisation. There is no Agda +counterpart of `grade_leftCancel_iff`, and no Agda witness on the merge +coordinate. §8.1 makes all three causes `ungraded` alike; only the Idris2-only +group is about engineering provers. A missing Agda source and a partial one are +different debts, and the ledger records which one each row carries rather than +flattening both to "Lean-only". + +Until 2026-11-17 nothing here could reach `PWG-2i` or above, because no Rocq +development existed. The recheck legs above are the first, and they cover only +the seven rows named. The other fifteen `PWG-3` rows have no Rocq or counting +Lean leg yet. + +[[recheck-legs]] +=== Recheck legs of the order laws and L4 (§2, §2.2) + +*Owner rulings.* On 2026-11-17 the owner ruled that L4 and A2 are proved as +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`. + +[cols="1,3"] +|=== +| Item | Record + +| Source (Agda) +| `TB.Order`, `TB.OrderLaws`, `TB.Monotone` (`verification/proofs/agda/theorem-b/`), and `TB.Bridge` for the definitions. + +| Rocq leg +| `verification/proofs/rocq/RatifiedOrder.v`, route `re-proved`. Coq 8.18.0, no `Require` (prelude only). Gate: `bash scripts/check-recheck-legs.sh rocq`. Receipt `rocq-ratified-order-d5234b1`, CI run 44006871652: `Print Assumptions` closed under the global context for 49 of 49 declarations. + +| Lean leg +| `verification/proofs/lean4/ratified-order/RatifiedOrder.lean`, route `re-proved`. Lean 4.16.0 core: no import, no Mathlib, no `simp`, `omega` or `decide`. Gate: `bash scripts/check-recheck-legs.sh lean`. Receipt `lean-ratified-order-d5234b1`, CI run 44006871652: no axiom for 49 of 49 declared theorems, nor for any definition they use. + +| Why re-proved, not transported +| The Agda→Dedukti→Rocq/Lean transport of §2 is not wired in this repository, and no released Lambdapi Lean exporter exists (PROOF-POLICY §2, item 2). + +| Statement correspondence +a| Compared by reading, item by item, and checked mechanically for the definitions: + +* *Definitions.* Each leg restates `Δ`, `Fate`, `Bond`, `Merge`, `Grade`, `_⊕d_`, `_▷f_`, `_▷b_`, `_▷m_`, `_▷_`, `lteb`, `dLte`, `fateLte`, `bondLte`, `mergeLte` and `gradeLte` with the same constructors and the same clauses. `TB.Bridge` states the values of `fateLte`, `_▷f_`, `bondLte`, `_▷b_`, `mergeLte` and `_▷m_` on a fixed sample, as six numeral lists. Each leg proves the *same six literals* about its own restatement by computation (`bridge_*`). Bond (16 pairs) and Merge (9 pairs) are covered exhaustively; Fate is covered on 9 points (81 pairs), including Δ addition. A planted one-clause drift (`withheld ▷b intact` set to `intact`) leaves every theorem provable and is caught only by `bridge_bcomp`, in both legs. That is a CI control. +* *Theorems.* Each leg states every theorem above with the same hypotheses and conclusion as the Agda. `⊑` is `gle g h := gradeLte g h = true` (Agda: `gradeLte g h ≡ true`). `IsTotalOrder _≡_ _≤F_` is stated as its four laws (`fate_isTotalOrder`). `⊑-dec : Dec (g ⊑ h)` is `gle_dec` (Rocq `{gle g h} + {~ gle g h}`, Lean `Decidable (gle g h)`), and in Lean also the theorem `gle_decides`. +* *Encoding only.* Agda `ℕ`/`Bool`/`_∧_`/`_≡_`/`_⊎_` are `nat`/`bool`/`andb`/`eq`/`or` (Rocq) and `Nat`/`Bool`/`&&`/`=`/`Or` (Lean). Conjunctions are parenthesised right-nested, because Agda's `_∧_` is right-associative while Rocq's `&&` and Lean's `&&` are left-associative. Infix operators become named functions, and hyphens become underscores. + +| Residual assumptions +| None in any leg: the Agda is `--safe` with no postulate in its cone (receipt `agda-d5234b1`), and each recheck leg reports no axiom. + +| Planted controls (CI) +| `bash scripts/check-recheck-legs.sh controls`: a Rocq `Admitted`, a Lean `sorry`, a Lean user axiom, an empty Lean audit domain, and the definition drift in each leg. Each must be caught, and in run 44006871652 all 6 were. +|=== === Import cone (§1.1) @@ -376,8 +423,11 @@ Owner ruling 2026-11-09: **Lean is a generator, not a leg.** The Lean developmen keeps Mathlib and keeps its purpose — finding and stress-testing theorems — and its results are then restated in core Agda, which is what becomes gradeable. The 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 as -`route: re-proved, state: BRIDGE-PENDING`, which does not count (§2.2, §8.2). The +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 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 diff --git a/scripts/check-recheck-legs.sh b/scripts/check-recheck-legs.sh new file mode 100755 index 0000000..bf1f14e --- /dev/null +++ b/scripts/check-recheck-legs.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +# +# check-recheck-legs.sh rocq|lean|controls +# +# The gate for the PROOF-POLICY §2 recheck legs of the ratified-carrier order +# laws and L4 (verification/proofs/rocq/RatifiedOrder.v and +# verification/proofs/lean4/ratified-order/RatifiedOrder.lean). The same +# script runs locally and in CI (.github/workflows/proofs.yml), so a green +# local run and a green CI run mean the same thing. +# +# rocq coqc must be the pinned version; the file must compile; and +# `Print Assumptions` must report "Closed under the global +# context" for EVERY Theorem and Lemma the file declares. +# lean lean must be the pinned version; the file must check with no +# error and no warning (a `sorry` only warns); and EVERY theorem +# the source declares must depend on no axiom at all +# (Lean.collectAxioms, the function behind #print axioms). +# controls plants a defect in a scratch copy of each leg and requires the +# gate above to FAIL on it: an Admitted proof, a sorry, a user +# axiom, and a one-clause drift in a restated definition (caught +# by the bridge theorems). A gate that has never been seen to +# fail is not a gate. +# +# Fails closed: a missing or wrong-version prover is a FAIL, never a skip, and +# an axiom audit that inspects zero declarations is a FAIL, not a vacuous pass +# (the defect found in hyperpolymath/mathesis THY-1's Lean leg, 2026-11-16). +# +# Exit: 0 = pass; 1 = fail; 2 = misuse. + +set -euo pipefail + +MODE="${1:-}" +cd "$(dirname "${BASH_SOURCE[0]}")/.." +ROCQ_FILE="verification/proofs/rocq/RatifiedOrder.v" +LEAN_FILE="verification/proofs/lean4/ratified-order/RatifiedOrder.lean" +ROCQ_VERSION="${ROCQ_VERSION:-8.18.0}" +LEAN_VERSION="${LEAN_VERSION:-4.16.0}" + +fail() { echo "FAIL: $*" >&2; exit 1; } + +need_rocq() { + command -v coqc >/dev/null 2>&1 || fail "coqc not on PATH (a missing prover fails this gate; it never skips)" + coqc --version | grep -qF "version ${ROCQ_VERSION}" || + fail "coqc is not version ${ROCQ_VERSION}: $(coqc --version | head -1)" +} + +need_lean() { + command -v lean >/dev/null 2>&1 || fail "lean not on PATH (a missing prover fails this gate; it never skips)" + lean --version | grep -qF "version ${LEAN_VERSION}" || + fail "lean is not version ${LEAN_VERSION}: $(lean --version | head -1)" +} + +# rocq_audit FILE -> prints the receipt line; returns 1 on any defect. +rocq_audit() { + local src="$1" dir base names expect got out rc + dir="$(mktemp -d)"; base="AuditRatifiedOrder" + names="$(sed -n -E "s/^[[:space:]]*(Theorem|Lemma)[[:space:]]+([A-Za-z_][A-Za-z0-9_']*).*/\2/p" "$src")" + expect="$(grep -c . <<<"$names" || true)" + if [ "$expect" -eq 0 ]; then echo "rocq audit: no Theorem or Lemma declared (empty domain)"; rm -rf "$dir"; return 1; fi + { cat "$src"; echo; while IFS= read -r n; do echo "Print Assumptions $n."; done <<<"$names"; } >"$dir/$base.v" + set +e; out="$(cd "$dir" && coqc "$base.v" 2>&1)"; rc=$?; set -e + rm -rf "$dir" + got="$(grep -c '^Closed under the global context' <<<"$out" || true)" + if [ "$rc" -ne 0 ] || [ "$got" -ne "$expect" ]; then + echo "rocq audit: $got of $expect declaration(s) closed under the global context (coqc exit $rc)" + grep -v '^Closed under the global context' <<<"$out" | head -20 + return 1 + fi + echo "Print Assumptions: closed under the global context for $expect of $expect declaration(s)" +} + +# lean_check FILE -> prints the receipt line; returns 1 on any defect. +lean_check() { + local src="$1" dir out rc declared audited + set +e; out="$(lean "$src" 2>&1)"; rc=$?; set -e + if [ "$rc" -ne 0 ] || grep -qE '(^|: )(error|warning)' <<<"$out"; then + echo "lean: the file does not check cleanly (exit $rc)"; grep -E 'error|warning' <<<"$out" | head -20; return 1 + fi + dir="$(mktemp -d)" + { echo "import Lean"; cat "$src"; cat <<'LEAN' + +open Lean Elab Command in +#eval show CommandElabM Unit from do + let env ← getEnv + let mut n := 0 + for (name, ci) in env.constants.map₂.toList do + -- Only what the source declares: theorems, and defs that carry a + -- declaration range (the lemmas Lean generates have none). + let isThm := match ci with | .thmInfo _ => true | _ => false + let isDef := match ci with | .defnInfo _ => true | _ => false + unless isThm || isDef do continue + if (← liftCoreM (findDeclarationRanges? name)).isNone then continue + if isThm then n := n + 1 + let axs ← liftCoreM (Lean.collectAxioms name) + unless axs.isEmpty do + logInfo m!"GATE-AXIOMS {name}: {axs.toList}" + logInfo m!"GATE-AUDIT-DONE {n}" +LEAN + } >"$dir/Audit.lean" + set +e; out="$(lean "$dir/Audit.lean" 2>&1)"; rc=$?; set -e + rm -rf "$dir" + declared="$(grep -cE '^[[:space:]]*theorem[[:space:]]' "$src" || true)" + audited="$(sed -n 's/.*GATE-AUDIT-DONE \([0-9]*\).*/\1/p' <<<"$out")" + if [ "$rc" -ne 0 ] || [ -z "$audited" ] || grep -q 'GATE-AXIOMS' <<<"$out"; then + echo "lean audit: a declaration depends on an axiom, or the audit did not run (exit $rc)" + grep -E 'GATE-|error' <<<"$out" | head -20; return 1 + fi + if [ "$audited" -eq 0 ] || [ "$audited" -ne "$declared" ]; then + echo "lean audit: audited $audited theorem(s), the source declares $declared (an empty or partial domain fails)"; return 1 + fi + echo "axioms: none for $audited of $declared declared theorem(s), and none for any def they use" +} + +case "$MODE" in + rocq) + need_rocq + echo "=== Rocq recheck leg: $ROCQ_FILE ($(coqc --version | head -1)) ===" + dir="$(mktemp -d)"; cp "$ROCQ_FILE" "$dir/" + ( cd "$dir" && coqc "$(basename "$ROCQ_FILE")" ) || { rm -rf "$dir"; fail "coqc rejects $ROCQ_FILE"; } + rm -rf "$dir" + rocq_audit "$ROCQ_FILE" || fail "Rocq axiom audit" + echo "sha256 $(sha256sum "$ROCQ_FILE" | cut -d' ' -f1) $ROCQ_FILE" + echo "PASS: Rocq recheck leg" + ;; + lean) + need_lean + echo "=== Lean recheck leg: $LEAN_FILE ($(lean --version | head -1)) ===" + lean_check "$LEAN_FILE" || fail "Lean check or axiom audit" + echo "sha256 $(sha256sum "$LEAN_FILE" | cut -d' ' -f1) $LEAN_FILE" + echo "PASS: Lean recheck leg" + ;; + controls) + need_rocq; need_lean + t="$(mktemp -d)"; trap 'rm -rf "$t"' EXIT + bad=0 + expect_fail() { # $1 label, $2 command... + local label="$1"; shift + if "$@" >"$t/log" 2>&1; then echo "CONTROL NOT CAUGHT: $label"; cat "$t/log"; bad=1 + else echo "caught: $label -- $(grep -m1 -E . "$t/log")"; fi + } + # Rocq: an Admitted proof compiles; the audit must still refuse it. + sed '0,/^Proof\. intros \[\]; reflexivity\. Qed\./s//Proof. Admitted./' "$ROCQ_FILE" >"$t/A.v" + grep -q 'Admitted\.' "$t/A.v" || fail "control setup: no Admitted planted" + expect_fail "Rocq Admitted proof" rocq_audit "$t/A.v" + # Rocq: a one-clause drift in a restated definition. withheld ▷b intact + # = intact keeps every restated theorem TRUE (▷b stays monotone), so only + # the bridge can see it; the failure must be at bridge_bcomp. + sed 's/^ | withheld, intact => withheld$/ | withheld, intact => intact/' "$ROCQ_FILE" >"$t/D.v" + cmp -s "$ROCQ_FILE" "$t/D.v" && fail "control setup: no Rocq drift planted" + bl="$(grep -n '^Theorem bridge_bcomp' "$t/D.v" | cut -d: -f1)" + el="$( (cd "$t" && coqc D.v 2>&1 || true) | sed -n 's/^File .*, line \([0-9]*\),.*/\1/p' | head -1)" + if [ -n "$el" ] && [ "$el" -ge "$bl" ] && [ "$el" -le "$((bl + 1))" ]; then + echo "caught: Rocq definition drift (bcomp), caught by the bridge -- first error at line $el (bridge_bcomp)" + else echo "CONTROL NOT CAUGHT (or not by the bridge): Rocq definition drift, first error line '${el}'"; bad=1; fi + # Lean: a sorry only warns; the gate must refuse it. + { cat "$LEAN_FILE"; printf '\ntheorem planted_sorry : 1 = 2 := sorry\n'; } >"$t/S.lean" + expect_fail "Lean sorry" lean_check "$t/S.lean" + # Lean: a user axiom compiles without warning; the audit must refuse it. + { cat "$LEAN_FILE"; printf '\naxiom planted_ax : False\ntheorem planted_use : 1 = 2 := planted_ax.elim\n'; } >"$t/X.lean" + expect_fail "Lean user axiom" lean_check "$t/X.lean" + # Lean: the same drift; the only error must be at bridge_bcomp. + sed 's/^ | withheld, intact => withheld$/ | withheld, intact => intact/' "$LEAN_FILE" >"$t/D.lean" + cmp -s "$LEAN_FILE" "$t/D.lean" && fail "control setup: no Lean drift planted" + bl="$(grep -n '^theorem bridge_bcomp' "$t/D.lean" | cut -d: -f1)" + errs="$(lean "$t/D.lean" 2>&1 | grep -E ': error' || true)" + if [ -n "$errs" ] && ! grep -vq "D.lean:$bl:" <<<"$errs"; then + echo "caught: Lean definition drift (bcomp), caught by the bridge -- only error at line $bl (bridge_bcomp)" + else echo "CONTROL NOT CAUGHT (or not by the bridge): Lean definition drift"; echo "$errs"; bad=1; fi + # Lean: an audit over an empty domain must fail, not pass vacuously. + printf 'def onlyADef : Nat := 1\n' >"$t/E.lean" + expect_fail "Lean empty audit domain" lean_check "$t/E.lean" + [ "$bad" -eq 0 ] || fail "a planted defect was not caught" + echo "PASS: every planted defect was caught (6 controls)" + ;; + *) echo "usage: $(basename "$0") rocq|lean|controls" >&2; exit 2 ;; +esac diff --git a/verification/proofs/agda/theorem-b/All.agda b/verification/proofs/agda/theorem-b/All.agda index de0e4fa..83510db 100644 --- a/verification/proofs/agda/theorem-b/All.agda +++ b/verification/proofs/agda/theorem-b/All.agda @@ -8,6 +8,9 @@ module All where open import TB.Grade open import TB.Order +open import TB.OrderLaws +open import TB.Monotone +open import TB.Bridge open import TB.Tier open import TB.Syntax open import TB.Substitution diff --git a/verification/proofs/agda/theorem-b/Smoke.agda b/verification/proofs/agda/theorem-b/Smoke.agda index edde93c..0a27476 100644 --- a/verification/proofs/agda/theorem-b/Smoke.agda +++ b/verification/proofs/agda/theorem-b/Smoke.agda @@ -25,6 +25,18 @@ open import TB.Order using ; dplusMonoR ; dplusMonoL -- fidelity monotonicity ; fateL4MonoR ; fateL4MonoL ) -- L4, both arguments +-- A2-chain + retention-order: Fate is a chain (a total order), and ⊑ is a +-- decidable preorder on grades. +open import TB.OrderLaws using + ( fateLte-trans ; fateLte-antisym ; fateLte-total ; fate-isTotalOrder -- A2: chain + ; dLte-isTotalOrder -- fidelity chain + ; ⊑-trans ; ⊑-dec ; ⊑-isPreorder ) -- decidable preorder + +-- L4 in full: bond and merge coordinates, and the grade-level lifting. +open import TB.Monotone using + ( bondL4MonoR ; bondL4MonoL ; mergeL4MonoR ; mergeL4MonoL -- L4-bond-merge + ; gradeL4MonoR ; gradeL4MonoL ; ▷-mono ) -- L4-lifting + -- F4 — the three-tier boundary, dynamically (closure, NOT homomorphism). open import TB.Tier using ( Tier ; tierOf ; _⊓ᵗ_ diff --git a/verification/proofs/agda/theorem-b/TB/Bridge.agda b/verification/proofs/agda/theorem-b/TB/Bridge.agda new file mode 100644 index 0000000..750ede2 --- /dev/null +++ b/verification/proofs/agda/theorem-b/TB/Bridge.agda @@ -0,0 +1,126 @@ +{-# OPTIONS --safe --without-K --cubical-compatible --exact-split #-} +-- SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) +-- SPDX-License-Identifier: MPL-2.0 +-- +-- Theorem B — the definition bridge for the Rocq and Lean recheck legs of the +-- ratified-carrier order laws and L4 (PROOF-POLICY §2.2). +-- +-- A re-proved leg restates the Agda definitions by hand, and a restated +-- definition can drift from its source while every theorem about it still +-- proves. This module pins the values of the six definitions the legs restate +-- (fateLte, _▷f_, bondLte, _▷b_, mergeLte, _▷m_) on a fixed sample, as lists +-- of numerals. verification/proofs/rocq/RatifiedOrder.v and +-- verification/proofs/lean4/ratified-order/RatifiedOrder.lean state the SAME +-- six literals about their own restatements and prove them by computation. +-- If any one restatement disagrees with the Agda at any sample point, that +-- prover's kernel rejects its bridge theorem. +-- +-- Coverage: Bond (4 × 4) and Merge (3 × 3) are covered exhaustively. Fate is +-- covered on nine points, top to bottom: present, atten (Q 0), atten (Q 2), +-- atten (Q 5), atten total, atten unknown, predicated, dropped, falsified +-- (81 pairs); the Atten pairs exercise Δ addition (Q 2 ⊕d Q 5 = Q 7). +-- The fateLte table is lower-triangular in that order: the chain, visibly. +-- +-- Codes: Fate present 0, atten (Q n) 10 + n, atten total 1, atten unknown 2, +-- predicated 3, dropped 4, falsified 5; Bond intact 0, withheld 1, severed 2, +-- misbound 3; Merge single 0, fused 1, conflated 2; a Boolean is 1 or 0. + +module TB.Bridge where + +open import Data.Bool.Base using (Bool; true; false) +open import Data.List.Base using (List; []; _∷_; map; concatMap) +open import Data.Nat.Base using (ℕ; _+_) +open import Relation.Binary.PropositionalEquality using (_≡_; refl) + +open import TB.Grade +open import TB.Order + +b2n : Bool → ℕ +b2n true = 1 +b2n false = 0 + +fcode : Fate → ℕ +fcode present = 0 +fcode (atten (Q n)) = 10 + n +fcode (atten total) = 1 +fcode (atten unknown) = 2 +fcode predicated = 3 +fcode dropped = 4 +fcode falsified = 5 + +bcode : Bond → ℕ +bcode intact = 0 +bcode withheld = 1 +bcode severed = 2 +bcode misbound = 3 + +mcode : Merge → ℕ +mcode single = 0 +mcode fused = 1 +mcode conflated = 2 + +sampleF : List Fate +sampleF = present ∷ atten (Q 0) ∷ atten (Q 2) ∷ atten (Q 5) ∷ atten total + ∷ atten unknown ∷ predicated ∷ dropped ∷ falsified ∷ [] + +sampleB : List Bond +sampleB = intact ∷ withheld ∷ severed ∷ misbound ∷ [] + +sampleM : List Merge +sampleM = single ∷ fused ∷ conflated ∷ [] + +-- Every ordered pair of the sample, row by row: tbl f [x₁ … xₙ] = +-- f x₁ x₁ … f x₁ xₙ, f x₂ x₁ … +tbl : {A : Set} → (A → A → ℕ) → List A → List ℕ +tbl f xs = concatMap (λ x → map (f x) xs) xs + +fateLteTable-literal : List ℕ +fateLteTable-literal = + 1 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ + 0 ∷ 1 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 0 ∷ + 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ + 0 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ + 1 ∷ 1 ∷ 1 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ [] + +fcompTable-literal : List ℕ +fcompTable-literal = + 0 ∷ 10 ∷ 12 ∷ 15 ∷ 1 ∷ 2 ∷ 3 ∷ 4 ∷ 5 ∷ 10 ∷ 10 ∷ 12 ∷ 15 ∷ 1 ∷ 2 ∷ + 3 ∷ 4 ∷ 5 ∷ 12 ∷ 12 ∷ 14 ∷ 17 ∷ 1 ∷ 2 ∷ 3 ∷ 4 ∷ 5 ∷ 15 ∷ 15 ∷ 17 ∷ + 20 ∷ 1 ∷ 2 ∷ 3 ∷ 4 ∷ 5 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ 2 ∷ 3 ∷ 4 ∷ 5 ∷ 2 ∷ + 2 ∷ 2 ∷ 2 ∷ 2 ∷ 2 ∷ 3 ∷ 4 ∷ 5 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ 4 ∷ 5 ∷ + 4 ∷ 4 ∷ 4 ∷ 4 ∷ 4 ∷ 4 ∷ 4 ∷ 4 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ 5 ∷ + 5 ∷ [] + +bondLteTable-literal : List ℕ +bondLteTable-literal = + 1 ∷ 0 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ 1 ∷ [] + +bcompTable-literal : List ℕ +bcompTable-literal = + 0 ∷ 1 ∷ 2 ∷ 3 ∷ 1 ∷ 1 ∷ 2 ∷ 3 ∷ 2 ∷ 2 ∷ 2 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ 3 ∷ [] + +mergeLteTable-literal : List ℕ +mergeLteTable-literal = + 1 ∷ 0 ∷ 0 ∷ 1 ∷ 1 ∷ 0 ∷ 1 ∷ 1 ∷ 1 ∷ [] + +mcompTable-literal : List ℕ +mcompTable-literal = + 0 ∷ 1 ∷ 2 ∷ 1 ∷ 1 ∷ 2 ∷ 2 ∷ 2 ∷ 2 ∷ [] + +bridge-fateLte : tbl (λ x y → b2n (fateLte x y)) sampleF ≡ fateLteTable-literal +bridge-fateLte = refl + +bridge-fcomp : tbl (λ x y → fcode (x ▷f y)) sampleF ≡ fcompTable-literal +bridge-fcomp = refl + +bridge-bondLte : tbl (λ x y → b2n (bondLte x y)) sampleB ≡ bondLteTable-literal +bridge-bondLte = refl + +bridge-bcomp : tbl (λ x y → bcode (x ▷b y)) sampleB ≡ bcompTable-literal +bridge-bcomp = refl + +bridge-mergeLte : tbl (λ x y → b2n (mergeLte x y)) sampleM ≡ mergeLteTable-literal +bridge-mergeLte = refl + +bridge-mcomp : tbl (λ x y → mcode (x ▷m y)) sampleM ≡ mcompTable-literal +bridge-mcomp = refl diff --git a/verification/proofs/agda/theorem-b/TB/Monotone.agda b/verification/proofs/agda/theorem-b/TB/Monotone.agda new file mode 100644 index 0000000..15b228d --- /dev/null +++ b/verification/proofs/agda/theorem-b/TB/Monotone.agda @@ -0,0 +1,109 @@ +{-# OPTIONS --safe --without-K --cubical-compatible --exact-split #-} +-- SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) +-- SPDX-License-Identifier: MPL-2.0 +-- +-- Theorem B — L4 (monotonicity) IN FULL on the RATIFIED carrier +-- (R-2026-07-07 (A1)/(A2), ADR 0004): ▷ is monotone in each argument with +-- respect to ⊑ on every coordinate, and the grade composition ▷ is too. +-- +-- L4-fate TB.Order.fateL4Mono{R,L} (already in TB.Order) +-- L4-fidelity TB.Order.dplusMono{R,L} (already in TB.Order) +-- L4-bond-merge bondL4Mono{R,L}, mergeL4Mono{R,L} (this module) +-- L4-lifting gradeL4Mono{R,L}, ▷-mono (this module) +-- +-- The left-argument forms follow from the right-argument forms by the +-- coordinate's commutativity (L6: ▷b-comm, ▷m-comm, grade-comm), so each +-- coordinate needs one case analysis, not two. ▷-mono, monotonicity in both +-- arguments at once, is the form the T-Fix-Decl argument (spec §7) applies at +-- a composition site; it composes the two one-sided lemmas through ⊑-trans. + +module TB.Monotone where + +open import Data.Bool.Base using (true) +open import Data.Product.Base using (_×_; _,_) +open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst₂) + +open import TB.Grade +open import TB.Order +open import TB.OrderLaws using (∧⁶-elim; ∧⁶-intro; ⊑-trans) + +-------------------------------------------------------------------------------- +-- L4-bond-merge. Bond: Misbound ⊏ Severed ⊏ Withheld ⊏ Intact. +-------------------------------------------------------------------------------- + +bondL4MonoR : ∀ h x y → bondLte x y ≡ true → bondLte (h ▷b x) (h ▷b y) ≡ true +bondL4MonoR intact x y p = p +bondL4MonoR misbound x y _ = refl +bondL4MonoR withheld misbound y _ = refl +bondL4MonoR withheld intact intact _ = refl +bondL4MonoR withheld intact withheld () +bondL4MonoR withheld intact severed () +bondL4MonoR withheld intact misbound () +bondL4MonoR withheld withheld intact _ = refl +bondL4MonoR withheld withheld withheld _ = refl +bondL4MonoR withheld withheld severed () +bondL4MonoR withheld withheld misbound () +bondL4MonoR withheld severed intact _ = refl +bondL4MonoR withheld severed withheld _ = refl +bondL4MonoR withheld severed severed _ = refl +bondL4MonoR withheld severed misbound () +bondL4MonoR severed misbound y _ = refl +bondL4MonoR severed intact intact _ = refl +bondL4MonoR severed intact withheld () +bondL4MonoR severed intact severed () +bondL4MonoR severed intact misbound () +bondL4MonoR severed withheld intact _ = refl +bondL4MonoR severed withheld withheld _ = refl +bondL4MonoR severed withheld severed () +bondL4MonoR severed withheld misbound () +bondL4MonoR severed severed intact _ = refl +bondL4MonoR severed severed withheld _ = refl +bondL4MonoR severed severed severed _ = refl +bondL4MonoR severed severed misbound () + +bondL4MonoL : ∀ x y h → bondLte x y ≡ true → bondLte (x ▷b h) (y ▷b h) ≡ true +bondL4MonoL x y h p = + subst₂ (λ u v → bondLte u v ≡ true) (▷b-comm h x) (▷b-comm h y) (bondL4MonoR h x y p) + +-- Merge: Conflated ⊏ Fused ⊏ Single. + +mergeL4MonoR : ∀ h x y → mergeLte x y ≡ true → mergeLte (h ▷m x) (h ▷m y) ≡ true +mergeL4MonoR single x y p = p +mergeL4MonoR conflated x y _ = refl +mergeL4MonoR fused conflated y _ = refl +mergeL4MonoR fused single single _ = refl +mergeL4MonoR fused single fused () +mergeL4MonoR fused single conflated () +mergeL4MonoR fused fused single _ = refl +mergeL4MonoR fused fused fused _ = refl +mergeL4MonoR fused fused conflated () + +mergeL4MonoL : ∀ x y h → mergeLte x y ≡ true → mergeLte (x ▷m h) (y ▷m h) ≡ true +mergeL4MonoL x y h p = + subst₂ (λ u v → mergeLte u v ≡ true) (▷m-comm h x) (▷m-comm h y) (mergeL4MonoR h x y p) + +-------------------------------------------------------------------------------- +-- L4-lifting. The grade composition ▷ (gradeCompose) is ⊑-monotone: the six +-- coordinate lemmas, applied componentwise. +-------------------------------------------------------------------------------- + +gradeL4MonoR : ∀ k g h → g ⊑ h → (k ▷ g) ⊑ (k ▷ h) +gradeL4MonoR (mkGrade q b c r bo m) (mkGrade q₁ b₁ c₁ r₁ bo₁ m₁) (mkGrade q₂ b₂ c₂ r₂ bo₂ m₂) p + with ∧⁶-elim _ _ _ _ _ _ p +... | pq , pb , pc , pr , pbo , pm = + ∧⁶-intro _ _ _ _ _ _ + (fateL4MonoR q q₁ q₂ pq) + (fateL4MonoR b b₁ b₂ pb) + (fateL4MonoR c c₁ c₂ pc) + (fateL4MonoR r r₁ r₂ pr) + (bondL4MonoR bo bo₁ bo₂ pbo) + (mergeL4MonoR m m₁ m₂ pm) + +gradeL4MonoL : ∀ g h k → g ⊑ h → (g ▷ k) ⊑ (h ▷ k) +gradeL4MonoL g h k p = + subst₂ _⊑_ (grade-comm k g) (grade-comm k h) (gradeL4MonoR k g h p) + +-- Both arguments at once: g₁ ⊑ g₂ and h₁ ⊑ h₂ give g₁ ▷ h₁ ⊑ g₂ ▷ h₂. +▷-mono : ∀ g₁ g₂ h₁ h₂ → g₁ ⊑ g₂ → h₁ ⊑ h₂ → (g₁ ▷ h₁) ⊑ (g₂ ▷ h₂) +▷-mono g₁ g₂ h₁ h₂ p q = + ⊑-trans (g₁ ▷ h₁) (g₂ ▷ h₁) (g₂ ▷ h₂) (gradeL4MonoL g₁ g₂ h₁ p) (gradeL4MonoR g₂ h₁ h₂ q) diff --git a/verification/proofs/agda/theorem-b/TB/OrderLaws.agda b/verification/proofs/agda/theorem-b/TB/OrderLaws.agda new file mode 100644 index 0000000..97bd430 --- /dev/null +++ b/verification/proofs/agda/theorem-b/TB/OrderLaws.agda @@ -0,0 +1,346 @@ +{-# OPTIONS --safe --without-K --cubical-compatible --exact-split #-} +-- SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) +-- SPDX-License-Identifier: MPL-2.0 +-- +-- Theorem B — the order laws of the retention order ⊑ (TB.Order) on the +-- RATIFIED carrier (R-2026-07-07 (A2), ADR 0004). +-- +-- A2-chain Fate is a CHAIN: fateLte is reflexive, transitive, +-- antisymmetric and total — a total order in the sense of +-- the standard library (fate-isTotalOrder). The fidelity +-- order dLte, which fateLte uses on the Atten segment, is a +-- chain as well (dLte-isTotalOrder). +-- retention-order ⊑ on grades is a decidable preorder: reflexive (TB.Order +-- ⊑-refl), transitive (⊑-trans), decidable (⊑-dec). +-- +-- TB.Order proves reflexivity only; transitivity, antisymmetry and totality +-- were stated in no ladder prover before this module (pwg.json A2-chain, +-- retention-order). Everything here is by structural case analysis on the +-- Boolean orders exactly as TB.Order defines them; no definition is changed. + +module TB.OrderLaws where + +open import Data.Bool.Base using (Bool; true; false; _∧_) +open import Data.Bool.Properties using () renaming (_≟_ to _≟ᵇ_) +open import Data.Nat.Base using (ℕ; zero; suc) +open import Data.Product.Base using (_×_; _,_) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂) +open import Relation.Binary.Structures using (IsPreorder; IsPartialOrder; IsTotalOrder) +open import Relation.Binary.PropositionalEquality + using (_≡_; refl; cong; subst; isEquivalence) +open import Relation.Nullary.Decidable using (Dec) + +open import TB.Grade +open import TB.Order + +-------------------------------------------------------------------------------- +-- ℕ: the structural Boolean ≤ (lteb) is a total order. +-------------------------------------------------------------------------------- + +lteb-trans : ∀ a b c → lteb a b ≡ true → lteb b c ≡ true → lteb a c ≡ true +lteb-trans zero b c _ _ = refl +lteb-trans (suc a) zero c () _ +lteb-trans (suc a) (suc b) zero _ () +lteb-trans (suc a) (suc b) (suc c) p q = lteb-trans a b c p q + +lteb-antisym : ∀ a b → lteb a b ≡ true → lteb b a ≡ true → a ≡ b +lteb-antisym zero zero _ _ = refl +lteb-antisym zero (suc b) _ () +lteb-antisym (suc a) zero () _ +lteb-antisym (suc a) (suc b) p q = cong suc (lteb-antisym a b p q) + +lteb-total : ∀ a b → lteb a b ≡ true ⊎ lteb b a ≡ true +lteb-total zero b = inj₁ refl +lteb-total (suc a) zero = inj₂ refl +lteb-total (suc a) (suc b) = lteb-total a b + +-------------------------------------------------------------------------------- +-- Δ: the fidelity order (unknown ⊏ total ⊏ … ⊏ Q 1 ⊏ Q 0) is a total order. +-------------------------------------------------------------------------------- + +dLte-trans : ∀ a b c → dLte a b ≡ true → dLte b c ≡ true → dLte a c ≡ true +dLte-trans unknown b c _ _ = refl +dLte-trans (Q x) (Q y) (Q z) p q = lteb-trans z y x q p +dLte-trans (Q x) (Q y) total _ () +dLte-trans (Q x) (Q y) unknown _ () +dLte-trans (Q x) total c () _ +dLte-trans (Q x) unknown c () _ +dLte-trans total (Q y) (Q z) _ _ = refl +dLte-trans total (Q y) total _ _ = refl +dLte-trans total (Q y) unknown _ () +dLte-trans total total (Q z) _ _ = refl +dLte-trans total total total _ _ = refl +dLte-trans total total unknown _ () +dLte-trans total unknown c () _ + +dLte-antisym : ∀ a b → dLte a b ≡ true → dLte b a ≡ true → a ≡ b +dLte-antisym unknown unknown _ _ = refl +dLte-antisym unknown (Q y) _ () +dLte-antisym unknown total _ () +dLte-antisym (Q x) (Q y) p q = cong Q (lteb-antisym x y q p) +dLte-antisym (Q x) total () _ +dLte-antisym (Q x) unknown () _ +dLte-antisym total (Q y) _ () +dLte-antisym total total _ _ = refl +dLte-antisym total unknown () _ + +dLte-total : ∀ a b → dLte a b ≡ true ⊎ dLte b a ≡ true +dLte-total unknown b = inj₁ refl +dLte-total (Q x) (Q y) = lteb-total y x +dLte-total (Q x) total = inj₂ refl +dLte-total (Q x) unknown = inj₂ refl +dLte-total total (Q y) = inj₁ refl +dLte-total total total = inj₁ refl +dLte-total total unknown = inj₂ refl + +-------------------------------------------------------------------------------- +-- A2-chain. Fate: Falsified ⊏ Dropped ⊏ Predicated ⊏ Atten(unknown) ⊏ +-- Atten(total) ⊏ … ⊏ Atten(Q 0) ⊏ Present is a total order. +-------------------------------------------------------------------------------- + +fateLte-trans : ∀ x y z → fateLte x y ≡ true → fateLte y z ≡ true → fateLte x z ≡ true +fateLte-trans falsified y z _ _ = refl +-- x = dropped: only z = falsified is open, and it forces y = falsified. +fateLte-trans dropped y present _ _ = refl +fateLte-trans dropped y (atten _) _ _ = refl +fateLte-trans dropped y predicated _ _ = refl +fateLte-trans dropped y dropped _ _ = refl +fateLte-trans dropped present falsified _ () +fateLte-trans dropped (atten _) falsified _ () +fateLte-trans dropped predicated falsified _ () +fateLte-trans dropped dropped falsified _ () +fateLte-trans dropped falsified falsified () _ +-- x = predicated: z ∈ {dropped, falsified} is refuted by y. +fateLte-trans predicated y present _ _ = refl +fateLte-trans predicated y (atten _) _ _ = refl +fateLte-trans predicated y predicated _ _ = refl +fateLte-trans predicated present dropped _ () +fateLte-trans predicated (atten _) dropped _ () +fateLte-trans predicated predicated dropped _ () +fateLte-trans predicated dropped dropped () _ +fateLte-trans predicated falsified dropped () _ +fateLte-trans predicated present falsified _ () +fateLte-trans predicated (atten _) falsified _ () +fateLte-trans predicated predicated falsified _ () +fateLte-trans predicated dropped falsified () _ +fateLte-trans predicated falsified falsified () _ +-- x = atten a: the Atten segment is the fidelity chain. +fateLte-trans (atten a) y present _ _ = refl +fateLte-trans (atten a) present (atten c) _ () +fateLte-trans (atten a) (atten b) (atten c) p q = dLte-trans a b c p q +fateLte-trans (atten a) predicated (atten c) () _ +fateLte-trans (atten a) dropped (atten c) () _ +fateLte-trans (atten a) falsified (atten c) () _ +fateLte-trans (atten a) present predicated _ () +fateLte-trans (atten a) (atten b) predicated _ () +fateLte-trans (atten a) predicated predicated () _ +fateLte-trans (atten a) dropped predicated () _ +fateLte-trans (atten a) falsified predicated () _ +fateLte-trans (atten a) present dropped _ () +fateLte-trans (atten a) (atten b) dropped _ () +fateLte-trans (atten a) predicated dropped () _ +fateLte-trans (atten a) dropped dropped () _ +fateLte-trans (atten a) falsified dropped () _ +fateLte-trans (atten a) present falsified _ () +fateLte-trans (atten a) (atten b) falsified _ () +fateLte-trans (atten a) predicated falsified () _ +fateLte-trans (atten a) dropped falsified () _ +fateLte-trans (atten a) falsified falsified () _ +-- x = present: present is the top, so y = present and z = present. +fateLte-trans present y present _ _ = refl +fateLte-trans present present (atten _) _ () +fateLte-trans present present predicated _ () +fateLte-trans present present dropped _ () +fateLte-trans present present falsified _ () +fateLte-trans present (atten _) (atten _) () _ +fateLte-trans present (atten _) predicated () _ +fateLte-trans present (atten _) dropped () _ +fateLte-trans present (atten _) falsified () _ +fateLte-trans present predicated (atten _) () _ +fateLte-trans present predicated predicated () _ +fateLte-trans present predicated dropped () _ +fateLte-trans present predicated falsified () _ +fateLte-trans present dropped (atten _) () _ +fateLte-trans present dropped predicated () _ +fateLte-trans present dropped dropped () _ +fateLte-trans present dropped falsified () _ +fateLte-trans present falsified (atten _) () _ +fateLte-trans present falsified predicated () _ +fateLte-trans present falsified dropped () _ +fateLte-trans present falsified falsified () _ + +fateLte-antisym : ∀ x y → fateLte x y ≡ true → fateLte y x ≡ true → x ≡ y +fateLte-antisym present present _ _ = refl +fateLte-antisym present (atten _) () _ +fateLte-antisym present predicated () _ +fateLte-antisym present dropped () _ +fateLte-antisym present falsified () _ +fateLte-antisym (atten a) present _ () +fateLte-antisym (atten a) (atten b) p q = cong atten (dLte-antisym a b p q) +fateLte-antisym (atten a) predicated () _ +fateLte-antisym (atten a) dropped () _ +fateLte-antisym (atten a) falsified () _ +fateLte-antisym predicated present _ () +fateLte-antisym predicated (atten _) _ () +fateLte-antisym predicated predicated _ _ = refl +fateLte-antisym predicated dropped () _ +fateLte-antisym predicated falsified () _ +fateLte-antisym dropped present _ () +fateLte-antisym dropped (atten _) _ () +fateLte-antisym dropped predicated _ () +fateLte-antisym dropped dropped _ _ = refl +fateLte-antisym dropped falsified () _ +fateLte-antisym falsified present _ () +fateLte-antisym falsified (atten _) _ () +fateLte-antisym falsified predicated _ () +fateLte-antisym falsified dropped _ () +fateLte-antisym falsified falsified _ _ = refl + +fateLte-total : ∀ x y → fateLte x y ≡ true ⊎ fateLte y x ≡ true +fateLte-total falsified y = inj₁ refl +fateLte-total present present = inj₁ refl +fateLte-total present (atten _) = inj₂ refl +fateLte-total present predicated = inj₂ refl +fateLte-total present dropped = inj₂ refl +fateLte-total present falsified = inj₂ refl +fateLte-total (atten a) present = inj₁ refl +fateLte-total (atten a) (atten b) = dLte-total a b +fateLte-total (atten a) predicated = inj₂ refl +fateLte-total (atten a) dropped = inj₂ refl +fateLte-total (atten a) falsified = inj₂ refl +fateLte-total predicated present = inj₁ refl +fateLte-total predicated (atten _) = inj₁ refl +fateLte-total predicated predicated = inj₁ refl +fateLte-total predicated dropped = inj₂ refl +fateLte-total predicated falsified = inj₂ refl +fateLte-total dropped present = inj₁ refl +fateLte-total dropped (atten _) = inj₁ refl +fateLte-total dropped predicated = inj₁ refl +fateLte-total dropped dropped = inj₁ refl +fateLte-total dropped falsified = inj₂ refl + +-- The relations as Set-valued orders, for the standard-library structures. +infix 4 _≤Δ_ _≤F_ +_≤Δ_ : Δ → Δ → Set +a ≤Δ b = dLte a b ≡ true + +_≤F_ : Fate → Fate → Set +x ≤F y = fateLte x y ≡ true + +dLte-isTotalOrder : IsTotalOrder _≡_ _≤Δ_ +dLte-isTotalOrder = record + { isPartialOrder = record + { isPreorder = record + { isEquivalence = isEquivalence + ; reflexive = λ {a} {b} eq → subst (λ b′ → dLte a b′ ≡ true) eq (dLte-refl a) + ; trans = λ {a} {b} {c} → dLte-trans a b c + } + ; antisym = λ {a} {b} → dLte-antisym a b + } + ; total = dLte-total + } + +-- A2-chain, as one statement: Fate is a chain (a total order). +fate-isTotalOrder : IsTotalOrder _≡_ _≤F_ +fate-isTotalOrder = record + { isPartialOrder = record + { isPreorder = record + { isEquivalence = isEquivalence + ; reflexive = λ {x} {y} eq → subst (λ y′ → fateLte x y′ ≡ true) eq (fateLte-refl x) + ; trans = λ {x} {y} {z} → fateLte-trans x y z + } + ; antisym = λ {x} {y} → fateLte-antisym x y + } + ; total = fateLte-total + } + +-------------------------------------------------------------------------------- +-- Bond and merge: chains too (Misbound ⊏ Severed ⊏ Withheld ⊏ Intact; +-- Conflated ⊏ Fused ⊏ Single). Transitivity is what ⊑-trans needs. +-------------------------------------------------------------------------------- + +bondLte-trans : ∀ x y z → bondLte x y ≡ true → bondLte y z ≡ true → bondLte x z ≡ true +bondLte-trans misbound y z _ _ = refl +bondLte-trans severed y intact _ _ = refl +bondLte-trans severed y withheld _ _ = refl +bondLte-trans severed y severed _ _ = refl +bondLte-trans severed intact misbound _ () +bondLte-trans severed withheld misbound _ () +bondLte-trans severed severed misbound _ () +bondLte-trans severed misbound misbound () _ +bondLte-trans withheld y intact _ _ = refl +bondLte-trans withheld y withheld _ _ = refl +bondLte-trans withheld intact severed _ () +bondLte-trans withheld withheld severed _ () +bondLte-trans withheld severed severed () _ +bondLte-trans withheld misbound severed () _ +bondLte-trans withheld intact misbound _ () +bondLte-trans withheld withheld misbound _ () +bondLte-trans withheld severed misbound () _ +bondLte-trans withheld misbound misbound () _ +bondLte-trans intact y intact _ _ = refl +bondLte-trans intact intact withheld _ () +bondLte-trans intact intact severed _ () +bondLte-trans intact intact misbound _ () +bondLte-trans intact withheld z () _ +bondLte-trans intact severed z () _ +bondLte-trans intact misbound z () _ + +mergeLte-trans : ∀ x y z → mergeLte x y ≡ true → mergeLte y z ≡ true → mergeLte x z ≡ true +mergeLte-trans conflated y z _ _ = refl +mergeLte-trans fused y single _ _ = refl +mergeLte-trans fused y fused _ _ = refl +mergeLte-trans fused single conflated _ () +mergeLte-trans fused fused conflated _ () +mergeLte-trans fused conflated conflated () _ +mergeLte-trans single y single _ _ = refl +mergeLte-trans single single fused _ () +mergeLte-trans single single conflated _ () +mergeLte-trans single fused z () _ +mergeLte-trans single conflated z () _ + +-------------------------------------------------------------------------------- +-- retention-order. ⊑ is the componentwise product of the six coordinate +-- orders; a Boolean conjunction of six tests, taken apart and put back. +-------------------------------------------------------------------------------- + +∧⁶-elim : ∀ a b c d e f → (a ∧ b ∧ c ∧ d ∧ e ∧ f) ≡ true → + a ≡ true × b ≡ true × c ≡ true × d ≡ true × e ≡ true × f ≡ true +∧⁶-elim true true true true true f p = refl , refl , refl , refl , refl , p +∧⁶-elim true true true true false f () +∧⁶-elim true true true false e f () +∧⁶-elim true true false d e f () +∧⁶-elim true false c d e f () +∧⁶-elim false b c d e f () + +∧⁶-intro : ∀ a b c d e f → a ≡ true → b ≡ true → c ≡ true → d ≡ true → + e ≡ true → f ≡ true → (a ∧ b ∧ c ∧ d ∧ e ∧ f) ≡ true +∧⁶-intro true true true true true f _ _ _ _ _ pf = pf +∧⁶-intro true true true true false f _ _ _ _ () _ +∧⁶-intro true true true false e f _ _ _ () _ _ +∧⁶-intro true true false d e f _ _ () _ _ _ +∧⁶-intro true false c d e f _ () _ _ _ _ +∧⁶-intro false b c d e f () _ _ _ _ _ + +⊑-trans : ∀ g h k → g ⊑ h → h ⊑ k → g ⊑ k +⊑-trans (mkGrade q₁ b₁ c₁ r₁ bo₁ m₁) (mkGrade q₂ b₂ c₂ r₂ bo₂ m₂) (mkGrade q₃ b₃ c₃ r₃ bo₃ m₃) p p′ + with ∧⁶-elim _ _ _ _ _ _ p | ∧⁶-elim _ _ _ _ _ _ p′ +... | pq , pb , pc , pr , pbo , pm | pq′ , pb′ , pc′ , pr′ , pbo′ , pm′ = + ∧⁶-intro _ _ _ _ _ _ + (fateLte-trans q₁ q₂ q₃ pq pq′) + (fateLte-trans b₁ b₂ b₃ pb pb′) + (fateLte-trans c₁ c₂ c₃ pc pc′) + (fateLte-trans r₁ r₂ r₃ pr pr′) + (bondLte-trans bo₁ bo₂ bo₃ pbo pbo′) + (mergeLte-trans m₁ m₂ m₃ pm pm′) + +-- ⊑ is decided by its own Boolean: gradeLte g h is computed, then compared. +⊑-dec : ∀ g h → Dec (g ⊑ h) +⊑-dec g h = gradeLte g h ≟ᵇ true + +⊑-isPreorder : IsPreorder _≡_ _⊑_ +⊑-isPreorder = record + { isEquivalence = isEquivalence + ; reflexive = λ {g} {h} eq → subst (λ h′ → g ⊑ h′) eq (⊑-refl g) + ; trans = λ {g} {h} {k} → ⊑-trans g h k + } diff --git a/verification/proofs/lean4/ratified-order/RatifiedOrder.lean b/verification/proofs/lean4/ratified-order/RatifiedOrder.lean new file mode 100644 index 0000000..731edd3 --- /dev/null +++ b/verification/proofs/lean4/ratified-order/RatifiedOrder.lean @@ -0,0 +1,567 @@ +/- +SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) +SPDX-License-Identifier: MPL-2.0 + +Lean recheck leg, route re-proved, for the ratified-carrier order laws and +L4 (monotonicity) in full. Source of truth: the Agda modules +verification/proofs/agda/theorem-b/TB/{Grade,Order,OrderLaws,Monotone}.agda. + +Only Lean core is used: no `import`, no Mathlib (PROOF-POLICY §2). Unlike the +grade-boundary and grade-factorisation packages, which import Mathlib and stay +BRIDGE-PENDING, this file is meant to count as a recheck leg. + +Every Agda definition used is restated with the same constructors and clauses, +and every theorem with the same hypotheses and conclusion; each is proved +again by hand. No `simp`, `omega`, `decide` or `ac_rfl`: proofs are `cases`, +`rfl`, `rw`, `nomatch` and term application, so that no theorem depends on an axiom +(`#print axioms` at the foot of this file; CI audits every theorem). + +Encoding differences, all of them notation: +- Agda's ℕ, Bool, _∧_ and _≡_ are Nat, Bool, `&&` and `=`. Lean's `&&` is + left-associative and Agda's `_∧_` right-associative, so every conjunction + below is parenthesised right-nested, as in the Agda. +- Agda's `_⊎_` is `Or`: both disjuncts are propositions here. +- Agda's infix operators are named functions: `_⊕d_` is `dplus`, `_▷f_` + `fcomp`, `_▷b_` `bcomp`, `_▷m_` `mcomp`, `_▷_` `gcomp`, `_⊑_` `gle`. + Hyphens become underscores. +- `IsTotalOrder` is unfolded into its four laws (reflexive, transitive, + antisymmetric, total), which is what the standard-library record carries. +-/ + +namespace TropeRatified + +/-! ## The carrier (TB.Grade) -/ + +inductive Delta where + | Q (n : Nat) + | total + | unknown + +open Delta + +def dplus : Delta → Delta → Delta + | unknown, _ => unknown + | total, unknown => unknown + | total, total => total + | total, Q _ => total + | Q _, unknown => unknown + | Q _, total => total + | Q a, Q b => Q (a + b) + +inductive Fate where + | present + | atten (d : Delta) + | predicated + | dropped + | falsified + +open Fate + +def fcomp : Fate → Fate → Fate + | falsified, _ => falsified + | dropped, falsified => falsified + | dropped, present => dropped + | dropped, atten _ => dropped + | dropped, predicated => dropped + | dropped, dropped => dropped + | present, f => f + | atten _, falsified => falsified + | atten _, dropped => dropped + | atten d, present => atten d + | atten d, atten e => atten (dplus d e) + | atten _, predicated => predicated + | predicated, falsified => falsified + | predicated, dropped => dropped + | predicated, present => predicated + | predicated, atten _ => predicated + | predicated, predicated => predicated + +inductive Bond where + | intact + | withheld + | severed + | misbound + +open Bond + +def bcomp : Bond → Bond → Bond + | intact, b => b + | withheld, intact => withheld + | withheld, withheld => withheld + | withheld, severed => severed + | withheld, misbound => misbound + | severed, intact => severed + | severed, withheld => severed + | severed, severed => severed + | severed, misbound => misbound + | misbound, _ => misbound + +inductive Merge where + | single + | fused + | conflated + +open Merge + +def mcomp : Merge → Merge → Merge + | single, m => m + | fused, single => fused + | fused, fused => fused + | fused, conflated => conflated + | conflated, _ => conflated + +structure Grade where + mkGrade :: + fQuality : Fate + fBearer : Fate + fContext : Fate + fRecord : Fate + gBond : Bond + gMerge : Merge + +def gcomp (g h : Grade) : Grade := + ⟨fcomp g.fQuality h.fQuality, fcomp g.fBearer h.fBearer, + fcomp g.fContext h.fContext, fcomp g.fRecord h.fRecord, + bcomp g.gBond h.gBond, mcomp g.gMerge h.gMerge⟩ + +/-! ## The retention order (TB.Order) -/ + +def lteb : Nat → Nat → Bool + | 0, _ => true + | _ + 1, 0 => false + | m + 1, n + 1 => lteb m n + +def dLte : Delta → Delta → Bool + | unknown, _ => true + | Q a, Q b => lteb b a + | Q _, total => false + | Q _, unknown => false + | total, Q _ => true + | total, total => true + | total, unknown => false + +def fateLte : Fate → Fate → Bool + | falsified, _ => true + | present, present => true + | present, atten _ => false + | present, predicated => false + | present, dropped => false + | present, falsified => false + | atten _, present => true + | atten a, atten b => dLte a b + | atten _, predicated => false + | atten _, dropped => false + | atten _, falsified => false + | predicated, present => true + | predicated, atten _ => true + | predicated, predicated => true + | predicated, dropped => false + | predicated, falsified => false + | dropped, present => true + | dropped, atten _ => true + | dropped, predicated => true + | dropped, dropped => true + | dropped, falsified => false + +def bondLte : Bond → Bond → Bool + | intact, intact => true + | intact, withheld => false + | intact, severed => false + | intact, misbound => false + | withheld, intact => true + | withheld, withheld => true + | withheld, severed => false + | withheld, misbound => false + | severed, intact => true + | severed, withheld => true + | severed, severed => true + | severed, misbound => false + | misbound, _ => true + +def mergeLte : Merge → Merge → Bool + | single, single => true + | single, fused => false + | single, conflated => false + | fused, single => true + | fused, fused => true + | fused, conflated => false + | conflated, _ => true + +def gradeLte (g h : Grade) : Bool := + fateLte g.fQuality h.fQuality && (fateLte g.fBearer h.fBearer && + (fateLte g.fContext h.fContext && (fateLte g.fRecord h.fRecord && + (bondLte g.gBond h.gBond && mergeLte g.gMerge h.gMerge)))) + +def gle (g h : Grade) : Prop := gradeLte g h = true + +/-! ## Reflexivity (TB.Order) -/ + +theorem lteb_refl : ∀ n, lteb n n = true + | 0 => rfl + | n + 1 => lteb_refl n + +theorem dLte_refl : ∀ d, dLte d d = true + | Q n => lteb_refl n + | total => rfl + | unknown => rfl + +theorem fateLte_refl : ∀ f, fateLte f f = true + | present => rfl + | atten d => dLte_refl d + | predicated => rfl + | dropped => rfl + | falsified => rfl + +theorem bondLte_refl : ∀ b, bondLte b b = true := by + intro b; cases b <;> rfl + +theorem mergeLte_refl : ∀ m, mergeLte m m = true := by + intro m; cases m <;> rfl + +/-! ## Six-way conjunctions, taken apart and put back -/ + +theorem and6_elim : ∀ a b c d e f : Bool, + (a && (b && (c && (d && (e && f))))) = true → + a = true ∧ b = true ∧ c = true ∧ d = true ∧ e = true ∧ f = true + | true, true, true, true, true, _, p => ⟨rfl, rfl, rfl, rfl, rfl, p⟩ + | true, true, true, true, false, _, p => nomatch p + | true, true, true, false, _, _, p => nomatch p + | true, true, false, _, _, _, p => nomatch p + | true, false, _, _, _, _, p => nomatch p + | false, _, _, _, _, _, p => nomatch p + +theorem and6_intro : ∀ a b c d e f : Bool, + a = true → b = true → c = true → d = true → e = true → f = true → + (a && (b && (c && (d && (e && f))))) = true + | _, _, _, _, _, _, rfl, rfl, rfl, rfl, rfl, rfl => rfl + +theorem gle_refl (g : Grade) : gle g g := + and6_intro _ _ _ _ _ _ (fateLte_refl _) (fateLte_refl _) (fateLte_refl _) + (fateLte_refl _) (bondLte_refl _) (mergeLte_refl _) + +/-! ## A2-directions (TB.Order) -/ + +theorem fateDroppedLtePredicated : fateLte dropped predicated = true := rfl + +theorem fatePredicatedNotLteDropped : fateLte predicated dropped = false := rfl + +/-! ## Order laws (TB.OrderLaws): lteb, dLte and fateLte are chains -/ + +theorem lteb_trans : ∀ a b c, lteb a b = true → lteb b c = true → lteb a c = true + | 0, _, _, _, _ => rfl + | _ + 1, 0, _, p, _ => nomatch p + | _ + 1, _ + 1, 0, _, q => nomatch q + | a + 1, b + 1, c + 1, p, q => lteb_trans a b c p q + +theorem lteb_antisym : ∀ a b, lteb a b = true → lteb b a = true → a = b + | 0, 0, _, _ => rfl + | 0, _ + 1, _, q => nomatch q + | _ + 1, 0, p, _ => nomatch p + | a + 1, b + 1, p, q => congrArg (· + 1) (lteb_antisym a b p q) + +theorem lteb_total : ∀ a b, lteb a b = true ∨ lteb b a = true + | 0, _ => Or.inl rfl + | _ + 1, 0 => Or.inr rfl + | a + 1, b + 1 => lteb_total a b + +theorem dLte_trans : ∀ a b c, dLte a b = true → dLte b c = true → dLte a c = true := by + intro a b c p q + cases a <;> cases b <;> cases c <;> + first | rfl | (cases p; done) | (cases q; done) + | exact lteb_trans _ _ _ q p + +theorem dLte_antisym : ∀ a b, dLte a b = true → dLte b a = true → a = b := by + intro a b p q + cases a <;> cases b <;> + first | rfl | (cases p; done) | (cases q; done) + | exact congrArg Delta.Q (lteb_antisym _ _ q p) + +theorem dLte_total : ∀ a b, dLte a b = true ∨ dLte b a = true := by + intro a b + cases a <;> cases b <;> + first | exact Or.inl rfl | exact Or.inr rfl | exact lteb_total _ _ + +theorem fateLte_trans : ∀ x y z, + fateLte x y = true → fateLte y z = true → fateLte x z = true := by + intro x y z p q + cases x <;> cases y <;> cases z <;> + first | rfl | (cases p; done) | (cases q; done) + | exact dLte_trans _ _ _ p q + +theorem fateLte_antisym : ∀ x y, + fateLte x y = true → fateLte y x = true → x = y := by + intro x y p q + cases x <;> cases y <;> + first | rfl | (cases p; done) | (cases q; done) + | exact congrArg Fate.atten (dLte_antisym _ _ p q) + +theorem fateLte_total : ∀ x y, fateLte x y = true ∨ fateLte y x = true := by + intro x y + cases x <;> cases y <;> + first | exact Or.inl rfl | exact Or.inr rfl | exact dLte_total _ _ + +/-- A2-chain as one statement: the four laws of a total order. -/ +theorem fate_isTotalOrder : + (∀ x, fateLte x x = true) ∧ + (∀ x y z, fateLte x y = true → fateLte y z = true → fateLte x z = true) ∧ + (∀ x y, fateLte x y = true → fateLte y x = true → x = y) ∧ + (∀ x y, fateLte x y = true ∨ fateLte y x = true) := + ⟨fateLte_refl, fateLte_trans, fateLte_antisym, fateLte_total⟩ + +theorem dLte_isTotalOrder : + (∀ a, dLte a a = true) ∧ + (∀ a b c, dLte a b = true → dLte b c = true → dLte a c = true) ∧ + (∀ a b, dLte a b = true → dLte b a = true → a = b) ∧ + (∀ a b, dLte a b = true ∨ dLte b a = true) := + ⟨dLte_refl, dLte_trans, dLte_antisym, dLte_total⟩ + +theorem bondLte_trans : ∀ x y z, + bondLte x y = true → bondLte y z = true → bondLte x z = true := by + intro x y z p q + cases x <;> cases y <;> cases z <;> + first | rfl | (cases p; done) | (cases q; done) + +theorem mergeLte_trans : ∀ x y z, + mergeLte x y = true → mergeLte y z = true → mergeLte x z = true := by + intro x y z p q + cases x <;> cases y <;> cases z <;> + first | rfl | (cases p; done) | (cases q; done) + +/-! ## retention-order (TB.OrderLaws): ⊑ is a decidable preorder -/ + +theorem gle_trans : ∀ g h k, gle g h → gle h k → gle g k := by + intro g h k p q + have ⟨pq, pb, pc, pr, pbo, pm⟩ := and6_elim _ _ _ _ _ _ p + have ⟨qq, qb, qc, qr, qbo, qm⟩ := and6_elim _ _ _ _ _ _ q + exact and6_intro _ _ _ _ _ _ + (fateLte_trans _ _ _ pq qq) (fateLte_trans _ _ _ pb qb) + (fateLte_trans _ _ _ pc qc) (fateLte_trans _ _ _ pr qr) + (bondLte_trans _ _ _ pbo qbo) (mergeLte_trans _ _ _ pm qm) + +/-- ⊑ is decided by its own Boolean (Agda `⊑-dec`). -/ +def gle_dec (g h : Grade) : Decidable (gle g h) := + match hb : gradeLte g h with + | true => isTrue hb + | false => isFalse (fun p => nomatch hb.symm.trans p) + +/-- The decision procedure is sound and complete for ⊑, as a theorem the +axiom audit inspects. -/ +theorem gle_decides (g h : Grade) : gle g h ∨ ¬ gle g h := + match hb : gradeLte g h with + | true => Or.inl hb + | false => Or.inr (fun p => nomatch hb.symm.trans p) + +/-! ## L4-fidelity (TB.Order): dplus is monotone in each argument -/ + +theorem lteb_suc_right : ∀ a b, lteb a b = true → lteb a (b + 1) = true + | 0, _, _ => rfl + | _ + 1, 0, p => nomatch p + | a + 1, b + 1, p => lteb_suc_right a b p + +theorem lteb_self_plus : ∀ m n, lteb m (m + n) = true + | 0, n => by rw [Nat.zero_add]; rfl + | m + 1, n => by rw [Nat.succ_add]; exact lteb_self_plus m n + +theorem lteb_plus_left : ∀ m n, lteb n (m + n) = true + | 0, n => by rw [Nat.zero_add]; exact lteb_refl n + | m + 1, n => by rw [Nat.succ_add]; exact lteb_suc_right n (m + n) (lteb_plus_left m n) + +theorem lteb_plus_monoL : ∀ c a b, lteb a b = true → lteb (c + a) (c + b) = true + | 0, a, b, p => by rw [Nat.zero_add, Nat.zero_add]; exact p + | c + 1, a, b, p => by rw [Nat.succ_add, Nat.succ_add]; exact lteb_plus_monoL c a b p + +theorem lteb_plus_monoR : ∀ a b c, lteb a b = true → lteb (a + c) (b + c) = true + | 0, b, c, _ => by rw [Nat.zero_add]; exact lteb_plus_left b c + | _ + 1, 0, _, p => nomatch p + | a + 1, b + 1, c, p => by + rw [Nat.succ_add, Nat.succ_add]; exact lteb_plus_monoR a b c p + +theorem dplusMonoR : ∀ c a b, dLte a b = true → dLte (dplus c a) (dplus c b) = true := by + intro c a b p + cases c <;> cases a <;> cases b <;> + first | rfl | (cases p; done) | exact lteb_plus_monoL _ _ _ p + +theorem dplusMonoL : ∀ a b c, dLte a b = true → dLte (dplus a c) (dplus b c) = true := by + intro a b c p + cases a <;> cases b <;> cases c <;> + first | rfl | (cases p; done) | exact lteb_plus_monoR _ _ _ p + +theorem dplusRetLteR : ∀ d a, dLte (dplus d a) d = true := by + intro d a + cases d <;> cases a <;> first | rfl | exact lteb_self_plus _ _ + +theorem dplusRetLteL : ∀ a e, dLte (dplus a e) e = true := by + intro a e + cases a <;> cases e <;> first | rfl | exact lteb_plus_left _ _ + +/-! ## L4-fate (TB.Order) -/ + +theorem fateL4MonoR : ∀ h x y, + fateLte x y = true → fateLte (fcomp h x) (fcomp h y) = true := by + intro h x y p + cases h <;> cases x <;> cases y <;> + first | rfl | exact p | (cases p; done) | exact dLte_refl _ + | exact dplusRetLteR _ _ | exact dplusMonoR _ _ _ p + +theorem fateL4MonoL : ∀ x y h, + fateLte x y = true → fateLte (fcomp x h) (fcomp y h) = true := by + intro x y h p + cases x <;> cases y <;> cases h <;> + first | rfl | exact p | (cases p; done) | exact dLte_refl _ + | exact dplusRetLteL _ _ | exact dplusMonoL _ _ _ p + +/-! ## L4-bond-merge (TB.Monotone) -/ + +theorem bondL4MonoR : ∀ h x y, + bondLte x y = true → bondLte (bcomp h x) (bcomp h y) = true := by + intro h x y p + cases h <;> cases x <;> cases y <;> first | rfl | (cases p; done) + +theorem bondL4MonoL : ∀ x y h, + bondLte x y = true → bondLte (bcomp x h) (bcomp y h) = true := by + intro x y h p + cases x <;> cases y <;> cases h <;> first | rfl | (cases p; done) + +theorem mergeL4MonoR : ∀ h x y, + mergeLte x y = true → mergeLte (mcomp h x) (mcomp h y) = true := by + intro h x y p + cases h <;> cases x <;> cases y <;> first | rfl | (cases p; done) + +theorem mergeL4MonoL : ∀ x y h, + mergeLte x y = true → mergeLte (mcomp x h) (mcomp y h) = true := by + intro x y h p + cases x <;> cases y <;> cases h <;> first | rfl | (cases p; done) + +/-! ## L4-lifting (TB.Monotone): gcomp is ⊑-monotone -/ + +theorem gradeL4MonoR : ∀ k g h, gle g h → gle (gcomp k g) (gcomp k h) := by + intro k g h p + have ⟨pq, pb, pc, pr, pbo, pm⟩ := and6_elim _ _ _ _ _ _ p + exact and6_intro _ _ _ _ _ _ + (fateL4MonoR _ _ _ pq) (fateL4MonoR _ _ _ pb) + (fateL4MonoR _ _ _ pc) (fateL4MonoR _ _ _ pr) + (bondL4MonoR _ _ _ pbo) (mergeL4MonoR _ _ _ pm) + +theorem gradeL4MonoL : ∀ g h k, gle g h → gle (gcomp g k) (gcomp h k) := by + intro g h k p + have ⟨pq, pb, pc, pr, pbo, pm⟩ := and6_elim _ _ _ _ _ _ p + exact and6_intro _ _ _ _ _ _ + (fateL4MonoL _ _ _ pq) (fateL4MonoL _ _ _ pb) + (fateL4MonoL _ _ _ pc) (fateL4MonoL _ _ _ pr) + (bondL4MonoL _ _ _ pbo) (mergeL4MonoL _ _ _ pm) + +/-- Both arguments at once (Agda `▷-mono`). -/ +theorem gcomp_mono : ∀ g₁ g₂ h₁ h₂, + gle g₁ g₂ → gle h₁ h₂ → gle (gcomp g₁ h₁) (gcomp g₂ h₂) := + fun g₁ g₂ h₁ h₂ p q => + gle_trans _ _ _ (gradeL4MonoL g₁ g₂ h₁ p) (gradeL4MonoR g₂ h₁ h₂ q) + +/-! ## Definition bridge (TB.Bridge) + +The same six literals as the Agda and the Rocq: if this file's restatement of +any of the six definitions disagrees with the Agda at a sample point, the +matching bridge theorem fails. Bond and Merge are covered exhaustively; Fate +on nine points, top to bottom. Codes as in TB/Bridge.agda. -/ + +def b2n : Bool → Nat + | true => 1 + | false => 0 + +def fcode : Fate → Nat + | present => 0 + | atten (Q n) => 10 + n + | atten total => 1 + | atten unknown => 2 + | predicated => 3 + | dropped => 4 + | falsified => 5 + +def bcode : Bond → Nat + | intact => 0 + | withheld => 1 + | severed => 2 + | misbound => 3 + +def mcode : Merge → Nat + | single => 0 + | fused => 1 + | conflated => 2 + +def sampleF : List Fate := + [present, atten (Q 0), atten (Q 2), atten (Q 5), atten total, + atten unknown, predicated, dropped, falsified] + +def sampleB : List Bond := [intact, withheld, severed, misbound] + +def sampleM : List Merge := [single, fused, conflated] + +def lmap {α β : Type} (f : α → β) : List α → List β + | [] => [] + | x :: t => f x :: lmap f t + +def lappend {α : Type} : List α → List α → List α + | [], ys => ys + | x :: t, ys => x :: lappend t ys + +def lconcatMap {α β : Type} (f : α → List β) : List α → List β + | [] => [] + | x :: t => lappend (f x) (lconcatMap f t) + +def tbl {α : Type} (f : α → α → Nat) (xs : List α) : List Nat := + lconcatMap (fun x => lmap (f x) xs) xs + +def fateLteTable_literal : List Nat := + [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1] + +def fcompTable_literal : List Nat := + [0, 10, 12, 15, 1, 2, 3, 4, 5, 10, 10, 12, 15, 1, 2, 3, 4, 5, 12, 12, + 14, 17, 1, 2, 3, 4, 5, 15, 15, 17, 20, 1, 2, 3, 4, 5, 1, 1, 1, 1, 1, + 2, 3, 4, 5, 2, 2, 2, 2, 2, 2, 3, 4, 5, 3, 3, 3, 3, 3, 3, 3, 4, 5, 4, + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] + +def bondLteTable_literal : List Nat := + [1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1] + +def bcompTable_literal : List Nat := + [0, 1, 2, 3, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3] + +def mergeLteTable_literal : List Nat := + [1, 0, 0, 1, 1, 0, 1, 1, 1] + +def mcompTable_literal : List Nat := + [0, 1, 2, 1, 1, 2, 2, 2, 2] + +theorem bridge_fateLte : tbl (fun x y => b2n (fateLte x y)) sampleF = fateLteTable_literal := rfl + +theorem bridge_fcomp : tbl (fun x y => fcode (fcomp x y)) sampleF = fcompTable_literal := rfl + +theorem bridge_bondLte : tbl (fun x y => b2n (bondLte x y)) sampleB = bondLteTable_literal := rfl + +theorem bridge_bcomp : tbl (fun x y => bcode (bcomp x y)) sampleB = bcompTable_literal := rfl + +theorem bridge_mergeLte : tbl (fun x y => b2n (mergeLte x y)) sampleM = mergeLteTable_literal := rfl + +theorem bridge_mcomp : tbl (fun x y => mcode (mcomp x y)) sampleM = mcompTable_literal := rfl + +end TropeRatified + +/-! ## Axiom report (the CI audit re-derives this for every theorem) -/ + +#print axioms TropeRatified.fate_isTotalOrder +#print axioms TropeRatified.gle_trans +#print axioms TropeRatified.gle_decides +#print axioms TropeRatified.fateL4MonoR +#print axioms TropeRatified.fateL4MonoL +#print axioms TropeRatified.dplusMonoR +#print axioms TropeRatified.dplusMonoL +#print axioms TropeRatified.bondL4MonoR +#print axioms TropeRatified.bondL4MonoL +#print axioms TropeRatified.mergeL4MonoR +#print axioms TropeRatified.mergeL4MonoL +#print axioms TropeRatified.gradeL4MonoR +#print axioms TropeRatified.gradeL4MonoL +#print axioms TropeRatified.gcomp_mono +#print axioms TropeRatified.bridge_fcomp diff --git a/verification/proofs/lean4/ratified-order/lean-toolchain b/verification/proofs/lean4/ratified-order/lean-toolchain new file mode 100644 index 0000000..2586f88 --- /dev/null +++ b/verification/proofs/lean4/ratified-order/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:v4.16.0 diff --git a/verification/proofs/rocq/RatifiedOrder.v b/verification/proofs/rocq/RatifiedOrder.v new file mode 100644 index 0000000..9ba2744 --- /dev/null +++ b/verification/proofs/rocq/RatifiedOrder.v @@ -0,0 +1,592 @@ +(* SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) + SPDX-License-Identifier: MPL-2.0 + + Rocq recheck leg, route re-proved, for the ratified-carrier order laws and + L4 (monotonicity) in full. Source of truth: the Agda modules + verification/proofs/agda/theorem-b/TB/{Grade,Order,OrderLaws,Monotone}.agda. + + This file restates every Agda definition it uses with the same + constructors and clauses, and states every theorem with the same + hypotheses and conclusion; then proves each again by hand. It imports + nothing: no standard-library module, no axiom. docs/status/PROOF-STATUS.adoc + records the statement correspondence (PROOF-POLICY 2.2). + + Encoding differences, all of them notation: + - Agda's ℕ is nat; Agda's Bool, true, false, _∧_ are bool, true, false, + andb. Agda's _∧_ is infixr, so every conjunction below is written + right-nested with explicit parentheses. + - Agda's _≡_ is eq; Agda's _⊎_ is sumbool-free `or`, since both disjuncts + are propositions here. + - Agda's infix operators are named functions: _⊕d_ is dplus, _▷f_ fcomp, + _▷b_ bcomp, _▷m_ mcomp, _▷_ gcomp, _⊑_ gle. Hyphens become underscores. + - IsTotalOrder is unfolded into its four laws (refl, trans, antisym, + total), which is what the standard-library record carries. *) + +(* ------------------------------------------------------------------ *) +(* The carrier (TB.Grade). *) +(* ------------------------------------------------------------------ *) + +Inductive Delta : Set := Q (n : nat) | total | unknown. + +Definition dplus (a b : Delta) : Delta := + match a, b with + | unknown, _ => unknown + | total, unknown => unknown + | total, total => total + | total, Q _ => total + | Q _, unknown => unknown + | Q _, total => total + | Q x, Q y => Q (x + y) + end. + +Inductive Fate : Set := present | atten (d : Delta) | predicated | dropped | falsified. + +Definition fcomp (f g : Fate) : Fate := + match f, g with + | falsified, _ => falsified + | dropped, falsified => falsified + | dropped, present => dropped + | dropped, atten _ => dropped + | dropped, predicated => dropped + | dropped, dropped => dropped + | present, h => h + | atten _, falsified => falsified + | atten _, dropped => dropped + | atten d, present => atten d + | atten d, atten e => atten (dplus d e) + | atten _, predicated => predicated + | predicated, falsified => falsified + | predicated, dropped => dropped + | predicated, present => predicated + | predicated, atten _ => predicated + | predicated, predicated => predicated + end. + +Inductive Bond : Set := intact | withheld | severed | misbound. + +Definition bcomp (a b : Bond) : Bond := + match a, b with + | intact, c => c + | withheld, intact => withheld + | withheld, withheld => withheld + | withheld, severed => severed + | withheld, misbound => misbound + | severed, intact => severed + | severed, withheld => severed + | severed, severed => severed + | severed, misbound => misbound + | misbound, _ => misbound + end. + +Inductive Merge : Set := single | fused | conflated. + +Definition mcomp (a b : Merge) : Merge := + match a, b with + | single, m => m + | fused, single => fused + | fused, fused => fused + | fused, conflated => conflated + | conflated, _ => conflated + end. + +Record Grade : Set := mkGrade + { fQuality : Fate; fBearer : Fate; fContext : Fate; fRecord : Fate; + gBond : Bond; gMerge : Merge }. + +Definition gcomp (g h : Grade) : Grade := + mkGrade (fcomp (fQuality g) (fQuality h)) (fcomp (fBearer g) (fBearer h)) + (fcomp (fContext g) (fContext h)) (fcomp (fRecord g) (fRecord h)) + (bcomp (gBond g) (gBond h)) (mcomp (gMerge g) (gMerge h)). + +(* ------------------------------------------------------------------ *) +(* The retention order (TB.Order). *) +(* ------------------------------------------------------------------ *) + +Fixpoint lteb (m n : nat) : bool := + match m, n with + | O, _ => true + | S _, O => false + | S a, S b => lteb a b + end. + +Definition dLte (a b : Delta) : bool := + match a, b with + | unknown, _ => true + | Q x, Q y => lteb y x + | Q _, total => false + | Q _, unknown => false + | total, Q _ => true + | total, total => true + | total, unknown => false + end. + +Definition fateLte (f g : Fate) : bool := + match f, g with + | falsified, _ => true + | present, present => true + | present, atten _ => false + | present, predicated => false + | present, dropped => false + | present, falsified => false + | atten _, present => true + | atten a, atten b => dLte a b + | atten _, predicated => false + | atten _, dropped => false + | atten _, falsified => false + | predicated, present => true + | predicated, atten _ => true + | predicated, predicated => true + | predicated, dropped => false + | predicated, falsified => false + | dropped, present => true + | dropped, atten _ => true + | dropped, predicated => true + | dropped, dropped => true + | dropped, falsified => false + end. + +Definition bondLte (a b : Bond) : bool := + match a, b with + | intact, intact => true + | intact, withheld => false + | intact, severed => false + | intact, misbound => false + | withheld, intact => true + | withheld, withheld => true + | withheld, severed => false + | withheld, misbound => false + | severed, intact => true + | severed, withheld => true + | severed, severed => true + | severed, misbound => false + | misbound, _ => true + end. + +Definition mergeLte (a b : Merge) : bool := + match a, b with + | single, single => true + | single, fused => false + | single, conflated => false + | fused, single => true + | fused, fused => true + | fused, conflated => false + | conflated, _ => true + end. + +Definition gradeLte (g h : Grade) : bool := + andb (fateLte (fQuality g) (fQuality h)) + (andb (fateLte (fBearer g) (fBearer h)) + (andb (fateLte (fContext g) (fContext h)) + (andb (fateLte (fRecord g) (fRecord h)) + (andb (bondLte (gBond g) (gBond h)) + (mergeLte (gMerge g) (gMerge h)))))). + +Definition gle (g h : Grade) : Prop := gradeLte g h = true. + +(* ------------------------------------------------------------------ *) +(* Reflexivity (TB.Order). *) +(* ------------------------------------------------------------------ *) + +Lemma lteb_refl : forall n, lteb n n = true. +Proof. induction n as [|n IH]; simpl; [reflexivity | exact IH]. Qed. + +Lemma dLte_refl : forall d, dLte d d = true. +Proof. intros [n| |]; simpl; [apply lteb_refl | reflexivity | reflexivity]. Qed. + +Lemma fateLte_refl : forall f, fateLte f f = true. +Proof. intros [|d| | |]; simpl; try reflexivity; apply dLte_refl. Qed. + +Lemma bondLte_refl : forall b, bondLte b b = true. +Proof. intros []; reflexivity. Qed. + +Lemma mergeLte_refl : forall m, mergeLte m m = true. +Proof. intros []; reflexivity. Qed. + +Lemma gle_refl : forall g, gle g g. +Proof. + intros [q b c r bo m]; unfold gle, gradeLte; simpl. + rewrite fateLte_refl, fateLte_refl, fateLte_refl, fateLte_refl, + bondLte_refl, mergeLte_refl; reflexivity. +Qed. + +(* ------------------------------------------------------------------ *) +(* A2-directions (TB.Order). *) +(* ------------------------------------------------------------------ *) + +Theorem fateDroppedLtePredicated : fateLte dropped predicated = true. +Proof. reflexivity. Qed. + +Theorem fatePredicatedNotLteDropped : fateLte predicated dropped = false. +Proof. reflexivity. Qed. + +(* ------------------------------------------------------------------ *) +(* Order laws (TB.OrderLaws): lteb, dLte and fateLte are chains. *) +(* ------------------------------------------------------------------ *) + +Lemma lteb_trans : forall a b c, lteb a b = true -> lteb b c = true -> lteb a c = true. +Proof. + induction a as [|a IH]; intros [|b] [|c] p q; simpl in *; + try reflexivity; try discriminate. + exact (IH b c p q). +Qed. + +Lemma lteb_antisym : forall a b, lteb a b = true -> lteb b a = true -> a = b. +Proof. + induction a as [|a IH]; intros [|b] p q; simpl in *; + try reflexivity; try discriminate. + rewrite (IH b p q); reflexivity. +Qed. + +Lemma lteb_total : forall a b, lteb a b = true \/ lteb b a = true. +Proof. + induction a as [|a IH]; intros [|b]; simpl; + try (left; reflexivity); try (right; reflexivity). + exact (IH b). +Qed. + +Lemma dLte_trans : forall a b c, dLte a b = true -> dLte b c = true -> dLte a c = true. +Proof. + intros [x| |] [y| |] [z| |] p q; simpl in *; + try reflexivity; try discriminate. + exact (lteb_trans z y x q p). +Qed. + +Lemma dLte_antisym : forall a b, dLte a b = true -> dLte b a = true -> a = b. +Proof. + intros [x| |] [y| |] p q; simpl in *; + try reflexivity; try discriminate. + rewrite (lteb_antisym x y q p); reflexivity. +Qed. + +Lemma dLte_total : forall a b, dLte a b = true \/ dLte b a = true. +Proof. + intros [x| |] [y| |]; simpl; + try (left; reflexivity); try (right; reflexivity). + exact (lteb_total y x). +Qed. + +Theorem fateLte_trans : forall x y z, + fateLte x y = true -> fateLte y z = true -> fateLte x z = true. +Proof. + intros [|a| | |] [|b| | |] [|c| | |] p q; simpl in *; + try reflexivity; try discriminate. + exact (dLte_trans a b c p q). +Qed. + +Theorem fateLte_antisym : forall x y, + fateLte x y = true -> fateLte y x = true -> x = y. +Proof. + intros [|a| | |] [|b| | |] p q; simpl in *; + try reflexivity; try discriminate. + rewrite (dLte_antisym a b p q); reflexivity. +Qed. + +Theorem fateLte_total : forall x y, fateLte x y = true \/ fateLte y x = true. +Proof. + intros [|a| | |] [|b| | |]; simpl; + try (left; reflexivity); try (right; reflexivity). + exact (dLte_total a b). +Qed. + +(* A2-chain as one statement: the four laws of a total order. *) +Theorem fate_isTotalOrder : + (forall x, fateLte x x = true) /\ + (forall x y z, fateLte x y = true -> fateLte y z = true -> fateLte x z = true) /\ + (forall x y, fateLte x y = true -> fateLte y x = true -> x = y) /\ + (forall x y, fateLte x y = true \/ fateLte y x = true). +Proof. + exact (conj fateLte_refl (conj fateLte_trans (conj fateLte_antisym fateLte_total))). +Qed. + +Theorem dLte_isTotalOrder : + (forall a, dLte a a = true) /\ + (forall a b c, dLte a b = true -> dLte b c = true -> dLte a c = true) /\ + (forall a b, dLte a b = true -> dLte b a = true -> a = b) /\ + (forall a b, dLte a b = true \/ dLte b a = true). +Proof. + exact (conj dLte_refl (conj dLte_trans (conj dLte_antisym dLte_total))). +Qed. + +Lemma bondLte_trans : forall x y z, + bondLte x y = true -> bondLte y z = true -> bondLte x z = true. +Proof. intros [] [] [] p q; simpl in *; try reflexivity; try discriminate. Qed. + +Lemma mergeLte_trans : forall x y z, + mergeLte x y = true -> mergeLte y z = true -> mergeLte x z = true. +Proof. intros [] [] [] p q; simpl in *; try reflexivity; try discriminate. Qed. + +(* ------------------------------------------------------------------ *) +(* retention-order (TB.OrderLaws): ⊑ is a decidable preorder. *) +(* ------------------------------------------------------------------ *) + +Lemma andb_true6 : forall a b c d e f, + andb a (andb b (andb c (andb d (andb e f)))) = true -> + a = true /\ b = true /\ c = true /\ d = true /\ e = true /\ f = true. +Proof. + intros [] [] [] [] [] [] p; simpl in p; try discriminate; + repeat split; reflexivity. +Qed. + +Lemma andb_intro6 : forall a b c d e f, + a = true -> b = true -> c = true -> d = true -> e = true -> f = true -> + andb a (andb b (andb c (andb d (andb e f)))) = true. +Proof. + intros a b c d e f pa pb pc pd pe pf. + rewrite pa, pb, pc, pd, pe, pf; reflexivity. +Qed. + +Theorem gle_trans : forall g h k, gle g h -> gle h k -> gle g k. +Proof. + intros [q1 b1 c1 r1 bo1 m1] [q2 b2 c2 r2 bo2 m2] [q3 b3 c3 r3 bo3 m3] p p'; + unfold gle, gradeLte in *; simpl in *. + destruct (andb_true6 _ _ _ _ _ _ p) as [pq [pb [pc [pr [pbo pm]]]]]. + destruct (andb_true6 _ _ _ _ _ _ p') as [pq' [pb' [pc' [pr' [pbo' pm']]]]]. + apply andb_intro6. + - exact (fateLte_trans _ _ _ pq pq'). + - exact (fateLte_trans _ _ _ pb pb'). + - exact (fateLte_trans _ _ _ pc pc'). + - exact (fateLte_trans _ _ _ pr pr'). + - exact (bondLte_trans _ _ _ pbo pbo'). + - exact (mergeLte_trans _ _ _ pm pm'). +Qed. + +Theorem gle_dec : forall g h, {gle g h} + {~ gle g h}. +Proof. + intros g h; unfold gle; destruct (gradeLte g h). + - left; reflexivity. + - right; discriminate. +Defined. + +(* ------------------------------------------------------------------ *) +(* L4-fidelity (TB.Order): dplus is monotone in each argument. *) +(* ------------------------------------------------------------------ *) + +Lemma lteb_suc_right : forall a b, lteb a b = true -> lteb a (S b) = true. +Proof. + induction a as [|a IH]; intros [|b] p; simpl in *; + try reflexivity; try discriminate. + exact (IH b p). +Qed. + +Lemma lteb_self_plus : forall m n, lteb m (m + n) = true. +Proof. induction m as [|m IH]; intros n; simpl; [reflexivity | apply IH]. Qed. + +Lemma lteb_plus_left : forall m n, lteb n (m + n) = true. +Proof. + induction m as [|m IH]; intros n; simpl. + - apply lteb_refl. + - apply lteb_suc_right, IH. +Qed. + +Lemma lteb_plus_monoL : forall c a b, lteb a b = true -> lteb (c + a) (c + b) = true. +Proof. induction c as [|c IH]; intros a b p; simpl; [exact p | exact (IH a b p)]. Qed. + +Lemma lteb_plus_monoR : forall a b c, lteb a b = true -> lteb (a + c) (b + c) = true. +Proof. + induction a as [|a IH]; intros [|b] c p; simpl in *; try discriminate. + - apply lteb_refl. + - exact (lteb_plus_left (S b) c). + - exact (IH b c p). +Qed. + +Theorem dplusMonoR : forall c a b, dLte a b = true -> dLte (dplus c a) (dplus c b) = true. +Proof. + intros [m| |] [x| |] [y| |] p; simpl in *; try reflexivity; try discriminate. + exact (lteb_plus_monoL m y x p). +Qed. + +Theorem dplusMonoL : forall a b c, dLte a b = true -> dLte (dplus a c) (dplus b c) = true. +Proof. + intros [x| |] [y| |] [n| |] p; simpl in *; try reflexivity; try discriminate. + exact (lteb_plus_monoR y x n p). +Qed. + +Lemma dplusRetLteR : forall d a, dLte (dplus d a) d = true. +Proof. + intros [m| |] [n| |]; simpl; try reflexivity. + apply lteb_self_plus. +Qed. + +Lemma dplusRetLteL : forall a e, dLte (dplus a e) e = true. +Proof. + intros [m| |] [n| |]; simpl; try reflexivity. + apply lteb_plus_left. +Qed. + +(* ------------------------------------------------------------------ *) +(* L4-fate (TB.Order). *) +(* ------------------------------------------------------------------ *) + +Theorem fateL4MonoR : forall h x y, + fateLte x y = true -> fateLte (fcomp h x) (fcomp h y) = true. +Proof. + intros [|d| | |] [|a| | |] [|b| | |] p; simpl in *; + first [ reflexivity | discriminate | exact p | apply dLte_refl + | apply dplusRetLteR | exact (dplusMonoR d a b p) ]. +Qed. + +Theorem fateL4MonoL : forall x y h, + fateLte x y = true -> fateLte (fcomp x h) (fcomp y h) = true. +Proof. + intros [|a| | |] [|b| | |] [|e| | |] p; simpl in *; + first [ reflexivity | discriminate | exact p | apply dLte_refl + | apply dplusRetLteL | exact (dplusMonoL a b e p) ]. +Qed. + +(* ------------------------------------------------------------------ *) +(* L4-bond-merge (TB.Monotone). *) +(* ------------------------------------------------------------------ *) + +Theorem bondL4MonoR : forall h x y, + bondLte x y = true -> bondLte (bcomp h x) (bcomp h y) = true. +Proof. intros [] [] [] p; simpl in *; try reflexivity; try discriminate. Qed. + +Theorem bondL4MonoL : forall x y h, + bondLte x y = true -> bondLte (bcomp x h) (bcomp y h) = true. +Proof. intros [] [] [] p; simpl in *; try reflexivity; try discriminate. Qed. + +Theorem mergeL4MonoR : forall h x y, + mergeLte x y = true -> mergeLte (mcomp h x) (mcomp h y) = true. +Proof. intros [] [] [] p; simpl in *; try reflexivity; try discriminate. Qed. + +Theorem mergeL4MonoL : forall x y h, + mergeLte x y = true -> mergeLte (mcomp x h) (mcomp y h) = true. +Proof. intros [] [] [] p; simpl in *; try reflexivity; try discriminate. Qed. + +(* ------------------------------------------------------------------ *) +(* L4-lifting (TB.Monotone): gcomp is ⊑-monotone. *) +(* ------------------------------------------------------------------ *) + +Theorem gradeL4MonoR : forall k g h, gle g h -> gle (gcomp k g) (gcomp k h). +Proof. + intros [q b c r bo m] [q1 b1 c1 r1 bo1 m1] [q2 b2 c2 r2 bo2 m2] p; + unfold gle, gradeLte, gcomp in *; simpl in *. + destruct (andb_true6 _ _ _ _ _ _ p) as [pq [pb [pc [pr [pbo pm]]]]]. + apply andb_intro6. + - exact (fateL4MonoR q _ _ pq). + - exact (fateL4MonoR b _ _ pb). + - exact (fateL4MonoR c _ _ pc). + - exact (fateL4MonoR r _ _ pr). + - exact (bondL4MonoR bo _ _ pbo). + - exact (mergeL4MonoR m _ _ pm). +Qed. + +Theorem gradeL4MonoL : forall g h k, gle g h -> gle (gcomp g k) (gcomp h k). +Proof. + intros [q1 b1 c1 r1 bo1 m1] [q2 b2 c2 r2 bo2 m2] [q b c r bo m] p; + unfold gle, gradeLte, gcomp in *; simpl in *. + destruct (andb_true6 _ _ _ _ _ _ p) as [pq [pb [pc [pr [pbo pm]]]]]. + apply andb_intro6. + - exact (fateL4MonoL _ _ q pq). + - exact (fateL4MonoL _ _ b pb). + - exact (fateL4MonoL _ _ c pc). + - exact (fateL4MonoL _ _ r pr). + - exact (bondL4MonoL _ _ bo pbo). + - exact (mergeL4MonoL _ _ m pm). +Qed. + +Theorem gcomp_mono : forall g1 g2 h1 h2, + gle g1 g2 -> gle h1 h2 -> gle (gcomp g1 h1) (gcomp g2 h2). +Proof. + intros g1 g2 h1 h2 p q. + exact (gle_trans _ _ _ (gradeL4MonoL g1 g2 h1 p) (gradeL4MonoR g2 h1 h2 q)). +Qed. + +(* ------------------------------------------------------------------ *) +(* Definition bridge (TB.Bridge). The same six literals as the Agda *) +(* and the Lean: if this file's restatement of any of the six *) +(* definitions disagrees with the Agda at a sample point, the matching *) +(* bridge theorem fails. Bond and Merge are covered exhaustively; Fate *) +(* on nine points, top to bottom. Codes as in TB/Bridge.agda. *) +(* ------------------------------------------------------------------ *) + +Local Open Scope list_scope. + +Definition b2n (b : bool) : nat := match b with true => 1 | false => 0 end. + +Definition fcode (f : Fate) : nat := + match f with + | present => 0 + | atten (Q n) => 10 + n + | atten total => 1 + | atten unknown => 2 + | predicated => 3 + | dropped => 4 + | falsified => 5 + end. + +Definition bcode (b : Bond) : nat := + match b with intact => 0 | withheld => 1 | severed => 2 | misbound => 3 end. + +Definition mcode (m : Merge) : nat := + match m with single => 0 | fused => 1 | conflated => 2 end. + +Definition sampleF : list Fate := + present :: atten (Q 0) :: atten (Q 2) :: atten (Q 5) :: atten total + :: atten unknown :: predicated :: dropped :: falsified :: nil. + +Definition sampleB : list Bond := intact :: withheld :: severed :: misbound :: nil. + +Definition sampleM : list Merge := single :: fused :: conflated :: nil. + +Fixpoint lmap {A B : Type} (f : A -> B) (xs : list A) : list B := + match xs with nil => nil | x :: t => f x :: lmap f t end. + +Fixpoint lappend {A : Type} (xs ys : list A) : list A := + match xs with nil => ys | x :: t => x :: lappend t ys end. + +Fixpoint lconcatMap {A B : Type} (f : A -> list B) (xs : list A) : list B := + match xs with nil => nil | x :: t => lappend (f x) (lconcatMap f t) end. + +Definition tbl {A : Type} (f : A -> A -> nat) (xs : list A) : list nat := + lconcatMap (fun x => lmap (f x) xs) xs. + +Definition fateLteTable_literal : list nat := + 1 :: 0 :: 0 :: 0 :: 0 :: 0 :: 0 :: 0 :: 0 :: 1 :: 1 :: 0 :: 0 :: + 0 :: 0 :: 0 :: 0 :: 0 :: 1 :: 1 :: 1 :: 0 :: 0 :: 0 :: 0 :: 0 :: + 0 :: 1 :: 1 :: 1 :: 1 :: 0 :: 0 :: 0 :: 0 :: 0 :: 1 :: 1 :: 1 :: + 1 :: 1 :: 0 :: 0 :: 0 :: 0 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 0 :: + 0 :: 0 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 0 :: 0 :: 1 :: 1 :: + 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 0 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: + 1 :: 1 :: 1 :: nil. + +Definition fcompTable_literal : list nat := + 0 :: 10 :: 12 :: 15 :: 1 :: 2 :: 3 :: 4 :: 5 :: 10 :: 10 :: 12 :: + 15 :: 1 :: 2 :: 3 :: 4 :: 5 :: 12 :: 12 :: 14 :: 17 :: 1 :: 2 :: + 3 :: 4 :: 5 :: 15 :: 15 :: 17 :: 20 :: 1 :: 2 :: 3 :: 4 :: 5 :: + 1 :: 1 :: 1 :: 1 :: 1 :: 2 :: 3 :: 4 :: 5 :: 2 :: 2 :: 2 :: 2 :: + 2 :: 2 :: 3 :: 4 :: 5 :: 3 :: 3 :: 3 :: 3 :: 3 :: 3 :: 3 :: 4 :: + 5 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 5 :: 5 :: 5 :: 5 :: + 5 :: 5 :: 5 :: 5 :: 5 :: 5 :: nil. + +Definition bondLteTable_literal : list nat := + 1 :: 0 :: 0 :: 0 :: 1 :: 1 :: 0 :: 0 :: 1 :: 1 :: 1 :: 0 :: 1 :: + 1 :: 1 :: 1 :: nil. + +Definition bcompTable_literal : list nat := + 0 :: 1 :: 2 :: 3 :: 1 :: 1 :: 2 :: 3 :: 2 :: 2 :: 2 :: 3 :: 3 :: + 3 :: 3 :: 3 :: nil. + +Definition mergeLteTable_literal : list nat := + 1 :: 0 :: 0 :: 1 :: 1 :: 0 :: 1 :: 1 :: 1 :: nil. + +Definition mcompTable_literal : list nat := + 0 :: 1 :: 2 :: 1 :: 1 :: 2 :: 2 :: 2 :: 2 :: nil. + +Theorem bridge_fateLte : tbl (fun x y => b2n (fateLte x y)) sampleF = fateLteTable_literal. +Proof. reflexivity. Qed. + +Theorem bridge_fcomp : tbl (fun x y => fcode (fcomp x y)) sampleF = fcompTable_literal. +Proof. reflexivity. Qed. + +Theorem bridge_bondLte : tbl (fun x y => b2n (bondLte x y)) sampleB = bondLteTable_literal. +Proof. reflexivity. Qed. + +Theorem bridge_bcomp : tbl (fun x y => bcode (bcomp x y)) sampleB = bcompTable_literal. +Proof. reflexivity. Qed. + +Theorem bridge_mergeLte : tbl (fun x y => b2n (mergeLte x y)) sampleM = mergeLteTable_literal. +Proof. reflexivity. Qed. + +Theorem bridge_mcomp : tbl (fun x y => mcode (mcomp x y)) sampleM = mcompTable_literal. +Proof. reflexivity. Qed. diff --git a/verification/pwg.json b/verification/pwg.json index 96ced48..03f5b46 100644 --- a/verification/pwg.json +++ b/verification/pwg.json @@ -1 +1 @@ -{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_mono_right","FateA.comp_mono_left"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction and holds only when all four do.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. The Lean tree carries no fidelity order on the ratified carrier, so there is no Lean leg.","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4. Idris2 restatement only, which 8.1 excludes from the ladder; no gradeable theory leg.","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Mechanised in no prover, Idris2 included.","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda proves reflexivity only. Transitivity and decidability exist in the Idris2 reference, which 8.1 excludes from the ladder, so the preorder claim has no complete theory leg. The Agda leg is OPEN, not PROVEN, for this obligation.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["FateA.le_total","FateA.le_refl"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Lean states totality and reflexivity (FateA.le_total, FateA.le_refl); Idris2 proves transitivity (Trope.Order.fateLteTrans), which PROOF-POLICY 8.1 keeps off the ladder; antisymmetry has no cited proof in any prover. No ladder leg states the whole claim, so every leg is OPEN. The directional facts are A2-directions.","reference":{"idris2":{"declarations":["Trope.Order.fateLteTrans"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} +{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"agda-d5234b1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244586","import_cone":"root modules All.agda and Smoke.agda; 145 modules in the cone (agda --dependency-graph), 12 first-party: All, Smoke and the ten TB.* modules, TB.OrderLaws, TB.Monotone and TB.Bridge among them; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/scan-postulates.sh over the 12 first-party files, which reported 12 files, 0 postulate(s))","inputs_digest":"git-tree verification/proofs/agda = 3b19a6787cd678e93ea0c6be49a6e60634ff6978","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"},"lean-ratified-order-d5234b1":{"axioms":[],"checker":"lean","checker_version":"4.16.0 (commit 128a1e6b0a82; GitHub release archive, sha256 cdd31f1064783fff163be53e285722102f16767e65e6fb7f7cb1c232514e0c3a)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/lean4/ratified-order/RatifiedOrder.lean alone: no import (Lean core only, no Mathlib)","inputs_digest":"git-tree verification/proofs/lean4/ratified-order = 2d69c2f34f4c98834f21ed6413f85b375b024e7b; RatifiedOrder.lean sha256 74c33f1310227243155da52d4afee603f58cff7b8df9942accf6b8dd80f554c5","invocation":"bash scripts/check-recheck-legs.sh lean (lean RatifiedOrder.lean with no error or warning, then Lean.collectAxioms on every declared theorem and def); bash scripts/check-recheck-legs.sh controls","observed":"axioms: none for 49 of 49 declared theorem(s), and none for any def they use; PASS: Lean recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"Lean core only (no lakefile, no Mathlib)"},"rocq-ratified-order-d5234b1":{"axioms":[],"checker":"coqc","checker_version":"8.18.0 (Ubuntu 24.04 coq package; scripts/check-recheck-legs.sh refuses any other version)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/rocq/RatifiedOrder.v alone: it requires no library module (Coq prelude only)","inputs_digest":"git-tree verification/proofs/rocq = 2f808c303b5707bf40a54a7eb5c64cd4b774c511; RatifiedOrder.v sha256 89085ae49cb52894fbb16175cc86f2dc3da29333ef8699becf850c0b5ec1583e","invocation":"bash scripts/check-recheck-legs.sh rocq (coqc RatifiedOrder.v, then Print Assumptions on every Theorem and Lemma); bash scripts/check-recheck-legs.sh controls","observed":"Print Assumptions: closed under the global context for 49 of 49 declaration(s); PASS: Rocq recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"none: no Require"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateL4MonoR","TropeRatified.fateL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateL4MonoR","fateL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction, and since 2026-11-17 all four hold. The Rocq and Lean legs are the Mathlib-free recheck of verification/proofs/rocq and verification/proofs/lean4/ratified-order; the Mathlib package lemmas FateA.comp_mono_right/left remain, BRIDGE-PENDING, and are not this leg. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.dplusMonoR","TropeRatified.dplusMonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["dplusMonoR","dplusMonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.bondL4MonoR","TB.Monotone.bondL4MonoL","TB.Monotone.mergeL4MonoR","TB.Monotone.mergeL4MonoL"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.bondL4MonoR","TropeRatified.bondL4MonoL","TropeRatified.mergeL4MonoR","TropeRatified.mergeL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["bondL4MonoR","bondL4MonoL","mergeL4MonoR","mergeL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Proved in Agda 2026-11-17 (TB.Monotone; the left forms follow from the right forms by bond and merge commutativity). The Idris2 restatement remains a reference only (8.1). Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.gradeL4MonoR","TB.Monotone.gradeL4MonoL","TB.Monotone.▷-mono"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gradeL4MonoR","TropeRatified.gradeL4MonoL","TropeRatified.gcomp_mono"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gradeL4MonoR","gradeL4MonoL","gcomp_mono"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Proved in Agda 2026-11-17 (TB.Monotone): each argument separately, and both at once (▷-mono, through ⊑-trans). Spec section 7 also needs each coordinate to be a COMPLETE chain; completeness is not part of this obligation and is proved in no prover. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl","TB.OrderLaws.⊑-trans","TB.OrderLaws.⊑-dec","TB.OrderLaws.⊑-isPreorder"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gle_refl","TropeRatified.gle_trans","TropeRatified.gle_dec","TropeRatified.gle_decides"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gle_refl","gle_trans","gle_dec"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"Proved in Agda 2026-11-17: reflexivity (TB.Order), transitivity and decidability (TB.OrderLaws), packaged as ⊑-isPreorder. Before that the Agda proved reflexivity only and the leg was OPEN. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateDroppedLtePredicated","TropeRatified.fatePredicatedNotLteDropped"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateDroppedLtePredicated","fatePredicatedNotLteDropped"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.OrderLaws.fate-isTotalOrder","TB.OrderLaws.fateLte-trans","TB.OrderLaws.fateLte-antisym","TB.OrderLaws.fateLte-total","TB.Order.fateLte-refl"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fate_isTotalOrder","TropeRatified.fateLte_trans","TropeRatified.fateLte_antisym","TropeRatified.fateLte_total","TropeRatified.fateLte_refl"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fate_isTotalOrder","fateLte_trans","fateLte_antisym","fateLte_total","fateLte_refl"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Proved in Agda 2026-11-17 as fate-isTotalOrder : IsTotalOrder _≡_ _≤F_ (standard library), with the fidelity order a chain as well (dLte-isTotalOrder). The Mathlib package lemmas FateA.le_total and FateA.le_refl remain, BRIDGE-PENDING, and are not this leg. Completeness of the chain is not part of this obligation and is proved in no prover. The directional facts are A2-directions. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Order.fateLteTrans"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} From 829cae444e64e1207630a5c59cda2d5d260efd60 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:52:24 +0000 Subject: [PATCH 17/22] Run the aspect lane, tighten what a grade may stand on, narrow four status claims (#123) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Stacked on #120 (which contains #119 and #117). Three groups of fixes from the 2026-11-16 proof audit. No proof statement, token or published grade changes: the census stays `PWG-3` 18, `ungraded` 10 of 28. ## Changes ### 1. The aspect lane ran nothing - `just aspect` was the mint template. It printed "Aspect tests passed!" having run nothing, and `test-all` depends on it. - `tests/aspect_tests.sh` was invoked by no recipe and no workflow. - Its Idris2 scan read `src/interface/Abi/` only (3 of 16 files) and dropped every hit containing "test". Now: the recipe and the quality workflow run the script. The scan reads every Idris2 source under `src/` and `verification/` through the comment stripper, adds `assert_smaller`, `unsafePerformIO`, `idris_crash` and `postulate`, and fails when it finds no Idris2 file. ### 2. Grade derivation (`scripts/pwg-derive.sh`) | Gap | Before | After | Policy | |---|---|---|---| | Axiom dispositions | A leg reporting any axiom counted | Counts only when each reported axiom has disposition `c`, recorded on the receipt as `axiom_dispositions`; none recorded is inadmissible | §8.4 rule 6, §8.5.1 | | Derived axioms | The Agda receipt's list alone | Union over every witness the grade stands on | §8.4 rule 6 | | Canonical invocation | Three flag substrings anywhere in the string | Each `agda` command is exactly the three flags and one module | §2.1 | | `+foundation-diverse` | Any non-null value | An accepted, `RECONCILED`, receipted witness | §8.3 | `scripts/pwg-check.sh` rejects a disposition outside `c|b|debt`, and one recorded for an axiom the receipt does not report. `axiom_dispositions` is a new optional receipt field. No disposition is recorded on the live Lean receipts: assigning one is a trusted-base decision, deferred to the owner. Those legs are `BRIDGE-PENDING` and do not count either way. ### 3. Status claims narrowed to their theorems - **Veridicality Derivation:** `deceptiveDuals` is a tuple value in both provers and is no longer cited as evidence. - **Verdict soundness:** `verdictSound` is over a grade-shaped floor, as its source says, not the use-model floor. - **Tier-2 membership:** names the ratified iff, `GradeR.gradeR_leftCancel_iff`. - **README:** no longer says PROOF-STATUS and `pwg.json` "agree row for row". - **grade-factorisation README:** the verdict is marked as the pre-ratification result and `GradeFactorisationR.lean` is listed. - **grade-factorisation REPORT:** states the measured axiom bound. The CI axiom audit of both modules at `7b71c31` (run 43981767344, 184 declarations) reported `propext` and `Quot.sound` only. The paragraph had quoted the audit's allowlist, which also admits `Classical.choice`. ### Left out on purpose Merge-coordinate separability and the `L4Monotonicity.lean` docstring belong to the separate proof work on L4/A2 and are untouched. ### Found, not fixed The ledger receipt `lean-factorisation-c0eb4f1` lists `Classical.choice` among its axioms. The audit at `7b71c31` reports none for that package. I have not read the log of the receipt's own run (42623339243), so the receipt is unchanged. ## RSR Quality Checklist ### Required - [x] Tests pass — see Testing - [x] Code is formatted - [ ] Linter is clean — ShellCheck could not be run in my container; CI's code-quality job is the check - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` — n/a - [x] No banned functions - [x] SPDX license headers present — existing headers untouched - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] Documentation updated — CHANGELOG entry - [ ] Repo deed, `docs/decisions/` — not touched ## Testing Run in my container against this branch: ``` scripts/test-gate-falsifiability.sh -> 43/43 scripts/pwg-check.sh -> PASS, 29 obligations, table and census match tests/aspect_tests.sh -> PASS=3 FAIL=0, 16 Idris2 files scanned jq -cS . verification/pwg.json | cmp -> identical tests/workflows/*_test.sh -> both exit 0 ``` Each new canary was run against the code before its fix: ``` canaries 32-34 vs pre-fix Justfile and aspect script -> 31/34, all three fail canaries 35-41 vs pre-fix pwg-derive.sh -> 35/41, six fail (the seventh is a control) canaries 42-43 vs pre-fix pwg-check.sh -> 41/43, both fail ``` Not run here: Agda, Lean, Rocq or Idris2. No kernel result is claimed. The axiom bound quoted for grade-factorisation is read from the CI log named above. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H)_ --------- Co-authored-by: Claude --- .github/workflows/quality.yml | 2 + CHANGELOG.adoc | 40 ++++++- Justfile | 15 +-- README.adoc | 4 +- docs/status/PROOF-STATUS.adoc | 8 +- scripts/pwg-check.sh | 8 +- scripts/pwg-derive.sh | 52 +++++++-- scripts/test-gate-falsifiability.sh | 103 +++++++++++++++++- tests/aspect_tests.sh | 35 +++++- .../lean4/grade-factorisation/README.adoc | 15 ++- .../lean4/grade-factorisation/REPORT.adoc | 11 +- 11 files changed, 255 insertions(+), 38 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index b66d3df..01427de 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -74,6 +74,8 @@ jobs: uses: editorconfig-checker/action-editorconfig-checker@v3.0.0 - name: Gate falsifiability canaries (R10) run: bash scripts/test-gate-falsifiability.sh + - name: Aspect tests (SPDX and banned-construct scans) + run: bash tests/aspect_tests.sh - name: Workflow and gate regression tests run: | bash tests/workflows/review_regressions_test.sh diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index af0500c..9f2631a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,44 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* *The aspect lane runs, grades stand only on what the policy admits, and four +status claims are narrowed (2026-11-17).* ++ +_Aspect lane._ `+just aspect+` was the mint template: it ran nothing and printed +"Aspect tests passed!", and `+test-all+` depends on it. `+tests/aspect_tests.sh+` was +invoked by nothing, so the hardening of it recorded further down this file was to +a script no lane ran. Its Idris2 scan read `+src/interface/Abi/+` only (3 of 16 +files) and dropped every hit containing "test". The recipe and the quality +workflow now run the script; the scan reads every Idris2 source through the +comment stripper, adds `+assert_smaller+`, `+unsafePerformIO+`, `+idris_crash+` and +`+postulate+`, and fails when it finds no Idris2 file. Canaries 32–34. ++ +_Grade derivation_ (`+scripts/pwg-derive.sh+`). No published grade moves; the +census stays `+PWG-3+` 18, `+ungraded+` 10 of 28. (a) A leg whose current receipt +reports an axiom counts only when each axiom has disposition `+c+`, recorded on +the receipt as `+axiom_dispositions+`; none recorded means inadmissible (§8.4 +rule 6, §8.5.1). No disposition is recorded on the live Lean receipts: that is a +trusted-base decision for the owner, and those legs are `+BRIDGE-PENDING+` either +way. (b) The derived axiom list is the union over every witness the grade stands +on, where it was the Agda receipt's alone. (c) Each `+agda+` command in a recorded +invocation must be exactly the three §2.1 flags and one module, where one +canonical command used to vouch for a second with no flags. (d) +`+foundation-diverse+` needs an accepted, `+RECONCILED+`, receipted witness, where +any non-null value used to publish it (§8.3). `+scripts/pwg-check.sh+` rejects a +disposition outside `+c|b|debt+` and one for an axiom the receipt does not report. +Canaries 35–43; each fails against the code before it. The suite stands at +*43/43*. ++ +_Status claims._ `+deceptiveDuals+` is a tuple value and is no longer cited as +evidence for "exactly three". `+verdictSound+` is stated over a grade-shaped floor, +as its source says, not over the use-model floor. The tier-2 row names the +ratified iff. The README no longer says `+PROOF-STATUS.adoc+` and `+pwg.json+` "agree +row for row": the gate checks the grade table and census, not the prose rows. +In `+grade-factorisation+`, the README verdict is marked as the pre-ratification +result and lists `+GradeFactorisationR.lean+`, and `+REPORT.adoc+` states the measured +axiom bound (`+propext+` and `+Quot.sound+` over 184 declarations, CI run +43981767344) where it had quoted the audit's allowlist. + * *The comment stripper nests where the languages nest, and `+psiBond+` separation is stated in general (2026-11-16).* Lean `+/- -/+`, Agda and Idris2 `+{- -}+` and Coq `+(* *)+` block comments nest; `+tests/lib/strip-proof-comments.awk+` closed on the @@ -18,7 +56,7 @@ dangerous-construct scan, and an unterminated nested comment exited `+0+` (a truncated scan reported as complete). A depth counter per open token fixes both; C-style `+/* */+` stays flat, and over all 38 tracked sources the output is unchanged. Canaries 30–31 plant both cases and fail against the old stripper; the -suite stands at *31/31*. Separately, `+psiBond_separates_all_honest+` +suite stood at *31/31* at that point (43/43 after the entry above). Separately, `+psiBond_separates_all_honest+` (`+GradeFactorisation.lean+`) states that every bond other than `+misbound+` is separated from it, by `+cases+` over `+Q_ne_unknown+` and `+total_ne_unknown+`, with a `+#print axioms+` line; its kernel check is the CI `+lean-build+` job. diff --git a/Justfile b/Justfile index a6d1099..205e2eb 100644 --- a/Justfile +++ b/Justfile @@ -147,18 +147,11 @@ test-smoke: e2e: trope-build bash tests/e2e.sh -# Run aspect tests (cross-cutting concern validation) +# Run aspect tests (cross-cutting concern validation): SPDX headers and the +# banned-construct scans over every Idris2 and proof source. The recipe used +# to be the mint template: it ran nothing and printed "Aspect tests passed!". aspect: - @echo "Running aspect tests..." - # TODO: Replace with your aspect test command. Examples: - # bash tests/aspect_tests.sh # Shell-based aspect tests - # cargo test --test aspects # Rust aspect tests - # Aspect tests validate architectural invariants: - # - Thread safety (mutex in FFI modules) - # - ABI/FFI contract (declarations match exports) - # - SPDX compliance (all files have license headers) - # - No dangerous patterns (believe_me, assert_total, etc.) - @echo "Aspect tests passed!" + bash tests/aspect_tests.sh # Run benchmarks (performance regression detection) bench: diff --git a/README.adoc b/README.adoc index 1e1d3a0..8072a51 100644 --- a/README.adoc +++ b/README.adoc @@ -162,7 +162,9 @@ The grade-level cancellation boundary (left-cancellative iff ε on the unquotiented carrier) is proved in Lean; Agda proves finite-fidelity cancellation and selected non-cancellation counterexamples, not the exhaustive iff. `docs/status/PROOF-STATUS.adoc` and -`verification/pwg.json` are the per-result record, and they agree row for row. +`verification/pwg.json` are the per-result record. `scripts/pwg-check.sh` checks that the +grade table and census published in the first are the ones derived from the second; the +prose rows of the status file are written by hand and are not checked against the ledger. Only *L1* and *L4* carry a statement in all three, and of the ten results *eight* lack one entirely. Lean does not state L2, L5, Honest Generation or Veridicality; Idris2 does not state L3, L6, conicality or the cancellation boundary; L5 is diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index 8c3a8b9..b3a316e 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -56,8 +56,8 @@ toc::[] | Idris2 `Trope.Soundness.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`; Agda `TB.Order.{fateDroppedLtePredicated,fatePredicatedNotLteDropped}`. | Veridicality Derivation -| Exactly three deceptive duals, one per coordinate kind (`Falsified`, `Misbound`, `Conflated`), each the unique deceptive inhabitant of its coordinate. -| Idris2 `Trope.Veridicality.{fateDeceptiveUnique,bondDeceptiveUnique,mergeDeceptiveUnique,deceptiveDuals}`; Agda `TB.Honest.{fateDeceptiveUnique,bondDeceptiveUnique,mergeDeceptiveUnique,deceptiveDuals}`. +| Exactly three deceptive duals, one per coordinate kind (`Falsified`, `Misbound`, `Conflated`), each the unique deceptive inhabitant of its coordinate. The uniqueness of each is a theorem. "Exactly three" is not stated as one proposition: it follows from the three uniqueness lemmas and the construction of `Grade` as their product. `deceptiveDuals` in both provers is a tuple value, states no proposition, and is not cited as evidence. +| Idris2 `Trope.Veridicality.{fateDeceptiveUnique,bondDeceptiveUnique,mergeDeceptiveUnique}`; Agda `TB.Honest.{fateDeceptiveUnique,bondDeceptiveUnique,mergeDeceptiveUnique}`. | Honest Generation | The five atoms `attenuate`, `predicate`, `drop`, `sever`, `fuse` with stem:[\varepsilon] generate exactly the honest fragment of each coordinate and never produce a deceptive dual; honesty is closed under stem:[\triangleright]. @@ -79,7 +79,7 @@ toc::[] | Tier-2 membership, exhaustive | In the unquotiented model, every honest-but-lossy element is individually witnessed non-cancellative (finite attenuation regains cancellation on A3 normal forms), `Withheld` and `Fused` included; the per-element witnesses feed the iff. -| Lean `TierTwoComplete.lean`: `Bond.withheld_honest_not_cancel`, `Merge.fused_honest_not_cancel`, `Fate.atten_not_cancel`, the `*.leftCancelWitness` family, `Grade.grade_leftCancel_iff`. Agda states six of the per-element witnesses and the positive right-cancellation, all in `TB.Tier`: `unknown-not-cancel`, `total-honest-not-cancel`, `falsified-not-cancel`, `dropped-honest-not-cancel`, `predicated-honest-not-cancel`, `severed-honest-not-cancel`, `Q-cancelʳ`. What Agda does *not* state is the exhaustive step: there is no Agda counterpart of `grade_leftCancel_iff`, and no Agda witness on the merge coordinate, which is why the ledger's Agda token for this row is `OPEN` rather than the row being Lean-only. +| Lean `TierTwoComplete.lean`: `Bond.withheld_honest_not_cancel`, `Merge.fused_honest_not_cancel`, `Fate.atten_not_cancel`, the `*.leftCancelWitness` family (`FateA.leftCancelWitness` on the ratified fate), and the exhaustive iff, `GradeR.gradeR_leftCancel_iff` on the ratified carrier (`Grade.grade_leftCancel_iff` is the same statement over the historical pre-ratification carrier, kept as history). Agda states six of the per-element witnesses and the positive right-cancellation, all in `TB.Tier`: `unknown-not-cancel`, `total-honest-not-cancel`, `falsified-not-cancel`, `dropped-honest-not-cancel`, `predicated-honest-not-cancel`, `severed-honest-not-cancel`, `Q-cancelʳ`. What Agda does *not* state is the exhaustive step: there is no Agda counterpart of `grade_leftCancel_iff`, and no Agda witness on the merge coordinate, which is why the ledger's Agda token for this row is `OPEN` rather than the row being Lean-only. | C3 (partition; tier closure is not a homomorphism) | `Dropped`, `Total`, `Severed`, `Predicated`, `Withheld`, `Fused` are honest non-cancellative elements; `Falsified`, `Misbound`, `Conflated`, `Unknown` are the deceptive ones. `tierOf (g ▷ h) = tierOf g ⊓ tierOf h` is false on fate; tier preservation is closure. @@ -124,7 +124,7 @@ toc::[] | Idris2 `Trope.Soundness.subSound`. | Verdict soundness (corollary) -| stem:[\mathrm{floor}(U) \sqsubseteq g \wedge g \sqsubseteq \rho \Rightarrow \mathrm{floor}(U) \sqsubseteq \rho]. +| stem:[f \sqsubseteq g \wedge g \sqsubseteq \rho \Rightarrow f \sqsubseteq \rho] for a *grade-shaped* floor stem:[f], which is how the source states it. It is not a statement about the use-model floor stem:[\mathrm{floor}(U)]: the shipped checker's floor is a partial per-coordinate demand, a different type decided by a different predicate, and no lemma connects the two (see _Modelling notes_). | Idris2 `Trope.Soundness.verdictSound`. | Grade soundness, β/let core diff --git a/scripts/pwg-check.sh b/scripts/pwg-check.sh index 51cab5d..c6b89aa 100755 --- a/scripts/pwg-check.sh +++ b/scripts/pwg-check.sh @@ -84,7 +84,13 @@ badr=$(jq -r ' (if ($v.result == "pass" or $v.result == "fail") then empty else "\($k): result must be pass|fail (8.2 -- the derivation reads it; an unrecognised value must not be treated as a pass)" end), (if ($v.evidence // "" | length) > 0 then empty else "\($k): no evidence pointer" end), (if ($v.state // "" | test("\\A(current|superseded|regressed)\\z")) then empty else "\($k): state must be current|superseded|regressed (8.4 rule 5)" end), - (if ($v | has("axioms")) then empty else "\($k): no axioms list (8.4 rule 6 — axioms travel with the grade)" end) ] + (if ($v | has("axioms")) then empty else "\($k): no axioms list (8.4 rule 6 — axioms travel with the grade)" end), + (($v.axiom_dispositions // {}) | to_entries[] + | select((.value | IN("c", "b", "debt")) | not) + | "\($k): disposition of \(.key) must be c|b|debt (8.5.1)"), + (($v.axiom_dispositions // {}) | keys[] as $n + | select((($v.axioms // []) | index($n)) == null) + | "\($k): disposition recorded for \($n), which the receipt does not report as an axiom") ] | .[]' "$LEDGER") \ || die "rule 3 (receipt completeness) could not be evaluated over this ledger: malformed theorem/leg/receipt shape" [ -n "$badr" ] && die "incomplete receipt(s):"$'\n'"$badr" diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index 20c50bc..396c61d 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -65,6 +65,28 @@ DERIVE=' | map(select(.state == "current" and .result == "pass" and (.commit | test("\\A[0-9a-f]{40}\\z")))) | length > 0; + # 2.1: every Agda entrypoint in the recorded invocation is the canonical one. + # The invocation may join several commands with ";". Each command that runs + # agda must be exactly: agda, the three flags as whole words, and one module. + # The earlier test searched the whole string for the three flag substrings, + # so one canonical command vouched for a second command that carried none of + # them, and any further option rode along unseen. Measured 2026-11-17: with + # the second entrypoint reduced to "agda Smoke.agda" the census did not move. + def canonical_agda: + [ split(";")[] | [splits("[[:space:]]+")] | map(select(length > 0)) | select(length > 0 and .[0] == "agda") ] + | length > 0 + and all(.[]; + (.[1:] | map(select(startswith("-"))) | sort) == ["--cubical-compatible", "--safe", "--without-K"] + and (.[1:] | map(select(startswith("-") | not)) | length) == 1); + + # 8.4 rule 6 and 8.5.1: a witness whose current receipt reports an axiom + # without disposition c does not count. Dispositions are recorded on the + # receipt as axiom_dispositions {name: c|b|debt}; an axiom with none recorded + # is not admissible (fail closed). A receipt reporting no axiom is admissible. + def axioms_admissible($rs): $rs + | map(select(.state == "current")) + | all(.[]; . as $r | all(($r.axioms // [])[]; ($r.axiom_dispositions // {})[.] == "c")); + # 8.2 PWG-3 additionally requires the receipt to record the checker version, # the standard-library pin, the flags actually in force, and the import cone (1.1). def pwg3_receipt($rs): $rs @@ -75,9 +97,7 @@ DERIVE=' and (.checker_version // "" | length > 0) and (.stdlib_pin // "" | length > 0) and (.import_cone // "" | length > 0) - and (.invocation // "" | test("--safe")) - and (.invocation // "" | test("--without-K")) - and (.invocation // "" | test("--cubical-compatible")) + and (.invocation // "" | canonical_agda) )) | length > 0; @@ -90,7 +110,20 @@ DERIVE=' ($leg.token | accepted) and $leg.state == "RECONCILED" and ($leg.route != "waived" and $leg.route != "unavailable") - and usable_receipt([$leg.receipts[] | $receipts[.]]); + and usable_receipt([$leg.receipts[] | $receipts[.]]) + and axioms_admissible([$leg.receipts[] | $receipts[.]]); + + # 8.3: the tag needs a kernel-checked witness whose statement correspondence + # is recorded as in 2.2. A witness is {token, state, receipts}; it earns the + # tag on the same terms a leg counts. The earlier test was "the field is not + # null", so any value at all -- a note, a plan -- published the tag. + def diverse($w; $receipts): + ($w | type) == "object" + and (($w.token // "") | accepted) + and $w.state == "RECONCILED" + and (($w.receipts // []) | length > 0) + and usable_receipt([$w.receipts[] | $receipts[.]]) + and axioms_admissible([$w.receipts[] | $receipts[.]]); # 8.2 PWG-1 / 8.5.2: a receipt DESCRIBES the source commit when its commit is # the source commit of the ledger. (8.5.2 also admits an echo chain to it; this @@ -109,7 +142,7 @@ DERIVE=' | ($t.legs.rocq) as $c | ($t.legs.lean) as $l | ([$a.receipts[] | $R[.]]) as $ar - | (($a.token | accepted) and $a.state == "AGDA-VERIFIED" and pwg3_receipt($ar)) as $agda_ok + | (($a.token | accepted) and $a.state == "AGDA-VERIFIED" and pwg3_receipt($ar) and axioms_admissible($ar)) as $agda_ok | (if counts($c; $R) then 1 else 0 end) as $nc | (if counts($l; $R) then 1 else 0 end) as $nl | ($nc + $nl) as $legs @@ -135,10 +168,15 @@ DERIVE=' kind: $t.kind, pwg: $grade, # 8.3: a non-DTT witness is a TAG beside the grade, never a leg. - foundation_diverse: (($t.foundation_diverse_witness // null) != null), + foundation_diverse: diverse($t.foundation_diverse_witness // null; $R), counting_legs: $legs, agda_receipt_complete: $agda_ok, - axioms: ([ $ar[]? | .axioms[]? ] | unique), + # 8.4 rule 6: the axioms of EVERY witness the grade stands on, not of the + # Agda leg alone. A counting Rocq or Lean leg used to contribute its + # count and none of its axioms. + axioms: ([ ($ar[]? | .axioms[]?), + (if counts($c; $R) then ($c.receipts[] | $R[.] | .axioms[]?) else empty end), + (if counts($l; $R) then ($l.receipts[] | $R[.] | .axioms[]?) else empty end) ] | unique), legs: { agda: {route: $a.route, token: $a.token, state: $a.state, counts: (counts($a; $R))}, rocq: {route: $c.route, token: $c.token, state: $c.state, counts: (counts($c; $R))}, diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 4d7597f..77cd470 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -282,6 +282,16 @@ pwg_canaries() { pwg_case reject "a witness with a tab-joined suffix does not resolve" \ '(.theorems[] | select(.id == "L1") | .legs.agda.declarations) |= map(. + "\tjunk")' \ "resolve to no declaration" + + # 8.5.1: a disposition is c, b or debt. The derivation treats anything but c + # as inadmissible, so a typo would silently stop a leg counting; the gate must + # name it instead. Both FAIL against the gate before these checks existed. + pwg_case reject "an axiom disposition outside c|b|debt is rejected" \ + '.receipts["lean-boundary-c0eb4f1"].axiom_dispositions = {"propext": "C"}' \ + "must be c|b|debt" + pwg_case reject "a disposition for an axiom the receipt does not report is rejected" \ + '.receipts["lean-boundary-c0eb4f1"].axiom_dispositions = {"funext": "c"}' \ + "does not report as an axiom" } # --- the top of the ladder: PWG-2ii and PWG-1 are different rungs ---------- @@ -295,8 +305,9 @@ derive_case() { local want="$1" label="$2" commit="$3" d got d=$(scratch) if ! jq -cS --arg c "$commit" ' - .receipts["rocq-canary"] = (.receipts["lean-boundary-c0eb4f1"] + {commit: $c}) - | .receipts["lean-boundary-c0eb4f1"].commit = $c + (.receipts["lean-boundary-c0eb4f1"] + |= (. + {commit: $c, axiom_dispositions: (.axioms | map({key: ., value: "c"}) | from_entries)})) + | .receipts["rocq-canary"] = .receipts["lean-boundary-c0eb4f1"] | (.theorems[] | select(.id == "L1") | .legs) |= (.lean.state = "RECONCILED" | .rocq = {declarations: [], receipts: ["rocq-canary"], route: "re-proved", state: "RECONCILED", token: "PROVEN"})' \ @@ -315,6 +326,48 @@ ladder_canaries() { "$(printf '%040d' 0 | tr 0 f)" } +# --- what a grade stands on: axioms, the invocation, the diversity tag ------ +# Each canary edits the live ledger and reads one DERIVED field of L1. Measured +# 2026-11-17 against the pre-fix derivation: a leg reporting axioms with no +# recorded disposition counted (PWG-1); the derived axiom list was the Agda +# list alone; a second entrypoint with no flags, and an extra option, both kept +# PWG-3; and any non-null value published +foundation-diverse. The five +# non-control canaries FAIL against it. +field_case() { + # $1 = expected JSON value, $2 = label, $3 = jq edit of the ledger, $4 = jq read of the L1 row + local want="$1" label="$2" edit="$3" read="$4" d got + d=$(scratch) + if ! jq -cS "$edit" "$ROOT/verification/pwg.json" > "$d/pwg.json" 2>/dev/null; then + rm -rf "$d"; bad "$label (the canary's OWN jq transform failed)"; return + fi + got=$(bash "$ROOT/scripts/pwg-derive.sh" --ledger "$d/pwg.json" --json 2>/dev/null | jq -c ".[] | select(.id == \"L1\") | $read") + rm -rf "$d" + if [ "$got" = "$want" ]; then ok "$label"; else bad "$label (derived $got, expected $want)"; fi +} +standing_canaries() { + local both disp + # Both recheck legs of L1 made to count, receipts on the source commit. + both='(.theorems[] | select(.id == "L1") | .legs) |= + (.lean.state = "RECONCILED" + | .rocq = {declarations: [], receipts: ["lean-boundary-c0eb4f1"], route: "re-proved", state: "RECONCILED", token: "PROVEN-WITH-AXIOMS"}) + | .receipts["lean-boundary-c0eb4f1"].commit = .commit' + disp='.receipts["lean-boundary-c0eb4f1"] |= (. + {axiom_dispositions: (.axioms | map({key: ., value: "c"}) | from_entries)})' + field_case '"3"' "a leg whose receipt reports axioms with no disposition does not count" \ + "$both" '.pwg' + field_case '"3"' "a leg whose receipt reports an axiom of disposition debt does not count" \ + "$both | $disp | .receipts[\"lean-boundary-c0eb4f1\"].axiom_dispositions[\"Classical.choice\"] = \"debt\"" '.pwg' + field_case '["Classical.choice","Quot.sound","propext"]' "the derived axioms include those of every counting leg" \ + "$both | $disp" '.axioms' + field_case '"ungraded"' "an Agda entrypoint without the canonical flags ungrades the row" \ + '.receipts["agda-c0eb4f1"].invocation = "agda --safe --without-K --cubical-compatible All.agda ; agda Smoke.agda"' '.pwg' + field_case '"ungraded"' "an Agda entrypoint carrying an option outside the canonical three ungrades the row" \ + '.receipts["agda-c0eb4f1"].invocation = "agda --safe --without-K --cubical-compatible --allow-unsolved-metas All.agda"' '.pwg' + field_case 'false' "a foundation-diverse field that is not a checked witness earns no tag" \ + '(.theorems[] | select(.id == "L1")).foundation_diverse_witness = "Isabelle/HOL, planned"' '.foundation_diverse' + field_case 'true' "a reconciled, receipted non-DTT witness earns the tag (control)" \ + '(.theorems[] | select(.id == "L1")).foundation_diverse_witness = {token: "PROVEN", state: "RECONCILED", receipts: ["agda-c0eb4f1"]}' '.foundation_diverse' +} + # --- the comment stripper every dangerous-construct gate reads through ------ # Lean /- -/, Agda/Idris2 {- -} and Coq (* *) block comments NEST. Measured # 2026-11-16 against the pre-fix stripper: a forbidden word inside a nested @@ -341,6 +394,47 @@ strip_canaries() { rm -rf "$d" } +# --- the aspect lane (`just aspect`, tests/aspect_tests.sh) -------------------- +# Measured 2026-11-17 against the pre-fix tree: the Idris2 scan read +# src/interface/Abi/ only and dropped every hit containing "test", so a banned +# construct in src/idris2/Checker/ passed; a tree with no Idris2 at all passed; +# and the `aspect` recipe ran nothing and printed a pass. All three canaries +# FAIL against the pre-fix tree. The fixture word is assembled at runtime. +aspect_case() { + # $1 = scratch root already holding src/; copies the scan in and runs it. + mkdir -p "$1/tests/lib" + cp "$ROOT/tests/aspect_tests.sh" "$1/tests/" + cp "$ROOT/tests/lib/strip-proof-comments.awk" "$1/tests/lib/" + bash "$1/tests/aspect_tests.sh" >/dev/null 2>&1 +} +aspect_canaries() { + local d w body + w="believe""_me" + d=$(scratch); mkdir -p "$d/src/idris2/Checker" + printf -- '-- SPDX-License-Identifier: MPL-2.0\nmodule Checker.Selftest\nbad : a -> b\nbad = %s\n' "$w" > "$d/src/idris2/Checker/Selftest.idr" + if aspect_case "$d"; then + bad "a banned Idris2 construct outside src/interface/Abi, in a path containing 'test', passes the aspect scan" + else + ok "a banned Idris2 construct in any Idris2 source fails the aspect scan" + fi + rm -rf "$d" + d=$(scratch); mkdir -p "$d/src" + if aspect_case "$d"; then + bad "an aspect scan that read no Idris2 file reported a pass" + else + ok "an aspect scan that finds no Idris2 file fails" + fi + rm -rf "$d" + # The recipe body: every line after `aspect:` up to the next blank line. + body=$(awk '/^aspect:/{on=1; next} on && /^$/{exit} on' "$ROOT/Justfile") + if printf '%s\n' "$body" | grep -q 'tests/aspect_tests\.sh' \ + && ! printf '%s\n' "$body" | grep -qi 'echo.*passed'; then + ok "the aspect recipe runs the scan and prints no unconditional pass" + else + bad "the aspect recipe does not run tests/aspect_tests.sh, or prints a pass it did not earn" + fi +} + # --- META (R10 applied to R10): the suite must detect breakage in ITS OWN fixtures. # A canary whose jq program is broken writes an empty ledger; the gate then rejects # it for being invalid JSON rather than for the planted drift, and the canary passes @@ -367,12 +461,13 @@ meta_canary() { wellknown_canaries; valid_canary; live_canary c_weak_crypto; c_plaintext_http; c_secret -pwg_canaries; ladder_canaries; strip_canaries +pwg_canaries; ladder_canaries; standing_canaries; strip_canaries +aspect_canaries meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=31 +EXPECTED_CASES=43 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 diff --git a/tests/aspect_tests.sh b/tests/aspect_tests.sh index 47cb0c3..b4ddd24 100755 --- a/tests/aspect_tests.sh +++ b/tests/aspect_tests.sh @@ -68,12 +68,41 @@ fi bold "Aspect 2: Dangerous patterns" # Idris2 dangerous patterns -DANGEROUS_IDRIS=$(grep -rn 'believe_me\|assert_total\|really_believe_me' src/interface/Abi/ 2>/dev/null | grep -v "^Binary" | grep -v "test" || true) -if [ -n "$DANGEROUS_IDRIS" ]; then +# +# Every Idris2 source under src/ and verification/, with comments stripped. +# The previous form scanned src/interface/Abi/ only (3 of the 16 files) and +# piped the matches through `grep -v "test"`, which dropped any hit whose PATH +# or text contained "test". Both made the scan pass on code it never read. +# A scan that finds no Idris2 file at all fails: nothing read, nothing passes. +IDRIS_STRIP_LOG="${TMPDIR:-/tmp}/aspect-idris-strip-failed.$$" +IDRIS_COUNT_LOG="${TMPDIR:-/tmp}/aspect-idris-count.$$" +: > "$IDRIS_COUNT_LOG" +DANGEROUS_IDRIS=$( + while IFS= read -r f; do + printf '%s\n' "$f" >> "$IDRIS_COUNT_LOG" + if ! stripped=$(awk -f tests/lib/strip-proof-comments.awk "$f"); then + printf '%s\n' "$f" >> "$IDRIS_STRIP_LOG" + continue + fi + printf '%s\n' "$stripped" \ + | grep -nE '\b(believe_me|really_believe_me|assert_total|assert_smaller|unsafePerformIO|idris_crash)\b|^[[:space:]]*postulate\b' \ + | sed "s|^|$f:|" || true + done < <(find src verification -type f -name '*.idr' 2>/dev/null | sort || true) +) +IDRIS_FILES=$(wc -l < "$IDRIS_COUNT_LOG" | tr -d ' ') +rm -f "$IDRIS_COUNT_LOG" +if [ -f "$IDRIS_STRIP_LOG" ]; then + fail "Comment stripper could not scan these Idris2 files (truncated input, not a clean scan):" + head -5 "$IDRIS_STRIP_LOG" + rm -f "$IDRIS_STRIP_LOG" +fi +if [ "$IDRIS_FILES" -eq 0 ]; then + fail "No Idris2 source found under src/ or verification/: nothing was scanned" +elif [ -n "$DANGEROUS_IDRIS" ]; then fail "Dangerous Idris2 patterns found:" echo "$DANGEROUS_IDRIS" | head -5 else - pass "No dangerous Idris2 patterns (believe_me, assert_total)" + pass "No dangerous Idris2 patterns in $IDRIS_FILES file(s) (believe_me, assert_total, assert_smaller, unsafePerformIO, idris_crash, postulate)" fi # Coq/Lean dangerous patterns diff --git a/verification/proofs/lean4/grade-factorisation/README.adoc b/verification/proofs/lean4/grade-factorisation/README.adoc index 0d8c94a..9c12cda 100644 --- a/verification/proofs/lean4/grade-factorisation/README.adoc +++ b/verification/proofs/lean4/grade-factorisation/README.adoc @@ -12,9 +12,14 @@ sharing that build through a symlinked `.lake/packages`. == Verdict -*(B) FACTORS but VERIDICALITY-BLIND.* A nontrivial monoid homomorphism `π : Grade → Δ` -onto the commutative fidelity carrier exists, but *every* such map is forced to identify -the honest `dropped` with the deceptive `falsified`. Tropical captures the *fidelity* +*(B) FACTORS but VERIDICALITY-BLIND, on the pre-ratification carrier.* A nontrivial +monoid homomorphism `π : Grade → Δ` onto the commutative fidelity carrier exists, but on +that carrier *every* such map is forced to identify the honest `dropped` with the +deceptive `falsified` (`forced_collapse_general`, stated over the pre-ratification +`Fate.comp`). On the *ratified* carrier (ADR 0004, R-2026-07-07) this no longer holds: +`GradeFactorisationR.lean` exhibits a homomorphism that separates them (`phiR_sighted`, +`piR_sighted`), verdict *(B′) FACTORS AND VERIDICALITY-SIGHTED*. The rest of this +paragraph describes the pre-ratification result. Tropical captures the *fidelity* sub-grade only; specifically the *fate-axis* honest/deceptive distinction needs separate, non-tropical handling, while the commutative `Bond`/`Merge` deceptions stay tropically separable. The blindness is co-located exactly with the non-commutativity. See @@ -32,6 +37,10 @@ addressed; that stays parked behind an operational model (CO-1). See the firelin (D2), nontriviality (D3), the forced-collapse impossibility (D4), complement/F2 confinement (D5), falsifier harness (D6), and an axiom audit. +| `GradeFactorisationR.lean` | The re-run on the ratified carrier (R-2026-07-07): the + sighted homomorphism (`phiR_sighted`, `piR_sighted`) and + the naive-candidate breaker (`phiId_not_hom`). Built and + asserted by `just falsify`. | `REPORT.adoc` | The three-way verdict, witnesses, and the necessary-not- sufficient guard verbatim. | `justfile` | `just build`, `just falsify`, `just axioms`, `just verdict`. diff --git a/verification/proofs/lean4/grade-factorisation/REPORT.adoc b/verification/proofs/lean4/grade-factorisation/REPORT.adoc index a736be5..0e0b91e 100644 --- a/verification/proofs/lean4/grade-factorisation/REPORT.adoc +++ b/verification/proofs/lean4/grade-factorisation/REPORT.adoc @@ -327,9 +327,14 @@ exactly what was impossible for the fate axis before. === Axiom audit -All re-run theorems depend on at most `propext`, `Classical.choice`, -`Quot.sound` — no `sorryAx`, no user axiom, no `native`-evaluator `decide` -bypass. `just falsify` additionally asserts `piR_sighted` and `phiId_not_hom` +All re-run theorems depend on at most `propext` and `Quot.sound` — no +`sorryAx`, no `Classical.choice`, no user axiom, no `native`-evaluator `decide` +bypass. This is the same bound as the audit above, and it is measured: the CI +axiom audit over both modules of this package reported exactly `propext` and +`Quot.sound` across 184 declarations (trope-checker run 43981767344, commit +`7b71c31`). The allowlist that audit enforces also admits `Classical.choice`, +because it is shared with `grade-boundary`, where three theorems use it; an +earlier version of this paragraph quoted the allowlist as if it were the result. `just falsify` additionally asserts `piR_sighted` and `phiId_not_hom` are live verified theorems. === Reproduction From cb819616cdf1a3aefa65276c4535e9045a696648 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 11:49:33 +0000 Subject: [PATCH 18/22] ci(hypatia): move the scan workflow pin to a revision that runs on OTP 27 The Hypatia scan segfaults on this tree (exit 139, run 44021788038, both attempts). The scanner is not at fault. The pinned reusable workflow (standards 857ff09) installs Erlang/OTP 28.3, and OTP 28.x faults in the VM's garbage collector (sweep_off_heap, beam/erl_gc.c:3130) on some trees. Standards already records this (hypatia#1061) and moved the workflow to OTP 27.3.4.19. Reproduced outside CI with the scanner at adb2f41 on this tree: OTP 28.3.3 crashed 6 of 6 runs; OTP 27.3.4.19 passed 6 of 6 and reported 10 medium findings. A parent commit (829cae4) does not crash on 28.3.3, and neither does this tree with any one of three unrelated files removed, so the trigger is heap layout and not a particular file. Both callers move to standards 58362c2. Between the two revisions the reusable workflow adds optional inputs only; the inputs passed here are unchanged, including hypatia-ref. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .github/workflows/fork-governance.yml | 2 +- .github/workflows/hypatia-scan.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fork-governance.yml b/.github/workflows/fork-governance.yml index 22c1d75..c25b86d 100644 --- a/.github/workflows/fork-governance.yml +++ b/.github/workflows/fork-governance.yml @@ -88,7 +88,7 @@ jobs: # orange fleet rows, never as a missing lane. needs: [fleet] if: ${{ always() }} - uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@857ff096af11451841fb10488fed1438523973a1 + uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@58362c24cf225694b388fc660b3525d8207b7c61 permissions: actions: read contents: read diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index e58b89e..3495e3e 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -50,7 +50,7 @@ jobs: actions: read contents: read security-events: write - uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@857ff096af11451841fb10488fed1438523973a1 + uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@58362c24cf225694b388fc660b3525d8207b7c61 secrets: # Same declared-secret shape as the PR lane: without it the alert # meta-rules fall back to the built-in token, which cannot read From a9e3edb2eb06ff7bb6c69cbd29e24f6fa324a6be Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 12:08:56 +0000 Subject: [PATCH 19/22] fix(gates): eight defects from review of #120 Idris2 scans read comments by Idris2 rules. The stripper applied every block-comment form to every file, so an Idris2 documentation line carrying a Coq open token hid a banned construct until a later close token, and a documentation line that only named one failed the gate. It now takes -v lang=idris; the aspect scan and the Idris2 step of trope-check.yml pass it. Grade derivation: an agda command behind a wrapper is refused, where it was dropped from the canonical-invocation test; the foundation-diverse tag needs receipts whose checker is outside the DTT family (8.3). No published grade moves. Two canaries passed for the wrong reason. The Lean-reconciliation canary was rejected on a table cell, not a grade: its fixture now records axiom dispositions and a control reads the derived grade. The nested-comment canary counted a failing stripper as a clean strip. Recheck legs: the Rocq inventory now takes every statement keyword behind locality words and attributes (a Local Lemma left Admitted was not audited), with a seventh planted control; each mode compiles, audits and checksums one snapshot. Run locally on Coq 8.18.0 and Lean 4.16.0: both legs 49 of 49, 7 controls caught, and the new control is not caught by the previous inventory. Canaries 48/48; the four new non-control canaries fail against the previous code. Not changed: whether the core-Lean legs count (deferred to the owner). Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- .github/workflows/proofs.yml | 2 +- .github/workflows/trope-check.yml | 2 +- CHANGELOG.adoc | 42 +++++++++++++++++++++++++++-- scripts/check-recheck-legs.sh | 31 ++++++++++++++------- scripts/pwg-derive.sh | 20 ++++++++++++-- scripts/test-gate-falsifiability.sh | 42 +++++++++++++++++++++++++---- tests/aspect_tests.sh | 2 +- tests/lib/strip-proof-comments.awk | 19 +++++++++---- 8 files changed, 134 insertions(+), 26 deletions(-) diff --git a/.github/workflows/proofs.yml b/.github/workflows/proofs.yml index fe9cff4..41920d3 100644 --- a/.github/workflows/proofs.yml +++ b/.github/workflows/proofs.yml @@ -215,7 +215,7 @@ jobs: # (PROOF-POLICY §2: "No Mathlib, in Lean or elsewhere"). The gate is # scripts/check-recheck-legs.sh, which runs the same way locally: pinned # prover version asserted, compile, an axiom audit that fails on any axiom - # AND on an empty audit domain, then six planted controls that must each be + # AND on an empty audit domain, then seven planted controls that must each be # caught (Admitted, sorry, a user axiom, an empty domain, and a definition # drift that only the TB.Bridge tables can see). # TOOLCHAIN: Ubuntu 24.04's coq package is Coq 8.18.0 (the version mathesis diff --git a/.github/workflows/trope-check.yml b/.github/workflows/trope-check.yml index 9a4beb3..b2de2cb 100644 --- a/.github/workflows/trope-check.yml +++ b/.github/workflows/trope-check.yml @@ -77,7 +77,7 @@ jobs: fail=0 for f in $(git ls-files 'verification/proofs/idris2/*.idr' 'verification/proofs/idris2/*/*.idr' \ 'src/idris2/*.idr' 'src/idris2/*/*.idr' 'src/interface/*/*.idr'); do - stripped=$(awk -f tests/lib/strip-proof-comments.awk "$f") + stripped=$(awk -v lang=idris -f tests/lib/strip-proof-comments.awk "$f") if grep -nE '\b(believe_me|really_believe_me|assert_total|assert_smaller|assert_equal|postulate)\b|%default[[:space:]]+partial' <<<"$stripped"; then echo "::error file=$f::unsound Idris2 construct"; fail=1 fi diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 450a3c3..4d5ca6b 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -41,6 +41,44 @@ If it may not, the seven rows derive `+PWG-2i+`. ==== Fixed +* *Eight gate defects from review of #120, and the Hypatia scan pin (2026-11-17).* ++ +_Idris2 comment rules._ The comment stripper read Idris2 files with every +language's block forms at once. An Idris2 documentation line carrying `+(*+` +opened a Coq comment that hid a banned construct until a later `+*)+`, and the +scan passed; a documentation line that only named a banned construct failed. +The stripper takes `+-v lang=idris+` (`+{- -}+`, `+--+` and `+|||+` only), and the +aspect scan and the Idris2 step of `+trope-check.yml+` pass it. Without the +variable its behaviour is unchanged. ++ +_Grade derivation._ No published grade moves. An `+agda+` command behind a +wrapper (`+env agda …+`) was dropped from the canonical-invocation test and is now +refused. `+foundation-diverse+` now also requires every receipt of the witness to +name a checker outside the dependent-type-theory family (§8.3); a reconciled +Agda receipt used to earn it. ++ +_Canaries that passed for the wrong reason._ The Lean-reconciliation canary +was rejected on a changed table cell, not a changed grade, because the flipped +leg had no axiom dispositions and did not count; its fixture now records them, +and a control reads the derived grade (`+2i+`). The nested-comment canary treated +a stripper that failed as one that stripped. ++ +_Recheck legs_ (`+scripts/check-recheck-legs.sh+`). The Rocq inventory knew only +a bare `+Theorem+` or `+Lemma+`, so `+Local Lemma x : False. Admitted.+` was not +audited; it now takes every statement keyword behind locality words and +attributes, with a seventh planted control. Each mode compiles, audits and +checksums one snapshot of the source. Run here on Coq 8.18.0 and Lean 4.16.0: +both legs 49 of 49, 7 controls caught; the new control is not caught by the +previous inventory. ++ +_Hypatia scan._ The scan segfaulted on this tree. The cause is the Erlang VM +on OTP 28.x (`+sweep_off_heap+`, hypatia#1061), which the pinned revision of the +reusable workflow installed. Both callers move to a revision that installs OTP +27.3.4.19. ++ +Five new canaries; the four that are not controls fail against the code before +them. The suite stands at *48/48*. + * *The aspect lane runs, grades stand only on what the policy admits, and four status claims are narrowed (2026-11-17).* + @@ -66,8 +104,8 @@ canonical command used to vouch for a second with no flags. (d) `+foundation-diverse+` needs an accepted, `+RECONCILED+`, receipted witness, where any non-null value used to publish it (§8.3). `+scripts/pwg-check.sh+` rejects a disposition outside `+c|b|debt+` and one for an axiom the receipt does not report. -Canaries 35–43; each fails against the code before it. The suite stands at -*43/43*. +Canaries 35–43; each fails against the code before it. The suite stood at +*43/43* at that point (48/48 after the entry above). + _Status claims._ `+deceptiveDuals+` is a tuple value and is no longer cited as evidence for "exactly three". `+verdictSound+` is stated over a grade-shaped floor, diff --git a/scripts/check-recheck-legs.sh b/scripts/check-recheck-legs.sh index bf1f14e..5bac7db 100755 --- a/scripts/check-recheck-legs.sh +++ b/scripts/check-recheck-legs.sh @@ -56,7 +56,11 @@ need_lean() { rocq_audit() { local src="$1" dir base names expect got out rc dir="$(mktemp -d)"; base="AuditRatifiedOrder" - names="$(sed -n -E "s/^[[:space:]]*(Theorem|Lemma)[[:space:]]+([A-Za-z_][A-Za-z0-9_']*).*/\2/p" "$src")" + # Every statement keyword Coq 8.18 has, behind any run of locality words or + # #[...] attributes. The earlier pattern knew only a bare Theorem or Lemma, + # so "Local Lemma x : False. Admitted." was left out of the inventory and the + # audit passed on the declarations it did list. + names="$(sed -n -E "s/^[[:space:]]*((Local|Global|Program|#\[[^]]*\])[[:space:]]+)*(Theorem|Lemma|Corollary|Proposition|Fact|Remark|Property)[[:space:]]+([A-Za-z_][A-Za-z0-9_']*).*/\4/p" "$src")" expect="$(grep -c . <<<"$names" || true)" if [ "$expect" -eq 0 ]; then echo "rocq audit: no Theorem or Lemma declared (empty domain)"; rm -rf "$dir"; return 1; fi { cat "$src"; echo; while IFS= read -r n; do echo "Print Assumptions $n."; done <<<"$names"; } >"$dir/$base.v" @@ -117,18 +121,24 @@ case "$MODE" in rocq) need_rocq echo "=== Rocq recheck leg: $ROCQ_FILE ($(coqc --version | head -1)) ===" - dir="$(mktemp -d)"; cp "$ROCQ_FILE" "$dir/" - ( cd "$dir" && coqc "$(basename "$ROCQ_FILE")" ) || { rm -rf "$dir"; fail "coqc rejects $ROCQ_FILE"; } - rm -rf "$dir" - rocq_audit "$ROCQ_FILE" || fail "Rocq axiom audit" - echo "sha256 $(sha256sum "$ROCQ_FILE" | cut -d' ' -f1) $ROCQ_FILE" + # One snapshot: the compile, the audit and the checksum all read it, so the + # checksum printed beside PASS is of the bytes that were checked even if the + # working file is saved meanwhile. + dir="$(mktemp -d)"; trap 'rm -rf "$dir"' EXIT + snap="$dir/$(basename "$ROCQ_FILE")"; cp "$ROCQ_FILE" "$snap" + ( cd "$dir" && coqc "$(basename "$ROCQ_FILE")" ) || fail "coqc rejects $ROCQ_FILE" + rocq_audit "$snap" || fail "Rocq axiom audit" + echo "sha256 $(sha256sum "$snap" | cut -d' ' -f1) $ROCQ_FILE" echo "PASS: Rocq recheck leg" ;; lean) need_lean echo "=== Lean recheck leg: $LEAN_FILE ($(lean --version | head -1)) ===" - lean_check "$LEAN_FILE" || fail "Lean check or axiom audit" - echo "sha256 $(sha256sum "$LEAN_FILE" | cut -d' ' -f1) $LEAN_FILE" + # One snapshot, as for Rocq above. + dir="$(mktemp -d)"; trap 'rm -rf "$dir"' EXIT + snap="$dir/$(basename "$LEAN_FILE")"; cp "$LEAN_FILE" "$snap" + lean_check "$snap" || fail "Lean check or axiom audit" + echo "sha256 $(sha256sum "$snap" | cut -d' ' -f1) $LEAN_FILE" echo "PASS: Lean recheck leg" ;; controls) @@ -144,6 +154,9 @@ case "$MODE" in sed '0,/^Proof\. intros \[\]; reflexivity\. Qed\./s//Proof. Admitted./' "$ROCQ_FILE" >"$t/A.v" grep -q 'Admitted\.' "$t/A.v" || fail "control setup: no Admitted planted" expect_fail "Rocq Admitted proof" rocq_audit "$t/A.v" + # Rocq: an Admitted declaration behind a locality word must be inventoried. + { cat "$ROCQ_FILE"; printf '\nLocal Lemma planted_hidden : False. Admitted.\n'; } >"$t/L.v" + expect_fail "Rocq Local Lemma left Admitted" rocq_audit "$t/L.v" # Rocq: a one-clause drift in a restated definition. withheld ▷b intact # = intact keeps every restated theorem TRUE (▷b stays monotone), so only # the bridge can see it; the failure must be at bridge_bcomp. @@ -172,7 +185,7 @@ case "$MODE" in printf 'def onlyADef : Nat := 1\n' >"$t/E.lean" expect_fail "Lean empty audit domain" lean_check "$t/E.lean" [ "$bad" -eq 0 ] || fail "a planted defect was not caught" - echo "PASS: every planted defect was caught (6 controls)" + echo "PASS: every planted defect was caught (7 controls)" ;; *) echo "usage: $(basename "$0") rocq|lean|controls" >&2; exit 2 ;; esac diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index 396c61d..0e932e5 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -72,11 +72,20 @@ DERIVE=' # so one canonical command vouched for a second command that carried none of # them, and any further option rode along unseen. Measured 2026-11-17: with # the second entrypoint reduced to "agda Smoke.agda" the census did not move. + # + # A command is an Agda command when ANY of its words is agda or a path ending + # in /agda, and such a command must begin with the bare word agda. The earlier + # filter kept only commands whose first word was agda, so a wrapped entrypoint + # ("env agda Smoke.agda", "nice agda ...", "x && agda ...") was dropped from + # the test and rode along behind one canonical command. A wrapper is refused, + # not inspected: the canonical form in 2.1 has none. def canonical_agda: - [ split(";")[] | [splits("[[:space:]]+")] | map(select(length > 0)) | select(length > 0 and .[0] == "agda") ] + [ split(";")[] | [splits("[[:space:]]+")] | map(select(length > 0)) + | select(any(.[]; test("(\\A|/)agda\\z"))) ] | length > 0 and all(.[]; - (.[1:] | map(select(startswith("-"))) | sort) == ["--cubical-compatible", "--safe", "--without-K"] + .[0] == "agda" + and (.[1:] | map(select(startswith("-"))) | sort) == ["--cubical-compatible", "--safe", "--without-K"] and (.[1:] | map(select(startswith("-") | not)) | length) == 1); # 8.4 rule 6 and 8.5.1: a witness whose current receipt reports an axiom @@ -117,11 +126,18 @@ DERIVE=' # is recorded as in 2.2. A witness is {token, state, receipts}; it earns the # tag on the same terms a leg counts. The earlier test was "the field is not # null", so any value at all -- a note, a plan -- published the tag. + # + # 8.3 also says what the witness is a witness IN: a foundation outside the + # dependent-type-theory family, which it names as Agda, Rocq and Lean. Every + # receipt of the witness must therefore name a checker, and none may be one of + # those three. Without this a reconciled Agda receipt earned the tag. + def dtt_checker: ascii_downcase | test("\\A(agda|lean|lean4|lake|coq|coqc|rocq)\\z"); def diverse($w; $receipts): ($w | type) == "object" and (($w.token // "") | accepted) and $w.state == "RECONCILED" and (($w.receipts // []) | length > 0) + and all($w.receipts[] | $receipts[.]; ((.checker // "") | length > 0) and ((.checker // "") | dtt_checker | not)) and usable_receipt([$w.receipts[] | $receipts[.]]) and axioms_admissible([$w.receipts[] | $receipts[.]]); diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 77cd470..5df0d1a 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -232,7 +232,8 @@ pwg_canaries() { # and it starts to count, lifting that obligation to PWG-2i. The published # table must stop matching. pwg_case reject "flipping a Lean leg to RECONCILED changes the grade and is rejected" \ - '(.theorems[] | select(.id == "L1") | .legs.lean.state) |= "RECONCILED"' \ + '(.theorems[] | select(.id == "L1") | .legs.lean.state) |= "RECONCILED" + | .receipts["lean-boundary-c0eb4f1"] |= (. + {axiom_dispositions: (.axioms | map({key: ., value: "c"}) | from_entries)})' \ "not the derived one" # R11. A grade may not outlive the run that earned it. Measured against main # 0dceab6 these two PASSED the gate: the derivation read .state but never @@ -364,8 +365,15 @@ standing_canaries() { '.receipts["agda-c0eb4f1"].invocation = "agda --safe --without-K --cubical-compatible --allow-unsolved-metas All.agda"' '.pwg' field_case 'false' "a foundation-diverse field that is not a checked witness earns no tag" \ '(.theorems[] | select(.id == "L1")).foundation_diverse_witness = "Isabelle/HOL, planned"' '.foundation_diverse' - field_case 'true' "a reconciled, receipted non-DTT witness earns the tag (control)" \ + field_case 'false' "a reconciled, receipted witness checked by a DTT prover earns no tag" \ '(.theorems[] | select(.id == "L1")).foundation_diverse_witness = {token: "PROVEN", state: "RECONCILED", receipts: ["agda-c0eb4f1"]}' '.foundation_diverse' + field_case 'true' "a reconciled, receipted non-DTT witness earns the tag (control)" \ + '.receipts["isabelle-fixture"] = (.receipts["agda-c0eb4f1"] + {checker: "isabelle"}) + | (.theorems[] | select(.id == "L1")).foundation_diverse_witness = {token: "PROVEN", state: "RECONCILED", receipts: ["isabelle-fixture"]}' '.foundation_diverse' + field_case '"ungraded"' "an Agda entrypoint behind a wrapper command ungrades the row" \ + '.receipts["agda-c0eb4f1"].invocation = "agda --safe --without-K --cubical-compatible All.agda ; env agda Smoke.agda"' '.pwg' + field_case '"2i"' "a reconciled Lean leg whose axioms all have disposition c lifts the grade (control for canary 7)" \ + "(.theorems[] | select(.id == \"L1\") | .legs.lean.state) |= \"RECONCILED\" | $disp" '.pwg' } # --- the comment stripper every dangerous-construct gate reads through ------ @@ -376,11 +384,15 @@ standing_canaries() { # the pre-fix stripper. The fixture words are assembled at runtime (see the # header: a literal would trip the very scanners these canaries guard). strip_canaries() { - local d strip="$ROOT/tests/lib/strip-proof-comments.awk" w + local d out strip="$ROOT/tests/lib/strip-proof-comments.awk" w w="so""rry" d=$(scratch) printf '/- outer /- inner -/ %s stays inside -/\ntheorem t : True := trivial\n' "$w" > "$d/nested.lean" - if awk -f "$strip" "$d/nested.lean" 2>/dev/null | grep -qw "$w"; then + # The stripper must SUCCEED on this closed comment before its output means + # anything: a stripper that rejected it would also print no forbidden word. + if ! out=$(awk -f "$strip" "$d/nested.lean" 2>/dev/null); then + bad "the stripper rejects a closed NESTED Lean comment" + elif printf '%s\n' "$out" | grep -qw "$w"; then bad "a word inside a NESTED Lean comment leaks into the scan" else ok "a word inside a NESTED Lean comment is stripped" @@ -418,6 +430,26 @@ aspect_canaries() { ok "a banned Idris2 construct in any Idris2 source fails the aspect scan" fi rm -rf "$d" + # Idris2 comment rules, not Coq ones. The banned word sits between two + # documentation lines that carry a balanced Coq-style pair; read with Coq + # rules, the pair hides it and the scan passes. + d=$(scratch); mkdir -p "$d/src/idris2/Checker" + printf -- '-- SPDX-License-Identifier: MPL-2.0\nmodule Checker.Hidden\n||| Operator example: (*)\nbad : a -> b\nbad = %s\n||| End operator example: *)\nok : ()\nok = ()\n' "$w" > "$d/src/idris2/Checker/Hidden.idr" + if aspect_case "$d"; then + bad "a banned Idris2 construct between documentation lines carrying a Coq-style comment pair passes the aspect scan" + else + ok "Coq-style delimiters in Idris2 documentation do not hide a banned construct" + fi + rm -rf "$d" + # A documentation line that only NAMES a banned construct is not a use of it. + d=$(scratch); mkdir -p "$d/src/idris2/Checker" + printf -- '-- SPDX-License-Identifier: MPL-2.0\nmodule Checker.Documented\n||| This function does not use %s.\nok : ()\nok = ()\n' "$w" > "$d/src/idris2/Checker/Documented.idr" + if aspect_case "$d"; then + ok "an Idris2 documentation line naming a banned construct does not fail the aspect scan" + else + bad "an Idris2 documentation line that only names a banned construct fails the aspect scan" + fi + rm -rf "$d" d=$(scratch); mkdir -p "$d/src" if aspect_case "$d"; then bad "an aspect scan that read no Idris2 file reported a pass" @@ -467,7 +499,7 @@ meta_canary echo # A canary group that silently stops running used to report "10/10" and exit 0. # The count is part of the claim. -EXPECTED_CASES=43 +EXPECTED_CASES=48 if [ "$((PASS+FAIL))" -ne "$EXPECTED_CASES" ]; then echo "gate falsifiability canaries: $((PASS+FAIL)) cases ran, $EXPECTED_CASES expected — a canary group did not run" exit 1 diff --git a/tests/aspect_tests.sh b/tests/aspect_tests.sh index b4ddd24..b8f1892 100755 --- a/tests/aspect_tests.sh +++ b/tests/aspect_tests.sh @@ -80,7 +80,7 @@ IDRIS_COUNT_LOG="${TMPDIR:-/tmp}/aspect-idris-count.$$" DANGEROUS_IDRIS=$( while IFS= read -r f; do printf '%s\n' "$f" >> "$IDRIS_COUNT_LOG" - if ! stripped=$(awk -f tests/lib/strip-proof-comments.awk "$f"); then + if ! stripped=$(awk -v lang=idris -f tests/lib/strip-proof-comments.awk "$f"); then printf '%s\n' "$f" >> "$IDRIS_STRIP_LOG" continue fi diff --git a/tests/lib/strip-proof-comments.awk b/tests/lib/strip-proof-comments.awk index 64f4b62..0eae1b4 100644 --- a/tests/lib/strip-proof-comments.awk +++ b/tests/lib/strip-proof-comments.awk @@ -34,7 +34,15 @@ # nested comment), and the remaining outer close token could then open nothing # while the real remainder of the comment leaked into the scan. A depth counter # per open token now matches each language's own rule. -BEGIN { inblk = 0; depth = 0; instr = 0 } +# +# LANGUAGE MODE. Run with `-v lang=idris` for Idris2 sources. Idris2 has `{- -}` +# and `--` only, plus `|||` documentation lines; `(*`, `/-`, `/*` and `//` are +# ordinary operator text there. Measured 2026-11-17 without the mode: the +# documentation line `||| Operator example: (*)` opened a Coq comment that hid a +# `believe_me` on the lines after it until a later `*)`, and the stripper exited +# 0; and a documentation line that only NAMED a banned construct failed the +# gate. With no `lang` the behaviour is unchanged (all four block forms). +BEGIN { inblk = 0; depth = 0; instr = 0; idris = (lang == "idris") } { line = $0; out = ""; i = 1; n = length(line) while (i <= n) { @@ -50,11 +58,12 @@ BEGIN { inblk = 0; depth = 0; instr = 0 } if (c == "\"") { instr = 0; i++; continue } i++; continue } - if (two == "(*") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "*)"; i += 2; continue } - if (two == "/-") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "-/"; i += 2; continue } + if (!idris && two == "(*") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "*)"; i += 2; continue } + if (!idris && two == "/-") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "-/"; i += 2; continue } if (two == "{-") { inblk = 1; depth = 1; nests = 1; open_tok = two; close_tok = "-}"; i += 2; continue } - if (two == "/*") { inblk = 1; depth = 1; nests = 0; open_tok = two; close_tok = "*/"; i += 2; continue } - if (two == "--" || two == "//") { break } + if (!idris && two == "/*") { inblk = 1; depth = 1; nests = 0; open_tok = two; close_tok = "*/"; i += 2; continue } + if (two == "--" || (!idris && two == "//")) { break } + if (idris && substr(line, i, 3) == "|||") { break } c = substr(line, i, 1) if (c == "'" && substr(line, i - 1, 1) !~ /[A-Za-z0-9_'?!]/) { rest = substr(line, i) From 4380232c5d6f46d5611f9ad422ac47e34fee71c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 12:47:16 +0000 Subject: [PATCH 20/22] docs(readme): Haec has no compiler; name the producers that emit the IR today The README said "Rust (Haec) is the first front-end that lowers to the IR". Haec is a language design with hand-lowered examples and no compiler, and it is not Rust. The sentence now says so and names the two producers that do emit the IR: Vocarium's voc invoke, and Hermeneia's invoke from its stub store. Found by the stack coherence gate (workbench#83), which lists the old sentence as a retired claim. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H --- CHANGELOG.adoc | 5 +++++ README.adoc | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 4d5ca6b..20dcf97 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -78,6 +78,11 @@ reusable workflow installed. Both callers move to a revision that installs OTP + Five new canaries; the four that are not controls fail against the code before them. The suite stands at *48/48*. ++ +_README._ It said "`Rust` (Haec) is the first front-end that lowers to the IR". +Haec is not Rust and has no compiler; its examples are lowered by hand. The +sentence now says that, and names the two producers that emit the IR today. +Found by the stack coherence gate (workbench#83). * *The aspect lane runs, grades stand only on what the policy admits, and four status claims are narrowed (2026-11-17).* diff --git a/README.adoc b/README.adoc index b0d4f15..963a8d6 100644 --- a/README.adoc +++ b/README.adoc @@ -30,9 +30,12 @@ IR schema, the verified core, and the conformance suite. The checker MUST NOT parse, import, execute, or depend on any source language. It is a pure function _of the IR_, and the IR (its JSON schema) is the trust boundary. A front-end's grade annotations are *claims*; the checker validates -their *composition*, not their origin. `Rust` (Haec) is the first front-end -that lowers to the IR — dogfooding without coupling — but a static analyser for -an existing language could emit the same IR and be checked by the same checker. +their *composition*, not their origin. Haec is the first language designed to +lower to the IR. It has no compiler yet: its examples are lowered by hand and +round-trip through this checker. The producers that emit the IR today are +Vocarium's `voc invoke` and Hermeneia's `invoke`, the latter from its stub +store. A static analyser for an existing language +could emit the same IR and be checked by the same checker. ==== == The three firewalls (HC-2 — never let code launder them) From 610687895fca75959bd94cd8bad56a02f9556465 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 17 Nov 2026 13:59:30 +0000 Subject: [PATCH 21/22] =?UTF-8?q?Amend=20ADR=200005=20D4/D5:=20core=20Lean?= =?UTF-8?q?=20and=20Rocq=20are=20=C2=A72=20recheck=20legs=20(#124)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This is a follow-up to #122, which merged into this base. Before #122 merged, the owner chose **"Count it + amend ADR 0005 D4"** in the selector. That decision settles whether a Lean recheck leg with no Mathlib may count, given the 2026-11-09 ruling "Lean is a generator, not a leg". This PR writes the decision into ADR 0005, so the ADR and PROOF-POLICY §2 stop disagreeing on paper. **No grade moves.** The ledger already followed this ruling. The census is unchanged: of 28, `PWG-3` 15, `PWG-2ii` 7, `ungraded` 6. ## Changes - **ADR 0005**: an amendment section dated 2026-11-17. - It records both rulings. On 2026-11-09: Lean with Mathlib is a generator, never a leg. On 2026-11-17: theory is rechecked in Rocq and Lean with no Mathlib, and a Lean leg that imports nothing is a §2 recheck leg. - **D4 as amended** gives a role table: Agda is the normative kernel; Rocq is a recheck leg; core Lean is a recheck leg; Lean with Mathlib is a generator; Idris2 is the reference; Rust is the fast core. The table notes that core Lean does not earn §8.3's `+foundation-diverse` tag. - **D5 as amended**: the template removal stands. The 2026-11-17 Rocq file is an instantiated, gated recheck leg, so the repository has four proof developments, not three. - It names the out-of-scope upkeep: `just proof-status` and the other D5 recipes still say "three provers" (doctrine 16). - **PROOF-STATUS, README, CHANGELOG**: the "put to the owner" wording from #122 is replaced with the ruling and a pointer to the amendment. ## RSR Quality Checklist ### Required - [x] Tests pass: `pwg-check.sh` PASS, with table and census unchanged - [x] Code is formatted (docs only) - [x] Linter is clean: asciidoctor 2.0.20 with `--failure-level=WARN` on all four files - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` comments - [x] No banned functions - [x] SPDX license headers present (unchanged) - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] `docs/decisions/` updated - [x] Documentation updated - [x] `CHANGELOG` updated ## Testing ``` bash scripts/pwg-check.sh -> PASS ... 29 obligation(s) derived, published table and census match asciidoctor -o /dev/null --failure-level=WARN -> exit 0 ``` No proof file changed, so no kernel run is needed or claimed. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3)_ Co-authored-by: Claude --- CHANGELOG.adoc | 6 +- README.adoc | 6 +- ...0.2-consolidation-o5-and-prover-roles.adoc | 82 +++++++++++++++++++ docs/status/PROOF-STATUS.adoc | 16 ++-- 4 files changed, 96 insertions(+), 14 deletions(-) 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 From 2324569b7cd3e43397c0ac25e5d9939d7352995a Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:45:03 +0000 Subject: [PATCH 22/22] docs(verification): clarify manual correspondence review and sampled bridge checks in PWG notes --- verification/pwg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verification/pwg.json b/verification/pwg.json index 03f5b46..6af3d7d 100644 --- a/verification/pwg.json +++ b/verification/pwg.json @@ -1 +1 @@ -{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"agda-d5234b1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244586","import_cone":"root modules All.agda and Smoke.agda; 145 modules in the cone (agda --dependency-graph), 12 first-party: All, Smoke and the ten TB.* modules, TB.OrderLaws, TB.Monotone and TB.Bridge among them; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/scan-postulates.sh over the 12 first-party files, which reported 12 files, 0 postulate(s))","inputs_digest":"git-tree verification/proofs/agda = 3b19a6787cd678e93ea0c6be49a6e60634ff6978","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"},"lean-ratified-order-d5234b1":{"axioms":[],"checker":"lean","checker_version":"4.16.0 (commit 128a1e6b0a82; GitHub release archive, sha256 cdd31f1064783fff163be53e285722102f16767e65e6fb7f7cb1c232514e0c3a)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/lean4/ratified-order/RatifiedOrder.lean alone: no import (Lean core only, no Mathlib)","inputs_digest":"git-tree verification/proofs/lean4/ratified-order = 2d69c2f34f4c98834f21ed6413f85b375b024e7b; RatifiedOrder.lean sha256 74c33f1310227243155da52d4afee603f58cff7b8df9942accf6b8dd80f554c5","invocation":"bash scripts/check-recheck-legs.sh lean (lean RatifiedOrder.lean with no error or warning, then Lean.collectAxioms on every declared theorem and def); bash scripts/check-recheck-legs.sh controls","observed":"axioms: none for 49 of 49 declared theorem(s), and none for any def they use; PASS: Lean recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"Lean core only (no lakefile, no Mathlib)"},"rocq-ratified-order-d5234b1":{"axioms":[],"checker":"coqc","checker_version":"8.18.0 (Ubuntu 24.04 coq package; scripts/check-recheck-legs.sh refuses any other version)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/rocq/RatifiedOrder.v alone: it requires no library module (Coq prelude only)","inputs_digest":"git-tree verification/proofs/rocq = 2f808c303b5707bf40a54a7eb5c64cd4b774c511; RatifiedOrder.v sha256 89085ae49cb52894fbb16175cc86f2dc3da29333ef8699becf850c0b5ec1583e","invocation":"bash scripts/check-recheck-legs.sh rocq (coqc RatifiedOrder.v, then Print Assumptions on every Theorem and Lemma); bash scripts/check-recheck-legs.sh controls","observed":"Print Assumptions: closed under the global context for 49 of 49 declaration(s); PASS: Rocq recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"none: no Require"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateL4MonoR","TropeRatified.fateL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateL4MonoR","fateL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction, and since 2026-11-17 all four hold. The Rocq and Lean legs are the Mathlib-free recheck of verification/proofs/rocq and verification/proofs/lean4/ratified-order; the Mathlib package lemmas FateA.comp_mono_right/left remain, BRIDGE-PENDING, and are not this leg. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.dplusMonoR","TropeRatified.dplusMonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["dplusMonoR","dplusMonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.bondL4MonoR","TB.Monotone.bondL4MonoL","TB.Monotone.mergeL4MonoR","TB.Monotone.mergeL4MonoL"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.bondL4MonoR","TropeRatified.bondL4MonoL","TropeRatified.mergeL4MonoR","TropeRatified.mergeL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["bondL4MonoR","bondL4MonoL","mergeL4MonoR","mergeL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Proved in Agda 2026-11-17 (TB.Monotone; the left forms follow from the right forms by bond and merge commutativity). The Idris2 restatement remains a reference only (8.1). Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.gradeL4MonoR","TB.Monotone.gradeL4MonoL","TB.Monotone.▷-mono"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gradeL4MonoR","TropeRatified.gradeL4MonoL","TropeRatified.gcomp_mono"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gradeL4MonoR","gradeL4MonoL","gcomp_mono"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Proved in Agda 2026-11-17 (TB.Monotone): each argument separately, and both at once (▷-mono, through ⊑-trans). Spec section 7 also needs each coordinate to be a COMPLETE chain; completeness is not part of this obligation and is proved in no prover. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl","TB.OrderLaws.⊑-trans","TB.OrderLaws.⊑-dec","TB.OrderLaws.⊑-isPreorder"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gle_refl","TropeRatified.gle_trans","TropeRatified.gle_dec","TropeRatified.gle_decides"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gle_refl","gle_trans","gle_dec"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"Proved in Agda 2026-11-17: reflexivity (TB.Order), transitivity and decidability (TB.OrderLaws), packaged as ⊑-isPreorder. Before that the Agda proved reflexivity only and the leg was OPEN. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateDroppedLtePredicated","TropeRatified.fatePredicatedNotLteDropped"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateDroppedLtePredicated","fatePredicatedNotLteDropped"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.OrderLaws.fate-isTotalOrder","TB.OrderLaws.fateLte-trans","TB.OrderLaws.fateLte-antisym","TB.OrderLaws.fateLte-total","TB.Order.fateLte-refl"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fate_isTotalOrder","TropeRatified.fateLte_trans","TropeRatified.fateLte_antisym","TropeRatified.fateLte_total","TropeRatified.fateLte_refl"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fate_isTotalOrder","fateLte_trans","fateLte_antisym","fateLte_total","fateLte_refl"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Proved in Agda 2026-11-17 as fate-isTotalOrder : IsTotalOrder _≡_ _≤F_ (standard library), with the fidelity order a chain as well (dLte-isTotalOrder). The Mathlib package lemmas FateA.le_total and FateA.le_refl remain, BRIDGE-PENDING, and are not this leg. Completeness of the chain is not part of this obligation and is proved in no prover. The directional facts are A2-directions. Both recheck legs restate the carrier clause for clause; TB.Bridge pins the restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables, so a definition that drifts fails its own kernel (PROOF-STATUS, statement correspondence).","reference":{"idris2":{"declarations":["Trope.Order.fateLteTrans"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]} +{"commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","note":"Evidence ledger. The pwg field of each theorem is DERIVED from the legs and receipts below by scripts/pwg-derive.sh, never written by hand; scripts/pwg-check.sh re-derives and fails on drift (PROOF-POLICY 8.4 rule 2). Idris2 appears as a reference, not a leg: 8.1 excludes engineering provers from the ladder.","policy":{"commit":"9bdf864cc7f2c8e24b4df84bf00d04158eee3ad5","path":"3-practice/PROOF-POLICY.adoc","repo":"metadatastician/standards","section":"8"},"receipts":{"agda-c0eb4f1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"root modules All.agda and Smoke.agda; all seven TB.* modules reachable from All.agda; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/census/proof-holes.sh over verification/proofs/agda at this commit, which emitted no record of any class)","inputs_digest":"git-tree verification/proofs/agda = 8d3370e7da58023b9bfa0802e710860105ace73a","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"agda-d5234b1":{"axioms":[],"checker":"agda","checker_version":"2.7.0.1","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244586","import_cone":"root modules All.agda and Smoke.agda; 145 modules in the cone (agda --dependency-graph), 12 first-party: All, Smoke and the ten TB.* modules, TB.OrderLaws, TB.Monotone and TB.Bridge among them; postulate count 0 (--safe refuses postulate; independently scanned with hyperpolymath/mathesis scripts/scan-postulates.sh over the 12 first-party files, which reported 12 files, 0 postulate(s))","inputs_digest":"git-tree verification/proofs/agda = 3b19a6787cd678e93ea0c6be49a6e60634ff6978","invocation":"agda --safe --without-K --cubical-compatible All.agda ; agda --safe --without-K --cubical-compatible Smoke.agda","observed":"PASS: All.agda + Smoke.agda typecheck (--safe --without-K --cubical-compatible; --safe => postulate-free by construction)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"agda-stdlib v2.0 sha256:14eecb83d62495f701e1eb03ffba59a2f767491f728a8ab8c8bb9243331399d8"},"lean-boundary-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"every module of grade-boundary sits in the import Mathlib cone via GradeBoundary.lean:3","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-boundary: lake build + sorry-free environment' success; 'Trope.GradeR.atom_factorization' depends on axioms: [propext]; 'Trope.nine_families' depends on axioms: [propext, Classical.choice, Quot.sound]","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0 (lakefile.toml) -- see the Mathlib note: PROOF-POLICY 2 forbids this dependency for a recheck leg"},"lean-factorisation-c0eb4f1":{"axioms":["propext","Quot.sound","Classical.choice"],"checker":"lean","checker_version":"4.16.0 (lake, leanchecker)","commit":"c0eb4f1a1a50aabfab23b94fd74b53cef267f653","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/42623339243","import_cone":"grade-factorisation requires gradeBoundary, so the import Mathlib cone covers it","inputs_digest":"git-tree verification/proofs/lean4 = 5f32026d26810845d94d42b5a1281da3c2a06146","invocation":"lake build --wfail ; leanchecker ; axiom audit against the allowlist {propext, Classical.choice, Quot.sound}","observed":"job 'Lean grade-factorisation: lake build + sorry-free environment' success","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"mathlib4 rev v4.16.0, transitively via the gradeBoundary path dependency"},"lean-ratified-order-d5234b1":{"axioms":[],"checker":"lean","checker_version":"4.16.0 (commit 128a1e6b0a82; GitHub release archive, sha256 cdd31f1064783fff163be53e285722102f16767e65e6fb7f7cb1c232514e0c3a)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/lean4/ratified-order/RatifiedOrder.lean alone: no import (Lean core only, no Mathlib)","inputs_digest":"git-tree verification/proofs/lean4/ratified-order = 2d69c2f34f4c98834f21ed6413f85b375b024e7b; RatifiedOrder.lean sha256 74c33f1310227243155da52d4afee603f58cff7b8df9942accf6b8dd80f554c5","invocation":"bash scripts/check-recheck-legs.sh lean (lean RatifiedOrder.lean with no error or warning, then Lean.collectAxioms on every declared theorem and def); bash scripts/check-recheck-legs.sh controls","observed":"axioms: none for 49 of 49 declared theorem(s), and none for any def they use; PASS: Lean recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"Lean core only (no lakefile, no Mathlib)"},"rocq-ratified-order-d5234b1":{"axioms":[],"checker":"coqc","checker_version":"8.18.0 (Ubuntu 24.04 coq package; scripts/check-recheck-legs.sh refuses any other version)","commit":"d5234b15e56829a81ceec44e6cf14713357096ef","evidence":"https://github.com/hyperpolymath/trope-checker/actions/runs/44006871652/job/133784244634","import_cone":"verification/proofs/rocq/RatifiedOrder.v alone: it requires no library module (Coq prelude only)","inputs_digest":"git-tree verification/proofs/rocq = 2f808c303b5707bf40a54a7eb5c64cd4b774c511; RatifiedOrder.v sha256 89085ae49cb52894fbb16175cc86f2dc3da29333ef8699becf850c0b5ec1583e","invocation":"bash scripts/check-recheck-legs.sh rocq (coqc RatifiedOrder.v, then Print Assumptions on every Theorem and Lemma); bash scripts/check-recheck-legs.sh controls","observed":"Print Assumptions: closed under the global context for 49 of 49 declaration(s); PASS: Rocq recheck leg; controls: every planted defect was caught (6 controls)","repo":"hyperpolymath/trope-checker","result":"pass","state":"current","stdlib_pin":"none: no Require"}},"repo":"hyperpolymath/trope-checker","schema_version":"1.0.0","theorems":[{"foundation_diverse_witness":null,"id":"L1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-assoc"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.comp_assoc"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Laws.gradeAssoc","Trope.Coords.fateAssoc","Trope.Coords.bondAssoc","Trope.Coords.mergeAssoc","Trope.Fidelity.dplusAssoc"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L1 (associativity)"},{"foundation_diverse_witness":null,"id":"L2","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.gmonoid-unitL","TB.Grade.gmonoid-unitR"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Grade.gradeUnitL","Trope.Grade.gradeUnitR","Trope.Coords.fateUnitL","Trope.Fidelity.dplusZeroR"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L2 (unit)"},{"foundation_diverse_witness":null,"id":"L3","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.falsified-absorbL","TB.Grade.falsified-absorbR","TB.Grade.misbound-absorbL","TB.Grade.conflated-absorbL","TB.Grade.unknown-absorbL","TB.Grade.total-absorb-Q","TB.Tier.deceptive-absorbs-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.falsified_two_sided_zero","GradeR.gBotR_two_sided_zero"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states both sides only for Falsified. For Misbound, Conflated and Unknown the left form is stated; the right follows in one step from the coordinate's commutativity but is not itself a lemma.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L3 (bottom absorption)"},{"foundation_diverse_witness":null,"id":"L4-fate","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateL4MonoR","TB.Order.fateL4MonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateL4MonoR","TropeRatified.fateL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateL4MonoR","fateL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4 (owner ruling 2026-11-16: split rather than grade the whole on partial coverage). The others are L4-fidelity, L4-bond-merge and L4-lifting; L4 in full is their conjunction, and since 2026-11-17 all four hold. The Rocq and Lean legs are the Mathlib-free recheck of verification/proofs/rocq and verification/proofs/lean4/ratified-order; the Mathlib package lemmas FateA.comp_mono_right/left remain, BRIDGE-PENDING, and are not this leg. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{"idris2":{"declarations":["Trope.Soundness.fateL4MonoR","Trope.Soundness.fateL4MonoL"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): fate coordinate"},{"foundation_diverse_witness":null,"id":"L4-fidelity","kind":"theory","legs":{"agda":{"declarations":["TB.Order.dplusMonoR","TB.Order.dplusMonoL"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.dplusMonoR","TropeRatified.dplusMonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["dplusMonoR","dplusMonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{},"title":"L4 (monotonicity): fidelity dimension"},{"foundation_diverse_witness":null,"id":"L4-bond-merge","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.bondL4MonoR","TB.Monotone.bondL4MonoL","TB.Monotone.mergeL4MonoR","TB.Monotone.mergeL4MonoL"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.bondL4MonoR","TropeRatified.bondL4MonoL","TropeRatified.mergeL4MonoR","TropeRatified.mergeL4MonoL"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["bondL4MonoR","bondL4MonoL","mergeL4MonoR","mergeL4MonoL"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4. Proved in Agda 2026-11-17 (TB.Monotone; the left forms follow from the right forms by bond and merge commutativity). The Idris2 restatement remains a reference only (8.1). Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{"idris2":{"declarations":["Trope.Order.bondComposeMono","Trope.Order.mergeComposeMono"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"L4 (monotonicity): bond and merge coordinates"},{"foundation_diverse_witness":null,"id":"L4-lifting","kind":"theory","legs":{"agda":{"declarations":["TB.Monotone.gradeL4MonoR","TB.Monotone.gradeL4MonoL","TB.Monotone.▷-mono"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gradeL4MonoR","TropeRatified.gradeL4MonoL","TropeRatified.gcomp_mono"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gradeL4MonoR","gradeL4MonoL","gcomp_mono"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of four parts of L4: the lifting from coordinate-level monotonicity to gradeCompose that spec section 7 (Knaster-Tarski) invokes. Proved in Agda 2026-11-17 (TB.Monotone): each argument separately, and both at once (▷-mono, through ⊑-trans). Spec section 7 also needs each coordinate to be a COMPLETE chain; completeness is not part of this obligation and is proved in no prover. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{},"title":"L4 (monotonicity): grade-level lifting for gradeCompose"},{"foundation_diverse_witness":null,"id":"L5","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.deceptive-absorbs-▷","TB.Reduction.attenuate-stays-deceptive","TB.Reduction.project-stays-deceptive"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L5 (deception infectiousness)"},{"foundation_diverse_witness":null,"id":"L6","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.instCommMonoid","FateA.comp_comm"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"L6 ratification is still subject to the open owner ruling tracked on trope-checker issue 106.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"L6 (commutativity)"},{"foundation_diverse_witness":null,"id":"retention-order","kind":"theory","legs":{"agda":{"declarations":["TB.Order.⊑-refl","TB.OrderLaws.⊑-trans","TB.OrderLaws.⊑-dec","TB.OrderLaws.⊑-isPreorder"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.gle_refl","TropeRatified.gle_trans","TropeRatified.gle_dec","TropeRatified.gle_decides"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["gle_refl","gle_trans","gle_dec"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"Proved in Agda 2026-11-17: reflexivity (TB.Order), transitivity and decidability (TB.OrderLaws), packaged as ⊑-isPreorder. Before that the Agda proved reflexivity only and the leg was OPEN. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{"idris2":{"declarations":["Trope.Laws.decGradeLte","Trope.Soundness.gradeLteTrans","Trope.Coords.fateLteRefl","Trope.Coords.bondLteRefl","Trope.Coords.mergeLteRefl","Trope.Fidelity.dLteRefl"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Retention order is a decidable preorder"},{"foundation_diverse_witness":null,"id":"A2-directions","kind":"theory","legs":{"agda":{"declarations":["TB.Order.fateDroppedLtePredicated","TB.Order.fatePredicatedNotLteDropped"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fateDroppedLtePredicated","TropeRatified.fatePredicatedNotLteDropped"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fateDroppedLtePredicated","fatePredicatedNotLteDropped"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"One of two parts of A2 (owner ruling 2026-11-16: split). The two directional facts only; that Fate is a chain is A2-chain. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{"idris2":{"declarations":["Trope.Soundness.fateDroppedLtePredicated","Trope.Soundness.fatePredicatedNotLteDropped"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"A2 directional facts: Dropped below Predicated, not conversely"},{"foundation_diverse_witness":null,"id":"A2-chain","kind":"theory","legs":{"agda":{"declarations":["TB.OrderLaws.fate-isTotalOrder","TB.OrderLaws.fateLte-trans","TB.OrderLaws.fateLte-antisym","TB.OrderLaws.fateLte-total","TB.Order.fateLte-refl"],"receipts":["agda-d5234b1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["TropeRatified.fate_isTotalOrder","TropeRatified.fateLte_trans","TropeRatified.fateLte_antisym","TropeRatified.fateLte_total","TropeRatified.fateLte_refl"],"receipts":["lean-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"},"rocq":{"declarations":["fate_isTotalOrder","fateLte_trans","fateLte_antisym","fateLte_total","fateLte_refl"],"receipts":["rocq-ratified-order-d5234b1"],"route":"re-proved","state":"RECONCILED","token":"PROVEN"}},"notes":"A chain is a total order: reflexive, transitive, antisymmetric and total. Proved in Agda 2026-11-17 as fate-isTotalOrder : IsTotalOrder _≡_ _≤F_ (standard library), with the fidelity order a chain as well (dLte-isTotalOrder). The Mathlib package lemmas FateA.le_total and FateA.le_refl remain, BRIDGE-PENDING, and are not this leg. Completeness of the chain is not part of this obligation and is proved in no prover. The directional facts are A2-directions. Both recheck legs restate the carrier clause for clause, as checked by manual correspondence review (PROOF-STATUS, statement correspondence). Separately, TB.Bridge pins the six restated definitions to the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the same six tables; a disagreement at a sampled point makes a corresponding bridge theorem fail.","reference":{"idris2":{"declarations":["Trope.Order.fateLteTrans"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Fate is a chain (A2)"},{"foundation_diverse_witness":null,"id":"veridicality-derivation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.fateDeceptiveUnique","TB.Honest.bondDeceptiveUnique","TB.Honest.mergeDeceptiveUnique"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The 'exactly three' half rests on the three uniqueness lemmas plus the construction of Grade; Trope.Veridicality.deceptiveDuals is a tuple value and states no proposition, so it is not cited as evidence here.","reference":{"idris2":{"declarations":["Trope.Veridicality.fateDeceptiveUnique","Trope.Veridicality.bondDeceptiveUnique","Trope.Veridicality.mergeDeceptiveUnique"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Veridicality Derivation"},{"foundation_diverse_witness":null,"id":"honest-generation","kind":"theory","legs":{"agda":{"declarations":["TB.Honest.genFate","TB.Honest.genBond","TB.Honest.genMerge","TB.Honest.honest-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":["Trope.Generation.genFate","Trope.Generation.genBond","Trope.Generation.genMerge"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Honest Generation"},{"foundation_diverse_witness":null,"id":"hc4-coherence","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only. No Agda source, so ungraded under 8.1 however sound the Idris2 proof is.","reference":{"idris2":{"declarations":["Trope.Veridicality.epsilonHonest","Trope.Grade.epsilonCoherent"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"The unit is non-deceptive and HC-4-coherent"},{"foundation_diverse_witness":null,"id":"C1","kind":"theory","legs":{"agda":{"declarations":["TB.Grade.grade-conical"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.conical","FateA.conical"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C1 (conicality)"},{"foundation_diverse_witness":null,"id":"C2","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.Q-cancelʳ","TB.Tier.core-closed-▷"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["GradeR.gradeR_leftCancel_iff","GradeR.gradeR_not_leftCancel","GradeR.gDroppedR_not_cancel","FateA.atten_cancel_on_normalForms"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The normal-form half is proved on the fate coordinate only (FateA.atten_cancel_on_normalForms); there is no grade-level normal-form cancellation theorem. Amendment (A3) is not modelled in the Agda, whose carrier is the unnormalised one.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C2 (the cancellation boundary)"},{"foundation_diverse_witness":null,"id":"tier2-membership","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.unknown-not-cancel","TB.Tier.total-honest-not-cancel","TB.Tier.falsified-not-cancel","TB.Tier.dropped-honest-not-cancel","TB.Tier.predicated-honest-not-cancel","TB.Tier.severed-honest-not-cancel","TB.Tier.Q-cancelʳ"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Bond.withheld_honest_not_cancel","Merge.fused_honest_not_cancel","Fate.atten_not_cancel","Grade.grade_leftCancel_iff","GradeR.gradeR_leftCancel_iff","FateA.leftCancelWitness"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Agda states six of the non-cancellativity witnesses (fate and bond) plus the positive right-cancellation Q-cancelʳ, so the Agda leg is NOT unavailable. It is OPEN because the exhaustive characterisation is not stated in Agda: there is no Agda counterpart of grade_leftCancel_iff, and no Agda witness on the merge coordinate. Lean carries the exhaustive iff. Grade.grade_leftCancel_iff is over the historical pre-ratification carrier; the ratified restatement is GradeR.gradeR_leftCancel_iff. Ungraded because the Agda token is OPEN (§8.1), not for want of an Agda source.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tier-2 membership, exhaustive"},{"foundation_diverse_witness":null,"id":"C3","kind":"theory","legs":{"agda":{"declarations":["TB.Tier.fate-tier-meet-hom-fails"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":["FateA.dropped_still_not_cancel","Trope.Grade.fidelity_total_honest_not_cancel"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The ratified witness is dropped |>f atten unknown against the tier meet. The pre-ratification witness dropped |>f falsified = dropped was reversed by amendment (A1) and is retained as history only.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"C3 (partition; tier closure is not a homomorphism)"},{"foundation_diverse_witness":null,"id":"O1-carrier","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["Trope.GradeR.atom_factorization","Trope.nine_families","Trope.family_realized","Trope.families_disjoint","Trope.fateFamily_none_iff"],"receipts":["lean-boundary-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. Mechanised: the factorisation into six slot projections, and separately the nine-label classification over the coordinate value types. NOT mechanised: the link between them. No theorem maps a grade's slot projections to AtomFamily, and the emb*_one lemmas that would begin that bridge are stated but used by nothing, so 'drawn from the nine families' and 'exhaustive' are argued in a docstring rather than stated.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"O1-carrier (atom factorisation)"},{"foundation_diverse_witness":null,"id":"tropical-Bprime","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":["piR_hom","piR_one","piRHom","piR_nontrivial","piR_surjective","piR_sighted","phiR_sighted","phiId_not_hom","sighted_forces_squash","squash_top","squash_ne_unknown","squash_add"],"receipts":["lean-factorisation-c0eb4f1"],"route":"re-proved","state":"BRIDGE-PENDING","token":"PROVEN-WITH-AXIOMS"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Lean only, so ungraded under 8.1. sighted_forces_squash concludes f (atten Delta.unknown) /= Delta.unknown: a sighted homomorphism must send atten Unknown AWAY from the deceptive top, not onto it.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Tropical factorisation, (B-prime) sighted"},{"foundation_diverse_witness":null,"id":"theorem-b-t1","kind":"theory","legs":{"agda":{"declarations":["TB.Syntax","TB.Grade","TB.Tier"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 1 - intrinsic graded calculus"},{"foundation_diverse_witness":null,"id":"theorem-b-t2","kind":"theory","legs":{"agda":{"declarations":["TB.Substitution.cut-preserves-grade","TB.Substitution.cut-grade-comm"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"The v0.1 sharpness refutation (cut-orientation-matters, cut-symmetric-fails) was retired by amendment (A1) and is replaced by cut-grade-comm: the cut is reorderable.","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 2 - grade-exact substitution"},{"foundation_diverse_witness":null,"id":"theorem-b-t3","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction.β-app","TB.Reduction.β-let","TB.Reduction.let-redex-grade","TB.Reduction.let-tier-preserved","TB.Reduction.seq-stays-core"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Narrow and intrinsic. The step relation has exactly two constructors, each requiring the substituted argument at grade epsilon, with no congruence rule and no step for any effect former. Preservation holds by construction because the relation is indexed at the same type and grade on both sides, not by induction. There is no progress theorem. The fix case is open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 3 - subject reduction, beta/let core"},{"foundation_diverse_witness":null,"id":"theorem-b-t4","kind":"theory","legs":{"agda":{"declarations":["TB.Honest"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Theorem B Target 4 - Honest Generation and Veridicality"},{"foundation_diverse_witness":null,"id":"grade-soundness-exact","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.soundFromExact"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Grade soundness, exact lowering"},{"foundation_diverse_witness":null,"id":"tsub-soundness","kind":"theory","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Idris2 only, so ungraded under 8.1.","reference":{"idris2":{"declarations":["Trope.Soundness.subSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"T-Sub soundness"},{"foundation_diverse_witness":null,"id":"verdict-soundness","kind":"engineering","legs":{"agda":{"declarations":[],"receipts":[],"route":"unavailable","state":"AGDA-PENDING","token":"OPEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Classified engineering: the statement is about the shipped checker's verdict function over its own types, so 8.1 puts it off the ladder entirely and it carries section 5 tokens only. Note that verdictSound is typed over Grade while the shipped checker's floor is a different type decided by a different predicate, and no lemma connects them.","reference":{"idris2":{"declarations":["Trope.Soundness.verdictSound"],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"PROVEN"}},"title":"Verdict soundness (corollary)"},{"foundation_diverse_witness":null,"id":"grade-soundness-core","kind":"theory","legs":{"agda":{"declarations":["TB.Reduction","TB.Substitution.cut-preserves-grade"],"receipts":["agda-c0eb4f1"],"route":"re-proved","state":"AGDA-VERIFIED","token":"PROVEN"},"lean":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"},"rocq":{"declarations":[],"receipts":[],"route":"unavailable","state":"NOT-INVENTORIED","token":"OPEN"}},"notes":"Inherits Target 3's fragment: the beta/let core only, with the fix case open (CO-1).","reference":{"idris2":{"declarations":[],"state":"not-a-leg (PROOF-POLICY 8.1 excludes engineering provers from the PWG ladder)","token":"OPEN"}},"title":"Grade soundness, beta/let core"}]}