Skip to content

L2b: library tree entries are Φ optima (Lean bridge Φ ⇄ Realizes) - #126

Merged
rollrat merged 3 commits into
masterfrom
claude/fastopt-l2-phi-bridge
Dec 6, 2026
Merged

rollrat merged 3 commits into
masterfrom
claude/fastopt-l2-phi-bridge

Conversation

@rollrat

@rollrat rollrat commented Dec 6, 2026

Copy link
Copy Markdown
Member

Closes the "physical optimum vs Φ optimum" assumption of the search-tree library entries (#121).

  • Lower direction: realizes_of_phi / realizes_of_phiAdm show a Φ solution with no given cells and a gate-acyclic world realizes the instance with the same block count. From this follow noPhi_of_noLayout and phi_lower_of_isOpt.
  • Upper direction: phiWitOk_sound gives a finite check that a stored witness is a PhiSol.
  • Optimality:
    • phiOpt_of_treeEntry;
    • phiOptL_of_treeEntry, with no Reach15 hypothesis for budget ≤ 15 under a lazy or ranked config;
    • for renamed queries, phiQueryOk3_sound.
  • Kernel examples: inverter 3 (both modes) and merged NAND 8.
  • Default NAND: nand8_not_default_phi proves the 8-block layout violates DustExact. phiOpt_default_of_exact states that certifying 9 needs a refutation of NoExactLayoutWithin.
  • opt-check now reports "Φ-optimal (mode m)". All 18 entries report it (0–8 ms).
  • Witness fix: two OR 3x5x3 witnesses had an interior lever. They were moved to the boundary and the entries regenerated; cost unchanged.
  • Remaining gaps:
    • default NAND 9 (needs an exact-dust tree checker);
    • PhiSol faithfulness;
    • Reach15 above 15;
    • PhiAcyclic;
    • no class-permutation theorem.

No sorry or native_decide; 78 Audit guards.

🤖 Generated with Claude Code

rollrat and others added 3 commits December 6, 2026 18:54
# Conflicts:
#	formal/RedstoneFormal.lean
#	formal/RedstoneFormal/Audit.lean
Intent: PR #121's search-tree entries proved only the physical optimum
(IsOpt over Realizes). Whether that is also the Phi optimum reported by the
placer was an assumption (certified_optimum_library.md 8.6). This change
proves it without SAT, so opt-check can say "Phi-optimal (mode m)".

- TreeLibraryPhi.lean, lower direction: an admissible Lean Phi solution
  (PhiSol plus G1 hypotheses: mode OK, no given cells, gate-acyclic) realizes
  the Search.Instance with the same block count (realizes_of_phiAdm). Every
  instance-shape difference is named.
- Upper direction: a finite Phi witness check (phiWitOk, ranks, stages and
  contributions computed) is sound (phiWitOk_sound). phiOpt_of_treeEntry,
  phiOptL_of_treeEntry and phiQueryOk3_sound follow. Reach15 is discharged for
  budgets <= 15 in both Rust default configs.
- Default-Phi NAND (physical 8 vs Phi 9): nand8_not_default_phi proves the
  8-block layout is not a default-Phi solution. phi_default_exact /
  NoExactLayoutWithin state what an entry needs to certify 9.
- opt-check reports Phi-optimality. The mode comes from the key, with a
  --phi override.
- Both OR 3x5x3 entries had a witness with an interior lever (not a Phi
  solution). The witness is now or_353(), on the boundary. All 18 entries
  now report Phi-optimal.
- No sorry or native_decide. The Audit guards allow only the standard axioms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	formal/RedstoneFormal.lean
#	formal/RedstoneFormal/Audit.lean
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