Skip to content

S4: closed-component and reach leaves for search proof trees (Lean-proved; XOR2 still open) - #127

Merged
rollrat merged 4 commits into
masterfrom
claude/fastopt-s4-partial-leaf
Dec 6, 2026
Merged

rollrat merged 4 commits into
masterfrom
claude/fastopt-s4-partial-leaf

Conversation

@rollrat

@rollrat rollrat commented Dec 6, 2026

Copy link
Copy Markdown
Member

Adds partial-assignment leaves to the search proof-tree checker.

  • Lean (SearchCheckS4.lean):
    • Locality on closed cell sets: indep_of_closed and depCount_le. Neither needs Staged or Φ.
    • worldRefuted_sound_of, the world-refutation lemma without Staged.
    • Leaves: comp (cut/sim) via compOk_sound, reach via reachOk_sound.
    • checkS4_sound; format s4-search-tree/1.
  • Rust: Leaves::Comp/QuotaComp, Order::Grow, and exact/s4_comp.rs.
  • Measured:
    • All 12 A-tier instances VERIFIED, each closed at the root.
    • NAND2 b7 VERIFIED, with 15% fewer nodes using lookahead, but the Lean check is about 7× slower.
    • XOR2 2x6x4, budgets 9–19: node cap at every budget. The leaves fire only after a component closes.
  • Not proved: that the Rust twin agrees with Lean (measured only).

Docs: docs/search_driver.md §8. No sorry or native_decide.

🤖 Generated with Claude Code

rollrat and others added 4 commits December 6, 2026 18:48
Intent: the S3 semantic leaf only fires on fully decided worlds, so the
XOR2 tree had to reach the bottom of every branch. S4 lifts locality to
partial assignments: a closed set of decided cells is physically
independent of the rest (proved in Lean without Staged), so an output
inside it needs a lever per dependent bit inside it (cut leaf), or the
restricted world can be refuted alone (sim leaf). A checked potential
bounds how many switch cells can still reach an output within the budget
(reach leaf). Branching grows the decided frontier so components close
early. Certificates use format s4-search-tree/1 and are checked by the
Lean checkS4 (checkS4_sound). XOR2 budget 9 still hits the node cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	formal/RedstoneFormal.lean
#	formal/RedstoneFormal/Audit.lean
Intent: document what the S4 partial leaves buy and what they do not, so
the next step on XOR2 starts from measured numbers. The A tier and NAND2
2x4x3 budget 7 certificates are Lean-VERIFIED. Lookahead plus comp cuts
NAND nodes by 15% against S3, but the Lean check is 7x slower. XOR2
2x6x4 stays capped at every budget, including 200M nodes at budget 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	AGENTS.md
#	docs/search_driver.md
#	formal/RedstoneFormal.lean
#	formal/RedstoneFormal/Audit.lean
#	src/transform/place_and_route/local_placer/exact/mod.rs
@rollrat
rollrat merged commit 0027c07 into master Dec 6, 2026
1 check passed
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.

1 participant