Skip to content

docs(rung-3): K-CUT correspondence table, falsifier F6, ROADMAP by gates - #38

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/new-session-up7579-docs
Oct 14, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/new-session-up7579-docs

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Stack 3/3 for MRC-01 (rung 3). 1/3 merged as #36 (toolchain) and 2/3 as #37 (Marches/Cut.lean + K-4 laws). This branch was cut from #37's head before its squash. main has since been merged in, without rewriting history. The squash tree is byte-identical to that head, so the diff against main is only this PR's docs and shell glue, plus one Lean comment (the Tropical.lean seam note).

What

  • docs/kcut-correspondence.adoc: marches' Lean names paired with choreographic-types' Agda names, at pinned commits. It is a table, not a link. Every pairing is ASSUMED (port-and-reprove), in resource-algebra's M-2 idiom. Rows KC-1…KC-8 cover cuts, downward closure, K-5 (cut-projectable), K-2 (proj-cut), the K-4 laws, the S-3/W-4 direction, and M-2.
  • scripts/fetch-siblings.sh: clones the siblings at their pins into _build/dependencies (now git-ignored), using the choreographic-types pattern. Pins: choreographic-types edb784a, resource-algebra cf9235c, tropical-types e172f8a.
  • scripts/check-correspondence.sh: the mechanical part. It checks that every Lean name cited exists in this build (#check), that every Agda name exists at its pin, and that every pin appears in the table. Negative control: a fabricated Lean name and a fabricated Agda name go through the same checks and must be refused. It checks names, not meanings.
  • FALSIFIERS.adoc F6: "the correspondence is nominal." It fires on one proposed row. At edb784a, Agda's Consistent p c (Projection.agda:89) is a party-indexed merge condition at choices, and marches has no parties. So MRC-01's Acyclic ↔ Consistent pairing is withdrawn (KC-3, status OPEN). F6 stays open, narrowed.
  • Marches/Tropical.lean seam note: now points at resource-algebra M-2, and records where TropicalAdapterPath.lean actually lives (below).
  • ROADMAP.adoc rung 3: now a gated table. 3a–3c are met; 3d (TropicalAdapterPath import), 3e (echo-types bridge) and 3f (postern) are OPEN, so the rung stays OPEN and there is no tag.
  • STATE.adoc: records the session. README gets one ASSUMED row and a note on the check script; LIMITATIONS gets one bullet; ARCHITECTURE lists docs/ and scripts/.

Citation corrections found while reading the pins

  • T-2's receiver-knows / sender-knows are in src/Choreographic/Instances.agda (lines 172 and 177), not Transport.agda. Transport.agda holds the generic knows-local-cut.
  • TropicalAdapterPath.lean is in hyperpolymath/tropical-types. Its lake package is named tropical-resource-typing, which is the name the ROADMAP used. It is pinned to Lean v4.13.0, so expect friction when 3d imports it into v4.34.0.
  • marches' TropicalNat is min-plus, so it sits with Loss, not MaxPlus. It is not one of M-2's two (max-plus) objects (KC-8).

Evidence (this head)

$ lake build
Build completed successfully (15 jobs).
$ grep -rnw sorry Marches/ Marches.lean ; echo $?
1
$ lake env lean Marches/BadGadget.lean
[(false, false), (true, true), (false, false), (true, true)]
$ scripts/check-correspondence.sh
choreographic-types at edb784a
resource-algebra at cf9235c
tropical-types at e172f8a
PASS: 15 Lean names and 16 sibling names exist at the pins; both negative controls refused
$ shellcheck scripts/*.sh   # clean
$ grep -ni converg Marches/Cut.lean docs/kcut-correspondence.adoc scripts/*.sh
Marches/Cut.lean:45:  not protocol convergence; agda-routing owns that ground (LIMITATIONS.adoc).
docs/kcut-correspondence.adoc:20:Delimitation: nothing here is a convergence claim; agda-routing owns that

Mutation test: I renamed one Lean name, one Agda name and one pin in the doc. The script printed MISSING (Lean), MISSING (sibling) and PIN NOT IN TABLE, then FAIL with exit 1. Restoring the doc gives PASS again.

postern

Not reachable from this account on 2026-10-14 (add_repo: not found or no access; no list_repos match). No cross-issue was filed. The MRC-01 import plan is kept in the correspondence doc, ready to file.

CI

The same two pre-existing red checks as on main apply here, and neither is caused by this PR:

The full diagnosis is in #37. check-correspondence.sh needs network access, so it is not wired into CI here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX


Generated by Claude Code

Marches/Cut.lean (new): a cut of the region DAG is a set of regions
closed under predecessors.
- Cut.edge_crosses_past: in an acyclic graph every edge leaves the
  principal cut of its source; Cut.path_back_crosses_no_cut: an edge on a
  cycle crosses no cut, so Acyclic is load-bearing.
- DiscSys.trace_cross_crosses_cut: every crossing in a well-typed
  composite trace crosses a cut holding the trace's start, not its end.
- DiscSys.trace_mem_back / trace_inside / no_reentry: a trace ending in a
  cut was inside it all along; a trace that leaves a cut never re-enters
  (no_back_cross lifted from one interface to every cut).
- DiscSys.composeCut: compose restricted to a cut prefix is a Discipline
  (prefix-closure); composeCut_trace_embed / composeCut_trace_reflect: its
  traces are exactly the composite's traces that end in the prefix.
- Two-region Interface: trace_cross_crosses_cut, trace_stays_in_B.
- CutExhibit: a concrete twoTropical trace, and a negative control.

Marches/Tropical.lean: TropicalGrade reads TropicalNat as a (min,+)
grade. seq_unitl and alt_idem are the two laws K-CUT-LOSS uses (K-4).
better_reverses_altLe, altLe_one and s3_witness record that marches'
`better` runs against its own induced order (S-3 / W-4 direction).

Every new declaration depends on no axioms (#print axioms) and nothing
re-declares an Agda definition.

Gates: lake build -> Build completed successfully (15 jobs);
grep -rnw sorry empty; #eval orbit unchanged.

Rung: 3 (rung stays OPEN)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX
docs/kcut-correspondence.adoc pairs marches' Lean names with
choreographic-types' Agda names, at pinned commits. It is a table, not a
link: every pairing is ASSUMED (port-and-reprove), in resource-algebra's
M-2 idiom.

scripts/fetch-siblings.sh clones choreographic-types (edb784a),
resource-algebra (cf9235c) and tropical-types (e172f8a) into
_build/dependencies. scripts/check-correspondence.sh checks that every
cited name exists (Lean in this build, Agda at its pin) and that every
pin appears in the table. Negative control: fabricated names are refused.
It checks names, not meanings.

FALSIFIERS F6 ("the correspondence is nominal") already fires on one
proposed row. Agda's `Consistent p c` is a party-indexed merge
condition, and marches has no parties, so the Acyclic <-> Consistent
pairing is withdrawn (KC-3). F6 stays open, narrowed.

Citation corrections from reading the pins:
- receiver-knows / sender-knows are in Instances.agda.
- TropicalAdapterPath.lean is in tropical-types (lake package
  tropical-resource-typing, Lean v4.13.0).
- TropicalNat is min-plus, so it is not an M-2 object.

The Tropical.lean seam note now points at M-2. ROADMAP rung 3 is a
gated table: 3a-3c met, 3d-3f OPEN. STATE.adoc records the session,
the pre-existing CI anomalies and the unreachable postern. README,
LIMITATIONS and ARCHITECTURE are updated to match.

Gates: lake build -> Build completed successfully (15 jobs);
grep -rnw sorry empty; #eval orbit unchanged;
check-correspondence.sh -> PASS (mutation test -> FAIL as expected);
shellcheck clean.

Rung: 3 (items 3a-3c met; rung stays OPEN, no tag)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6987b939-e5bf-4cc5-a74c-3871bd6abd8a
📥 Commits

Reviewing files that changed from the base of the PR and between 3ca64b4 and 3600a07.

📒 Files selected for processing: 11
  • .gitignore
  • ARCHITECTURE.adoc
  • FALSIFIERS.adoc
  • LIMITATIONS.adoc
  • Marches/Tropical.lean
  • README.adoc
  • ROADMAP.adoc
  • STATE.adoc
  • docs/kcut-correspondence.adoc
  • scripts/check-correspondence.sh
  • scripts/fetch-siblings.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Owner Author

estate-audit is red, but not because of this PR. It fails the same way on main (runs 42, 44, 46) and on every recent PR. I reproduced it locally against the pinned hyperpolymath/cicd-suite@5a10b72. The Required Files Gate runs under bash -e -o pipefail. For this repo's comment-only .github/CODEOWNERS, functional_lines=$(grep -vE '^\s*(#|//|;|$)' "$f" | wc -l) selects no lines, so grep exits 1 and pipefail fails the assignment. The step then exits with no ::error:: line, which is the very case the gate's own "Rule 1" means to allow. No fix exists yet. It belongs in cicd-suite, e.g. functional_lines=$({ grep -vE '…' "$f" || true; } | wc -l). I haven't re-run it, because it fails the same way every time.

CI (lake build + no-sorries) ends in startup_failure here as on main. .github/workflows/actions.lock still pins lean-action@v1.6.0 / codeql-action@v4.38.0, while the workflows were bumped in #34. No fix PR exists. Running gh actions-lock on main (as #25 did) fixes it. Until then, the build evidence is the local gate output in the PR body.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 14, 2026 01:31
@hyperpolymath
hyperpolymath merged commit f591220 into main Oct 14, 2026
7 of 8 checks passed
@hyperpolymath
hyperpolymath deleted the claude/new-session-up7579-docs branch October 14, 2026 01:32
hyperpolymath added a commit that referenced this pull request Oct 14, 2026
Follow-up to the CodeRabbit review on #36 (thread
on `lean-toolchain`, flagged Major / security): pin v4.34.1, the patched
release of the 4.34 line.

## Verified against the primary source, not the bot's summary

`git log v4.34.0..v4.34.1` in leanprover/lean4 shows:

- three runtime reference-count fixes:
  - leanprover/lean4#15241: preserve sticky counts in deletion cascades
- leanprover/lean4#15288: mark the children of objects whose
single-threaded count overflowed
- leanprover/lean4#15307: panic instead of wrapping counts in
`sharecommon_quick_fn`
- a `BitVec.ofNatClamp` backport
- `chore: prepare release` (`5045d00`, 2026-09-24)

marches checks only its own proofs, not untrusted input, so the
practical risk was low. Still, this is a same-line patch bump, it costs
nothing, and it keeps the estate's 4.34 soundness floor on the patched
build.

## Change

- `lean-toolchain`: `v4.34.0` → `v4.34.1`
- `README.adoc`: the two version mentions
- `STATE.adoc`: a dated entry. The v4.34.0 results are now marked
historical.

No source change.

## Gates (v4.34.1)

```
$ rm -rf .lake && lake build
Build completed successfully (15 jobs).
$ grep -rnw sorry Marches/ Marches.lean ; echo $?
1
$ lake env lean Marches/BadGadget.lean
[(false, false), (true, true), (false, false), (true, true)]
```

## Note on the stack

#38 (rung-3 docs) is independent of this PR. Both
add a `STATE.adoc` entry at the top, so whichever merges second will
need a trivial merge, which I'll handle.

CI here shows the same two pre-existing reds as `main` (`CI`
`startup_failure` from `actions.lock` drift, and `estate-audit` from the
cicd-suite pipefail bug). Both are diagnosed in
#37.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX

---
_Generated by [Claude
Code](https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants