Repository navigation
fix(lean,#8869): rewrite ceilLog2 via Nat.log 2 — root cause of Computation native_decide - #9536
Merged
Merged
Conversation
…_decide) ceilLog2 recursed on (k+2+1)/2 — not structurally smaller, so Lean compiled WellFounded recursion, making the def opaque to the kernel reducer. decide could not evaluate it, so gridFrame lvl stuck, blocking the entire buildFromGrid/toGrid/evolveHashlife chain (the 14-15 Computation.lean coherence theorems were native_decide by symptom, not intrinsic). Rewrite the body via Nat.log 2 (Mathlib structural recursion, kernel-reducible): ceilLog2 k = if k <= 1 then 0 else Nat.log 2 (k-1) + 1 Same function (values invariant), ceilLog2_spec statement unchanged, re-proved via Nat.lt_pow_succ_log_self + omega. No sorry, no axiom, no signature change. Measurement: all 15 native_decide theorems flip to decide-reducible (15/15 PASS in Probe8869Measure). Far exceeds ai-01's >=7/15 criterion. Overturns the gridFrame Nat-indexing prescription (probe shows gridFrame Int arithmetic already reduces; the obstruction is ceilLog2, one layer deeper). Verified builds: Conway.Life.MacroCell, Conway.Life.Computation, Conway.Life.HashlifeCorrectness (downstream gate incl. 9 acknowledged sorries). grep -c sorry unchanged in HashlifeCorrectness. See #8869 (root fix; theorem-flip + gate cleanup follow-up pending). Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Aug 5, 2026
Merged
jsboige
added a commit
that referenced
this pull request
Aug 5, 2026
…ing (#9548) Grain: MED/lean — lane myia-ai-01:CoursIA — prev: DEEP/lean #9539 #9536 rewrote ceilLog2 via Nat.log 2 in MacroCell.lean (FR) but left the _en sibling on the old WellFounded recursion — an i18n DRIFT that turned 'Scripts Tests (CPU)' red on main for every PR (seen on #9541/#9543). - Port def ceilLog2 + ceilLog2_spec proof to the EN sibling (byte-identical code, EN docstrings/comments per sibling-pair Pattern A). - lake build Conway.Life.MacroCell_en: SUCCESS (2947 jobs), EXIT=0. - check_i18n_siblings.py --all: 177/179 byte-identical, 0 drift, 0 orphan. Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige
added a commit
that referenced
this pull request
Aug 6, 2026
…ewrite false docstrings After #9536 (ceilLog2 rewrite via Nat.log 2, merged), the 18 hashlife/ evolution theorems in Computation.lean + Computation_en.lean flip from native_decide to kernel decide. Verified: 0 decide failures, 133-149s cold build (18 kernel proofs, warm imports), 7s incremental. Removes the native_decide axioms from the TCB for these decls. FR+EN siblings flipped together (proof byte-identity). Per ai-01 msg-...232021/...232153 (GO): the per-theorem docstrings and the 4 "### Pourquoi native_decide" prose blocks claimed native_decide was "required: not reducible by decide" due to an INTRINSIC MacroCell/Int opacity (diagnosis c.8126/#8749, now REFUTED by #9536's ceilLog2 root cause). Those docstrings became FALSE after the flip — rewritten to state decide-reducibility and cite the ceilLog2 root cause (#9536, sub-expression bisect c.847). 0 proof lines touched (only docstrings/prose). See #8869 Co-Authored-By: Claude <noreply@anthropic.com>
jsboige
added a commit
that referenced
this pull request
Aug 6, 2026
…ewrite false docstrings After #9536 (ceilLog2 rewrite via Nat.log 2, merged), the 18 hashlife/ evolution theorems in Computation.lean + Computation_en.lean flip from native_decide to kernel decide. Verified: 0 decide failures, 133-149s cold build (18 kernel proofs, warm imports), 7s incremental. Removes the native_decide axioms from the TCB for these decls. FR+EN siblings flipped together (proof byte-identity). Per ai-01 msg-...232021/...232153 (GO): the per-theorem docstrings and the 4 "### Pourquoi native_decide" prose blocks claimed native_decide was "required: not reducible by decide" due to an INTRINSIC MacroCell/Int opacity (diagnosis c.8126/#8749, now REFUTED by #9536's ceilLog2 root cause). Those docstrings became FALSE after the flip — rewritten to state decide-reducibility and cite the ceilLog2 root cause (#9536, sub-expression bisect c.847). 0 proof lines touched (only docstrings/prose). See #8869 Co-Authored-By: Claude <noreply@anthropic.com>
jsboige
added a commit
that referenced
this pull request
Aug 6, 2026
…ewrite false docstrings After #9536 (ceilLog2 rewrite via Nat.log 2, merged), the 18 hashlife/ evolution theorems in Computation.lean + Computation_en.lean flip from native_decide to kernel decide. Verified: 0 decide failures, 133-149s cold build (18 kernel proofs, warm imports), 7s incremental. Removes the native_decide axioms from the TCB for these decls. FR+EN siblings flipped together (proof byte-identity). Per ai-01 msg-...232021/...232153 (GO): the per-theorem docstrings and the 4 "### Pourquoi native_decide" prose blocks claimed native_decide was "required: not reducible by decide" due to an INTRINSIC MacroCell/Int opacity (diagnosis c.8126/#8749, now REFUTED by #9536's ceilLog2 root cause). Those docstrings became FALSE after the flip — rewritten to state decide-reducibility and cite the ceilLog2 root cause (#9536, sub-expression bisect c.847). 0 proof lines touched (only docstrings/prose). See #8869 Co-Authored-By: Claude <noreply@anthropic.com>
jsboige
added a commit
that referenced
this pull request
Aug 6, 2026
…ewrite false docstrings (#9544) After #9536 (ceilLog2 rewrite via Nat.log 2, merged), the 18 hashlife/ evolution theorems in Computation.lean + Computation_en.lean flip from native_decide to kernel decide. Verified: 0 decide failures, 133-149s cold build (18 kernel proofs, warm imports), 7s incremental. Removes the native_decide axioms from the TCB for these decls. FR+EN siblings flipped together (proof byte-identity). Per ai-01 msg-...232021/...232153 (GO): the per-theorem docstrings and the 4 "### Pourquoi native_decide" prose blocks claimed native_decide was "required: not reducible by decide" due to an INTRINSIC MacroCell/Int opacity (diagnosis c.8126/#8749, now REFUTED by #9536's ceilLog2 root cause). Those docstrings became FALSE after the flip — rewritten to state decide-reducibility and cite the ceilLog2 root cause (#9536, sub-expression bisect c.847). 0 proof lines touched (only docstrings/prose). See #8869 Co-authored-by: Claude <noreply@anthropic.com>
jsboige
added a commit
that referenced
this pull request
Aug 6, 2026
…e (5/7) (#9571) Flip 5 still-life theorems (loaf, boat, tub, pond, ship) from native_decide to kernel decide in Oscillators.lean + Oscillators_en.lean. Removes 5 native_decide axioms from the TCB (kernel-verified, zero axiom). 2 theorems remain native_decide per c.91 budget rule (measured firsthand): - pulsar_period_three: decide kernel FAILS (maxRecDepth reached, L178:65) - pentadecathlon_period_15: period-15 reduction strictly harder than pulsar (period 3) which already exceeds maxRecDepth; retained. Docstrings rewritten (4 prose blocks FR+EN) per the c.91 per-flip rule: the "native_decide requis / borderline" taglines become false post-flip. The stale "theorems commented out pending verification" (FALSE: they are active) corrected to document the maxRecDepth verdict + native-axiom cost. allow-list trimmed (lean-conway.yml L185): 5 still-life native_decide axioms removed. Oscillators IS in proof-integrity-audit target-modules (unlike Computation) so the trim is required in the same PR (c.91 point 3). pulsar + pentadecathlon RETAINED. Derived firsthand from the current list. Build: lake build Conway.Life.Oscillators Oscillators_en EXIT=0, 30s (warm Mathlib). First attempt (6 flipped) FAILED at pulsar maxRecDepth after 44s; reverting pulsar -> 5 still-lifes compile cleanly. Pre-authorized per ai-01 c.91 (msg-192021: Oscillators/Spaceships/RLE one module per PR). See #8869, See #9536 Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(lean,#8869): rewrite ceilLog2 via Nat.log 2 — root cause of Computation.lean native_decide
Grain: MED/lean — lane
myia-po-2026:CoursIA— executes ai-01's #8869 bounded probe (msg-165936).See #8869.Root cause (empirical, firsthand, sub-expression bisect)
The 14-15
native_decidetheorems inComputation.leanwere NOT intrinsically native. The single stuck point isMacroCell.ceilLog2, which recursed on(k+2+1)/2— not structurally smaller → Lean compiles WellFounded recursion → opaque to the kernel reducer →decidecannot evaluate it →gridFrame lvlstuck →buildFromGrid/toGrid/evolveHashlifeall stuck downstream.Sub-expression bisect (kernel
decide, worktreeCoursIA-8869, Mathlib rc1d568c8c0warm):gridRowMin/Max block(Int foldl min/max): reduce ✓rMin-2(Int.sub),rMax-rMin+5(Int.add),.toNat: all reduce ✓ (my earlier c.843 "Int obstruction" was wrong — retracted)MacroCell.ceilLog2 6 = 3: FAILS — evenceilLog2 2 = 1(one recursion step), even withmaxRecDepth 1000000. WF-opacity, not depth.Nat.log 2(Mathlib, structural): reduces ✓The fix (body-only, same signature, same values)
Same function (values invariant for all k: 0,1→0; 2→1; 3,4→2; 5,6,7,8→3; 9..16→4 …), so
ceilLog2_spec(statement unchanged:2 ^ ceilLog2 k ≥ k) is re-proved via Mathlib'sNat.lt_pow_succ_log_self+omega. Nosorry, no axiom, no signature change. DownstreamceilLog2_ge_three_of_ge_fiveand the HashlifeCorrectness proofs useceilLog2_specas a black box — unaffected (lake build SUCCESS on MacroCell + Computation + HashlifeCorrectness verified).Measurement (ai-01's acceptance: ≥7/15 = real path)
Re-stated all 15
native_decidetheorems withby decidein a probe module: 15/15 PASS (lake build Conway.Life.Probe8869MeasureBuild completed successfully, 0 decide failures). The ceilLog2 rewrite flips every theorem — decisively validates the path (≥7 criterion met at 100 %).Scope of THIS PR (root fix only)
This PR lands the MacroCell.lean
ceilLog2rewrite only (+24/−17, body + spec re-proof). It does NOT flip theComputation.leantheorems (native_decide→decide) nor touch the proof-integrity gate — those are a follow-up PR because:decideis slower thannative_decide; the probe module built in ~123 s. Flipping the 15 theorems needs a build-time evaluation to avoid CI timeouts (the originalnative_decidechoice may have been for perf, now that the obstruction is lifted both options are viable — a deliberate choice, not a drive-by).._native.native_decide.ax_1_1from the audit allow-list + thelen(names)==46pin — ai-01's CI-revelation procedure + gate turf.This PR is safe standalone: the rewrite improves
ceilLog2reducibility with no observable change to existing proofs (they still usenative_decide, still pass). It enables the follow-up.Overturns the gridFrame Nat-indexing prescription
ai-01's msg-165936 prescribed Nat-indexing
gridFrame. The probe proves the obstruction is one layer deeper (ceilLog2), and gridFrame's Int arithmetic already reduces. The fix is a 1-line body rewrite, not a layer-wide refactor. Reported to ai-01 (DM msg-...222331); this PR is the verified root fix the measurement points to.Lean CI discipline §B
grep -c sorryunchanged (0 in MacroCell; the 9 in HashlifeCorrectness untouched).lake build Conway.Life.MacroCellSUCCESS,Conway.Life.ComputationSUCCESS,Conway.Life.HashlifeCorrectnessSUCCESS (downstream).See #8869 (partial — root fix; theorem-flip + gate cleanup follow-up pending ai-01 sanction + perf eval).
🤖 Generated with Claude Code