// SPDX-License-Identifier: CC-BY-SA-4.0 = resource-algebra — Proof Status :revdate: 2026-11-19 Every row is a theory theorem (`PROOF-NEEDS.adoc`). Records follow `3-practice/PROOF-POLICY.adoc` in `hyperpolymath/standards`, which keeps three fields apart: * the §5 status of each leg: `PROVEN`, `PROVEN-WITH-AXIOMS`, `TESTED`, `ASSUMED` or `OPEN`; * the §2.2 correspondence state, which says how far the statements in the different provers have been tied together; * the §8 Proof Witness Grade (`pwg`). It is derived from receipts and never asserted. The values, weakest first, are `ungraded`, `3`, `2i`, `2ii` and `1`. == Census Out of 48 theory rows: PWG-1: 0 · PWG-2ii: 0 · PWG-2i: 0 · PWG-3: 0 · ungraded: 48. No leg has a current receipt, so nothing is graded (§8.4). The proof receipt (`verification/receipts/resource-algebra-proofs_praxis.deed`) names source commit `7ab98404fc2f6540f239f8fbd09222b659ba8d4f`, the commit on main that the change below was made on. The standards reader (`deed_lint.js --proof-receipt-json`), as pinned by `scripts/proof-receipt.sh` (standards `f4e83044`), derives every grade from the legs and receipts, and refuses a recorded grade that differs (§8.4). Why no receipt is current. Rows D-1 to D-8 (signed drift, 2026-11-19) changed the inputs of all three legs: the Agda cone gained `Drift.agda` and `Instances/SignedHWM.agda` and three modules gained sections, and the Rocq and Lean files gained their legs. The three runs at `201e05b` (resource-algebra#58) no longer describe the tree, so they are `superseded`. The first `proofs.yml` run on main that contains this change is recorded next. The 39 rows that were PWG-2ii then get the grade that run supports, and the eight new rows get their first grade. The proofs of those 39 rows did not change. The eight new rows were checked before the pull request in this way, which is not a receipt: Agda 2.6.3 (`scripts/check-agda.sh`, 23 expected rejections), Lean 4.35.0 from the pinned release archive (`scripts/check-lean-leg.sh`, 147 of 147 printed theorems axiom-free) and Coq 8.18.0 on a copy with `From Stdlib` read as `From Coq` (137 of 137 printed theorems closed). The pinned Agda 2.6.4.3 and Rocq 9.3.0 run in CI. No row is PWG-1. Since standards#1625 (2026-11-17, owner ruling 2026-11-16), PWG-1 needs every counted witness to name the image its checker ran in, pinned by digest (§8.2). The Rocq leg runs in `rocq/rocq-prover:9.3.0` pinned by digest, and its receipt names it. The Agda and Lean legs run in base images pinned by digest and install their checker at run time. The owner ruled on 2026-11-18 that this is not isolation (`PROOF-NEEDS.adoc`, PN-7): their receipts name no image until the legs run in prover images that ship the checker. The 27 rows that were PWG-1 at `47de4a8` were graded by an earlier reader, before that rule; the same evidence now gives PWG-2ii. The proofs did not change. M-2 stays ungraded whatever the receipts say. M-2 is `PROVEN` by a Lean bridge only. Its statement names a Lean-only object, so it has no Agda witness and cannot reach PWG-3 (§8.1). Every other row is graded by the receipts once one is current. No row rests on an axiom: the Agda leg is `--safe` with the trusted base below, the Rocq leg prints every theorem closed under the global context, and the Lean leg prints no axiom for any theorem. `foundation_diverse` is false for every row: Agda, Rocq and Lean are all dependent type theories (§8.3). == Agda leg: invocation and receipt * *Invocation.* `scripts/check-agda.sh` runs `agda --safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check -W error -i src`, and every module also declares `--exact-split --no-sized-types --no-guardedness` (the estate strict flag set, from main #21) over `src/ResourceAlgebra/All.agda`, the unit tests (`tests/unit/AllTests.agda`) and the twenty-three expected rejections. A rejection must fail at its invalid declaration with the message its `-- EXPECT:` line names. A refusal with any other message fails the gate, and so does any warning, `UnsupportedIndexedMatch` included. Until 2026-11-16 the gate suppressed that one warning; the core raised none, and `tests/check_agda_warning_gate_test.sh` now shows the gate's flags refuse an indexed match. * *Import cone.* Only `src/ResourceAlgebra/`: no standard library and no other library. There is no `postulate` (refused by `--safe`), no hole and no `TERMINATING` or similar pragma. * *Trusted base (§8.4.7).* The cone Agda reports for `All.agda` also holds seven modules supplied with the prover: `Agda.Primitive` and `Agda.Builtin.Bool`, `Equality`, `List`, `Nat`, `Sigma` and `Unit` (`List` joined with `Ledger.agda`). The gate scans them and allows exactly four postulates, all in `Agda.Primitive`: `Level` (`BUILTIN LEVEL`), `lzero` (`BUILTIN LEVELZERO`), `lsuc` (`BUILTIN LEVELSUC`) and `_⊔_` (`BUILTIN LEVELMAX`). It checks the declared names and the bindings. Any other postulate in a prover-supplied module stops the gate, and `tests/check_agda_trusted_base_test.sh` plants four such changes to show that it does. The receipt lists the four names and bindings. * *Receipt.* CI (`proofs.yml`) installs Agda 2.6.4.3, asserts the version and checks the proofs. It then writes a receipt to the run summary with the source commit, `agda --version`, the package version and its SHA256 from Debian's signed index, the digest of the installed binary, the flags read from the script, and the import cone. The job runs in `debian:trixie-slim` pinned by digest and installs Agda at run time. That is not the isolation §8.2 asks for (owner ruling 2026-11-18, PN-7), so the receipt names no image for this leg. Installing Agda from Debian rather than Guix is a §6 deviation, recorded in `proofs.yml`; its state is `open`. * *History.* Until 2026-11-09 the gate ran `--safe --without-K --no-libraries --double-check`. That profile passed in CI from 2026-10-14 (resource-algebra#4). Under §2.1 those runs are historical evidence, not receipts for the canonical profile. On 2026-11-09, `_≤_` and the constructor-injectivity lemmas were restated so that the core checks under `--cubical-compatible` with no `UnsupportedIndexedMatch` warning. The statements of the theorems below did not change. * *Expected rejections.* Twenty-three claims must be refused, each with the message its `-- EXPECT:` line names. Those messages are: `min m n != max m n`, `p != zero`, `suc _ != zero`, `max m n != m + n`, `max p₁ (n₁ + p₂) != p₁ + p₂`, `3 != 5`, `inf != fin 3`, `… != bot`, `false != true`, `a != bot of type Grade` (C-4b's control, `tests/reject/DiamondDistributes.agda`), and for the evidence ledger `tested-only != argued`, `argued != proven` and `tested-only != proven`. The controls of P-3 and P-4 are refused with `2 != 1`, and the control of K-2 with `suc n != n`. The seven controls of D-1 to D-5 are refused with `Drift.−∞ !=` (SHWMZeroIsOne), `1 != 0` (SHWMAnnihilates), `0 != 1` (SHWMPrefixKeepsPeak and ClampIsStrict), `!= … Drift.−∞` (EmbedPreservesZero), `2 != 1` (SHWMSyncAbove) and `⊤ !=< ⊥` (SignedDriftExceedsPeak). These are controls for the PROVEN rows. They are not themselves theorems. == Recheck legs (every row) Every theorem row carries this record, except M-2 (see below). E-1, E-2 and E-3 are covered: their Rocq and Lean legs are re-proved by hand, in the same files and by the same routes as every other row, their statements are reconciled (see Statement correspondence), and the receipt below records a run of all three legs on a commit that contains them. P-1 to P-4 and K-1 to K-4 are re-proved in both legs in the same way. D-1 to D-8 are re-proved in both legs in the same way. No receipt records a run of them yet (see Census). [cols="1,1,1,1,2",options="header"] |=== | Leg | Route | §5 | §2.2 | Receipts | Agda | source | `PROVEN` | `AGDA-VERIFIED` | `superseded`: CI run `44435465068`, job `135263084676`. No current receipt yet | Rocq | `re-proved` (transport `unavailable`; see below) | `PROVEN`: no axiom (`Print Assumptions` reports every theorem closed under the global context), and `rocqchk` rechecks the compiled file | `RECONCILED`: statements compared and residual differences recorded below | `superseded`: CI run `44435465068`, job `135263084711`. No current receipt yet | Lean | `re-proved`, Lean core only, no Mathlib | `PROVEN`: no axiom (`#print axioms` reports none for every theorem) | `RECONCILED`: statements compared and residual differences recorded below | `superseded`: CI run `44435465068`, job `135263084426`. No current receipt yet |=== === Receipts All three legs passed in one `proofs.yml` run, https://github.com/hyperpolymath/resource-algebra/actions/runs/44435465068[`44435465068`], on source commit `201e05bf3ab7acaa4a7a4a2d24f87c561d4e7f23` (2026-11-19), the merge of resource-algebra#58. The same run passed the `Proofs verdict` job and the coverage-exemption check. The machine-readable record is `verification/receipts/resource-algebra-proofs_praxis.deed` (§8.5.1). Each job's run summary holds its receipt: the checker and its asserted version, the invocation, the input digest, the result and the axioms. All three rows below are `superseded` by the change that added D-1 to D-8 (see Census). [cols="1,2,3",options="header"] |=== | Leg | Checker | Input SHA256 and axioms | Agda | Agda 2.6.4.3 (Debian `agda-bin 2.6.4.3-1+b2`) | `2332490d8a1d57df…3ee08cb9` over the import cone of `src/ResourceAlgebra/All.agda` (16 files, listed in the deed's `(inputs-manifest …)`); `--safe`, the postulate scan of `src/`, and the trusted base: `Level`, `lzero`, `lsuc` and `_⊔_` in `Agda.Primitive`, each bound by its `BUILTIN` pragma | Rocq | Rocq 9.3.0, stdlib 9.2.0, then `rocqchk` | `14a19b0646438269…36666e8e` over `ResourceAlgebra.v` (file SHA256 `44231e873c1e82b2…7133b46f`); every printed theorem closed under the global context. Image `rocq/rocq-prover:9.3.0@sha256:97a68f23…` | Lean | Lean 4.35.0 with Lake 5.0.0, core only, under `lake` | `f977484c50484262…0a6cff74` over `ResourceAlgebra.lean` (file SHA256 `87476318c1eafe51…a3045f19`), its `lakefile.toml` and `lake-manifest.json`, `lean-toolchain`, `scripts/check-lean-leg.sh`, `scripts/check-lean-bridge.sh` (file SHA256 `6b4dd77974515696…e37de14b`, which holds the tropical-types pin) and the M-2 bridge with its Lake package files, with the import of tropical-types at `f2e465c` (import digest `c176b35aaec8d21b…3095e01`); no printed theorem depends on an axiom, in the leg or in the bridge |=== The input digests above are the `:inputs-sha256` values of the receipt: the generator computes each from the git objects at that commit with the reference script (standards `scripts/proof-inputs-sha256.sh`, §8.5.1). The grades do not carry forward (§8.4). A later commit that changes `src/`, a recheck leg, the gate or the checker pins needs a new receipt for the new commit, and until then its rows fall back to the grade its receipts support. The receipt deed is no longer written by hand. `scripts/proof-receipt.sh --write` generates it with the estate's shared generator (standards `scripts/proof-receipt.sh`, pinned at `f4e83044` on the standards branch `claude/receipt-open-claims`, not yet on standards main; repin once it lands). `scripts/proof-receipt.sh --check` regenerates it, refuses any difference, runs the §8.5.3 git checks, checks that each current receipt still describes the tree, and runs the pinned reader with a negative control. The `receipt` job of `proofs.yml` runs `--check` on every commit. Recording a new run is still a manual step (`--run-row`, then `--write`). What this asks of a change. A pull request that changes a leg's inputs (`src/`, a recheck file, the bridge or the tropical-types pin) makes the `receipt` job fail, because the current receipt of that leg no longer describes the tree. The change then marks that leg's row `superseded` in the ledger of `scripts/proof-receipt.sh`, with its reason, and regenerates the receipt: the rows fall to the grade the remaining receipts support, which is what §8.4 says. After the merge, a follow-up records the main run of the new commit and the grades return. The Lean input set includes `scripts/check-lean-bridge.sh`, which holds the tropical-types pin. The run summaries that hold the per-leg digests are kept by GitHub for a limited time. Earlier receipts, all `superseded`: * Run `44209774341` on source commit `15fa113c7427e2de009eade9148295d08c046b33` (2026-11-18), the merge of resource-algebra#45. It derived PWG-2ii for 31 rows. It predates P-1 to P-4 and K-1 to K-4, and its Lean job called `lean` directly, before the leg moved under `lake` (resource-algebra#53). * Run `44202493421` on source commit `2b9bf3fb0b0435705b0ad92b929edfe80a9be000` (2026-11-17), the merge of resource-algebra#48. A hand-written receipt that derived PWG-2ii for 28 rows and `ungraded` for M-2. It predates E-1, E-2 and E-3, and its Lean input set did not list `scripts/check-lean-bridge.sh`. * Run `44015282682` on source commit `47de4a8ee49df37b9bc5f7fede2f54e83e243160` (2026-11-17). It predates C-4b and the M-2 bridge. It recorded PWG-1 for 27 rows, under the reader that mathesis pinned (standards `e5a39d7`), which predates the image rule of standards#1625; the reader at `940a27af` refuses those grades. * Run `43056527841` on source commit `f211fc1406d345fa6e972bcfc960c0acd57df1cd` (2026-11-11). After it, the gate dropped `-W noUnsupportedIndexedMatch` (resource-algebra#37) and F-5's `maps-disagree-at-positive` moved from `tests/unit/MorphismTest.agda` into `src/ResourceAlgebra/Morphism.agda` (resource-algebra#36). That run checked the lemma, because the gate checks the unit tests, but the Agda leg's inputs manifest listed only `src/`, so a change to the test file would not have invalidated F-5's receipt. The current receipt's manifest covers it. * Run `42629220745` on source commit `9f175cc57f9c2c2db255c1b3161e24cfba4abc4d` (2026-11-09). F-5's classifier, the strict flag set and `⊕-least` all changed after it. === The legs: where, how checked, toolchains * *Lean.* `verification/proofs/lean4/ResourceAlgebra.lean`, checked by `lake build` (Lean 4.35.0, pinned by `lean-toolchain`) on a copy of the Lake package `verification/proofs/lean4/lakefile.toml`, which has no dependencies; `lake-manifest.json` is committed. CI runs it through `scripts/check-lean-leg.sh` in `ubuntu:24.04` pinned by digest, installs the upstream release archive against a SHA256 and asserts the Lean and Lake versions: a §6 deviation, recorded in `proofs.yml`, state `open`. The arithmetic is proved by structural recursion, as in Agda's Prelude, so no theorem depends on `propext` or `Quot.sound`. CI fails if any printed theorem depends on an axiom. * *Rocq.* `verification/proofs/coq/ResourceAlgebra.v`, checked by `rocq compile` 9.3.0 with the standard library 9.2.0 (`Arith`, `Lia`), then by `rocqchk`. CI runs the upstream `rocq/rocq-prover:9.3.0` image, pinned by digest, and asserts the version: a §6 deviation, recorded in `proofs.yml`, state `open`. HWM equality uses `Peano_dec.le_unique`, which the standard library proves, not assumes. CI fails unless every printed theorem is closed under the global context. === Why the Rocq leg is re-proved, not transported PROOF-POLICY §2 asks for Dedukti transport first. For this development it is `unavailable`, for two reasons checked on 2026-11-09: . *The translator cannot read the canonical profile.* Agda2Dedukti's last commit (`c7c7d67`, January 2022) pins a fork of Agda 2.6.3-dev (`Deducteam/agda@b026db1`) that has no `--cubical-compatible` option. It builds with Stack on GHC 8.10.7, whose download host this session's network refuses. So the translator was not run on these sources. . *Lambdapi's Rocq export drops the computation the proofs need.* The Agda2Dedukti encoding expresses Agda's definitional unfolding (`max`, `+`, every instance operation) as rewrite rules. Lambdapi 4.0.0's `raw_coq` export prints "Command not translated" for every `rule` and turns every symbol into an `Axiom`. On a three-line probe whose proof depends on one such rule, Rocq 9.3.0 rejects the exported definition (`"refl (s z)" has type "P (s z)" while it is expected to have type "P (add (s z) z)"`). The `stt_coq` export needs an encoding of simple type theory, which this is not. Even an output that type-checked would rest on one `Axiom` per symbol, which PROOF-POLICY §8.4 would have to list. === Statement correspondence Both legs restate each Agda declaration with the same carriers, operations and quantifiers. These differences hold for every row: * Agda's `≡` lives in `Set`, checked `--without-K`. Rocq's and Lean's `=` live in an impredicative `Prop`, and Lean's is proof-irrelevant. Every statement here is an equation, an order fact or a negation, so this changes no statement's strength. * The law records (`IsAltMonoid`, `IsSeqMonoid`, `IsOrdered`, `IsDioid`, `IsAnnihilating`) are `Prop` records in Rocq and Lean and `Set` records in Agda, with the same fields. `ResourceAlgebra` itself has the same seven fields. * `max` and `min` are defined in both legs by the same three equations as Agda's Prelude (`rmax`, `rmin`). The Rocq leg proves them equal to the standard library's `Nat.max` and `Nat.min` before `lia` uses them. `_+_` recurses on its first argument in Agda and Rocq and on its second in Lean. It is the same function. * HWM's bound `drift ≤ peak` is Agda's own `_≤_` and the standard `le` in the legs. Both are the usual order on ℕ, so the carrier has the same elements, and in all three provers two grades are equal when their peak and drift are. * Questions' carrier `Q n` is defined by recursion on `n` in all three provers: Agda's `⊤` and `Σ` (both with eta), Lean's `Unit` and `Prod`, and Rocq's `unit` and `prod`. Rocq has no definitional eta for either, so its leg splits a grade into its bits before it computes; `zip` there takes the two projections where Agda matches on the pair. The statements are the same equations. Agda's `_∨_` and `_∧_` are defined by the same two equations as Lean's `or`/`and` and Rocq's `orb`/`andb`. [cols="1,2,2,2",options="header"] |=== | Row | Agda | Lean (`RA.`) | Rocq | C-1 | `ResourceAlgebra`, `IsAltMonoid.unitʳ` | `ResourceAlgebra`, `IsAltMonoid.unitr` | `ResourceAlgebra`, `alt_unitr` | C-2 | `≼-refl`, `≼-trans`, `≼-antisym`, `𝟘-least`, `⊕-upperˡ`, `⊕-upperʳ`, `⊕-least` | `ResourceAlgebra.le_refl`, `le_trans`, `le_antisym`, `zero_least`, `add_upperl`, `add_upperr`, `add_least` | `le_refl`, `le_trans`, `le_antisym`, `zero_least`, `add_upperl`, `add_upperr`, `add_least` | C-3 | `IsDioid.ordered` | `IsDioid.ordered` | `dioid_ordered` | C-4a | `HWM-dioid`, `HWM-not-annihilating` | `dioid_not_annihilating` (their conjunction) | `dioid_not_annihilating` (their conjunction) | C-4b | `Grade`, `Diamond`, `Diamond-ordered`, `Diamond-annihilating`, `Diamond-not-dioid` | `DGrade`, `Diamond`, `Diamond_ordered`, `Diamond_annihilating`, `Diamond_not_dioid`, and `ordered_annihilating_not_dioid` (their conjunction) | the same names | L-1 | `Loss`, `Loss-dioid`, `Loss-ordered`, `Loss-annihilating` | `Loss`, `Loss_dioid`, `Loss_ordered`, `Loss_annihilating` | the same names | M-1 | `MaxPlus`, `MaxPlus-dioid`, `MaxPlus-ordered`, `MaxPlus-annihilating` | `MaxPlus`, `MaxPlus_dioid`, `MaxPlus_ordered`, `MaxPlus_annihilating` | the same names | H-1 | `HWM`, `HWM-dioid`, `HWM-ordered` | `HWM`, `HWM_dioid`, `HWM_ordered`, `HWM_zero_eq_one` | the same names | H-3 | `HWM-not-annihilating` | `HWM_not_annihilating` | `HWM_not_annihilating` | N-1 | `MinMax`, `MinMax-dioid`, `MinMax-ordered`, `MinMax-annihilating` | `MinMax`, `MinMax_dioid`, `MinMax_ordered`, `MinMax_annihilating` | the same names | Q-1 | `Questions`, `Questions-dioid`, `Questions-ordered`, `Questions-annihilating` | `Questions`, `Questions_dioid`, `Questions_ordered`, `Questions_annihilating` | the same names | Q-2 | `same-amount-different-loss` | `same_amount_different_loss` | `same_amount_different_loss` | Q-3 | `both-lost` | `both_lost` | `both_lost` | Q-4 | `no-branch-achieves-meet` | `no_branch_achieves_meet` | `no_branch_achieves_meet` | F-1 | `id-hom`, `_∘h_`, `id-lax`, `_∘l_`, `lax` | `idHom`, `Hom.comp`, `idLax`, `LaxHom.comp`, `lax` | `id_hom`, `comp_hom`, `id_lax`, `comp_lax`, `lax` | F-2 | `peak-lax` | `peakLax` | `peak_lax` | F-3 | `peak-not-strict` | `peak_not_strict` | `peak_not_strict` | F-4 | `no-strict-from-HWM`, `no-strict-HWM→MaxPlus`, `no-strict-HWM→Loss` | `no_strict_from_HWM`, `no_strict_HWM_MaxPlus`, `no_strict_HWM_Loss` | the same names | F-5 | `zero-test-hom`, `support-hom`, `Loss→MaxPlus`, `maps-disagree-at-positive`, `Loss→MaxPlus-collapses`, `no-injective-Loss→MaxPlus` | `zeroTestHom`, `supportHom`, `Loss_to_MaxPlus`, `maps_disagree_at_positive`, `Loss_to_MaxPlus_collapses`, `no_injective_Loss_to_MaxPlus` | `zero_test_hom`, `support_hom`, `Loss_to_MaxPlus`, `maps_disagree_at_positive`, `Loss_to_MaxPlus_collapses`, `no_injective_Loss_to_MaxPlus` | F-6 | `support′-hom`, `MaxPlus→Loss` | `support'Hom`, `MaxPlus_to_Loss` | `support'_hom`, `MaxPlus_to_Loss` | F-7 | `loss-bottleneck` | `lossBottleneck` | `loss_bottleneck` | F-8 | `one-question-hom`, `one-question-needs`, `one-question-unique` | `oneQuestionHom`, `one_question_needs`, `one_question_unique` | `one_question_hom`, `one_question_needs`, `one_question_unique` | F-9 | `first-question`, `later-questions` | `firstQuestion`, `laterQuestions` | `first_question`, `later_questions` | F-10 | `count-not-⊕` | `count_not_add` | `count_not_add` | S-1 | `occupancy-is-not-cost` | `occupancy_is_not_cost` | `occupancy_is_not_cost` | S-2 | `alternatives-differ` | `alternatives_differ` | `alternatives_differ` | S-3 | `maxplus-order`, `loss-order-reversed` | `maxplus_order`, `loss_order_reversed` | `maxplus_order`, `loss_order_reversed` | S-4 | `bottleneck-is-not-sum` | `bottleneck_is_not_sum` | `bottleneck_is_not_sum` | E-1 | `Evidence`, `Evidence-dioid`, `Evidence-ordered`, `Evidence-annihilating`, `≼→≤`, `≤→≼`, `≼-proven`, `⊓e-lowerˡ`, `⊓e-lowerʳ`, `⊓e-greatest` | `Evidence`, `Evidence_dioid`, `Evidence_ordered`, `Evidence_annihilating`, `le_to_rank`, `rank_to_le`, `le_proven`, `eMeet_lowerl`, `eMeet_lowerr`, `eMeet_greatest` | `Evidence`, `Evidence_dioid`, `Evidence_ordered`, `Evidence_annihilating`, `le_to_rank`, `rank_to_le`, `le_proven`, `emeet_lowerl`, `emeet_lowerr`, `emeet_greatest` | E-2 | `eff-≼-own`, `eff-≼-dep`, `eff-≼-reach` | `eff_le_own`, `eff_le_dep`, `eff_le_reach` | the same names | E-3 | `Respects`, `eff-respects`, `restrict`, `eff-greatest` | `Respects`, `eff_respects`, `restrict`, `eff_greatest` | the same names | P-1 | `IsParallel` (`unitʳ`, `distribʳ`, `monoˡ`, `monoʳ`), `SyncBelow`, `SyncAbove`, `seq-parallel`, `seq-sync-below`, `seq-sync-above` | `IsParallel` (`unitr`, `distribr`, `mono_l`, `mono_r`), `SyncBelow`, `SyncAbove`, `seq_parallel`, `seq_sync_below`, `seq_sync_above` | `IsParallel`, `par_unitr`, `par_distribr`, `par_mono_l`, `par_mono_r`, `SyncBelow`, `SyncAbove`, `seq_parallel`, `seq_sync_below`, `seq_sync_above` | P-2 | `Loss-parallel`, `Loss-sync-below`, `Loss-sync-above`, `MaxPlus-work`, `MaxPlus-work-sync-below`, `MaxPlus-work-sync-above` | `Loss_parallel`, `Loss_sync_below`, `Loss_sync_above`, `MaxPlus_work`, `MaxPlus_work_sync_below`, `MaxPlus_work_sync_above` | the same names | P-3 | `tPar`, `MaxPlus-span`, `MaxPlus-span-sync-above`, `MaxPlus-span-not-sync-below` | `tPar`, `MaxPlus_span`, `MaxPlus_span_sync_above`, `MaxPlus_span_not_sync_below` | the same names | P-4 | `_∥h_`, `HWM-parallel`, `HWM-sync-below`, `HWM-not-sync-above` | `parH`, `HWM_parallel`, `HWM_sync_below`, `HWM_not_sync_above` | the same names | K-1 | `IsStar` (`star-𝟙`, `star-step`), `unit-top-star`, `Loss-unit-top`, `Loss-star` | `IsStar` (`one_le`, `step`), `unit_top_star`, `Loss_unit_top`, `Loss_star` | `IsStar`, `star_one`, `star_step`, `unit_top_star`, `Loss_unit_top`, `Loss_star` | K-2 | `NoFixpoint`, `no-star`, `MaxPlus-no-fixpoint`, `MaxPlus-no-star`, `HWM-no-fixpoint`, `HWM-no-star` | `NoFixpoint`, `no_star`, `MaxPlus_no_fixpoint`, `MaxPlus_no_star`, `HWM_no_fixpoint`, `HWM_no_star` | the same names | K-3 | `MaxPlusTop`, `MaxPlusTop-dioid`, `MaxPlusTop-ordered`, `MaxPlusTop-annihilating`, `lift-hom`, `lift-injective` | `MaxPlusTop`, `MaxPlusTop_dioid`, `MaxPlusTop_ordered`, `MaxPlusTop_annihilating`, `liftHom`, `lift_injective` | `MaxPlusTop`, `MaxPlusTop_dioid`, `MaxPlusTop_ordered`, `MaxPlusTop_annihilating`, `lift_hom`, `lift_injective` | K-4 | `star-t`, `MaxPlusTop-star` | `starT`, `MaxPlusTop_star` | the same names | D-1 | `Drift-RA`, `Drift-dioid`, `SHWM`, `SHWM-dioid`, `SHWM-ordered` | `Drift_RA`, `Drift_dioid`, `SHWM`, `SHWM_dioid`, `SHWM_ordered` | `Drift_RA`, `Drift_dioid`, `SHWM`, `SHWM_dioid`, `SHWM_ordered` | D-2 | `SHWM-𝟘≢𝟙`, `SHWM-absorbˡ`, `SHWM-seq-𝟘`, `SHWM-not-annihilating` | `SHWM_zero_ne_one`, `SHWM_absorbl`, `SHWM_seq_zero`, `SHWM_not_annihilating` | the same names | D-3 | `embed-⊗`, `embed-⊕`, `embed-lax`, `embed-injective`, `embed-𝟘`, `no-strict-HWM→SHWM`, `clamp-embed`, `clamp-lax`, `clamp-not-strict` | `embed_mul`, `embed_add`, `embedLax`, `embed_injective`, `embed_zero`, `no_strict_HWM_SHWM`, `clamp_embed`, `clampLax`, `clamp_not_strict` | `embed_mul`, `embed_add`, `embed_lax`, `embed_injective`, `embed_zero`, `no_strict_HWM_SHWM`, `clamp_embed`, `clamp_lax`, `clamp_not_strict` | D-4 | `HWM-prefix-keeps-peak`, `prefix-lowers-peak` | `HWM_prefix_keeps_peak`, `prefix_lowers_peak` | the same names | D-5 | `_∥s_`, `SHWM-parallel`, `SHWM-sync-below`, `SHWM-not-sync-above` | `parS`, `SHWM_parallel`, `SHWM_sync_below`, `SHWM_not_sync_above` | the same names | D-6 | `SHWM-no-fixpoint`, `SHWM-no-star` | `SHWM_no_fixpoint`, `SHWM_no_star` | the same names | D-7 | `speak-lax`, `speak-embed` | `speakLax`, `speak_embed` | `speak_lax`, `speak_embed` | D-8 | `bic-𝟙`, `bic-·`, `bic-injective`, `bic-onto`, `bic-HWM`, `HWM-bic` | `bic_one`, `bic_mul`, `bic_injective`, `bic_onto`, `bic_HWM`, `HWM_bic` | the same names |=== C-4b's carrier is `Grade` in Agda and `DGrade` in Lean and Rocq; the join and meet have the same tables in all three. Agda proves each law by evaluating one Boolean check over every choice of grades and reading it back through soundness lemmas; Lean and Rocq prove the same equations by case analysis on the grades. The statements do not change. F-5's classifier `Loss→MaxPlus` returns Agda's `_⊎_`, a sum in `Set` that says *which* of the two maps a morphism is. Both legs now return a sum too (Lean's `PSum`, Rocq's `sumbool`), so the statements correspond exactly. Until this change the legs returned the propositional `Or`, which says only that a morphism is one of the two: a weaker statement, so the receipts at `9f175cc` do not recheck F-5's classifier either (see Receipts). No leg rests on an assumption beyond its prover's kernel. P-1 to P-4 and K-1 to K-4 have these residual differences: * The carrier of `MaxPlusTop` is `Grade` (`bot`, `val`, `top`) in Agda and `TGrade` in Lean and Rocq; Rocq's constructors are `tbot`, `tval` and `ttop`. The operations have the same tables in all three. * Agda's field `IsStar.unfold` is `unfold_eq` in Lean and `star_unfold` in Rocq. * K-4: Agda (`go`) and Lean (`starT_go`) prove the left least-fixed-point law by cases from `b ≼ x` and `a ⊗ x ≼ x`, and get the right law from it because ⊗ commutes. Rocq proves both laws by case analysis on the three grades. The statements are the same. * P-4: Agda and Lean give the peak bound of `HWM-sync-below` as an explicit chain of ℕ lemmas; Rocq closes it with `lia`. D-1 to D-8 have these residual differences: * The drift carrier is the integers with a bottom in all three provers, with the same operations (`maxd`/`dmax`, `_+d_`/`dadd`) and the same bound, defined by the same cases (Agda `_≤ᵈ_`, Lean `dle`; Rocq `dleb`, a boolean). Agda defines its own integers (`pos`, `negsuc`), because `Agda.Builtin.Int` imports `Agda.Builtin.String`, whose postulates the trusted-base gate refuses. Agda and Lean read an integer as a difference of naturals and prove every integer law by hand from that reading. Lean uses only the two constructors of its `Int`, not its library lemmas, which bring in `propext`. Rocq uses the standard library's `Z` and closes the arithmetic with `lia`. * The bound is a `Prop` in Lean and Agda and a boolean equation in Rocq, so Rocq's grades are equal by `Eqdep_dec.UIP_dec`, a theorem of the standard library. Every statement is about peaks and drifts, so this changes none. * The Bicyclic carrier is a record (`⟨ rise , fall ⟩`) in Agda and Lean and `nat * nat` in Rocq. Agda and Lean state `bic-onto` with a `Σ`/`∃` over finite-drift grades; Rocq with `exists`. E-1, E-2 and E-3 have these residual differences: * Names follow each prover's convention. The statuses are `openRow`, `testedOnly`, `argued`, `provenWithPostulates` and `proven` in both legs. Rocq uses the Lean spelling, not snake case, because `scripts/scan-dangerous.sh` refuses any lowercase `postulate` in leg code, even inside a longer name. For the same reason the test Agda calls `postulates-below-proven` is `provenWithPostulates_below_proven` in both legs. `_⊔e_` and `_⊓e_` are `eJoin` and `eMeet` in Lean and `ejoin` and `emeet` in Rocq; `from-rank`, `own-of` and `⨅` are `fromRank`, `ownOf` and `meetAll` in Lean and `from_rank`, `own_of` and `meet_all` in Rocq. Each is defined by the same equations as in Agda, `rank` and `from-rank` included. Ledger.agda's own `map` is `mapList` in Lean and `map_list` in Rocq, by the same two equations. * Membership (`_∈_`) and `Dep` are defined by the same recursion in all three provers, but they are `Prop`-valued in the legs: Agda's `_⊎_` and `⊥` in `Set` become `∨` and `False`. `Reach` is an inductive `Prop` in the legs and `Respects` a `Prop` record. A proof-relevant membership witness in Agda can be one of several when an index is repeated, and a propositional one cannot. These types occur only as hypotheses, or, for `Respects`, as a record whose fields conclude in equations, so no statement changes strength. * Agda's `Reach` takes the starting row as a parameter that `step` varies; both legs take it as an index. The constructors and their types are the same. * The worked ledger and the expected values of `tests/unit/EvidenceTest.agda` are restated in both legs (`sequence_keeps_the_weaker`, `alternative_keeps_the_stronger`, `provenWithPostulates_below_proven`, `open_annihilates`, `row2_is_argued`, `row4_is_tested_only`, `row0_keeps_its_evidence`). They are tests, not rows. They pin the chain order, which the laws of E-1..E-3 cannot see: a relabelling of the chain satisfies every law. === M-2 bridge (Lean only) M-2 does not carry the record above. Its statement names tropical-types' `instance : CommSemiring Tropical`, a Lean 4 object, so it is proved in Lean against that object and in no other prover. [cols="1,1,1,1,2",options="header"] |=== | Leg | Route | §5 | §2.2 | Receipts | Agda | source, `open` (`AGDA-PENDING`): the receipt profile gives every claim an Agda leg with route `source`, so this leg cannot be `unavailable`. No Agda statement of M-2 exists. | — | — | — | Rocq | `unavailable`: the statement names a Lean object | — | — | — | Lean | `re-proved` (the profile reserves `source` for Agda), Lean core only, no Mathlib | `PROVEN`: no axiom (`#print axioms` reports none for any of the six printed theorems) | `LEAN-CHECKED`, not `RECONCILED`: there is no Agda statement to reconcile with | CI run `44435465068`, job `135263084426`, with `(import :repository "hyperpolymath/tropical-types" :commit "f2e465c…")` (§8.5.1) |=== * *Bridge.* `verification/bridges/tropical-types/TropicalBridge.lean` imports this repository's Lean leg (`ResourceAlgebra.lean`) and tropical-types' `TropicalSessionTypes.lean`. It proves `rmax_eq_max` (this leg's `rmax` is Lean's `Nat.max`), that `toHT` and `ofHT` are inverse, and that `toHT` sends ⊕, ⊗, 𝟘 and 𝟙 to `tAdd`, `tMul`, `.bot` and `.val 0` (`maxplus_agrees_tropical`). Four `example`s check by `rfl` that these are the `+`, `*`, `0` and `1` of the instance. * *Pin.* `scripts/check-lean-bridge.sh` fetches `hyperpolymath/tropical-types` at `f2e465c966d14d4986dfc492875cc54653d9751e`, checks the fetched commit, builds both modules and the bridge as a Lake package (`verification/bridges/tropical-types/lakefile.toml`, no dependencies, the pin stays in the script) with `lake build` under the pinned Lean 4.35.0, in the same digest-pinned image as the Lean leg. It fails on any error, on any printed theorem that depends on an axiom, and when no theorem is printed (`tests/check_lean_bridge_test.sh`). It prints the SHA256 of the imported file and of the bridge, for a receipt's `(import …)` clause (§8.5.1). * *Trusted boundary.* tropical-types' own instance laws depend on `propext` and `Quot.sound` at that commit. The bridge theorems do not use those laws and depend on no axiom. The `example`s mention the instance and so are not counted. * *Grade.* None. PWG-3 needs an Agda witness (§8.1), and there is none. == Core (Core.agda) [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | C-1 | `ResourceAlgebra`: alternatives form an idempotent commutative monoid and sequencing a monoid. | `PROVEN` (the definition, plus the derived `unitʳ`) | ungraded | C-2 | The relation `≼` induced by ⊕ is a partial order. `𝟘` is least and `⊕` is its join. | `PROVEN` (`≼-refl`, `≼-trans`, `≼-antisym`, `𝟘-least`, `⊕-upperˡ/ʳ`; the least-upper-bound half is `⊕-least`, from main #21) | ungraded | C-3 | Every dioid is ordered: distributivity makes `⊗` monotone on both sides. | `PROVEN` (`IsDioid.ordered`) | ungraded | C-4a | A dioid need not be annihilating. HWM is a dioid and is not annihilating. | `PROVEN` (`HWM-dioid`, `HWM-not-annihilating`); control `tests/reject/HWMAnnihilates.agda` | ungraded | C-4b | An annihilating ordered algebra need not be a dioid. The diamond lattice M3 (`Instances/Diamond.agda`: ⊕ = join, ⊗ = meet, 𝟘 = bottom, 𝟙 = top) is ordered and annihilating, and is not a dioid: a ⊗ (b ⊕ c) = a, while (a ⊗ b) ⊕ (a ⊗ c) = 𝟘. | `PROVEN` (`Diamond`, `Diamond-ordered`, `Diamond-annihilating`, `Diamond-not-dioid`); control `tests/reject/DiamondDistributes.agda` | ungraded |=== == Instances [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | L-1 | `Loss` is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating`, with ⊕ = min, ⊗ = +, 𝟘 = inf and 𝟙 = fin 0. | `PROVEN` (Instances/Loss.agda) | ungraded | M-1 | `MaxPlus` is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating`, with ⊕ = max, ⊗ = +, 𝟘 = bot and 𝟙 = val 0. | `PROVEN` (Instances/MaxPlus.agda) | ungraded | M-2 | `MaxPlus` agrees with tropical-types' `instance : CommSemiring Tropical` (Lean 4). | `PROVEN` in Lean only, by the bridge `verification/bridges/tropical-types/TropicalBridge.lean` (`maxplus_agrees_tropical`): `toHT` and `ofHT` are inverse, and `toHT` sends ⊕, ⊗, 𝟘 and 𝟙 to tropical-types' `tAdd`, `tMul`, `.bot` and `.val 0`, which are the fields of the instance. tropical-types is pinned at `f2e465c966d14d4986dfc492875cc54653d9751e`; see "M-2 bridge" below for the legs. The Rocq leg is `unavailable` and the Agda leg `open`: the statement names a Lean object. | ungraded: no Agda witness, so PWG-3 cannot be reached | H-1 | `HWM` (peak, drift, with drift ≤ peak) is a `ResourceAlgebra`, `IsDioid` and `IsOrdered`, and 𝟘 ≡ 𝟙. | `PROVEN` (Instances/HWM.agda) | ungraded | H-3 | `HWM` has no annihilating zero. | `PROVEN` (`HWM-not-annihilating`); control `tests/reject/HWMAnnihilates.agda` | ungraded | N-1 | `MinMax` (the bottleneck algebra) is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating` on the Loss carrier. Its operations are ⊕ = min and ⊗ = max (`_⊔g_`, with `inf` absorbing), with 𝟘 = inf and 𝟙 = fin 0. | `PROVEN` (Instances/MinMax.agda) | ungraded | Q-1 | `Questions n` (a "which" grade over `n` downstream questions) is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating`. A grade is `n` booleans, `true` where a step loses that question. Its operations are ⊕ = intersection and ⊗ = union, bit by bit, with 𝟘 = every question lost and 𝟙 = none lost. | `PROVEN` (Instances/Questions.agda) | ungraded | Q-2 | With two questions, `collapse` (loses question 1) and `shuffle` (loses question 0) each lose one question and are different grades: a count of lost questions cannot tell them apart. | `PROVEN` (`same-amount-different-loss`) | ungraded | Q-3 | In sequence, `collapse` then `shuffle` loses both questions. | `PROVEN` (`both-lost`) | ungraded | Q-4 | As alternatives, `collapse ⊕ shuffle` is 𝟙 (no question lost), while neither branch is 𝟙. So ⊕ answers "is question i kept on some branch?" and not "does one branch keep every question?". | `PROVEN` (`no-branch-achieves-meet`, with Q-2); control `tests/reject/QuestionsMeetIsABranch.agda` | ungraded | E-1 | `Evidence` (how strongly a proof-ledger row is supported) is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating`. The carrier is the closed status vocabulary of standards PROOF-POLICY §5 as a chain, weakest first: `open-row` < `tested-only` < `argued` < `proven-with-postulates` < `proven` (owner ruling 2026-11-17). Its operations are ⊕ = the stronger (join) and ⊗ = the weaker (meet), with 𝟘 = `open-row` and 𝟙 = `proven`. So `≼` reads "no stronger than", and ⊗ is the meet of `≼` (`⊓e-lowerˡ`, `⊓e-lowerʳ`, `⊓e-greatest`). | `PROVEN` (Instances/Evidence.agda); control `tests/reject/EvidenceArguedBelowTested.agda` | ungraded |=== == Evidence ledger (Ledger.agda) A proof ledger is a list of rows. Each row has its own evidence, the §5 token of its artefact, and the earlier rows it depends on, so no dependency cycle can be written. The derived status of a row, `eff`, is its own evidence in sequence (⊗ of `Evidence`) with the derived statuses of the rows it depends on. This is README-EXPLAINME's rule that a row is only as strong as the weakest step it depends on, as a theorem rather than a convention. A dependency index counts into the rows after its own row. An index at or past the number of those rows names no row, even when it is below the ledger's length, and `eff` reads it as `proven`. So any reader of a ledger must check each dependency against the length of that row's tail and refuse one that fails, as an unregistered row ID, before it derives a status. That is a precondition every reader must enforce, not a guarantee this repository gives: no reader exists yet (the standards ledger reader is planned), and the theorems below hold for every ledger, dangling references included. [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | E-2 | Soundness: a row's derived status is no stronger than its own evidence, than any row it depends on, or than the evidence of any row it reaches through dependencies. | `PROVEN` (`eff-≼-own`, `eff-≼-dep`, `eff-≼-reach`); controls `tests/reject/EvidenceProvenOverTested.agda`, `tests/reject/EvidenceArguedLinkIgnored.agda` | ungraded | E-3 | Maximality: `eff` respects the ledger, and every assignment of statuses that respects it is below `eff` row by row. So `eff` is the strongest status the ledger supports, and a recorded status above it is an overstatement. | `PROVEN` (`eff-respects`, `eff-greatest`) | ungraded |=== The worked ledger in `tests/unit/EvidenceTest.agda` closes the loop on concrete rows. A theorem about a model, applied to the code through an argued link, derives `argued`. A claim proved on top of a tested-only row derives `tested-only`. A row with no dependencies keeps its own evidence. == Morphisms (Morphism.agda) A `Hom A B` preserves 𝟘, 𝟙, ⊕ and ⊗: that is what transporting a grade equality needs. A `LaxHom A B` preserves 𝟙 and ⊕, so it is monotone, and it maps ⊗ to at most ⊗: that is what transporting a bound needs. [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | F-1 | Both notions have identities and compose, and every strict morphism is lax. | `PROVEN` (`id-hom`, `_∘h_`, `id-lax`, `_∘l_`, `lax`) | ungraded | F-2 | `peak : HWM → MaxPlus` is lax: the peak of a sequence never exceeds the sum of the peaks. | `PROVEN` (`peak-lax`) | ungraded | F-3 | `peak` is not strict: it does not preserve ⊗, whatever it does to the units. | `PROVEN` (`peak-not-strict`); control `tests/reject/PeakIsStrict.agda` | ungraded | F-4 | No strict morphism leaves HWM for an algebra with 𝟘 ≢ 𝟙. In particular, none goes to MaxPlus or to Loss. | `PROVEN` (`no-strict-from-HWM`, `no-strict-HWM→MaxPlus`, `no-strict-HWM→Loss`) | ungraded | F-5 | Exactly two strict morphisms Loss → MaxPlus exist, `zero-test` and `support`. Neither distinguishes `fin 1` from `fin 2`. | `PROVEN`. Both are morphisms (`zero-test-hom`, `support-hom`) and every morphism is one of them (`Loss→MaxPlus`). They are distinct (`maps-disagree-at-positive`), and every morphism collapses `fin 1` and `fin 2` (`Loss→MaxPlus-collapses`, `no-injective-Loss→MaxPlus`). | ungraded | F-6 | Exactly one strict morphism MaxPlus → Loss exists, `support′`. resource-algebra#3 sketched this direction as "symmetric" to Loss → MaxPlus, but it is not: there is one map, not two. The issue's other claim, that every positive grade goes to a single point, holds. | `PROVEN` (`support′-hom`, `MaxPlus→Loss`) | ungraded | F-7 | The identity on the carrier is a lax morphism Loss → MinMax: a bottleneck never exceeds the sum. | `PROVEN` (`loss-bottleneck`) | ungraded | F-8 | Out of one question there is exactly one strict morphism into an algebra `B`: lost goes to 𝟘 and kept goes to 𝟙. It exists exactly when `B` has 𝟘 ⊗ 𝟘 ≡ 𝟘, which every annihilating algebra has, and HWM too. | `PROVEN` (`one-question-hom`, `one-question-needs`, `one-question-unique`) | ungraded | F-9 | Taking the first question of `Questions (suc n)`, and dropping it, are strict morphisms. Composed, they read any single question alone. | `PROVEN` (`first-question`, `later-questions`) | ungraded | F-10 | The number of lost questions does not preserve ⊕: `collapse` and `shuffle` each count 1 and their ⊕ counts 0. So no map into Loss or MinMax that factors through the count is strict or lax. | `PROVEN` (`count-not-⊕`) | ungraded |=== == Separation (Separation.agda) These rows are closed statements about particular grades. Each is a kernel-checked proof of its proposition, so it is `PROVEN`. They were listed as `TESTED` before 2026-11-09. That was a misreading: `TESTED` is for checks over a bounded or sampled domain. [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | S-1 | Sequencing peaks 2 and 3 gives 3 under HWM and 5 under MaxPlus: an occupancy bound is not a cost bound. | `PROVEN` (`occupancy-is-not-cost`) | ungraded | S-2 | On the same numbers, alternatives give `fin 2` under Loss and `val 3` under MaxPlus: echo's join is min, while tropical's is max. | `PROVEN` (`alternatives-differ`) | ungraded | S-3 | `val 1 ≼ val 2` in MaxPlus but `fin 2 ≼ fin 1` in Loss: the induced orders run in opposite directions. | `PROVEN` (`maxplus-order`, `loss-order-reversed`) | ungraded | S-4 | Sequencing 2 then 3 gives `fin 5` under Loss but `fin 3` under MinMax: a bottleneck bound is not a loss bound. | `PROVEN` (`bottleneck-is-not-sum`); `tests/reject/MinMaxIsLoss.agda` refuses the general identification | ungraded |=== == Parallel composition (Parallel.agda) `IsParallel R _∥_` is a layer, like `IsDioid`: `_∥_` is a commutative monoid on `𝟙` and distributes over ⊕, so it is monotone. Nothing in the layer relates `_∥_` to ⊗. Two exchange laws do that, and they are stated apart, because which one holds is a property of the resource: * `SyncBelow`: (a ∥ b) ⊗ (c ∥ d) ≼ (a ⊗ c) ∥ (b ⊗ d). Two threads that meet in the middle are graded at most as two threads that run free. This is the exchange law of a concurrent semiring. * `SyncAbove`: the reverse bound. [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | P-1 | The layer: a parallel composition has a right unit, distributes on the right and is monotone on both sides. A dioid with a commutative ⊗ is parallel with `_∥_` = ⊗, and then both exchange laws hold, as an equality. | `PROVEN` (`IsParallel` with `unitʳ`, `distribʳ`, `monoˡ`, `monoʳ`; `seq-parallel`, `seq-sync-below`, `seq-sync-above`) | ungraded | P-2 | Work. `Loss` and `MaxPlus` are parallel with `_∥_` = + (their ⊗), and have both exchange laws. | `PROVEN` (`Loss-parallel`, `Loss-sync-below`, `Loss-sync-above`, `MaxPlus-work`, `MaxPlus-work-sync-below`, `MaxPlus-work-sync-above`) | ungraded | P-3 | Span. `MaxPlus` is parallel with `_∥_` = max on finite costs (`bot` absorbs). `SyncAbove` holds: max (a + c) (b + d) ≤ max a b + max c d. `SyncBelow` does not: 1 ∥ 0 then 0 ∥ 1 takes 2 when the threads meet in the middle and 1 when they run free. | `PROVEN` (`MaxPlus-span`, `MaxPlus-span-sync-above`, `MaxPlus-span-not-sync-below`); control `tests/reject/SpanSyncBelow.agda` | ungraded | P-4 | Occupancy. `HWM` is parallel with `_∥_` = the sum of the peaks and the sum of the drifts. `SyncBelow` holds. `SyncAbove` does not: two threads of peak 1, one before the meeting and one after it, hold 1 when they meet in the middle and are graded 2 when they run free. | `PROVEN` (`HWM-parallel`, `HWM-sync-below`, `HWM-not-sync-above`); control `tests/reject/HWMSyncAbove.agda` | ungraded |=== P-3 and P-4 together say that elapsed time and occupancy exchange in opposite directions, so no single exchange law belongs in the layer. == The loop grade (Star.agda) `IsStar R star` is a layer: `star a` is the grade of "a, any number of times". It is a fixed point of x ↦ 𝟙 ⊕ (a ⊗ x) and the least one on both sides (Kozen's axioms for a Kleene algebra). [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | K-1 | The layer: `𝟙 ≼ star a` and `a ⊗ star a ≼ star a`. If `𝟙` is the greatest grade, `star a` = `𝟙` for every `a` is a star. `Loss` is such an algebra, so a loop grades as `fin 0`. | `PROVEN` (`IsStar` with `star-𝟙`, `star-step`; `unit-top-star`, `Loss-unit-top`, `Loss-star`) | ungraded | K-2 | A grade whose loop equation 𝟙 ⊕ (a ⊗ s) ≡ s has no solution rules a star out. `MaxPlus` has one (`val 1`) and `HWM` has one (`hwm 1 1`), so neither has a star: the grades of 1, 2, 3, ... turns have no bound in the carrier. | `PROVEN` (`no-star`, `MaxPlus-no-fixpoint`, `MaxPlus-no-star`, `HWM-no-fixpoint`, `HWM-no-star`); control `tests/reject/MaxPlusLoopBounded.agda` | ungraded | K-3 | `MaxPlusTop` (`Instances/MaxPlusTop.agda`: ℕ with −∞ and +∞, ⊕ = max, ⊗ = +, 𝟘 = `bot`, 𝟙 = `val 0`, and `bot ⊗ top` = `bot`) is a `ResourceAlgebra`, `IsDioid`, `IsOrdered` and `IsAnnihilating`. `MaxPlus` embeds in it by a strict, injective morphism. | `PROVEN` (`MaxPlusTop`, `MaxPlusTop-dioid`, `MaxPlusTop-ordered`, `MaxPlusTop-annihilating`, `lift-hom`, `lift-injective`) | ungraded | K-4 | `MaxPlusTop` has a star: `bot` and `val 0` loop to `val 0`, and every dearer body, and `top`, loop to `top`. | `PROVEN` (`star-t`, `MaxPlusTop-star`) | ungraded |=== == Signed drift (Instances/SignedHWM.agda) `HWM` records a peak and a non-negative drift, so it grades only terms that never consume more than they allocate. `SHWM` lets the drift be any integer, or −∞: a term may free live state it did not allocate. The peak stays a natural, the live state above the entry level. Sequencing is HWM's formula read in the integers: the peak of a ; b is max (peak a) (drift a + peak b), and drifts add. `Instances.HWM` is unchanged. occupancy-types imports it (H-2), and HWM sits inside SHWM by the maps of D-3. The drift carrier is the max-plus dioid on ℤ ∪ {−∞} (`Drift.agda`). Its integers are Agda's own, read as differences of naturals; every integer law there is proved from that reading. [cols="1,4,2,1",options="header"] |=== | ID | Claim | Agda (§5) | pwg | D-1 | The drift carrier (ℤ ∪ {−∞}, max, +, −∞, 0) is a `ResourceAlgebra` and `IsDioid`. `SHWM` (peak in ℕ, drift in ℤ ∪ {−∞}, drift ≤ peak, ⊕ = max on both, ⊗ as above, 𝟘 = (0, −∞), 𝟙 = (0, 0)) is a `ResourceAlgebra`, `IsDioid` and `IsOrdered`. | `PROVEN` (`Drift-RA`, `Drift-dioid`, `SHWM`, `SHWM-dioid`, `SHWM-ordered`); control `tests/reject/SignedDriftExceedsPeak.agda` (a drift above the peak cannot be written) | ungraded | D-2 | 𝟘 ≢ 𝟙: max on integer drift has no unit, so the unit of ⊕ needs drift −∞, which no run of ⊗'s unit has. 𝟘 absorbs on the left (𝟘 ⊗ a ≡ 𝟘). On the right it does not: a ⊗ 𝟘 keeps the peak of a, with drift −∞. So SHWM is not annihilating. | `PROVEN` (`SHWM-𝟘≢𝟙`, `SHWM-absorbˡ`, `SHWM-seq-𝟘`, `SHWM-not-annihilating`); controls `tests/reject/SHWMZeroIsOne.agda`, `tests/reject/SHWMAnnihilates.agda` | ungraded | D-3 | HWM sits inside SHWM. `embed` (drift read as an integer) preserves 𝟙, ⊕ and ⊗ exactly and is injective, so it is lax. It does not preserve 𝟘, and by F-4 no strict map HWM → SHWM exists. `clampG` (a drift below zero read as 0) is lax, in the direction of F-2: the image of a sequence is below the sequence of the images. It is a retraction of `embed` (`clampG ∘ embed` is the identity), and it is not strict: free one cell, then allocate one, peaks at 0, and the clamped sequence peaks at 1. | `PROVEN` (`embed-⊗`, `embed-⊕`, `embed-lax`, `embed-injective`, `embed-𝟘`, `no-strict-HWM→SHWM`, `clamp-embed`, `clamp-lax`, `clamp-not-strict`); controls `tests/reject/EmbedPreservesZero.agda`, `tests/reject/ClampIsStrict.agda` | ungraded | D-4 | In HWM a prefix never lowers the peak: peak b ≤ peak (a ⊗ b). With consumption it can: free one cell, then allocate one, peaks at 0, below the 1 of the allocation alone. This is the change consumption makes. | `PROVEN` (`HWM-prefix-keeps-peak`, `prefix-lowers-peak`); control `tests/reject/SHWMPrefixKeepsPeak.agda` | ungraded | D-5 | SHWM is parallel with `_∥_` = the sum of the peaks and the sum of the drifts. `SyncBelow` holds with signed drift: each thread stays at or below its own peak. `SyncAbove` does not, by P-4's witness. | `PROVEN` (`_∥s_`, `SHWM-parallel`, `SHWM-sync-below`, `SHWM-not-sync-above`); control `tests/reject/SHWMSyncAbove.agda` | ungraded | D-6 | SHWM has no star: the body that allocates 1 and keeps it raises the peak by 1 each turn, whatever the drift of the rest. | `PROVEN` (`SHWM-no-fixpoint`, `SHWM-no-star`) | ungraded | D-7 | `peak : SHWM → MaxPlus` is lax, as for HWM (F-2), and agrees with HWM's peak on `embed`. | `PROVEN` (`speak-lax`, `speak-embed`) | ungraded | D-8 | On finite drift, SHWM's sequence is the bicyclic monoid. `bic` sends (a, b) to the grade of peak a and drift a − b. It sends (0, 0) to 𝟙 and the bicyclic product (a + (c ∸ b), d + (b ∸ c)) to ⊗, is injective, and reaches every grade with finite drift. HWM is the part where b ≤ a, that is drift ≥ 0: `embed` lands there, and every such pair comes from HWM. | `PROVEN` (`bic-𝟙`, `bic-·`, `bic-injective`, `bic-onto`, `bic-HWM`, `HWM-bic`) | ungraded |=== What D-1 to D-8 do not cover is under Open: the trough (option B below), a loop grade, and adoption by occupancy-types. == Correspondences with other repositories (not graded) These rows relate an artefact here to one in another repository. They are not theorems of this repository, so they carry no `pwg`. [cols="1,4,2",options="header"] |=== | ID | Claim | Status | L-2 | `Loss` is textually the echo-types definition (`experimental/echo-additive/Grade.agda`: `_⊓g_`, `_+g_`). | `ASSUMED`: the transcription was checked by eye. The direction of a future import (echo → here, or here → echo) is `OPEN`. | H-2 | `HWM` is occupancy-types' occupancy algebra. | PROVEN downstream: occupancy-types adopts `Instances.HWM` as its occupancy algebra (its O-1; `Reclaim.agda` and `Witness.agda` import it). Signed drift (consuming terms) is modelled here as a separate instance, `SHWM` (D-1 to D-8), with HWM inside it by `embed` and `clampG` (D-3). Whether occupancy-types adopts it is that repository's call: OPEN | N-2 | `MinMax` is the bottleneck sequence that typed-wasm's `Tropical.tropMax` defines locally. | TESTED downstream: typed-wasm transcribes this instance (`ResourceAlgebra/MinMax.idr`), sets `tropMax = minMaxSeq` and defines no grade operation outside its kernel (`tools/check-grade-kernel.sh`); its transcription table is checked against this tree in Agda by `refl` (`tools/check-kernel-proofs.sh`). The Idris2 statements correspond by transcription (ASSUMED) |=== == Open (not proved) * K-CUT-LOSS itself. It is not stated here: this repository supplies the algebra it will be parametric in. The expected shape, also `OPEN`, is that the equality needs only the core record and the K-CUT-WARRANT bound also needs `IsOrdered`. * Transport of K-CUT-LOSS along a morphism. F-1..F-10 supply the maps and say which ones exist. No theorem here states that a strict morphism carries a cut-loss equality, or that a lax one carries a cut-loss bound. That theorem belongs with K-CUT-LOSS in choreographic-types, and it is `OPEN`. * Morphisms into or out of MinMax, other than `loss-bottleneck`, are not classified. * Questions: strict morphisms out of one question are classified (F-8). Morphisms out of `Questions n` for n ≥ 2, other than the projections of F-9 and their composites with F-8, and every morphism into Questions, are not classified. Its ⊕ reads a grade as "lost on every branch", which is sound only when the reader of the grade chooses the branch (Q-4). A grade for alternatives that another party chooses, and a grade over merged pairs (which do not compose by union), are not stated. * Parallel composition and the loop grade for the other instances. MinMax, Questions, Evidence and Diamond are not instantiated. `unit-top-star` and `seq-parallel` are expected to cover those whose 𝟙 is greatest and whose ⊗ commutes; that is not checked. * A loop grade for occupancy. HWM has no star (K-2) and no HWM with a top is defined. It belongs with occupancy-types' own algebra (H-2). * The trough of a signed run (option B). A term that consumes needs live state on entry. SHWM bounds the peak above the entry level and does not record how far below it a run goes, so it cannot say that a run never takes the live state below zero. The proposal is a third component: the trough t ≤ 0, the lowest level relative to entry, with t ≤ drift ≤ peak, ⊕ = (max, min, max) and the trough of a ; b = min (trough a) (drift a + trough b). The trough is the peak of the mirrored run, so the triple is the prefix-extrema algebra of a walk, and SHWM is its projection that forgets the trough: nothing in D-1 to D-8 would be lost. The entry requirement −t is a typing precondition, which belongs to occupancy-types (IS-NOT), so it is written up here and not built. Whether to build it is an owner call. * Signed drift in occupancy-types. That repository imports `Instances.HWM` (H-2). Using `SHWM` there, or the trough, would be its own change, made there. * A loop grade for signed drift. SHWM has no star (D-6), and no SHWM with a top is defined. * No law here relates `star` to `_∥_`, and no morphism is shown to preserve either. `peak-lax` is not checked against `_∥h_` and `tPar`. * Which exchange law (P-1) a cut needs is a question for K-CUT-LOSS in choreographic-types. * CI that emits the receipt of each main run by itself. The check half exists (`scripts/proof-receipt.sh --check` in the `receipt` job of `proofs.yml`). Recording a new run is still manual: `--run-row`, then `--write` (see Receipts). == Discipline Prose, citation and artefact must agree before any status moves. A status moves only with a named declaration or a named receipt. A grade moves only with a receipt.