Skip to content

Fast S3 certificate checker: checkFast_sound, binary trees, NAND2 b7 33.8 s → ~1 s - #124

Merged
rollrat merged 7 commits into
masterfrom
claude/fastopt-fast-checker
Dec 6, 2026
Merged

rollrat merged 7 commits into
masterfrom
claude/fastopt-fast-checker

Conversation

@rollrat

@rollrat rollrat commented Dec 6, 2026

Copy link
Copy Markdown
Member

Summary

  • New Lean checker Search.Fast.checkFast with direct soundness checkFast_sound : checkFast … = true → NoLayoutWithin I b (proved; no sorry/native_decide; Audit guards added).
    • Lemmas checked in parallel Tasks (each against the full table with limit lim = i, strong induction lemmas_refuted); root splits spawn their no side up to depth par.
    • Array twins of propagation and of the quota/semantic leaves, each proved equal to the S3 functions (propagateA_eq, quotaA_eq, detOkA_eq, semA_eq, …).
    • GMP-free hot paths (pows/needWallF tables, proved by decide); per-lemma Instance copies to avoid atomic refcount contention.
  • Binary tree format s3-search-tree-bin/1 (trusted reader SearchTreeFormat.parseBin, Rust converter exact/s3_bin.rs), new exes search-check-fast and search-profile.
  • Doc: docs/search_driver.md §8; AGENTS.md entry.
  • SearchCheckS3/S2.lean, fast_opt_s2.rs, s3_sem.rs untouched.

Measured (NAND2 2x4x3 budget 7, 2.0 M nodes, machine under load avg 13–20)

checker input threads check wall
search-check (S3) JSON 1 31.9 s 33.8 s
search-check-fast binary 1 4.2 s 4.4 s
search-check-fast binary 12 0.63–0.93 s 0.84–1.16 s

All 12 A-tier trees VERIFIED by both checkers; mutation tests (budget+1, ref+1, wrong outputs) REJECTED by both.

Trusted base

JSON/binary readers and maskFn, the Rust JSON→binary converter, and the Lean runtime's Task (same compiler/runtime trust as search-check).

Test plan

  • cd formal && lake build (incl. Audit) after merging current master
  • NAND2 b7 + A-tier trees VERIFIED; mutations REJECTED
  • cargo test --release --lib s3_bin -- --ignored (conversion byte-identical to a Python twin)

🤖 Generated with Claude Code

rollrat and others added 7 commits December 6, 2026 18:26
…aves)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c leaf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record why the S3 checker was slow (list access, GMP pow/shift, atomic
refcounts on Task-shared objects), what checkFast changes and proves,
the binary tree format, measured timings (NAND2 b7 33.8 s -> ~1 s wall)
and mutation checks, so the S4/L2 tracks can extend it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-checker

# Conflicts:
#	formal/RedstoneFormal.lean
#	formal/RedstoneFormal/Audit.lean
…-checker

# Conflicts:
#	formal/RedstoneFormal.lean
#	formal/lakefile.toml
#	src/transform/place_and_route/local_placer/exact/mod.rs
…-checker

# Conflicts:
#	src/transform/place_and_route/local_placer/exact/mod.rs
@rollrat
rollrat merged commit a9bc7d1 into master Dec 6, 2026
3 checks 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