This journal is in preparation. Submissions are open as a pilot and the editorial board is being formed. Articles marked Demonstration show the format only.
Journal of Machine-Verified MathematicsPeer-reviewed mathematics with machine-checked proofs, for the age of AI

E424/LowBand/Chain.lean

All files · 169 lines · source at the verified commit

1module
2
3public import E424.LowBand.ChainAux
4
5@[expose] public section
6
7/-!
8# Section 9 of the outline: Chain
9
10`chain_core` is the abstract core of Lemma 39. Take a maximal packing `S ⊆ [0, L]` of translates of
11`U`. Its cells cover `[0, L]`, and two cells that meet give `ρ`-values within `2D` of each other.
12`[0, L]` is connected, so the `ρ(0, ·)`-values of the centres form a chain with steps `≤ 2D`.
13The gap argument (`hsplit`) and the count of centres (`packed_card_le`) then bound `ρ(0, x)`.
14-/
15
16set_option linter.style.header false
17open Finset MeasureTheory
18open scoped Pointwise
19
20namespace E424
21
22/-- Packing and connectedness, abstract core of Lemma 39. -/
23theorem chain_core (L c1 D a : ℝ) (hL : 0 < L) (hc : 0 < c1) (U : Set ℝ) (hU : IsCompact U)
24 (hUa : U ⊆ Set.Icc a (a + 2 * L)) (hvol : c1 * L ≤ (volume U).toReal) (ρ : ℝ → ℝ → ℝ)
25 (hsymm : ∀ x ∈ Set.Icc 0 L, ∀ y ∈ Set.Icc 0 L, ρ x y = ρ y x)
26 (htri : ∀ x ∈ Set.Icc 0 L, ∀ y ∈ Set.Icc 0 L, ∀ z ∈ Set.Icc 0 L, ρ x z ≤ ρ x y + ρ y z)
27 (hD : ∀ x ∈ Set.Icc 0 L, ∀ y ∈ Set.Icc 0 L, ∀ u ∈ U, ∀ u' ∈ U, x - y = u - u' → ρ x y ≤ D) :
28 ∀ x ∈ Set.Icc 0 L, ρ 0 x ≤ (12 / c1 + 4) * D := by
29 classical
30 have h0mem : (0 : ℝ) ∈ Set.Icc 0 L := ⟨le_rfl, hL.le⟩
31 have hUne : U.Nonempty := by
32 rcases U.eq_empty_or_nonempty with h | h
33 · have := mul_pos hc hL
34 rw [h, measure_empty, ENNReal.toReal_zero] at hvol
35 linarith
36 · exact h
37 obtain ⟨u0, hu0⟩ := hUne
38 have hD0 : 0 ≤ D := by
39 have h := hD 0 h0mem 0 h0mem u0 hu0 u0 hu0 (by ring)
40 have h2 := htri 0 h0mem 0 h0mem 0 h0mem
41 linarith
42 have hself : ∀ y : ℝ, y - y ∈ U - U := fun y => Set.mem_sub.2 ⟨u0, hu0, u0, hu0, by ring⟩
43 obtain ⟨S, hS, hP, hcov⟩ := exists_maximal_packing hL hc hU ⟨u0, hu0⟩ hUa hvol
44 have hcard : (S.card : ℝ) * c1 ≤ 3 := packed_card_le hL hU hUa hvol hS hP
45 have hSI : ∀ p ∈ S, p ∈ Set.Icc 0 L := fun p hp => hS (Finset.mem_coe.2 hp)
46 -- `ρ x p ≤ D` whenever `x - p ∈ U - U`
47 have hnear : ∀ x ∈ Set.Icc 0 L, ∀ p ∈ Set.Icc 0 L, x - p ∈ U - U → ρ x p ≤ D := by
48 intro x hx p hp hm
49 obtain ⟨u, hu, u', hu', h⟩ := Set.mem_sub.1 hm
50 exact hD x hx p hp u hu u' hu' h.symm
51 -- two cells that meet force `ρ(0, ·)` to change by at most `2D`
52 have hedge : ∀ p ∈ S, ∀ q ∈ S, ∀ y, y ∈ packCell L U p → y ∈ packCell L U q →
53 ρ 0 q ≤ ρ 0 p + 2 * D := by
54 intro p hp q hq y hyp hyq
55 have hy := (mem_packCell.1 hyp).1
56 have h1 := hnear y hy p (hSI p hp) (mem_packCell.1 hyp).2
57 have h2 := hnear y hy q (hSI q hq) (mem_packCell.1 hyq).2
58 have t1 := htri 0 h0mem p (hSI p hp) q (hSI q hq)
59 have t2 := htri p (hSI p hp) y hy q (hSI q hq)
60 have s1 := hsymm p (hSI p hp) y hy
61 linarith
62 -- if the low centres are nonempty and no centre has `ρ(0, ·)` in the gap `(T, T + 2D]`,
63 -- then all centres lie at or below `T`
64 have hsplit : ∀ T : ℝ, (∃ p ∈ S, ρ 0 p ≤ T) → (∀ q ∈ S, T < ρ 0 q → T + 2 * D < ρ 0 q) →
65 ∀ q ∈ S, ρ 0 q ≤ T := by
66 rintro T ⟨p0, hp0, hp0T⟩ hgap
67 by_contra hbad
68 push_neg at hbad
69 obtain ⟨q0, hq0, hq0T⟩ := hbad
70 have hcl : ∀ F : Finset ℝ, IsClosed (⋃ p ∈ F, packCell L U p) := fun F =>
71 isClosed_biUnion_finset fun p _ => isClosed_packCell hU p
72 have hdisj : Set.Icc 0 L ∩ ((⋃ p ∈ S.filter (fun p => ρ 0 p ≤ T), packCell L U p) ∩
73 (⋃ p ∈ S.filter (fun p => ¬ ρ 0 p ≤ T), packCell L U p)) = ∅ := by
74 rw [Set.eq_empty_iff_forall_notMem]
75 rintro y ⟨-, hyu, hyv⟩
76 obtain ⟨p, hp, hyp⟩ := Set.mem_iUnion₂.1 hyu
77 obtain ⟨q, hq, hyq⟩ := Set.mem_iUnion₂.1 hyv
78 have hpS := (Finset.mem_filter.1 hp).1
79 have hpT := (Finset.mem_filter.1 hp).2
80 have hqS := (Finset.mem_filter.1 hq).1
81 have hqT := not_le.1 (Finset.mem_filter.1 hq).2
82 have e := hedge p hpS q hqS y hyp hyq
83 have g := hgap q hqS hqT
84 linarith
85 have hcover : Set.Icc 0 L ⊆ (⋃ p ∈ S.filter (fun p => ρ 0 p ≤ T), packCell L U p) ∪
86 (⋃ p ∈ S.filter (fun p => ¬ ρ 0 p ≤ T), packCell L U p) := by
87 intro y hy
88 obtain ⟨p, hp, hyp⟩ := hcov y hy
89 by_cases h : ρ 0 p ≤ T
90 · exact Or.inl (Set.mem_iUnion₂.2 ⟨p, Finset.mem_filter.2 ⟨hp, h⟩, mem_packCell.2 ⟨hy, hyp⟩⟩)
91 · exact Or.inr (Set.mem_iUnion₂.2 ⟨p, Finset.mem_filter.2 ⟨hp, h⟩, mem_packCell.2 ⟨hy, hyp⟩⟩)
92 have hpre := isPreconnected_iff_subset_of_disjoint_closed.1 (isPreconnected_Icc (a := (0 : ℝ)) (b := L))
93 rcases hpre _ _ (hcl _) (hcl _) hcover hdisj with hlow | hhigh
94 · have hq0I : q0 ∈ Set.Icc 0 L := hSI q0 hq0
95 have hq0v : q0 ∈ ⋃ p ∈ S.filter (fun p => ¬ ρ 0 p ≤ T), packCell L U p :=
96 Set.mem_iUnion₂.2 ⟨q0, Finset.mem_filter.2 ⟨hq0, not_le.2 hq0T⟩, mem_packCell.2 ⟨hq0I, hself q0⟩⟩
97 have hq0u := hlow hq0I
98 exact (Set.eq_empty_iff_forall_notMem.1 hdisj) q0 ⟨hq0I, hq0u, hq0v⟩
99 · have hp0I : p0 ∈ Set.Icc 0 L := hSI p0 hp0
100 have hp0u : p0 ∈ ⋃ p ∈ S.filter (fun p => ρ 0 p ≤ T), packCell L U p :=
101 Set.mem_iUnion₂.2 ⟨p0, Finset.mem_filter.2 ⟨hp0, hp0T⟩, mem_packCell.2 ⟨hp0I, hself p0⟩⟩
102 have hp0v := hhigh hp0I
103 exact (Set.eq_empty_iff_forall_notMem.1 hdisj) p0 ⟨hp0I, hp0u, hp0v⟩
104 -- after `k` steps of size `2D` the centres are all reached, or at least `k + 1` are
105 have hnd : ∀ k : ℕ, (∀ q ∈ S, ρ 0 q ≤ D + 2 * (k : ℝ) * D) ∨
106 k + 1 ≤ (S.filter (fun p => ρ 0 p ≤ D + 2 * (k : ℝ) * D)).card := by
107 intro k
108 induction k with
109 | zero =>
110 right
111 obtain ⟨p0, hp0, hp0m⟩ := hcov 0 h0mem
112 have hle : ρ 0 p0 ≤ D + 2 * ((0 : ℕ) : ℝ) * D := by
113 simp only [Nat.cast_zero, mul_zero, zero_mul, add_zero]
114 exact hnear 0 h0mem p0 (hSI p0 hp0) hp0m
115 exact Finset.card_pos.2 ⟨p0, Finset.mem_filter.2 ⟨hp0, hle⟩⟩
116 | succ k ih =>
117 have hmono : D + 2 * (k : ℝ) * D ≤ D + 2 * ((k + 1 : ℕ) : ℝ) * D := by
118 push_cast
119 nlinarith
120 rcases ih with hall | hcardk
121 · exact Or.inl fun q hq => (hall q hq).trans hmono
122 · by_cases hall' : ∀ q ∈ S, ρ 0 q ≤ D + 2 * (k : ℝ) * D
123 · exact Or.inl fun q hq => (hall' q hq).trans hmono
124 · right
125 have hp0 : ∃ p ∈ S, ρ 0 p ≤ D + 2 * (k : ℝ) * D := by
126 obtain ⟨p0, hp0⟩ := Finset.card_pos.1 (by omega : 0 < (S.filter
127 (fun p => ρ 0 p ≤ D + 2 * (k : ℝ) * D)).card)
128 exact ⟨p0, (Finset.mem_filter.1 hp0).1, (Finset.mem_filter.1 hp0).2⟩
129 have hgap' : ∃ q ∈ S, D + 2 * (k : ℝ) * D < ρ 0 q ∧
130 ρ 0 q ≤ D + 2 * ((k + 1 : ℕ) : ℝ) * D := by
131 by_contra hno
132 push_neg at hno
133 exact hall' (hsplit _ hp0 fun q hq h => by
134 have := hno q hq h
135 push_cast at this
136 linarith)
137 obtain ⟨q, hq, hlo, hhi⟩ := hgap'
138 have hss : S.filter (fun p => ρ 0 p ≤ D + 2 * (k : ℝ) * D) ⊂
139 S.filter (fun p => ρ 0 p ≤ D + 2 * ((k + 1 : ℕ) : ℝ) * D) := by
140 rw [Finset.ssubset_iff_of_subset]
141 · exact ⟨q, Finset.mem_filter.2 ⟨hq, hhi⟩, fun h => not_le.2 hlo (Finset.mem_filter.1 h).2⟩
142 · intro p hp
143 exact Finset.mem_filter.2 ⟨(Finset.mem_filter.1 hp).1, (Finset.mem_filter.1 hp).2.trans hmono⟩
144 have := Finset.card_lt_card hss
145 omega
146 -- all centres lie at or below `D + 2 r D`, `r = |S|`
147 have hall : ∀ q ∈ S, ρ 0 q ≤ D + 2 * (S.card : ℝ) * D := by
148 rcases hnd S.card with h | h
149 · exact h
150 · exfalso
151 have := Finset.card_le_card (Finset.filter_subset (fun p => ρ 0 p ≤ D + 2 * (S.card : ℝ) * D) S)
152 omega
153 have hr : (S.card : ℝ) ≤ 3 / c1 := by
154 rw [le_div_iff₀ hc]
155 exact hcard
156 have h12 : 12 / c1 = 4 * (3 / c1) := by ring
157 have hpos : (0 : ℝ) ≤ 3 / c1 := div_nonneg (by norm_num) hc.le
158 have hr2 : 2 * (S.card : ℝ) + 2 ≤ 12 / c1 + 4 := by linarith
159 have hmul := mul_le_mul_of_nonneg_right hr2 hD0
160 intro x hx
161 obtain ⟨p, hp, hxp⟩ := hcov x hx
162 have h1 := hall p hp
163 have h2 := hnear x hx p (hSI p hp) hxp
164 have h3 := htri 0 h0mem p (hSI p hp) x hx
165 have h4 := hsymm p (hSI p hp) x hx
166 nlinarith
167
168end E424
169