File size: 12,455 Bytes
ddc84c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
import OAI.Analysis.DiamondDistortion.MidpointHeads

namespace OAI

universe u v

noncomputable section
open scoped BigOperators Classical Topology
open Set

namespace DiamondDistortion

namespace Diamond

section
variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X]

theorem quotient_full_gain {t g D s : ℝ} (ht : 0 < t) (hg : 0 < g)
    (htD : t ≤ 1/(2*D)) (hX : Midpoint.QuotientGain X t g)
    (k : ℕ) (f : Vertex k → X) (hf : HasDistortion k f D s) :
    1 ≤ D/(1+g)^k := by
  obtain ⟨hD,_,h⟩ := normalized_distortion f hf
  have hg1 : 0 < 1+g := by positivity
  let c : ℝ := 1/(1+g)
  have hc : 0 ≤ c := by dsimp [c]; positivity
  have hc1 : c ≤ 1 := (div_le_one₀ hg1).mpr (by linarith)
  have hstep : ∀ (x : X) (z : ℕ → X) (R : ℝ),0 ≤ R → R ≤ D → 1 ≤ ‖x‖ →
      (∀ i,‖x+z i‖ ≤ R) → (∀ i,‖x-z i‖ ≤ R) →
      (∀ i j,i ≠ j → 2*1 ≤ ‖z i-z j‖) → ‖x‖ ≤ c*R := by
    intro x z R hR hRD hx hp hm hs
    have hxD := (norm_center_le (hp 0) (hm 0)).trans hRD
    have h := Midpoint.quotient_parent_full_gain ht hg hD htD hX z hx hxD hp hm
      (by simpa only [mul_one] using hs)
    simpa only [c,div_eq_mul_inv,one_mul,mul_comm] using h
  have hi := iterate_contraction hc hc1 hstep k (fun v => s⁻¹ • f v)
    (show 0 ≤ D by linarith) le_rfl (fun u v => by simpa only [one_mul] using (h u v).1)
    (fun e => slope_upper _ (fun u v => by simpa only [mul_one] using (h u v).2) e)
  simpa only [c,div_pow,one_pow,div_eq_mul_inv,one_mul,mul_comm,inv_pow] using hi

theorem quotient_transfer {t g D s : ℝ} (ht : 0 < t) (hg : 0 < g)
    (htD : t ≤ 1/(2*D)) (hX : Midpoint.QuotientGain X t g)
    (k : ℕ) (f : Vertex k → X) (hf : HasDistortion k f D s) :
    (1+g/2)^k ≤ D := by
  have h := quotient_full_gain ht hg htD hX k f hf
  have hp : 0 < (1+g)^k := by positivity
  have hpow : (1+g)^k ≤ D := by simpa only [one_mul] using (le_div_iff₀ hp).mp h
  exact (pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ 1+g/2) (by linarith : 1+g/2 ≤ 1+g) k).trans hpow

/-- A parent at any of the k replacement stages, with all of its actual children
    bounded by the specified multiple of its own slope. The recursion restricts
    to old vertices and therefore includes every stage, not just the last one. -/
def StableParent (c : ℝ) : (k : ℕ) → (Vertex k → X) → Prop
  | 0,_ => False
  | n+1,f => (∃ e : Edge n,∀ (i : ℕ) (b : Bool),
      ‖slope f (e,i,b)‖ ≤ c*‖slope (fun v => f (Sum.inl v)) e‖) ∨
      StableParent c n (fun v => f (Sum.inl v))

lemma absence_stable_growth {c s : ℝ} (hc : 0 ≤ c) (k : ℕ) (f : Vertex k → X)
    (hl : ∀ u v,s*distance k u v ≤ ‖f u-f v‖) (hn : ¬ StableParent c k f) :
    ∃ e : Edge k,s*c^k ≤ ‖slope f e‖ := by
  induction k with
  | zero => exact ⟨(),by simpa using slope_lower f hl ()⟩
  | succ n ih =>
    simp only [StableParent,not_or] at hn
    obtain ⟨e,he⟩ := ih (fun v => f (Sum.inl v)) (old_lower f hl) hn.2
    have hne : ¬ ∀ (i : ℕ) (b : Bool),
        ‖slope f (e,i,b)‖ ≤ c*‖slope (fun v => f (Sum.inl v)) e‖ :=
      fun h => hn.1 ⟨e,h⟩
    push Not at hne
    obtain ⟨i,b,hchild⟩ := hne
    refine ⟨(e,i,b),?_⟩
    have hm := mul_le_mul_of_nonneg_left he hc
    calc
      s*c^(n+1) = c*(s*c^n) := by ring
      _ ≤ c*‖slope (fun v => f (Sum.inl v)) e‖ := hm
      _ ≤ ‖slope f (e,i,b)‖ := hchild.le

theorem stable_parent {D δ : ℝ} (hδ : 0 < δ) (k : ℕ) (f : Vertex k → X)
    (hf : HasDistortion k f D 1) (hdepth : D < (1+δ)^k) :
    StableParent (1+δ) k f := by
  by_contra hn
  obtain ⟨e,he⟩ := absence_stable_growth (by positivity : 0 ≤ 1+δ) k f
    (fun u v => (hf.2.2 u v).1) hn
  have hb : ‖slope f e‖ ≤ D := slope_upper f
    (fun u v => by simpa only [mul_one] using (hf.2.2 u v).2) e
  simp only [one_mul] at he
  linarith

/-- Exact exclusion of infinite separated families in every enlarged unit-center
    lens, retaining the radius and separation as independent parameters. -/
def EnlargedLensExcluded (X : Type*) [NormedAddCommGroup X] (R β : ℝ) : Prop :=
  ∀ u : X,‖u‖=1 → ¬ ∃ z : ℕ → X,
    (∀ i,max ‖u+z i‖ ‖u-z i‖ ≤ 1+β) ∧
    (∀ i j,i ≠ j → R ≤ ‖z i-z j‖)

lemma enlarged_parent {D β L : ℝ} (_hD : 1 ≤ D) (hβ : 0 < β)
    (hX : EnlargedLensExcluded X (2/D) β) {x : X} (z : ℕ → X)
    (hx : 1 ≤ ‖x‖) (hxD : ‖x‖ ≤ D)
    (hp : ∀ i,‖x+z i‖ ≤ L) (hm : ∀ i,‖x-z i‖ ≤ L)
    (hs : ∀ i j,i ≠ j → 2 ≤ ‖z i-z j‖) : ‖x‖ < L/(1+β) := by
  by_contra! hn
  let r := ‖x‖
  have hr : 0 < r := by dsimp [r]; linarith
  have hβ1 : 0 < 1+β := by positivity
  have hL : L ≤ r*(1+β) := (div_le_iff₀ hβ1).mp hn
  have hunit : ‖r⁻¹ • x‖=1 := by
    rw [norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr hr.le),inv_mul_cancel₀ hr.ne']
  apply hX (r⁻¹ • x) hunit
  refine ⟨fun i => r⁻¹ • z i,?_,?_⟩
  · intro i
    apply max_le
    · rw [← smul_add,norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr hr.le)]
      calc
        r⁻¹*‖x+z i‖ ≤ r⁻¹*(r*(1+β)) :=
          mul_le_mul_of_nonneg_left ((hp i).trans hL) (inv_nonneg.mpr hr.le)
        _ = 1+β := by rw [← mul_assoc,inv_mul_cancel₀ hr.ne',one_mul]
    · rw [← smul_sub,norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr hr.le)]
      calc
        r⁻¹*‖x-z i‖ ≤ r⁻¹*(r*(1+β)) :=
          mul_le_mul_of_nonneg_left ((hm i).trans hL) (inv_nonneg.mpr hr.le)
        _ = 1+β := by rw [← mul_assoc,inv_mul_cancel₀ hr.ne',one_mul]
  · intro i j hij
    rw [← smul_sub,norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr hr.le)]
    calc
      2/D ≤ 2/r := div_le_div_of_nonneg_left (by norm_num) hr hxD
      _ = r⁻¹*2 := by ring
      _ ≤ r⁻¹*‖z i-z j‖ := mul_le_mul_of_nonneg_left (hs i j hij) (inv_nonneg.mpr hr.le)

theorem enlarged_backward {D β s : ℝ} (hβ : 0 < β)
    (hX : EnlargedLensExcluded X (2/D) β) (k : ℕ) (f : Vertex k → X)
    (hf : HasDistortion k f D s) : 1 ≤ D/(1+β)^k := by
  obtain ⟨hD,_,h⟩ := normalized_distortion f hf
  have hβ1 : 0 < 1+β := by positivity
  let c : ℝ := 1/(1+β)
  have hc : 0 ≤ c := by dsimp [c]; positivity
  have hc1 : c ≤ 1 := (div_le_one₀ hβ1).mpr (by linarith)
  have hstep : ∀ (x : X) (z : ℕ → X) (R : ℝ),0 ≤ R → R ≤ D → 1 ≤ ‖x‖ →
      (∀ i,‖x+z i‖ ≤ R) → (∀ i,‖x-z i‖ ≤ R) →
      (∀ i j,i ≠ j → 2*1 ≤ ‖z i-z j‖) → ‖x‖ ≤ c*R := by
    intro x z R hR hRD hx hp hm hs
    have hxD := (norm_center_le (hp 0) (hm 0)).trans hRD
    have h := (enlarged_parent hD hβ hX z hx hxD hp hm
      (by simpa only [mul_one] using hs)).le
    simpa only [c,div_eq_mul_inv,one_mul,mul_comm] using h
  have hi := iterate_contraction hc hc1 hstep k (fun v => s⁻¹ • f v)
    (show 0 ≤ D by linarith) le_rfl (fun u v => by simpa only [one_mul] using (h u v).1)
    (fun e => slope_upper _ (fun u v => by simpa only [mul_one] using (h u v).2) e)
  simpa only [c,div_pow,one_pow,div_eq_mul_inv,one_mul,mul_comm,inv_pow] using hi

theorem stable_parent_obstruction {D δ s : ℝ} (hδ : 0 < δ)
    (hX : EnlargedLensExcluded X (2/D) δ) (k : ℕ) (f : Vertex k → X)
    (hf : HasDistortion k f D s) : (1+δ)^k ≤ D := by
  have h := enlarged_backward hδ hX k f hf
  simpa only [one_mul] using (le_div_iff₀ (by positivity : 0 < (1+δ)^k)).mp h

end

variable {X ι : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X]

/-- Supremum of all edge slopes at one stage; not a maximum. -/
def stageSup {k : ℕ} (f : Vertex k → X) : ℝ :=
  sSup (Set.range (fun e : Edge k => ‖slope f e‖))

lemma slope_le_stageSup {k : ℕ} (f : Vertex k → X) {D : ℝ}
    (hb : ∀ e,‖slope f e‖ ≤ D) (e : Edge k) : ‖slope f e‖ ≤ stageSup f := by
  exact le_csSup ⟨D,by rintro _ ⟨e,rfl⟩; exact hb e⟩ ⟨e,rfl⟩

lemma stageSup_le {k : ℕ} (f : Vertex k → X) {D : ℝ}
    (hb : ∀ e,‖slope f e‖ ≤ D) : stageSup f ≤ D := by
  unfold stageSup
  apply csSup_le (s := Set.range (fun e : Edge k => ‖slope f e‖))
    ⟨‖slope f (baseEdge k)‖,⟨baseEdge k,rfl⟩⟩
  rintro _ ⟨e,rfl⟩
  exact hb e

lemma parametric_Q_one {b lam : ℝ} (hb : 0 < b) : 1 ≤ Real.sqrt (1+b*lam^2) := by
  have h : (1:ℝ)^2 ≤ 1+b*lam^2 := by nlinarith [mul_nonneg hb.le (sq_nonneg lam)]
  exact (Real.le_sqrt (by norm_num) (by positivity)).mpr h

theorem parametric_stage (A : Midpoint.Heads ι X) {a b lam D : ℝ}
    (ha : 0 < a) (hb : 0 < b) (hlam : 0 < lam) (hinput : A.ParametricInput a b)
    (n : ℕ) (f : Vertex (n+1) → X) (hf : HasDistortion (n+1) f D 1) :
    let Q := Real.sqrt (1+b*lam^2)
    stageSup (fun v => f (Sum.inl v)) ≤ Q*stageSup f-a*lam ∧
    Q*stageSup f-a*lam ≤ stageSup f-(a*lam-(Q-1)*D) := by
  let Q := Real.sqrt (1+b*lam^2)
  have hbnd : ∀ e,‖slope f e‖ ≤ D := slope_upper f
    (fun u v => by simpa only [mul_one] using (hf.2.2 u v).2)
  have hR : stageSup f ≤ D := stageSup_le f hbnd
  have hQ : 1 ≤ Q := parametric_Q_one hb
  constructor
  · apply stageSup_le
    intro e
    have hp : ∀ i,‖slope (fun v => f (Sum.inl v)) e+deviation f e i‖ ≤ stageSup f := by
      intro i
      rw [slope_plus_deviation]
      exact slope_le_stageSup f hbnd _
    have hm : ∀ i,‖slope (fun v => f (Sum.inl v)) e-deviation f e i‖ ≤ stageSup f := by
      intro i
      rw [slope_minus_deviation]
      exact slope_le_stageSup f hbnd _
    have hs : ∀ i j,i ≠ j → 2 ≤ ‖deviation f e i-deviation f e j‖ := by
      intro i j hij
      simpa only [mul_one] using deviation_separated f (fun u v => (hf.2.2 u v).1) e hij
    have h := A.parametric_lens ha hb hlam hinput (deviation f e) hp hm hs
    norm_num at h
    linarith
  · change Q*stageSup f-a*lam ≤ stageSup f-(a*lam-(Q-1)*D)
    nlinarith [mul_le_mul_of_nonneg_left hR (sub_nonneg.mpr hQ)]

/-- The exact parameterized graph depth conclusion; no optimization performed. -/
theorem parametric (A : Midpoint.Heads ι X) {a b lam D s : ℝ}
    (ha : 0 < a) (hb : 0 < b) (hlam : 0 < lam) (hinput : A.ParametricInput a b)
    (hΔ : 0 < a*lam-(Real.sqrt (1+b*lam^2)-1)*D)
    (k : ℕ) (f : Vertex k → X) (hf : HasDistortion k f D s) :
    1+(k:ℝ)*(a*lam-(Real.sqrt (1+b*lam^2)-1)*D) ≤ D := by
  obtain ⟨hD,_,h⟩ := normalized_distortion f hf
  let Q := Real.sqrt (1+b*lam^2)
  let δ := a*lam-(Q-1)*D
  have hQ : 1 ≤ Q := parametric_Q_one hb
  have hstep : ∀ (x : X) (z : ℕ → X) (R : ℝ),0 ≤ R → R ≤ D → 1 ≤ ‖x‖ →
      (∀ i,‖x+z i‖ ≤ R) → (∀ i,‖x-z i‖ ≤ R) →
      (∀ i j,i ≠ j → 2*1 ≤ ‖z i-z j‖) → ‖x‖ ≤ R-δ := by
    intro x z R hR hRD hx hp hm hs
    have hh := A.parametric_lens ha hb hlam hinput z hp hm hs
    norm_num at hh
    dsimp [δ]
    change ‖x‖+a*lam ≤ Q*R at hh
    nlinarith [mul_le_mul_of_nonneg_left hRD (sub_nonneg.mpr hQ)]
  exact iterate_additive hΔ.le hstep k (fun v => s⁻¹ • f v)
    (show 0 ≤ D by linarith) le_rfl (fun u v => by simpa only [one_mul] using (h u v).1)
    (fun e => slope_upper _ (fun u v => by simpa only [mul_one] using (h u v).2) e)

theorem parametric_twentyfour (A : Midpoint.Heads ι X) (hinput : A.ParametricInput (1/2) 3)
    {D s : ℝ} (k : ℕ) (f : Vertex k → X) (hf : HasDistortion k f D s) :
    1+(k:ℝ)/(24*D) ≤ D := by
  have hD : 0 < D := lt_of_lt_of_le (by norm_num) hf.1
  let lam := 1/(6*D)
  have hlam : 0 < lam := by dsimp [lam]; positivity
  have hQ : Real.sqrt (1+3*lam^2) ≤ 1+3*lam^2/2 := by
    apply (Real.sqrt_le_left (by positivity)).mpr
    nlinarith [sq_nonneg (3*lam^2/2)]
  have hden : (6*D) ≠ 0 := by positivity
  have hlD : lam*(6*D)=1 := by dsimp [lam]; field_simp
  have hgain : 1/(24*D) ≤ (1/2)*lam-(Real.sqrt (1+3*lam^2)-1)*D := by
    have hs := mul_le_mul_of_nonneg_right hQ hD.le
    have he : (1/2)*lam-(3*lam^2/2)*D = 1/(24*D) := by
      dsimp [lam]
      field_simp
      ring
    linarith
  have hΔ : 0 < (1/2)*lam-(Real.sqrt (1+3*lam^2)-1)*D :=
    lt_of_lt_of_le (by positivity) hgain
  have h := parametric A (by norm_num : (0:ℝ)<1/2) (by norm_num : (0:ℝ)<3) hlam hinput hΔ k f hf
  have hm := mul_le_mul_of_nonneg_left hgain (show 0 ≤ (k:ℝ) by positivity)
  have he : (k:ℝ)/(24*D)=(k:ℝ)*(1/(24*D)) := by ring
  linarith

end Diamond

end DiamondDistortion

end

end OAI