Repository navigation
Prove C-4b (diamond lattice) and M-2 (Lean bridge to tropical-types) - #48
Conversation
C-4b: the diamond lattice M3, with join as alternatives and meet as sequence, is an ordered, annihilating resource algebra that is not a dioid (a ⊓ (b ⊔ c) = a, (a ⊓ b) ⊔ (a ⊓ c) = bot). It is proved in Agda (Instances/Diamond.agda, in the All.agda cone) and re-proved in the Lean and Rocq legs. A tenth expected rejection, tests/reject/DiamondDistributes, must fail with "a != bot of type Grade". M-2: verification/bridges/tropical-types/TropicalBridge.lean proves in Lean, with no axiom, that MaxPlus is isomorphic to tropical-types' Tropical and that the isomorphism carries the four operations to its CommSemiring instance's fields. scripts/check-lean-bridge.sh fetches tropical-types at a pinned commit and runs it in the Lean leg; a test shows it fails on an error, an axiom or no printed theorem. Both rows stay ungraded: the receipt describes 47de4a8, which predates C-4b, and M-2 has no Agda witness. The ledger, PROOF-NEEDS, README and CHANGELOG say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… it as a debt marker The Central Estate CI/CD Audit's code-hygiene check flagged the delimiter STUB in tests/check_lean_bridge_test.sh as an untracked debt marker. It is a heredoc delimiter, not debt; FAKE_LEAN names what the heredoc writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
…k-2nherb # Conflicts: # CHANGELOG.adoc
|
|
No fix exists yet. A fix belongs in the suite reusable, not in this PR: drop or replace non-BMP characters in Generated by Claude Code |
Conflicts, all of the 'both sides added' kind: - src/ResourceAlgebra/All.agda: keep the Evidence, Ledger and Diamond imports. - verification/proofs/lean4/ResourceAlgebra.lean: keep both new sections, Evidence and ledger (E-1..E-3) and Diamond (C-4b). - docs/status/PROOF-STATUS.adoc: the census text names all five ungraded rows (C-4b, M-2, E-1, E-2, E-3); thirteen expected rejections, the nine earlier ones plus Diamond's one and the evidence ledger's three; keep both the E-1..E-3 residual differences and the M-2 bridge section. - docs/status/PROOF-NEEDS.adoc: main's updated row for C-4b and M-2, and PN-6 kept. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013CuBToxr5h9catptGiTsFX
… descriptions) (#450) ## Summary Re-pins the CI gate reusable workflow from `d2140a5a789e4ebec52f1bab0074181012660c3b` to `09878f2a2c0a8907cc69fe48973ea604753ecab1` (hyperpolymath/proven-cicd-and-workflows#144). The old pin posts `CI/gate = failure` falsely when a workflow name contains an emoji, because GitHub rejects 4-byte UTF-8 in a status description. That false red was seen on hyperpolymath/resource-algebra#48. `09878f2` is a commit on an UNMERGED suite branch (#144 is stacked on #139), as `d2140a5` was. A second re-pin therefore follows #139's squash merge. This PR touches gate files, so the tamper guard may fail `guard / check` until an admin applies the `gate-change-approved` label. Agents do not apply it. ## Changes - `.github/workflows/ci-gate.yml` (2 `uses:` lines) and `.github/workflows/ci-gate-tamper-guard-caller.yml`: new SHA; `# cicd-suite ...` comments kept. - `.github/workflows/actions.lock`: workflow entries, dependency key and `commit: sha1-...` record. - `tests/workflows/squabble_gate_test.sh`: `SUITE_PIN`. - `CHANGELOG.adoc`: new entry under Unreleased / Fixed. The older entry mentioning `d2140a5` is history and untouched. - The branch has two signed commits: the re-pin and a follow-up that fixes blank-line placement in the CHANGELOG entry (no force-push was allowed). Squash on merge. ## RSR Quality Checklist ### Required - [x] Tests pass (the workflow tests listed below) - [ ] Code is formatted / linter: not run, no source changed - [x] No banned language patterns - [x] No `unsafe` blocks, no banned functions - [x] SPDX license headers untouched - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] `CHANGELOG` or release notes updated ## Testing Run locally, all exit 0: - `scripts/check-lock-sync.sh`: in sync and closed. - `tests/workflows/squabble_gate_test.sh`: 166 passed, 0 failed. - `tests/workflows/check_lock_sync_test.sh`: 137 PASS lines. - `tests/workflows/lock_sync_fix_test.sh`: all cases passed. - `tests/workflows/validate_workflows_test.sh`: 87 PASS lines. - `tests/workflows/workflow_edges_test.sh`: 90 checks passed. ## What is NOT proven - The emoji fix in a live run: only visible once `CI/gate` runs on this PR. - That `09878f2` survives the squash merge of #139. - `actionlint` and `just test && just quality` were not run. - This is a template repo: whether minted repos pick up the new pin was not checked. ## Screenshots N/A --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR)_ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Updated the CI gate and tamper-guard workflows to use a newer pinned version. * Updated the related workflow checks and changelog to reflect the new version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com>



Closes the two
OPENtheory rows indocs/status/PROOF-STATUS.adoc.C-4b: an annihilating ordered algebra need not be a dioid
src/ResourceAlgebra/Instances/Diamond.agdadefines the diamond lattice M3, with ⊕ = join, ⊗ = meet, 𝟘 = bottom and 𝟙 = top. It provesDiamond-ordered,Diamond-annihilatingandDiamond-not-dioid. The counterexample is a ⊗ (b ⊕ c) = a while (a ⊗ b) ⊕ (a ⊗ c) = ⊥.All.agdacone, so it is checked under--safe --without-K --cubical-compatible.tests/reject/DiamondDistributes.agda, must fail witha != bot of type Grade.M-2:
MaxPlusagrees with tropical-types'CommSemiring Tropicalverification/bridges/tropical-types/TropicalBridge.leanproves in Lean thatMaxPlusis isomorphic toHyperpolymath.Tropical.Tropical. The isomorphism sends ⊕, ⊗, 𝟘 and 𝟙 totAdd,tMul,.botand.val 0, which are the fields of the instance. All six printed theorems are axiom-free.scripts/check-lean-bridge.shfetches tropical-types at the pinned commitf2e465c966d14d4986dfc492875cc54653d9751eand verifies that commit. It then compiles both modules with Lean 4.35.0 and checks the bridge. It prints the SHA256 of the imported file and of the bridge, for a §8.5.1(import …)clause.proofs.ymland writes an "M-2 bridge receipt" to the job summary.tests/check_lean_bridge_test.shshows the script fails on a compile error, on an axiom, and when no theorem is printed.Grades: both rows stay ungraded
47de4a8, which predates C-4b. The row needs a new receipt after merge.unavailable.The ledger,
PROOF-NEEDS.adoc(PN-5),README.adocandCHANGELOG.adocsay this.Checks run locally
scripts/check-agda.sh(Agda 2.6.3): PASS, core proofs, unit tests and all 10 expected rejections.scripts/check-lean-bridge.shpasses with 6 of 6 axiom-free.tests/check_lean_bridge_test.shpasses all 3 cases.From Stdlibmapped toFrom Coq): 52 of 52 closed.--failure-level WARN: all four changed.adocfiles render clean.tests/workflows/*scripts fail locally in the same way on unmodifiedmain, because their tools are missing in this container. They are not caused by this change.After merge
(import …)clause.(import …), then pin C-4b and M-2.Generated by Claude Code
Summary by CodeRabbit