Repository navigation
Prove L4 in full and A2 (Fate is a chain); recheck both in Rocq and core Lean - #122
Conversation
Owner ruling 2026-11-17: prove the full claims rather than narrow them.
TB/OrderLaws.agda (new):
- A2-chain: fateLte is transitive, antisymmetric and total, packaged
as fate-isTotalOrder : IsTotalOrder _≡_ _≤F_ (standard library). The
fidelity order is a chain too (dLte-isTotalOrder), and so is lteb.
- retention-order: ⊑ is transitive (⊑-trans) and decidable (⊑-dec);
with TB.Order.⊑-refl that is ⊑-isPreorder.
TB/Monotone.agda (new):
- L4-bond-merge: bondL4Mono{R,L}, mergeL4Mono{R,L}.
- L4-lifting: gradeL4Mono{R,L} for the grade composition, and ▷-mono
(both arguments at once, through ⊑-trans).
- Each left form follows from its right form by the coordinate's
commutativity (▷b-comm, ▷m-comm, grade-comm).
No existing definition or theorem changes. All.agda and Smoke.agda pin
the new headlines.
Checked locally: Agda 2.7.0.1 (release binary, SHA-256 975b515a…),
agda-stdlib v2.0 (tag commit 2b8fff10), invocation
`agda --safe --without-K --cubical-compatible {All,Smoke}.agda`, exit 0
for both. Negative controls: an antitone bond lemma and an
antisymmetry concluding `x ≡ present` are each rejected (exit 42).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3
…itions
PROOF-POLICY §2: every Agda theory proof is rechecked in Rocq and Lean,
with no Mathlib. The existing Lean packages import Mathlib, so their
legs stay BRIDGE-PENDING. These two legs do not.
- verification/proofs/rocq/RatifiedOrder.v (new): Coq 8.18.0, no
Require, no axiom. Restates TB.Grade/TB.Order clause for clause and
re-proves L4 on every coordinate plus the lifting, the chain laws for
lteb/dLte/fateLte, and the decidable preorder on grades.
- verification/proofs/lean4/ratified-order/RatifiedOrder.lean (new):
Lean 4.16.0, core only, no simp/omega/decide; the same statements.
- TB/Bridge.agda (new): the values of fateLte, ▷f, bondLte, ▷b,
mergeLte and ▷m on a fixed sample, as numeral lists. The Rocq and Lean
files state the same six literals about their own restatements. Bond
and Merge are covered exhaustively, Fate on nine points (81 pairs).
A restated definition that drifts from the Agda now fails its own
kernel, even when every theorem about it still proves.
- scripts/check-recheck-legs.sh (new): pinned version asserted, compile,
axiom audit over every declaration (fails on any axiom and on an empty
audit domain), and six planted controls that must each be caught.
- proofs.yml: a recheck-legs job runs all three modes in CI.
Local results (this container):
check-recheck-legs.sh rocq PASS, 49 of 49 closed under the
global context (coqc 8.18.0)
check-recheck-legs.sh lean PASS, no axioms for 49 of 49 declared
theorems (Lean 4.16.0, 128a1e6b0a82)
check-recheck-legs.sh controls PASS, 6 of 6 caught; the drift
control fails only at bridge_bcomp
agda All.agda / Smoke.agda exit 0 (Agda 2.7.0.1, stdlib v2.0)
test-gate-falsifiability.sh 29/29; pwg-check.sh PASS
shellcheck 0.11.0 (pinned) clean over all tracked *.sh
The ledger is not changed here. Its legs and receipts follow once CI
has run on this commit, so no grade cites a receipt that does not exist.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3
The proofs and CI lane landed in the two commits before this one. This commit records the evidence CI produced for them, in run 44006871652 on d5234b1: Agda Theorem B PASS, and Recheck legs PASS (Rocq 49/49 closed, Lean 49/49 axiom-free, 6/6 controls caught). Ledger (verification/pwg.json): - New receipts: agda-d5234b1, rocq-ratified-order-d5234b1, lean-ratified-order-d5234b1. Each records its checker version, invocation, inputs digest, observed output and axioms (none). - L4-bond-merge, L4-lifting, A2-chain, retention-order: their Agda legs become PROVEN / AGDA-VERIFIED, citing the TB.Monotone and TB.OrderLaws declarations. - All seven L4-*, A2-* and retention-order rows gain Rocq and Lean legs: re-proved, PROVEN, RECONCILED. Derived, not written: all seven rows reach PWG-2ii. Census of 28 theory obligations: PWG-3 15, PWG-2i 0, PWG-2ii 7, PWG-1 0, ungraded 6 (was PWG-3 18, ungraded 10). None reaches PWG-1, because the receipts are not at the ledger's source commit. PROOF-STATUS: the derived table and census; the L4, A2 and retention rows; rewritten census prose; and a §2.2 record for the new legs (route, reason for re-proof, statement correspondence with the definition bridge, residual assumptions: none, and the controls). README and CHANGELOG follow. Put to the owner, not absorbed: the 2026-11-09 ruling says "Lean is a generator, not a leg", and its reason is the Mathlib dependency. These Lean legs import nothing. They are recorded RECONCILED and they count. If the ruling is meant to cover them too, their state becomes BRIDGE-PENDING and the seven rows derive PWG-2i. Gates: pwg-check PASS (table and census match), falsifiability 29/29, aspect tests PASS=3, ledger JCS-canonical, asciidoctor 2.0.20 renders PROOF-STATUS, README and CHANGELOG with no warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3
|
Fork governance
Scope: the three lanes below are static checks at the named commit. A K9-DEED conformance🟡 advisory · commit
K9 live corpus (L0–L2): 8 finding(s) / scope notes
Scope: K9 components L0–L2 against contract v1.0.0 at the named standards commit. L3 signature verification and routed coordination-dialect files are not certified. Green is limited to this scope. Orange is missing evidence; yellow is grandfathered debt or warnings; grey is an explicit scope exclusion. report.json, badge.json and the validator logs are in the k9-grid artifact on the linked run. Hypatia verdict grid🟡 medium · commit Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high in grid scope) — reported, never grading the change. Unique graded findings across gating and advisory rows: 25 (25 reporter observations; 21 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Hypatia scan: 13 finding(s)
panic-attack assail: 3 finding(s)
echidnabot: not_applicable — proofs here are gated by their own toolchains (proofs.yml: Idris2, Lean, Agda); no ECHIDNA engine is configured, so this adapter could only ever report not_run
rhodibot (RSR compliance): 11 finding(s)
panicbot: not_applicable — panic-attack already reports directly as its own row in the Hypatia verdict grid; enrolling panicbot would count the same findings twice
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet README)
glambot (presentation quality): 82 finding(s)
seambot: not_applicable — no seam register is declared (spec/seams/seam-register.json)
finishingbot (release readiness): 127 finding(s)
cipherbot: not_applicable — no cryptography is implemented in this repository; the hashes present are checksum/integrity pins, which cipherbot would report as cryptographic findings
accessibilitybot: not_applicable — no served HTML surface; this is a checker library/CLI with AsciiDoc documentation
Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run. |
…sibond Brings in #122 (L4 in full and A2 proved in Agda, rechecked in Rocq and core Lean), which merged into #119's branch after this branch had taken #123. The merge is textually clean. Checked on the merged tree, because #123 tightened what a grade may stand on and #122 added receipts under the older rules: scripts/pwg-check.sh PASS, table and census match scripts/pwg-derive.sh --census PWG-3 15, PWG-2ii 7, ungraded 6 of 28 scripts/test-gate-falsifiability 43/43 tests/aspect_tests.sh PASS The census is the one #122 published. Its three new receipts report no axioms, so the disposition rule admits them, and its Agda receipt records the canonical invocation for both entrypoints. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDim4mMEfCer9SiAV4H
## 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 <each of the 4 files> -> 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 <noreply@anthropic.com>



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), plusretention-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 ond5234b1, not from the ledger's source commit.Census of 28 theory obligations:
PWG-315,PWG-2i0,PWG-2ii7,PWG-10,ungraded6. The previous census, of the same 28, wasPWG-318, ungraded 10.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
RECONCILEDand 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
statefields toBRIDGE-PENDING. The seven rows then derive PWG-2i. It is a one-field change per row.Changes
--safe --without-K --cubical-compatible):TB/OrderLaws.agda:fateLte-{trans,antisym,total}, packaged asfate-isTotalOrder : IsTotalOrder _≡_ _≤F_(A2-chain);dLte-isTotalOrder; and⊑-trans,⊑-dec,⊑-isPreorder(retention-order).TB/Monotone.agda:bondL4Mono{R,L}andmergeL4Mono{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.verification/proofs/rocq/RatifiedOrder.v): Coq 8.18.0, noRequire. It restates the carrier clause for clause and re-proves everything above.verification/proofs/lean4/ratified-order/RatifiedOrder.lean): Lean 4.16.0. Core only, with no import and nosimp,omegaordecide.fateLte,▷f,bondLte,▷b,mergeLteand▷m, and the literals are the same in all three provers.withheld ▷b intacttointactleaves every theorem provable in both legs. Onlybridge_bcompcatches it.scripts/check-recheck-legs.sh rocq|lean|controls):recheck-legsjob.131a33c):PROVENfor the four previously ungraded rows.RECONCILEDon all seven rows.RSR Quality Checklist
Required
pwg-check.shPASS (table and census match),test-gate-falsifiability.sh29/29,tests/aspect_tests.shPASS=3jq -cS . | cmp)quality.yml's pin, at--severity=styleover all tracked*.shunsafeblocks without// SAFETY:commentsAdmitted,sorryorpostulate).envfiles includedAs Applicable
CHANGELOGupdatedTesting
Kernel runs. CI run 44006871652 on
d5234b1, with the same results reproduced locally:agda --safe --without-K --cubical-compatible All.agda ; … Smoke.agdaPASS: All.agda + Smoke.agda typecheckscan-postulates.sh12 files, 0 postulate(s)bash scripts/check-recheck-legs.sh rocqclosed under the global context for 49 of 49, file sha25689085ae4…128a1e6b0a82)bash scripts/check-recheck-legs.sh leanaxioms: none for 49 of 49 declared theorem(s), file sha25674c33f13…bash scripts/check-recheck-legs.sh controlsx ≡ presentNot established:
L4Monotonicity.leandocstring that says "complete chain" (audit finding 12) is untouched.PWG-3rows still owe both recheck legs.🤖 Generated with Claude Code
https://claude.ai/code/session_01J4QvDf73vaDJwGZ3qMSeH3