roseking commited on
Commit
110f4f3
·
verified ·
1 Parent(s): 12dee50

Add lean source and binary files (part 11)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. lean/OAI/Analysis/BackwardIntertwiners/CoefficientSupport.lean +314 -0
  2. lean/OAI/Analysis/BackwardIntertwiners/ConvexEnvelope.lean +398 -0
  3. lean/OAI/Analysis/BackwardIntertwiners/ConvolutionBounds.lean +320 -0
  4. lean/OAI/Analysis/BackwardIntertwiners/DiagonalSymbols.lean +176 -0
  5. lean/OAI/Analysis/BackwardIntertwiners/ErgodicTransitivity.lean +380 -0
  6. lean/OAI/Analysis/BackwardIntertwiners/ExplicitWeights.lean +288 -0
  7. lean/OAI/Analysis/BackwardIntertwiners/FiberMaps.lean +159 -0
  8. lean/OAI/Analysis/BackwardIntertwiners/FiberTails.lean +165 -0
  9. lean/OAI/Analysis/BackwardIntertwiners/GlobalOperators.lean +473 -0
  10. lean/OAI/Analysis/BackwardIntertwiners/HaarBase.lean +195 -0
  11. lean/OAI/Analysis/BackwardIntertwiners/HilbertClassification.lean +101 -0
  12. lean/OAI/Analysis/BackwardIntertwiners/ModelProperties.lean +133 -0
  13. lean/OAI/Analysis/BackwardIntertwiners/OperatorTransport.lean +157 -0
  14. lean/OAI/Analysis/BackwardIntertwiners/OrdinaryStructure.lean +253 -0
  15. lean/OAI/Analysis/BackwardIntertwiners/PolarDiagonals.lean +368 -0
  16. lean/OAI/Analysis/BackwardIntertwiners/PolarFactors.lean +169 -0
  17. lean/OAI/Analysis/BackwardIntertwiners/ProductSymbols.lean +111 -0
  18. lean/OAI/Analysis/BackwardIntertwiners/SpectralProjections.lean +369 -0
  19. lean/OAI/Analysis/BackwardIntertwiners/StrongClosure.lean +208 -0
  20. lean/OAI/Analysis/BackwardIntertwiners/WeightSeparation.lean +296 -0
  21. lean/OAI/Analysis/BernoulliCone/BoundedCalibration.lean +121 -0
  22. lean/OAI/Analysis/BernoulliCone/CalibrationTraces.lean +89 -0
  23. lean/OAI/Analysis/BernoulliCone/CapCalculus.lean +263 -0
  24. lean/OAI/Analysis/BernoulliCone/CapExtension.lean +90 -0
  25. lean/OAI/Analysis/BernoulliCone/CapFoliation.lean +139 -0
  26. lean/OAI/Analysis/BernoulliCone/CapGeometry.lean +122 -0
  27. lean/OAI/Analysis/BernoulliCone/ClampedFoliationGraph.lean +96 -0
  28. lean/OAI/Analysis/BernoulliCone/ClampedGraphBound.lean +87 -0
  29. lean/OAI/Analysis/BernoulliCone/ClampedSeam.lean +79 -0
  30. lean/OAI/Analysis/BernoulliCone/ClosedGermExtension.lean +50 -0
  31. lean/OAI/Analysis/BernoulliCone/CompactGradient.lean +42 -0
  32. lean/OAI/Analysis/BernoulliCone/CompactLipschitzDivergence.lean +149 -0
  33. lean/OAI/Analysis/BernoulliCone/CompactZeroFiber.lean +33 -0
  34. lean/OAI/Analysis/BernoulliCone/ConePicone.lean +134 -0
  35. lean/OAI/Analysis/BernoulliCone/CylindricalCalculus.lean +195 -0
  36. lean/OAI/Analysis/BernoulliCone/DominatedVariation.lean +70 -0
  37. lean/OAI/Analysis/BernoulliCone/ExteriorCalibration.lean +77 -0
  38. lean/OAI/Analysis/BernoulliCone/FluxBounds.lean +99 -0
  39. lean/OAI/Analysis/BernoulliCone/FluxBulk.lean +61 -0
  40. lean/OAI/Analysis/BernoulliCone/FluxSeam.lean +87 -0
  41. lean/OAI/Analysis/BernoulliCone/FoliationBulkGerm.lean +29 -0
  42. lean/OAI/Analysis/BernoulliCone/FoliationDifferential.lean +168 -0
  43. lean/OAI/Analysis/BernoulliCone/FoliationGraph.lean +131 -0
  44. lean/OAI/Analysis/BernoulliCone/FoliationSeam.lean +43 -0
  45. lean/OAI/Analysis/BernoulliCone/GlobalMinimizer.lean +84 -0
  46. lean/OAI/Analysis/BernoulliCone/GroundState.lean +328 -0
  47. lean/OAI/Analysis/BernoulliCone/HalfspaceDensity.lean +70 -0
  48. lean/OAI/Analysis/BernoulliCone/HalfspaceDifferential.lean +93 -0
  49. lean/OAI/Analysis/BernoulliCone/HalfspaceEnergy.lean +108 -0
  50. lean/OAI/Analysis/BernoulliCone/HalfspaceGroundstate.lean +88 -0
lean/OAI/Analysis/BackwardIntertwiners/CoefficientSupport.lean ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ConvolutionBounds
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+
11
+ def coefficientObstacle (d : ℕ → ℂ) : Set ℕ := {n | 0 < n ∧ d n ≠ 0}
12
+
13
+ def coefficientEnvelope (d : ℕ → ℂ) : ℕ → ℝ :=
14
+ convexEnvelope (coefficientObstacle d) (fun n => -Real.log ‖d n‖)
15
+
16
+ namespace CoefficientEnvelope
17
+
18
+ variable {d : ℕ → ℂ} {G : ℕ → ℝ}
19
+ variable (hu : ∀ n : ℕ, ∃ k, n < k ∧ d k ≠ 0)
20
+ variable (hG : DiscreteConvex G) (hG0 : G 0 = 0)
21
+ variable (hb : ∀ n, ‖d n‖ ≤ Real.exp (-G n))
22
+
23
+ include hu in
24
+ lemma unbounded : ∀ n : ℕ, ∃ k, n < k ∧ k ∈ coefficientObstacle d := by
25
+ intro n
26
+ obtain ⟨k, hk, hd⟩ := hu n
27
+ exact ⟨k, hk, by exact ⟨by omega, hd⟩⟩
28
+
29
+ include hG hG0 hb in
30
+ lemma minorant : G ∈ convexMinorants (coefficientObstacle d) (fun n => -Real.log ‖d n‖) := by
31
+ refine ⟨hG0, hG, ?_⟩
32
+ intro n hn
33
+ have hn0 : 0 < ‖d n‖ := norm_pos_iff.mpr hn.2
34
+ have hh := Real.log_le_log hn0 (hb n)
35
+ rw [Real.log_exp] at hh
36
+ linarith
37
+
38
+ include hu hG hG0 hb in
39
+ lemma properties :
40
+ coefficientEnvelope d 0 = 0 ∧ DiscreteConvex (coefficientEnvelope d) ∧
41
+ (∀ n, G n ≤ coefficientEnvelope d n) ∧
42
+ (∀ n, ‖d n‖ ≤ Real.exp (-coefficientEnvelope d n)) ∧
43
+ (∀ n, 0 < coefficientEnvelope d (n+2) - 2*coefficientEnvelope d (n+1) +
44
+ coefficientEnvelope d n → ‖d (n+1)‖ = Real.exp (-coefficientEnvelope d (n+1))) := by
45
+ have hm := minorant hG hG0 hb
46
+ have he : (convexMinorants (coefficientObstacle d) (fun n => -Real.log ‖d n‖)).Nonempty := ⟨G, hm⟩
47
+ have hU := unbounded hu
48
+ refine ⟨ConvexEnvelope.zero hU he, ConvexEnvelope.convex hU he,
49
+ ConvexEnvelope.le_envelope hU hm, ?_, ?_⟩
50
+ · intro n
51
+ by_cases hn : n = 0
52
+ · subst n
53
+ simpa only [coefficientEnvelope, ConvexEnvelope.zero hU he, hG0] using hb 0
54
+ · by_cases hd : d n = 0
55
+ · simp only [hd, norm_zero]; exact (Real.exp_pos _).le
56
+ · have hbelow := ConvexEnvelope.below he (show n ∈ coefficientObstacle d from ⟨by omega, hd⟩)
57
+ have hlog : Real.log ‖d n‖ ≤ -coefficientEnvelope d n := by
58
+ change coefficientEnvelope d n ≤ -Real.log ‖d n‖ at hbelow
59
+ linarith
60
+ simpa only [Real.exp_log (norm_pos_iff.mpr hd)] using Real.exp_le_exp.mpr hlog
61
+ · intro n hn
62
+ obtain ⟨hd, hc⟩ := ConvexEnvelope.contact hU he n hn
63
+ change coefficientEnvelope d (n+1) = -Real.log ‖d (n+1)‖ at hc
64
+ rw [hc, neg_neg, Real.exp_log (norm_pos_iff.mpr hd.2)]
65
+
66
+ end CoefficientEnvelope
67
+
68
+
69
+
70
+ theorem no_both_unbounded {P Q : ℕ → ℝ} {b c : ℤ → ℂ}
71
+ (hb : EnvelopeBounds P Q b c) (hP : DiscreteConvex P) (hQ : DiscreteConvex Q)
72
+ (hP0 : P 0 = 0) (hQ0 : Q 0 = 0) {lam δ : ℝ}
73
+ (hlam : Real.log 3 < lam) (hδ : lam < δ)
74
+ (hqp : ∀ᶠ n : ℕ in atTop, δ*(n : ℝ)^2 ≤ P n)
75
+ (hqq : ∀ᶠ n : ℕ in atTop, δ*(n : ℝ)^2 ≤ Q n)
76
+ (hbu : ∀ n : ℕ, ∃ k, n < k ∧ b (k : ℤ) ≠ 0)
77
+ (hcu : ∀ n : ℕ, ∃ k, n < k ∧ c (-(k : ℤ)) ≠ 0)
78
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) : False := by
79
+ obtain ⟨hA0, hA, hPA, hcA, hcontactA⟩ :=
80
+ CoefficientEnvelope.properties hcu hP hP0 hb.c_neg
81
+ obtain ⟨hB0, hB, hQB, hbB, hcontactB⟩ :=
82
+ CoefficientEnvelope.properties hbu hQ hQ0 hb.b_pos
83
+ let A := coefficientEnvelope (fun n => c (-(n : ℤ)))
84
+ let B := coefficientEnvelope (fun n => b (n : ℤ))
85
+ apply no_correlation_of_envelopes (A := A) (B := B) (b := b) (c := c)
86
+ ?_ hA hB hA0 hB0 hlam hδ ?_ ?_ hcontactA hcontactB hz
87
+ · refine ⟨hbB, ?_, ?_, hcA⟩
88
+ · intro n
89
+ exact (hb.b_neg n).trans (Real.exp_le_exp.mpr (hPA n))
90
+ · intro n
91
+ exact (hb.c_pos n).trans (Real.exp_le_exp.mpr (hQB n))
92
+ · filter_upwards [hqp] with n hn using hn.trans (hPA n)
93
+ · filter_upwards [hqq] with n hn using hn.trans (hQB n)
94
+
95
+
96
+ def boundedSideTail (B : ℕ → ℝ) (c : ℤ → ℂ) (h : ℤ) (p k : ℕ) : ℝ :=
97
+ Real.exp (B p - B (p+k+1)) * ‖c (h+(k:ℤ)+1)‖
98
+
99
+ lemma boundedSideTail_nonneg (B : ℕ → ℝ) (c : ℤ → ℂ) (h : ℤ) (p k : ℕ) :
100
+ 0 ≤ boundedSideTail B c h p k := mul_nonneg (Real.exp_pos _).le (norm_nonneg _)
101
+
102
+ lemma boundedSideTail_mono {B : ℕ → ℝ} (hB : DiscreteConvex B)
103
+ (c : ℤ → ℂ) (h : ℤ) {p₀ p : ℕ} (hpp : p₀ ≤ p) (k : ℕ) :
104
+ boundedSideTail B c h p k ≤ boundedSideTail B c h p₀ k := by
105
+ have hh := hB.increment_mono hpp (k+1)
106
+ unfold boundedSideTail
107
+ apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
108
+ apply Real.exp_le_exp.mpr
109
+ simp only [← Nat.add_assoc] at hh
110
+ linarith
111
+
112
+ lemma boundedSideTail_tendsto {B : ℕ → ℝ} (hB : DiscreteConvex B)
113
+ (hs : Tendsto (fun n => B (n+1)-B n) atTop atTop)
114
+ (c : ℤ → ℂ) (h : ℤ) {p₀ : ℕ} (hsum : Summable (boundedSideTail B c h p₀)) :
115
+ Tendsto (fun p => ∑' k, boundedSideTail B c h p k) atTop (𝓝 0) := by
116
+ have hpoint (k : ℕ) : Tendsto (fun p => boundedSideTail B c h p k) atTop (𝓝 0) := by
117
+ have heq : (fun p => boundedSideTail B c h p k) =
118
+ (fun p => normalizedTailTerm B p k * (Real.exp (-B (k+1)) * ‖c (h+(k:ℤ)+1)‖)) := by
119
+ funext p
120
+ unfold boundedSideTail normalizedTailTerm
121
+ rw [← mul_assoc, ← Real.exp_add]
122
+ congr 2
123
+ ring
124
+ rw [heq]
125
+ simpa using (hB.tail_term_tendsto hs k).mul_const
126
+ (Real.exp (-B (k+1)) * ‖c (h+(k:ℤ)+1)‖)
127
+ have ht := tendsto_tsum_of_dominated_convergence hsum hpoint
128
+ (show ∀ᶠ p : ℕ in atTop, ∀ k,
129
+ ‖boundedSideTail B c h p k‖ ≤ boundedSideTail B c h p₀ k from ?_)
130
+ · simpa using ht
131
+ · filter_upwards [eventually_ge_atTop p₀] with p hp k
132
+ rw [Real.norm_eq_abs, abs_of_nonneg (boundedSideTail_nonneg _ _ _ _ _)]
133
+ exact boundedSideTail_mono hB c h hp k
134
+
135
+
136
+
137
+ theorem no_unbounded_against_min {B : ℕ → ℝ} {b c : ℤ → ℂ}
138
+ (hB : DiscreteConvex B) (hB0 : B 0 = 0) {δ : ℝ} (hδ : 0 < δ)
139
+ (hquad : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ B n)
140
+ (hb : ∀ n : ℕ, ‖b n‖ ≤ Real.exp (-B n))
141
+ (hc : ∀ n, 0 < B (n+2) - 2*B (n+1) + B n →
142
+ ‖b ((n+1:ℕ):ℤ)‖ = Real.exp (-B (n+1)))
143
+ {h : ℤ} (hch : c h ≠ 0) (hcmin : ∀ j : ℤ, j < h → c j = 0)
144
+ {p₀ : ℕ} (hsum : Summable (boundedSideTail B c h p₀))
145
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) : False := by
146
+ have hchpos := norm_pos_iff.mpr hch
147
+ have ht := boundedSideTail_tendsto hB (hB.slopes_tendsto hB0 hδ hquad) c h hsum
148
+ obtain ⟨N, hN⟩ := eventually_atTop.1 (ht (eventually_lt_nhds hchpos))
149
+ obtain ⟨n, hn, hcurv⟩ := large_curvature hδ hδ hquad (max N (max p₀ (h.toNat+1)))
150
+ let p := n+1
151
+ have hp₀ : p₀ ≤ p := by dsimp [p]; omega
152
+ have hpN : N ≤ p := by dsimp [p]; omega
153
+ have hph : h < (p : ℤ) := by dsimp [p]; omega
154
+ have hcontact : ‖b (p : ℤ)‖ = Real.exp (-B p) := hc n (by simpa using hcurv)
155
+ have htailsum : Summable (boundedSideTail B c h p) := by
156
+ apply hsum.of_norm_bounded
157
+ intro k
158
+ rw [Real.norm_eq_abs, abs_of_nonneg (boundedSideTail_nonneg _ _ _ _ _)]
159
+ exact boundedSideTail_mono hB c h hp₀ k
160
+ let f := fun i : ℤ => b ((p:ℤ)+i) * c (h+i)
161
+ have hfneg : ∀ k : ℕ, f (-((k:ℤ)+1)) = 0 := by
162
+ intro k
163
+ dsimp [f]
164
+ rw [hcmin _ (by omega), mul_zero]
165
+ have hfbound (k : ℕ) : ‖f ((k:ℤ)+1)‖ ≤ Real.exp (-B p) * boundedSideTail B c h p k := by
166
+ dsimp [f, boundedSideTail]
167
+ rw [norm_mul, ← mul_assoc, ← Real.exp_add]
168
+ have he : -B p + (B p - B (p+k+1)) = -B (p+k+1) := by ring
169
+ rw [he]
170
+ have hi : (p:ℤ)+((k:ℤ)+1) = ((p+k+1:ℕ):ℤ) := by omega
171
+ rw [hi]
172
+ simpa only [add_assoc] using mul_le_mul_of_nonneg_right (hb (p+k+1)) (norm_nonneg (c (h+(k:ℤ)+1)))
173
+ have hfpos : Summable (fun k : ℕ => ‖f ((k:ℤ)+1)‖) := by
174
+ apply (htailsum.mul_left (Real.exp (-B p))).of_norm_bounded
175
+ intro k
176
+ simpa only [Real.norm_eq_abs, abs_of_nonneg (norm_nonneg _)] using hfbound k
177
+ have hfn : Summable (fun k : ℕ => ‖f (-((k:ℤ)+1))‖) := by
178
+ simp only [hfneg, norm_zero]
179
+ exact summable_zero
180
+ have hzcenter : (∑' i : ℤ, f i) = 0 := by
181
+ let r := ((p:ℤ)-h).toNat
182
+ have hr : 1 ≤ r := by dsimp [r]; omega
183
+ have hri : (r:ℤ) = (p:ℤ)-h := by dsimp [r]; omega
184
+ calc (∑' i : ℤ, f i) = ∑' i : ℤ, b ((p:ℤ)+i) * c (((p:ℤ)+i)-(r:ℤ)) := by
185
+ apply tsum_congr
186
+ intro i
187
+ dsimp [f]
188
+ congr 2
189
+ omega
190
+ _ = ∑' j : ℤ, b j * c (j-r) := by
191
+ simpa only [Equiv.coe_addLeft] using
192
+ (Equiv.addLeft (p:ℤ)).tsum_eq (fun j : ℤ => b j * c (j-r))
193
+ _ = 0 := hz r hr
194
+ have hcentral := central_norm_le_of_correlation_zero f hfpos hfn hzcenter
195
+ simp only [hfneg, norm_zero, tsum_zero, add_zero] at hcentral
196
+ have hcentral' : Real.exp (-B p) * ‖c h‖ ≤
197
+ Real.exp (-B p) * ∑' k, boundedSideTail B c h p k := by
198
+ calc Real.exp (-B p) * ‖c h‖ = ‖f 0‖ := by simp [f, hcontact]
199
+ _ ≤ ∑' k : ℕ, ‖f ((k:ℤ)+1)‖ := hcentral
200
+ _ ≤ ∑' k, Real.exp (-B p) * boundedSideTail B c h p k :=
201
+ hfpos.tsum_le_tsum hfbound (htailsum.mul_left _)
202
+ _ = _ := tsum_mul_left
203
+ have hle := (mul_le_mul_iff_right₀ (Real.exp_pos (-B p))).mp hcentral'
204
+ exact (not_lt_of_ge hle) (hN p hpN)
205
+
206
+
207
+ def positiveLog (w : ℤ → ℝ) (n : ℕ) : ℝ := -Real.log (w n)
208
+ def negativeLog (w : ℤ → ℝ) (n : ℕ) : ℝ := Real.log (w (-(n:ℤ)))
209
+ def stepRatio (w : ℤ → ℝ) (j : ℤ) : ℝ := w (j+1) / w j
210
+
211
+ lemma stepRatio_summable {w : ℤ → ℝ} (hw : ∀ j, 0 < w j) (hw0 : w 0 = 1)
212
+ (hP : DiscreteConvex (negativeLog w)) (hQ : DiscreteConvex (positiveLog w))
213
+ {δ : ℝ} (hδ : 0 < δ)
214
+ (hqp : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ negativeLog w n)
215
+ (hqq : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ positiveLog w n) :
216
+ Summable (stepRatio w) := by
217
+ have hP0 : negativeLog w 0 = 0 := by simp [negativeLog, hw0]
218
+ have hQ0 : positiveLog w 0 = 0 := by simp [positiveLog, hw0]
219
+ have hsP := hP.summable_exp_neg_slope hP0 hδ hqp
220
+ have hsQ := hQ.summable_exp_neg_slope hQ0 hδ hqq
221
+ apply Summable.of_nat_of_neg_add_one
222
+ · apply hsQ.congr
223
+ intro n
224
+ unfold stepRatio positiveLog
225
+ have he : -(-Real.log (w (n+1)) - -Real.log (w n)) =
226
+ Real.log (w (n+1)) - Real.log (w n) := by ring
227
+ push_cast
228
+ rw [he, Real.exp_sub, Real.exp_log (hw _), Real.exp_log (hw _)]
229
+ · apply hsP.congr
230
+ intro n
231
+ unfold stepRatio negativeLog
232
+ have hi : -((n:ℤ)+1)+1 = -(n:ℤ) := by omega
233
+ rw [hi]
234
+ push_cast
235
+ rw [neg_sub, Real.exp_sub, Real.exp_log (hw _), Real.exp_log (hw _)]
236
+
237
+ lemma bounds_of_weight {w : ℤ → ℝ} (hw : ∀ j, 0 < w j) {b c : ℤ → ℂ}
238
+ (hb : ∀ j, ‖b j‖ ≤ w j) (hc : ∀ j, ‖c j‖ * w j ≤ 1) :
239
+ EnvelopeBounds (negativeLog w) (positiveLog w) b c := by
240
+ have hc' (j : ℤ) : ‖c j‖ ≤ (w j)⁻¹ := by
241
+ simpa only [one_div] using (le_div_iff₀ (hw j)).mpr (hc j)
242
+ constructor
243
+ · intro n
244
+ simpa [positiveLog, Real.exp_log (hw _)] using hb n
245
+ · intro n
246
+ simpa [negativeLog, Real.exp_log (hw _)] using hb (-(n:ℤ))
247
+ · intro n
248
+ simpa [positiveLog, Real.exp_neg, Real.exp_log (hw _)] using hc' n
249
+ · intro n
250
+ simpa [negativeLog, Real.exp_neg, Real.exp_log (hw _)] using hc' (-(n:ℤ))
251
+
252
+ lemma boundedSideTail_summable {w : ℤ → ℝ} (hw : ∀ j, 0 < w j)
253
+ (hdec : Antitone w) (hs : Summable (stepRatio w))
254
+ {B : ℕ → ℝ} (hBw : ∀ n : ℕ, Real.exp (-B n) ≤ w n)
255
+ {c : ℤ → ℂ} (hc : ∀ j, ‖c j‖ * w j ≤ 1)
256
+ (h : ℤ) {p₀ : ℕ} (hp₀ : h+1 ≤ (p₀:ℤ)) :
257
+ Summable (boundedSideTail B c h p₀) := by
258
+ have hsm := hs.comp_injective (i := fun k : ℕ => h+(k:ℤ)+1) (by
259
+ intro a b hab; dsimp only at hab; omega)
260
+ apply (hsm.mul_left (Real.exp (B p₀))).of_norm_bounded
261
+ intro k
262
+ rw [Real.norm_eq_abs, abs_of_nonneg (boundedSideTail_nonneg _ _ _ _ _)]
263
+ change boundedSideTail B c h p₀ k ≤ Real.exp (B p₀) * stepRatio w (h+(k:ℤ)+1)
264
+ have hwle : Real.exp (-B (p₀+k+1)) ≤ w (h+(k:ℤ)+1+1) := by
265
+ exact (hBw _).trans (hdec (by omega))
266
+ have hcw : ‖c (h+(k:ℤ)+1)‖ ≤ 1 / w (h+(k:ℤ)+1) :=
267
+ (le_div_iff₀ (hw _)).mpr (hc _)
268
+ unfold boundedSideTail stepRatio
269
+ rw [Real.exp_sub, div_eq_mul_inv, ← Real.exp_neg, mul_assoc]
270
+ apply mul_le_mul_of_nonneg_left _ (Real.exp_pos _).le
271
+ calc Real.exp (-B (p₀+k+1)) * ‖c (h+(k:ℤ)+1)‖ ≤
272
+ w (h+(k:ℤ)+1+1) * (1 / w (h+(k:ℤ)+1)) :=
273
+ mul_le_mul hwle hcw (norm_nonneg _) (hw _).le
274
+ _ = _ := by ring
275
+
276
+ lemma nat_support_unbounded {d : ℤ → ℂ}
277
+ (hu : ¬∃ m : ℤ, ∀ j : ℤ, d j ≠ 0 → j ≤ m) :
278
+ ∀ n : ℕ, ∃ k, n < k ∧ d (k:ℤ) ≠ 0 := by
279
+ push Not at hu
280
+ intro n
281
+ obtain ⟨j, hd, hj⟩ := hu n
282
+ refine ⟨j.toNat, by omega, ?_⟩
283
+ have he : (j.toNat:ℤ) = j := by omega
284
+ simpa only [he] using hd
285
+
286
+
287
+
288
+ lemma bounded_above_of_min {w : ℤ → ℝ} (hw : ∀ j, 0 < w j)
289
+ (hdec : Antitone w) (hw0 : w 0 = 1) (hs : Summable (stepRatio w))
290
+ (hQ : DiscreteConvex (positiveLog w)) {δ : ℝ} (hδ : 0 < δ)
291
+ (hqq : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ positiveLog w n)
292
+ {b c : ℤ → ℂ} (hb : ∀ j, ‖b j‖ ≤ w j) (hc : ∀ j, ‖c j‖*w j ≤ 1)
293
+ {h : ℤ} (hch : c h ≠ 0) (hcmin : ∀ j : ℤ, j < h → c j = 0)
294
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) :
295
+ ∃ m : ℤ, ∀ j : ℤ, b j ≠ 0 → j ≤ m := by
296
+ by_contra hu
297
+ have hbu := nat_support_unbounded hu
298
+ have hQ0 : positiveLog w 0 = 0 := by simp [positiveLog, hw0]
299
+ obtain ⟨hB0, hB, hQB, hbB, hcontactB⟩ :=
300
+ CoefficientEnvelope.properties hbu hQ hQ0 (bounds_of_weight hw hb hc).b_pos
301
+ let B := coefficientEnvelope (fun n => b (n:ℤ))
302
+ have hquad : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ B n := by
303
+ filter_upwards [hqq] with n hn using hn.trans (hQB n)
304
+ have hBw (n : ℕ) : Real.exp (-B n) ≤ w n := by
305
+ have hh := Real.exp_le_exp.mpr (neg_le_neg (hQB n))
306
+ simpa only [positiveLog, neg_neg, Real.exp_log (hw _)] using hh
307
+ exact no_unbounded_against_min hB hB0 hδ hquad hbB hcontactB hch hcmin
308
+ (boundedSideTail_summable hw hdec hs hBw hc h (p₀ := h.toNat+1) (by omega)) hz
309
+
310
+
311
+ end
312
+ end BackwardIntertwiners
313
+
314
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ConvexEnvelope.lean ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+
11
+
12
+ def DiscreteConvex (F : ℕ → ℝ) : Prop :=
13
+ Monotone (fun n => F (n + 1) - F n)
14
+
15
+ namespace DiscreteConvex
16
+
17
+ variable {F : ℕ → ℝ}
18
+
19
+ lemma of_step (h : ∀ n, F (n+1) - F n ≤ F (n+2) - F (n+1)) :
20
+ DiscreteConvex F := by
21
+ exact monotone_nat_of_le_succ h
22
+
23
+ lemma step (h : DiscreteConvex F) (n : ℕ) :
24
+ F (n+1) - F n ≤ F (n+2) - F (n+1) := by
25
+ exact h (Nat.le_succ n)
26
+
27
+ lemma sub_zero_le (h : DiscreteConvex F) (n : ℕ) :
28
+ F n - F 0 ≤ (n : ℝ) * (F (n+1) - F n) := by
29
+ induction n with
30
+ | zero => simp
31
+ | succ n hn =>
32
+ have hs := h.step n
33
+ have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n
34
+ push_cast
35
+ nlinarith
36
+
37
+ lemma secant_le (h : DiscreteConvex F) {n m : ℕ} (hnm : n ≤ m) :
38
+ (m : ℝ) * (F n - F 0) ≤ (n : ℝ) * (F m - F 0) := by
39
+ induction m, hnm using Nat.le_induction with
40
+ | base => rfl
41
+ | succ m hnm ih =>
42
+ have hs := h.sub_zero_le n
43
+ have hd := h hnm
44
+ have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n
45
+ have ht : F n - F 0 ≤ (n : ℝ) * (F (m+1) - F m) := by
46
+ calc F n - F 0 ≤ (n : ℝ) * (F (n+1) - F n) := hs
47
+ _ ≤ (n : ℝ) * (F (m+1) - F m) := mul_le_mul_of_nonneg_left hd hn0
48
+ push_cast
49
+ nlinarith
50
+
51
+ lemma le_endpoint (h : DiscreteConvex F) (h0 : F 0 = 0)
52
+ {n m : ℕ} (hnm : n ≤ m) (hm : 0 < m) (B : ℝ) (hB : 0 ≤ B)
53
+ (hend : F m ≤ B) : F n ≤ B := by
54
+ have hs := h.secant_le hnm
55
+ rw [h0, sub_zero, sub_zero] at hs
56
+ have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n
57
+ have hm0 : (0 : ℝ) < m := Nat.cast_pos.mpr hm
58
+ have hnm' : (n : ℝ) ≤ m := Nat.cast_le.mpr hnm
59
+ have hh : (m : ℝ) * F n ≤ (m : ℝ) * B := calc
60
+ (m : ℝ) * F n ≤ (n : ℝ) * F m := hs
61
+ _ ≤ (n : ℝ) * B := mul_le_mul_of_nonneg_left hend hn0
62
+ _ ≤ (m : ℝ) * B := mul_le_mul_of_nonneg_right hnm' hB
63
+ exact (mul_le_mul_iff_right₀ hm0).mp hh
64
+
65
+
66
+ lemma bump (h : DiscreteConvex F) (n : ℕ) {ε : ℝ} (hε : 0 ≤ ε)
67
+ (hgap : 2 * ε ≤ F (n+2) - 2 * F (n+1) + F n) :
68
+ DiscreteConvex (fun k => F k + if k = n+1 then ε else 0) := by
69
+ apply of_step
70
+ intro k
71
+ by_cases hk : k = n
72
+ · subst k
73
+ have hne : n ≠ n+1 := by omega
74
+ have hne' : n+2 ≠ n+1 := by omega
75
+ simp only [ite_eq_right hne, ite_eq_right hne', ite_true, add_zero]
76
+ linarith
77
+ · have hmid : k+1 ≠ n+1 := by omega
78
+ have hlo : F k ≤ F k + if k = n+1 then ε else 0 := by
79
+ split_ifs <;> linarith
80
+ have hhi : F (k+2) ≤ F (k+2) + if k+2 = n+1 then ε else 0 := by
81
+ split_ifs <;> linarith
82
+ simp only [ite_eq_right hmid, add_zero]
83
+ have hs := h.step k
84
+ linarith
85
+
86
+ end DiscreteConvex
87
+
88
+
89
+
90
+
91
+ def convexMinorants (I : Set ℕ) (f : ℕ → ℝ) : Set (ℕ → ℝ) :=
92
+ {F | F 0 = 0 ∧ DiscreteConvex F ∧ ∀ n ∈ I, F n ≤ f n}
93
+
94
+
95
+ def convexEnvelope (I : Set ℕ) (f : ℕ → ℝ) (n : ℕ) : ℝ :=
96
+ sSup ((fun F : ℕ → ℝ => F n) '' convexMinorants I f)
97
+
98
+ namespace ConvexEnvelope
99
+
100
+ variable {I : Set ℕ} {f : ℕ → ℝ}
101
+ variable (hunbounded : ∀ n : ℕ, ∃ k, n < k ∧ k ∈ I)
102
+ variable (hne : (convexMinorants I f).Nonempty)
103
+
104
+ include hunbounded in
105
+ lemma bddAbove (n : ℕ) :
106
+ BddAbove ((fun F : ℕ → ℝ => F n) '' convexMinorants I f) := by
107
+ obtain ⟨k, hnk, hkI⟩ := hunbounded n
108
+ refine ⟨max 0 (f k), ?_⟩
109
+ rintro _ ⟨F, hF, rfl⟩
110
+ exact hF.2.1.le_endpoint hF.1 (Nat.le_of_lt hnk) (by omega)
111
+ _ (le_max_left _ _) ((hF.2.2 k hkI).trans (le_max_right _ _))
112
+
113
+ include hunbounded in
114
+ lemma le_envelope {F : ℕ → ℝ} (hF : F ∈ convexMinorants I f) (n : ℕ) :
115
+ F n ≤ convexEnvelope I f n := by
116
+ exact le_csSup (bddAbove hunbounded n) ⟨F, hF, rfl⟩
117
+
118
+ include hunbounded hne in
119
+ lemma zero : convexEnvelope I f 0 = 0 := by
120
+ apply le_antisymm
121
+ · apply csSup_le (hne.image _)
122
+ rintro _ ⟨F, hF, rfl⟩
123
+ exact le_of_eq hF.1
124
+ · obtain ⟨F, hF⟩ := hne
125
+ simpa only [hF.1] using le_envelope hunbounded hF 0
126
+
127
+ include hunbounded hne in
128
+ lemma convex : DiscreteConvex (convexEnvelope I f) := by
129
+ apply DiscreteConvex.of_step
130
+ intro n
131
+ have hh : convexEnvelope I f (n+1) ≤
132
+ (convexEnvelope I f n + convexEnvelope I f (n+2)) / 2 := by
133
+ apply csSup_le (hne.image _)
134
+ rintro _ ⟨F, hF, rfl⟩
135
+ have hc := hF.2.1.step n
136
+ have hl := le_envelope hunbounded hF n
137
+ have hr := le_envelope hunbounded hF (n+2)
138
+ linarith
139
+ linarith
140
+
141
+ include hne in
142
+ lemma below {n : ℕ} (hn : n ∈ I) : convexEnvelope I f n ≤ f n := by
143
+ apply csSup_le (hne.image _)
144
+ rintro _ ⟨F, hF, rfl⟩
145
+ exact hF.2.2 n hn
146
+
147
+ include hunbounded hne in
148
+ lemma mem : convexEnvelope I f ∈ convexMinorants I f :=
149
+ ⟨zero hunbounded hne, convex hunbounded hne, fun _ hn => below hne hn⟩
150
+
151
+ include hunbounded hne in
152
+
153
+ lemma contact (n : ℕ)
154
+ (hgap : 0 < convexEnvelope I f (n+2) - 2 * convexEnvelope I f (n+1) +
155
+ convexEnvelope I f n) :
156
+ n+1 ∈ I ∧ convexEnvelope I f (n+1) = f (n+1) := by
157
+ let F := convexEnvelope I f
158
+ let δ := F (n+2) - 2 * F (n+1) + F n
159
+ have hδ : 0 < δ := hgap
160
+ have hF : F ∈ convexMinorants I f := mem hunbounded hne
161
+ have maximal : ∀ ε : ℝ, 0 < ε → 2*ε ≤ δ →
162
+ (n+1 ∈ I → F (n+1)+ε ≤ f (n+1)) → False := by
163
+ intro ε hε hεgap hεobs
164
+ let G := fun k => F k + if k = n+1 then ε else 0
165
+ have hG : G ∈ convexMinorants I f := by
166
+ refine ⟨?_, hF.2.1.bump n hε.le hεgap, ?_⟩
167
+ · simp [G, hF.1]
168
+ · intro k hk
169
+ by_cases he : k = n+1
170
+ · subst k
171
+ simpa [G] using hεobs hk
172
+ · simpa [G, he] using hF.2.2 k hk
173
+ have hle := le_envelope hunbounded hG (n+1)
174
+ simp only [G, ite_true] at hle
175
+ change F (n+1) + ε ≤ F (n+1) at hle
176
+ linarith
177
+ have hi : n+1 ∈ I := by
178
+ by_contra hn
179
+ exact maximal (δ/4) (by positivity) (by linarith) (by simp [hn])
180
+ refine ⟨hi, ?_⟩
181
+ have hle := hF.2.2 (n+1) hi
182
+ by_contra hneq
183
+ have hlt : F (n+1) < f (n+1) := lt_of_le_of_ne hle hneq
184
+ let ε := min (δ/4) ((f (n+1) - F (n+1))/2)
185
+ have hε : 0 < ε := lt_min (by positivity) (by linarith)
186
+ have hε₁ : ε ≤ δ/4 := min_le_left _ _
187
+ have hε₂ : ε ≤ (f (n+1) - F (n+1))/2 := min_le_right _ _
188
+ exact maximal ε hε (by linarith) (by intro _; linarith)
189
+
190
+ end ConvexEnvelope
191
+
192
+ namespace DiscreteConvex
193
+
194
+ variable {F : ℕ → ℝ}
195
+
196
+
197
+ lemma slopes_tendsto (h : DiscreteConvex F) (h0 : F 0 = 0)
198
+ {δ : ℝ} (hδ : 0 < δ)
199
+ (hq : ∀ᶠ n : ℕ in atTop, δ * (n : ℝ)^2 ≤ F n) :
200
+ Tendsto (fun n => F (n+1) - F n) atTop atTop := by
201
+ apply tendsto_atTop.2
202
+ intro b
203
+ have hn : ∀ᶠ n : ℕ in atTop, b / δ ≤ (n : ℝ) :=
204
+ (tendsto_natCast_atTop_atTop : Tendsto (fun n : ℕ => (n : ℝ)) atTop atTop)
205
+ (eventually_ge_atTop _)
206
+ filter_upwards [hq, hn, eventually_ge_atTop 1] with n hqn hbn hn1
207
+ have hnpos : (0 : ℝ) < n := Nat.cast_pos.mpr (by omega)
208
+ have hs := h.sub_zero_le n
209
+ rw [h0, sub_zero] at hs
210
+ have hb : b ≤ δ * n := (div_le_iff₀ hδ).mp hbn |>.trans_eq (mul_comm _ _)
211
+ have hd : δ * n ≤ F (n+1) - F n := by nlinarith
212
+ exact hb.trans hd
213
+
214
+ end DiscreteConvex
215
+
216
+
217
+
218
+ lemma quadratic_upper_of_curvature {F : ℕ → ℝ} {lam : ℝ} (N : ℕ)
219
+ (h : ∀ n, N ≤ n → F (n+2) - 2*F (n+1) + F n ≤ 2*lam) (k : ℕ) :
220
+ F (N+k) ≤ F N + (k : ℝ) * (F (N+1) - F N) + lam * k * (k-1) := by
221
+ have hs (k : ℕ) : F (N+k+1) - F (N+k) ≤
222
+ F (N+1) - F N + 2*lam*k := by
223
+ induction k with
224
+ | zero => simp
225
+ | succ k ih =>
226
+ have hh := h (N+k) (Nat.le_add_right _ _)
227
+ have e₁ : N + (k+1) + 1 = N+k+2 := by omega
228
+ have e₂ : N + (k+1) = N+k+1 := by omega
229
+ rw [e₁, e₂]
230
+ push_cast
231
+ linarith
232
+ induction k with
233
+ | zero => simp
234
+ | succ k ih =>
235
+ have hh := hs k
236
+ have e : N + (k+1) = N+k+1 := by omega
237
+ rw [e]
238
+ push_cast
239
+ nlinarith
240
+
241
+
242
+
243
+
244
+ lemma large_curvature {F : ℕ → ℝ} {lam μ : ℝ} (hμ : 0 < μ) (hlamμ : lam < μ)
245
+ (hq : ∀ᶠ n : ℕ in atTop, μ * (n : ℝ)^2 ≤ F n) :
246
+ ∀ N : ℕ, ∃ n, N ≤ n ∧ 2*lam < F (n+2) - 2*F (n+1) + F n := by
247
+ intro N
248
+ by_contra! h
249
+ obtain ⟨Q, hQ⟩ := eventually_atTop.1 hq
250
+ let C := |F (N+1) - F N - lam| + |F N|
251
+ obtain ⟨k, hk⟩ := exists_nat_gt (max (max (Q : ℝ) 1) (C / (μ-lam)))
252
+ have hkQ : (Q : ℝ) < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_left _ _)) hk
253
+ have hk1 : (1 : ℝ) < k := lt_of_le_of_lt (le_trans (le_max_right _ _) (le_max_left _ _)) hk
254
+ have hkC : C / (μ-lam) < k := lt_of_le_of_lt (le_max_right _ _) hk
255
+ have hk0 : (0 : ℝ) < k := lt_trans zero_lt_one hk1
256
+ have hQN : Q ≤ N+k := by exact Nat.le_trans (Nat.le_of_lt (Nat.cast_lt.mp hkQ)) (Nat.le_add_left _ _)
257
+ have hlo := hQ (N+k) hQN
258
+ have hhi := quadratic_upper_of_curvature N h k
259
+ have hNC : (0 : ℝ) ≤ N := Nat.cast_nonneg _
260
+ have hlow : μ * (k : ℝ)^2 ≤ F (N+k) := by
261
+ push_cast at hlo
262
+ calc μ * (k : ℝ)^2 ≤ μ * ((N : ℝ) + k)^2 := by gcongr; linarith
263
+ _ ≤ F (N+k) := hlo
264
+ have hF0 : F N ≤ |F N| * k := calc
265
+ F N ≤ |F N| := le_abs_self _
266
+ _ ≤ |F N| * k := le_mul_of_one_le_right (abs_nonneg _) hk1.le
267
+ have hF1 : (F (N+1) - F N - lam) * k ≤ |F (N+1) - F N - lam| * k :=
268
+ mul_le_mul_of_nonneg_right (le_abs_self _) hk0.le
269
+ have hup : F (N+k) ≤ lam * (k : ℝ)^2 + C*k := by
270
+ dsimp [C]
271
+ nlinarith [hhi]
272
+ have hlarge : C < (k : ℝ) * (μ-lam) := (div_lt_iff₀ (sub_pos.mpr hlamμ)).mp hkC
273
+ have hstrict := mul_lt_mul_of_pos_right hlarge hk0
274
+ nlinarith
275
+
276
+ namespace DiscreteConvex
277
+
278
+ variable {F : ℕ → ℝ}
279
+
280
+ lemma increment_mono (h : DiscreteConvex F) {i j : ℕ} (hij : i ≤ j) (k : ℕ) :
281
+ F (i+k) - F i ≤ F (j+k) - F j := by
282
+ induction k with
283
+ | zero => simp
284
+ | succ k ih =>
285
+ have hh := h (Nat.add_le_add_right hij k)
286
+ have e₁ : i + (k+1) = i+k+1 := by omega
287
+ have e₂ : j + (k+1) = j+k+1 := by omega
288
+ rw [e₁, e₂]
289
+ linarith
290
+
291
+ lemma increment_lower (h : DiscreteConvex F) (q k : ℕ) :
292
+ (k : ℝ) * (F (q+1) - F q) ≤ F (q+k) - F q := by
293
+ induction k with
294
+ | zero => simp
295
+ | succ k ih =>
296
+ have hh := h (Nat.le_add_right q k)
297
+ have e : q + (k+1) = q+k+1 := by omega
298
+ rw [e]
299
+ push_cast
300
+ nlinarith
301
+
302
+ lemma increment_upper (h : DiscreteConvex F) (q k r : ℕ) (hkr : q+k ≤ r+1) :
303
+ F (q+k) - F q ≤ (k : ℝ) * (F (r+1) - F r) := by
304
+ induction k with
305
+ | zero => simp
306
+ | succ k ih =>
307
+ have hh := h (show q+k ≤ r by omega)
308
+ have ih' := ih (by omega)
309
+ have e : q + (k+1) = q+k+1 := by omega
310
+ rw [e]
311
+ push_cast
312
+ nlinarith
313
+
314
+ lemma summable_exp_neg_slope (h : DiscreteConvex F) (h0 : F 0 = 0)
315
+ {δ : ℝ} (hδ : 0 < δ)
316
+ (hq : ∀ᶠ n : ℕ in atTop, δ * (n : ℝ)^2 ≤ F n) :
317
+ Summable (fun n => Real.exp (-(F (n+1) - F n))) := by
318
+ have hgeo : Summable (fun n : ℕ => Real.exp (-δ) ^ n) :=
319
+ summable_geometric_of_lt_one (Real.exp_pos _).le (by simpa using hδ)
320
+ apply hgeo.of_norm_bounded_eventually_nat
321
+ filter_upwards [hq, eventually_ge_atTop 1] with n hqn hn1
322
+ have hnpos : (0 : ℝ) < n := Nat.cast_pos.mpr (by omega)
323
+ have hs := h.sub_zero_le n
324
+ rw [h0, sub_zero] at hs
325
+ have hd : δ * n ≤ F (n+1) - F n := by nlinarith
326
+ rw [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _), ← Real.exp_nat_mul]
327
+ exact Real.exp_le_exp.mpr (by nlinarith)
328
+
329
+ end DiscreteConvex
330
+
331
+
332
+ def normalizedTailTerm (F : ℕ → ℝ) (q k : ℕ) : ℝ :=
333
+ Real.exp (F (k+1) + F q - F (q+k+1))
334
+
335
+ namespace DiscreteConvex
336
+
337
+ variable {F : ℕ → ℝ}
338
+
339
+ lemma tail_term_bound (h : DiscreteConvex F) {q : ℕ} (hq : 1 ≤ q) (k : ℕ) :
340
+ normalizedTailTerm F q k ≤
341
+ Real.exp (F 1) * Real.exp (-(F (k+2) - F (k+1))) := by
342
+ have hi := h.increment_mono hq (k+1)
343
+ have e₁ : 1+(k+1) = k+2 := by omega
344
+ have e₂ : q+(k+1) = q+k+1 := by omega
345
+ rw [e₁, e₂] at hi
346
+ rw [normalizedTailTerm, ← Real.exp_add]
347
+ exact Real.exp_le_exp.mpr (by linarith)
348
+
349
+ lemma tail_term_tendsto (h : DiscreteConvex F)
350
+ (hs : Tendsto (fun n => F (n+1) - F n) atTop atTop) (k : ℕ) :
351
+ Tendsto (fun q => normalizedTailTerm F q k) atTop (𝓝 0) := by
352
+ apply Real.tendsto_exp_atBot.comp
353
+ apply tendsto_atBot.2
354
+ intro b
355
+ have hsl := hs (eventually_ge_atTop (max 0 (F (k+1) - b)))
356
+ filter_upwards [hsl] with q hq
357
+ have hs0 : 0 ≤ F (q+1) - F q := (le_max_left _ _).trans hq
358
+ have hsb : F (k+1) - b ≤ F (q+1) - F q := (le_max_right _ _).trans hq
359
+ have hi := h.increment_lower q (k+1)
360
+ have e : q+(k+1) = q+k+1 := by omega
361
+ rw [e] at hi
362
+ have hk0 : (0 : ℝ) ≤ k := Nat.cast_nonneg k
363
+ push_cast at hi
364
+ change F (k+1) + F q - F (q+k+1) ≤ b
365
+ nlinarith
366
+
367
+ lemma tail_summable (h : DiscreteConvex F)
368
+ (hsum : Summable (fun n => Real.exp (-(F (n+1) - F n))))
369
+ {q : ℕ} (hq : 1 ≤ q) : Summable (normalizedTailTerm F q) := by
370
+ have hmajor := ((summable_nat_add_iff 1).mpr hsum).mul_left (Real.exp (F 1))
371
+ apply hmajor.of_norm_bounded
372
+ intro k
373
+ rw [Real.norm_eq_abs, abs_of_pos (show 0 < normalizedTailTerm F q k from Real.exp_pos _)]
374
+ simpa only [Nat.add_assoc] using h.tail_term_bound hq k
375
+
376
+
377
+
378
+ lemma tail_tsum_tendsto (h : DiscreteConvex F)
379
+ (hsum : Summable (fun n => Real.exp (-(F (n+1) - F n))))
380
+ (hs : Tendsto (fun n => F (n+1) - F n) atTop atTop) :
381
+ Tendsto (fun q => ∑' k, normalizedTailTerm F q k) atTop (𝓝 0) := by
382
+ have hmajor := ((summable_nat_add_iff 1).mpr hsum).mul_left (Real.exp (F 1))
383
+ have hh := tendsto_tsum_of_dominated_convergence hmajor
384
+ (fun k => h.tail_term_tendsto hs k) (show ∀ᶠ q : ℕ in atTop, ∀ k,
385
+ ‖normalizedTailTerm F q k‖ ≤
386
+ Real.exp (F 1) * Real.exp (-(F (k+1+1) - F (k+1))) from ?_)
387
+ · simpa using hh
388
+ · filter_upwards [eventually_ge_atTop 1] with q hq k
389
+ rw [Real.norm_eq_abs, abs_of_pos (show 0 < normalizedTailTerm F q k from Real.exp_pos _)]
390
+ simpa only [Nat.add_assoc] using h.tail_term_bound hq k
391
+
392
+ end DiscreteConvex
393
+
394
+
395
+ end
396
+ end BackwardIntertwiners
397
+
398
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ConvolutionBounds.lean ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ConvexEnvelope
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+
11
+ structure EnvelopeBounds (A B : ℕ → ℝ) (b c : ℤ → ℂ) : Prop where
12
+ b_pos : ∀ n : ℕ, ‖b n‖ ≤ Real.exp (-B n)
13
+ b_neg : ∀ n : ℕ, ‖b (-(n : ℤ))‖ ≤ Real.exp (A n)
14
+ c_pos : ∀ n : ℕ, ‖c n‖ ≤ Real.exp (B n)
15
+ c_neg : ∀ n : ℕ, ‖c (-(n : ℤ))‖ ≤ Real.exp (-A n)
16
+
17
+ lemma middle_exponent {A B : ℕ → ℝ} (hA : DiscreteConvex A) (hB : DiscreteConvex B)
18
+ {m : ℕ} (hm : 1 ≤ m) (p k : ℕ) (hk : k ≤ m) {lam : ℝ}
19
+ (hbridge : A m - A (m-1) + lam ≤ B (p+1) - B p) :
20
+ -B (p+k) - A (m-k) ≤ -B p - A m - lam * k := by
21
+ have hlow := hB.increment_lower p k
22
+ have hupp := hA.increment_upper (m-k) k (m-1) (by omega)
23
+ rw [Nat.sub_add_cancel hk, Nat.sub_add_cancel hm] at hupp
24
+ have hmul := mul_le_mul_of_nonneg_left hbridge (Nat.cast_nonneg k : (0 : ℝ) ≤ k)
25
+ nlinarith
26
+
27
+
28
+ def centeredCorrelation (b c : ℤ → ℂ) (m p : ℕ) (n : ℤ) : ℂ :=
29
+ b ((p : ℤ)+n) * c (-(m : ℤ)+n)
30
+
31
+ namespace EnvelopeBounds
32
+
33
+ variable {A B : ℕ → ℝ} {b c : ℤ → ℂ}
34
+
35
+ lemma reflected (hb : EnvelopeBounds A B b c) :
36
+ EnvelopeBounds B A (fun n => c (-n)) (fun n => b (-n)) where
37
+ b_pos := hb.c_neg
38
+ b_neg := by simpa only [neg_neg] using hb.c_pos
39
+ c_pos := hb.b_neg
40
+ c_neg := by simpa only [neg_neg] using hb.b_pos
41
+
42
+ lemma central_norm (_ : EnvelopeBounds A B b c) {m p : ℕ}
43
+ (hp : ‖b (p : ℤ)‖ = Real.exp (-B p))
44
+ (hm : ‖c (-(m : ℤ))‖ = Real.exp (-A m)) :
45
+ ‖centeredCorrelation b c m p 0‖ = Real.exp (-B p - A m) := by
46
+ simp only [centeredCorrelation, add_zero, norm_mul, hp, hm]
47
+ rw [← Real.exp_add]
48
+ congr 1
49
+
50
+ lemma middle_pos (hb : EnvelopeBounds A B b c)
51
+ (hA : DiscreteConvex A) (hB : DiscreteConvex B)
52
+ {m : ℕ} (hm : 1 ≤ m) (p k : ℕ) (hk : k ≤ m) {lam : ℝ}
53
+ (hbridge : A m - A (m-1) + lam ≤ B (p+1) - B p) :
54
+ ‖centeredCorrelation b c m p k‖ ≤
55
+ Real.exp (-B p - A m) * Real.exp (-lam * k) := by
56
+ have he : -(m : ℤ) + k = -((m-k : ℕ) : ℤ) := by omega
57
+ rw [centeredCorrelation, he, ← Nat.cast_add, norm_mul]
58
+ calc ‖b ((p+k : ℕ) : ℤ)‖ * ‖c (-((m-k : ℕ) : ℤ))‖ ≤
59
+ Real.exp (-B (p+k)) * Real.exp (-A (m-k)) :=
60
+ mul_le_mul (hb.b_pos _) (hb.c_neg _) (norm_nonneg _) (Real.exp_pos _).le
61
+ _ ≤ Real.exp (-B p - A m) * Real.exp (-lam * k) := by
62
+ rw [← Real.exp_add, ← Real.exp_add]
63
+ apply Real.exp_le_exp.mpr
64
+ simpa only [sub_eq_add_neg, neg_mul] using middle_exponent hA hB hm p k hk hbridge
65
+
66
+ lemma middle_neg (hb : EnvelopeBounds A B b c)
67
+ (hA : DiscreteConvex A) (hB : DiscreteConvex B)
68
+ {p : ℕ} (hp : 1 ≤ p) (m k : ℕ) (hk : k ≤ p) {lam : ℝ}
69
+ (hbridge : B p - B (p-1) + lam ≤ A (m+1) - A m) :
70
+ ‖centeredCorrelation b c m p (-(k : ℤ))‖ ≤
71
+ Real.exp (-B p - A m) * Real.exp (-lam * k) := by
72
+ have hh := hb.reflected.middle_pos hB hA hp m k hk hbridge
73
+ simpa only [centeredCorrelation, neg_add, neg_neg, mul_comm, neg_add_rev,
74
+ sub_eq_add_neg, add_comm] using hh
75
+
76
+ lemma tail_pos (hb : EnvelopeBounds A B b c) (m p k : ℕ)
77
+ (hend : B p + A m ≤ B (m+p)) :
78
+ ‖centeredCorrelation b c m p ((m+k+1 : ℕ) : ℤ)‖ ≤
79
+ Real.exp (-B p - A m) * normalizedTailTerm B (m+p) k := by
80
+ have e₁ : (p : ℤ) + ((m+k+1 : ℕ) : ℤ) = ((m+p+k+1 : ℕ) : ℤ) := by omega
81
+ have e₂ : -(m : ℤ) + ((m+k+1 : ℕ) : ℤ) = ((k+1 : ℕ) : ℤ) := by omega
82
+ rw [centeredCorrelation, e₁, e₂, norm_mul]
83
+ calc ‖b ((m+p+k+1 : ℕ) : ℤ)‖ * ‖c ((k+1 : ℕ) : ℤ)‖ ≤
84
+ Real.exp (-B (m+p+k+1)) * Real.exp (B (k+1)) :=
85
+ mul_le_mul (hb.b_pos _) (hb.c_pos _) (norm_nonneg _) (Real.exp_pos _).le
86
+ _ ≤ _ := by
87
+ rw [normalizedTailTerm, ← Real.exp_add, ← Real.exp_add]
88
+ exact Real.exp_le_exp.mpr (by linarith)
89
+
90
+ lemma tail_neg (hb : EnvelopeBounds A B b c) (m p k : ℕ)
91
+ (hend : B p + A m ≤ A (m+p)) :
92
+ ‖centeredCorrelation b c m p (-((p+k+1 : ℕ) : ℤ))‖ ≤
93
+ Real.exp (-B p - A m) * normalizedTailTerm A (m+p) k := by
94
+ have hh := hb.reflected.tail_pos p m k (by simpa [add_comm] using hend)
95
+ simpa only [centeredCorrelation, neg_add, neg_neg, mul_comm, neg_add_rev,
96
+ sub_eq_add_neg, add_comm, Nat.add_comm] using hh
97
+
98
+ end EnvelopeBounds
99
+
100
+
101
+
102
+ lemma tsum_bound_middle_tail {g t u : ℕ → ℝ} {M : ℝ} (hM : 0 ≤ M) (m : ℕ)
103
+ (hg : ∀ k, 0 ≤ g k) (ht : ∀ k, 0 ≤ t k)
104
+ (hst : Summable t) (hsu : Summable u)
105
+ (hmiddle : ∀ k, k < m → g k ≤ M * t k)
106
+ (htail : ∀ k, g (k+m) ≤ M * u k) :
107
+ Summable g ∧ (∑' k, g k) ≤ M * (∑' k, t k) + M * (∑' k, u k) := by
108
+ have htailSum : Summable (fun k => g (k+m)) := by
109
+ apply (hsu.mul_left M).of_norm_bounded
110
+ intro k
111
+ rw [Real.norm_eq_abs, abs_of_nonneg (hg _)]
112
+ exact htail k
113
+ have hsum : Summable g := (summable_nat_add_iff m).mp htailSum
114
+ refine ⟨hsum, ?_⟩
115
+ rw [← hsum.sum_add_tsum_nat_add m]
116
+ apply add_le_add
117
+ · calc ∑ k ∈ Finset.range m, g k ≤ ∑ k ∈ Finset.range m, M * t k :=
118
+ Finset.sum_le_sum (fun k hk => hmiddle k (Finset.mem_range.mp hk))
119
+ _ ≤ ∑' k, M * t k := (hst.mul_left M).sum_le_tsum _ (fun k _ => mul_nonneg hM (ht k))
120
+ _ = M * ∑' k, t k := tsum_mul_left
121
+ · calc ∑' k, g (k+m) ≤ ∑' k, M * u k := htailSum.tsum_le_tsum htail (hsu.mul_left M)
122
+ _ = M * ∑' k, u k := tsum_mul_left
123
+
124
+ lemma central_norm_le_of_correlation_zero (f : ℤ → ℂ)
125
+ (hp : Summable (fun n : ℕ => ‖f (n+1)‖))
126
+ (hn : Summable (fun n : ℕ => ‖f (-(n+1))‖))
127
+ (hz : (∑' n : ℤ, f n) = 0) :
128
+ ‖f 0‖ ≤ (∑' n : ℕ, ‖f (n+1)‖) + ∑' n : ℕ, ‖f (-(n+1))‖ := by
129
+ rw [tsum_of_add_one_of_neg_add_one hp.of_norm hn.of_norm] at hz
130
+ have he : f 0 = -((∑' n : ℕ, f (n+1)) + ∑' n : ℕ, f (-(n+1))) := by
131
+ linear_combination hz
132
+ rw [he, norm_neg]
133
+ exact (norm_add_le _ _).trans (add_le_add (norm_tsum_le_tsum_norm hp) (norm_tsum_le_tsum_norm hn))
134
+
135
+
136
+ def geometricMiddle (lam : ℝ) (k : ℕ) : ℝ := Real.exp (-lam * ((k : ℝ)+1))
137
+
138
+ lemma geometricMiddle_hasSum {lam : ℝ} (hlam : 0 < lam) :
139
+ HasSum (geometricMiddle lam) (Real.exp (-lam) / (1-Real.exp (-lam))) := by
140
+ have hr : Real.exp (-lam) < 1 := by simpa using hlam
141
+ have hh := (hasSum_geometric_of_lt_one (Real.exp_pos (-lam)).le hr).mul_left (Real.exp (-lam))
142
+ have heq : geometricMiddle lam = (fun k : ℕ => Real.exp (-lam) * Real.exp (-lam)^k) := by
143
+ funext k
144
+ rw [geometricMiddle, ← Real.exp_nat_mul, ← Real.exp_add]
145
+ congr 1
146
+ ring
147
+ rw [heq, div_eq_mul_inv]
148
+ exact hh
149
+
150
+ lemma geometricMiddle_budget {lam : ℝ} (hlam : Real.log 3 < lam) :
151
+ 2 * (∑' k, geometricMiddle lam k) < 1 := by
152
+ have hl0 : 0 < lam := (Real.log_pos (by norm_num : (1 : ℝ) < 3)).trans hlam
153
+ rw [(geometricMiddle_hasSum hl0).tsum_eq]
154
+ have he : (3 : ℝ) < Real.exp lam := by
155
+ have h := Real.exp_lt_exp.mpr hlam
156
+ rw [Real.exp_log (by norm_num : (0 : ℝ) < 3)] at h
157
+ exact h
158
+ have hrpos : 0 < Real.exp (-lam) := Real.exp_pos _
159
+ have hrlt : Real.exp (-lam) < 1 := by simpa using hl0
160
+ have hprod : Real.exp lam * Real.exp (-lam) = 1 := by
161
+ rw [← Real.exp_add]; simp
162
+ have hsmall := mul_lt_mul_of_pos_right he hrpos
163
+ rw [hprod] at hsmall
164
+ have hden : 0 < 1 - Real.exp (-lam) := sub_pos.mpr hrlt
165
+ calc 2 * (Real.exp (-lam) / (1-Real.exp (-lam))) =
166
+ (2 * Real.exp (-lam)) / (1-Real.exp (-lam)) := by ring
167
+ _ < 1 := (div_lt_one hden).mpr (by linarith)
168
+
169
+ namespace EnvelopeBounds
170
+
171
+ variable {A B : ℕ → ℝ} {b c : ℤ → ℂ}
172
+
173
+
174
+
175
+ lemma correlation_budget (hb : EnvelopeBounds A B b c)
176
+ (hA : DiscreteConvex A) (hB : DiscreteConvex B)
177
+ (hA0 : A 0 = 0) (hB0 : B 0 = 0)
178
+ (hsA : Summable (fun n => Real.exp (-(A (n+1) - A n))))
179
+ (hsB : Summable (fun n => Real.exp (-(B (n+1) - B n))))
180
+ {m p : ℕ} (hm : 1 ≤ m) (hp : 1 ≤ p) {lam : ℝ} (hlam : 0 < lam)
181
+ (hbridge₁ : A m - A (m-1) + lam ≤ B (p+1) - B p)
182
+ (hbridge₂ : B p - B (p-1) + lam ≤ A (m+1) - A m)
183
+ (hcB : ‖b (p : ℤ)‖ = Real.exp (-B p))
184
+ (hcA : ‖c (-(m : ℤ))‖ = Real.exp (-A m))
185
+ (hz : (∑' n : ℤ, centeredCorrelation b c m p n) = 0) :
186
+ 1 ≤ 2 * (∑' k, geometricMiddle lam k) +
187
+ (∑' k, normalizedTailTerm A (m+p) k) +
188
+ (∑' k, normalizedTailTerm B (m+p) k) := by
189
+ let M := Real.exp (-B p - A m)
190
+ have hM : 0 < M := Real.exp_pos _
191
+ have hq : 1 ≤ m+p := by omega
192
+ have hendB : B p + A m ≤ B (m+p) := by
193
+ have hh := middle_exponent hA hB hm p m le_rfl hbridge₁
194
+ simp only [Nat.sub_self, hA0, sub_zero] at hh
195
+ rw [Nat.add_comm p m] at hh
196
+ have hmul := mul_nonneg hlam.le (Nat.cast_nonneg m : (0 : ℝ) ≤ m)
197
+ linarith
198
+ have hendA : B p + A m ≤ A (m+p) := by
199
+ have hh := middle_exponent hB hA hp m p le_rfl hbridge₂
200
+ simp only [Nat.sub_self, hB0, sub_zero] at hh
201
+ have hmul := mul_nonneg hlam.le (Nat.cast_nonneg p : (0 : ℝ) ≤ p)
202
+ linarith
203
+ have hpos := tsum_bound_middle_tail hM.le m
204
+ (g := fun k : ℕ => ‖centeredCorrelation b c m p ((k : ℤ)+1)‖)
205
+ (t := geometricMiddle lam) (u := normalizedTailTerm B (m+p))
206
+ (fun _ => norm_nonneg _) (fun _ => (Real.exp_pos _).le)
207
+ (geometricMiddle_hasSum hlam).summable (hB.tail_summable hsB hq) ?_ ?_
208
+ · have hneg := tsum_bound_middle_tail hM.le p
209
+ (g := fun k : ℕ => ‖centeredCorrelation b c m p (-((k : ℤ)+1))‖)
210
+ (t := geometricMiddle lam) (u := normalizedTailTerm A (m+p))
211
+ (fun _ => norm_nonneg _) (fun _ => (Real.exp_pos _).le)
212
+ (geometricMiddle_hasSum hlam).summable (hA.tail_summable hsA hq) ?_ ?_
213
+ · have hh := central_norm_le_of_correlation_zero _ hpos.1 hneg.1 hz
214
+ rw [hb.central_norm hcB hcA] at hh
215
+ change M ≤ _ at hh
216
+ have hmul : M * 1 ≤ M * (2 * (∑' k, geometricMiddle lam k) +
217
+ (∑' k, normalizedTailTerm A (m+p) k) +
218
+ (∑' k, normalizedTailTerm B (m+p) k)) := by
219
+ nlinarith [hpos.2, hneg.2]
220
+ exact (mul_le_mul_iff_right₀ hM).mp hmul
221
+ · intro k hk
222
+ simpa [geometricMiddle, M] using
223
+ hb.middle_neg hA hB hp m (k+1) (by omega) hbridge₂
224
+ · intro k
225
+ simpa only [Nat.cast_add, Nat.cast_one, add_assoc, add_comm, add_left_comm, M]
226
+ using hb.tail_neg m p k hendA
227
+ · intro k hk
228
+ simpa [geometricMiddle, M] using
229
+ hb.middle_pos hA hB hm p (k+1) (by omega) hbridge₁
230
+ · intro k
231
+ simpa only [Nat.cast_add, Nat.cast_one, add_assoc, add_comm, add_left_comm, M]
232
+ using hb.tail_pos m p k hendB
233
+
234
+ end EnvelopeBounds
235
+
236
+
237
+
238
+ theorem no_correlation_of_envelopes {A B : ℕ → ℝ} {b c : ℤ → ℂ}
239
+ (hb : EnvelopeBounds A B b c)
240
+ (hA : DiscreteConvex A) (hB : DiscreteConvex B)
241
+ (hA0 : A 0 = 0) (hB0 : B 0 = 0)
242
+ {lam δ : ℝ} (hlam : Real.log 3 < lam) (hδ : lam < δ)
243
+ (hqa : ∀ᶠ n : ℕ in atTop, δ * (n : ℝ)^2 ≤ A n)
244
+ (hqb : ∀ᶠ n : ℕ in atTop, δ * (n : ℝ)^2 ≤ B n)
245
+ (hcA : ∀ n, 0 < A (n+2) - 2*A (n+1) + A n →
246
+ ‖c (-((n+1 : ℕ) : ℤ))‖ = Real.exp (-A (n+1)))
247
+ (hcB : ∀ n, 0 < B (n+2) - 2*B (n+1) + B n →
248
+ ‖b ((n+1 : ℕ) : ℤ)‖ = Real.exp (-B (n+1)))
249
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) : False := by
250
+ have hl0 : 0 < lam := (Real.log_pos (by norm_num : (1 : ℝ) < 3)).trans hlam
251
+ have hδ0 : 0 < δ := hl0.trans hδ
252
+ have hsA := hA.summable_exp_neg_slope hA0 hδ0 hqa
253
+ have hsB := hB.summable_exp_neg_slope hB0 hδ0 hqb
254
+ have htA := hA.slopes_tendsto hA0 hδ0 hqa
255
+ have htB := hB.slopes_tendsto hB0 hδ0 hqb
256
+ have ht : Tendsto (fun q => 2 * (∑' k, geometricMiddle lam k) +
257
+ (∑' k, normalizedTailTerm A q k) + (∑' k, normalizedTailTerm B q k))
258
+ atTop (𝓝 (2 * ∑' k, geometricMiddle lam k)) := by
259
+ simpa using (tendsto_const_nhds.add (hA.tail_tsum_tendsto hsA htA)).add
260
+ (hB.tail_tsum_tendsto hsB htB)
261
+ obtain ⟨N, hN⟩ := eventually_atTop.1 (ht (eventually_lt_nhds (geometricMiddle_budget hlam)))
262
+ obtain ⟨K, hK⟩ := eventually_atTop.1 (htA (eventually_ge_atTop (B 1 - B 0 - lam)))
263
+ obtain ⟨n, hn, hcurv⟩ := large_curvature hδ0 hδ hqa (max N K)
264
+ let m := n+1
265
+ have hm : 1 ≤ m := by dsimp [m]; omega
266
+ have hthreshold : B 1 - B 0 ≤ A m - A (m-1) + lam := by
267
+ have hh := hK n (le_trans (le_max_right _ _) hn)
268
+ change B 1 - B 0 - lam ≤ A (n+1) - A n at hh
269
+ dsimp [m]
270
+ simpa only [Nat.add_sub_cancel] using (show B 1 - B 0 ≤ A (n+1) - A n + lam by linarith)
271
+ let C := A m - A (m-1) + lam
272
+ have hex : ∃ p : ℕ, C < B (p+1) - B p := by
273
+ have he : ∀ᶠ p : ℕ in atTop, C < B (p+1) - B p := htB (eventually_gt_atTop C)
274
+ exact he.exists
275
+ let p := Nat.find hex
276
+ have hright : C < B (p+1) - B p := Nat.find_spec hex
277
+ have hp : 1 ≤ p := by
278
+ by_contra! hh
279
+ have hp0 : p = 0 := by omega
280
+ rw [hp0] at hright
281
+ simp only [zero_add] at hright
282
+ exact (not_lt_of_ge hthreshold) hright
283
+ have hleft : B p - B (p-1) ≤ C := by
284
+ have hh := Nat.find_min hex (show p-1 < p by omega)
285
+ simpa only [Nat.sub_add_cancel hp, not_lt] using hh
286
+ have hcontact : 0 < B ((p-1)+2) - 2*B ((p-1)+1) + B (p-1) := by
287
+ have e₁ : p-1+1 = p := by omega
288
+ have e₂ : p-1+2 = p+1 := by omega
289
+ rw [e₁, e₂]
290
+ linarith
291
+ have hcB' : ‖b (p : ℤ)‖ = Real.exp (-B p) := by
292
+ simpa only [Nat.sub_add_cancel hp] using hcB (p-1) hcontact
293
+ have hcA' : ‖c (-(m : ℤ))‖ = Real.exp (-A m) := hcA n (by linarith)
294
+ have hbridge₂ : B p - B (p-1) + lam ≤ A (m+1) - A m := by
295
+ dsimp [C, m] at hleft ⊢
296
+ have e : n+1+1 = n+2 := by omega
297
+ rw [e]
298
+ linarith
299
+ have hzcenter : (∑' i : ℤ, centeredCorrelation b c m p i) = 0 := by
300
+ calc (∑' i : ℤ, centeredCorrelation b c m p i) =
301
+ ∑' i : ℤ, b ((p : ℤ)+i) * c (((p : ℤ)+i) - ((m+p : ℕ) : ℤ)) := by
302
+ apply tsum_congr
303
+ intro i
304
+ unfold centeredCorrelation
305
+ congr 2
306
+ omega
307
+ _ = ∑' j : ℤ, b j * c (j-((m+p : ℕ) : ℤ)) := by
308
+ simpa only [Equiv.coe_addLeft, add_comm] using
309
+ (Equiv.addLeft (p : ℤ)).tsum_eq (fun j : ℤ => b j * c (j-((m+p : ℕ) : ℤ)))
310
+ _ = 0 := hz (m+p) (by omega)
311
+ have hbudget := hb.correlation_budget hA hB hA0 hB0 hsA hsB hm hp hl0 hright.le
312
+ hbridge₂ hcB' hcA' hzcenter
313
+ have hqN : N ≤ m+p := by dsimp [m]; have := le_trans (le_max_left N K) hn; omega
314
+ exact (not_lt_of_ge hbudget) (hN (m+p) hqN)
315
+
316
+
317
+ end
318
+ end BackwardIntertwiners
319
+
320
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/DiagonalSymbols.lean ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.OrdinaryStructure
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+
14
+ open scoped Classical
15
+
16
+ def diagonalSymbols : StarSubalgebra ℂ (Base → ℤ → ℂ) where
17
+ carrier := {a | (∀ j, Measurable (fun x => a x j)) ∧
18
+ ∃ C : ℝ, 0 ≤ C ∧ ∀ x j, ‖a x j‖ ≤ C}
19
+ zero_mem' := ⟨fun _ => measurable_const, 0, le_rfl, by simp⟩
20
+ one_mem' := ⟨fun _ => measurable_const, 1, zero_le_one, by simp⟩
21
+ add_mem' := by
22
+ rintro a b ⟨ha,C,hC,hCa⟩ ⟨hb,D,hD,hDb⟩
23
+ exact ⟨fun j => (ha j).add (hb j), C+D, add_nonneg hC hD,
24
+ fun x j => (norm_add_le _ _).trans (add_le_add (hCa x j) (hDb x j))⟩
25
+ mul_mem' := by
26
+ rintro a b ⟨ha,C,hC,hCa⟩ ⟨hb,D,hD,hDb⟩
27
+ refine ⟨fun j => (ha j).mul (hb j), C*D, mul_nonneg hC hD, fun x j => ?_⟩
28
+ change ‖a x j * b x j‖ ≤ C*D
29
+ rw [norm_mul]
30
+ exact mul_le_mul (hCa x j) (hDb x j) (norm_nonneg _) hC
31
+ algebraMap_mem' c := ⟨fun _ => measurable_const, ‖c‖, norm_nonneg c, fun _ _ => le_rfl⟩
32
+ star_mem' := by
33
+ rintro a ⟨ha,C,hC,hCa⟩
34
+ refine ⟨fun j => continuous_star.measurable.comp (ha j), C,hC, fun x j => ?_⟩
35
+ simpa using hCa x j
36
+ abbrev DiagonalSymbol := ↥diagonalSymbols
37
+ namespace DiagonalSymbol
38
+ instance : CoeFun DiagonalSymbol (fun _ => Base → ℤ → ℂ) := ⟨fun a => a.val⟩
39
+ lemma measurable (a : DiagonalSymbol) (j : ℤ) : Measurable (fun x => a x j) := a.property.1 j
40
+ noncomputable def bound (a : DiagonalSymbol) : ℝ := a.property.2.choose
41
+ lemma bound_nonneg (a : DiagonalSymbol) : 0 ≤ a.bound := a.property.2.choose_spec.1
42
+ lemma norm_le_bound (a : DiagonalSymbol) (x : Base) (j : ℤ) : ‖a x j‖ ≤ a.bound :=
43
+ a.property.2.choose_spec.2 x j
44
+ @[simp] lemma zero_apply (x : Base) (j : ℤ) : (0 : DiagonalSymbol) x j = 0 := rfl
45
+ @[simp] lemma one_apply (x : Base) (j : ℤ) : (1 : DiagonalSymbol) x j = 1 := rfl
46
+ @[simp] lemma add_apply (a b : DiagonalSymbol) (x : Base) (j : ℤ) : (a+b) x j = a x j + b x j := rfl
47
+ @[simp] lemma mul_apply (a b : DiagonalSymbol) (x : Base) (j : ℤ) : (a*b) x j = a x j * b x j := rfl
48
+ @[simp] lemma sub_apply (a b : DiagonalSymbol) (x : Base) (j : ℤ) : (a-b) x j = a x j - b x j := rfl
49
+ @[simp] lemma star_apply (a : DiagonalSymbol) (x : Base) (j : ℤ) : (star a) x j = star (a x j) := rfl
50
+ @[simp] lemma smul_apply (c : ℂ) (a : DiagonalSymbol) (x : Base) (j : ℤ) : (c • a) x j = c * a x j := rfl
51
+ @[simp] lemma algebraMap_apply (c : ℂ) (x : Base) (j : ℤ) :
52
+ algebraMap ℂ DiagonalSymbol c x j = c := rfl
53
+ @[simp] lemma pow_apply (a : DiagonalSymbol) (n : ℕ) (x : Base) (j : ℤ) :
54
+ (a^n) x j = (a x j)^n := by induction n <;> simp_all [pow_succ]
55
+ end DiagonalSymbol
56
+
57
+ def diagonalFiber (a : DiagonalSymbol) (x : Base) : Fiber →L[ℂ] Fiber :=
58
+ fiberMultiplier (a x) a.bound a.bound_nonneg (a.norm_le_bound x)
59
+ @[simp] lemma diagonalFiber_apply (a : DiagonalSymbol) (x : Base) (v : Fiber) (j : ℤ) :
60
+ diagonalFiber a x v j = a x j*v j := rfl
61
+ lemma diagonalFiber_norm (a : DiagonalSymbol) (x : Base) : ‖diagonalFiber a x‖ ≤ a.bound :=
62
+ fiberMultiplier_norm_le _ _ _ _
63
+ lemma diagonalFiber_measurable (a : DiagonalSymbol) (f : Base → Fiber)
64
+ (hf : AEStronglyMeasurable f baseMeasure) :
65
+ AEStronglyMeasurable (fun x => diagonalFiber a x (f x)) baseMeasure :=
66
+ weightedPermutation_aestronglyMeasurable (Equiv.refl ℤ) a a.bound a.bound_nonneg
67
+ a.norm_le_bound a.measurable hf
68
+
69
+ def diagonalOperator (a : DiagonalSymbol) : GlobalHilbert →L[ℂ] GlobalHilbert :=
70
+ fieldOperator (diagonalFiber a) a.bound a.bound_nonneg (diagonalFiber_norm a)
71
+ (diagonalFiber_measurable a)
72
+ lemma diagonalOperator_ae (a : DiagonalSymbol) (f : GlobalHilbert) :
73
+ diagonalOperator a f =ᵐ[baseMeasure] fun x => diagonalFiber a x (f x) :=
74
+ fieldOperator_ae _ _ _ _ _ _
75
+ lemma diagonalOperator_coord (a : DiagonalSymbol) (f : GlobalHilbert) :
76
+ ∀ᵐ x ∂baseMeasure, ∀ j, diagonalOperator a f x j = a x j*f x j := by
77
+ filter_upwards [diagonalOperator_ae a f] with x hx j
78
+ rw [hx]; rfl
79
+ lemma diagonalOperator_norm_le (a : DiagonalSymbol) {C : ℝ} (hC : 0 ≤ C)
80
+ (ha : ∀ x j, ‖a x j‖ ≤ C) : ‖diagonalOperator a‖ ≤ C := by
81
+ apply ContinuousLinearMap.opNorm_le_bound _ hC
82
+ intro f
83
+ calc
84
+ _ ≤ ‖(C:ℂ) • f‖ := by
85
+ apply Lp.norm_le_norm_of_ae_le
86
+ filter_upwards [diagonalOperator_ae a f, Lp.coeFn_smul (C:ℂ) f] with x hx hs
87
+ rw [hx,hs,Pi.smul_apply]
88
+ apply lp.norm_mono (by norm_num : (2:ENNReal) ≠ 0)
89
+ intro j
90
+ simp only [diagonalFiber_apply,lp.coeFn_smul,Pi.smul_apply,norm_smul,norm_mul,
91
+ Complex.norm_real,Real.norm_of_nonneg hC]
92
+ exact mul_le_mul_of_nonneg_right (ha x j) (norm_nonneg _)
93
+ _ = C*‖f‖ := by rw [norm_smul,Complex.norm_real,Real.norm_of_nonneg hC]
94
+ lemma diagonalOperator_zero : diagonalOperator 0 = 0 := by
95
+ ext1 f
96
+ apply Lp.ext
97
+ filter_upwards [diagonalOperator_coord 0 f,Lp.coeFn_zero Fiber 2 baseMeasure] with x hx h0
98
+ ext j
99
+ change diagonalOperator 0 f x j = (0 : GlobalHilbert) x j
100
+ rw [hx,h0]; simp
101
+ lemma diagonalOperator_one : diagonalOperator 1 = 1 := by
102
+ ext1 f
103
+ apply Lp.ext
104
+ filter_upwards [diagonalOperator_coord 1 f] with x hx
105
+ ext j
106
+ simpa using hx j
107
+ lemma diagonalOperator_add (a b : DiagonalSymbol) :
108
+ diagonalOperator (a+b) = diagonalOperator a + diagonalOperator b := by
109
+ ext1 f
110
+ apply Lp.ext
111
+ filter_upwards [diagonalOperator_coord (a+b) f, diagonalOperator_coord a f,
112
+ diagonalOperator_coord b f, Lp.coeFn_add (diagonalOperator a f) (diagonalOperator b f)] with x hab ha hb hs
113
+ ext j
114
+ change diagonalOperator (a+b) f x j = (diagonalOperator a f + diagonalOperator b f) x j
115
+ rw [hs,Pi.add_apply,lp.coeFn_add,Pi.add_apply,hab,ha,hb,DiagonalSymbol.add_apply,add_mul]
116
+ lemma diagonalOperator_mul (a b : DiagonalSymbol) :
117
+ diagonalOperator (a*b) = diagonalOperator a * diagonalOperator b := by
118
+ ext1 f
119
+ apply Lp.ext
120
+ filter_upwards [diagonalOperator_coord (a*b) f, diagonalOperator_coord a (diagonalOperator b f),
121
+ diagonalOperator_coord b f] with x hab ha hb
122
+ ext j
123
+ change diagonalOperator (a*b) f x j = diagonalOperator a (diagonalOperator b f) x j
124
+ rw [hab,ha,hb,DiagonalSymbol.mul_apply,mul_assoc]
125
+ lemma diagonalOperator_smul (c : ℂ) (a : DiagonalSymbol) :
126
+ diagonalOperator (c • a) = c • diagonalOperator a := by
127
+ ext1 f
128
+ apply Lp.ext
129
+ filter_upwards [diagonalOperator_coord (c • a) f, diagonalOperator_coord a f,
130
+ Lp.coeFn_smul c (diagonalOperator a f)] with x hca ha hs
131
+ ext j
132
+ change diagonalOperator (c • a) f x j = (c • diagonalOperator a f) x j
133
+ rw [hs,Pi.smul_apply,lp.coeFn_smul,Pi.smul_apply,hca,ha,DiagonalSymbol.smul_apply,smul_eq_mul,mul_assoc]
134
+ lemma diagonalFiber_inner (a : DiagonalSymbol) (x : Base) (v z : Fiber) :
135
+ inner ℂ (diagonalFiber a x v) z = inner ℂ v (diagonalFiber (star a) x z) := by
136
+ simp only [lp.inner_eq_tsum]
137
+ apply tsum_congr
138
+ intro j
139
+ simp only [diagonalFiber_apply,DiagonalSymbol.star_apply,RCLike.inner_apply,map_mul,starRingEnd_apply]
140
+ ring
141
+ lemma diagonalOperator_star (a : DiagonalSymbol) :
142
+ diagonalOperator (star a) = star (diagonalOperator a) := by
143
+ ext1 f
144
+ apply ext_inner_left ℂ
145
+ intro g
146
+ change inner ℂ g (diagonalOperator (star a) f) = inner ℂ g ((diagonalOperator a).adjoint f)
147
+ rw [ContinuousLinearMap.adjoint_inner_right]
148
+ simp only [L2.inner_def]
149
+ apply integral_congr_ae
150
+ filter_upwards [diagonalOperator_ae (star a) f, diagonalOperator_ae a g] with x hf hg
151
+ rw [hf,hg,diagonalFiber_inner]
152
+
153
+ def diagonalRepresentation : DiagonalSymbol →⋆ₐ[ℂ] (GlobalHilbert →L[ℂ] GlobalHilbert) where
154
+ toFun := diagonalOperator
155
+ map_zero' := diagonalOperator_zero
156
+ map_one' := diagonalOperator_one
157
+ map_add' := diagonalOperator_add
158
+ map_mul' := diagonalOperator_mul
159
+ map_star' := diagonalOperator_star
160
+ commutes' c := by
161
+ have he : algebraMap ℂ DiagonalSymbol c = c • (1 : DiagonalSymbol) := by
162
+ apply Subtype.ext
163
+ funext x j
164
+ simp
165
+ rw [he,diagonalOperator_smul,diagonalOperator_one]
166
+ exact (Algebra.algebraMap_eq_smul_one c).symm
167
+
168
+ def fullMultiplierAlgebra : StarSubalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert) :=
169
+ diagonalRepresentation.range
170
+
171
+
172
+
173
+ end
174
+ end BackwardIntertwiners
175
+
176
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ErgodicTransitivity.lean ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.GlobalOperators
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+
14
+
15
+ lemma ergodic_late_intersection {X : Type*} [MeasurableSpace X] {μ : Measure X}
16
+ [IsFiniteMeasure μ] {θ : X → X} (hθ : Ergodic θ μ)
17
+ {A B : Set X} (_ : MeasurableSet A) (hB : MeasurableSet B)
18
+ (hA0 : μ A ≠ 0) (hB0 : μ B ≠ 0) (N : ℕ) :
19
+ ∃ n : ℕ, N ≤ n ∧ μ (A ∩ (θ^[n]) ⁻¹' B) ≠ 0 := by
20
+ let U : Set X := ⋃ n : ℕ, (θ^[n+N]) ⁻¹' B
21
+ have hUmeas : MeasurableSet U := MeasurableSet.iUnion fun n =>
22
+ hB.preimage (hθ.measurable.iterate (n+N))
23
+ have hsub : θ ⁻¹' U ⊆ U := by
24
+ intro x hx
25
+ obtain ⟨n,hn⟩ := Set.mem_iUnion.mp hx
26
+ apply Set.mem_iUnion.mpr
27
+ refine ⟨n+1, ?_⟩
28
+ change θ^[n+1+N] x ∈ B
29
+ have hi : n+1+N = (n+N)+1 := by omega
30
+ rw [hi,Function.iterate_succ_apply]
31
+ exact hn
32
+ have hU0 : μ U ≠ 0 := by
33
+ intro h
34
+ have hs : (θ^[N]) ⁻¹' B ⊆ U := by
35
+ intro x hx
36
+ exact Set.mem_iUnion.mpr ⟨0, by simpa using hx⟩
37
+ have he := (hθ.toMeasurePreserving.iterate N).measure_preimage hB.nullMeasurableSet
38
+ exact hB0 (le_antisymm (by rw [← he]; exact (measure_mono hs).trans (by rw [h])) bot_le)
39
+ have hUfull : U =ᵐ[μ] Set.univ := by
40
+ obtain he | he := hθ.ae_empty_or_univ_of_preimage_ae_le hUmeas.nullMeasurableSet
41
+ (Filter.Eventually.of_forall hsub)
42
+ · exact False.elim (hU0 (by rw [measure_congr he,measure_empty]))
43
+ · exact he
44
+ by_contra! hn
45
+ have hzero : μ (A ∩ U) = 0 := by
46
+ rw [show A ∩ U = ⋃ n : ℕ, A ∩ (θ^[n+N]) ⁻¹' B from Set.inter_iUnion _ _]
47
+ exact measure_iUnion_null fun n => hn (n+N) (by omega)
48
+ have he : (A ∩ U : Set X) =ᵐ[μ] A := by
49
+ filter_upwards [hUfull] with x hx
50
+ apply propext
51
+ change (x ∈ A ∧ x ∈ U) ↔ x ∈ A
52
+ have hxU : x ∈ U := (eq_iff_iff.mp hx).mpr (Set.mem_univ x)
53
+ simp [hxU]
54
+ exact hA0 ((measure_congr he).symm.trans hzero)
55
+
56
+ section Localization
57
+ variable {X : Type*} [MeasurableSpace X] {μ : Measure X} [finiteMeasure : IsFiniteMeasure μ]
58
+
59
+ omit finiteMeasure in
60
+ lemma measurable_global_coordinate [IsFiniteMeasure μ] (f : Lp Fiber 2 μ) (j : ℤ) : Measurable (fun x => f x j) :=
61
+ ((lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j).continuous.comp_stronglyMeasurable (Lp.stronglyMeasurable f)).measurable
62
+
63
+ omit finiteMeasure in
64
+ lemma exists_coordinate_support_nonnull [IsFiniteMeasure μ] {f : Lp Fiber 2 μ} (hf : f ≠ 0) :
65
+ ∃ j : ℤ, μ {x | f x j ≠ 0} ≠ 0 := by
66
+ by_contra! h
67
+ apply hf
68
+ rw [Lp.eq_zero_iff_ae_eq_zero]
69
+ have ha : ∀ j : ℤ, ∀ᵐ x ∂μ, f x j = 0 := fun j => by
70
+ exact ae_iff.mpr (h j)
71
+ filter_upwards [ae_all_iff.mpr ha] with x hx
72
+ ext j
73
+ exact hx j
74
+
75
+
76
+
77
+
78
+ lemma scalar_invariant_pointwise_orthogonal {L : Submodule ℂ (Lp Fiber 2 μ)}
79
+ (hL : ∀ g : Lp ℂ ∞ μ, ∀ f ∈ L, scalarMultiplier g f ∈ L)
80
+ {f z : Lp Fiber 2 μ} (hf : f ∈ L) (hz : z ∈ L.orthogonal) :
81
+ ∀ᵐ x ∂μ, inner ℂ (z x) (f x) = 0 := by
82
+ apply (L2.integrable_inner z f).ae_eq_zero_of_forall_setIntegral_eq_zero
83
+ intro s hs _
84
+ let g : Lp ℂ ∞ μ := indicatorConstLp ∞ hs (measure_ne_top μ s) (1:ℂ)
85
+ have hg : g =ᵐ[μ] s.indicator (fun _ => (1:ℂ)) := indicatorConstLp_coeFn
86
+ rw [← integral_indicator hs]
87
+ calc
88
+ _ = ∫ x, inner ℂ (z x) (scalarMultiplier g f x) ∂μ := by
89
+ apply integral_congr_ae
90
+ filter_upwards [scalarMultiplier_ae g f, hg] with x hx hgx
91
+ rw [hx,hgx]
92
+ by_cases hxs : x ∈ s
93
+ · simp [Set.indicator_of_mem hxs]
94
+ · simp [Set.indicator_of_notMem hxs]
95
+ _ = inner ℂ z (scalarMultiplier g f) := (L2.inner_def _ _).symm
96
+ _ = 0 := Submodule.inner_left_of_mem_orthogonal (hL g f hf) hz
97
+ end Localization
98
+
99
+ lemma fiber_cyclic_orthogonal_order {w : ℤ → ℝ} (hw : QuadraticWeights w)
100
+ {T : Fiber →L[ℂ] Fiber}
101
+ (hT : ∀ v j, T v j = (w j / w (j-1) : ℂ) * v (j-1))
102
+ {v z : Fiber} (horth : ∀ r : ℕ, inner ℂ z ((T^r) v) = 0)
103
+ {i j : ℤ} (hzi : z i ≠ 0) (hvj : v j ≠ 0) : i < j := by
104
+ let b := fun k : ℤ => star (z k) * (w k:ℂ)
105
+ let c := fun k : ℤ => v k / (w k:ℂ)
106
+ have hwC (k : ℤ) : (w k:ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (hw.positive k))
107
+ have hbi : b i ≠ 0 := mul_ne_zero (by simpa using hzi) (hwC i)
108
+ have hcj : c j ≠ 0 := div_ne_zero hvj (hwC j)
109
+ have hb (k : ℤ) : ‖b k‖ ≤ (‖z‖+1)*w k := by
110
+ dsimp [b]
111
+ rw [norm_mul, RCLike.norm_conj, Complex.norm_real, Real.norm_of_nonneg (hw.positive k).le]
112
+ apply mul_le_mul_of_nonneg_right _ (hw.positive k).le
113
+ exact (lp.norm_apply_le_norm (by norm_num : (2 : ENNReal) ≠ 0) z k).trans (by linarith)
114
+ have hc (k : ℤ) : ‖c k‖*w k ≤ ‖v‖+1 := by
115
+ dsimp [c]
116
+ rw [norm_div, Complex.norm_real, Real.norm_of_nonneg (hw.positive k).le,
117
+ div_mul_cancel₀ _ (ne_of_gt (hw.positive k))]
118
+ exact (lp.norm_apply_le_norm (by norm_num : (2 : ENNReal) ≠ 0) v k).trans (by linarith)
119
+ have hcor (r : ℕ) : (∑' k : ℤ, b k*c (k-r)) = 0 := by
120
+ calc (∑' k : ℤ, b k*c (k-r)) = inner ℂ z ((T^r) v) := by
121
+ rw [lp.inner_eq_tsum]
122
+ apply tsum_congr
123
+ intro k
124
+ rw [RCLike.inner_apply, weighted_shift_pow hw.positive hT]
125
+ dsimp [b, c]
126
+ simp only [← Complex.star_def]
127
+ ring
128
+ _ = 0 := horth r
129
+ exact (quadratic_support_separation w hw).strict_order ⟨i,hbi⟩ ⟨j,hcj⟩
130
+ (by positivity : 0 < ‖z‖+1) (by positivity : 0 < ‖v‖+1) hb hc hcor hbi hcj
131
+
132
+
133
+ lemma explicitWeight_quadratic (x : Base) : QuadraticWeights (explicitWeight x) :=
134
+ bilateralWeight_quadratic (plusResidue_bounds x) (minusResidue_bounds x)
135
+
136
+ lemma forwardFiber_weight_coordinates (x : Base) (v : Fiber) (j : ℤ) :
137
+ forwardFiber x v j = (explicitWeight x j / explicitWeight x (j-1) : ℂ) * v (j-1) := by
138
+ rw [forwardFiber_apply, ← explicitWeight_ratio x (j-1)]
139
+ simp only [sub_add_cancel, Complex.ofReal_div]
140
+
141
+ lemma forwardFiber_lattice (x : Base) (L : Submodule ℂ Fiber) :
142
+ (IsClosed (L : Set Fiber) ∧ OperatorInvariant L (forwardFiber x)) ↔
143
+ L = ⊥ ∨ L = ⊤ ∨ ∃ h : ℤ, L = coordinateTail h := by
144
+ constructor
145
+ · rintro ⟨hcl, hinv⟩
146
+ exact quadratic_fiber_tails _ (explicitWeight_quadratic x) _ (forwardFiber_weight_coordinates x) L hcl hinv
147
+ · rintro (rfl | rfl | ⟨h,rfl⟩)
148
+ · refine ⟨?_, ?_⟩
149
+ · simpa only [Submodule.bot_coe] using (isClosed_singleton : IsClosed ({0} : Set Fiber))
150
+ · intro v hv
151
+ simpa only [Submodule.mem_bot, map_zero] using congrArg (forwardFiber x) (show v = 0 from hv)
152
+ · exact ⟨isClosed_univ, fun _ _ => trivial⟩
153
+ · exact ⟨coordinateTail_isClosed h, fun _ hv => forwardFiber_tail x h hv⟩
154
+
155
+ lemma inverseOdometer_ergodic : Ergodic inverseOdometer baseMeasure :=
156
+ Ergodic.symm (e := odometerMeasurableEquiv) odometer_ergodic
157
+
158
+ lemma backwardOperator_power_nonzero (n : ℕ) (f : GlobalHilbert) (j : ℤ) :
159
+ ∀ᵐ x ∂baseMeasure, f (inverseOdometer^[n] x) j ≠ 0 →
160
+ ((backwardOperator^n) f) x (j-n) ≠ 0 := by
161
+ induction n with
162
+ | zero => filter_upwards [] with x; simp
163
+ | succ n ih =>
164
+ rw [pow_succ', mul_apply_eq_comp]
165
+ filter_upwards [backwardOperator_ae_inverse ((backwardOperator^n) f),
166
+ inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae.eventually ih,
167
+ inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae.eventually backwardCoeff_ae_pos]
168
+ with x hx hi hp
169
+ intro hn
170
+ rw [hx, backwardFiber_apply]
171
+ have he : j - (n+1:ℕ) + 1 = j - n := by omega
172
+ rw [he]
173
+ apply mul_ne_zero
174
+ · exact_mod_cast (ne_of_gt (hp (j-n)))
175
+ · apply hi
176
+ simpa only [Function.iterate_succ_apply] using hn
177
+
178
+ lemma global_invariant_pow {T : GlobalHilbert →L[ℂ] GlobalHilbert}
179
+ {L : Submodule ℂ GlobalHilbert} (hi : OperatorInvariant L T)
180
+ {v : GlobalHilbert} (hv : v ∈ L) (n : ℕ) : (T^n) v ∈ L := by
181
+ induction n with
182
+ | zero => simpa using hv
183
+ | succ n ih => simpa only [pow_succ', mul_apply_eq_comp] using hi _ ih
184
+
185
+ lemma invariant_pointwise_order {L : Submodule ℂ GlobalHilbert}
186
+ (hS : OperatorInvariant L forwardOperator)
187
+ (hM : ∀ g : Lp ℂ ∞ baseMeasure, OperatorInvariant L (scalarMultiplier g))
188
+ {f z : GlobalHilbert} (hf : f ∈ L) (hz : z ∈ L.orthogonal) :
189
+ ∀ᵐ x ∂baseMeasure, ∀ i j : ℤ, z x i ≠ 0 → f x j ≠ 0 → i < j := by
190
+ have horth (r : ℕ) : ∀ᵐ x ∂baseMeasure, inner ℂ (z x) (((forwardOperator^r) f) x) = 0 :=
191
+ scalar_invariant_pointwise_orthogonal hM (global_invariant_pow hS hf r) hz
192
+ filter_upwards [ae_all_iff.mpr horth,
193
+ ae_all_iff.mpr (fun r => forwardOperator_power_ae r f)] with x hx hxpow
194
+ intro i j hzi hfj
195
+ apply fiber_cyclic_orthogonal_order (explicitWeight_quadratic x) (forwardFiber_weight_coordinates x) ?_ hzi hfj
196
+ intro r
197
+ rw [← hxpow r]
198
+ exact hx r
199
+
200
+
201
+
202
+
203
+ lemma forward_backward_scalar_transitive (L : Submodule ℂ GlobalHilbert)
204
+ (hclosed : IsClosed (L : Set GlobalHilbert))
205
+ (hS : OperatorInvariant L forwardOperator)
206
+ (hV : OperatorInvariant L backwardOperator)
207
+ (hM : ∀ g : Lp ℂ ∞ baseMeasure, OperatorInvariant L (scalarMultiplier g)) :
208
+ L = ⊥ ∨ L = ⊤ := by
209
+ by_contra! hproper
210
+ have hOO : L.orthogonal.orthogonal = L := by
211
+ rw [Submodule.orthogonal_orthogonal_eq_closure, hclosed.submodule_topologicalClosure_eq]
212
+ have hnotOrth : L.orthogonal ≠ ⊥ := by
213
+ intro hh
214
+ rw [hh, Submodule.bot_orthogonal_eq_top] at hOO
215
+ exact hproper.2 hOO.symm
216
+ obtain ⟨f,hf,hf0⟩ := (Submodule.ne_bot_iff L).mp hproper.1
217
+ obtain ⟨z,hz,hz0⟩ := (Submodule.ne_bot_iff L.orthogonal).mp hnotOrth
218
+ obtain ⟨j,hA0⟩ := exists_coordinate_support_nonnull hf0
219
+ obtain ⟨i,hB0⟩ := exists_coordinate_support_nonnull hz0
220
+ let A : Set Base := {x | f x j ≠ 0}
221
+ let B : Set Base := {x | z x i ≠ 0}
222
+ have hA : MeasurableSet A := (measurableSet_eq_fun (measurable_global_coordinate f j) measurable_const).compl
223
+ have hB : MeasurableSet B := (measurableSet_eq_fun (measurable_global_coordinate z i) measurable_const).compl
224
+ obtain ⟨n,hn,hinter⟩ := ergodic_late_intersection inverseOdometer_ergodic hB hA hB0 hA0 (j-i).toNat
225
+ have horder := invariant_pointwise_order hS hM (global_invariant_pow hV hf n) hz
226
+ have hnull : ∀ᵐ x ∂baseMeasure, x ∉ B ∩ (inverseOdometer^[n]) ⁻¹' A := by
227
+ filter_upwards [horder, backwardOperator_power_nonzero n f j] with x hx hp
228
+ intro hmem
229
+ have hzi : z x i ≠ 0 := hmem.1
230
+ have hfj : f (inverseOdometer^[n] x) j ≠ 0 := hmem.2
231
+ have hh := hx i (j-n) hzi (hp hfj)
232
+ have hnat : (j-i) ≤ ((j-i).toNat : ℤ) := by omega
233
+ have hnn : ((j-i).toNat : ℤ) ≤ (n:ℤ) := by exact_mod_cast hn
234
+ omega
235
+ apply hinter
236
+ convert ae_iff.mp hnull using 1
237
+ congr 1
238
+ ext x
239
+ simp only [Set.mem_ofPred_eq, not_not]
240
+
241
+ lemma generated_transitive : AlgebraTransitive (generatedAlgebra forwardOperator backwardOperator) := by
242
+ intro L hclosed hInv
243
+ apply forward_backward_scalar_transitive L hclosed
244
+ · exact hInv _ (Algebra.subset_adjoin (Or.inl (Set.mem_insert _ _)))
245
+ · exact hInv _ (Algebra.subset_adjoin (Or.inl (Set.mem_insert_of_mem _ (Set.mem_singleton _))))
246
+ · intro g
247
+ exact hInv _ (Algebra.subset_adjoin (Or.inr ⟨g,rfl⟩))
248
+
249
+
250
+ def explicitDirectModel : DirectModelData :=
251
+ ⟨forwardFiber, forwardOperator, backwardCoeff, backwardFiber, backwardOperator⟩
252
+
253
+ lemma explicitDirectModel_properties : DirectModelProperties explicitDirectModel where
254
+ beta_measurable := measurable_explicitBeta
255
+ beta_positive := explicitBeta_pos
256
+ forward_coordinates := forwardFiber_apply
257
+ forward_field := forwardOperator_ae
258
+ fiber_lattice := forwardFiber_lattice
259
+ S_nonzero := forwardOperator_ne_zero
260
+ S_norm := forwardOperator_norm
261
+ power_bound := fun n _ => forwardOperator_power_norm n
262
+ V_contraction := backwardOperator_norm
263
+ commute := forward_backward_commute
264
+ backward_measurable := measurable_backwardCoeff
265
+ backward_bounds := backwardCoeff_bounds
266
+ backward_coordinates := backwardFiber_apply
267
+ backward_field := backwardOperator_ae
268
+ common_conull := by
269
+ refine ⟨goodBase, measurableSet_goodBase, ?_, ?_, ?_⟩
270
+ · exact ae_iff.mp ae_goodBase
271
+ · ext x
272
+ exact goodBase_odometer x
273
+ · intro x hx
274
+ exact ⟨backwardCoeff_pos hx, backwardFiber_tail_closure hx, backwardFiber_denseRange hx⟩
275
+ transitive := generated_transitive
276
+
277
+ theorem direct_model : ∃ D : DirectModelData, DirectModelProperties D :=
278
+ ⟨explicitDirectModel, explicitDirectModel_properties⟩
279
+
280
+ def rankOneCoordinate (i j : ℤ) : Fiber →L[ℂ] Fiber :=
281
+ (lp.singleContinuousLinearMap ℂ (fun _ : ℤ => ℂ) 2 i).comp (lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j)
282
+ @[simp] lemma rankOneCoordinate_apply (i j : ℤ) (v : Fiber) :
283
+ rankOneCoordinate i j v = lp.single 2 i (v j) := rfl
284
+ lemma rankOneCoordinate_compact (i j : ℤ) : IsCompactOperator (rankOneCoordinate i j) :=
285
+ (isCompactOperator_of_locallyCompactSpace_dom (lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j)).clm_comp
286
+ (lp.singleContinuousLinearMap ℂ (fun _ : ℤ => ℂ) 2 i)
287
+
288
+ def finiteShift (x : Base) (n : ℕ) : Fiber →L[ℂ] Fiber :=
289
+ ∑ j ∈ Finset.Icc (-(n:ℤ)) n, (explicitBeta x j:ℂ) • rankOneCoordinate (j+1) j
290
+ lemma finiteShift_compact (x : Base) (n : ℕ) : IsCompactOperator (finiteShift x n) := by
291
+ change finiteShift x n ∈ compactOperator (RingHom.id ℂ) Fiber Fiber
292
+ exact Submodule.sum_mem _ fun j hj => Submodule.smul_mem _ _ (rankOneCoordinate_compact (j+1) j)
293
+ lemma finiteShift_apply (x : Base) (n : ℕ) (v : Fiber) (j : ℤ) :
294
+ finiteShift x n v (j+1) = if j ∈ Finset.Icc (-(n:ℤ)) n then (explicitBeta x j:ℂ) * v j else 0 := by
295
+ classical
296
+ simp only [finiteShift, sum_apply, smul_apply,
297
+ lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply, rankOneCoordinate_apply]
298
+ by_cases hj : j ∈ Finset.Icc (-(n:ℤ)) n
299
+ · rw [ite_eq_left hj, Finset.sum_eq_single_of_mem j hj]
300
+ · simp only [lp.single_apply_self, smul_eq_mul]
301
+ · intro k hk hkj
302
+ rw [lp.single_apply_ne _ _ _ (by omega), smul_zero]
303
+ · rw [ite_eq_right hj]
304
+ apply Finset.sum_eq_zero
305
+ intro k hk
306
+ have hkj : j+1 ≠ k+1 := by
307
+ intro hh
308
+ have he : j=k := by omega
309
+ subst k
310
+ exact hj hk
311
+ rw [lp.single_apply_ne _ _ _ hkj, smul_zero]
312
+ lemma explicitBeta_outside_bound (x : Base) (n : ℕ) (j : ℤ)
313
+ (hj : j ∉ Finset.Icc (-(n:ℤ)) n) : explicitBeta x j ≤ Real.exp (-10*(n:ℝ)) := by
314
+ apply Real.exp_le_exp.mpr
315
+ change -explicitExponent x j ≤ -10*(n:ℝ)
316
+ have hd := explicitExponent_distance x j
317
+ have hh : (n:ℤ) ≤ coordinateDistance j := by
318
+ simp only [Finset.mem_Icc, not_and_or, not_le] at hj
319
+ rcases hj with hj | hj
320
+ · exact (by omega : (n:ℤ) ≤ -j).trans (le_max_right _ _)
321
+ · exact (by omega : (n:ℤ) ≤ j+1).trans (le_max_left _ _)
322
+ have hR : (n:ℝ) ≤ (coordinateDistance j : ℝ) := by exact_mod_cast hh
323
+ linarith
324
+ lemma finiteShift_error (x : Base) (n : ℕ) :
325
+ ‖forwardFiber x - finiteShift x n‖ ≤ Real.exp (-10*(n:ℝ)) := by
326
+ let C := Real.exp (-10*(n:ℝ))
327
+ have hC : 0 ≤ C := (Real.exp_pos _).le
328
+ apply ContinuousLinearMap.opNorm_le_bound _ hC
329
+ intro v
330
+ calc
331
+ _ ≤ ‖(C:ℂ) • v‖ := by
332
+ let vr := fiberReindex (Equiv.addRight (1:ℤ)) ((forwardFiber x - finiteShift x n) v)
333
+ rw [← (fiberReindex (Equiv.addRight (1:ℤ))).norm_map ((forwardFiber x - finiteShift x n) v)]
334
+ apply lp.norm_mono (by norm_num : (2:ENNReal) ≠ 0)
335
+ intro j
336
+ change ‖(forwardFiber x - finiteShift x n) v (j+1)‖ ≤ ‖(C:ℂ) * v j‖
337
+ rw [sub_apply, lp.coeFn_sub, Pi.sub_apply, forwardFiber_apply, add_sub_cancel_right, finiteShift_apply]
338
+ by_cases hj : j ∈ Finset.Icc (-(n:ℤ)) n
339
+ · rw [ite_eq_left hj, sub_self, norm_zero]
340
+ exact norm_nonneg _
341
+ · rw [ite_eq_right hj, sub_zero, norm_mul, norm_mul, Complex.norm_real, Complex.norm_real,
342
+ Real.norm_of_nonneg (explicitBeta_pos x j).le, Real.norm_of_nonneg hC]
343
+ exact mul_le_mul_of_nonneg_right (explicitBeta_outside_bound x n j hj) (norm_nonneg _)
344
+ _ = C*‖v‖ := by rw [norm_smul, Complex.norm_real, Real.norm_of_nonneg hC]
345
+ lemma forwardFiber_compact (x : Base) : IsCompactOperator (forwardFiber x) := by
346
+ apply isCompactOperator_of_tendsto (l:=atTop) (F:=finiteShift x) ?_ (Filter.Eventually.of_forall (finiteShift_compact x))
347
+ rw [tendsto_iff_norm_sub_tendsto_zero]
348
+ have he : Tendsto (fun n : ℕ => Real.exp (-10*(n:ℝ))) atTop (𝓝 0) := by
349
+ apply Real.tendsto_exp_atBot.comp
350
+ exact tendsto_const_nhds.neg_mul_atTop (by norm_num) tendsto_natCast_atTop_atTop
351
+ apply squeeze_zero (fun _ => norm_nonneg _) ?_ he
352
+ intro n
353
+ rw [norm_sub_rev]
354
+ exact finiteShift_error x n
355
+
356
+ abbrev ScalarHilbert := Lp ℂ 2 baseMeasure
357
+
358
+ def coordinateL2 (j : ℤ) : GlobalHilbert →L[ℂ] ScalarHilbert :=
359
+ (lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j).compLpL 2 baseMeasure
360
+
361
+ def singleL2 (j : ℤ) : ScalarHilbert →L[ℂ] GlobalHilbert :=
362
+ (lp.singleContinuousLinearMap ℂ (fun _ : ℤ => ℂ) 2 j).compLpL 2 baseMeasure
363
+
364
+ lemma coordinateL2_ae (j : ℤ) (f : GlobalHilbert) :
365
+ coordinateL2 j f =ᵐ[baseMeasure] fun x => f x j :=
366
+ ContinuousLinearMap.coeFn_compLpL _ _
367
+ lemma singleL2_ae (j : ℤ) (f : ScalarHilbert) :
368
+ singleL2 j f =ᵐ[baseMeasure] fun x => lp.single 2 j (f x) :=
369
+ ContinuousLinearMap.coeFn_compLpL _ _
370
+ lemma coordinateL2_singleL2 (j : ℤ) (f : ScalarHilbert) :
371
+ coordinateL2 j (singleL2 j f) = f := by
372
+ apply Lp.ext
373
+ filter_upwards [coordinateL2_ae j (singleL2 j f), singleL2_ae j f] with x h₁ h₂
374
+ simp only [h₁, h₂, lp.single_apply_self]
375
+
376
+
377
+ end
378
+ end BackwardIntertwiners
379
+
380
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ExplicitWeights.lean ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.FiberTails
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+
11
+ def weightBlock (k : ℕ) : ℕ := Nat.log 8 k + 1
12
+ def residueScale (k : ℕ) : ℕ := 2 ^ weightBlock k
13
+
14
+ def residueCorrection (t : ℕ → ℕ) (k : ℕ) : ℝ :=
15
+ if k = 0 then 0 else 100 * ((residueScale k : ℝ) - 2 + t (weightBlock k))
16
+ def halfExponent (t : ℕ → ℕ) (k : ℕ) : ℝ :=
17
+ 10 * ((k : ℝ) + 1) + residueCorrection t k
18
+
19
+ def ResidueBounds (t : ℕ → ℕ) : Prop := ∀ m, t m < 2 ^ m
20
+
21
+ lemma residueScale_ge_two (k : ℕ) : 2 ≤ residueScale k := by
22
+ dsimp [residueScale, weightBlock]
23
+ simpa using (Nat.pow_le_pow_right (by norm_num : 0 < 2) (by omega : 1 ≤ Nat.log 8 k + 1))
24
+
25
+ lemma residueCorrection_nonneg (t : ℕ → ℕ) (k : ℕ) : 0 ≤ residueCorrection t k := by
26
+ dsimp [residueCorrection]
27
+ split_ifs
28
+ · rfl
29
+ · have hh : (2:ℝ) ≤ residueScale k := by exact_mod_cast residueScale_ge_two k
30
+ positivity
31
+
32
+ lemma residueCorrection_le {t : ℕ → ℕ} (ht : ResidueBounds t) (k : ℕ) :
33
+ residueCorrection t k ≤ 200 * residueScale k := by
34
+ have hN : (0:ℝ) ≤ residueScale k := Nat.cast_nonneg _
35
+ dsimp [residueCorrection]
36
+ split_ifs
37
+ · positivity
38
+ · have hr : (t (weightBlock k):ℝ) < residueScale k := by exact_mod_cast ht (weightBlock k)
39
+ linarith
40
+
41
+ lemma residueCorrection_mono {t : ℕ → ℕ} (ht : ResidueBounds t) :
42
+ Monotone (residueCorrection t) := by
43
+ intro k l hkl
44
+ by_cases hk : k = 0
45
+ · simpa [hk, residueCorrection] using residueCorrection_nonneg t l
46
+ have hl : l ≠ 0 := by omega
47
+ have hq : weightBlock k ≤ weightBlock l := Nat.add_le_add_right (Nat.log_mono_right hkl) 1
48
+ dsimp only [residueCorrection]
49
+ rw [ite_eq_right hk, ite_eq_right hl]
50
+ rcases hq.eq_or_lt with hq | hq
51
+ · simp [hq, residueScale]
52
+ · have hNN : 2 * residueScale k ≤ residueScale l := by
53
+ dsimp [residueScale]
54
+ rw [← pow_succ']
55
+ exact Nat.pow_le_pow_right (by norm_num) (by omega)
56
+ have hNk : (2 * residueScale k : ℝ) ≤ residueScale l := by exact_mod_cast hNN
57
+ have htk : (t (weightBlock k) : ℝ) < residueScale k := by exact_mod_cast ht _
58
+ have htl : (0:ℝ) ≤ t (weightBlock l) := Nat.cast_nonneg _
59
+ linarith
60
+
61
+ lemma halfExponent_mono {t : ℕ → ℕ} (ht : ResidueBounds t) : Monotone (halfExponent t) := by
62
+ intro k l hkl
63
+ have hc := residueCorrection_mono ht hkl
64
+ have hkl' : (k:ℝ) ≤ l := by exact_mod_cast hkl
65
+ dsimp [halfExponent]
66
+ linarith
67
+
68
+ lemma halfExponent_lower (t : ℕ → ℕ) (k : ℕ) :
69
+ 10*((k:ℝ)+1) ≤ halfExponent t k := by
70
+ have hh := residueCorrection_nonneg t k
71
+ dsimp [halfExponent]
72
+ linarith
73
+
74
+ @[simp] lemma halfExponent_zero (t : ℕ → ℕ) : halfExponent t 0 = 10 := by
75
+ norm_num [halfExponent, residueCorrection]
76
+
77
+ lemma residueScale_sq_le {k : ℕ} (hk : k ≠ 0) : (residueScale k)^2 ≤ 4*k := by
78
+ let q := Nat.log 8 k
79
+ have hq : 8 ^ q ≤ k := Nat.pow_log_le_self 8 hk
80
+ have h4 : 4 ^ q ≤ 8 ^ q := Nat.pow_le_pow_left (by norm_num) q
81
+ have he : (residueScale k)^2 = 4 * 4 ^ q := by
82
+ change (2 ^ (q+1))^2 = 4 * 4^q
83
+ rw [pow_succ (2:ℕ) q, mul_pow, ← pow_mul, mul_comm q 2, pow_mul]
84
+ norm_num
85
+ ring
86
+ rw [he]
87
+ omega
88
+
89
+ lemma residueCorrection_sqrt_bound {t : ℕ → ℕ} (ht : ResidueBounds t) (k : ℕ) :
90
+ residueCorrection t k ≤ 400 * Real.sqrt k := by
91
+ by_cases hk : k = 0
92
+ · simp [hk, residueCorrection]
93
+ have hs : (residueScale k : ℝ)^2 ≤ 4*(k:ℝ) := by exact_mod_cast residueScale_sq_le hk
94
+ have hroot := Real.sq_sqrt (Nat.cast_nonneg k : (0:ℝ) ≤ k)
95
+ have hroot0 := Real.sqrt_nonneg (k:ℝ)
96
+ have hN0 : (0:ℝ) ≤ residueScale k := Nat.cast_nonneg _
97
+ have hNr : (residueScale k : ℝ) ≤ 2*Real.sqrt k := by nlinarith
98
+ exact (residueCorrection_le ht k).trans (by linarith)
99
+
100
+ def halfSum (t : ℕ → ℕ) (n : ℕ) : ℝ := ∑ k ∈ Finset.range n, halfExponent t k
101
+
102
+ @[simp] lemma halfSum_zero (t : ℕ → ℕ) : halfSum t 0 = 0 := by simp [halfSum]
103
+ @[simp] lemma halfSum_succ (t : ℕ → ℕ) (n : ℕ) :
104
+ halfSum t (n+1) = halfSum t n + halfExponent t n := by simp [halfSum, Finset.sum_range_succ]
105
+
106
+ lemma halfSum_linear (n : ℕ) :
107
+ (∑ k ∈ Finset.range n, (10:ℝ)*((k:ℝ)+1)) = 5*(n:ℝ)*((n:ℝ)+1) := by
108
+ induction n with
109
+ | zero => simp
110
+ | succ n ih =>
111
+ rw [Finset.sum_range_succ, ih]
112
+ push_cast
113
+ ring
114
+
115
+ lemma halfSum_bounds {t : ℕ → ℕ} (ht : ResidueBounds t) (n : ℕ) :
116
+ 5*(n:ℝ)*((n:ℝ)+1) ≤ halfSum t n ∧
117
+ halfSum t n ≤ 5*(n:ℝ)*((n:ℝ)+1) + 400*(n:ℝ)*Real.sqrt n := by
118
+ have he : halfSum t n = 5*(n:ℝ)*((n:ℝ)+1) +
119
+ ∑ k ∈ Finset.range n, residueCorrection t k := by
120
+ simp only [halfSum, halfExponent, Finset.sum_add_distrib, halfSum_linear]
121
+ rw [he]
122
+ constructor
123
+ · exact le_add_of_nonneg_right (Finset.sum_nonneg (fun k _ => residueCorrection_nonneg t k))
124
+ · have hh : (∑ k ∈ Finset.range n, residueCorrection t k) ≤
125
+ ��� _k ∈ Finset.range n, 400*Real.sqrt n := by
126
+ apply Finset.sum_le_sum
127
+ intro k hk
128
+ have hkn : (k:ℝ) ≤ n := by exact_mod_cast (Finset.mem_range.mp hk).le
129
+ exact (residueCorrection_sqrt_bound ht k).trans
130
+ (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hkn) (by norm_num))
131
+ simp only [Finset.sum_const, Finset.card_range, nsmul_eq_mul] at hh
132
+ nlinarith
133
+
134
+ lemma halfSum_quadratic {t : ℕ → ℕ} (ht : ResidueBounds t) :
135
+ Tendsto (fun n : ℕ => halfSum t n / (n:ℝ)^2) atTop (𝓝 5) := by
136
+ have hn : Tendsto (fun n : ℕ => (n:ℝ)) atTop atTop := tendsto_natCast_atTop_atTop
137
+ have hi : Tendsto (fun n : ℕ => (n:ℝ)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp hn
138
+ have hs : Tendsto (fun n : ℕ => (Real.sqrt (n:ℝ))⁻¹) atTop (𝓝 0) :=
139
+ tendsto_inv_atTop_zero.comp (Real.tendsto_sqrt_atTop.comp hn)
140
+ have hz : Tendsto (fun n : ℕ => halfSum t n / (n:ℝ)^2 - 5) atTop (𝓝 0) := by
141
+ apply squeeze_zero' (g := fun n : ℕ => 5*(n:ℝ)⁻¹ + 400*(Real.sqrt (n:ℝ))⁻¹) ?_ ?_
142
+ (by simpa using (hi.const_mul 5).add (hs.const_mul 400))
143
+ · filter_upwards [eventually_ge_atTop 1] with n hn
144
+ have hn0 : (0:ℝ) < n := by exact_mod_cast (by omega : 0 < n)
145
+ have hh := (halfSum_bounds ht n).1
146
+ have hdiv := (le_div_iff₀ (sq_pos_of_pos hn0)).mpr (show 5*(n:ℝ)^2 ≤ halfSum t n by nlinarith)
147
+ linarith
148
+ · filter_upwards [eventually_ge_atTop 1] with n hn
149
+ have hn0 : (0:ℝ) < n := by exact_mod_cast (by omega : 0 < n)
150
+ have hr0 : 0 < Real.sqrt (n:ℝ) := Real.sqrt_pos.mpr hn0
151
+ have hr := Real.sq_sqrt hn0.le
152
+ have hh := (halfSum_bounds ht n).2
153
+ have he : (5*(n:ℝ)*((n:ℝ)+1) + 400*(n:ℝ)*Real.sqrt n) / (n:ℝ)^2 - 5 =
154
+ 5*(n:ℝ)⁻¹ + 400*(Real.sqrt (n:ℝ))⁻¹ := by
155
+ field_simp
156
+ nlinarith
157
+ rw [← he]
158
+ exact sub_le_sub_right (div_le_div_of_nonneg_right hh (sq_nonneg _)) 5
159
+ simpa only [sub_add_cancel, zero_add] using hz.add_const 5
160
+
161
+
162
+ def bilateralExponent (t u : ℕ → ℕ) : ℤ → ℝ
163
+ | .ofNat n => halfExponent t n
164
+ | .negSucc n => halfExponent u n
165
+
166
+ def bilateralBeta (t u : ℕ → ℕ) (j : ℤ) : ℝ := Real.exp (-bilateralExponent t u j)
167
+
168
+
169
+ def bilateralWeight (t u : ℕ → ℕ) : ℤ → ℝ
170
+ | .ofNat n => Real.exp (-halfSum t n)
171
+ | .negSucc n => Real.exp (halfSum u (n+1))
172
+
173
+ @[simp] lemma bilateralWeight_nat (t u : ℕ → ℕ) (n : ℕ) :
174
+ bilateralWeight t u n = Real.exp (-halfSum t n) := rfl
175
+ @[simp] lemma bilateralWeight_neg_nat (t u : ℕ → ℕ) (n : ℕ) :
176
+ bilateralWeight t u (-(n:ℤ)) = Real.exp (halfSum u n) := by
177
+ cases n with
178
+ | zero => simp [bilateralWeight]
179
+ | succ n => rfl
180
+
181
+ lemma bilateralExponent_nonneg (t u : ℕ → ℕ) (j : ℤ) : 10 ≤ bilateralExponent t u j := by
182
+ cases j with
183
+ | ofNat n =>
184
+ have hh := halfExponent_lower t n
185
+ change 10 ≤ halfExponent t n
186
+ have hn : (0:ℝ) ≤ n := Nat.cast_nonneg _
187
+ linarith
188
+ | negSucc n =>
189
+ have hh := halfExponent_lower u n
190
+ change 10 ≤ halfExponent u n
191
+ have hn : (0:ℝ) ≤ n := Nat.cast_nonneg _
192
+ linarith
193
+
194
+ lemma bilateralWeight_pos (t u : ℕ → ℕ) (j : ℤ) : 0 < bilateralWeight t u j := by
195
+ cases j <;> exact Real.exp_pos _
196
+
197
+ lemma bilateralWeight_ratio (t u : ℕ → ℕ) (j : ℤ) :
198
+ bilateralWeight t u (j+1) / bilateralWeight t u j = bilateralBeta t u j := by
199
+ cases j with
200
+ | ofNat n =>
201
+ change Real.exp (-halfSum t (n+1)) / Real.exp (-halfSum t n) = Real.exp (-halfExponent t n)
202
+ rw [← Real.exp_sub, halfSum_succ]
203
+ congr 1
204
+ ring
205
+ | negSucc n =>
206
+ cases n with
207
+ | zero =>
208
+ change Real.exp (-halfSum t 0) / Real.exp (halfSum u 1) = Real.exp (-halfExponent u 0)
209
+ simp [halfSum_succ, Real.exp_neg]
210
+ | succ n =>
211
+ change Real.exp (halfSum u (n+1)) / Real.exp (halfSum u (n+1+1)) = Real.exp (-halfExponent u (n+1))
212
+ rw [← Real.exp_sub, halfSum_succ u (n+1)]
213
+ congr 1
214
+ ring
215
+
216
+ lemma bilateralWeight_antitone (t u : ℕ → ℕ) : Antitone (bilateralWeight t u) := by
217
+ apply antitone_int_of_succ_le
218
+ intro j
219
+ have hr := bilateralWeight_ratio t u j
220
+ have he : bilateralBeta t u j ≤ 1 := by
221
+ rw [bilateralBeta, Real.exp_le_one_iff]
222
+ have hh := bilateralExponent_nonneg t u j
223
+ linarith
224
+ exact (div_le_one (bilateralWeight_pos t u j)).mp (hr.le.trans he)
225
+
226
+ lemma halfSum_discreteConvex {t : ℕ → ℕ} (ht : ResidueBounds t) : DiscreteConvex (halfSum t) := by
227
+ unfold DiscreteConvex
228
+ simpa only [halfSum_succ, add_sub_cancel_left] using halfExponent_mono ht
229
+
230
+ lemma halfSum_root_bound {t : ℕ → ℕ} (ht : ResidueBounds t) {n : ℕ} (hn : 0 < n) :
231
+ -halfSum t n / (n:ℝ) ≤ -5*(n:ℝ) := by
232
+ have hn' : (0:ℝ) < n := Nat.cast_pos.mpr hn
233
+ apply (div_le_iff₀ hn').mpr
234
+ have hh := (halfSum_bounds ht n).1
235
+ nlinarith
236
+
237
+ lemma bilateralWeight_roots_summable {t u : ℕ → ℕ} (ht : ResidueBounds t) (hu : ResidueBounds u) :
238
+ Summable (fun j : ℤ => if j = 0 then (0:ℝ) else bilateralWeight t u j ^ (1/(j:��))) := by
239
+ have hs : Summable (fun n : ℕ => Real.exp (-5*(n:ℝ))) := by
240
+ simpa only [mul_comm (-5:ℝ)] using Real.summable_exp_nat_mul_iff.mpr (by norm_num : (-5:ℝ) < 0)
241
+ apply Summable.of_nat_of_neg_add_one
242
+ · apply hs.of_nonneg_of_le
243
+ · intro n
244
+ split_ifs
245
+ · rfl
246
+ · exact Real.rpow_nonneg (bilateralWeight_pos t u _).le _
247
+ · intro n
248
+ by_cases hn : n = 0
249
+ · simp [hn]
250
+ · rw [ite_eq_right (by exact_mod_cast hn), bilateralWeight_nat, ← Real.exp_mul]
251
+ apply Real.exp_le_exp.mpr
252
+ simpa only [mul_one_div, Int.cast_natCast] using halfSum_root_bound ht (Nat.pos_of_ne_zero hn)
253
+ · have hs' : Summable (fun n : ℕ => Real.exp (-5*((n:ℝ)+1))) := by
254
+ simpa only [mul_add, mul_one, Real.exp_add] using hs.mul_right (Real.exp (-5))
255
+ apply hs'.of_nonneg_of_le
256
+ · intro n
257
+ split_ifs
258
+ · rfl
259
+ · exact Real.rpow_nonneg (bilateralWeight_pos t u _).le _
260
+ · intro n
261
+ have hj : -((n:ℤ)+1) = -((n+1:ℕ):ℤ) := by omega
262
+ rw [hj, ite_eq_right (by omega), bilateralWeight_neg_nat, ← Real.exp_mul]
263
+ apply Real.exp_le_exp.mpr
264
+ have hb := halfSum_root_bound hu (Nat.zero_lt_succ n)
265
+ convert hb using 1 <;>
266
+ simp only [Int.cast_neg, Int.cast_add, Int.cast_one, Int.cast_natCast, Nat.succ_eq_add_one, inv_neg,
267
+ div_eq_mul_inv, Nat.cast_add, Nat.cast_one] ; ring
268
+
269
+ lemma bilateralWeight_quadratic {t u : ℕ → ℕ} (ht : ResidueBounds t) (hu : ResidueBounds u) :
270
+ QuadraticWeights (bilateralWeight t u) where
271
+ positive := bilateralWeight_pos t u
272
+ decreasing := bilateralWeight_antitone t u
273
+ convex_negative := by
274
+ simpa only [bilateralWeight_neg_nat, Real.log_exp] using halfSum_discreteConvex hu
275
+ concave_positive := by
276
+ simpa only [bilateralWeight_nat, Real.log_exp, neg_neg] using halfSum_discreteConvex ht
277
+ root_sum := bilateralWeight_roots_summable ht hu
278
+ quadratic := by
279
+ refine ⟨5, ?_, ?_, ?_⟩
280
+ · exact (Real.log_lt_sub_one_of_pos (by norm_num) (by norm_num : (3:ℝ) ≠ 1)).trans (by norm_num)
281
+ · simpa only [bilateralWeight_nat, Real.log_exp, neg_div] using (halfSum_quadratic ht).neg
282
+ · simpa only [bilateralWeight_neg_nat, Real.log_exp] using halfSum_quadratic hu
283
+
284
+
285
+ end
286
+ end BackwardIntertwiners
287
+
288
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/FiberMaps.lean ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.HaarBase
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ def coordinateDistance (j : ℤ) : ℤ := max (j+1) (-j)
14
+ def powerCost (n : ℕ) : ℕ := (n+1)^2/4
15
+
16
+ lemma powerCost_add_two (n : ℕ) : powerCost (n+2) = powerCost n + n+2 := by
17
+ unfold powerCost
18
+ have he : (n+2+1)^2 = (n+1)^2 + 4*(n+2) := by ring
19
+ rw [he]
20
+ omega
21
+
22
+ lemma coordinateDistance_pos (j : ℤ) : 1 ≤ coordinateDistance j := by
23
+ unfold coordinateDistance
24
+ omega
25
+
26
+ lemma coordinateDistance_endpoints (j : ℤ) (n : ℕ) :
27
+ (n:ℤ)+2 ≤ coordinateDistance j + coordinateDistance (j+(n:ℤ)+1) := by
28
+ have h₁ : -j ≤ coordinateDistance j := le_max_right _ _
29
+ have h₂ : j+(n:ℤ)+1+1 ≤ coordinateDistance (j+(n:ℤ)+1) := le_max_left _ _
30
+ omega
31
+
32
+ lemma sum_coordinateDistance_lower (n : ℕ) (j : ℤ) :
33
+ (powerCost n : ℤ) ≤ ∑ r ∈ Finset.range n, coordinateDistance (j+(r:ℤ)) := by
34
+ induction n using Nat.twoStepInduction generalizing j with
35
+ | zero => simp [powerCost]
36
+ | one => simpa [powerCost] using coordinateDistance_pos j
37
+ | more n ih _ =>
38
+ have hsum : (∑ r ∈ Finset.range (n+2), coordinateDistance (j+(r:ℤ))) =
39
+ coordinateDistance j + (∑ r ∈ Finset.range n, coordinateDistance ((j+1)+(r:ℤ))) +
40
+ coordinateDistance (j+(n:ℤ)+1) := by
41
+ rw [Finset.sum_range_succ, Finset.sum_range_succ']
42
+ simp only [Nat.cast_add, Nat.cast_one, Nat.cast_zero, add_zero]
43
+ congr 1
44
+ · rw [add_comm]
45
+ congr 1
46
+ apply Finset.sum_congr rfl
47
+ intro r hr
48
+ congr 1
49
+ ring
50
+ · congr 1
51
+ ring
52
+ rw [hsum, powerCost_add_two]
53
+ have hmid := ih (j+1)
54
+ have hend := coordinateDistance_endpoints j n
55
+ push_cast
56
+ omega
57
+
58
+
59
+ def fiberReindexVector (e : ℤ ≃ ℤ) (v : Fiber) : Fiber :=
60
+ ⟨fun j => v (e j), by
61
+ apply memℓp_gen
62
+ exact ((lp.memℓp v).summable (by norm_num)).comp_injective e.injective⟩
63
+
64
+ lemma fiberReindex_norm (e : ℤ ≃ ℤ) (v : Fiber) : ‖fiberReindexVector e v‖ = ‖v‖ := by
65
+ have he : ‖fiberReindexVector e v‖^2 = ‖v‖^2 := by
66
+ have h₁ := lp.norm_rpow_eq_tsum (by norm_num : (0:ℝ) < (2:ENNReal).toReal) (fiberReindexVector e v)
67
+ have h₂ := lp.norm_rpow_eq_tsum (by norm_num : (0:ℝ) < (2:ENNReal).toReal) v
68
+ simp only [ENNReal.toReal_ofNat, Real.rpow_two] at h₁ h₂
69
+ rw [h₁, h₂]
70
+ exact e.tsum_eq (fun j => ‖v j‖^2)
71
+ nlinarith [norm_nonneg (fiberReindexVector e v), norm_nonneg v]
72
+
73
+
74
+ def fiberReindex (e : ℤ ≃ ℤ) : Fiber ≃ₗᵢ[ℂ] Fiber where
75
+ toFun := fiberReindexVector e
76
+ invFun := fiberReindexVector e.symm
77
+ left_inv v := by ext j; exact congrArg v (e.apply_symm_apply j)
78
+ right_inv v := by ext j; exact congrArg v (e.symm_apply_apply j)
79
+ map_add' v z := by ext j; rfl
80
+ map_smul' c v := by ext j; rfl
81
+ norm_map' := fiberReindex_norm e
82
+
83
+ @[simp] lemma fiberReindex_apply (e : ℤ ≃ ℤ) (v : Fiber) (j : ℤ) :
84
+ (fiberReindex e v) j = v (e j) := rfl
85
+
86
+ lemma fiberMultiplier_mem {a : ℤ → ℂ} {C : ℝ} (hC : 0 ≤ C)
87
+ (ha : ∀ j, ‖a j‖ ≤ C) (v : Fiber) : Memℓp (fun j => a j*v j) 2 := by
88
+ apply ((lp.memℓp v).const_smul (C:ℂ)).mono'
89
+ intro j
90
+ simp only [Pi.smul_apply, norm_smul, Complex.norm_real, Real.norm_of_nonneg hC, norm_mul]
91
+ exact mul_le_mul_of_nonneg_right (ha j) (norm_nonneg _)
92
+
93
+ def fiberMultiplierVector (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C) (ha : ∀ j, ‖a j‖ ≤ C)
94
+ (v : Fiber) : Fiber := ⟨fun j => a j*v j, fiberMultiplier_mem hC ha v⟩
95
+
96
+ lemma fiberMultiplierVector_bound (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C) (ha : ∀ j, ‖a j‖ ≤ C)
97
+ (v : Fiber) : ‖fiberMultiplierVector a C hC ha v‖ ≤ C*‖v‖ := by
98
+ calc
99
+ _ ≤ ‖(C:ℂ) • v‖ := by
100
+ apply lp.norm_mono (by norm_num : (2:ENNReal) ≠ 0)
101
+ intro j
102
+ change ‖a j*v j‖ ≤ ‖(C:ℂ)*v j‖
103
+ rw [norm_mul, norm_mul, Complex.norm_real, Real.norm_of_nonneg hC]
104
+ exact mul_le_mul_of_nonneg_right (ha j) (norm_nonneg _)
105
+ _ = C*‖v‖ := by rw [norm_smul, Complex.norm_real, Real.norm_of_nonneg hC]
106
+
107
+ def fiberMultiplier (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C) (ha : ∀ j, ‖a j‖ ≤ C) :
108
+ Fiber →L[ℂ] Fiber :=
109
+ LinearMap.mkContinuous
110
+ { toFun := fiberMultiplierVector a C hC ha
111
+ map_add' := by intro v z; ext j; exact mul_add _ _ _
112
+ map_smul' := by intro c v; ext j; exact mul_left_comm _ _ _ }
113
+ C (fiberMultiplierVector_bound a C hC ha)
114
+
115
+ @[simp] lemma fiberMultiplier_apply (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C) (ha : ∀ j, ‖a j‖ ≤ C)
116
+ (v : Fiber) (j : ℤ) : fiberMultiplier a C hC ha v j = a j*v j := rfl
117
+
118
+ lemma fiberMultiplier_norm_le (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C) (ha : ∀ j, ‖a j‖ ≤ C) :
119
+ ‖fiberMultiplier a C hC ha‖ ≤ C :=
120
+ ContinuousLinearMap.opNorm_le_bound _ hC (fiberMultiplierVector_bound a C hC ha)
121
+
122
+
123
+ def fiberWeightedPermutation (e : ℤ ≃ ℤ) (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C)
124
+ (ha : ∀ j, ‖a j‖ ≤ C) : Fiber →L[ℂ] Fiber :=
125
+ (fiberReindex e).toLinearIsometry.toContinuousLinearMap.comp (fiberMultiplier a C hC ha)
126
+
127
+ @[simp] lemma fiberWeightedPermutation_apply (e : ℤ ≃ ℤ) (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C)
128
+ (ha : ∀ j, ‖a j‖ ≤ C) (v : Fiber) (j : ℤ) :
129
+ fiberWeightedPermutation e a C hC ha v j = a (e j)*v (e j) := rfl
130
+
131
+ lemma fiberWeightedPermutation_norm_le (e : ℤ ≃ ℤ) (a : ℤ → ℂ) (C : ℝ) (hC : 0 ≤ C)
132
+ (ha : ∀ j, ‖a j‖ ≤ C) : ‖fiberWeightedPermutation e a C hC ha‖ ≤ C := by
133
+ apply ContinuousLinearMap.opNorm_le_bound _ hC
134
+ intro v
135
+ change ‖fiberReindex e (fiberMultiplier a C hC ha v)‖ ≤ _
136
+ rw [(fiberReindex e).norm_map]
137
+ exact fiberMultiplierVector_bound a C hC ha v
138
+
139
+
140
+
141
+ lemma fiberCoordinates_stronglyMeasurable {X : Type*} [MeasurableSpace X]
142
+ (f : X → Fiber) (hf : ∀ n : ℤ, Measurable (fun x => f x n)) : StronglyMeasurable f := by
143
+ apply stronglyMeasurable_of_tendsto (atTop : Filter (Finset ℤ))
144
+ (f := fun s x => ∑ n ∈ s, lp.single 2 n (f x n))
145
+ · intro s
146
+ have h (n : ℤ) : StronglyMeasurable (fun x => (lp.single 2 n (f x n) : Fiber)) :=
147
+ (lp.singleContinuousLinearMap ℂ (fun _ : ℤ => ℂ) 2 n).continuous.comp_stronglyMeasurable
148
+ (hf n).stronglyMeasurable
149
+ convert Finset.stronglyMeasurable_sum s (fun n _ => h n) using 1
150
+ funext x
151
+ simp only [Finset.sum_apply]
152
+ · rw [tendsto_pi_nhds]
153
+ intro x
154
+ exact lp.hasSum_single (by norm_num : (2 : ENNReal) ≠ ∞) (f x)
155
+
156
+ end
157
+ end BackwardIntertwiners
158
+
159
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/FiberTails.lean ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.WeightSeparation
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ abbrev Fiber := lp (fun _ : ℤ => ℂ) 2
11
+
12
+
13
+ def coordinateTail (h : ℤ) : Submodule ℂ Fiber where
14
+ carrier := {v | ∀ j : ℤ, j < h → v j = 0}
15
+ zero_mem' := by simp
16
+ add_mem' := by intro v z hv hz j hj; simp [hv j hj, hz j hj]
17
+ smul_mem' := by intro a v hv j hj; simp [hv j hj]
18
+
19
+ lemma fiber_exists_coordinate {v : Fiber} (hv : v ≠ 0) : ∃ j : ℤ, v j ≠ 0 := by
20
+ by_contra! h
21
+ apply hv
22
+ ext j
23
+ exact h j
24
+
25
+ lemma weighted_shift_pow {w : ℤ → ℝ} (hw : ∀ j, 0 < w j)
26
+ {T : Fiber →L[ℂ] Fiber}
27
+ (hT : ∀ v j, T v j = (w j / w (j-1) : ℂ) * v (j-1))
28
+ (n : ℕ) (v : Fiber) (j : ℤ) :
29
+ (T^n) v j = (w j / w (j-(n:ℤ)) : ℂ) * v (j-(n:ℤ)) := by
30
+ have hwC (k : ℤ) : (w k:ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (hw k))
31
+ induction n generalizing j with
32
+ | zero => simp [hwC]
33
+ | succ n ih =>
34
+ rw [pow_succ']
35
+ change T ((T^n) v) j = _
36
+ rw [hT, ih]
37
+ have hi : j-1-(n:ℤ) = j-((n+1:ℕ):ℤ) := by omega
38
+ rw [hi]
39
+ field_simp [hwC]
40
+
41
+ lemma invariant_pow {T : Fiber →L[ℂ] Fiber} {L : Submodule ℂ Fiber}
42
+ (hi : ∀ v ∈ L, T v ∈ L) {v : Fiber} (hv : v ∈ L) (n : ℕ) : (T^n) v ∈ L := by
43
+ induction n with
44
+ | zero => simpa using hv
45
+ | succ n ih => simpa only [pow_succ', mul_apply_eq_comp] using hi _ ih
46
+
47
+
48
+
49
+ lemma SupportSeparation.strict_order {w : ℤ → ℝ} (hsep : SupportSeparation w)
50
+ {b c : ℤ → ℂ} (hbn : ∃ j, b j ≠ 0) (hcn : ∃ j, c j ≠ 0)
51
+ {B C : ℝ} (hB : 0 < B) (hC : 0 < C)
52
+ (hb : ∀ j, ‖b j‖ ≤ B*w j) (hc : ∀ j, ‖c j‖*w j ≤ C)
53
+ (hz : ∀ r : ℕ, (∑' j : ℤ, b j * c (j-r)) = 0)
54
+ {i j : ℤ} (hbi : b i ≠ 0) (hcj : c j ≠ 0) : i < j := by
55
+ obtain ⟨t, h, hbt, hch, hbmax, hcmin, hth⟩ :=
56
+ hsep.of_bounded hbn hcn hB hC hb hc (fun r _ => hz r)
57
+ have hit : i ≤ t := by by_contra! hh; exact hbi (hbmax i hh)
58
+ have hhj : h ≤ j := by by_contra! hh; exact hcj (hcmin j hh)
59
+ have hstrict : t < h := by
60
+ by_contra! hht
61
+ have he : t = h := le_antisymm hth hht
62
+ have hsingle : (∑' k : ℤ, b k*c k) = b t*c h := by
63
+ rw [tsum_eq_single t, he]
64
+ intro k hk
65
+ by_cases hkt : t < k
66
+ · simp [hbmax k hkt]
67
+ · rw [hcmin k (by omega), mul_zero]
68
+ have hzero := hz 0
69
+ simp only [Nat.cast_zero, sub_zero] at hzero
70
+ rw [hsingle] at hzero
71
+ exact (mul_ne_zero hbt hch) hzero
72
+ omega
73
+
74
+
75
+
76
+ lemma fiber_orthogonal_order {w : ℤ → ℝ} (hw : QuadraticWeights w)
77
+ {T : Fiber →L[ℂ] Fiber}
78
+ (hT : ∀ v j, T v j = (w j / w (j-1) : ℂ) * v (j-1))
79
+ {L : Submodule ℂ Fiber} (hinvariant : ∀ v ∈ L, T v ∈ L)
80
+ {v z : Fiber} (hv : v ∈ L) (hz : z ∈ L.orthogonal)
81
+ {i j : ℤ} (hzi : z i ≠ 0) (hvj : v j ≠ 0) : i < j := by
82
+ let b := fun k : ℤ => star (z k) * (w k:ℂ)
83
+ let c := fun k : ℤ => v k / (w k:ℂ)
84
+ have hwC (k : ℤ) : (w k:ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (hw.positive k))
85
+ have hbi : b i ≠ 0 := mul_ne_zero (by simpa using hzi) (hwC i)
86
+ have hcj : c j ≠ 0 := div_ne_zero hvj (hwC j)
87
+ have hb (k : ℤ) : ‖b k‖ ≤ (‖z‖+1)*w k := by
88
+ dsimp [b]
89
+ rw [norm_mul, RCLike.norm_conj, Complex.norm_real, Real.norm_of_nonneg (hw.positive k).le]
90
+ apply mul_le_mul_of_nonneg_right _ (hw.positive k).le
91
+ exact (lp.norm_apply_le_norm (by norm_num : (2 : ENNReal) ≠ 0) z k).trans (by linarith)
92
+ have hc (k : ℤ) : ‖c k‖*w k ≤ ‖v‖+1 := by
93
+ dsimp [c]
94
+ rw [norm_div, Complex.norm_real, Real.norm_of_nonneg (hw.positive k).le,
95
+ div_mul_cancel₀ _ (ne_of_gt (hw.positive k))]
96
+ exact (lp.norm_apply_le_norm (by norm_num : (2 : ENNReal) ≠ 0) v k).trans (by linarith)
97
+ have hcor (r : ℕ) : (∑' k : ℤ, b k*c (k-r)) = 0 := by
98
+ calc (∑' k : ℤ, b k*c (k-r)) = inner ℂ z ((T^r) v) := by
99
+ rw [lp.inner_eq_tsum]
100
+ apply tsum_congr
101
+ intro k
102
+ rw [RCLike.inner_apply, weighted_shift_pow hw.positive hT]
103
+ dsimp [b, c]
104
+ simp only [← Complex.star_def]
105
+ ring
106
+ _ = 0 := Submodule.inner_left_of_mem_orthogonal (invariant_pow hinvariant hv r) hz
107
+ exact (quadratic_support_separation w hw).strict_order ⟨i,hbi⟩ ⟨j,hcj⟩
108
+ (by positivity : 0 < ‖z‖+1) (by positivity : 0 < ‖v‖+1) hb hc hcor hbi hcj
109
+
110
+
111
+ theorem quadratic_fiber_tails (w : ℤ → ℝ) (hw : QuadraticWeights w)
112
+ (T : Fiber →L[ℂ] Fiber)
113
+ (hT : ∀ v j, T v j = (w j / w (j-1) : ℂ) * v (j-1))
114
+ (L : Submodule ℂ Fiber) (hclosed : IsClosed (L : Set Fiber))
115
+ (hinvariant : ∀ v ∈ L, T v ∈ L) :
116
+ L = ⊥ ∨ L = ⊤ ∨ ∃ h : ℤ, L = coordinateTail h := by
117
+ by_cases hbot : L = ⊥
118
+ · exact Or.inl hbot
119
+ by_cases htop : L = ⊤
120
+ · exact Or.inr (Or.inl htop)
121
+ have hOO : L.orthogonal.orthogonal = L := by
122
+ rw [Submodule.orthogonal_orthogonal_eq_closure, hclosed.submodule_topologicalClosure_eq]
123
+ have hnotOrth : L.orthogonal ≠ ⊥ := by
124
+ intro hh
125
+ rw [hh, Submodule.bot_orthogonal_eq_top] at hOO
126
+ exact htop hOO.symm
127
+ obtain ⟨z, hz, hzne⟩ := (Submodule.ne_bot_iff L.orthogonal).mp hnotOrth
128
+ obtain ⟨i, hzi⟩ := fiber_exists_coordinate hzne
129
+ obtain ⟨v, hv, hvne⟩ := (Submodule.ne_bot_iff L).mp hbot
130
+ obtain ⟨j, hvj⟩ := fiber_exists_coordinate hvne
131
+ let P := fun k : ℤ => ∃ c : Fiber, c ∈ L ∧ c k ≠ 0
132
+ have hPnonempty : ∃ k, P k := ⟨j, v, hv, hvj⟩
133
+ have hPbound : ∃ a : ℤ, ∀ k : ℤ, P k → a ≤ k := by
134
+ refine ⟨i+1, ?_⟩
135
+ rintro k ⟨c, hc, hck⟩
136
+ have hh := fiber_orthogonal_order hw hT hinvariant hc hz hzi hck
137
+ omega
138
+ obtain ⟨h, hhP, hhmin⟩ := Int.exists_least_of_bdd hPbound hPnonempty
139
+ obtain ⟨v₀, hv₀, hv₀h⟩ := hhP
140
+ refine Or.inr (Or.inr ⟨h, le_antisymm ?_ ?_⟩)
141
+ · intro c hc k hk
142
+ by_contra hck
143
+ have hh := hhmin k ⟨c, hc, hck⟩
144
+ omega
145
+ · intro c hc
146
+ rw [← hOO]
147
+ apply (Submodule.mem_orthogonal _ c).mpr
148
+ intro u hu
149
+ rw [lp.inner_eq_tsum]
150
+ apply Eq.trans (tsum_congr (g := fun _ : ℤ => (0:ℂ)) ?_) tsum_zero
151
+ intro k
152
+ rw [RCLike.inner_apply]
153
+ by_cases hkh : k < h
154
+ · rw [hc k hkh, zero_mul]
155
+ · have huk : u k = 0 := by
156
+ by_contra hne
157
+ have hh := fiber_orthogonal_order hw hT hinvariant hv₀ hu hne hv₀h
158
+ exact hkh hh
159
+ simp [huk]
160
+
161
+
162
+ end
163
+ end BackwardIntertwiners
164
+
165
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/GlobalOperators.lean ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.BackwardWeights
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ section Fields
14
+ variable {X : Type*} [MeasurableSpace X] {μ : Measure X}
15
+
16
+ lemma weightedPermutation_stronglyMeasurable (e : ℤ ≃ ℤ) (a : X → ℤ → ℂ)
17
+ (C : ℝ) (hC : 0 ≤ C) (ha : ∀ x j, ‖a x j‖ ≤ C)
18
+ (hm : ∀ j, Measurable (fun x => a x j))
19
+ {f : X → Fiber} (hf : StronglyMeasurable f) :
20
+ StronglyMeasurable (fun x => fiberWeightedPermutation e (a x) C hC (ha x) (f x)) := by
21
+ apply fiberCoordinates_stronglyMeasurable
22
+ intro j
23
+ exact (hm (e j)).mul (((lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 (e j)).continuous.comp_stronglyMeasurable hf).measurable)
24
+
25
+ lemma weightedPermutation_aestronglyMeasurable (e : ℤ ≃ ℤ) (a : X → ℤ → ℂ)
26
+ (C : ℝ) (hC : 0 ≤ C) (ha : ∀ x j, ‖a x j‖ ≤ C)
27
+ (hm : ∀ j, Measurable (fun x => a x j))
28
+ {f : X → Fiber} (hf : AEStronglyMeasurable f μ) :
29
+ AEStronglyMeasurable (fun x => fiberWeightedPermutation e (a x) C hC (ha x) (f x)) μ := by
30
+ apply (weightedPermutation_stronglyMeasurable e a C hC ha hm hf.stronglyMeasurable_mk).aestronglyMeasurable.congr
31
+ filter_upwards [hf.ae_eq_mk] with x hx
32
+ rw [hx]
33
+
34
+
35
+ def scalarMultiplier (g : Lp ℂ ∞ μ) : Lp Fiber 2 μ →L[ℂ] Lp Fiber 2 μ :=
36
+ LinearMap.mkContinuous
37
+ { toFun := fun f => g • f
38
+ map_add' := Lp.add_smul g
39
+ map_smul' := fun c f => (Lp.smul_comm c g f).symm }
40
+ ‖g‖ (Lp.norm_smul_le g)
41
+
42
+ def fieldVector (A : X → Fiber →L[ℂ] Fiber) (C : ℝ)
43
+ (hA : ∀ x, ‖A x‖ ≤ C)
44
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ)
45
+ (f : Lp Fiber 2 μ) : Lp Fiber 2 μ :=
46
+ ((Lp.memLp f).of_le_mul (hm f (Lp.aestronglyMeasurable f))
47
+ (Filter.Eventually.of_forall fun x =>
48
+ (A x).le_opNorm (f x) |>.trans (mul_le_mul_of_nonneg_right (hA x) (norm_nonneg _)))).toLp _
49
+
50
+ lemma fieldVector_ae (A : X → Fiber →L[ℂ] Fiber) (C : ℝ)
51
+ (hA : ∀ x, ‖A x‖ ≤ C)
52
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ)
53
+ (f : Lp Fiber 2 μ) : fieldVector A C hA hm f =ᵐ[μ] fun x => A x (f x) :=
54
+ MemLp.coeFn_toLp _
55
+
56
+ lemma fieldVector_norm (A : X → Fiber →L[ℂ] Fiber) (C : ℝ) (hC : 0 ≤ C)
57
+ (hA : ∀ x, ‖A x‖ ≤ C)
58
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ)
59
+ (f : Lp Fiber 2 μ) : ‖fieldVector A C hA hm f‖ ≤ C*‖f‖ := by
60
+ calc
61
+ _ ≤ ‖(C:ℂ) • f‖ := by
62
+ apply Lp.norm_le_norm_of_ae_le
63
+ filter_upwards [fieldVector_ae A C hA hm f, Lp.coeFn_smul (C:ℂ) f] with x hx hs
64
+ rw [hx, hs, Pi.smul_apply, norm_smul, Complex.norm_real, Real.norm_of_nonneg hC]
65
+ exact (A x).le_opNorm (f x) |>.trans (mul_le_mul_of_nonneg_right (hA x) (norm_nonneg _))
66
+ _ = C*‖f‖ := by rw [norm_smul, Complex.norm_real, Real.norm_of_nonneg hC]
67
+
68
+ def fieldOperator (A : X → Fiber →L[ℂ] Fiber) (C : ℝ) (hC : 0 ≤ C)
69
+ (hA : ∀ x, ‖A x‖ ≤ C)
70
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ) :
71
+ Lp Fiber 2 μ →L[ℂ] Lp Fiber 2 μ :=
72
+ LinearMap.mkContinuous
73
+ { toFun := fieldVector A C hA hm
74
+ map_add' := by
75
+ intro f g
76
+ apply Lp.ext
77
+ filter_upwards [fieldVector_ae A C hA hm (f+g), fieldVector_ae A C hA hm f,
78
+ fieldVector_ae A C hA hm g, Lp.coeFn_add f g,
79
+ Lp.coeFn_add (fieldVector A C hA hm f) (fieldVector A C hA hm g)] with x h₁ h₂ h₃ h₄ h₅
80
+ simp only [h₁,h₂,h₃,h₄,h₅,Pi.add_apply,map_add]
81
+ map_smul' := by
82
+ intro c f
83
+ apply Lp.ext
84
+ filter_upwards [fieldVector_ae A C hA hm (c • f), fieldVector_ae A C hA hm f,
85
+ Lp.coeFn_smul c f, Lp.coeFn_smul c (fieldVector A C hA hm f)] with x h₁ h₂ h₃ h₄
86
+ simp only [RingHom.id_apply, h₁,h₂,h₃,h₄,Pi.smul_apply,map_smul] }
87
+ C (fieldVector_norm A C hC hA hm)
88
+
89
+ lemma fieldOperator_ae (A : X → Fiber →L[ℂ] Fiber) (C : ℝ) (hC : 0 ≤ C)
90
+ (hA : ∀ x, ‖A x‖ ≤ C)
91
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ)
92
+ (f : Lp Fiber 2 μ) : fieldOperator A C hC hA hm f =ᵐ[μ] fun x => A x (f x) :=
93
+ fieldVector_ae A C hA hm f
94
+
95
+ lemma fieldOperator_norm (A : X → Fiber →L[ℂ] Fiber) (C : ℝ) (hC : 0 ≤ C)
96
+ (hA : ∀ x, ‖A x‖ ≤ C)
97
+ (hm : ∀ f : X → Fiber, AEStronglyMeasurable f μ → AEStronglyMeasurable (fun x => A x (f x)) μ) :
98
+ ‖fieldOperator A C hC hA hm‖ ≤ C :=
99
+ ContinuousLinearMap.opNorm_le_bound _ hC (fieldVector_norm A C hC hA hm)
100
+
101
+ lemma scalarMultiplier_ae (g : Lp ℂ ∞ μ) (f : Lp Fiber 2 μ) :
102
+ scalarMultiplier g f =ᵐ[μ] fun x => g x • f x := Lp.coeFn_lpSMul g f
103
+ lemma scalarMultiplier_norm_le (g : Lp ℂ ∞ μ) : ‖scalarMultiplier (μ := μ) g‖ ≤ ‖g‖ :=
104
+ ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg g) (Lp.norm_smul_le g)
105
+ end Fields
106
+
107
+ abbrev GlobalHilbert := Lp Fiber 2 baseMeasure
108
+
109
+ def OperatorInvariant {H : Type*} [NormedAddCommGroup H] [NormedSpace ℂ H]
110
+ (L : Submodule ℂ H) (T : H →L[ℂ] H) : Prop := ∀ v ∈ L, T v ∈ L
111
+
112
+ def generatedAlgebra (S V : GlobalHilbert →L[ℂ] GlobalHilbert) :
113
+ Subalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert) :=
114
+ Algebra.adjoin ℂ ({S,V} ∪ Set.range (scalarMultiplier (μ := baseMeasure)))
115
+
116
+ def AlgebraTransitive (A : Subalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert)) : Prop :=
117
+ ∀ L : Submodule ℂ GlobalHilbert, IsClosed (L : Set GlobalHilbert) →
118
+ (∀ T ∈ A, OperatorInvariant L T) → L = ⊥ ∨ L = ⊤
119
+
120
+
121
+ structure DirectModelData where
122
+ Sx : Base → Fiber →L[ℂ] Fiber
123
+ S : GlobalHilbert →L[ℂ] GlobalHilbert
124
+ b : Base → ℤ → ℝ
125
+ Vx : Base → Fiber →L[ℂ] Fiber
126
+ V : GlobalHilbert →L[ℂ] GlobalHilbert
127
+
128
+
129
+
130
+
131
+ structure DirectModelProperties (D : DirectModelData) : Prop where
132
+ beta_measurable : ∀ j, Measurable (fun x => explicitBeta x j)
133
+ beta_positive : ∀ x j, 0 < explicitBeta x j
134
+ forward_coordinates : ∀ x v j, D.Sx x v j = (explicitBeta x (j-1):ℂ)*v (j-1)
135
+ forward_field : ∀ f, D.S f =ᵐ[baseMeasure] fun x => D.Sx x (f x)
136
+ fiber_lattice : ∀ x (L : Submodule ℂ Fiber),
137
+ (IsClosed (L : Set Fiber) ∧ OperatorInvariant L (D.Sx x)) ↔
138
+ L = ⊥ ∨ L = ⊤ ∨ ∃ h : ℤ, L = coordinateTail h
139
+ S_nonzero : D.S ≠ 0
140
+ S_norm : ‖D.S‖ = Real.exp (-10)
141
+ power_bound : ∀ n : ℕ, 1 ≤ n → ‖D.S^n‖ ≤ Real.exp (-10*(((n+1)^2/4:ℕ):ℝ))
142
+ V_contraction : ‖D.V‖ ≤ 1
143
+ commute : D.S * D.V = D.V * D.S
144
+ backward_measurable : ∀ j, Measurable (fun x => D.b x j)
145
+ backward_bounds : ∀ x j, 0 ≤ D.b x j ∧ D.b x j ≤ 1
146
+ backward_coordinates : ∀ x v j, D.Vx x v j = (D.b x (j+1):ℂ)*v (j+1)
147
+ backward_field : ∀ f, ∀ᵐ x ∂baseMeasure, D.V f (odometer x) = D.Vx x (f x)
148
+ common_conull : ∃ Xstar : Set Base, MeasurableSet Xstar ∧ baseMeasure Xstarᶜ = 0 ∧
149
+ odometer ⁻¹' Xstar = Xstar ∧ ∀ x ∈ Xstar,
150
+ (∀ j, 0 < D.b x j) ∧
151
+ (∀ h : ℤ, ((coordinateTail h).map (D.Vx x).toLinearMap).topologicalClosure = coordinateTail (h-1)) ∧
152
+ DenseRange (D.Vx x)
153
+ transitive : AlgebraTransitive (generatedAlgebra D.S D.V)
154
+
155
+
156
+
157
+ def forwardFiber (x : Base) : Fiber →L[ℂ] Fiber :=
158
+ fiberWeightedPermutation (Equiv.subRight 1) (fun j => (explicitBeta x j:ℂ))
159
+ (Real.exp (-10)) (Real.exp_pos _).le
160
+ (fun j => by simpa only [Complex.norm_real, Real.norm_of_nonneg (explicitBeta_pos x j).le] using explicitBeta_le x j)
161
+ def backwardFiber (x : Base) : Fiber →L[ℂ] Fiber :=
162
+ fiberWeightedPermutation (Equiv.addRight 1) (fun j => (backwardCoeff x j:ℂ)) 1 (by norm_num)
163
+ (fun j => by simpa only [Complex.norm_real, Real.norm_of_nonneg (backwardCoeff_bounds x j).1] using (backwardCoeff_bounds x j).2)
164
+ @[simp] lemma forwardFiber_apply (x : Base) (v : Fiber) (j : ℤ) :
165
+ forwardFiber x v j = (explicitBeta x (j-1):ℂ) * v (j-1) := rfl
166
+ @[simp] lemma backwardFiber_apply (x : Base) (v : Fiber) (j : ℤ) :
167
+ backwardFiber x v j = (backwardCoeff x (j+1):ℂ) * v (j+1) := rfl
168
+ lemma forwardFiber_norm_le (x : Base) : ‖forwardFiber x‖ ≤ Real.exp (-10) :=
169
+ fiberWeightedPermutation_norm_le _ _ _ _ _
170
+ lemma backwardFiber_norm_le (x : Base) : ‖backwardFiber x‖ ≤ 1 :=
171
+ fiberWeightedPermutation_norm_le _ _ _ _ _
172
+ lemma forwardFiber_single (x : Base) (j : ℤ) (c : ℂ) :
173
+ forwardFiber x (lp.single 2 j c) = lp.single 2 (j+1) ((explicitBeta x j:ℂ)*c) := by
174
+ ext k
175
+ rw [forwardFiber_apply]
176
+ by_cases hk : k = j+1
177
+ · subst k
178
+ simp
179
+ · have hj : k-1 ≠ j := by omega
180
+ simp only [lp.single_apply_ne _ _ _ hk, lp.single_apply_ne _ _ _ hj, mul_zero]
181
+ lemma backwardFiber_single (x : Base) (j : ℤ) (c : ℂ) :
182
+ backwardFiber x (lp.single 2 j c) = lp.single 2 (j-1) ((backwardCoeff x j:ℂ)*c) := by
183
+ ext k
184
+ rw [backwardFiber_apply]
185
+ by_cases hk : k = j-1
186
+ · subst k
187
+ simp
188
+ · have hj : k+1 ≠ j := by omega
189
+ simp only [lp.single_apply_ne _ _ _ hk, lp.single_apply_ne _ _ _ hj, mul_zero]
190
+ lemma forwardFiber_norm (x : Base) : ‖forwardFiber x‖ = Real.exp (-10) := by
191
+ apply le_antisymm (forwardFiber_norm_le x)
192
+ have hh := (forwardFiber x).le_opNorm (lp.single 2 0 (1:ℂ))
193
+ rw [forwardFiber_single, explicitBeta_zero, mul_one, lp.norm_single (by norm_num : (0:ENNReal)<2),
194
+ lp.norm_single (by norm_num : (0:ENNReal)<2), norm_one, mul_one,
195
+ Complex.norm_real, Real.norm_of_nonneg (Real.exp_pos _).le] at hh
196
+ exact hh
197
+
198
+ lemma backwardFiber_intertwines (x : Base) :
199
+ forwardFiber (odometer x) * backwardFiber x = backwardFiber x * forwardFiber x := by
200
+ ext v j
201
+ simp only [mul_apply_eq_comp, forwardFiber_apply, backwardFiber_apply,
202
+ sub_add_cancel, add_sub_cancel_right]
203
+ have hc := congrArg (fun r : ℝ => (r:ℂ)) (backwardCoeff_recurrence x j)
204
+ push_cast at hc
205
+ linear_combination -hc * v j
206
+
207
+ lemma coordinateTail_isClosed (h : ℤ) : IsClosed (coordinateTail h : Set Fiber) := by
208
+ have he : (coordinateTail h : Set Fiber) = ⋂ j : ℤ, ⋂ _ : j < h, {v : Fiber | v j = 0} := by
209
+ ext v
210
+ change (∀ j : ℤ, j < h → v j = 0) ↔ _
211
+ simp only [Set.mem_iInter, Set.mem_ofPred_eq]
212
+ rw [he]
213
+ exact isClosed_iInter fun j => isClosed_iInter fun _ =>
214
+ isClosed_eq (lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j).continuous continuous_const
215
+ lemma forwardFiber_tail (x : Base) (h : ℤ) {v : Fiber} (hv : v ∈ coordinateTail h) :
216
+ forwardFiber x v ∈ coordinateTail h := by
217
+ intro j hj
218
+ rw [forwardFiber_apply, hv _ (by omega), mul_zero]
219
+ lemma backwardFiber_tail (x : Base) (h : ℤ) {v : Fiber} (hv : v ∈ coordinateTail h) :
220
+ backwardFiber x v ∈ coordinateTail (h-1) := by
221
+ intro j hj
222
+ rw [backwardFiber_apply, hv _ (by omega), mul_zero]
223
+ lemma single_mem_coordinateTail {h j : ℤ} (hj : h ≤ j) (c : ℂ) :
224
+ (lp.single 2 j c : Fiber) ∈ coordinateTail h := by
225
+ intro k hk
226
+ exact lp.single_apply_ne _ _ _ (by omega)
227
+
228
+ lemma backwardFiber_tail_closure {x : Base} (hx : x ∈ goodBase) (h : ℤ) :
229
+ ((coordinateTail h).map (backwardFiber x).toLinearMap).topologicalClosure = coordinateTail (h-1) := by
230
+ apply le_antisymm
231
+ · apply Submodule.topologicalClosure_minimal _ ?_ (coordinateTail_isClosed (h-1))
232
+ rintro _ ⟨v,hv,rfl⟩
233
+ exact backwardFiber_tail x h hv
234
+ · intro v hv
235
+ let P := ((coordinateTail h).map (backwardFiber x).toLinearMap).topologicalClosure
236
+ have hP : IsClosed (P : Set Fiber) := Submodule.isClosed_topologicalClosure _
237
+ apply hP.mem_of_tendsto (lp.hasSum_single (by norm_num : (2:ENNReal) ≠ ∞) v)
238
+ apply Filter.Eventually.of_forall
239
+ intro s
240
+ apply P.sum_mem
241
+ intro j _
242
+ by_cases hj : j < h-1
243
+ · rw [hv j hj, lp.single_zero]
244
+ exact P.zero_mem
245
+ · apply (Submodule.le_topologicalClosure ((coordinateTail h).map (backwardFiber x).toLinearMap))
246
+ refine ⟨lp.single 2 (j+1) (v j / (backwardCoeff x (j+1):ℂ)),
247
+ single_mem_coordinateTail (by omega) _, ?_⟩
248
+ change backwardFiber x (_) = _
249
+ rw [backwardFiber_single, add_sub_cancel_right, mul_div_cancel₀]
250
+ exact_mod_cast ne_of_gt (backwardCoeff_pos hx (j+1))
251
+
252
+ lemma backwardFiber_denseRange {x : Base} (hx : x ∈ goodBase) : DenseRange (backwardFiber x) := by
253
+ intro v
254
+ have hcl : IsClosed (closure (Set.range (backwardFiber x))) := isClosed_closure
255
+ apply hcl.mem_of_tendsto (lp.hasSum_single (by norm_num : (2:ENNReal) ≠ ∞) v)
256
+ apply Filter.Eventually.of_forall
257
+ intro s
258
+ apply subset_closure
259
+ refine ⟨∑ j ∈ s, lp.single 2 (j+1) (v j / (backwardCoeff x (j+1):ℂ)), ?_⟩
260
+ rw [map_sum]
261
+ apply Finset.sum_congr rfl
262
+ intro j _
263
+ rw [backwardFiber_single, add_sub_cancel_right, mul_div_cancel₀]
264
+ exact_mod_cast ne_of_gt (backwardCoeff_pos hx (j+1))
265
+
266
+ lemma explicitExponent_distance (x : Base) (j : ℤ) :
267
+ 10*(coordinateDistance j:ℝ) ≤ explicitExponent x j := by
268
+ cases j with
269
+ | ofNat n =>
270
+ have hd : coordinateDistance (n:ℤ) = (n:ℤ)+1 := by
271
+ unfold coordinateDistance
272
+ omega
273
+ change 10*(coordinateDistance (n:ℤ):ℝ) ≤ halfExponent (plusResidue x) n
274
+ rw [hd]
275
+ simpa only [Int.cast_add, Int.cast_one, Int.cast_natCast] using halfExponent_lower (plusResidue x) n
276
+ | negSucc n =>
277
+ have hd : coordinateDistance (Int.negSucc n) = (n:ℤ)+1 := by
278
+ unfold coordinateDistance
279
+ omega
280
+ rw [hd]
281
+ change _ ≤ halfExponent (minusResidue x) n
282
+ simpa only [Int.cast_add, Int.cast_one, Int.cast_natCast] using halfExponent_lower (minusResidue x) n
283
+
284
+ lemma interval_exponent_lower (x : Base) (n : ℕ) (j : ℤ) :
285
+ 10*(powerCost n:ℝ) ≤ ∑ r ∈ Finset.range n, explicitExponent x (j+(r:ℤ)) := by
286
+ have hc : (powerCost n:ℝ) ≤ ∑ r ∈ Finset.range n, (coordinateDistance (j+(r:ℤ)):ℝ) := by
287
+ exact_mod_cast sum_coordinateDistance_lower n j
288
+ calc
289
+ _ ≤ 10*(∑ r ∈ Finset.range n, (coordinateDistance (j+(r:ℤ)):ℝ)) := by linarith
290
+ _ = ∑ r ∈ Finset.range n, 10*(coordinateDistance (j+(r:ℤ)):ℝ) := by rw [Finset.mul_sum]
291
+ _ ≤ _ := Finset.sum_le_sum fun _ _ => explicitExponent_distance x _
292
+
293
+ lemma forwardFiber_power_input (x : Base) (n : ℕ) (v : Fiber) (j : ℤ) :
294
+ (forwardFiber x ^ n) v (j+(n:ℤ)) =
295
+ (Real.exp (-(∑ r ∈ Finset.range n, explicitExponent x (j+(r:ℤ)))):ℂ)*v j := by
296
+ induction n with
297
+ | zero => simp
298
+ | succ n ih =>
299
+ rw [pow_succ', mul_apply_eq_comp, forwardFiber_apply]
300
+ have hi : j+((n+1:ℕ):ℤ)-1 = j+(n:ℤ) := by omega
301
+ rw [hi, ih, Finset.sum_range_succ]
302
+ change (Real.exp (-explicitExponent x (j+(n:ℤ))):ℂ)*
303
+ ((Real.exp (-(∑ r ∈ Finset.range n, explicitExponent x (j+(r:ℤ)))):ℂ)*v j) = _
304
+ rw [← mul_assoc, ← Complex.ofReal_mul, ← Real.exp_add]
305
+ rw [neg_add_rev]
306
+
307
+ lemma forwardFiber_power_norm (x : Base) (n : ℕ) :
308
+ ‖forwardFiber x ^ n‖ ≤ Real.exp (-10*(powerCost n:ℝ)) := by
309
+ let C := Real.exp (-10*(powerCost n:ℝ))
310
+ have hC : 0 ≤ C := (Real.exp_pos _).le
311
+ apply ContinuousLinearMap.opNorm_le_bound _ (Real.exp_pos _).le
312
+ intro v
313
+ calc
314
+ _ ≤ ‖(C:ℂ) • fiberReindex (Equiv.subRight (n:ℤ)) v‖ := by
315
+ apply lp.norm_mono (by norm_num : (2:ENNReal) ≠ 0)
316
+ intro j
317
+ have hi : j = (j-(n:ℤ))+(n:ℤ) := by omega
318
+ conv_lhs => rw [hi, forwardFiber_power_input]
319
+ simp only [lp.coeFn_smul, Pi.smul_apply, norm_smul, fiberReindex_apply, Equiv.subRight_apply,
320
+ norm_mul, Complex.norm_real, Real.norm_of_nonneg (Real.exp_pos _).le, Real.norm_of_nonneg hC]
321
+ apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
322
+ apply Real.exp_le_exp.mpr
323
+ simpa only [neg_mul] using neg_le_neg (interval_exponent_lower x n (j-(n:ℤ)))
324
+ _ = C*‖v‖ := by
325
+ rw [norm_smul, Complex.norm_real, Real.norm_of_nonneg (Real.exp_pos _).le, (fiberReindex _).norm_map]
326
+
327
+
328
+ lemma forwardFiber_aestronglyMeasurable (f : Base → Fiber) (hf : AEStronglyMeasurable f baseMeasure) :
329
+ AEStronglyMeasurable (fun x => forwardFiber x (f x)) baseMeasure := by
330
+ apply weightedPermutation_aestronglyMeasurable
331
+ · exact fun j => Complex.measurable_ofReal.comp (measurable_explicitBeta j)
332
+ · exact hf
333
+ lemma backwardFiber_aestronglyMeasurable (f : Base → Fiber) (hf : AEStronglyMeasurable f baseMeasure) :
334
+ AEStronglyMeasurable (fun x => backwardFiber x (f x)) baseMeasure := by
335
+ apply weightedPermutation_aestronglyMeasurable
336
+ · exact fun j => Complex.measurable_ofReal.comp (measurable_backwardCoeff j)
337
+ · exact hf
338
+
339
+ def forwardOperator : GlobalHilbert →L[ℂ] GlobalHilbert :=
340
+ fieldOperator forwardFiber (Real.exp (-10)) (Real.exp_pos _).le
341
+ forwardFiber_norm_le forwardFiber_aestronglyMeasurable
342
+ lemma forwardOperator_ae (f : GlobalHilbert) :
343
+ forwardOperator f =ᵐ[baseMeasure] fun x => forwardFiber x (f x) :=
344
+ fieldOperator_ae _ _ _ _ _ f
345
+ lemma forwardOperator_norm_le : ‖forwardOperator‖ ≤ Real.exp (-10) :=
346
+ fieldOperator_norm _ _ _ _ _
347
+
348
+ def inverseOdometer (x : Base) : Base := (show PadicInt 2 from x)-1
349
+ @[simp] lemma inverseOdometer_odometer (x : Base) : inverseOdometer (odometer x) = x := by
350
+ change ((show PadicInt 2 from x)+1)-1 = _
351
+ exact add_sub_cancel_right _ _
352
+ @[simp] lemma odometer_inverseOdometer (x : Base) : odometer (inverseOdometer x) = x := by
353
+ change ((show PadicInt 2 from x)-1)+1 = _
354
+ exact sub_add_cancel _ _
355
+ lemma inverseOdometer_preserving : MeasurePreserving inverseOdometer baseMeasure baseMeasure := by
356
+ have hh := measurePreserving_completion (α := PadicInt 2) (measurePreserving_add_right baseHaar (-1))
357
+ have he : inverseOdometer = (show Base → Base from fun x : PadicInt 2 => x + (-1)) := by
358
+ funext x
359
+ exact @sub_eq_add_neg (PadicInt 2) _ (show PadicInt 2 from x) 1
360
+ rw [he]
361
+ exact hh
362
+
363
+ def odometerMeasurableEquiv : Base ≃ᵐ Base where
364
+ toFun := odometer
365
+ invFun := inverseOdometer
366
+ left_inv := inverseOdometer_odometer
367
+ right_inv := odometer_inverseOdometer
368
+ measurable_toFun := odometer_ergodic.measurable
369
+ measurable_invFun := inverseOdometer_preserving.measurable
370
+
371
+ def backwardFieldOperator : GlobalHilbert →L[ℂ] GlobalHilbert :=
372
+ fieldOperator backwardFiber 1 (by norm_num) backwardFiber_norm_le backwardFiber_aestronglyMeasurable
373
+
374
+ def backwardOperator : GlobalHilbert →L[ℂ] GlobalHilbert :=
375
+ (Lp.compMeasurePreservingₗᵢ ℂ inverseOdometer inverseOdometer_preserving).toContinuousLinearMap.comp backwardFieldOperator
376
+
377
+ lemma backwardOperator_ae_inverse (f : GlobalHilbert) :
378
+ backwardOperator f =ᵐ[baseMeasure] fun x => backwardFiber (inverseOdometer x) (f (inverseOdometer x)) := by
379
+ have h₁ := Lp.coeFn_compMeasurePreserving (backwardFieldOperator f) inverseOdometer_preserving
380
+ have h₂ := (fieldOperator_ae backwardFiber 1 (by norm_num) backwardFiber_norm_le
381
+ backwardFiber_aestronglyMeasurable f).comp_tendsto inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae
382
+ exact h₁.trans h₂
383
+
384
+ lemma backwardOperator_ae (f : GlobalHilbert) :
385
+ ∀ᵐ x ∂baseMeasure, backwardOperator f (odometer x) = backwardFiber x (f x) := by
386
+ filter_upwards [(backwardOperator_ae_inverse f).comp_tendsto
387
+ odometer_ergodic.quasiMeasurePreserving.tendsto_ae] with x hx
388
+ simpa only [Function.comp_def,inverseOdometer_odometer] using hx
389
+
390
+ lemma backwardOperator_norm : ‖backwardOperator‖ ≤ 1 := by
391
+ apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num)
392
+ intro f
393
+ change ‖Lp.compMeasurePreserving inverseOdometer inverseOdometer_preserving (backwardFieldOperator f)‖ ≤ _
394
+ rw [Lp.norm_compMeasurePreserving]
395
+ exact fieldVector_norm backwardFiber 1 (by norm_num) backwardFiber_norm_le backwardFiber_aestronglyMeasurable f
396
+
397
+ lemma forward_backward_commute : forwardOperator * backwardOperator = backwardOperator * forwardOperator := by
398
+ ext1 f
399
+ apply Lp.ext
400
+ filter_upwards [forwardOperator_ae (backwardOperator f), backwardOperator_ae_inverse f,
401
+ backwardOperator_ae_inverse (forwardOperator f),
402
+ (forwardOperator_ae f).comp_tendsto inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae] with x h₁ h₂ h₃ h₄
403
+ change forwardOperator (backwardOperator f) x = backwardOperator (forwardOperator f) x
404
+ rw [h₁,h₂,h₃]
405
+
406
+ dsimp only [Function.comp_def] at h₄
407
+ rw [h₄]
408
+ have hh := congrArg (fun A : Fiber →L[ℂ] Fiber => A (f (inverseOdometer x))) (backwardFiber_intertwines (inverseOdometer x))
409
+ simpa only [mul_apply_eq_comp, odometer_inverseOdometer] using hh
410
+
411
+ lemma forward_scalar_commute (g : Lp ℂ ∞ baseMeasure) :
412
+ forwardOperator * scalarMultiplier g = scalarMultiplier g * forwardOperator := by
413
+ ext1 f
414
+ apply Lp.ext
415
+ filter_upwards [forwardOperator_ae (scalarMultiplier g f), scalarMultiplier_ae g f,
416
+ scalarMultiplier_ae g (forwardOperator f), forwardOperator_ae f] with x h₁ h₂ h₃ h₄
417
+ change forwardOperator (scalarMultiplier g f) x = scalarMultiplier g (forwardOperator f) x
418
+ simp only [h₁,h₂,h₃,h₄,map_smul]
419
+
420
+ def constantBasis (j : ℤ) : GlobalHilbert := Lp.const 2 baseMeasure (lp.single 2 j (1:ℂ))
421
+ lemma constantBasis_norm (j : ℤ) : ‖constantBasis j‖ = 1 := by
422
+ rw [constantBasis, Lp.norm_const 2 baseMeasure _ (by norm_num), lp.norm_single (by norm_num : (0:ENNReal)<2)]
423
+ simp
424
+ lemma constantBasis_ae (j : ℤ) : constantBasis j =ᵐ[baseMeasure] fun _ => lp.single 2 j (1:ℂ) :=
425
+ Lp.coeFn_const _ _ _
426
+ lemma forwardOperator_constantBasis_zero :
427
+ forwardOperator (constantBasis 0) = (Real.exp (-10):ℂ) • constantBasis 1 := by
428
+ apply Lp.ext
429
+ filter_upwards [forwardOperator_ae (constantBasis 0), constantBasis_ae 0, constantBasis_ae 1,
430
+ Lp.coeFn_smul (Real.exp (-10):ℂ) (constantBasis 1)] with x h₁ h₂ h₃ h₄
431
+ rw [h₁,h₂,h₄,Pi.smul_apply,h₃,forwardFiber_single,explicitBeta_zero,mul_one]
432
+ rw [← lp.single_smul]
433
+ simp
434
+ lemma forwardOperator_norm : ‖forwardOperator‖ = Real.exp (-10) := by
435
+ apply le_antisymm forwardOperator_norm_le
436
+ have h := forwardOperator.le_opNorm (constantBasis 0)
437
+ rw [forwardOperator_constantBasis_zero, norm_smul, constantBasis_norm, constantBasis_norm,
438
+ mul_one, mul_one, Complex.norm_real, Real.norm_of_nonneg (Real.exp_pos _).le] at h
439
+ exact h
440
+ lemma forwardOperator_ne_zero : forwardOperator ≠ 0 := by
441
+ intro h
442
+ have hh := forwardOperator_norm
443
+ rw [h, norm_zero] at hh
444
+ exact (Real.exp_ne_zero (-10)) hh.symm
445
+
446
+ lemma forwardOperator_power_ae (n : ℕ) (f : GlobalHilbert) :
447
+ (forwardOperator^n) f =ᵐ[baseMeasure] fun x => (forwardFiber x ^ n) (f x) := by
448
+ induction n with
449
+ | zero => filter_upwards [] with x; rfl
450
+ | succ n ih =>
451
+ rw [pow_succ', mul_apply_eq_comp]
452
+ filter_upwards [forwardOperator_ae ((forwardOperator^n) f), ih] with x h₁ h₂
453
+ simp only [h₁,h₂,pow_succ',mul_apply_eq_comp]
454
+ lemma forwardOperator_power_norm (n : ℕ) :
455
+ ‖forwardOperator^n‖ ≤ Real.exp (-10*(powerCost n:ℝ)) := by
456
+ let C := Real.exp (-10*(powerCost n:ℝ))
457
+ have hC : 0 ≤ C := (Real.exp_pos _).le
458
+ apply ContinuousLinearMap.opNorm_le_bound _ hC
459
+ intro f
460
+ calc
461
+ _ ≤ ‖(C:ℂ) • f‖ := by
462
+ apply Lp.norm_le_norm_of_ae_le
463
+ filter_upwards [forwardOperator_power_ae n f, Lp.coeFn_smul (C:ℂ) f] with x h₁ h₂
464
+ rw [h₁,h₂,Pi.smul_apply,norm_smul,Complex.norm_real,Real.norm_of_nonneg hC]
465
+ exact (forwardFiber x ^ n).le_opNorm (f x) |>.trans
466
+ (mul_le_mul_of_nonneg_right (forwardFiber_power_norm x n) (norm_nonneg _))
467
+ _ = C*‖f‖ := by rw [norm_smul,Complex.norm_real,Real.norm_of_nonneg hC]
468
+
469
+
470
+ end
471
+ end BackwardIntertwiners
472
+
473
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/HaarBase.lean ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ExplicitWeights
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ instance padicBorel : MeasurableSpace (PadicInt 2) := borel _
14
+ instance padicBorelSpace : BorelSpace (PadicInt 2) := ⟨rfl⟩
15
+
16
+ def baseHaar : Measure (PadicInt 2) := Measure.addHaarMeasure ⊤
17
+ instance baseHaar_probability : IsProbabilityMeasure baseHaar := by
18
+ constructor
19
+ exact Measure.addHaarMeasure_self
20
+ instance baseHaar_regular : baseHaar.Regular := inferInstanceAs ((Measure.addHaarMeasure ⊤).Regular)
21
+ instance baseHaar_addHaar : baseHaar.IsAddHaarMeasure :=
22
+ inferInstanceAs ((Measure.addHaarMeasure ⊤).IsAddHaarMeasure)
23
+
24
+ def odometerBorel (x : PadicInt 2) : PadicInt 2 := x + 1
25
+ lemma odometerBorel_ergodic : Ergodic odometerBorel baseHaar := by
26
+ have hd : DenseRange (fun n : ℤ => n • (1 : PadicInt 2)) := by
27
+ simpa only [zsmul_one] using (PadicInt.denseRange_intCast (p := 2))
28
+ have he : (fun x : PadicInt 2 => 1+x) = odometerBorel := funext fun x => add_comm 1 x
29
+ rw [← he]
30
+ exact ergodic_add_left_of_denseRange_zsmul hd baseHaar
31
+
32
+ lemma continuous_twoResidue (m : ℕ) : Continuous (PadicInt.toZModPow (p := 2) m) := by
33
+ apply IsLocallyConstant.continuous
34
+ rw [IsLocallyConstant.iff_eventually_eq]
35
+ intro x
36
+ have hp : 0 < (2:ℝ)^(-(m:ℤ)) := zpow_pos (by norm_num) _
37
+ filter_upwards [Metric.ball_mem_nhds x hp] with y hy
38
+ have hnorm : ‖y-x‖ ≤ (2:ℝ)^(-(m:ℤ)) := (by simpa [dist_eq_norm] using hy : ‖y-x‖ < _).le
39
+ have hmem := (PadicInt.norm_le_pow_iff_mem_span_pow (y-x) m).mp hnorm
40
+ rw [← PadicInt.ker_toZModPow, RingHom.mem_ker, map_sub, sub_eq_zero] at hmem
41
+ exact hmem
42
+
43
+ def twoResidue (m : ℕ) (x : PadicInt 2) : ℕ := (PadicInt.toZModPow m x).val
44
+ lemma twoResidue_lt (m : ℕ) (x : PadicInt 2) : twoResidue m x < 2^m := ZMod.val_lt _
45
+ lemma measurable_twoResidue (m : ℕ) : Measurable (twoResidue m) :=
46
+ (measurable_of_countable (f := ZMod.val)).comp (continuous_twoResidue m).measurable
47
+
48
+ lemma baseHaar_singleton_eq (x y : PadicInt 2) : baseHaar {x} = baseHaar {y} := by
49
+ have he : (fun z : PadicInt 2 => (y-x)+z) ⁻¹' {y} = {x} := by
50
+ ext z
51
+ change (y-x)+z = y ↔ z = x
52
+ constructor
53
+ · intro h
54
+ have hh := congrArg (fun v : PadicInt 2 => v-(y-x)) h
55
+ abel_nf at hh
56
+ exact hh
57
+ · rintro rfl
58
+ abel
59
+ rw [← he]
60
+ exact measure_preimage_add baseHaar (y-x) {y}
61
+
62
+ instance baseHaar_nullSingleton : NullSingletonClass baseHaar := by
63
+ constructor
64
+ intro x
65
+ by_contra hx
66
+ have hd : Pairwise (fun i j : ℕ => Disjoint ({(i:PadicInt 2)} : Set (PadicInt 2)) {(j:PadicInt 2)}) := by
67
+ intro i j hij
68
+ apply Set.disjoint_singleton.mpr
69
+ exact_mod_cast hij
70
+ have hs : (∑' _n : ℕ, baseHaar {x}) ≤ 1 := calc
71
+ _ = ∑' n : ℕ, baseHaar {(n:PadicInt 2)} := tsum_congr fun n => baseHaar_singleton_eq _ _
72
+ _ = baseHaar (⋃ n : ℕ, {(n:PadicInt 2)}) := (measure_iUnion hd (fun _ => measurableSet_singleton _)).symm
73
+ _ ≤ 1 := by simpa using (measure_mono (Set.subset_univ _) : baseHaar _ ≤ baseHaar Set.univ)
74
+ rw [ENNReal.tsum_const_eq_top_of_ne_zero hx] at hs
75
+ exact (not_le_of_gt ENNReal.one_lt_top) hs
76
+
77
+
78
+
79
+ lemma measurePreserving_completion {α : Type*} [MeasurableSpace α] {μ : Measure α}
80
+ {f : α → α} (hf : MeasurePreserving f μ μ) :
81
+ @MeasurePreserving (NullMeasurableSpace α μ) (NullMeasurableSpace α μ) _ _
82
+ f μ.completion μ.completion := by
83
+ have hm : @Measurable (NullMeasurableSpace α μ) (NullMeasurableSpace α μ) _ _ f := by
84
+ intro s hs
85
+ change NullMeasurableSet (f ⁻¹' s) μ
86
+ exact NullMeasurableSet.preimage (μb := μ) (show NullMeasurableSet (show Set α from s) μ from hs) hf.quasiMeasurePreserving
87
+ refine ⟨hm, ?_⟩
88
+ apply Measure.ext
89
+ intro s hs
90
+ rw [Measure.map_apply hm hs]
91
+ exact hf.measure_preimage hs
92
+
93
+ lemma ergodic_completion {α : Type*} [MeasurableSpace α] {μ : Measure α}
94
+ {f : α → α} (hf : Ergodic f μ) :
95
+ @Ergodic (NullMeasurableSpace α μ) _ f μ.completion := by
96
+ refine ⟨measurePreserving_completion hf.toMeasurePreserving, ?_⟩
97
+ constructor
98
+ intro s hs he
99
+ exact hf.quasiErgodic.aeconst_set₀ hs (Filter.EventuallyEq.of_eq he)
100
+
101
+
102
+ abbrev Base := NullMeasurableSpace (PadicInt 2) baseHaar
103
+ abbrev baseMeasure : Measure Base := baseHaar.completion
104
+ instance base_probability : IsProbabilityMeasure baseMeasure := ⟨measure_univ (μ := baseHaar)⟩
105
+ instance base_nullSingleton : NullSingletonClass baseMeasure := by
106
+ constructor
107
+ intro x
108
+ change baseHaar { (show PadicInt 2 from x) } = 0
109
+ exact measure_singleton _
110
+ instance base_measurableSingleton : MeasurableSingletonClass Base := by
111
+ constructor
112
+ intro x
113
+ exact measurableSet_of_null (μ := baseMeasure) (measure_singleton x)
114
+
115
+ def odometer : Base → Base := odometerBorel
116
+ lemma odometer_ergodic : Ergodic odometer baseMeasure := by
117
+ change @Ergodic (NullMeasurableSpace (PadicInt 2) baseHaar) _ odometerBorel baseHaar.completion
118
+ exact ergodic_completion (α := PadicInt 2) odometerBorel_ergodic
119
+
120
+ def residue (m : ℕ) (x : Base) : ℕ := twoResidue m x
121
+ lemma residue_lt (m : ℕ) (x : Base) : residue m x < 2^m := twoResidue_lt m x
122
+ lemma measurable_residue (m : ℕ) : Measurable (residue m) :=
123
+ (measurable_twoResidue m).nullMeasurable.measurable'
124
+
125
+
126
+
127
+ def goodBase : Set Base := (Set.range (fun n : ℤ => (show Base from (n : PadicInt 2))))ᶜ
128
+ lemma measurableSet_goodBase : MeasurableSet goodBase := by
129
+ apply MeasurableSet.compl
130
+ exact (Set.countable_range _).measurableSet
131
+ lemma ae_goodBase : ∀ᵐ x ∂baseMeasure, x ∈ goodBase :=
132
+ (Set.countable_range (fun n : ℤ => (show Base from (n : PadicInt 2)))).ae_notMem baseMeasure
133
+ lemma goodBase_odometer (x : Base) : odometer x ∈ goodBase ↔ x ∈ goodBase := by
134
+ change ((show PadicInt 2 from x)+1:PadicInt 2) ∉ Set.range (Int.cast : ℤ → PadicInt 2) ↔
135
+ x ∉ Set.range (Int.cast : ℤ → PadicInt 2)
136
+ apply not_congr
137
+ constructor
138
+ · rintro ⟨n, hn⟩
139
+ refine ⟨n-1, ?_⟩
140
+ push_cast
141
+ rw [hn]
142
+ change ((show PadicInt 2 from x)+1)-1 = (show PadicInt 2 from x)
143
+ exact add_sub_cancel_right _ _
144
+ · rintro ⟨n, rfl⟩
145
+ exact ⟨n+1, by push_cast; rfl⟩
146
+
147
+ lemma zmod_val_neg_one {N : ℕ} (hN : 0 < N) : (-1 : ZMod N).val = N-1 := by
148
+ obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hN)
149
+ simp [ZMod.val_neg_one]
150
+
151
+ lemma residue_exceptional_iff (m : ℕ) (x : Base) :
152
+ residue m x = 2^m-1 ↔ PadicInt.toZModPow m x = (-1 : ZMod (2^m)) := by
153
+ change (PadicInt.toZModPow m x).val = _ ↔ _
154
+ rw [← zmod_val_neg_one (pow_pos (by norm_num : 0 < 2) m)]
155
+ exact (ZMod.val_injective (2^m)).eq_iff
156
+
157
+ lemma goodBase_eventually_nonexceptional {x : Base} (hx : x ∈ goodBase) :
158
+ ∃ M : ℕ, ∀ m ≥ M, residue m x ≠ 2^m-1 := by
159
+ have hx' : (show PadicInt 2 from x) ≠ -1 := by
160
+ intro h
161
+ apply hx
162
+ refine ⟨-1, ?_⟩
163
+ change ((-1:ℤ):PadicInt 2) = (show PadicInt 2 from x)
164
+ simpa using h.symm
165
+ have hex : ∃ M, PadicInt.toZModPow M x ≠ PadicInt.toZModPow M (-1:PadicInt 2) := by
166
+ by_contra! h
167
+ exact hx' (PadicInt.ext_of_toZModPow.mp h)
168
+ obtain ⟨M, hM⟩ := hex
169
+ refine ⟨M, fun m hm he => hM ?_⟩
170
+ have heq := (residue_exceptional_iff m x).mp he
171
+ have hc := congrArg (ZMod.castHom (pow_dvd_pow 2 hm) (ZMod (2^M))) heq
172
+ change ZMod.cast (PadicInt.toZModPow m (show PadicInt 2 from x)) = _ at hc
173
+ rw [PadicInt.cast_toZModPow M m hm] at hc
174
+ simpa only [map_neg, map_one] using hc
175
+
176
+ lemma residue_step {m : ℕ} (hm : 1 ≤ m) (x : Base) :
177
+ residue m (odometer x) = if residue m x = 2^m-1 then 0 else residue m x + 1 := by
178
+ have hN' : 2 ≤ 2^m := by simpa using Nat.pow_le_pow_right (by norm_num : 0 < 2) hm
179
+ have hN : 1 < 2^m := by omega
180
+ have : Fact (1 < 2^m) := ⟨hN⟩
181
+ change ((PadicInt.toZModPow m) ((show PadicInt 2 from x)+1)).val = _
182
+ rw [map_add, map_one, ZMod.val_add, ZMod.val_one]
183
+ change (residue m x + 1) % 2^m = _
184
+ have hr := residue_lt m x
185
+ split_ifs with h
186
+ · have he : residue m x+1 = 2^m := by omega
187
+ simp [he]
188
+ · exact Nat.mod_eq_of_lt (by omega)
189
+
190
+
191
+
192
+ end
193
+ end BackwardIntertwiners
194
+
195
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/HilbertClassification.lean ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ModelProperties
2
+
3
+ namespace OAI
4
+
5
+ namespace Hyperinvariant233
6
+ open Filter
7
+ open scoped Topology
8
+ universe u
9
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
10
+
11
+
12
+ def commutant (T : H →L[ℂ] H) : Subalgebra ℂ (H →L[ℂ] H) :=
13
+ Subalgebra.centralizer ℂ ({T} : Set (H →L[ℂ] H))
14
+
15
+
16
+ def TransitiveCommutant (T : H →L[ℂ] H) : Prop :=
17
+ ∀ K : Submodule ℂ H, IsClosed (K : Set H) →
18
+ (∀ A : H →L[ℂ] H, A * T = T * A → ∀ x ∈ K, A x ∈ K) →
19
+ K = ⊥ ∨ K = ⊤
20
+
21
+
22
+ @[instance_reducible]
23
+ def strongOperatorTopology : TopologicalSpace (H →L[ℂ] H) :=
24
+ TopologicalSpace.induced (fun A : H →L[ℂ] H => (fun x : H => A x)) inferInstance
25
+
26
+
27
+ def MainClaim : Prop :=
28
+ ∃ T : H →L[ℂ] H, T ≠ 0 ∧
29
+ Tendsto (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) atTop (𝓝 0) ∧
30
+ TransitiveCommutant T
31
+
32
+
33
+ def FullClaim : Prop :=
34
+ ∃ T : H →L[ℂ] H, T ≠ 0 ∧
35
+ Tendsto (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) atTop (𝓝 0) ∧
36
+ TransitiveCommutant T ∧ commutant T ≠ ⊤ ∧
37
+ @IsClosed (H →L[ℂ] H) strongOperatorTopology (commutant T : Set (H →L[ℂ] H))
38
+
39
+ end Hyperinvariant233
40
+
41
+
42
+ namespace Hyperinvariant233
43
+ open Submodule TopologicalSpace
44
+ universe u v
45
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H]
46
+ [CompleteSpace H] [SeparableSpace H]
47
+
48
+
49
+ theorem orthonormal_subtype_countable (w : Set H)
50
+ (hw : Orthonormal ℂ (Subtype.val : w → H)) : Countable w := by
51
+ classical
52
+ let : DiscreteTopology w := discreteTopology_iff_isOpen_singleton.mpr (by
53
+ intro i
54
+ have ho : IsOpen {j : w | (1 / 2 : ℝ) < ‖inner ℂ (i : H) (j : H)‖} :=
55
+ isOpen_lt continuous_const (continuous_const.inner continuous_subtype_val).norm
56
+ have he : {j : w | (1 / 2 : ℝ) < ‖inner ℂ (i : H) (j : H)‖} = {i} := by
57
+ ext j
58
+ rw [Set.mem_ofPred_eq, orthonormal_iff_ite.mp hw i j]
59
+ by_cases hij : i = j <;> norm_num [hij, eq_comm]
60
+ rwa [he] at ho)
61
+ exact separableSpace_iff_countable.mp inferInstance
62
+
63
+
64
+
65
+ theorem exists_nat_hilbertBasis (hInf : ¬FiniteDimensional ℂ H) :
66
+ Nonempty (HilbertBasis ℕ ℂ H) := by
67
+ classical
68
+ obtain ⟨w, b, hb⟩ := exists_hilbertBasis ℂ H
69
+ have hw : Orthonormal ℂ (Subtype.val : w → H) := by
70
+ simpa only [hb] using b.orthonormal
71
+ let : Countable w := orthonormal_subtype_countable w hw
72
+ let : Infinite w := by
73
+ refine not_finite_iff_infinite.mp ?_
74
+ intro hfin
75
+ let : Finite w := hfin
76
+ let : Fintype w := Fintype.ofFinite w
77
+ exact hInf (Module.Finite.of_basis b.toOrthonormalBasis.toBasis)
78
+ let e : ℕ ≃ w := Classical.choice (inferInstance : Nonempty (ℕ ≃ w))
79
+ have ho : Orthonormal ℂ (b ∘ e) := b.orthonormal.comp e e.injective
80
+ have hr : Set.range (b ∘ e) = Set.range b := by
81
+ ext x
82
+ constructor
83
+ · rintro ⟨n, rfl⟩
84
+ exact ⟨e n, rfl⟩
85
+ · rintro ⟨i, rfl⟩
86
+ exact ⟨e.symm i, by simp⟩
87
+ exact ⟨HilbertBasis.mk ho (by rw [hr, b.dense_span])⟩
88
+
89
+
90
+ theorem nonempty_linearIsometryEquiv
91
+ {K : Type v} [NormedAddCommGroup K] [InnerProductSpace ℂ K]
92
+ [CompleteSpace K] [SeparableSpace K]
93
+ (hH : ¬FiniteDimensional ℂ H) (hK : ¬FiniteDimensional ℂ K) :
94
+ Nonempty (H ≃ₗᵢ[ℂ] K) := by
95
+ obtain ⟨bH⟩ := exists_nat_hilbertBasis hH
96
+ obtain ⟨bK⟩ := exists_nat_hilbertBasis hK
97
+ exact ⟨bH.repr.trans bK.repr.symm⟩
98
+
99
+ end Hyperinvariant233
100
+
101
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ModelProperties.lean ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ProductSymbols
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ universe u
16
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
17
+
18
+ attribute [local instance] realOperatorTower realOperatorCommute complexNormalCalculus complexClosedCalculus realSelfAdjointCalculus
19
+
20
+ open InnerProductSpace ContinuousLinearMap
21
+
22
+
23
+ structure OrdinaryStructuralProperties (D : DirectModelData) : Prop where
24
+ tails : ∀ h : ℤ, ∃ L : Submodule ℂ GlobalHilbert,
25
+ (∀ f : GlobalHilbert, f ∈ L ↔ ∀ᵐ x ∂baseMeasure, f x ∈ coordinateTail h) ∧
26
+ IsClosed (L : Set GlobalHilbert) ∧ L ≠ ⊥ ∧ L ≠ ⊤ ∧
27
+ OperatorInvariant L D.S ∧ ¬OperatorInvariant L D.V
28
+ fiber_compact : ∀ x : Base, IsCompactOperator (D.Sx x)
29
+ global_not_compact : ¬IsCompactOperator D.S
30
+ multiplier_witness : ∃ Q : GlobalHilbert →L[ℂ] GlobalHilbert,
31
+ IsStarProjection Q ∧
32
+ (∀ f : GlobalHilbert, Q f =ᵐ[baseMeasure] fun x => lp.single 2 0 (f x 0)) ∧
33
+ Q * D.S ≠ D.S * Q ∧
34
+ (∀ g : Lp ℂ ∞ baseMeasure, Q * scalarMultiplier g = scalarMultiplier g * Q) ∧
35
+ Q ∉ Set.range (scalarMultiplier (μ:=baseMeasure))
36
+
37
+
38
+
39
+
40
+ structure PolarFamilyProperties (D : DirectModelData)
41
+ (U : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ)
42
+ (A : ℤ → GlobalHilbert →L[ℂ] GlobalHilbert) : Prop where
43
+ unitary : star (U : GlobalHilbert →L[ℂ] GlobalHilbert) =
44
+ ((U⁻¹ : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ) : GlobalHilbert →L[ℂ] GlobalHilbert)
45
+ unitary_coordinates : ∀ f : GlobalHilbert, ∀ᵐ x ∂baseMeasure, ∀ j : ℤ,
46
+ (U : GlobalHilbert →L[ℂ] GlobalHilbert) f x j = f x (j-1)
47
+ modulus : A 0 = CFC.sqrt (star D.S * D.S)
48
+ polar : D.S = (U : GlobalHilbert →L[ℂ] GlobalHilbert) * A 0
49
+ injective : Function.Injective (A 0)
50
+ dense_range : DenseRange (A 0)
51
+ conjugates : ∀ n : ℤ, A n =
52
+ ((U^(-n) : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ) : GlobalHilbert →L[ℂ] GlobalHilbert) *
53
+ A 0 * ((U^n : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ) : GlobalHilbert →L[ℂ] GlobalHilbert)
54
+ diagonal : ∀ n : ℤ, ∀ f : GlobalHilbert, ∀ᵐ x ∂baseMeasure, ∀ j : ℤ,
55
+ A n f x j = (explicitBeta x (j+n):ℂ) * f x j
56
+ finite_atomic : ∀ F : Finset ℤ, AtomicAlgebra (strongGenerated (A '' (F : Set ℤ)))
57
+ modulus_pure_point : PurePointResolution (A 0)
58
+ full_multiplication : ∀ T : GlobalHilbert →L[ℂ] GlobalHilbert,
59
+ T ∈ strongGenerated (Set.range A) ↔ IsProductMultiplier T
60
+ abelian : ∀ T ∈ strongGenerated (Set.range A), ∀ R ∈ strongGenerated (Set.range A), T*R=R*T
61
+ diffuse : DiffuseAlgebra (strongGenerated (Set.range A))
62
+ not_contained_in_commutant : ∃ T ∈ strongGenerated (Set.range A), T * D.S ≠ D.S * T
63
+
64
+ def PolarStructuralProperties (D : DirectModelData) : Prop :=
65
+ ∃ (U : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ)
66
+ (A : ℤ → GlobalHilbert →L[ℂ] GlobalHilbert), PolarFamilyProperties D U A
67
+
68
+
69
+ lemma coordinateTail_eq_closedSpan (h : ℤ) :
70
+ coordinateTail h = (Submodule.span ℂ
71
+ (Set.range (fun j : {j : ℤ // h ≤ j} => (lp.single 2 j.val (1:ℂ) : Fiber)))).topologicalClosure := by
72
+ let P := Submodule.span ℂ (Set.range (fun j : {j : ℤ // h ≤ j} => (lp.single 2 j.val (1:ℂ) : Fiber)))
73
+ apply le_antisymm
74
+ · intro v hv
75
+ apply (Submodule.isClosed_topologicalClosure P).mem_of_tendsto
76
+ (lp.hasSum_single (by norm_num : (2:ENNReal) ≠ ∞) v)
77
+ apply Eventually.of_forall
78
+ intro s
79
+ apply P.topologicalClosure.sum_mem
80
+ intro j _
81
+ by_cases hj : j < h
82
+ · rw [hv j hj,lp.single_zero]
83
+ exact P.topologicalClosure.zero_mem
84
+ · apply Submodule.le_topologicalClosure
85
+ have hg : (lp.single 2 j (1:ℂ) : Fiber) ∈ P :=
86
+ Submodule.subset_span ⟨⟨j,by omega⟩,rfl⟩
87
+ simpa only [←lp.single_smul,smul_eq_mul,mul_one] using P.smul_mem (v j) hg
88
+ · apply Submodule.topologicalClosure_minimal _ ?_ (coordinateTail_isClosed h)
89
+ apply Submodule.span_le.mpr
90
+ rintro v ⟨j,rfl⟩
91
+ exact single_mem_coordinateTail j.property 1
92
+
93
+ lemma explicitDirectModel_ordinary : OrdinaryStructuralProperties explicitDirectModel where
94
+ tails h := ⟨globalTail h, fun f => mem_globalTail h f,
95
+ globalTail_closed h,globalTail_nonzero h,globalTail_proper h,
96
+ globalTail_forward h,globalTail_not_backward h⟩
97
+ fiber_compact := forwardFiber_compact
98
+ global_not_compact := forwardOperator_not_compact
99
+ multiplier_witness := ⟨sliceProjection 0, sliceProjection_isStarProjection 0,
100
+ sliceProjection_ae 0,sliceProjection_zero_not_commute,
101
+ sliceProjection_scalar_commute 0,sliceProjection_zero_not_scalar⟩
102
+
103
+ lemma explicitDirectModel_polarFamily : PolarFamilyProperties explicitDirectModel shiftUnit polarDiagonal where
104
+ unitary := coordinateShift_star 1
105
+ unitary_coordinates := coordinateShift_ae 1
106
+ modulus := polar_modulus.symm
107
+ polar := forward_polar_factor
108
+ injective := polarDiagonal_injective
109
+ dense_range := polarDiagonal_denseRange
110
+ conjugates n := by
111
+ rw [shiftUnit_zpow,shiftUnit_zpow]
112
+ exact (polarDiagonal_conjugate n).symm
113
+ diagonal := polarDiagonal_ae
114
+ finite_atomic := finitePolarAlgebra_atomic
115
+ modulus_pure_point := polarDiagonal_purePoint
116
+ full_multiplication := polarAlgebra_mem_iff_productMultiplier
117
+ abelian := fun _ hT _ hR => polarAlgebra_commutative hT hR
118
+ diffuse := polarAlgebra_diffuse
119
+ not_contained_in_commutant := ⟨polarDiagonal 0,polarDiagonal_mem 0,polarDiagonal_not_commute⟩
120
+
121
+
122
+
123
+
124
+ theorem direct_model_complete : ∃ D : DirectModelData,
125
+ DirectModelProperties D ∧ OrdinaryStructuralProperties D ∧ PolarStructuralProperties D := by
126
+ exact ⟨explicitDirectModel,explicitDirectModel_properties,
127
+ explicitDirectModel_ordinary,shiftUnit,polarDiagonal,explicitDirectModel_polarFamily⟩
128
+
129
+
130
+ end
131
+ end BackwardIntertwiners
132
+
133
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/OperatorTransport.lean ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.HilbertClassification
2
+
3
+ namespace OAI
4
+
5
+ namespace Hyperinvariant233
6
+ open Filter
7
+ open scoped Topology
8
+ universe u v
9
+ variable {H : Type u} {K : Type v}
10
+ [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
11
+ [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
12
+
13
+ theorem norm_conjugate_le (e : H ≃ₗᵢ[ℂ] K) (T : H →L[ℂ] H) :
14
+ ‖e.conjStarAlgEquiv T‖ ≤ ‖T‖ := by
15
+ apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _)
16
+ intro x
17
+ change ‖e (T (e.symm x))‖ ≤ ‖T‖ * ‖x‖
18
+ rw [e.norm_map]
19
+ simpa only [e.symm.norm_map] using T.le_opNorm (e.symm x)
20
+
21
+ theorem norm_conjugate (e : H ≃ₗᵢ[ℂ] K) (T : H →L[ℂ] H) :
22
+ ‖e.conjStarAlgEquiv T‖ = ‖T‖ := by
23
+ apply le_antisymm (norm_conjugate_le e T)
24
+ have he : e.symm.conjStarAlgEquiv (e.conjStarAlgEquiv T) = T := by
25
+ ext x
26
+ simp only [LinearIsometryEquiv.conjStarAlgEquiv_apply_apply,
27
+ LinearIsometryEquiv.symm_symm, LinearIsometryEquiv.symm_apply_apply]
28
+ have h := norm_conjugate_le e.symm (e.conjStarAlgEquiv T)
29
+ rwa [he] at h
30
+
31
+
32
+ theorem transitiveCommutant_conjugate (e : H ≃ₗᵢ[ℂ] K) (T : H →L[ℂ] H)
33
+ (hT : TransitiveCommutant T) : TransitiveCommutant (e.conjStarAlgEquiv T) := by
34
+ intro W hW hInv
35
+ let U : Submodule ℂ H := W.comap e.toLinearMap
36
+ have hU : IsClosed (U : Set H) := hW.preimage e.continuous
37
+ have hUI : ∀ A : H →L[ℂ] H, A * T = T * A → ∀ x ∈ U, A x ∈ U := by
38
+ intro A hA x hx
39
+ change e (A x) ∈ W
40
+ have hc : e.conjStarAlgEquiv A * e.conjStarAlgEquiv T =
41
+ e.conjStarAlgEquiv T * e.conjStarAlgEquiv A := by
42
+ simpa only [map_mul] using congrArg e.conjStarAlgEquiv hA
43
+ have hm := hInv (e.conjStarAlgEquiv A) hc (e x) hx
44
+ simpa using hm
45
+ rcases hT U hU hUI with hz | ho
46
+ · left
47
+ apply le_antisymm _ bot_le
48
+ intro y hy
49
+ have hx : e.symm y ∈ U := by change e (e.symm y) ∈ W; simpa using hy
50
+ rw [hz] at hx
51
+ have hzero : e.symm y = 0 := hx
52
+ have := congrArg e hzero
53
+ simpa using this
54
+ · right
55
+ apply le_antisymm le_top
56
+ intro y _
57
+ have hx : e.symm y ∈ U := by rw [ho]; trivial
58
+ change e (e.symm y) ∈ W at hx
59
+ simpa using hx
60
+
61
+
62
+ theorem mainClaim_transport (e : H ≃ₗᵢ[ℂ] K) (h : MainClaim (H := H)) :
63
+ MainClaim (H := K) := by
64
+ obtain ⟨T, hT0, hq, ht⟩ := h
65
+ refine ⟨e.conjStarAlgEquiv T, ?_, ?_, transitiveCommutant_conjugate e T ht⟩
66
+ · exact fun hzero => hT0 (e.conjStarAlgEquiv.injective (by simpa using hzero))
67
+ · have he : (fun n : ℕ => ‖(e.conjStarAlgEquiv T) ^ n‖ ^ (1 / (n : ℝ))) =
68
+ (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) := by
69
+ funext n
70
+ rw [← map_pow, norm_conjugate]
71
+ rwa [he]
72
+
73
+ end Hyperinvariant233
74
+
75
+
76
+ namespace Hyperinvariant233
77
+ open Filter
78
+ open scoped Topology
79
+ universe u
80
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H]
81
+
82
+
83
+ theorem mem_commutant_iff (T A : H →L[ℂ] H) :
84
+ A ∈ commutant T ↔ A * T = T * A := by
85
+ simp only [commutant, Subalgebra.mem_centralizer_iff, Set.mem_singleton_iff, forall_eq]
86
+ exact eq_comm
87
+
88
+ variable [completeSpace : CompleteSpace H]
89
+
90
+
91
+
92
+ omit completeSpace in
93
+ theorem commutant_isClosed_strong [CompleteSpace H] (T : H →L[ℂ] H) :
94
+ @IsClosed (H →L[ℂ] H) strongOperatorTopology (commutant T : Set (H →L[ℂ] H)) := by
95
+ let : TopologicalSpace (H →L[ℂ] H) := strongOperatorTopology
96
+ have heval : ∀ x : H, Continuous (fun A : H →L[ℂ] H => A x) := by
97
+ intro x
98
+ exact (continuous_apply x).comp continuous_induced_dom
99
+ have hset : (commutant T : Set (H →L[ℂ] H)) =
100
+ ⋂ x : H, {A : H →L[ℂ] H | A (T x) = T (A x)} := by
101
+ ext A
102
+ simp only [Set.mem_iInter, Set.mem_ofPred_eq, SetLike.mem_coe, mem_commutant_iff]
103
+ constructor
104
+ · intro h x
105
+ exact congrArg (fun B : H →L[ℂ] H => B x) h
106
+ · intro h
107
+ ext x
108
+ exact h x
109
+ rw [hset]
110
+ exact isClosed_iInter (fun x => isClosed_eq (heval (T x)) (T.continuous.comp (heval x)))
111
+
112
+
113
+
114
+ omit completeSpace in
115
+ theorem scalar_of_commutant_top [CompleteSpace H] (T : H →L[ℂ] H) (h : commutant T = ⊤) :
116
+ ∃ c : ℂ, algebraMap ℂ (H →L[ℂ] H) c = T := by
117
+ have hc : T ∈ Subalgebra.center ℂ (H →L[ℂ] H) := by
118
+ rw [Subalgebra.mem_center_iff]
119
+ intro A
120
+ apply (mem_commutant_iff T A).mp
121
+ rw [h]
122
+ trivial
123
+ rw [Algebra.IsCentral.center_eq_bot] at hc
124
+ exact Algebra.mem_bot.mp hc
125
+
126
+
127
+
128
+ theorem commutant_ne_top_of_nonzero_quasinilpotent [Nontrivial H]
129
+ (T : H →L[ℂ] H) (hT : T ≠ 0)
130
+ (hlim : Tendsto (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) atTop (𝓝 0)) :
131
+ commutant T ≠ ⊤ := by
132
+ intro htop
133
+ obtain ⟨c, hc⟩ := scalar_of_commutant_top T htop
134
+ have hroot (n : ℕ) (hn : n ≠ 0) : ‖T ^ n‖ ^ (1 / (n : ℝ)) = ‖c‖ := by
135
+ rw [← hc, Algebra.algebraMap_eq_smul_one, smul_pow, one_pow,
136
+ norm_smul, norm_pow, norm_one, mul_one, one_div]
137
+ exact Real.pow_rpow_inv_natCast (norm_nonneg c) hn
138
+ have hevent : (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) =ᶠ[atTop]
139
+ (fun _ : ℕ => ‖c‖) := by
140
+ filter_upwards [eventually_gt_atTop 0] with n hn
141
+ exact hroot n (Nat.ne_of_gt hn)
142
+ have hconst : Tendsto (fun _ : ℕ => ‖c‖) atTop (𝓝 0) := hlim.congr' hevent
143
+ have hc0 : ‖c‖ = 0 := tendsto_nhds_unique tendsto_const_nhds hconst
144
+ apply hT
145
+ rw [← hc, norm_eq_zero.mp hc0, map_zero]
146
+
147
+
148
+ theorem fullClaim_of_mainClaim [Nontrivial H] (h : MainClaim (H := H)) :
149
+ FullClaim (H := H) := by
150
+ obtain ⟨T, hT, hlim, htrans⟩ := h
151
+ exact ⟨T, hT, hlim, htrans,
152
+ commutant_ne_top_of_nonzero_quasinilpotent T hT hlim,
153
+ commutant_isClosed_strong T⟩
154
+
155
+ end Hyperinvariant233
156
+
157
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/OrdinaryStructure.lean ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.ErgodicTransitivity
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+
14
+ def globalTail (h : ℤ) : Submodule ℂ GlobalHilbert :=
15
+ ⨅ j : ℤ, ⨅ _ : j < h, (coordinateL2 j).ker
16
+ lemma mem_globalTail (h : ℤ) (f : GlobalHilbert) :
17
+ f ∈ globalTail h ↔ ∀ᵐ x ∂baseMeasure, f x ∈ coordinateTail h := by
18
+ simp only [globalTail, Submodule.mem_iInf, LinearMap.mem_ker]
19
+ constructor
20
+ · intro hf
21
+ have h (j : ℤ) : ∀ᵐ x ∂baseMeasure, j < h → f x j = 0 := by
22
+ by_cases hj : j < h
23
+ · have hh := (Lp.eq_zero_iff_ae_eq_zero.mp (hf j hj))
24
+ filter_upwards [coordinateL2_ae j f, hh] with x hx hzero
25
+ intro _
26
+ exact hx.symm.trans hzero
27
+ · exact Filter.Eventually.of_forall fun _ => fun h => False.elim (hj h)
28
+ exact ae_all_iff.mpr h
29
+ · intro hf j hj
30
+ apply Lp.eq_zero_iff_ae_eq_zero.mpr
31
+ filter_upwards [hf, coordinateL2_ae j f] with x hx hcoord
32
+ exact hcoord.trans (hx j hj)
33
+ lemma globalTail_closed (h : ℤ) : IsClosed (globalTail h : Set GlobalHilbert) := by
34
+ have he : (globalTail h : Set GlobalHilbert) = ⋂ j : ℤ, ⋂ _ : j < h,
35
+ {f : GlobalHilbert | coordinateL2 j f = 0} := by ext; simp [globalTail]
36
+ rw [he]
37
+ exact isClosed_iInter fun j => isClosed_iInter fun _ =>
38
+ isClosed_eq (coordinateL2 j).continuous continuous_const
39
+ lemma constantBasis_mem_globalTail {h j : ℤ} (hj : h ≤ j) : constantBasis j ∈ globalTail h := by
40
+ rw [mem_globalTail]
41
+ filter_upwards [constantBasis_ae j] with x hx
42
+ rw [hx]
43
+ exact single_mem_coordinateTail hj 1
44
+ lemma constantBasis_not_mem_globalTail {h j : ℤ} (hj : j < h) : constantBasis j ∉ globalTail h := by
45
+ intro hm
46
+ have hh := (mem_globalTail h _).mp hm
47
+ have hz : ∀ᵐ x ∂baseMeasure, (1:ℂ) = 0 := by
48
+ filter_upwards [hh, constantBasis_ae j] with x hx he
49
+ simpa only [he, lp.single_apply_self] using hx j hj
50
+ exact one_ne_zero hz.exists.choose_spec
51
+ lemma globalTail_nonzero (h : ℤ) : globalTail h ≠ ⊥ := by
52
+ intro he
53
+ have hmem := constantBasis_mem_globalTail (le_refl h)
54
+ rw [he] at hmem
55
+ have hm : constantBasis h = 0 := hmem
56
+ have hn := constantBasis_norm h
57
+ rw [hm, norm_zero] at hn
58
+ norm_num at hn
59
+ lemma globalTail_proper (h : ℤ) : globalTail h ≠ ⊤ := by
60
+ intro he
61
+ apply constantBasis_not_mem_globalTail (show h-1<h by omega)
62
+ rw [he]; trivial
63
+ lemma globalTail_forward (h : ℤ) : OperatorInvariant (globalTail h) forwardOperator := by
64
+ intro f hf
65
+ rw [mem_globalTail] at hf ⊢
66
+ filter_upwards [hf, forwardOperator_ae f] with x hx he
67
+ rw [he]
68
+ exact forwardFiber_tail x h hx
69
+ lemma globalTail_not_backward (h : ℤ) : ¬OperatorInvariant (globalTail h) backwardOperator := by
70
+ intro hinv
71
+ have hm := (mem_globalTail h _).mp (hinv _ (constantBasis_mem_globalTail (le_refl h)))
72
+ have hgood := inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae.eventually ae_goodBase
73
+ have he := (constantBasis_ae h).comp_tendsto inverseOdometer_preserving.quasiMeasurePreserving.tendsto_ae
74
+ have hh : ∀ᵐ x ∂baseMeasure, False := by
75
+ filter_upwards [hm, backwardOperator_ae_inverse (constantBasis h), he, hgood] with x hx hV h₀ hg
76
+ dsimp only [Function.comp_def] at h₀
77
+ have hz := hx (h-1) (by omega)
78
+ rw [hV, backwardFiber_apply, sub_add_cancel, h₀, lp.single_apply_self, mul_one] at hz
79
+ exact (ne_of_gt (backwardCoeff_pos hg h)) (Complex.ofReal_eq_zero.mp hz)
80
+ exact hh.exists.choose_spec
81
+
82
+
83
+ def sliceProjection (j : ℤ) : GlobalHilbert →L[ℂ] GlobalHilbert :=
84
+ (singleL2 j).comp (coordinateL2 j)
85
+ lemma sliceProjection_ae (j : ℤ) (f : GlobalHilbert) :
86
+ sliceProjection j f =ᵐ[baseMeasure] fun x => lp.single 2 j (f x j) := by
87
+ filter_upwards [singleL2_ae j (coordinateL2 j f), coordinateL2_ae j f] with x h₁ h₂
88
+ change singleL2 j (coordinateL2 j f) x = _
89
+ rw [h₁, h₂]
90
+ lemma sliceProjection_singleL2 (j : ℤ) (f : ScalarHilbert) :
91
+ sliceProjection j (singleL2 j f) = singleL2 j f := by
92
+ change singleL2 j (coordinateL2 j (singleL2 j f)) = _
93
+ rw [coordinateL2_singleL2]
94
+ lemma sliceProjection_idempotent (j : ℤ) : sliceProjection j * sliceProjection j = sliceProjection j := by
95
+ ext1 f
96
+ exact sliceProjection_singleL2 j (coordinateL2 j f)
97
+ lemma sliceProjection_constantBasis (j k : ℤ) :
98
+ sliceProjection j (constantBasis k) = if j=k then constantBasis k else 0 := by
99
+ classical
100
+ apply Lp.ext
101
+ filter_upwards [sliceProjection_ae j (constantBasis k), constantBasis_ae k,
102
+ Lp.coeFn_zero (E:=Fiber) (p:=2) (μ:=baseMeasure)] with x hx he hz
103
+ rw [hx, he]
104
+ by_cases hh : j=k
105
+ · simp [hh, he]
106
+ · simp only [ite_eq_right hh, lp.single_apply_ne _ _ _ hh, lp.single_zero, hz, Pi.zero_apply]
107
+ lemma sliceProjection_scalar_commute (j : ℤ) (g : Lp ℂ ∞ baseMeasure) :
108
+ sliceProjection j * scalarMultiplier g = scalarMultiplier g * sliceProjection j := by
109
+ ext1 f
110
+ apply Lp.ext
111
+ filter_upwards [sliceProjection_ae j (scalarMultiplier g f), scalarMultiplier_ae g f,
112
+ scalarMultiplier_ae g (sliceProjection j f), sliceProjection_ae j f] with x h₁ h₂ h₃ h₄
113
+ change sliceProjection j (scalarMultiplier g f) x = scalarMultiplier g (sliceProjection j f) x
114
+ rw [h₁,h₂,h₃,h₄]
115
+ exact lp.single_smul (E:=fun _ : ℤ => ℂ) 2 j (g x) (f x j)
116
+ lemma sliceProjection_zero_not_commute :
117
+ sliceProjection 0 * forwardOperator ≠ forwardOperator * sliceProjection 0 := by
118
+ intro he
119
+ have h := congrArg (fun T : GlobalHilbert →L[ℂ] GlobalHilbert => T (constantBasis 0)) he
120
+ simp only [mul_apply_eq_comp, forwardOperator_constantBasis_zero, map_smul,
121
+ sliceProjection_constantBasis] at h
122
+ norm_num at h
123
+ have hh := congrArg norm h
124
+ rw [norm_zero, forwardOperator_constantBasis_zero, norm_smul, constantBasis_norm, mul_one, Complex.norm_real,
125
+ Real.norm_of_nonneg (Real.exp_pos _).le] at hh
126
+ exact (Real.exp_ne_zero (-10)) hh.symm
127
+ lemma sliceProjection_zero_not_scalar :
128
+ sliceProjection 0 ∉ Set.range (scalarMultiplier (μ:=baseMeasure)) := by
129
+ rintro ⟨g,hg⟩
130
+ have he0 : scalarMultiplier g (constantBasis 0) = constantBasis 0 := by
131
+ rw [hg, sliceProjection_constantBasis]; simp
132
+ have he1 : scalarMultiplier g (constantBasis 1) = 0 := by
133
+ rw [hg, sliceProjection_constantBasis]; norm_num
134
+ have h₀ := scalarMultiplier_ae g (constantBasis 0)
135
+ have h₁ := scalarMultiplier_ae g (constantBasis 1)
136
+ rw [he0] at h₀
137
+ rw [he1] at h₁
138
+ have hfalse : ∀ᵐ x ∂baseMeasure, False := by
139
+ filter_upwards [h₀,h₁,constantBasis_ae 0, constantBasis_ae 1,
140
+ Lp.coeFn_zero (E:=Fiber) (p:=2) (μ:=baseMeasure)] with x hv₀ hv₁ he₀ he₁ hz
141
+ have hc₀ := congrArg (fun v : Fiber => v 0) hv₀
142
+ have hc₁ := congrArg (fun v : Fiber => v 1) hv₁
143
+ simp only [he₀, lp.single_apply_self, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, mul_one] at hc₀
144
+ simp only [hz, he₁, lp.single_apply_self, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, mul_one, lp.coeFn_zero, Pi.zero_apply] at hc₁
145
+ exact one_ne_zero (hc₀.trans hc₁.symm)
146
+ exact hfalse.exists.choose_spec
147
+
148
+ lemma residue_separates {x y : Base} (h : ∀ m : ℕ, residue m x = residue m y) : x = y := by
149
+ apply PadicInt.ext_of_toZModPow.mp
150
+ intro m
151
+ apply ZMod.val_injective
152
+ exact h m
153
+
154
+ def residueClass (m t : ℕ) : Set Base := {x | residue m x = t}
155
+ lemma measurableSet_residueClass (m t : ℕ) : MeasurableSet (residueClass m t) :=
156
+ measurableSet_eq_fun (measurable_residue m) measurable_const
157
+ lemma residueClass_nonnull {m t : ℕ} (ht : t < 2^m) : baseMeasure (residueClass m t) ≠ 0 := by
158
+ change baseHaar {x : PadicInt 2 | twoResidue m x = t} ≠ 0
159
+ have hcont : Continuous (twoResidue m) :=
160
+ continuous_of_discreteTopology.comp (continuous_twoResidue m)
161
+ have hOpen : IsOpen {x : PadicInt 2 | twoResidue m x = t} :=
162
+ (isOpen_discrete ({t}:Set ℕ)).preimage hcont
163
+ have hmem : twoResidue m (t : PadicInt 2) = t := by
164
+ simp only [twoResidue, map_natCast]
165
+ exact ZMod.val_natCast_of_lt ht
166
+ exact (hOpen.measure_pos baseHaar ⟨(t : PadicInt 2),hmem⟩).ne'
167
+
168
+
169
+ def residueIndicator (m t : ℕ) : ScalarHilbert :=
170
+ indicatorConstLp 2 (measurableSet_residueClass m t) (measure_ne_top baseMeasure _) (1:ℂ)
171
+ lemma residueIndicator_ae (m t : ℕ) : residueIndicator m t =ᵐ[baseMeasure]
172
+ (residueClass m t).indicator (fun _ => (1:ℂ)) := indicatorConstLp_coeFn
173
+ lemma residueIndicator_ne_zero {m t : ℕ} (ht : t < 2^m) : residueIndicator m t ≠ 0 := by
174
+ intro hz
175
+ apply residueClass_nonnull ht
176
+ rw [measure_eq_zero_iff_ae_notMem]
177
+ have he := Lp.eq_zero_iff_ae_eq_zero.mp hz
178
+ filter_upwards [he,residueIndicator_ae m t] with x hx hi
179
+ intro hmem
180
+ have h10 : (1:ℂ)=0 := by rw [← Set.indicator_of_mem hmem (fun _ => (1:ℂ)), ← hi]; exact hx
181
+ exact one_ne_zero h10
182
+ lemma residueIndicator_orthogonal (m : ℕ) {s t : ℕ} (hst : s ≠ t) :
183
+ inner ℂ (residueIndicator m s) (residueIndicator m t) = 0 := by
184
+ rw [L2.inner_def]
185
+ apply integral_eq_zero_of_ae
186
+ filter_upwards [residueIndicator_ae m s, residueIndicator_ae m t] with x hs ht
187
+ rw [hs,ht]
188
+ by_cases hxs : x ∈ residueClass m s
189
+ · have hxt : x ∉ residueClass m t := fun hx => hst (hxs.symm.trans hx)
190
+ simp [Set.indicator_of_notMem hxt]
191
+ · simp [Set.indicator_of_notMem hxs]
192
+ lemma residueIndicator_independent (m : ℕ) :
193
+ LinearIndependent ℂ (fun t : Fin (2^m) => residueIndicator m t) := by
194
+ apply linearIndependent_of_ne_zero_of_inner_eq_zero
195
+ · intro t; exact residueIndicator_ne_zero t.isLt
196
+ · intro s t hst
197
+ exact residueIndicator_orthogonal m (fun he => hst (Fin.ext he))
198
+ lemma scalarHilbert_infinite : ¬FiniteDimensional ℂ ScalarHilbert := by
199
+ intro hfin
200
+ let := hfin
201
+ have hh := (residueIndicator_independent (Module.finrank ℂ ScalarHilbert + 1)).fintype_card_le_finrank
202
+ simp only [Fintype.card_fin] at hh
203
+ have hlt := Nat.lt_two_pow_self (n:=Module.finrank ℂ ScalarHilbert + 1)
204
+ omega
205
+
206
+ lemma forwardOperator_singleL2_zero (f : ScalarHilbert) :
207
+ forwardOperator (singleL2 0 f) = (Real.exp (-10):ℂ) • singleL2 1 f := by
208
+ apply Lp.ext
209
+ filter_upwards [forwardOperator_ae (singleL2 0 f), singleL2_ae 0 f, singleL2_ae 1 f,
210
+ Lp.coeFn_smul (Real.exp (-10):ℂ) (singleL2 1 f)] with x h₁ h₂ h₃ h₄
211
+ rw [h₁,h₂,h₄,Pi.smul_apply,h₃,forwardFiber_single,explicitBeta_zero]
212
+ exact lp.single_smul (E:=fun _ : ℤ => ℂ) 2 1 (Real.exp (-10):ℂ) (f x)
213
+ lemma coordinate_forward_single :
214
+ (coordinateL2 1).comp (forwardOperator.comp (singleL2 0)) =
215
+ (Real.exp (-10):ℂ) • (1 : ScalarHilbert →L[ℂ] ScalarHilbert) := by
216
+ ext1 f
217
+ change coordinateL2 1 (forwardOperator (singleL2 0 f)) = (Real.exp (-10):ℂ) • f
218
+ rw [forwardOperator_singleL2_zero, map_smul, coordinateL2_singleL2]
219
+ lemma forwardOperator_not_compact : ¬IsCompactOperator forwardOperator := by
220
+ intro hcomp
221
+ have hc : IsCompactOperator ((coordinateL2 1).comp (forwardOperator.comp (singleL2 0))) :=
222
+ (hcomp.comp_clm (singleL2 0)).clm_comp (coordinateL2 1)
223
+ rw [coordinate_forward_single] at hc
224
+ have he : (Real.exp (-10):ℂ) ≠ 0 := by exact_mod_cast Real.exp_ne_zero (-10)
225
+ have hid : IsCompactOperator (id : ScalarHilbert → ScalarHilbert) :=
226
+ (IsCompactOperator.smul_iff₀ he).mp hc
227
+ exact scalarHilbert_infinite (FiniteDimensional.of_isCompactOperator_id hid)
228
+ lemma globalHilbert_infinite : ¬FiniteDimensional ℂ GlobalHilbert := by
229
+ intro hfin
230
+ let := hfin
231
+ apply scalarHilbert_infinite
232
+ apply FiniteDimensional.of_injective (singleL2 0).toLinearMap
233
+ intro f g he
234
+ have he' : singleL2 0 f = singleL2 0 g := he
235
+ simpa only [coordinateL2_singleL2] using congrArg (coordinateL2 0) he'
236
+
237
+ lemma sliceProjection_selfAdjoint (j : ℤ) : IsSelfAdjoint (sliceProjection j) := by
238
+ apply ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr
239
+ intro f g
240
+ change inner ℂ (sliceProjection j f) g = inner ℂ f (sliceProjection j g)
241
+ simp only [L2.inner_def]
242
+ apply integral_congr_ae
243
+ filter_upwards [sliceProjection_ae j f, sliceProjection_ae j g] with x hf hg
244
+ rw [hf,hg,lp.inner_single_left,lp.inner_single_right]
245
+ lemma sliceProjection_isStarProjection (j : ℤ) : IsStarProjection (sliceProjection j) :=
246
+ ⟨sliceProjection_idempotent j, sliceProjection_selfAdjoint j⟩
247
+
248
+
249
+
250
+ end
251
+ end BackwardIntertwiners
252
+
253
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/PolarDiagonals.lean ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.StrongClosure
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ universe u
16
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
17
+
18
+
19
+ def betaSymbol (n : ℤ) : DiagonalSymbol :=
20
+ ⟨fun x j => (explicitBeta x (j+n):ℂ),
21
+ ⟨fun j => Complex.continuous_ofReal.measurable.comp (measurable_explicitBeta (j+n)),
22
+ Real.exp (-10), (Real.exp_pos _).le, fun x j => by
23
+ simpa only [Complex.norm_real,Real.norm_of_nonneg (explicitBeta_pos _ _).le] using explicitBeta_le x (j+n)⟩⟩
24
+ @[simp] lemma betaSymbol_apply (n : ℤ) (x : Base) (j : ℤ) :
25
+ betaSymbol n x j = (explicitBeta x (j+n):ℂ) := rfl
26
+ lemma betaSymbol_star (n : ℤ) : star (betaSymbol n) = betaSymbol n := by
27
+ apply Subtype.ext
28
+ funext x j
29
+ simp
30
+
31
+ def polarDiagonal (n : ℤ) : GlobalHilbert →L[ℂ] GlobalHilbert := diagonalOperator (betaSymbol n)
32
+ lemma polarDiagonal_ae (n : ℤ) (f : GlobalHilbert) :
33
+ ∀ᵐ x ∂baseMeasure, ∀ j, polarDiagonal n f x j = (explicitBeta x (j+n):ℂ)*f x j :=
34
+ diagonalOperator_coord _ _
35
+ lemma polarDiagonal_selfAdjoint (n : ℤ) : IsSelfAdjoint (polarDiagonal n) := by
36
+ change star (diagonalOperator (betaSymbol n)) = diagonalOperator (betaSymbol n)
37
+ rw [←diagonalOperator_star,betaSymbol_star]
38
+ lemma polarDiagonal_commute (m n : ℤ) : polarDiagonal m * polarDiagonal n = polarDiagonal n * polarDiagonal m := by
39
+ change diagonalRepresentation (betaSymbol m) * diagonalRepresentation (betaSymbol n) = diagonalRepresentation (betaSymbol n) * diagonalRepresentation (betaSymbol m)
40
+ rw [←map_mul,mul_comm,map_mul]
41
+
42
+
43
+
44
+ def projectionSymbol (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) : DiagonalSymbol :=
45
+ ⟨fun x j => (E j).indicator (fun _ => (1:ℂ)) x,
46
+ ⟨fun j => measurable_const.indicator (hE j), 1, zero_le_one, fun x j => by
47
+ by_cases hx : x ∈ E j <;> simp [hx]⟩⟩
48
+ @[simp] lemma projectionSymbol_apply (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j))
49
+ (x : Base) (j : ℤ) : projectionSymbol E hE x j = if x ∈ E j then 1 else 0 := rfl
50
+ lemma projectionSymbol_norm_le (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j))
51
+ (x : Base) (j : ℤ) : ‖projectionSymbol E hE x j‖ ≤ 1 := by
52
+ by_cases hx : x ∈ E j <;> simp [hx]
53
+ lemma projectionSymbol_star (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) :
54
+ star (projectionSymbol E hE) = projectionSymbol E hE := by
55
+ apply Subtype.ext
56
+ funext x j
57
+ change star (projectionSymbol E hE x j) = projectionSymbol E hE x j
58
+ by_cases hx : x ∈ E j <;> simp [hx]
59
+ lemma projectionSymbol_idempotent (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) :
60
+ projectionSymbol E hE * projectionSymbol E hE = projectionSymbol E hE := by
61
+ apply Subtype.ext
62
+ funext x j
63
+ change projectionSymbol E hE x j * projectionSymbol E hE x j = projectionSymbol E hE x j
64
+ by_cases hx : x ∈ E j <;> simp [hx]
65
+
66
+ def diagonalProjection (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) : GlobalHilbert →L[ℂ] GlobalHilbert :=
67
+ diagonalOperator (projectionSymbol E hE)
68
+ lemma diagonalProjection_ae (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) (f : GlobalHilbert) :
69
+ ∀ᵐ x ∂baseMeasure, ∀ j, diagonalProjection E hE f x j = if x ∈ E j then f x j else 0 := by
70
+ filter_upwards [diagonalOperator_coord (projectionSymbol E hE) f] with x hx j
71
+ change diagonalOperator (projectionSymbol E hE) f x j = _
72
+ rw [hx,projectionSymbol_apply]
73
+ split_ifs <;> simp
74
+ lemma diagonalProjection_isStarProjection (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) :
75
+ IsStarProjection (diagonalProjection E hE) := by
76
+ constructor
77
+ · change diagonalOperator (projectionSymbol E hE) * diagonalOperator (projectionSymbol E hE) = _
78
+ rw [←diagonalOperator_mul,projectionSymbol_idempotent]
79
+ rfl
80
+ · change star (diagonalOperator (projectionSymbol E hE)) = diagonalOperator (projectionSymbol E hE)
81
+ rw [←diagonalOperator_star,projectionSymbol_star]
82
+ lemma diagonalProjection_mul (E F : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j))
83
+ (hF : ∀ j, MeasurableSet (F j)) :
84
+ diagonalProjection E hE * diagonalProjection F hF =
85
+ diagonalProjection (fun j => E j ∩ F j) (fun j => (hE j).inter (hF j)) := by
86
+ change diagonalOperator _ * diagonalOperator _ = diagonalOperator _
87
+ rw [←diagonalOperator_mul]
88
+ congr 1
89
+ apply Subtype.ext
90
+ funext x j
91
+ change projectionSymbol E hE x j * projectionSymbol F hF x j = projectionSymbol _ _ x j
92
+ by_cases hx : x ∈ E j <;> by_cases hy : x ∈ F j <;> simp [hx,hy]
93
+ lemma diagonalProjection_compl (E : ℤ → Set Base) (hE : ∀ j, MeasurableSet (E j)) :
94
+ diagonalProjection (fun j => (E j)ᶜ) (fun j => (hE j).compl) = 1-diagonalProjection E hE := by
95
+ change diagonalRepresentation _ = 1-diagonalRepresentation _
96
+ rw [←map_one diagonalRepresentation,←map_sub]
97
+ congr 1
98
+ apply Subtype.ext
99
+ funext x j
100
+ change projectionSymbol _ _ x j = 1-projectionSymbol E hE x j
101
+ by_cases hx : x ∈ E j <;> simp [hx]
102
+ lemma diagonalProjection_empty : diagonalProjection (fun _ => ∅) (fun _ => MeasurableSet.empty) = 0 := by
103
+ have h : projectionSymbol (fun _ => ∅) (fun _ => MeasurableSet.empty) = 0 := by
104
+ apply Subtype.ext; funext x j; simp
105
+ exact congrArg diagonalOperator h |>.trans diagonalOperator_zero
106
+ lemma diagonalProjection_univ : diagonalProjection (fun _ => Set.univ) (fun _ => MeasurableSet.univ) = 1 := by
107
+ have h : projectionSymbol (fun _ => Set.univ) (fun _ => MeasurableSet.univ) = 1 := by
108
+ apply Subtype.ext; funext x j; simp
109
+ exact congrArg diagonalOperator h |>.trans diagonalOperator_one
110
+ lemma diagonalProjection_ext {E F : ℤ → Set Base} {hE : ∀ j, MeasurableSet (E j)}
111
+ {hF : ∀ j, MeasurableSet (F j)} (h : ∀ j, E j =ᵐ[baseMeasure] F j) :
112
+ diagonalProjection E hE = diagonalProjection F hF := by
113
+ ext1 f
114
+ apply Lp.ext
115
+ filter_upwards [diagonalProjection_ae E hE f,diagonalProjection_ae F hF f,
116
+ ae_all_iff.mpr h] with x hx hy he
117
+ ext j
118
+ rw [hx,hy]
119
+ have hh : (x ∈ E j) = (x ∈ F j) := he j
120
+ simp only [hh]
121
+ lemma diagonalProjection_nonzero {E : ℤ → Set Base} {hE : ∀ j, MeasurableSet (E j)}
122
+ (j : ℤ) (hj : baseMeasure (E j) ≠ 0) : diagonalProjection E hE ≠ 0 := by
123
+ intro he
124
+ apply hj
125
+ apply measure_eq_zero_iff_ae_notMem.mpr
126
+ filter_upwards [diagonalProjection_ae E hE (constantBasis j),constantBasis_ae j,
127
+ Lp.coeFn_zero Fiber 2 baseMeasure] with x hx hb hz
128
+ intro hxE
129
+ have h := hx j
130
+ rw [he] at h
131
+ change (0 : GlobalHilbert) x j = _ at h
132
+ rw [hz,hb] at h
133
+ simp [hxE] at h
134
+
135
+
136
+ lemma explicitBeta_le_one (x : Base) (j : ℤ) : explicitBeta x j ≤ 1 :=
137
+ (explicitBeta_le x j).trans (Real.exp_le_one_iff.mpr (by norm_num))
138
+
139
+ def levelProjection (n : ℤ) (t : ℝ) : GlobalHilbert →L[ℂ] GlobalHilbert :=
140
+ diagonalProjection (fun j => {x | explicitBeta x (j+n) = t})
141
+ (fun j => measurableSet_eq_fun (measurable_explicitBeta (j+n)) measurable_const)
142
+
143
+ lemma peak_nonneg {b t : ℝ} (hb₀ : 0 ≤ b) (hb₁ : b ≤ 1) (ht₀ : 0 ≤ t) (ht₁ : t ≤ 1) :
144
+ 0 ≤ 1-(b-t)^2 := by
145
+ have h₁ : 0 ≤ (1-(b-t))*(1+(b-t)) := mul_nonneg (by linarith) (by linarith)
146
+ nlinarith
147
+ lemma peak_le_one (b t : ℝ) : 1-(b-t)^2 ≤ 1 := by nlinarith [sq_nonneg (b-t)]
148
+ lemma peak_lt_one {b t : ℝ} (h : b ≠ t) : 1-(b-t)^2 < 1 := by
149
+ have h' : 0 < (b-t)^2 := sq_pos_of_ne_zero (sub_ne_zero.mpr h)
150
+ linarith
151
+
152
+ def peakSymbol (n : ℤ) (t : ℝ) : DiagonalSymbol := 1-(betaSymbol n - (t:ℂ) • 1)^2
153
+ @[simp] lemma peakSymbol_apply (n : ℤ) (t : ℝ) (x : Base) (j : ℤ) :
154
+ peakSymbol n t x j = ((1-(explicitBeta x (j+n)-t)^2:ℝ):ℂ) := by
155
+ simp [peakSymbol,Complex.ofReal_sub,Complex.ofReal_pow]
156
+ lemma peakSymbol_bound (n : ℤ) {t : ℝ} (ht₀ : 0 ≤ t) (ht₁ : t ≤ 1) (x : Base) (j : ℤ) :
157
+ ‖peakSymbol n t x j‖ ≤ 1 := by
158
+ rw [peakSymbol_apply,Complex.norm_real,Real.norm_of_nonneg
159
+ (peak_nonneg (explicitBeta_pos _ _).le (explicitBeta_le_one _ _) ht₀ ht₁)]
160
+ exact peak_le_one _ _
161
+ lemma peakSymbol_powers_tendsto (n : ℤ) {t : ℝ} (ht₀ : 0 ≤ t) (ht₁ : t ≤ 1)
162
+ (x : Base) (j : ℤ) :
163
+ Tendsto (fun k : ℕ => (peakSymbol n t ^k) x j) atTop
164
+ (𝓝 (if explicitBeta x (j+n)=t then (1:ℂ) else 0)) := by
165
+ simp only [DiagonalSymbol.pow_apply,peakSymbol_apply]
166
+ by_cases he : explicitBeta x (j+n)=t
167
+ · simp [he]
168
+ · simp only [he,↓reduceIte]
169
+ apply tendsto_pow_atTop_nhds_zero_of_norm_lt_one
170
+ rw [Complex.norm_real,Real.norm_of_nonneg
171
+ (peak_nonneg (explicitBeta_pos _ _).le (explicitBeta_le_one _ _) ht₀ ht₁)]
172
+ exact peak_lt_one he
173
+ lemma levelProjection_mem {A : StarSubalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert)}
174
+ (hA : StronglyClosed A) (n : ℤ) {t : ℝ} (ht₀ : 0 ≤ t) (ht₁ : t ≤ 1)
175
+ (hn : polarDiagonal n ∈ A) : levelProjection n t ∈ A := by
176
+ have hq : diagonalOperator (peakSymbol n t) ∈ A := by
177
+ change diagonalRepresentation (1-(betaSymbol n - (t:ℂ) • 1)^2) ∈ A
178
+ rw [map_sub,map_one,map_pow,map_sub,map_smul,map_one]
179
+ exact A.sub_mem A.one_mem (A.pow_mem (A.sub_mem hn (A.smul_mem A.one_mem _)) _)
180
+ apply hA.mem_of_tendsto (l:=atTop) (T:=fun k : ℕ => diagonalOperator (peakSymbol n t ^k))
181
+ · exact Eventually.of_forall fun k => by
182
+ change diagonalRepresentation (peakSymbol n t ^k) ∈ A
183
+ rw [map_pow]
184
+ exact A.pow_mem hq _
185
+ · intro f
186
+ apply diagonalOperator_tendsto (C:=1) _ _ zero_le_one
187
+ · intro k x j
188
+ rw [DiagonalSymbol.pow_apply,norm_pow]
189
+ exact pow_le_one₀ (norm_nonneg _) (peakSymbol_bound n ht₀ ht₁ x j)
190
+ · exact projectionSymbol_norm_le _ _
191
+ · exact Eventually.of_forall fun x j => by
192
+ simpa using peakSymbol_powers_tendsto n ht₀ ht₁ x j
193
+
194
+
195
+
196
+ def baseProjection (E : Set Base) (hE : MeasurableSet E) : GlobalHilbert →L[ℂ] GlobalHilbert :=
197
+ diagonalProjection (fun _ => E) (fun _ => hE)
198
+ lemma baseProjection_ae (E : Set Base) (hE : MeasurableSet E) (f : GlobalHilbert) :
199
+ baseProjection E hE f =ᵐ[baseMeasure] E.indicator f := by
200
+ filter_upwards [diagonalProjection_ae (fun _ => E) (fun _ => hE) f] with x hx
201
+ ext j
202
+ by_cases he : x ∈ E <;> simpa [baseProjection,he] using hx j
203
+ lemma baseProjection_mem_full (E : Set Base) (hE : MeasurableSet E) :
204
+ baseProjection E hE ∈ fullMultiplierAlgebra := ⟨projectionSymbol _ _,rfl⟩
205
+ lemma diagonal_commute (a b : DiagonalSymbol) :
206
+ diagonalOperator a * diagonalOperator b = diagonalOperator b * diagonalOperator a := by
207
+ rw [←diagonalOperator_mul,←diagonalOperator_mul,mul_comm]
208
+ lemma fullMultiplier_commute {A B : GlobalHilbert →L[ℂ] GlobalHilbert}
209
+ (hA : A ∈ fullMultiplierAlgebra) (hB : B ∈ fullMultiplierAlgebra) : A*B=B*A := by
210
+ obtain ⟨a,rfl⟩ := hA
211
+ obtain ⟨b,rfl⟩ := hB
212
+ exact diagonal_commute a b
213
+ lemma baseProjection_constant (E : Set Base) (hE : MeasurableSet E) (v : Fiber) :
214
+ baseProjection E hE (Lp.const 2 baseMeasure v) =
215
+ indicatorConstLp 2 hE (measure_ne_top baseMeasure E) v := by
216
+ apply Lp.ext
217
+ filter_upwards [baseProjection_ae E hE (Lp.const 2 baseMeasure v),Lp.coeFn_const 2 baseMeasure v,
218
+ (indicatorConstLp_coeFn (p:=2) (hs:=hE) (hμs:=measure_ne_top baseMeasure E) (c:=v))] with x hx hv hi
219
+ rw [hx,hi]
220
+ by_cases he : x ∈ E <;> simp [he]
221
+ lemma L2_norm_sq (f : GlobalHilbert) : ‖f‖^2 = ∫ x, ‖f x‖^2 ∂baseMeasure := by
222
+ rw [L2_norm_eq_sqrt,Real.sq_sqrt (integral_nonneg fun _ => sq_nonneg _)]
223
+ lemma baseProjection_norm_sq (E : Set Base) (hE : MeasurableSet E) (f : GlobalHilbert) :
224
+ ‖baseProjection E hE f‖^2 = ∫ x in E, ‖f x‖^2 ∂baseMeasure := by
225
+ rw [L2_norm_sq,←integral_indicator hE]
226
+ apply integral_congr_ae
227
+ filter_upwards [baseProjection_ae E hE f] with x hx
228
+ rw [hx]
229
+ by_cases he : x ∈ E <;> simp [he]
230
+ lemma local_operator_energy_bound (T : GlobalHilbert →L[ℂ] GlobalHilbert)
231
+ (hT : ∀ E (hE : MeasurableSet E), baseProjection E hE * T = T * baseProjection E hE)
232
+ (f : GlobalHilbert) : ∀ᵐ x ∂baseMeasure, ‖T f x‖^2 ≤ ‖T‖^2 * ‖f x‖^2 := by
233
+ have hI (g : GlobalHilbert) : Integrable (fun x : Base => ‖g x‖^2) baseMeasure :=
234
+ (Lp.memLp g).integrable_norm_pow (by norm_num : (2:ℕ) ≠ 0)
235
+ apply ae_le_of_forall_setIntegral_le (μ:=baseMeasure) (hI (T f)) ((hI f).const_mul (‖T‖^2))
236
+ intro E hE _
237
+ rw [←baseProjection_norm_sq E hE,integral_const_mul,←baseProjection_norm_sq E hE]
238
+ have he : baseProjection E hE (T f) = T (baseProjection E hE f) := DFunLike.congr_fun (hT E hE) f
239
+ rw [he]
240
+ simpa only [mul_pow] using pow_le_pow_left₀ (norm_nonneg _) (T.le_opNorm (baseProjection E hE f)) 2
241
+
242
+ lemma sliceProjection_diagonal (j : ℤ) : sliceProjection j =
243
+ diagonalProjection (fun k => if k=j then Set.univ else ∅)
244
+ (fun k => by split_ifs <;> measurability) := by
245
+ ext1 f
246
+ apply Lp.ext
247
+ filter_upwards [sliceProjection_ae j f,diagonalProjection_ae (fun k => if k=j then Set.univ else ∅)
248
+ (fun k => by split_ifs <;> measurability) f] with x hx hy
249
+ ext k
250
+ rw [hx,hy]
251
+ by_cases he : k=j <;> simp [he,lp.single_apply]
252
+ lemma sliceProjection_mem_full (j : ℤ) : sliceProjection j ∈ fullMultiplierAlgebra := by
253
+ rw [sliceProjection_diagonal]
254
+ exact ⟨projectionSymbol _ _,rfl⟩
255
+
256
+
257
+ def columnSymbol (T : GlobalHilbert →L[ℂ] GlobalHilbert) : DiagonalSymbol :=
258
+ ⟨fun x j => if ‖T (constantBasis j) x j‖ ≤ ‖T‖ then T (constantBasis j) x j else 0,
259
+ ⟨fun j => by
260
+ have hm : Measurable (fun x => T (constantBasis j) x j) :=
261
+ ((lp.evalCLM ℂ (fun _ : ℤ => ℂ) 2 j).continuous.comp_stronglyMeasurable
262
+ (Lp.stronglyMeasurable (T (constantBasis j)))).measurable
263
+ exact hm.ite (measurableSet_le hm.norm measurable_const) measurable_const,
264
+ ‖T‖,norm_nonneg T,fun x j => by dsimp only; split_ifs with h <;> simp_all⟩⟩
265
+ lemma columnSymbol_ae (T : GlobalHilbert →L[ℂ] GlobalHilbert)
266
+ (hT : ∀ E (hE : MeasurableSet E), baseProjection E hE * T = T * baseProjection E hE)
267
+ (j : ℤ) : ∀ᵐ x ∂baseMeasure, columnSymbol T x j = T (constantBasis j) x j := by
268
+ filter_upwards [local_operator_energy_bound T hT (constantBasis j),constantBasis_ae j] with x hx hj
269
+ have hh : ‖T (constantBasis j) x‖ ≤ ‖T‖ := by
270
+ have h₁ : ‖constantBasis j x‖=1 := by rw [hj]; simp
271
+ rw [h₁] at hx
272
+ nlinarith [norm_nonneg (T (constantBasis j) x),norm_nonneg T]
273
+ have hc : ‖T (constantBasis j) x j‖ ≤ ‖T‖ := (lp.norm_apply_le_norm (by norm_num : (2:ENNReal) ≠ 0) _ j).trans hh
274
+ exact ite_eq_left hc
275
+
276
+ lemma columnSymbol_basis (T : GlobalHilbert →L[ℂ] GlobalHilbert)
277
+ (hT : ∀ E (hE : MeasurableSet E), baseProjection E hE * T = T * baseProjection E hE)
278
+ (hS : ∀ j, sliceProjection j * T = T * sliceProjection j) (j : ℤ) :
279
+ diagonalOperator (columnSymbol T) (constantBasis j) = T (constantBasis j) := by
280
+ have he : sliceProjection j (T (constantBasis j)) = T (constantBasis j) := by
281
+ rw [show sliceProjection j (T (constantBasis j)) = T (sliceProjection j (constantBasis j)) from DFunLike.congr_fun (hS j) _]
282
+ simp [sliceProjection_constantBasis]
283
+ apply Lp.ext
284
+ filter_upwards [diagonalOperator_coord (columnSymbol T) (constantBasis j),constantBasis_ae j,
285
+ columnSymbol_ae T hT j,sliceProjection_ae j (T (constantBasis j))] with x hx hj hc hs
286
+ rw [he] at hs
287
+ ext k
288
+ rw [hx,hj,hs]
289
+ by_cases hk : k=j
290
+ · subst k; simp [hc]
291
+ · simp [lp.single_apply,hk]
292
+
293
+ lemma operators_equal_of_constantBasis {T D : GlobalHilbert →L[ℂ] GlobalHilbert}
294
+ (hc : ∀ j, T (constantBasis j)=D (constantBasis j))
295
+ (hT : ∀ E (hE : MeasurableSet E), baseProjection E hE*T=T*baseProjection E hE)
296
+ (hD : ∀ E (hE : MeasurableSet E), baseProjection E hE*D=D*baseProjection E hE) : T=D := by
297
+ have hconst (v : Fiber) : T (Lp.const 2 baseMeasure v)=D (Lp.const 2 baseMeasure v) := by
298
+ let L := (Lp.constL 2 baseMeasure ℂ : Fiber →L[ℂ] GlobalHilbert)
299
+ have h₁ := (lp.hasSum_single (by norm_num : (2:ENNReal) ≠ ∞) v).map (T.comp L).toAddMonoidHom (T.comp L).continuous
300
+ have h₂ := (lp.hasSum_single (by norm_num : (2:ENNReal) ≠ ∞) v).map (D.comp L).toAddMonoidHom (D.comp L).continuous
301
+ have hh (j : ℤ) : (T.comp L) (lp.single 2 j (v j)) = (D.comp L) (lp.single 2 j (v j)) := by
302
+ have he : (lp.single 2 j (v j) : Fiber) = (v j) • lp.single 2 j (1:ℂ) := by
303
+ rw [←lp.single_smul]; simp
304
+ rw [he,map_smul,map_smul]
305
+ exact congrArg (fun w : GlobalHilbert => v j • w) (hc j)
306
+ exact h₁.unique (h₂.congr_fun hh)
307
+ ext1 f
308
+ apply Lp.induction (by norm_num : (2:ENNReal) ≠ ∞) (fun f : GlobalHilbert => T f=D f) (f:=f)
309
+ · intro v E hE hfin
310
+ rw [Lp.simpleFunc.coe_indicatorConst,←baseProjection_constant E hE v]
311
+ have heT := DFunLike.congr_fun (hT E hE) (Lp.const 2 baseMeasure v)
312
+ have heD := DFunLike.congr_fun (hD E hE) (Lp.const 2 baseMeasure v)
313
+ change baseProjection E hE (T _) = T (baseProjection E hE _) at heT
314
+ change baseProjection E hE (D _) = D (baseProjection E hE _) at heD
315
+ rw [←heT,←heD,hconst]
316
+ · intro f g hf hg _ h₁ h₂
317
+ simp only [map_add,h₁,h₂]
318
+ · exact isClosed_eq T.continuous D.continuous
319
+
320
+ lemma fullMultiplier_centralizer_eq : StarSubalgebra.centralizer ℂ (fullMultiplierAlgebra : Set _) =
321
+ fullMultiplierAlgebra := by
322
+ apply le_antisymm
323
+ · intro T hT
324
+ have hcomm {P : GlobalHilbert →L[ℂ] GlobalHilbert} (hP : P ∈ fullMultiplierAlgebra) : P*T=T*P :=
325
+ ((StarSubalgebra.mem_centralizer_iff ℂ).mp hT P hP).1
326
+ have hbase : ∀ E (hE : MeasurableSet E), baseProjection E hE*T=T*baseProjection E hE :=
327
+ fun E hE => hcomm (baseProjection_mem_full E hE)
328
+ refine ⟨columnSymbol T, ?_⟩
329
+ apply operators_equal_of_constantBasis (columnSymbol_basis T hbase (fun j => hcomm (sliceProjection_mem_full j)))
330
+ · intro E hE
331
+ exact diagonal_commute _ _
332
+ · exact hbase
333
+ · intro T hT
334
+ apply (StarSubalgebra.mem_centralizer_iff ℂ).mpr
335
+ intro P hP
336
+ exact ⟨fullMultiplier_commute hP hT,fullMultiplier_commute (fullMultiplierAlgebra.star_mem' hP) hT⟩
337
+ lemma fullMultiplier_stronglyClosed : StronglyClosed fullMultiplierAlgebra := by
338
+ rw [←fullMultiplier_centralizer_eq]
339
+ exact strong_centralizer_closed _
340
+
341
+ lemma levelProjection_mem_all {A : StarSubalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert)}
342
+ (hA : StronglyClosed A) (n : ℤ) (t : ℝ) (hn : polarDiagonal n ∈ A) : levelProjection n t ∈ A := by
343
+ by_cases ht : 0 ≤ t ∧ t ≤ 1
344
+ · exact levelProjection_mem hA n ht.1 ht.2 hn
345
+ have he : levelProjection n t = 0 := by
346
+ unfold levelProjection
347
+ rw [←diagonalProjection_empty]
348
+ apply diagonalProjection_ext
349
+ intro j
350
+ apply EventuallyEq.of_eq
351
+ ext x
352
+ change (explicitBeta x (j+n)=t) ↔ False
353
+ constructor
354
+ · intro hx
355
+ apply ht
356
+ rw [←hx]
357
+ exact ⟨(explicitBeta_pos _ _).le,explicitBeta_le_one _ _⟩
358
+ · exact False.elim
359
+ rw [he]
360
+ exact A.zero_mem
361
+
362
+
363
+
364
+
365
+ end
366
+ end BackwardIntertwiners
367
+
368
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/PolarFactors.lean ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.SpectralProjections
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ universe u
16
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
17
+
18
+ def coordinateShift (n : ℤ) : GlobalHilbert →L[ℂ] GlobalHilbert :=
19
+ (fiberReindex (Equiv.addRight (-n))).toLinearIsometry.toContinuousLinearMap.compLpL 2 baseMeasure
20
+ lemma coordinateShift_ae (n : ℤ) (f : GlobalHilbert) :
21
+ ∀ᵐ x ∂baseMeasure, ∀ j, coordinateShift n f x j = f x (j-n) := by
22
+ filter_upwards [ContinuousLinearMap.coeFn_compLpL
23
+ (fiberReindex (Equiv.addRight (-n))).toLinearIsometry.toContinuousLinearMap f] with x hx j
24
+ change coordinateShift n f x = fiberReindex (Equiv.addRight (-n)) (f x) at hx
25
+ rw [hx]
26
+ rfl
27
+ lemma coordinateShift_zero : coordinateShift 0 = 1 := by
28
+ ext1 f
29
+ apply Lp.ext
30
+ filter_upwards [coordinateShift_ae 0 f] with x hx
31
+ ext j
32
+ simpa using hx j
33
+ lemma coordinateShift_add (m n : ℤ) : coordinateShift (m+n) = coordinateShift m * coordinateShift n := by
34
+ ext1 f
35
+ apply Lp.ext
36
+ filter_upwards [coordinateShift_ae (m+n) f,coordinateShift_ae m (coordinateShift n f),
37
+ coordinateShift_ae n f] with x hmn hm hn
38
+ ext j
39
+ change coordinateShift (m+n) f x j = coordinateShift m (coordinateShift n f) x j
40
+ rw [hmn,hm,hn]
41
+ exact congrArg (fun k : ℤ => f x k) (by omega)
42
+ lemma coordinateShift_norm_le (n : ℤ) (f : GlobalHilbert) : ‖coordinateShift n f‖ ≤ ‖f‖ := by
43
+ apply Lp.norm_le_norm_of_ae_le
44
+ filter_upwards [ContinuousLinearMap.coeFn_compLpL
45
+ (fiberReindex (Equiv.addRight (-n))).toLinearIsometry.toContinuousLinearMap f] with x hx
46
+ change coordinateShift n f x = fiberReindex (Equiv.addRight (-n)) (f x) at hx
47
+ rw [hx]
48
+ exact le_of_eq ((fiberReindex _).norm_map _)
49
+ lemma coordinateShift_norm (n : ℤ) (f : GlobalHilbert) : ‖coordinateShift n f‖ = ‖f‖ := by
50
+ apply le_antisymm (coordinateShift_norm_le n f)
51
+ have h : coordinateShift (-n) (coordinateShift n f) = f := by
52
+ have hh := congrArg (fun T : GlobalHilbert →L[ℂ] GlobalHilbert => T f) (coordinateShift_add (-n) n)
53
+ simpa only [neg_add_cancel,coordinateShift_zero,one_apply_eq_self,mul_apply_eq_comp] using hh.symm
54
+ have hn := coordinateShift_norm_le (-n) (coordinateShift n f)
55
+ rwa [h] at hn
56
+
57
+
58
+ def shiftIsometry (n : ℤ) : GlobalHilbert ≃ₗᵢ[ℂ] GlobalHilbert where
59
+ toFun := coordinateShift n
60
+ invFun := coordinateShift (-n)
61
+ map_add' := (coordinateShift n).map_add
62
+ map_smul' := (coordinateShift n).map_smul
63
+ left_inv f := by
64
+ have h := congrArg (fun T : GlobalHilbert →L[ℂ] GlobalHilbert => T f) (coordinateShift_add (-n) n)
65
+ simpa only [neg_add_cancel,coordinateShift_zero,one_apply_eq_self,mul_apply_eq_comp] using h.symm
66
+ right_inv f := by
67
+ have h := congrArg (fun T : GlobalHilbert →L[ℂ] GlobalHilbert => T f) (coordinateShift_add n (-n))
68
+ simpa only [add_neg_cancel,coordinateShift_zero,one_apply_eq_self,mul_apply_eq_comp] using h.symm
69
+ norm_map' := coordinateShift_norm n
70
+ lemma coordinateShift_star (n : ℤ) : star (coordinateShift n) = coordinateShift (-n) := by
71
+ change (coordinateShift n).adjoint = _
72
+ exact (ContinuousLinearMap.eq_adjoint_iff _ _).mpr (by
73
+ intro f g
74
+ change inner ℂ (shiftIsometry (-n) f) g = inner ℂ f (shiftIsometry n g)
75
+ have h := (shiftIsometry n).inner_map_map (shiftIsometry (-n) f) g
76
+ have he : shiftIsometry n (shiftIsometry (-n) f) = f := (shiftIsometry n).apply_symm_apply f
77
+ rw [he] at h
78
+ exact h.symm) |>.symm
79
+
80
+ def shiftUnit : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ where
81
+ val := coordinateShift 1
82
+ inv := coordinateShift (-1)
83
+ val_inv := by rw [←coordinateShift_add]; norm_num [coordinateShift_zero]
84
+ inv_val := by rw [←coordinateShift_add]; norm_num [coordinateShift_zero]
85
+ lemma shiftUnit_zpow (n : ℤ) : ((shiftUnit^n : (GlobalHilbert →L[ℂ] GlobalHilbert)ˣ) : GlobalHilbert →L[ℂ] GlobalHilbert) = coordinateShift n := by
86
+ induction n using Int.induction_on with
87
+ | zero => simp [coordinateShift_zero]
88
+ | succ n ih => rw [zpow_add_one,Units.val_mul,ih]; exact (coordinateShift_add _ _).symm
89
+ | pred n ih => rw [zpow_sub_one,Units.val_mul,ih]; exact (coordinateShift_add _ _).symm
90
+
91
+ lemma forward_polar_factor : forwardOperator = coordinateShift 1 * polarDiagonal 0 := by
92
+ ext1 f
93
+ apply Lp.ext
94
+ filter_upwards [forwardOperator_ae f,coordinateShift_ae 1 (polarDiagonal 0 f),polarDiagonal_ae 0 f] with x hs hu hd
95
+ ext j
96
+ change forwardOperator f x j = coordinateShift 1 (polarDiagonal 0 f) x j
97
+ rw [hs,forwardFiber_apply,hu,hd,add_zero]
98
+ lemma polarDiagonal_conjugate (n : ℤ) :
99
+ coordinateShift (-n) * polarDiagonal 0 * coordinateShift n = polarDiagonal n := by
100
+ ext1 f
101
+ apply Lp.ext
102
+ filter_upwards [coordinateShift_ae (-n) (polarDiagonal 0 (coordinateShift n f)),
103
+ polarDiagonal_ae 0 (coordinateShift n f),coordinateShift_ae n f,polarDiagonal_ae n f] with x hu hd hv ha
104
+ ext j
105
+ change coordinateShift (-n) (polarDiagonal 0 (coordinateShift n f)) x j = polarDiagonal n f x j
106
+ rw [hu,hd,hv,ha]
107
+ simp only [sub_neg_eq_add,add_zero,add_sub_cancel_right]
108
+
109
+ def betaRootSymbol : DiagonalSymbol :=
110
+ ⟨fun x j => (Real.sqrt (explicitBeta x j):ℂ),
111
+ ⟨fun j => Complex.continuous_ofReal.measurable.comp (Real.continuous_sqrt.measurable.comp (measurable_explicitBeta j)),
112
+ 1, zero_le_one, fun x j => by
113
+ simp only [Complex.norm_real,Real.norm_of_nonneg (Real.sqrt_nonneg _)]
114
+ apply Real.sqrt_le_one.mpr
115
+ exact (explicitBeta_le x j).trans (Real.exp_le_one_iff.mpr (by norm_num))⟩⟩
116
+ lemma betaRootSymbol_star : star betaRootSymbol = betaRootSymbol := by
117
+ apply Subtype.ext
118
+ funext x j
119
+ exact Complex.conj_ofReal _
120
+ lemma betaRootSymbol_sq : betaRootSymbol * betaRootSymbol = betaSymbol 0 := by
121
+ apply Subtype.ext
122
+ funext x j
123
+ change (Real.sqrt (explicitBeta x j):ℂ) * (Real.sqrt (explicitBeta x j):ℂ) = (explicitBeta x (j+0):ℂ)
124
+ rw [add_zero,←Complex.ofReal_mul,Real.mul_self_sqrt (explicitBeta_pos _ _).le]
125
+ lemma polarDiagonal_nonneg : 0 ≤ polarDiagonal 0 := by
126
+ have h := star_mul_self_nonneg (diagonalOperator betaRootSymbol)
127
+ rwa [←diagonalOperator_star,betaRootSymbol_star,←diagonalOperator_mul,betaRootSymbol_sq] at h
128
+ local instance realOperatorTower : IsScalarTower ℝ (GlobalHilbert →L[ℂ] GlobalHilbert) (GlobalHilbert →L[ℂ] GlobalHilbert) where
129
+ smul_assoc scalar first second := by ext vector; rfl
130
+ local instance realOperatorCommute : SMulCommClass ℝ (GlobalHilbert →L[ℂ] GlobalHilbert) (GlobalHilbert →L[ℂ] GlobalHilbert) where
131
+ smul_comm scalar first second := by
132
+ apply ContinuousLinearMap.ext
133
+ intro vector
134
+ exact (first.map_smul_of_tower scalar (second vector)).symm
135
+ local instance complexNormalCalculus : ContinuousFunctionalCalculus ℂ (GlobalHilbert →L[ℂ] GlobalHilbert) IsStarNormal :=
136
+ IsStarNormal.instContinuousFunctionalCalculus
137
+ local instance complexClosedCalculus : NonUnitalClosedEmbeddingContinuousFunctionalCalculus ℂ (GlobalHilbert →L[ℂ] GlobalHilbert) IsStarNormal :=
138
+ IsStarNormal.instNonUnitalContinuousFunctionalCalculus
139
+ local instance realSelfAdjointCalculus : NonUnitalContinuousFunctionalCalculus ℝ (GlobalHilbert →L[ℂ] GlobalHilbert) IsSelfAdjoint :=
140
+ IsSelfAdjoint.instNonUnitalContinuousFunctionalCalculus (A := GlobalHilbert →L[ℂ] GlobalHilbert)
141
+ lemma polar_modulus : CFC.sqrt (star forwardOperator * forwardOperator) = polarDiagonal 0 := by
142
+ rw [forward_polar_factor,star_mul,coordinateShift_star,mul_assoc,
143
+ ←mul_assoc (coordinateShift (-1)) (coordinateShift 1),←coordinateShift_add]
144
+ norm_num only [Int.reduceNeg,Int.reduceAdd,coordinateShift_zero,one_mul]
145
+ rw [(polarDiagonal_selfAdjoint 0).star_eq]
146
+ exact CFC.sqrt_mul_self _ polarDiagonal_nonneg
147
+ lemma polarDiagonal_injective : Function.Injective (polarDiagonal 0) := by
148
+ intro f g he
149
+ apply Lp.ext
150
+ filter_upwards [polarDiagonal_ae 0 f,polarDiagonal_ae 0 g] with x hf hg
151
+ ext j
152
+ have h := congrArg (fun v : GlobalHilbert => v x j) he
153
+ rw [hf,hg] at h
154
+ exact mul_left_cancel₀ (by exact_mod_cast (explicitBeta_pos x (j+0)).ne') h
155
+ lemma polarDiagonal_denseRange : DenseRange (polarDiagonal 0) := by
156
+ have hk : (polarDiagonal 0).ker = ⊥ := LinearMap.ker_eq_bot.mpr polarDiagonal_injective
157
+ have hadj : (polarDiagonal 0).adjoint = polarDiagonal 0 := (polarDiagonal_selfAdjoint 0).star_eq
158
+ have hc : (polarDiagonal 0).range.topologicalClosure = ⊤ := by
159
+ rw [←Submodule.orthogonal_orthogonal_eq_closure,ContinuousLinearMap.orthogonal_range,hadj,hk,Submodule.bot_orthogonal_eq_top]
160
+ intro v
161
+ change v ∈ (polarDiagonal 0).range.topologicalClosure
162
+ rw [hc]
163
+ trivial
164
+
165
+
166
+ end
167
+ end BackwardIntertwiners
168
+
169
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/ProductSymbols.lean ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.AtomicAlgebras
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ universe u
16
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
17
+
18
+ attribute [local instance] realOperatorTower realOperatorCommute complexNormalCalculus complexClosedCalculus realSelfAdjointCalculus
19
+
20
+ open InnerProductSpace ContinuousLinearMap
21
+
22
+ lemma linfty_ae_norm_le {X : Type*} [MeasurableSpace X] {μ : Measure X} (g : Lp ℂ ∞ μ) :
23
+ ∀ᵐ z ∂μ, ‖g z‖ ≤ ‖g‖ := by
24
+ filter_upwards [enorm_ae_le_eLpNormEssSup g μ] with z hz
25
+ have hg : eLpNormEssSup g μ ≠ ∞ := by
26
+ simpa only [eLpNorm_exponent_top (Lp.aestronglyMeasurable g)] using Lp.eLpNorm_ne_top g
27
+ have hh := ENNReal.toReal_mono hg hz
28
+ simpa only [Lp.norm_def,eLpNorm_exponent_top (Lp.aestronglyMeasurable g), toReal_enorm] using hh
29
+
30
+ lemma ae_prod_count_iff {X : Type*} [MeasurableSpace X] {μ : Measure X}
31
+ {p : X × ℤ → Prop} (hp : MeasurableSet {z | p z}) :
32
+ (∀ᵐ z ∂μ.prod Measure.count, p z) ↔ ∀ᵐ x ∂μ, ∀ j : ℤ, p (x,j) := by
33
+ rw [Measure.ae_prod_iff_ae_ae hp]
34
+ simp_rw [Measure.ae_count_iff]
35
+
36
+
37
+
38
+ abbrev productMeasure : Measure (Base × ℤ) := baseMeasure.prod Measure.count
39
+
40
+ def IsProductMultiplier (T : GlobalHilbert →L[ℂ] GlobalHilbert) : Prop :=
41
+ ∃ g : Lp ℂ ∞ productMeasure, ∀ f : GlobalHilbert,
42
+ ∀ᵐ x ∂baseMeasure, ∀ j : ℤ, T f x j = g (x,j) * f x j
43
+
44
+ lemma DiagonalSymbol.product_measurable (a : DiagonalSymbol) :
45
+ Measurable (fun z : Base × ℤ => a z.1 z.2) :=
46
+ measurable_from_prod_countable_left a.measurable
47
+ lemma DiagonalSymbol.product_memLp (a : DiagonalSymbol) :
48
+ MemLp (fun z : Base × ℤ => a z.1 z.2) ∞ productMeasure :=
49
+ memLp_top_of_bound a.product_measurable.aestronglyMeasurable a.bound
50
+ (Eventually.of_forall fun z => a.norm_le_bound z.1 z.2)
51
+ lemma diagonalOperator_isProductMultiplier (a : DiagonalSymbol) :
52
+ IsProductMultiplier (diagonalOperator a) := by
53
+ let g : Lp ℂ ∞ productMeasure := a.product_memLp.toLp (fun z : Base × ℤ => a z.1 z.2)
54
+ have hg : ∀ᵐ x ∂baseMeasure, ∀ j : ℤ, g (x,j) = a x j := by
55
+ have hh := Measure.ae_ae_of_ae_prod (MemLp.coeFn_toLp a.product_memLp)
56
+ simpa only [Measure.ae_count_iff] using hh
57
+ refine ⟨g,fun f => ?_⟩
58
+ filter_upwards [diagonalOperator_coord a f,hg] with x hx hgx j
59
+ rw [hx,hgx]
60
+
61
+ def productBoundedSymbol (g : Lp ℂ ∞ productMeasure) : DiagonalSymbol :=
62
+ ⟨fun x j => if ‖g (x,j)‖ ≤ ‖g‖ then g (x,j) else 0,
63
+ (by
64
+ refine ⟨?_,‖g‖,norm_nonneg _,?_⟩
65
+ · intro j
66
+ have hm : Measurable (fun x : Base => g (x,j)) :=
67
+ (Lp.stronglyMeasurable g).measurable.comp (measurable_id.prodMk measurable_const)
68
+ exact Measurable.ite (measurableSet_le hm.norm measurable_const) hm measurable_const
69
+ · intro x j
70
+ dsimp only
71
+ split_ifs with h
72
+ · exact h
73
+ · simp)⟩
74
+ lemma productBoundedSymbol_ae (g : Lp ℂ ∞ productMeasure) :
75
+ ∀ᵐ x ∂baseMeasure, ∀ j : ℤ, productBoundedSymbol g x j = g (x,j) := by
76
+ have hh := Measure.ae_ae_of_ae_prod (linfty_ae_norm_le g)
77
+ simp_rw [Measure.ae_count_iff] at hh
78
+ filter_upwards [hh] with x hx j
79
+ exact ite_eq_left (hx j)
80
+ lemma isProductMultiplier_mem_full {T : GlobalHilbert →L[ℂ] GlobalHilbert}
81
+ (hT : IsProductMultiplier T) : T ∈ fullMultiplierAlgebra := by
82
+ obtain ⟨g,hg⟩ := hT
83
+ refine ⟨productBoundedSymbol g,?_⟩
84
+ ext1 f
85
+ apply Lp.ext
86
+ filter_upwards [diagonalOperator_coord (productBoundedSymbol g) f,
87
+ productBoundedSymbol_ae g,hg f] with x ha hsym hT
88
+ ext j
89
+ change diagonalOperator (productBoundedSymbol g) f x j = T f x j
90
+ rw [ha,hsym,hT]
91
+ lemma fullMultiplier_mem_iff_productMultiplier (T : GlobalHilbert →L[ℂ] GlobalHilbert) :
92
+ T ∈ fullMultiplierAlgebra ↔ IsProductMultiplier T := by
93
+ constructor
94
+ · rintro ⟨a,rfl⟩
95
+ exact diagonalOperator_isProductMultiplier a
96
+ · exact isProductMultiplier_mem_full
97
+
98
+
99
+
100
+ theorem polarAlgebra_mem_iff_productMultiplier (T : GlobalHilbert →L[ℂ] GlobalHilbert) :
101
+ T ∈ polarAlgebra ↔ IsProductMultiplier T := by
102
+ rw [polarAlgebra_eq_fullMultiplier]
103
+ exact fullMultiplier_mem_iff_productMultiplier T
104
+
105
+
106
+
107
+
108
+ end
109
+ end BackwardIntertwiners
110
+
111
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/SpectralProjections.lean ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.PolarDiagonals
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ universe u
16
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
17
+
18
+
19
+ def polarAlgebra : StarSubalgebra ℂ (GlobalHilbert →L[ℂ] GlobalHilbert) := strongGenerated (Set.range polarDiagonal)
20
+ lemma polarDiagonal_mem (n : ℤ) : polarDiagonal n ∈ polarAlgebra := subset_strongGenerated _ ⟨n,rfl⟩
21
+ lemma polarAlgebra_closed : StronglyClosed polarAlgebra := strongGenerated_closed _
22
+ lemma polarAlgebra_le_full : polarAlgebra ≤ fullMultiplierAlgebra := by
23
+ apply strongGenerated_le fullMultiplier_stronglyClosed
24
+ rintro _ ⟨n,rfl⟩
25
+ exact ⟨betaSymbol n,rfl⟩
26
+ lemma polarAlgebra_commutative {A B : GlobalHilbert →L[ℂ] GlobalHilbert}
27
+ (hA : A ∈ polarAlgebra) (hB : B ∈ polarAlgebra) : A*B=B*A :=
28
+ fullMultiplier_commute (polarAlgebra_le_full hA) (polarAlgebra_le_full hB)
29
+
30
+ lemma halfExponent_eq_ten_iff (t : ℕ → ℕ) (k : ℕ) : halfExponent t k=10 ↔ k=0 := by
31
+ constructor
32
+ · intro h
33
+ have hl := halfExponent_lower t k
34
+ rw [h] at hl
35
+ have hk : (k:ℝ)=0 := by have := Nat.cast_nonneg (α:=ℝ) k; nlinarith
36
+ exact_mod_cast hk
37
+ · rintro rfl
38
+ simp [halfExponent,residueCorrection]
39
+ lemma explicitBeta_central (x : Base) (j : ℤ) : explicitBeta x j=Real.exp (-10) ↔ j=-1 ∨ j=0 := by
40
+ have hh (t : ℕ → ℕ) (k : ℕ) : Real.exp (-halfExponent t k)=Real.exp (-10) ↔ k=0 := by
41
+ rw [Real.exp_eq_exp,neg_inj,halfExponent_eq_ten_iff]
42
+ cases j with
43
+ | ofNat k =>
44
+ change Real.exp (-halfExponent (plusResidue x) k)=Real.exp (-10) ↔ _
45
+ rw [hh]
46
+ change k=0 ↔ (k:ℤ) = -1 ∨ (k:ℤ) = 0
47
+ omega
48
+ | negSucc k =>
49
+ change Real.exp (-halfExponent (minusResidue x) k)=Real.exp (-10) ↔ _
50
+ rw [hh]
51
+ omega
52
+ lemma sliceProjection_central (r : ℤ) : sliceProjection r=
53
+ levelProjection (-r-1) (Real.exp (-10)) * levelProjection (-r) (Real.exp (-10)) := by
54
+ rw [sliceProjection_diagonal,levelProjection,levelProjection,diagonalProjection_mul]
55
+ apply diagonalProjection_ext
56
+ intro j
57
+ apply EventuallyEq.of_eq
58
+ ext x
59
+ change (x ∈ if j=r then Set.univ else ∅) ↔
60
+ (explicitBeta x (j+(-r-1))=Real.exp (-10) ∧ explicitBeta x (j+-r)=Real.exp (-10))
61
+ simp only [explicitBeta_central]
62
+ by_cases hj : j=r <;> simp [hj] <;> omega
63
+ lemma sliceProjection_mem_polar (r : ℤ) : sliceProjection r ∈ polarAlgebra := by
64
+ rw [sliceProjection_central]
65
+ exact polarAlgebra.mul_mem
66
+ (levelProjection_mem_all polarAlgebra_closed _ _ (polarDiagonal_mem _))
67
+ (levelProjection_mem_all polarAlgebra_closed _ _ (polarDiagonal_mem _))
68
+
69
+
70
+ def rectangleProjection (r : ℤ) (E : Set Base) (hE : MeasurableSet E) : GlobalHilbert →L[ℂ] GlobalHilbert :=
71
+ diagonalProjection (fun j => if j=r then E else ∅) (fun j => by split_ifs; exact hE; exact MeasurableSet.empty)
72
+ lemma rectangleProjection_univ (r : ℤ) : rectangleProjection r Set.univ MeasurableSet.univ=sliceProjection r :=
73
+ (sliceProjection_diagonal r).symm
74
+ lemma rectangleProjection_empty (r : ℤ) : rectangleProjection r ∅ MeasurableSet.empty=0 := by
75
+ unfold rectangleProjection
76
+ convert diagonalProjection_empty using 2
77
+ ext j x
78
+ simp
79
+ lemma rectangleProjection_ext {r : ℤ} {E F : Set Base} {hE : MeasurableSet E} {hF : MeasurableSet F}
80
+ (he : E=ᵐ[baseMeasure] F) : rectangleProjection r E hE=rectangleProjection r F hF := by
81
+ apply diagonalProjection_ext
82
+ intro j
83
+ by_cases hj : j=r <;> simp only [hj,↓reduceIte]
84
+ · exact he
85
+ · exact Filter.EventuallyEq.rfl
86
+ lemma rectangleProjection_mul (r : ℤ) (E F : Set Base) (hE : MeasurableSet E) (hF : MeasurableSet F) :
87
+ rectangleProjection r E hE * rectangleProjection r F hF=rectangleProjection r (E∩F) (hE.inter hF) := by
88
+ rw [rectangleProjection,rectangleProjection,diagonalProjection_mul]
89
+ apply diagonalProjection_ext
90
+ intro j
91
+ apply EventuallyEq.of_eq
92
+ by_cases hj : j=r <;> simp only [hj,↓reduceIte,Set.inter_empty]
93
+ lemma rectangleProjection_compl (r : ℤ) (E : Set Base) (hE : MeasurableSet E) :
94
+ rectangleProjection r Eᶜ hE.compl = sliceProjection r - rectangleProjection r E hE := by
95
+ rw [sliceProjection_diagonal]
96
+ change diagonalRepresentation _ = diagonalRepresentation _ - diagonalRepresentation _
97
+ rw [←map_sub]
98
+ congr 1
99
+ apply Subtype.ext
100
+ funext x j
101
+ change projectionSymbol _ _ x j = projectionSymbol _ _ x j - projectionSymbol _ _ x j
102
+ by_cases hj : j=r <;> by_cases he : x∈E <;> simp [hj,he]
103
+ lemma rectangleProjection_union (r : ℤ) (E F : Set Base) (hE : MeasurableSet E) (hF : MeasurableSet F) :
104
+ rectangleProjection r (E∪F) (hE.union hF) = rectangleProjection r E hE+rectangleProjection r F hF-
105
+ rectangleProjection r E hE * rectangleProjection r F hF := by
106
+ change diagonalRepresentation _ = diagonalRepresentation _+diagonalRepresentation _-diagonalRepresentation _*diagonalRepresentation _
107
+ rw [←map_mul,←map_add,←map_sub]
108
+ congr 1
109
+ apply Subtype.ext
110
+ funext x j
111
+ change projectionSymbol _ _ x j = projectionSymbol _ _ x j + projectionSymbol _ _ x j - projectionSymbol _ _ x j * projectionSymbol _ _ x j
112
+ by_cases hj : j=r <;> by_cases he : x∈E <;> by_cases hf : x∈F <;> simp [hj,he,hf]
113
+
114
+ def blockAnchor (m : ℕ) : ℕ := 8^(m-1)
115
+ lemma blockAnchor_ne_zero (m : ℕ) : blockAnchor m ≠ 0 := pow_ne_zero _ (by norm_num)
116
+ lemma blockAnchor_block {m : ℕ} (hm : 1 ≤ m) : weightBlock (blockAnchor m)=m := by
117
+ rw [weightBlock,blockAnchor,Nat.log_pow (by norm_num : 1<8)]
118
+ omega
119
+ def residueEigenvalue (m t : ℕ) : ℝ :=
120
+ Real.exp (-(10*((blockAnchor m:ℝ)+1)+100*((2^m:ℝ)-2+(t:ℝ))))
121
+ lemma beta_anchor_residue {m : ℕ} (hm : 1 ≤ m) (t : ℕ) (x : Base) :
122
+ explicitBeta x (blockAnchor m) = residueEigenvalue m t ↔ residue m x=t := by
123
+ change Real.exp (-halfExponent (plusResidue x) (blockAnchor m))=residueEigenvalue m t ↔ _
124
+ rw [residueEigenvalue,Real.exp_eq_exp,neg_inj]
125
+ simp only [halfExponent,residueCorrection,blockAnchor_ne_zero,↓reduceIte,
126
+ residueScale,blockAnchor_block hm,plusResidue]
127
+ push_cast
128
+ constructor
129
+ · intro h
130
+ have he : (residue m x:ℝ)=(t:ℝ) := by linarith
131
+ exact_mod_cast he
132
+ · intro h
133
+ rw [h]
134
+ lemma residue_rectangle_spectral {m : ℕ} (hm : 1 ≤ m) (t : ℕ) (r : ℤ) :
135
+ rectangleProjection r (residueClass m t) (measurableSet_residueClass m t) =
136
+ sliceProjection r * levelProjection ((blockAnchor m:ℤ)-r) (residueEigenvalue m t) := by
137
+ rw [sliceProjection_diagonal,levelProjection,diagonalProjection_mul]
138
+ apply diagonalProjection_ext
139
+ intro j
140
+ apply EventuallyEq.of_eq
141
+ ext x
142
+ by_cases hj : j=r
143
+ · subst j
144
+
145
+
146
+ simp only [↓reduceIte,Set.mem_inter_iff,Set.mem_univ,true_and,Set.mem_ofPred_eq]
147
+ change residue m x=t ↔ explicitBeta x (r+((blockAnchor m:ℤ)-r))=residueEigenvalue m t
148
+ rw [show r+((blockAnchor m:ℤ)-r)=(blockAnchor m:ℤ) by omega]
149
+ exact (beta_anchor_residue hm t x).symm
150
+ · simp [hj]
151
+ lemma residue_rectangle_mem (m t : ℕ) (r : ℤ) :
152
+ rectangleProjection r (residueClass m t) (measurableSet_residueClass m t) ∈ polarAlgebra := by
153
+ by_cases hm : m=0
154
+ · subst m
155
+ have hz (x : Base) : residue 0 x=0 := by have := residue_lt 0 x; norm_num at this; omega
156
+ by_cases ht : t=0
157
+ · have he : residueClass 0 t=Set.univ := by ext x; simp [residueClass,hz,ht]
158
+ have hr : rectangleProjection r (residueClass 0 t) (measurableSet_residueClass 0 t)=sliceProjection r := by
159
+ exact (rectangleProjection_ext (EventuallyEq.of_eq he)).trans (rectangleProjection_univ r)
160
+ rw [hr]
161
+ exact sliceProjection_mem_polar _
162
+ · have he : residueClass 0 t=∅ := by ext x; simp [residueClass,hz,Ne.symm ht]
163
+ have hr : rectangleProjection r (residueClass 0 t) (measurableSet_residueClass 0 t)=0 := by
164
+ exact (rectangleProjection_ext (EventuallyEq.of_eq he)).trans (rectangleProjection_empty r)
165
+ rw [hr]
166
+ exact polarAlgebra.zero_mem
167
+ · rw [residue_rectangle_spectral (by omega : 1 ≤ m)]
168
+ exact polarAlgebra.mul_mem (sliceProjection_mem_polar _)
169
+ (levelProjection_mem_all polarAlgebra_closed _ _ (polarDiagonal_mem _))
170
+
171
+ lemma borel_le_of_residue_measurable (m : MeasurableSpace (PadicInt 2))
172
+ (hm : ∀ n t : ℕ, @MeasurableSet (PadicInt 2) m {x | twoResidue n x=t}) :
173
+ padicBorel ≤ m := by
174
+ let : MeasurableSpace (PadicInt 2) := padicBorel
175
+ let R : PadicInt 2 → ℕ → ℕ := fun x n => twoResidue n x
176
+ have hc : Continuous R := continuous_pi fun n =>
177
+ continuous_of_discreteTopology.comp (continuous_twoResidue n)
178
+ have hi : Function.Injective R := by
179
+ intro x y h
180
+ apply PadicInt.ext_of_toZModPow.mp
181
+ intro n
182
+ apply ZMod.val_injective
183
+ exact congrFun h n
184
+ have he : MeasurableEmbedding R := (hc.isClosedEmbedding hi).measurableEmbedding
185
+ have hr : @Measurable _ _ m inferInstance R := by
186
+ let : MeasurableSpace (PadicInt 2) := m
187
+ apply Measurable.of_eval
188
+ intro n
189
+ exact measurable_to_countable' (hm n)
190
+ exact he.comap_eq.symm.le.trans hr.comap_le
191
+
192
+ lemma rectangleProjection_finiteUnion_mem (r : ℤ) (E : ℕ → Set Base)
193
+ (hE : ∀ i, MeasurableSet (E i)) (hmem : ∀ i, rectangleProjection r (E i) (hE i) ∈ polarAlgebra)
194
+ (s : Finset ℕ) : rectangleProjection r (⋃ i ∈ s, E i) (by measurability) ∈ polarAlgebra := by
195
+ induction s using Finset.induction_on with
196
+ | empty =>
197
+ have he : (⋃ i ∈ (∅:Finset ℕ), E i)=∅ := by simp
198
+ have hp : rectangleProjection r (⋃ i ∈ (∅ : Finset ℕ), E i) (by measurability) =
199
+ rectangleProjection r ∅ MeasurableSet.empty := rectangleProjection_ext (EventuallyEq.of_eq he)
200
+ rw [hp, rectangleProjection_empty]
201
+ exact polarAlgebra.zero_mem
202
+ | @insert i s hi hs =>
203
+ have he : (⋃ k ∈ insert i s, E k)=E i ∪ ⋃ k ∈ s,E k := by simp
204
+ have hp : rectangleProjection r (⋃ k ∈ insert i s, E k) (by measurability) =
205
+ rectangleProjection r (E i ∪ ⋃ k ∈ s, E k) ((hE i).union (by measurability)) :=
206
+ rectangleProjection_ext (EventuallyEq.of_eq he)
207
+ rw [hp,
208
+ rectangleProjection_union r (E i) (⋃ k∈s,E k) (hE i) (by measurability)]
209
+ exact polarAlgebra.sub_mem (polarAlgebra.add_mem (hmem i) hs) (polarAlgebra.mul_mem (hmem i) hs)
210
+
211
+ lemma rectangleProjection_iUnion_mem (r : ℤ) (E : ℕ → Set Base)
212
+ (hE : ∀ i, MeasurableSet (E i)) (hmem : ∀ i, rectangleProjection r (E i) (hE i) ∈ polarAlgebra) :
213
+ rectangleProjection r (⋃ i, E i) (MeasurableSet.iUnion hE) ∈ polarAlgebra := by
214
+ let a (s : Finset ℕ) : DiagonalSymbol := projectionSymbol
215
+ (fun j => if j=r then ⋃i∈s,E i else ∅) (fun j => by split_ifs <;> measurability)
216
+ let b : DiagonalSymbol := projectionSymbol
217
+ (fun j => if j=r then ⋃i,E i else ∅) (fun j => by split_ifs <;> measurability)
218
+ apply polarAlgebra_closed.mem_of_tendsto (l:=atTop) (T:=fun s => diagonalOperator (a s))
219
+ · exact Eventually.of_forall (rectangleProjection_finiteUnion_mem r E hE hmem)
220
+ · intro f
221
+ apply diagonalOperator_tendsto (b:=b) a zero_le_one
222
+ (fun s => projectionSymbol_norm_le _ _) (projectionSymbol_norm_le _ _)
223
+ apply Eventually.of_forall
224
+ intro x j
225
+ apply tendsto_const_nhds.congr'
226
+ by_cases hj : j=r
227
+ · by_cases hx : x ∈ ⋃i,E i
228
+ · obtain ⟨i,hi⟩ := Set.mem_iUnion.mp hx
229
+ filter_upwards [eventually_ge_atTop ({i}:Finset ℕ)] with s hs
230
+ have his : i∈s := Finset.singleton_subset_iff.mp hs
231
+ have hxs : x∈⋃i∈s,E i := Set.mem_iUnion.mpr ⟨i,Set.mem_iUnion.mpr ⟨his,hi⟩⟩
232
+ simp [a,b,hj,hx,hxs]
233
+ · exact Eventually.of_forall (fun s => by
234
+ have hxs : x ∉ ⋃i∈s,E i := fun h => hx (by
235
+ obtain ⟨i,hi,hiE⟩ := Set.mem_iUnion.mp h |>.imp (fun i hi => Set.mem_iUnion.mp hi)
236
+ exact Set.mem_iUnion.mpr ⟨i,hiE⟩)
237
+ simp [a,b,hj,hx,hxs])
238
+ · exact Eventually.of_forall (fun s=>by simp [a,b,hj])
239
+
240
+
241
+ @[instance_reducible]
242
+ def polarProjectionMeasurableSpace (r : ℤ) : MeasurableSpace Base where
243
+ MeasurableSet' E := ∃ hE : MeasurableSet E, rectangleProjection r E hE ∈ polarAlgebra
244
+ measurableSet_empty := ⟨MeasurableSet.empty,by rw [rectangleProjection_empty]; exact polarAlgebra.zero_mem⟩
245
+ measurableSet_compl E h := by
246
+ obtain ⟨hE,hm⟩ := h
247
+ refine ⟨hE.compl,?_⟩
248
+ rw [rectangleProjection_compl r E hE]
249
+ exact polarAlgebra.sub_mem (sliceProjection_mem_polar r) hm
250
+ measurableSet_iUnion E h := by
251
+ choose hE hm using h
252
+ exact ⟨MeasurableSet.iUnion hE,rectangleProjection_iUnion_mem r E hE hm⟩
253
+
254
+ lemma rectangleProjection_borel_mem (r : ℤ) {E : Set (PadicInt 2)} (hE : MeasurableSet E) :
255
+ rectangleProjection r E (hE.nullMeasurableSet (μ:=baseHaar)) ∈ polarAlgebra := by
256
+ have hm : padicBorel ≤ polarProjectionMeasurableSpace r :=
257
+ borel_le_of_residue_measurable _ (fun m t =>
258
+ ⟨measurableSet_residueClass m t,residue_rectangle_mem m t r⟩)
259
+ exact (hm E hE).choose_spec
260
+
261
+ lemma rectangleProjection_mem (r : ℤ) (E : Set Base) (hE : MeasurableSet E) :
262
+ rectangleProjection r E hE ∈ polarAlgebra := by
263
+ obtain ⟨F,hsub,hF,he⟩ := (show NullMeasurableSet (show Set (PadicInt 2) from E) baseHaar from hE).exists_measurable_superset_ae_eq
264
+ have he' : (show Set Base from F)=ᵐ[baseMeasure] E := he
265
+ rw [←rectangleProjection_ext (hE:=hF.nullMeasurableSet (μ:=baseHaar)) he']
266
+ exact rectangleProjection_borel_mem r hF
267
+ lemma DiagonalSymbol.sum_apply {ι : Type*} (s : Finset ι) (a : ι → DiagonalSymbol) (x : Base) (j : ℤ) :
268
+ (∑ i ∈ s, a i) x j = ∑ i ∈ s, a i x j := by
269
+ induction s using Finset.induction_on with
270
+ | empty => simp
271
+ | @insert i s hi hs => simp [Finset.sum_insert,hi,hs]
272
+
273
+
274
+ def simpleSliceSymbol (r : ℤ) (f : SimpleFunc Base ℂ) : DiagonalSymbol :=
275
+ ∑ t ∈ f.range, t • projectionSymbol
276
+ (fun j => if j=r then f ⁻¹' {t} else ∅)
277
+ (fun j=>by split_ifs; exact f.measurableSet_fiber t; exact MeasurableSet.empty)
278
+ lemma simpleSliceSymbol_apply (r : ℤ) (f : SimpleFunc Base ℂ) (x : Base) (j : ℤ) :
279
+ simpleSliceSymbol r f x j=if j=r then f x else 0 := by
280
+ simp only [simpleSliceSymbol,DiagonalSymbol.sum_apply,DiagonalSymbol.smul_apply,projectionSymbol_apply]
281
+ by_cases hj : j=r
282
+ · simp only [hj,↓reduceIte,Set.mem_preimage,Set.mem_singleton_iff,mul_ite,mul_one,mul_zero]
283
+ rw [Finset.sum_eq_single (f x)]
284
+ · simp
285
+ · intro b hb hbx
286
+ simp [Ne.symm hbx]
287
+ · exact fun hn => (hn (f.mem_range_self x)).elim
288
+ · simp [hj]
289
+ lemma simpleSliceSymbol_mem (r : ℤ) (f : SimpleFunc Base ℂ) : diagonalOperator (simpleSliceSymbol r f) ∈ polarAlgebra := by
290
+ change diagonalRepresentation (∑ t ∈ f.range, _) ∈ polarAlgebra
291
+ rw [map_sum]
292
+ apply polarAlgebra.sum_mem
293
+ intro t ht
294
+ rw [map_smul]
295
+ exact polarAlgebra.smul_mem (rectangleProjection_mem r (f ⁻¹' {t}) (f.measurableSet_fiber t)) t
296
+
297
+ def sliceSymbol (r : ℤ) (a : DiagonalSymbol) : DiagonalSymbol :=
298
+ a * projectionSymbol (fun j=>if j=r then Set.univ else ∅) (fun j=>by split_ifs <;> measurability)
299
+ lemma sliceSymbol_apply (r : ℤ) (a : DiagonalSymbol) (x : Base) (j : ℤ) :
300
+ sliceSymbol r a x j=if j=r then a x r else 0 := by
301
+ by_cases hj : j=r <;> simp [sliceSymbol,hj]
302
+ lemma sliceSymbol_norm_le (r : ℤ) (a : DiagonalSymbol) (x : Base) (j : ℤ) :
303
+ ‖sliceSymbol r a x j‖ ≤ a.bound := by
304
+ rw [sliceSymbol_apply]
305
+ split_ifs
306
+ · exact a.norm_le_bound x r
307
+ · simpa using a.bound_nonneg
308
+ lemma sliceSymbol_mem (r : ℤ) (a : DiagonalSymbol) : diagonalOperator (sliceSymbol r a) ∈ polarAlgebra := by
309
+ let f (n : ℕ) : SimpleFunc Base ℂ := SimpleFunc.approxOn (fun x=>a x r) (a.measurable r) Set.univ 0 (Set.mem_univ _) n
310
+ apply polarAlgebra_closed.mem_of_tendsto (l:=atTop) (T:=fun n=>diagonalOperator (simpleSliceSymbol r (f n)))
311
+ · exact Eventually.of_forall (fun n=>simpleSliceSymbol_mem r (f n))
312
+ · intro v
313
+ apply diagonalOperator_tendsto (C:=2*a.bound) _ _ (mul_nonneg (by norm_num) a.bound_nonneg)
314
+ · intro n x j
315
+ rw [simpleSliceSymbol_apply]
316
+ split_ifs
317
+ · exact (SimpleFunc.norm_approxOn_zero_le (a.measurable r) (Set.mem_univ (0:ℂ)) x n).trans
318
+ (by linarith [a.norm_le_bound x r])
319
+ · simpa using mul_nonneg (by norm_num : (0:ℝ) ≤ 2) a.bound_nonneg
320
+ · intro x j
321
+ exact (sliceSymbol_norm_le r a x j).trans (by linarith [a.bound_nonneg])
322
+ · apply Eventually.of_forall
323
+ intro x j
324
+ simp only [simpleSliceSymbol_apply,sliceSymbol_apply]
325
+ by_cases hj : j=r
326
+ · simp only [hj,↓reduceIte]
327
+ exact SimpleFunc.tendsto_approxOn (a.measurable r) (Set.mem_univ (0:ℂ)) (by simp)
328
+ · simp only [hj,↓reduceIte]
329
+ exact tendsto_const_nhds
330
+
331
+ lemma finiteSliceSymbol_apply (s : Finset ℤ) (a : DiagonalSymbol) (x : Base) (j : ℤ) :
332
+ (∑ r ∈ s,sliceSymbol r a) x j=if j∈s then a x j else 0 := by
333
+ rw [DiagonalSymbol.sum_apply]
334
+ simp_rw [sliceSymbol_apply]
335
+ simp
336
+ lemma diagonalOperator_mem_polar (a : DiagonalSymbol) : diagonalOperator a ∈ polarAlgebra := by
337
+ let T (s : Finset ℤ) : GlobalHilbert →L[ℂ] GlobalHilbert := diagonalOperator (∑ r ∈ s,sliceSymbol r a)
338
+ apply polarAlgebra_closed.mem_of_tendsto (l:=atTop) (T:=T)
339
+ · apply Eventually.of_forall
340
+ intro s
341
+ change diagonalRepresentation (∑ r ∈ s,sliceSymbol r a) ∈ polarAlgebra
342
+ rw [map_sum]
343
+ exact polarAlgebra.sum_mem (fun r _=>sliceSymbol_mem r a)
344
+ · intro v
345
+ apply diagonalOperator_tendsto (C:=a.bound) _ _ a.bound_nonneg
346
+ · intro s x j
347
+ rw [finiteSliceSymbol_apply]
348
+ split_ifs
349
+ · exact a.norm_le_bound x j
350
+ · simpa using a.bound_nonneg
351
+ · exact a.norm_le_bound
352
+ · apply Eventually.of_forall
353
+ intro x j
354
+ apply tendsto_const_nhds.congr'
355
+ filter_upwards [eventually_ge_atTop ({j}:Finset ℤ)] with s hs
356
+ rw [finiteSliceSymbol_apply,ite_eq_left (Finset.singleton_subset_iff.mp hs)]
357
+
358
+
359
+
360
+ theorem polarAlgebra_eq_fullMultiplier : polarAlgebra=fullMultiplierAlgebra := by
361
+ apply le_antisymm polarAlgebra_le_full
362
+ rintro T ⟨a,rfl⟩
363
+ exact diagonalOperator_mem_polar a
364
+
365
+
366
+ end
367
+ end BackwardIntertwiners
368
+
369
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/StrongClosure.lean ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.DiagonalSymbols
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+ open Topology MeasureTheory Set
11
+ open scoped ENNReal
12
+
13
+ open scoped Classical
14
+
15
+ lemma L2_norm_eq_sqrt {X E : Type*} [MeasurableSpace X] [NormedAddCommGroup E]
16
+ {μ : Measure X} (f : Lp E 2 μ) :
17
+ ‖f‖ = Real.sqrt (∫ x, ‖f x‖^2 ∂μ) := by
18
+ rw [Lp.norm_def, toReal_eLpNorm,
19
+ lpNorm_eq_integral_norm_rpow_toReal (by norm_num : (2:ENNReal) ≠ 0)
20
+ (by norm_num : (2:ENNReal) ≠ ∞) (Lp.aestronglyMeasurable f)]
21
+ simp [Real.sqrt_eq_rpow]
22
+
23
+ lemma L2_tendsto_zero_of_dominated {X E ι : Type*} {l : Filter ι} [l.IsCountablyGenerated] [MeasurableSpace X] [NormedAddCommGroup E]
24
+ {μ : Measure X} (F : ι → Lp E 2 μ) (b : X → ℝ)
25
+ (hb : Integrable (fun x => b x ^ 2) μ)
26
+ (hB : ∀ n, ∀ᵐ x ∂μ, ‖F n x‖ ≤ b x)
27
+ (hlim : ∀ᵐ x ∂μ, Tendsto (fun n => F n x) l (𝓝 0)) :
28
+ Tendsto F l (𝓝 0) := by
29
+ apply tendsto_zero_iff_norm_tendsto_zero.mpr
30
+ have hi : Tendsto (fun n => ∫ x, ‖F n x‖^2 ∂μ) l (𝓝 0) := by
31
+ simpa using tendsto_integral_filter_of_dominated_convergence (f:=fun _ : X => (0:ℝ))
32
+ (fun x => b x^2)
33
+ (Eventually.of_forall fun n => ((Lp.aestronglyMeasurable (F n)).norm.aemeasurable.pow_const 2).aestronglyMeasurable)
34
+ (Eventually.of_forall fun n => (hB n).mono fun x hx => by
35
+ rw [Real.norm_of_nonneg (sq_nonneg _)]
36
+ exact pow_le_pow_left₀ (norm_nonneg _) hx 2) hb
37
+ (hlim.mono fun x hx => by simpa using hx.norm.pow 2)
38
+ simpa only [Function.comp_def, Real.sqrt_zero, L2_norm_eq_sqrt] using Real.continuous_sqrt.continuousAt.tendsto.comp hi
39
+
40
+ lemma fiber_norm_sq (v : Fiber) : ‖v‖^2 = ∑' j, ‖v j‖^2 := by
41
+ simpa using lp.norm_rpow_eq_tsum (by norm_num : (0:ℝ) < (2:ENNReal).toReal) v
42
+ lemma fiber_tendsto_zero_of_dominated {ι : Type*} {l : Filter ι} (v : ι → Fiber) (b : ℤ → ℝ)
43
+ (hb : Summable (fun j => b j^2))
44
+ (hB : ∀ n j, ‖v n j‖ ≤ b j)
45
+ (hlim : ∀ j, Tendsto (fun n => v n j) l (𝓝 0)) :
46
+ Tendsto v l (𝓝 0) := by
47
+ apply tendsto_zero_iff_norm_tendsto_zero.mpr
48
+ have hi : Tendsto (fun n => ‖v n‖^2) l (𝓝 0) := by
49
+ simp_rw [fiber_norm_sq]
50
+ simpa using tendsto_tsum_of_dominated_convergence (g:=fun _ : ℤ => (0:ℝ)) hb
51
+ (fun j => by simpa using (hlim j).norm.pow 2)
52
+ (Filter.Eventually.of_forall fun n j => by
53
+ rw [Real.norm_of_nonneg (sq_nonneg _)]
54
+ exact pow_le_pow_left₀ (norm_nonneg _) (hB n j) 2)
55
+ simpa only [Function.comp_def, Real.sqrt_zero, Real.sqrt_sq_eq_abs,abs_of_nonneg (norm_nonneg _)]
56
+ using Real.continuous_sqrt.continuousAt.tendsto.comp hi
57
+ lemma diagonalFiber_bound (a : DiagonalSymbol) {C : ℝ} (hC : 0 ≤ C)
58
+ (ha : ∀ x j, ‖a x j‖ ≤ C) (x : Base) (v : Fiber) :
59
+ ‖diagonalFiber a x v‖ ≤ C*‖v‖ := by
60
+ calc
61
+ _ ≤ ‖(C:ℂ) • v‖ := by
62
+ apply lp.norm_mono (by norm_num : (2:ENNReal) ≠ 0)
63
+ intro j
64
+ simp only [diagonalFiber_apply,lp.coeFn_smul,Pi.smul_apply,norm_smul,norm_mul,
65
+ Complex.norm_real,Real.norm_of_nonneg hC]
66
+ exact mul_le_mul_of_nonneg_right (ha x j) (norm_nonneg _)
67
+ _ = C*‖v‖ := by rw [norm_smul,Complex.norm_real,Real.norm_of_nonneg hC]
68
+
69
+ lemma diagonalFiber_tendsto_zero {ι : Type*} {l : Filter ι} (a : ι → DiagonalSymbol) {C : ℝ}
70
+ (ha : ∀ n x j, ‖a n x j‖ ≤ C) (x : Base) (v : Fiber)
71
+ (hlim : ∀ j, Tendsto (fun n => a n x j) l (𝓝 0)) :
72
+ Tendsto (fun n => diagonalFiber (a n) x v) l (𝓝 0) := by
73
+ apply fiber_tendsto_zero_of_dominated _ (fun j => C*‖v j‖)
74
+ · have hv : Summable (fun j => ‖v j‖^2) := by
75
+ simpa using (lp.memℓp v).summable (by norm_num : (0:ℝ) < (2:ENNReal).toReal)
76
+ simpa only [mul_pow] using hv.mul_left (C^2)
77
+ · intro n j
78
+ rw [diagonalFiber_apply,norm_mul]
79
+ exact mul_le_mul_of_nonneg_right (ha n x j) (norm_nonneg _)
80
+ · intro j
81
+ simpa using (hlim j).mul_const (v j)
82
+ lemma L2_integrable_bound_sq (f : GlobalHilbert) (C : ℝ) :
83
+ Integrable (fun x => (C*‖f x‖)^2) baseMeasure := by
84
+ have hf : Integrable (fun x => ‖f x‖^2) baseMeasure :=
85
+ (Lp.memLp f).integrable_norm_pow (by norm_num : (2:ℕ) ≠ 0)
86
+ simpa only [mul_pow] using hf.const_mul (C^2)
87
+ lemma diagonalOperator_tendsto_zero {ι : Type*} [Countable ι] {l : Filter ι} [l.IsCountablyGenerated] (a : ι → DiagonalSymbol) {C : ℝ}
88
+ (hC : 0 ≤ C) (ha : ∀ n x j, ‖a n x j‖ ≤ C)
89
+ (hlim : ∀ᵐ x ∂baseMeasure, ∀ j, Tendsto (fun n => a n x j) l (𝓝 0))
90
+ (f : GlobalHilbert) : Tendsto (fun n => diagonalOperator (a n) f) l (𝓝 0) := by
91
+ apply L2_tendsto_zero_of_dominated _ (fun x => C*‖f x‖) (L2_integrable_bound_sq f C)
92
+ · intro n
93
+ filter_upwards [diagonalOperator_ae (a n) f] with x hx
94
+ rw [hx]
95
+ exact diagonalFiber_bound _ hC (ha n) _ _
96
+ · filter_upwards [hlim,ae_all_iff.mpr (fun n => diagonalOperator_ae (a n) f)] with x hx hn
97
+ have he : (fun n => diagonalOperator (a n) f x) = (fun n => diagonalFiber (a n) x (f x)) := funext hn
98
+ rw [he]
99
+ exact diagonalFiber_tendsto_zero a ha x (f x) hx
100
+ lemma diagonalOperator_tendsto {ι : Type*} [Countable ι] {l : Filter ι} [l.IsCountablyGenerated] (a : ι → DiagonalSymbol) (b : DiagonalSymbol)
101
+ {C : ℝ} (hC : 0 ≤ C) (ha : ∀ n x j, ‖a n x j‖ ≤ C)
102
+ (hb : ∀ x j, ‖b x j‖ ≤ C)
103
+ (hlim : ∀ᵐ x ∂baseMeasure, ∀ j, Tendsto (fun n => a n x j) l (𝓝 (b x j)))
104
+ (f : GlobalHilbert) :
105
+ Tendsto (fun n => diagonalOperator (a n) f) l (𝓝 (diagonalOperator b f)) := by
106
+ have hB : ∀ n x j, ‖(a n-b) x j‖ ≤ 2*C := fun n x j =>
107
+ (norm_sub_le _ _).trans ((add_le_add (ha n x j) (hb x j)).trans_eq (by ring))
108
+ have hl : ∀ᵐ x ∂baseMeasure, ∀ j, Tendsto (fun n => (a n-b) x j) l (𝓝 0) := by
109
+ filter_upwards [hlim] with x hx j
110
+ simpa only [DiagonalSymbol.sub_apply,sub_self] using (hx j).sub_const (b x j)
111
+ have hh := diagonalOperator_tendsto_zero (fun n => a n-b) (mul_nonneg (by norm_num) hC) hB hl f
112
+ have he (n : ι) : diagonalOperator (a n-b) f = diagonalOperator (a n) f - diagonalOperator b f :=
113
+ congrArg (fun T : GlobalHilbert →L[ℂ] GlobalHilbert => T f) (map_sub diagonalRepresentation (a n) b)
114
+ simp_rw [he] at hh
115
+ exact tendsto_sub_nhds_zero_iff.mp hh
116
+
117
+ universe u
118
+ variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [completeSpace : CompleteSpace H]
119
+
120
+ @[instance_reducible]
121
+ def strongOperatorTopology : TopologicalSpace (H →L[ℂ] H) :=
122
+ TopologicalSpace.induced (fun T : H →L[ℂ] H => (fun v : H => T v)) inferInstance
123
+
124
+ def StronglyClosed (A : StarSubalgebra ℂ (H →L[ℂ] H)) : Prop :=
125
+ @IsClosed (H →L[ℂ] H) strongOperatorTopology A
126
+
127
+ omit completeSpace in
128
+ lemma strong_continuous_apply [CompleteSpace H] (v : H) :
129
+ @Continuous (H →L[ℂ] H) H strongOperatorTopology inferInstance (fun T => T v) := by
130
+ let := strongOperatorTopology (H:=H)
131
+ exact (continuous_apply v).comp continuous_induced_dom
132
+
133
+ lemma StronglyClosed.mem_of_tendsto {A : StarSubalgebra ℂ (H →L[ℂ] H)}
134
+ (hA : StronglyClosed A) {ι : Type*} {l : Filter ι} [l.NeBot]
135
+ {T : ι → H →L[ℂ] H} {S : H →L[ℂ] H}
136
+ (hT : ∀ᶠ i in l, T i ∈ A) (hlim : ∀ v, Tendsto (fun i => T i v) l (𝓝 (S v))) :
137
+ S ∈ A := by
138
+ let := strongOperatorTopology (H:=H)
139
+ refine IsClosed.mem_of_tendsto hA (f:=T) ?_ hT
140
+ change Tendsto T l (@nhds (H →L[ℂ] H) (TopologicalSpace.induced _ _) S)
141
+ rw [nhds_induced,Filter.tendsto_comap_iff]
142
+ exact tendsto_pi_nhds.mpr hlim
143
+
144
+
145
+ def strongGenerated (s : Set (H →L[ℂ] H)) : StarSubalgebra ℂ (H →L[ℂ] H) :=
146
+ sInf {A | StronglyClosed A ∧ s ⊆ A}
147
+ lemma mem_strongGenerated {s : Set (H →L[ℂ] H)} {T : H →L[ℂ] H} :
148
+ T ∈ strongGenerated s ↔ ∀ A : StarSubalgebra ℂ (H →L[ℂ] H),
149
+ StronglyClosed A → s ⊆ A → T ∈ A := by
150
+ simp [strongGenerated,StarSubalgebra.mem_sInf]
151
+ lemma subset_strongGenerated (s : Set (H →L[ℂ] H)) : s ⊆ strongGenerated s := by
152
+ intro T hT
153
+ exact mem_strongGenerated.mpr fun _ _ hs => hs hT
154
+ lemma strongGenerated_le {s : Set (H →L[ℂ] H)} {A : StarSubalgebra ℂ (H →L[ℂ] H)}
155
+ (hA : StronglyClosed A) (hs : s ⊆ A) : strongGenerated s ≤ A :=
156
+ fun _ hT => mem_strongGenerated.mp hT A hA hs
157
+ lemma strongGenerated_closed (s : Set (H →L[ℂ] H)) : StronglyClosed (strongGenerated s) := by
158
+ let := strongOperatorTopology (H:=H)
159
+ have he : (strongGenerated s : Set (H →L[ℂ] H)) =
160
+ ⋂ A : StarSubalgebra ℂ (H →L[ℂ] H), ⋂ (_ : StronglyClosed A ∧ s ⊆ A), (A : Set _) := by
161
+ ext T
162
+ simp [mem_strongGenerated]
163
+ rw [StronglyClosed,he]
164
+ exact isClosed_iInter fun A => isClosed_iInter fun h => h.1
165
+ lemma strongGenerated_mono {s t : Set (H →L[ℂ] H)} (hst : s ⊆ t) :
166
+ strongGenerated s ≤ strongGenerated t :=
167
+ strongGenerated_le (strongGenerated_closed t) (hst.trans (subset_strongGenerated t))
168
+
169
+ lemma strong_centralizer_closed (s : Set (H →L[ℂ] H)) :
170
+ StronglyClosed (StarSubalgebra.centralizer ℂ s) := by
171
+ let := strongOperatorTopology (H:=H)
172
+ have he : (StarSubalgebra.centralizer ℂ s : Set (H →L[ℂ] H)) =
173
+ ⋂ A ∈ s ∪ star s, ⋂ v : H, {T | A (T v) = T (A v)} := by
174
+ ext T
175
+ change (∀ A ∈ s ∪ star s, A*T=T*A) ↔ _
176
+ simp only [mem_iInter,mem_ofPred_eq]
177
+ exact forall₂_congr fun A hA => ⟨fun h v => DFunLike.congr_fun h v,
178
+ fun h => ContinuousLinearMap.ext h⟩
179
+ rw [StronglyClosed,he]
180
+ exact isClosed_iInter fun A => isClosed_iInter fun _ => isClosed_iInter fun v =>
181
+ isClosed_eq (A.continuous.comp (strong_continuous_apply v)) (strong_continuous_apply (A v))
182
+
183
+
184
+ lemma strongGenerated_commutative {s : Set (H →L[ℂ] H)}
185
+ (hs : ∀ A ∈ s, IsSelfAdjoint A) (hc : ∀ A ∈ s, ∀ B ∈ s, A*B=B*A) :
186
+ ∀ A ∈ strongGenerated s, ∀ B ∈ strongGenerated s, A*B=B*A := by
187
+ have hle : strongGenerated s ≤ StarSubalgebra.centralizer ℂ s := by
188
+ apply strongGenerated_le (strong_centralizer_closed s)
189
+ intro B hB
190
+ apply (StarSubalgebra.mem_centralizer_iff ℂ).mpr
191
+ intro A hA
192
+ exact ⟨hc A hA B hB, by rw [(hs A hA).star_eq]; exact hc A hA B hB⟩
193
+ have hle' : strongGenerated s ≤ StarSubalgebra.centralizer ℂ (strongGenerated s : Set _) := by
194
+ apply strongGenerated_le (strong_centralizer_closed _)
195
+ intro B hB
196
+ apply (StarSubalgebra.mem_centralizer_iff ℂ).mpr
197
+ intro A hA
198
+ refine ⟨((StarSubalgebra.mem_centralizer_iff ℂ).mp (hle hA) B hB).1.symm, ?_⟩
199
+ exact ((StarSubalgebra.mem_centralizer_iff ℂ).mp (hle ((strongGenerated s).star_mem' hA)) B hB).1.symm
200
+ intro A hA B hB
201
+ exact ((StarSubalgebra.mem_centralizer_iff ℂ).mp (hle' hB) A hA).1
202
+
203
+
204
+
205
+ end
206
+ end BackwardIntertwiners
207
+
208
+ end OAI
lean/OAI/Analysis/BackwardIntertwiners/WeightSeparation.lean ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BackwardIntertwiners.CoefficientSupport
2
+
3
+ namespace OAI
4
+
5
+ namespace BackwardIntertwiners
6
+ open Filter
7
+ open scoped Topology
8
+ noncomputable section
9
+
10
+
11
+ structure QuadraticWeights (w : ℤ → ℝ) : Prop where
12
+ positive : ∀ j, 0 < w j
13
+ decreasing : Antitone w
14
+ convex_negative : DiscreteConvex (fun n => Real.log (w (-(n : ℤ))))
15
+ concave_positive : DiscreteConvex (fun n => -Real.log (w n))
16
+ root_sum : Summable (fun j : ℤ => if j = 0 then 0 else w j ^ (1 / (j : ℝ)))
17
+ quadratic : ∃ a : ℝ, Real.log 3 < a ∧
18
+ Tendsto (fun n : ℕ => Real.log (w n) / (n : ℝ)^2) atTop (𝓝 (-a)) ∧
19
+ Tendsto (fun n : ℕ => Real.log (w (-(n : ℤ))) / (n : ℝ)^2) atTop (𝓝 a)
20
+
21
+
22
+ def SupportSeparation (w : ℤ → ℝ) : Prop :=
23
+ ∀ b c : ℤ → ℂ,
24
+ (∃ j, b j ≠ 0) → (∃ j, c j ≠ 0) →
25
+ (∀ j, ‖b j‖ ≤ w j) → (∀ j, ‖c j‖ * w j ≤ 1) →
26
+ (∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j - r)) = 0) →
27
+ ∃ t h : ℤ, b t ≠ 0 ∧ c h ≠ 0 ∧
28
+ (∀ j, t < j → b j = 0) ∧ (∀ j, j < h → c j = 0) ∧ t ≤ h
29
+
30
+ def reflectedWeight (w : ℤ → ℝ) (j : ℤ) : ℝ := (w (-j))⁻¹
31
+
32
+ lemma reflectedWeight_pos {w : ℤ → ℝ} (hw : ∀ j, 0 < w j) (j : ℤ) :
33
+ 0 < reflectedWeight w j := inv_pos.mpr (hw _)
34
+
35
+ lemma reflectedWeight_antitone {w : ℤ → ℝ} (hw : ∀ j, 0 < w j) (hdec : Antitone w) :
36
+ Antitone (reflectedWeight w) := by
37
+ intro i j hij
38
+ exact (inv_le_inv₀ (hw _) (hw _)).mpr (hdec (neg_le_neg hij))
39
+
40
+ lemma reflected_positiveLog (w : ℤ → ℝ) : positiveLog (reflectedWeight w) = negativeLog w := by
41
+ funext n
42
+ simp [positiveLog, negativeLog, reflectedWeight, Real.log_inv]
43
+
44
+ lemma reflected_negativeLog (w : ℤ → ℝ) : negativeLog (reflectedWeight w) = positiveLog w := by
45
+ funext n
46
+ simp [positiveLog, negativeLog, reflectedWeight, Real.log_inv]
47
+
48
+ lemma reflected_stepRatio_summable {w : ℤ → ℝ} (hs : Summable (stepRatio w)) :
49
+ Summable (stepRatio (reflectedWeight w)) := by
50
+ have hh := hs.comp_injective (i := fun j : ℤ => -j-1) (by
51
+ intro a b hab; dsimp only at hab; omega)
52
+ apply hh.congr
53
+ intro j
54
+ dsimp [stepRatio, reflectedWeight]
55
+ have e₁ : -j-1+1 = -j := by omega
56
+ have e₂ : -(j+1) = -j-1 := by omega
57
+ rw [e₁, e₂, inv_div_inv]
58
+
59
+ lemma reflected_correlations {b c : ℤ → ℂ}
60
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) :
61
+ ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, c (-j) * b (-(j-r))) = 0 := by
62
+ intro r hr
63
+ let e : ℤ ≃ ℤ := ⟨fun j => (r:ℤ)-j, fun j => (r:ℤ)-j, by intro j; dsimp only; omega, by intro j; dsimp only; omega⟩
64
+ calc (∑' j : ℤ, c (-j) * b (-(j-r))) =
65
+ ∑' j : ℤ, b (e j) * c (e j-r) := by
66
+ apply tsum_congr
67
+ intro j
68
+ dsimp [e]
69
+ have e₁ : (r:ℤ)-j = -(j-r) := by omega
70
+ have e₂ : (r:ℤ)-j-r = -j := by omega
71
+ rw [e₁, show -(j-(r:ℤ))-(r:ℤ) = -j by omega, mul_comm]
72
+ _ = ∑' j : ℤ, b j * c (j-r) := e.tsum_eq (fun j : ℤ => b j * c (j-r))
73
+ _ = 0 := hz r hr
74
+
75
+ lemma reflected_bounds {w : ℤ → ℝ} (hw : ∀ j, 0 < w j) {b c : ℤ → ℂ}
76
+ (hb : ∀ j, ‖b j‖ ≤ w j) (hc : ∀ j, ‖c j‖*w j ≤ 1) :
77
+ (∀ j, ‖c (-j)‖ ≤ reflectedWeight w j) ∧
78
+ (∀ j, ‖b (-j)‖*reflectedWeight w j ≤ 1) := by
79
+ constructor
80
+ · intro j
81
+ simpa only [reflectedWeight, one_div] using (le_div_iff₀ (hw (-j))).mpr (hc (-j))
82
+ · intro j
83
+ dsimp [reflectedWeight]
84
+ rw [← div_eq_mul_inv]
85
+ exact (div_le_one (hw _)).mpr (hb _)
86
+
87
+
88
+
89
+ theorem normalized_support_separation {w : ℤ → ℝ} (hw : ∀ j, 0 < w j)
90
+ (hdec : Antitone w) (hw0 : w 0 = 1)
91
+ (hP : DiscreteConvex (negativeLog w)) (hQ : DiscreteConvex (positiveLog w))
92
+ {lam δ : ℝ} (hlam : Real.log 3 < lam) (hδ : lam < δ)
93
+ (hqp : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ negativeLog w n)
94
+ (hqq : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ positiveLog w n) :
95
+ SupportSeparation w := by
96
+ intro b c hbn hcn hb hc hz
97
+ have hδ0 : 0 < δ := lt_trans (lt_trans (Real.log_pos (by norm_num : (1:ℝ)<3)) hlam) hδ
98
+ have hP0 : negativeLog w 0 = 0 := by simp [negativeLog, hw0]
99
+ have hQ0 : positiveLog w 0 = 0 := by simp [positiveLog, hw0]
100
+ have hs := stepRatio_summable hw hw0 hP hQ hδ0 hqp hqq
101
+ have hb_bd : ∃ m : ℤ, ∀ j : ℤ, b j ≠ 0 → j ≤ m := by
102
+ by_cases hc_bd : ∃ m : ℤ, ∀ j : ℤ, c j ≠ 0 → m ≤ j
103
+ · obtain ⟨h, hch, hh⟩ := Int.exists_least_of_bdd hc_bd hcn
104
+ apply bounded_above_of_min hw hdec hw0 hs hQ hδ0 hqq hb hc hch ?_ hz
105
+ intro j hj
106
+ by_contra hne
107
+ have := hh j hne
108
+ omega
109
+ · by_contra hbu
110
+ have hcu : ¬∃ m : ℤ, ∀ j : ℤ, c (-j) ≠ 0 → j ≤ m := by
111
+ rintro ⟨m, hm⟩
112
+ apply hc_bd
113
+ refine ⟨-m, ?_⟩
114
+ intro j hj
115
+ have hh := hm (-j) (by simpa using hj)
116
+ omega
117
+ exact no_both_unbounded (bounds_of_weight hw hb hc) hP hQ hP0 hQ0 hlam hδ hqp hqq
118
+ (nat_support_unbounded hbu) (nat_support_unbounded hcu) hz
119
+ obtain ⟨t, hbt, ht⟩ := Int.exists_greatest_of_bdd hb_bd hbn
120
+ have hc_bd : ∃ m : ℤ, ∀ j : ℤ, c j ≠ 0 → m ≤ j := by
121
+ have hwr0 : reflectedWeight w 0 = 1 := by simp [reflectedWeight, hw0]
122
+ have hQr : DiscreteConvex (positiveLog (reflectedWeight w)) := by
123
+ rw [reflected_positiveLog]; exact hP
124
+ have hqpr : ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ positiveLog (reflectedWeight w) n := by
125
+ simpa only [reflected_positiveLog] using hqp
126
+ obtain ⟨hbr, hcr⟩ := reflected_bounds hw hb hc
127
+ have hzref := reflected_correlations hz
128
+ have hm := bounded_above_of_min (reflectedWeight_pos hw) (reflectedWeight_antitone hw hdec)
129
+ hwr0 (reflected_stepRatio_summable hs) hQr hδ0 hqpr hbr hcr
130
+ (h := -t) (by simpa using hbt) (by
131
+ intro j hj
132
+ by_contra hne
133
+ have hh := ht (-j) hne
134
+ omega) hzref
135
+ obtain ⟨m, hm⟩ := hm
136
+ refine ⟨-m, ?_⟩
137
+ intro j hj
138
+ have hh := hm (-j) (by simpa using hj)
139
+ omega
140
+ obtain ⟨h, hch, hh⟩ := Int.exists_least_of_bdd hc_bd hcn
141
+ have hbmax : ∀ j : ℤ, t < j → b j = 0 := by
142
+ intro j hj
143
+ by_contra hne
144
+ have := ht j hne
145
+ omega
146
+ have hcmin : ∀ j : ℤ, j < h → c j = 0 := by
147
+ intro j hj
148
+ by_contra hne
149
+ have := hh j hne
150
+ omega
151
+ refine ⟨t, h, hbt, hch, hbmax, hcmin, ?_⟩
152
+ by_contra! hth
153
+ let r := (t-h).toNat
154
+ have hr : 1 ≤ r := by dsimp [r]; omega
155
+ have hri : (r:ℤ) = t-h := by dsimp [r]; omega
156
+ have he : (∑' j : ℤ, b j * c (j-r)) = b t * c h := by
157
+ rw [tsum_eq_single t]
158
+ · congr 2
159
+ omega
160
+ · intro j hj
161
+ by_cases hbj : b j = 0
162
+ · simp [hbj]
163
+ · have htj := ht j hbj
164
+ rw [hcmin _ (by omega), mul_zero]
165
+ have hzero := hz r hr
166
+ rw [he] at hzero
167
+ exact (mul_ne_zero hbt hch) hzero
168
+
169
+ lemma DiscreteConvex.add_const {G : ℕ → ℝ} (h : DiscreteConvex G) (c : ℝ) :
170
+ DiscreteConvex (fun n => G n+c) := by
171
+ intro i j hij
172
+ simpa only [add_sub_add_right_eq_sub] using h hij
173
+
174
+ lemma eventually_quadratic_lower {G : ℕ → ℝ} {a δ : ℝ} (hδa : δ < a)
175
+ (ht : Tendsto (fun n => G n / (n:ℝ)^2) atTop (𝓝 a)) :
176
+ ∀ᶠ n : ℕ in atTop, δ*(n:ℝ)^2 ≤ G n := by
177
+ filter_upwards [ht (eventually_gt_nhds hδa), eventually_ge_atTop 1] with n hn hn1
178
+ have hnpos : 0 < (n:ℝ)^2 := sq_pos_of_pos (Nat.cast_pos.mpr (by omega))
179
+ exact ((lt_div_iff₀ hnpos).mp hn).le
180
+
181
+
182
+
183
+
184
+ theorem quadratic_support_separation (w : ℤ → ℝ) (hw : QuadraticWeights w) :
185
+ SupportSeparation w := by
186
+ let W := fun j : ℤ => w j / w 0
187
+ have hw0 : 0 < w 0 := hw.positive 0
188
+ have hWpos (j : ℤ) : 0 < W j := div_pos (hw.positive j) hw0
189
+ have hWdec : Antitone W := by
190
+ intro i j hij
191
+ exact div_le_div_of_nonneg_right (hw.decreasing hij) hw0.le
192
+ have hW0 : W 0 = 1 := div_self (ne_of_gt hw0)
193
+ have hlog (j : ℤ) : Real.log (w j / w 0) = Real.log (w j) - Real.log (w 0) :=
194
+ Real.log_div (ne_of_gt (hw.positive j)) (ne_of_gt hw0)
195
+ have hP : DiscreteConvex (negativeLog W) := by
196
+ have heq : negativeLog W = fun n : ℕ => Real.log (w (-(n:ℤ))) + -Real.log (w 0) := by
197
+ funext n
198
+ simp only [negativeLog, W, hlog, sub_eq_add_neg]
199
+ rw [heq]
200
+ exact hw.convex_negative.add_const _
201
+ have hQ : DiscreteConvex (positiveLog W) := by
202
+ have heq : positiveLog W = fun n : ℕ => -Real.log (w n) + Real.log (w 0) := by
203
+ funext n
204
+ simp only [positiveLog, W, hlog]
205
+ ring
206
+ rw [heq]
207
+ exact hw.concave_positive.add_const _
208
+ obtain ⟨a, ha, hqa, hpa⟩ := hw.quadratic
209
+ have hnat : Tendsto (fun n : ℕ => (n:ℝ)^2) atTop atTop := by
210
+ exact (tendsto_pow_atTop (by norm_num : 2 ≠ 0)).comp tendsto_natCast_atTop_atTop
211
+ have hsmall : Tendsto (fun n : ℕ => Real.log (w 0) / (n:ℝ)^2) atTop (𝓝 0) := by
212
+ simpa only [div_eq_mul_inv, mul_zero, Function.comp_def] using
213
+ (tendsto_inv_atTop_zero.comp hnat).const_mul (Real.log (w 0))
214
+ have htP : Tendsto (fun n : ℕ => negativeLog W n / (n:ℝ)^2) atTop (𝓝 a) := by
215
+ simpa only [negativeLog, W, hlog, sub_div, sub_zero] using hpa.sub hsmall
216
+ have htQ : Tendsto (fun n : ℕ => positiveLog W n / (n:ℝ)^2) atTop (𝓝 a) := by
217
+ have heq : (fun n : ℕ => positiveLog W n / (n:ℝ)^2) =
218
+ (fun n : ℕ => -(Real.log (w n) / (n:ℝ)^2) + Real.log (w 0) / (n:ℝ)^2) := by
219
+ funext n
220
+ simp only [positiveLog, W, hlog]
221
+ ring
222
+ rw [heq]
223
+ simpa only [neg_neg, add_zero] using hqa.neg.add hsmall
224
+ obtain ⟨lam, hlam, hlama⟩ := exists_between ha
225
+ obtain ⟨δ, hδ, hδa⟩ := exists_between hlama
226
+ have hsep := normalized_support_separation hWpos hWdec hW0 hP hQ hlam hδ
227
+ (eventually_quadratic_lower hδa htP) (eventually_quadratic_lower hδa htQ)
228
+ intro b c hbn hcn hb hc hz
229
+ let C : ℂ := (w 0 : ℂ)
230
+ have hC : C ≠ 0 := by dsimp [C]; exact_mod_cast (ne_of_gt hw0)
231
+ have hCnorm : ‖C‖ = w 0 := by simpa [C] using Real.norm_of_nonneg hw0.le
232
+ let b' := fun j => b j / C
233
+ let c' := fun j => C * c j
234
+ have hbn' : ∃ j, b' j ≠ 0 := by
235
+ obtain ⟨j, hj⟩ := hbn
236
+ exact ⟨j, div_ne_zero hj hC⟩
237
+ have hcn' : ∃ j, c' j ≠ 0 := by
238
+ obtain ⟨j, hj⟩ := hcn
239
+ exact ⟨j, mul_ne_zero hC hj⟩
240
+ have hb' (j : ℤ) : ‖b' j‖ ≤ W j := by
241
+ dsimp [b', W]
242
+ rw [norm_div, hCnorm]
243
+ exact div_le_div_of_nonneg_right (hb j) hw0.le
244
+ have hc' (j : ℤ) : ‖c' j‖ * W j ≤ 1 := by
245
+ dsimp [c', W]
246
+ rw [norm_mul, hCnorm]
247
+ have he : w 0 * ‖c j‖ * (w j / w 0) = ‖c j‖ * w j := by field_simp
248
+ rw [he]
249
+ exact hc j
250
+ have hz' (r : ℕ) (hr : 1 ≤ r) : (∑' j : ℤ, b' j * c' (j-r)) = 0 := by
251
+ have he (j : ℤ) : b' j * c' (j-r) = b j * c (j-r) := by
252
+ dsimp [b', c']
253
+ field_simp
254
+ simp only [he]
255
+ exact hz r hr
256
+ have hh := hsep b' c' hbn' hcn' hb' hc' hz'
257
+ simpa [b', c', hC] using hh
258
+
259
+
260
+ lemma SupportSeparation.of_bounded {w : ℤ → ℝ} (hsep : SupportSeparation w)
261
+ {b c : ℤ → ℂ} (hbn : ∃ j, b j ≠ 0) (hcn : ∃ j, c j ≠ 0)
262
+ {B C : ℝ} (hB : 0 < B) (hC : 0 < C)
263
+ (hb : ∀ j, ‖b j‖ ≤ B*w j) (hc : ∀ j, ‖c j‖*w j ≤ C)
264
+ (hz : ∀ r : ℕ, 1 ≤ r → (∑' j : ℤ, b j * c (j-r)) = 0) :
265
+ ∃ t h : ℤ, b t ≠ 0 ∧ c h ≠ 0 ∧
266
+ (∀ j, t < j → b j = 0) ∧ (∀ j, j < h → c j = 0) ∧ t ≤ h := by
267
+ have hBC : (B:ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt hB)
268
+ have hCC : (C:ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt hC)
269
+ let b' := fun j => b j / (B:ℂ)
270
+ let c' := fun j => c j / (C:ℂ)
271
+ have hbn' : ∃ j, b' j ≠ 0 := by
272
+ obtain ⟨j, hj⟩ := hbn
273
+ exact ⟨j, div_ne_zero hj hBC⟩
274
+ have hcn' : ∃ j, c' j ≠ 0 := by
275
+ obtain ⟨j, hj⟩ := hcn
276
+ exact ⟨j, div_ne_zero hj hCC⟩
277
+ have hb' (j : ℤ) : ‖b' j‖ ≤ w j := by
278
+ dsimp [b']
279
+ rw [norm_div, Complex.norm_real, Real.norm_of_nonneg hB.le]
280
+ exact (div_le_iff₀ hB).mpr (by simpa only [mul_comm] using hb j)
281
+ have hc' (j : ℤ) : ‖c' j‖*w j ≤ 1 := by
282
+ dsimp [c']
283
+ rw [norm_div, Complex.norm_real, Real.norm_of_nonneg hC.le, div_mul_eq_mul_div]
284
+ exact (div_le_one hC).mpr (hc j)
285
+ have hz' (r : ℕ) (hr : 1 ≤ r) : (∑' j : ℤ, b' j * c' (j-r)) = 0 := by
286
+ have he (j : ℤ) : b' j * c' (j-r) = (b j*c (j-r)) / ((B:ℂ)*(C:ℂ)) := by
287
+ dsimp [b', c']; ring
288
+ simp only [he, tsum_div_const, hz r hr, zero_div]
289
+ have hh := hsep b' c' hbn' hcn' hb' hc' hz'
290
+ simpa [b', c', hBC, hCC] using hh
291
+
292
+
293
+ end
294
+ end BackwardIntertwiners
295
+
296
+ end OAI
lean/OAI/Analysis/BernoulliCone/BoundedCalibration.lean ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.ExteriorCalibration
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+
11
+ def upperFlux (p:Space 7×ℝ) : Space 7 :=
12
+ if U p.1<p.2 then
13
+ κ • (if Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≤1
14
+ then gradient smoothCap ((upperParameter p.1 p.2)⁻¹ • p.1)
15
+ else gradient outerSigned ((upperParameter p.1 p.2)⁻¹ • p.1))
16
+ else 0
17
+ lemma upperParameter_signed_pos {p:Space 7×ℝ} (hp:U p.1<p.2) :
18
+ 0<upperSigned ((upperParameter p.1 p.2)⁻¹ • p.1) := by
19
+ obtain ⟨hl,he⟩:=upperParameter_spec hp
20
+ have hpos:0<upperFamily (upperParameter p.1 p.2) p.1:=by
21
+ rw [he]; exact (U_nonneg _).trans_lt hp
22
+ have hh:0 < max (upperSigned ((upperParameter p.1 p.2)⁻¹ • p.1)) 0:=
23
+ pos_of_mul_pos_right hpos (mul_nonneg κ_pos.le hl.le)
24
+ simpa using hh
25
+ lemma upperFlux_uniform_bound : ∃C:ℝ,0<C ∧ ∀p:Space 7×ℝ,‖upperFlux p‖≤C := by
26
+ obtain ⟨C,hC,hcap⟩:=cap_gradient_uniform_bound
27
+ obtain ⟨D,hD,hext⟩:=outer_gradient_uniform_bound
28
+ refine ⟨κ*(C+D),mul_pos κ_pos (add_pos hC hD),?_⟩
29
+ intro p
30
+ by_cases hp:U p.1<p.2
31
+ · have hpos:=upperParameter_signed_pos hp
32
+ rw [upperFlux,ite_eq_left hp,norm_smul,Real.norm_eq_abs,abs_of_pos κ_pos]
33
+ apply mul_le_mul_of_nonneg_left _ κ_pos.le
34
+ split_ifs with hq
35
+ · rw [upperSigned_cap hq] at hpos
36
+ exact (hcap _ hq hpos).trans (by linarith)
37
+ · have hq':1≤Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1):=
38
+ (lt_of_not_ge hq).le
39
+ rw [upperSigned_outer hq'] at hpos
40
+ exact (hext _ hq' hpos).trans (by linarith)
41
+ · simp only [upperFlux,ite_eq_right hp,norm_zero]
42
+ exact mul_nonneg κ_pos.le (by linarith)
43
+ lemma upperSigned_gradient_cap {x:Space 7} (hq:Cylindrical.radiusSq axis x<1) :
44
+ gradient upperSigned x=gradient smoothCap x := by
45
+ have hc:ContinuousAt (Cylindrical.radiusSq axis) x:=
46
+ (Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt
47
+ have he:upperSigned =ᶠ[𝓝 x] smoothCap:=by
48
+ filter_upwards [hc.eventually (gt_mem_nhds hq)] with y hy
49
+ exact upperSigned_cap hy.le
50
+ exact congrArg ((toDual ℝ (Space 7)).symm) he.fderiv_eq
51
+ lemma upperSigned_gradient_outer {x:Space 7} (hq:1<Cylindrical.radiusSq axis x) :
52
+ gradient upperSigned x=gradient outerSigned x := by
53
+ have hc:ContinuousAt (Cylindrical.radiusSq axis) x:=
54
+ (Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt
55
+ have he:upperSigned =ᶠ[𝓝 x] outerSigned:=by
56
+ filter_upwards [hc.eventually (lt_mem_nhds hq)] with y hy
57
+ exact upperSigned_outer hy.le
58
+ exact congrArg ((toDual ℝ (Space 7)).symm) he.fderiv_eq
59
+ lemma upperFlux_eq_calibration {p:Space 7×ℝ} (hp:U p.1<p.2)
60
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≠1) :
61
+ upperFlux p=upperCalibration p := by
62
+ rw [upperCalibration_eq hp hq,upperFlux,ite_eq_left hp]
63
+ congr 1
64
+ rcases lt_or_gt_of_ne hq with h|h
65
+ · rw [ite_eq_left h.le,upperSigned_gradient_cap h]
66
+ · rw [ite_eq_right (not_le.mpr h),upperSigned_gradient_outer h]
67
+ lemma upperFlux_eventually_eq {p:Space 7×ℝ} (hp:U p.1<p.2)
68
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≠1) :
69
+ upperFlux =ᶠ[𝓝 p] upperCalibration := by
70
+ have hn:∀ᶠ z:Space 7×ℝ in 𝓝 p,U z.1<z.2:=
71
+ (U_continuous.continuousAt.comp continuous_fst.continuousAt).eventually_lt
72
+ continuous_snd.continuousAt hp
73
+ have hl:upperParameter p.1 p.2≠0:=(upperParameter_spec hp).1.ne'
74
+ have hc:ContinuousAt (fun z:Space 7×ℝ=>
75
+ Cylindrical.radiusSq axis ((upperParameter z.1 z.2)⁻¹ • z.1)) p:=
76
+ (Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt.comp
77
+ (((upperParameter_contDiffAt hp hq).continuousAt.inv₀ hl).smul continuous_fst.continuousAt)
78
+ filter_upwards [hn,hc.eventually_ne hq] with z hz hzq
79
+ exact upperFlux_eq_calibration hz hzq
80
+ lemma upperFlux_contDiffAt {p:Space 7×ℝ} (hp:U p.1<p.2)
81
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≠1) :
82
+ ContDiffAt ℝ ∞ upperFlux p :=
83
+ (upperCalibration_contDiffAt hp hq).congr_of_eventuallyEq (upperFlux_eventually_eq hp hq)
84
+ lemma upperParameter_measurable : Measurable (fun z:Space 7×ℝ=>upperParameter z.1 z.2) := by
85
+ let S:Set (Space 7×ℝ):={z|U z.1<z.2}
86
+ have hS:IsOpen S:=isOpen_lt (U_continuous.comp continuous_fst) continuous_snd
87
+ have hh:Measurable (S.piecewise (fun z=>upperParameter z.1 z.2) (fun _=>0)):=
88
+ upperParameter_continuousOn.measurable_piecewise continuousOn_const hS.measurableSet
89
+ convert hh using 1
90
+ ext z
91
+ by_cases hz:U z.1<z.2
92
+ · simp [S,hz]
93
+ · simp [S,hz,upperParameter]
94
+ lemma upperFlux_measurable : Measurable upperFlux := by
95
+ have hi:Measurable (fun z:Space 7×ℝ=>(upperParameter z.1 z.2)⁻¹ • z.1):=
96
+ upperParameter_measurable.inv.smul measurable_fst
97
+ have hq:Measurable (fun z:Space 7×ℝ=>Cylindrical.radiusSq axis ((upperParameter z.1 z.2)⁻¹ • z.1)):=
98
+ (Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.measurable.comp hi
99
+ have h1:MeasurableSet {z:Space 7×ℝ|U z.1<z.2}:=
100
+ measurableSet_lt (U_continuous.measurable.comp measurable_fst) measurable_snd
101
+ have h2:MeasurableSet {z:Space 7×ℝ|Cylindrical.radiusSq axis ((upperParameter z.1 z.2)⁻¹ • z.1)≤1}:=
102
+ measurableSet_le hq measurable_const
103
+ exact ((LipschitzSobolev.measurable_gradient.comp hi).ite h2
104
+ (LipschitzSobolev.measurable_gradient.comp hi)).const_smul κ |>.ite h1 measurable_const
105
+
106
+ /-- The height primitive is integrable and has linear growth, using the actual
107
+ field's uniform bound, independently of seam choices. -/
108
+ lemma upperFlux_intervalIntegrable (x:Space 7) (a b:ℝ) :
109
+ IntervalIntegrable (fun s:ℝ=>upperFlux (x,s)) MeasureTheory.volume a b := by
110
+ obtain ⟨C,hC,hbound⟩:=upperFlux_uniform_bound
111
+ rw [intervalIntegrable_iff]
112
+ apply MeasureTheory.Integrable.mono' (g:=fun _:ℝ=>C)
113
+ (intervalIntegrable_const (a:=a) (b:=b) (c:=C)).def'
114
+ · exact (upperFlux_measurable.comp (measurable_const.prodMk measurable_id)).aestronglyMeasurable
115
+ · exact Filter.Eventually.of_forall fun s=>hbound (x,s)
116
+ end Bernoulli.DeSilvaJerison
117
+
118
+ end
119
+ end
120
+
121
+ end OAI
lean/OAI/Analysis/BernoulliCone/CalibrationTraces.lean ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.OuterSlope
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff Laplacian
9
+ namespace Bernoulli.DeSilvaJerison
10
+ lemma gradient_dilation {f:Space 7→ℝ} {x:Space 7} {l:ℝ} (hl:l≠0)
11
+ (hf:DifferentiableAt ℝ f (l⁻¹ • x)) :
12
+ gradient (fun y=>κ*l*f (l⁻¹ • y)) x=κ • gradient f (l⁻¹ • x) := by
13
+ have hd:HasFDerivAt (fun y:Space 7=>l⁻¹ • y)
14
+ (l⁻¹ • ContinuousLinearMap.id ℝ (Space 7)) x := (hasFDerivAt_id x).const_smul l⁻¹
15
+ have hh:HasFDerivAt (fun y:Space 7=>κ*l*f (l⁻¹ • y))
16
+ ((κ*l) • (fderiv ℝ f (l⁻¹ • x) ∘L (l⁻¹ • ContinuousLinearMap.id ℝ (Space 7)))) x :=
17
+ (hf.hasFDerivAt.comp x hd).const_mul (κ*l)
18
+ apply ext_inner_right ℝ
19
+ intro v
20
+ rw [inner_gradient_left,hh.fderiv,real_inner_smul_left,inner_gradient_left]
21
+ simp only [smul_apply,ContinuousLinearMap.comp_apply,
22
+ ContinuousLinearMap.id_apply,map_smul,smul_eq_mul]
23
+ field_simp
24
+
25
+ lemma upperFamily_gradient {x:Space 7} {l:ℝ} (hl:0<l)
26
+ (hp:0<upperFamily l x) (hq:Cylindrical.radiusSq axis (l⁻¹ • x)≠1) :
27
+ gradient (upperFamily l) x=κ • gradient upperSigned (l⁻¹ • x) := by
28
+ have hf:ContDiffAt ℝ ∞ upperSigned (l⁻¹ • x):=upperSigned_contDiffAt hq
29
+ have hs:ContinuousAt (fun y:Space 7=>upperSigned (l⁻¹ • y)) x:=
30
+ hf.continuousAt.comp ((continuous_id.const_smul l⁻¹).continuousAt)
31
+ have hpos:0<upperSigned (l⁻¹ • x):=by
32
+ have hh:0 < max (upperSigned (l⁻¹ • x)) 0:=pos_of_mul_pos_right hp (mul_nonneg κ_pos.le hl.le)
33
+ simpa using hh
34
+ have he:upperFamily l =ᶠ[𝓝 x] (fun y=>κ*l*upperSigned (l⁻¹ • y)) := by
35
+ filter_upwards [hs.eventually (lt_mem_nhds hpos)] with y hy
36
+ exact congrArg (κ*l* ·) (max_eq_left hy.le)
37
+ rw [gradient,he.fderiv_eq]
38
+ exact gradient_dilation hl.ne' (hf.differentiableAt (by simp))
39
+
40
+ lemma upperCalibration_eq {p:Space 7×ℝ} (hp:U p.1<p.2)
41
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≠1) :
42
+ upperCalibration p=κ • gradient upperSigned ((upperParameter p.1 p.2)⁻¹ • p.1) := by
43
+ obtain ⟨hl,he⟩:=upperParameter_spec hp
44
+ have hpos:0<upperFamily (upperParameter p.1 p.2) p.1:=by rw [he]; exact (U_nonneg _).trans_lt hp
45
+ rw [upperCalibration,Foliation.spatialGradient_eq
46
+ ((upperFamily_contDiffAt_swap hl hpos hq).differentiableAt (by simp))]
47
+ exact upperFamily_gradient hl hpos hq
48
+
49
+ lemma capH_eq_zero_iff (s:ℝ) : capH s=0 ↔ |s|=3/4 := by
50
+ constructor
51
+ · intro hs
52
+ have h1:(|s|≤3/4):=(capH_nonneg_iff s).mp (le_of_eq hs.symm)
53
+ have h2:¬|s|<3/4:=by intro h; have hp:=(capH_pos_iff s).mpr h; rw [hs] at hp; exact lt_irrefl _ hp
54
+ exact le_antisymm h1 (not_lt.mp h2)
55
+ · intro hs
56
+ have h1:0≤capH s:=(capH_nonneg_iff s).mpr hs.le
57
+ have h2:¬0<capH s:=by intro h; have hp:=(capH_pos_iff s).mp h; rw [hs] at hp; exact lt_irrefl _ hp
58
+ exact le_antisymm (not_lt.mp h2) h1
59
+
60
+ lemma smoothCap_zero_slope {x:Space 7} (hq:Cylindrical.radiusSq axis x≤1)
61
+ (hz:smoothCap x=0) : ‖gradient smoothCap x‖^2<c7 := by
62
+ have hq0:=Cylindrical.radiusSq_nonneg axis x axis_norm
63
+ have hv:0<CapAlgebra.V (Cylindrical.radiusSq axis x) capB:=
64
+ (CapAlgebra.V_bounds hq0 hq capB_bounds.1 capB_bounds.2).1
65
+ have hY:0<CapAlgebra.Y (Cylindrical.radiusSq axis x) capB capC:=
66
+ CapAlgebra.Y_pos hq0 hv capC_pos
67
+ have hh:capH (Cylindrical.axis axis x/CapAlgebra.V (Cylindrical.radiusSq axis x) capB)=0 := by
68
+ change CapAlgebra.Y _ _ _ * capH (_ * (CapAlgebra.V _ _)⁻¹)=0 at hz
69
+ simpa only [div_eq_mul_inv] using (mul_eq_zero.mp hz).resolve_left hY.ne'
70
+ exact smoothCap_boundary_slope_lt hq ((capH_eq_zero_iff _).mp hh)
71
+
72
+ lemma normalized_slope_lt {G:Space 7} (hG:‖G‖^2<c7) : ‖κ • G‖^2<1 := by
73
+ rw [norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,←κ_sq]
74
+ exact mul_lt_mul_of_pos_left hG (sq_pos_of_pos κ_pos)
75
+
76
+ theorem upper_free_boundary_slopes {x:Space 7} (hz:upperSigned x=0) :
77
+ (Cylindrical.radiusSq axis x≤1 → ‖κ • gradient smoothCap x‖^2<1) ∧
78
+ (1≤Cylindrical.radiusSq axis x → ‖κ • gradient outerSigned x‖^2<1) := by
79
+ constructor
80
+ · intro hq
81
+ exact normalized_slope_lt (smoothCap_zero_slope hq (by rwa [upperSigned_cap hq] at hz))
82
+ · intro hq
83
+ exact normalized_slope_lt (outer_zero_slope_lt hq (by rwa [upperSigned_outer hq] at hz))
84
+ end Bernoulli.DeSilvaJerison
85
+
86
+ end
87
+ end
88
+
89
+ end OAI
lean/OAI/Analysis/BernoulliCone/CapCalculus.lean ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.UpperSupport
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter
8
+ open scoped Topology ContDiff Laplacian
9
+ namespace Bernoulli.DeSilvaJerison
10
+ namespace CapAlgebra
11
+ lemma V_bounds {q b:ℝ} (hq:0≤q) (hq1:q≤1) (hb:2242/10000≤b) (hb1:b≤2243/10000) :
12
+ 0<V q b ∧ V q b≤1 := by
13
+ have hqq : q^2≤q := by nlinarith
14
+ have he : V q b=1-(1-q)*(b-3/200*(q+1)) := by unfold V; ring
15
+ have hl : 0≤b*q := mul_nonneg (by linarith) hq
16
+ constructor
17
+ · unfold V
18
+ nlinarith
19
+ · rw [he]
20
+ have hh : 0≤(1-q)*(b-3/200*(q+1)) := mul_nonneg (by linarith) (by linarith)
21
+ linarith
22
+ lemma hasDerivAt_V (q b:ℝ) : HasDerivAt (fun q=>V q b) (D q b/2) q := by
23
+ convert! (((hasDerivAt_const q (203/200-b)).add ((hasDerivAt_id q).const_mul b)).sub
24
+ (((hasDerivAt_id q).pow 2).const_mul (3/200))) using 1
25
+ dsimp [V,D]
26
+ ring
27
+ lemma hasDerivAt_D (q b:ℝ) : HasDerivAt (fun q=>D q b) (-3/50) q := by
28
+ convert! (hasDerivAt_const q (2*b)).sub ((hasDerivAt_id q).const_mul (3/50)) using 1
29
+ ring
30
+ lemma hasDerivAt_E (q b:ℝ) : HasDerivAt (fun q=>E q b) (-9/50) q := by
31
+ convert! (hasDerivAt_const q (2*b)).sub ((hasDerivAt_id q).const_mul (9/50)) using 1
32
+ ring
33
+ lemma hasDerivAt_H (q b:ℝ) : HasDerivAt (fun q=>H q b) (9/16*D q b*E q b) q := by
34
+ convert! (hasDerivAt_const q (1:ℝ)).add
35
+ ((((hasDerivAt_id q).const_mul (9/16)).mul ((hasDerivAt_D q b).pow 2))) using 1
36
+ dsimp [D,E]
37
+ ring
38
+ lemma V_contDiff (b:ℝ) {n:WithTop ℕ∞} : ContDiff ℝ n (fun q=>V q b) := by
39
+ exact (contDiff_const.add (contDiff_const.mul contDiff_id)).sub (contDiff_const.mul (contDiff_id.pow 2))
40
+ lemma H_contDiff (b:ℝ) {n:WithTop ℕ∞} : ContDiff ℝ n (fun q=>H q b) := by
41
+ exact contDiff_const.add ((contDiff_const.mul contDiff_id).mul
42
+ ((contDiff_const.sub (contDiff_const.mul contDiff_id)).pow 2))
43
+ /-- The cap prefactor in squared transverse coordinates. -/
44
+ def Y (q b C:ℝ) :ℝ := C*V q b/Real.sqrt (H q b)
45
+ def Y1 (q b C:ℝ) :ℝ :=
46
+ C*(D q b/2/Real.sqrt (H q b)-V q b*(9/16*D q b*E q b)/(2*(Real.sqrt (H q b))^3))
47
+ def Y2 (q b C:ℝ) :ℝ :=
48
+ C*((-3/100)/Real.sqrt (H q b)-D q b/2*(9/16*D q b*E q b)/(Real.sqrt (H q b))^3-
49
+ V q b*(9/16*((-3/50)*E q b+D q b*(-9/50)))/(2*(Real.sqrt (H q b))^3)+
50
+ 3*V q b*(9/16*D q b*E q b)^2/(4*(Real.sqrt (H q b))^5))
51
+ lemma Y_contDiffAt {q b C:ℝ} (hH:0<H q b) {n:WithTop ℕ∞} : ContDiffAt ℝ n (fun q=>Y q b C) q :=
52
+ (contDiffAt_const.mul (V_contDiff b (n:=n)).contDiffAt).div ((H_contDiff b (n:=n)).contDiffAt.sqrt hH.ne')
53
+ (Real.sqrt_pos.mpr hH).ne'
54
+ lemma hasDerivAt_Y {q b C:ℝ} (hH:0<H q b) : HasDerivAt (fun q=>Y q b C) (Y1 q b C) q := by
55
+ have hS:=Real.sqrt_pos.mpr hH
56
+ have hSsq:=Real.sq_sqrt hH.le
57
+ convert! ((hasDerivAt_V q b).const_mul C).div ((hasDerivAt_H q b).sqrt hH.ne') hS.ne' using 1
58
+ simp only [Y1]
59
+ field_simp
60
+ lemma hasDerivAt_Y1 {q b C:ℝ} (hH:0<H q b) : HasDerivAt (fun q=>Y1 q b C) (Y2 q b C) q := by
61
+ have hS:=Real.sqrt_pos.mpr hH
62
+ have hs := (hasDerivAt_H q b).sqrt hH.ne'
63
+ have hd := hasDerivAt_D q b
64
+ have he := hasDerivAt_E q b
65
+ have hv := hasDerivAt_V q b
66
+ convert! (((hd.div_const 2).div hs hS.ne').sub
67
+ ((hv.mul ((hd.const_mul (9/16)).mul he)).div ((hs.pow 3).const_mul 2) (mul_ne_zero (by norm_num) (pow_ne_zero _ hS.ne')))).const_mul C using 1
68
+ dsimp [Y1,Y2]
69
+ field_simp
70
+ ring
71
+ lemma deriv_Y {q b C:ℝ} (hH:0<H q b) : deriv (fun q=>Y q b C) q=Y1 q b C := (hasDerivAt_Y hH).deriv
72
+ lemma deriv2_Y {q b C:ℝ} (hH:0<H q b) : deriv (deriv (fun q=>Y q b C)) q=Y2 q b C := by
73
+ have hh : deriv (fun q=>Y q b C)=ᶠ[𝓝 q] fun q=>Y1 q b C := by
74
+ filter_upwards [(H_contDiff b (n:=∞)).continuous.continuousAt.eventually (Ioi_mem_nhds hH)] with t ht
75
+ exact deriv_Y ht
76
+ rw [hh.deriv_eq]
77
+ exact (hasDerivAt_Y1 hH).deriv
78
+ lemma hasDerivAt_invV {q b:ℝ} (hv:V q b≠0) :
79
+ HasDerivAt (fun q=>(V q b)⁻¹) (-D q b/(2*(V q b)^2)) q := by
80
+ convert! (hasDerivAt_V q b).inv hv using 1
81
+ ring
82
+ lemma deriv2_invV {q b:ℝ} (hv:V q b≠0) :
83
+ deriv (deriv (fun q=>(V q b)⁻¹)) q= (D q b)^2/(2*(V q b)^3)+3/(100*(V q b)^2) := by
84
+ have hh : deriv (fun q=>(V q b)⁻¹)=ᶠ[𝓝 q] fun q=>-D q b/(2*(V q b)^2) := by
85
+ filter_upwards [((V_contDiff b (n:=∞)).continuous.continuousAt.eventually_ne hv)] with t ht
86
+ exact (hasDerivAt_invV ht).deriv
87
+ rw [hh.deriv_eq]
88
+ have hd := ((hasDerivAt_D q b).neg.div (((hasDerivAt_V q b).pow 2).const_mul 2) (by positivity : 2*(V q b)^2≠0)).deriv
89
+ change deriv (fun q=>-D q b/(2*(V q b)^2)) q = _ at hd
90
+ rw [hd]
91
+ simp only [Pi.pow_apply,Pi.neg_apply]
92
+ field_simp
93
+ ring
94
+ lemma lap_Y {q b C:ℝ} (hV:V q b≠0) (hH:0<H q b) :
95
+ 4*q*Y2 q b C+12*Y1 q b C = Y q b C/V q b*(NN q b/(H q b)^2) := by
96
+ have hS := (Real.sqrt_pos.mpr hH).ne'
97
+ have hSq := Real.sq_sqrt hH.le
98
+ have hE : E q b=D q b-3/25*q := by unfold E D; ring
99
+ unfold Y Y1 Y2 NN MN
100
+ generalize hvv : V q b=v at *
101
+ generalize hdd : D q b=z at *
102
+ generalize hee : E q b=e at *
103
+ generalize hhh : H q b=h at *
104
+ have hdef : h=1+9/16*q*z^2 := by rw [←hhh, H, hdd]
105
+ field_simp [hS,hV,hH.ne']
106
+ ring_nf
107
+ simp only [show Real.sqrt h^4=h^2 by calc
108
+ _ = (Real.sqrt h^2)^2 := by ring
109
+ _ = _ := by rw [hSq], hSq]
110
+ rw [hE,hdef]
111
+ ring
112
+
113
+ lemma invV_mixed {q b C:ℝ} (hV:V q b≠0) (hH:0<H q b) :
114
+ Y q b C*(4*q*((D q b)^2/(2*(V q b)^3)+3/(100*(V q b)^2))+
115
+ 12*(-D q b/(2*(V q b)^2)))+8*q*Y1 q b C*(-D q b/(2*(V q b)^2)) =
116
+ -Y q b C/(V q b)^2*(MN q b/H q b) := by
117
+ have hS := (Real.sqrt_pos.mpr hH).ne'
118
+ have hSq := Real.sq_sqrt hH.le
119
+ have hE : E q b=D q b-3/25*q := by unfold E D; ring
120
+ unfold Y Y1 MN
121
+ generalize hvv : V q b=v at *
122
+ generalize hdd : D q b=z at *
123
+ generalize hee : E q b=e at *
124
+ generalize hhh : H q b=h at *
125
+ have hdef : h=1+9/16*q*z^2 := by rw [←hhh, H, hdd]
126
+ field_simp [hS,hV,hH.ne']
127
+ ring_nf
128
+ rw [hSq,hE,hdef]
129
+ ring
130
+
131
+ end CapAlgebra
132
+
133
+ lemma capH_contDiff : ContDiff ℝ ∞ capH := by
134
+ have hr : ContDiff ℝ ∞ capRadius := by
135
+ apply ContDiff.sqrt
136
+ · exact contDiff_const.add (contDiff_id.pow 2)
137
+ · intro x; positivity
138
+ have ht : ContDiff ℝ ∞ capAngle := contDiff_id.div hr (fun x=>(capRadius_pos x).ne')
139
+ have hf : ContDiff ℝ ∞ (fun s=>f (capAngle s)) := by
140
+ apply contDiff_iff_contDiffAt.mpr
141
+ intro s
142
+ exact (contDiffAt_f (capAngle_mem s)).comp s ht.contDiffAt
143
+ exact (hr.mul hf).add (contDiff_const.mul (contDiff_const.add (contDiff_const.mul (contDiff_id.pow 2))))
144
+
145
+ lemma deriv2_capH (s:ℝ) : deriv (deriv capH) s=-5*(capRadius s)^3+4*capAmplitude := by
146
+ have hh : deriv capH=capHP := funext fun t=>(hasDerivAt_capH t).deriv
147
+ rw [hh]
148
+ exact (hasDerivAt_capHP s).deriv
149
+
150
+ def capC :ℝ := Real.sqrt (1+9/16*capP^2)
151
+ def smoothCap (x:Space 7) :ℝ := Cylindrical.lift axis (fun q=>CapAlgebra.Y q capB capC)
152
+ (fun q=>(CapAlgebra.V q capB)⁻¹) capH x
153
+
154
+ lemma smoothCap_contDiffAt {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1) :
155
+ ContDiffAt ℝ ∞ smoothCap x := by
156
+ have hq:=Cylindrical.radiusSq_nonneg axis x axis_norm
157
+ have hv := (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
158
+ exact Cylindrical.contDiffAt_lift (CapAlgebra.Y_contDiffAt (CapAlgebra.H_pos hq))
159
+ ((CapAlgebra.V_contDiff capB).contDiffAt.inv hv.ne') capH_contDiff.contDiffAt
160
+
161
+ lemma laplacian_smoothCap {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1) :
162
+ let q := Cylindrical.radiusSq axis x
163
+ let V := CapAlgebra.V q capB
164
+ let ξ := Cylindrical.axis axis x/V
165
+ Δ smoothCap x = CapAlgebra.Y q capB capC/V^2 *
166
+ ((-5*(capRadius ξ)^3+4*capAmplitude)*(1+q*ξ^2*(CapAlgebra.D q capB)^2)-
167
+ ξ*capHP ξ*V*(CapAlgebra.MN q capB/CapAlgebra.H q capB)+
168
+ capH ξ*V*(CapAlgebra.NN q capB/(CapAlgebra.H q capB)^2)) := by
169
+ dsimp only
170
+ let q := Cylindrical.radiusSq axis x
171
+ let a := Cylindrical.axis axis x
172
+ have hq : 0≤q := Cylindrical.radiusSq_nonneg axis x axis_norm
173
+ have hv := (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
174
+ have hh := CapAlgebra.H_pos (b:=capB) hq
175
+ have hc := Cylindrical.laplacian_lift axis_norm
176
+ (CapAlgebra.Y_contDiffAt (C:=capC) (n:=2) hh)
177
+ ((CapAlgebra.V_contDiff capB (n:=2)).contDiffAt.inv hv.ne')
178
+ (capH_contDiff.of_le (by norm_cast : (2:WithTop ℕ∞)≤∞)).contDiffAt
179
+ change Δ smoothCap x=_ at hc
180
+ simp only [Space,finrank_euclideanSpace_fin,Nat.cast_ofNat] at hc
181
+ norm_num only at hc
182
+ change Δ smoothCap x =
183
+ CapAlgebra.Y q capB capC * deriv (deriv capH) (a*(CapAlgebra.V q capB)⁻¹) *
184
+ (((CapAlgebra.V q capB)⁻¹)^2+4*q*a^2*deriv (fun q=>(CapAlgebra.V q capB)⁻¹) q^2)+
185
+ deriv capH (a*(CapAlgebra.V q capB)⁻¹)*
186
+ (a*CapAlgebra.Y q capB capC*(4*q*deriv (deriv (fun q=>(CapAlgebra.V q capB)⁻¹)) q+
187
+ 12*deriv (fun q=>(CapAlgebra.V q capB)⁻¹) q)+
188
+ 8*q*a*deriv (fun q=>CapAlgebra.Y q capB capC) q*deriv (fun q=>(CapAlgebra.V q capB)⁻¹) q)+
189
+ capH (a*(CapAlgebra.V q capB)⁻¹)*(4*q*deriv (deriv (fun q=>CapAlgebra.Y q capB capC)) q+
190
+ 12*deriv (fun q=>CapAlgebra.Y q capB capC) q) at hc
191
+ rw [hc]
192
+ simp only [CapAlgebra.deriv_Y hh, CapAlgebra.deriv2_Y hh,
193
+ (CapAlgebra.hasDerivAt_invV hv.ne').deriv, CapAlgebra.deriv2_invV hv.ne',
194
+ deriv2_capH,(hasDerivAt_capH _).deriv]
195
+ change _ = CapAlgebra.Y q capB capC/(CapAlgebra.V q capB)^2 * _
196
+ have hm:=CapAlgebra.invV_mixed (C:=capC) hv.ne' hh
197
+ have hn:=CapAlgebra.lap_Y (C:=capC) hv.ne' hh
198
+ have h1 : ((CapAlgebra.V q capB)⁻¹)^2+4*q*a^2*(-CapAlgebra.D q capB/(2*(CapAlgebra.V q capB)^2))^2 =
199
+ (1+q*(a/CapAlgebra.V q capB)^2*(CapAlgebra.D q capB)^2)/(CapAlgebra.V q capB)^2 := by
200
+ field_simp
201
+ ring
202
+ have h2 : a*CapAlgebra.Y q capB capC*
203
+ (4*q*((CapAlgebra.D q capB)^2/(2*(CapAlgebra.V q capB)^3)+3/(100*(CapAlgebra.V q capB)^2))+
204
+ 12*(-CapAlgebra.D q capB/(2*(CapAlgebra.V q capB)^2)))+
205
+ 8*q*a*CapAlgebra.Y1 q capB capC*(-CapAlgebra.D q capB/(2*(CapAlgebra.V q capB)^2)) =
206
+ -a*CapAlgebra.Y q capB capC/(CapAlgebra.V q capB)^2*(CapAlgebra.MN q capB/CapAlgebra.H q capB) := by
207
+ calc
208
+ _ = a*(CapAlgebra.Y q capB capC*
209
+ (4*q*((CapAlgebra.D q capB)^2/(2*(CapAlgebra.V q capB)^3)+3/(100*(CapAlgebra.V q capB)^2))+
210
+ 12*(-CapAlgebra.D q capB/(2*(CapAlgebra.V q capB)^2)))+
211
+ 8*q*CapAlgebra.Y1 q capB capC*(-CapAlgebra.D q capB/(2*(CapAlgebra.V q capB)^2))) := by ring
212
+ _ = _ := by rw [hm]; ring
213
+ rw [h1,h2,hn]
214
+ change _=CapAlgebra.Y q capB capC/(CapAlgebra.V q capB)^2 *
215
+ ((-5*(capRadius (a/CapAlgebra.V q capB))^3+4*capAmplitude)*(1+q*(a/CapAlgebra.V q capB)^2*(CapAlgebra.D q capB)^2)-
216
+ (a/CapAlgebra.V q capB)*capHP (a/CapAlgebra.V q capB)*CapAlgebra.V q capB*(CapAlgebra.MN q capB/CapAlgebra.H q capB)+
217
+ capH (a/CapAlgebra.V q capB)*CapAlgebra.V q capB*(CapAlgebra.NN q capB/(CapAlgebra.H q capB)^2))
218
+ simp only [← div_eq_mul_inv]
219
+ field_simp
220
+ ring
221
+ lemma cap_sHP_nonpos (s:ℝ) : s*capHP s≤0 := by
222
+ rcases le_total 0 s with h|h
223
+ · exact mul_nonpos_of_nonneg_of_nonpos h (capHP_nonpos h)
224
+ · have hh:=mul_nonpos_of_nonneg_of_nonpos (neg_nonneg.mpr h) (capHP_nonpos (neg_nonneg.mpr h))
225
+ simpa only [capHP_odd,neg_mul_neg] using hh
226
+
227
+ /-- The actual smooth cylindrical cap is superharmonic on its positive strip. -/
228
+ theorem smoothCap_laplacian_nonpos {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1)
229
+ (hs:|Cylindrical.axis axis x/CapAlgebra.V (Cylindrical.radiusSq axis x) capB|≤3/4) :
230
+ Δ smoothCap x≤0 := by
231
+ let q:=Cylindrical.radiusSq axis x
232
+ let V:=CapAlgebra.V q capB
233
+ let s:=Cylindrical.axis axis x/V
234
+ have hq:0≤q:=Cylindrical.radiusSq_nonneg axis x axis_norm
235
+ obtain ⟨hv,hv1⟩:=CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2
236
+ obtain ⟨hM,hM1,hN,hN1⟩:=CapAlgebra.coeff_bounds hq hx capB_bounds.1 capB_bounds.2
237
+ have hh:=capH_nonneg hs
238
+ have hph:=capHPP_nonpos s
239
+ have hsp:=cap_sHP_nonpos s
240
+ have hK:=cap_K_nonpos hs
241
+ change -5*capRadius s^3+4*capAmplitude-(673/250)*s*capHP s+(431/200)*capH s≤0 at hK
242
+ have hvm : V*(CapAlgebra.MN q capB/CapAlgebra.H q capB)≤673/250 :=
243
+ (mul_le_mul_of_nonneg_right hv1 hM).trans (by simpa using hM1)
244
+ have hvn : V*(CapAlgebra.NN q capB/(CapAlgebra.H q capB)^2)≤431/200 :=
245
+ (mul_le_mul_of_nonneg_right hv1 hN).trans (by simpa using hN1)
246
+ have h0:=mul_nonpos_of_nonpos_of_nonneg hph
247
+ (show 0≤q*s^2*(CapAlgebra.D q capB)^2 by positivity)
248
+ have h1:=mul_le_mul_of_nonneg_left hvm (neg_nonneg.mpr hsp)
249
+ have h2:=mul_le_mul_of_nonneg_left hvn hh
250
+ have hbr : (-5*capRadius s^3+4*capAmplitude)*(1+q*s^2*(CapAlgebra.D q capB)^2)-
251
+ s*capHP s*V*(CapAlgebra.MN q capB/CapAlgebra.H q capB)+
252
+ capH s*V*(CapAlgebra.NN q capB/(CapAlgebra.H q capB)^2)≤0 := by
253
+ nlinarith only [h0,h1,h2,hK]
254
+ rw [laplacian_smoothCap hx]
255
+ have hY:0≤CapAlgebra.Y q capB capC := by unfold CapAlgebra.Y capC; positivity
256
+ exact mul_nonpos_of_nonneg_of_nonpos (div_nonneg hY (sq_nonneg V)) hbr
257
+
258
+ end Bernoulli.DeSilvaJerison
259
+
260
+ end
261
+ end
262
+
263
+ end OAI
lean/OAI/Analysis/BernoulliCone/CapExtension.lean ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.BoundedCalibration
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+
11
+ lemma upperFamily_eq_cap {x:Space 7} {l:ℝ} (hl:0<l)
12
+ (hp:0<upperFamily l x) (hq:Cylindrical.radiusSq axis (l⁻¹ • x)≤1) :
13
+ upperFamily l x=κ*l*smoothCap (l⁻¹ • x) := by
14
+ have hh:0 < max (upperSigned (l⁻¹ • x)) 0:=
15
+ pos_of_mul_pos_right hp (mul_nonneg κ_pos.le hl.le)
16
+ have hs:0<upperSigned (l⁻¹ • x):=by simpa using hh
17
+ rw [upperFamily,max_eq_left hs.le,upperSigned_cap hq]
18
+
19
+ /-- Smooth signed extensions of the inverse cap parameter through the actual
20
+ cap/exterior interface, obtained by IFT with local uniqueness. -/
21
+ lemma capParameter_local_extension {p:Space 7×ℝ} (hp:U p.1<p.2)
22
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≤1) :
23
+ ∃ψ:Space 7×ℝ→ℝ,ContDiffAt ℝ ∞ ψ p ∧ ψ p=upperParameter p.1 p.2 ∧
24
+ ∀ᶠ z in 𝓝 p, U z.1<z.2 →
25
+ Cylindrical.radiusSq axis ((upperParameter z.1 z.2)⁻¹ • z.1)≤1 →
26
+ ψ z=upperParameter z.1 z.2 := by
27
+ let l:=upperParameter p.1 p.2
28
+ have hl:0<l:=(upperParameter_spec hp).1
29
+ have he:upperFamily l p.1=p.2:=(upperParameter_spec hp).2
30
+ have hpos:0<upperFamily l p.1:=he.symm ▸ (U_nonneg p.1).trans_lt hp
31
+ have hc:ContDiffAt ℝ ∞ smoothCap (l⁻¹ • p.1):=smoothCap_contDiffAt hq
32
+ have hpc:0<smoothCap (l⁻¹ • p.1):=by
33
+ rw [←upperSigned_cap hq]
34
+ exact upperParameter_signed_pos hp
35
+ let F:(Space 7×ℝ)×ℝ→ℝ:=fun z=>κ*z.2*smoothCap (z.2⁻¹ • z.1.1)-z.1.2
36
+ have hi:ContDiffAt ℝ ∞ (fun z:(Space 7×ℝ)×ℝ=>z.2⁻¹ • z.1.1) (p,l):=
37
+ (contDiffAt_snd.inv hl.ne').smul (contDiffAt_fst.fst)
38
+ have hF:ContDiffAt ℝ ∞ F (p,l):=
39
+ ((contDiffAt_const.mul contDiffAt_snd).mul (hc.comp (p,l) hi)).sub contDiffAt_fst.snd
40
+ let ρ:=κ*(smoothCap (l⁻¹ • p.1)-inner ℝ (l⁻¹ • p.1) (gradient smoothCap (l⁻¹ • p.1)))
41
+ have hρ:0<ρ:=mul_pos κ_pos (smoothCap_radial_defect_pos hq hpc)
42
+ have hd:HasDerivAt (fun s:ℝ=>F (p,s)) ρ l := by
43
+ have hh:=((Foliation.hasDerivAt_dilate p.1 hl.ne'
44
+ (hc.differentiableAt (by simp))).const_mul κ).sub_const p.2
45
+ simpa only [F,mul_assoc] using hh
46
+ obtain ⟨ψ,hψ,hψ0,hψeq,huniq⟩:=Foliation.scalar_implicit_unique hF hd hρ.ne'
47
+ refine ⟨ψ,hψ,hψ0,?_⟩
48
+ have hF0:F (p,l)=0:=by
49
+ dsimp [F]
50
+ rw [←upperFamily_eq_cap hl hpos hq,he,sub_self]
51
+ have ht:Tendsto (fun z:Space 7×ℝ=>(z,upperParameter z.1 z.2)) (𝓝 p) (𝓝 (p,l)):=
52
+ tendsto_id.prodMk_nhds (upperParameter_continuousAt hp)
53
+ filter_upwards [ht.eventually huniq] with z hz hzp hzq
54
+ apply hz.mp
55
+ rw [hF0]
56
+ dsimp [F]
57
+ have hzpos:0<upperFamily (upperParameter z.1 z.2) z.1:=
58
+ (upperParameter_spec hzp).2.symm ▸ (U_nonneg z.1).trans_lt hzp
59
+ rw [←upperFamily_eq_cap (upperParameter_spec hzp).1 hzpos hzq,
60
+ (upperParameter_spec hzp).2,sub_self]
61
+
62
+ lemma gradient_smoothCap_contDiffAt {x:Space 7} (hq:Cylindrical.radiusSq axis x≤1) :
63
+ ContDiffAt ℝ ∞ (gradient smoothCap) x := by
64
+ exact (toDual ℝ (Space 7)).symm.contDiff.contDiffAt.comp x
65
+ ((smoothCap_contDiffAt hq).fderiv_right (by simp))
66
+
67
+ /-- The actual one-sided cap flux admits a smooth germ even at the seam.
68
+ No regularity of the discontinuous full flux is asserted. -/
69
+ theorem upperFlux_cap_local_extension {p:Space 7×ℝ} (hp:U p.1<p.2)
70
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≤1) :
71
+ ∃B:Space 7×ℝ→Space 7,ContDiffAt ℝ ∞ B p ∧ B p=upperFlux p ∧
72
+ ∀ᶠ z in 𝓝 p,U z.1<z.2 →
73
+ Cylindrical.radiusSq axis ((upperParameter z.1 z.2)⁻¹ • z.1)≤1 → B z=upperFlux z := by
74
+ obtain ⟨ψ,hψ,hψ0,he⟩:=capParameter_local_extension hp hq
75
+ let B:Space 7×ℝ→Space 7:=fun z=>κ • gradient smoothCap ((ψ z)⁻¹ • z.1)
76
+ have hψp:ψ p≠0:=by rw [hψ0]; exact (upperParameter_spec hp).1.ne'
77
+ have hn:ContDiffAt ℝ ∞ (fun z:Space 7×ℝ=>(ψ z)⁻¹ • z.1) p:=
78
+ (hψ.inv hψp).smul contDiffAt_fst
79
+ have hg:ContDiffAt ℝ ∞ (gradient smoothCap) ((ψ p)⁻¹ • p.1):=by
80
+ rw [hψ0]; exact gradient_smoothCap_contDiffAt hq
81
+ refine ⟨B,(hg.comp p hn).const_smul κ,?_,?_⟩
82
+ · simp only [B,hψ0,upperFlux,ite_eq_left hp,ite_eq_left hq]
83
+ · filter_upwards [he] with z hz hzp hzq
84
+ simp only [B,hz hzp hzq,upperFlux,ite_eq_left hzp,ite_eq_left hzq]
85
+ end Bernoulli.DeSilvaJerison
86
+
87
+ end
88
+ end
89
+
90
+ end OAI
lean/OAI/Analysis/BernoulliCone/CapFoliation.lean ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.CapGeometry
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter
8
+ open scoped Topology ContDiff Laplacian
9
+ namespace Bernoulli.DeSilvaJerison
10
+
11
+ lemma capHP_mul_nonpos (s:ℝ) : s*capHP s≤0 := by
12
+ rcases le_total 0 s with h|h
13
+ · exact mul_nonpos_of_nonneg_of_nonpos h (capHP_nonpos h)
14
+ · have hh:=capHP_nonpos (s:= -s) (by linarith)
15
+ rw [capHP_odd] at hh
16
+ exact mul_nonpos_of_nonpos_of_nonneg h (by linarith)
17
+
18
+ lemma capHP_neg {s:ℝ} (hs:0<s) : capHP s<0 := by
19
+ have hh:=capHP_le_linear hs.le
20
+ have hn: -5+4*capAmplitude<0 := by linarith [capAmplitude_le]
21
+ exact hh.trans_lt (mul_neg_of_neg_of_pos hn hs)
22
+
23
+ lemma capH_strictAnti : StrictAntiOn capH (Ici 0) := by
24
+ apply strictAntiOn_of_deriv_neg (convex_Ici _)
25
+ · intro x hx
26
+ exact (hasDerivAt_capH x).continuousAt.continuousWithinAt
27
+ · intro x hx
28
+ rw [interior_Ici] at hx
29
+ rw [(hasDerivAt_capH x).deriv]
30
+ exact capHP_neg hx
31
+
32
+ lemma capH_pos_iff (s:ℝ) : 0<capH s ↔ |s|<3/4 := by
33
+ rw [←capH_abs]
34
+ constructor
35
+ · intro hh
36
+ by_contra hn
37
+ have hh1:=capH_antitone (show (3/4:ℝ)∈Ici 0 by norm_num)
38
+ (abs_nonneg s) (le_of_not_gt hn)
39
+ rw [capH_end] at hh1
40
+ linarith
41
+ · intro hs
42
+ have hh:=capH_strictAnti (abs_nonneg s) (show (3/4:ℝ)∈Ici 0 by norm_num) hs
43
+ rwa [capH_end] at hh
44
+
45
+ namespace CapAlgebra
46
+ lemma V_radial_pos {q b:ℝ} (_hq:0≤q) (hq1:q≤1) (hb:2242/10000≤b) (hb1:b≤2243/10000) :
47
+ 0<V q b-q*D q b := by
48
+ have hmul:q*b≤b:=mul_le_of_le_one_left (by linarith) hq1
49
+ unfold V D
50
+ nlinarith [sq_nonneg q]
51
+ lemma D_pos {q b:ℝ} (hq1:q≤1) (hb:2242/10000≤b) :0<D q b := by
52
+ unfold D; linarith
53
+ lemma E_pos {q b:ℝ} (hq1:q≤1) (hb:2242/10000≤b) :0<E q b := by
54
+ unfold E; linarith
55
+ lemma Y_pos {q b C:ℝ} (hq:0≤q) (hv:0<V q b) (hc:0<C) :0<Y q b C := by
56
+ unfold Y; exact div_pos (mul_pos hc hv) (Real.sqrt_pos.mpr (H_pos hq))
57
+ lemma Y1_eq {q b C:ℝ} (hh:0<H q b) (hv:V q b≠0) :
58
+ 2*Y1 q b C=Y q b C*(D q b/V q b-9/16*D q b*E q b/H q b) := by
59
+ have hs:Real.sqrt (H q b)≠0:=(Real.sqrt_pos.mpr hh).ne'
60
+ have hs2:=Real.sq_sqrt hh.le
61
+ unfold Y1 Y
62
+ generalize V q b=v at *
63
+ generalize D q b=d at *
64
+ generalize E q b=e at *
65
+ generalize H q b=h at *
66
+ field_simp
67
+ rw [hs2]
68
+ ring
69
+ end CapAlgebra
70
+
71
+ lemma smoothCap_radial_defect {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1) :
72
+ let q:=Cylindrical.radiusSq axis x
73
+ let V:=CapAlgebra.V q capB
74
+ let H:=CapAlgebra.H q capB
75
+ let D:=CapAlgebra.D q capB
76
+ let E:=CapAlgebra.E q capB
77
+ let s:=Cylindrical.axis axis x/V
78
+ smoothCap x-inner ℝ x (gradient smoothCap x)=
79
+ CapAlgebra.Y q capB capC*((1-q*D/V+q*9/16*D*E/H)*capH s-
80
+ s*capHP s*(1-q*D/V)) := by
81
+ dsimp only
82
+ let q:=Cylindrical.radiusSq axis x
83
+ let a:=Cylindrical.axis axis x
84
+ have hq:0≤q:=Cylindrical.radiusSq_nonneg axis x axis_norm
85
+ have hv:0<CapAlgebra.V q capB:= (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
86
+ have hh:0<CapAlgebra.H q capB:=CapAlgebra.H_pos hq
87
+ have ht:inner ℝ x (Cylindrical.transverse axis x)=q := by
88
+ simp only [Cylindrical.transverse,inner_sub_right,real_inner_smul_right,
89
+ real_inner_self_eq_norm_sq]
90
+ change ‖x‖^2-a*a=‖x‖^2-a^2
91
+ ring
92
+ rw [gradient_smoothCap hx]
93
+ simp only [inner_add_right,real_inner_smul_right,ht]
94
+ change smoothCap x-(2*CapAlgebra.Y1 q capB capC*capH (a/CapAlgebra.V q capB)*q+
95
+ CapAlgebra.Y q capB capC*capHP (a/CapAlgebra.V q capB)*
96
+ ((CapAlgebra.V q capB)⁻¹*a+(-a*CapAlgebra.D q capB/(CapAlgebra.V q capB)^2)*q))=_
97
+ rw [CapAlgebra.Y1_eq hh hv.ne']
98
+ change CapAlgebra.Y q capB capC*capH (a*(CapAlgebra.V q capB)⁻¹)-_=_
99
+ dsimp only [q,a] at *
100
+ simp only [div_eq_mul_inv]
101
+ field_simp
102
+ ring
103
+
104
+ lemma smoothCap_radial_defect_pos {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1)
105
+ (hp:0<smoothCap x) : 0<smoothCap x-inner ℝ x (gradient smoothCap x) := by
106
+ let q:=Cylindrical.radiusSq axis x
107
+ let V:=CapAlgebra.V q capB
108
+ let H:=CapAlgebra.H q capB
109
+ let D:=CapAlgebra.D q capB
110
+ let E:=CapAlgebra.E q capB
111
+ let s:=Cylindrical.axis axis x/V
112
+ have hq:0≤q:=Cylindrical.radiusSq_nonneg axis x axis_norm
113
+ have hv:0<V:= (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
114
+ have hh:0<H:=CapAlgebra.H_pos hq
115
+ have hd:0<D:=CapAlgebra.D_pos hx capB_bounds.1
116
+ have he:0<E:=CapAlgebra.E_pos hx capB_bounds.1
117
+ have hy:0<CapAlgebra.Y q capB capC:=CapAlgebra.Y_pos hq hv capC_pos
118
+ have hhpos:0<capH s := by
119
+ change 0<CapAlgebra.Y q capB capC*capH (Cylindrical.axis axis x*V⁻¹) at hp
120
+ rw [←div_eq_mul_inv] at hp
121
+ exact pos_of_mul_pos_right hp hy.le
122
+ have hk:0<1-q*D/V := by
123
+ have hl:=CapAlgebra.V_radial_pos hq hx capB_bounds.1 capB_bounds.2
124
+ apply sub_pos.mpr
125
+ apply (div_lt_iff₀ hv).mpr
126
+ simpa only [one_mul] using (show q*D<V by linarith)
127
+ have hk1:0≤q*9/16*D*E/H:=by positivity
128
+ have hsprod:=capHP_mul_nonpos s
129
+ rw [smoothCap_radial_defect hx]
130
+ change 0<CapAlgebra.Y q capB capC*((1-q*D/V+q*9/16*D*E/H)*capH s-s*capHP s*(1-q*D/V))
131
+ have ht:=mul_pos (show 0<1-q*D/V+q*9/16*D*E/H by linarith) hhpos
132
+ have ht1:=mul_nonpos_of_nonpos_of_nonneg hsprod hk.le
133
+ exact mul_pos hy (by linarith)
134
+ end Bernoulli.DeSilvaJerison
135
+
136
+ end
137
+ end
138
+
139
+ end OAI
lean/OAI/Analysis/BernoulliCone/CapGeometry.lean ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.CapCalculus
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter
8
+ open scoped Topology ContDiff Laplacian
9
+ namespace Bernoulli.DeSilvaJerison
10
+
11
+ lemma capH_abs (s:ℝ) : capH |s|=capH s := by
12
+ rcases le_total 0 s with h|h
13
+ · rw [abs_of_nonneg h]
14
+ · rw [abs_of_nonpos h,capH_even]
15
+ lemma capHP_sq_abs (s:ℝ) : (capHP |s|)^2=(capHP s)^2 := by
16
+ rcases le_total 0 s with h|h
17
+ · rw [abs_of_nonneg h]
18
+ · rw [abs_of_nonpos h,capHP_odd,neg_sq]
19
+ lemma capH_boundary {s:ℝ} (hs:|s|=3/4) : capH s=0 := by
20
+ rw [←capH_abs,hs,capH_end]
21
+ lemma capHP_sq_boundary {s:ℝ} (hs:|s|=3/4) : (capHP s)^2=(capHP (3/4))^2 := by
22
+ rw [←capHP_sq_abs,hs]
23
+ lemma capC_pos : 0<capC := by unfold capC; positivity
24
+ lemma capC_sq : capC^2=1+9/16*capP^2 := Real.sq_sqrt (by positivity)
25
+ lemma cap_boundary_slope_bound : capC^2*(capHP (3/4))^2≤c7 := by
26
+ have hp := capP_bounds
27
+ have ha := capAmplitude_bounds
28
+ have hs : capP^2≤(3886/10000:ℝ)^2 := by nlinarith [hp.1,hp.2]
29
+ have hq : 0≤3125/768-capAmplitude/6 := by linarith [ha.2]
30
+ have hq1 : (3125/768-capAmplitude/6)^2≤(3125/768-(289237/1000000)/6:ℝ)^2 := by
31
+ nlinarith [ha.1]
32
+ rw [capC_sq,capHP_end]
33
+ have hprod := mul_le_mul (show 1+9/16*capP^2≤1+9/16*(3886/10000:ℝ)^2 by linarith)
34
+ hq1 (sq_nonneg _) (by positivity : (0:ℝ)≤1+9/16*(3886/10000:ℝ)^2)
35
+ nlinarith only [hprod,c7_lower]
36
+
37
+ lemma gradient_smoothCap {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1) :
38
+ let q := Cylindrical.radiusSq axis x
39
+ let V := CapAlgebra.V q capB
40
+ let s := Cylindrical.axis axis x/V
41
+ gradient smoothCap x =
42
+ (2*CapAlgebra.Y1 q capB capC*capH s) • Cylindrical.transverse axis x +
43
+ (CapAlgebra.Y q capB capC*capHP s) •
44
+ (V⁻¹ • axis+(-Cylindrical.axis axis x*CapAlgebra.D q capB/V^2) • Cylindrical.transverse axis x) := by
45
+ dsimp only
46
+ let q:=Cylindrical.radiusSq axis x
47
+ let a:=Cylindrical.axis axis x
48
+ have hq:=Cylindrical.radiusSq_nonneg axis x axis_norm
49
+ have hh:0<CapAlgebra.H q capB:=CapAlgebra.H_pos (b:=capB) hq
50
+ have hv:0<CapAlgebra.V q capB:= (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
51
+ have hg:=Cylindrical.gradient_lift (e:=axis) (x:=x)
52
+ (CapAlgebra.Y_contDiffAt (C:=capC) (n:=1) hh |>.differentiableAt (by norm_num))
53
+ (CapAlgebra.hasDerivAt_invV hv.ne').differentiableAt
54
+ (hasDerivAt_capH _).differentiableAt
55
+ change gradient smoothCap x= _ at hg
56
+ change gradient smoothCap x=
57
+ (2*deriv (fun q=>CapAlgebra.Y q capB capC) q*capH (a*(CapAlgebra.V q capB)⁻¹)) • Cylindrical.transverse axis x+
58
+ (CapAlgebra.Y q capB capC*deriv capH (a*(CapAlgebra.V q capB)⁻¹)) •
59
+ ((CapAlgebra.V q capB)⁻¹ • axis+(2*a*deriv (fun q=>(CapAlgebra.V q capB)⁻¹) q) • Cylindrical.transverse axis x) at hg
60
+ rw [hg]
61
+ simp only [CapAlgebra.deriv_Y hh,(CapAlgebra.hasDerivAt_invV hv.ne').deriv,
62
+ (hasDerivAt_capH _).deriv,←div_eq_mul_inv]
63
+ have he:2*a*(-CapAlgebra.D q capB/(2*CapAlgebra.V q capB^2)) = -a*CapAlgebra.D q capB/CapAlgebra.V q capB^2 := by ring
64
+ rw [he]
65
+
66
+ /-- Constant free-boundary slope of the actual cylindrical cap, including the
67
+ transverse axis. The result is for the genuine Euclidean gradient. -/
68
+ theorem smoothCap_boundary_gradient {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1)
69
+ (hs:|Cylindrical.axis axis x/CapAlgebra.V (Cylindrical.radiusSq axis x) capB|=3/4) :
70
+ ‖gradient smoothCap x‖^2=capC^2*(capHP (3/4))^2 := by
71
+ let q:=Cylindrical.radiusSq axis x
72
+ let a:=Cylindrical.axis axis x
73
+ let V:=CapAlgebra.V q capB
74
+ let H:=CapAlgebra.H q capB
75
+ let s:=a/V
76
+ have hq:0≤q:=Cylindrical.radiusSq_nonneg axis x axis_norm
77
+ have hv:0<V:= (CapAlgebra.V_bounds hq hx capB_bounds.1 capB_bounds.2).1
78
+ have hh:0<H:=CapAlgebra.H_pos hq
79
+ have hs2 : s^2=9/16 := by nlinarith only [sq_abs s,hs]
80
+ have hz : capH s=0 := capH_boundary hs
81
+ have hp : (capHP s)^2=(capHP (3/4))^2 := capHP_sq_boundary hs
82
+ have hg:=gradient_smoothCap hx
83
+ dsimp only at hg
84
+ change gradient smoothCap x=(2*CapAlgebra.Y1 q capB capC*capH s) • Cylindrical.transverse axis x+
85
+ (CapAlgebra.Y q capB capC*capHP s) •
86
+ (V⁻¹ • axis+(-a*CapAlgebra.D q capB/V^2) • Cylindrical.transverse axis x) at hg
87
+ rw [hz] at hg
88
+ simp only [mul_zero,zero_smul,zero_add] at hg
89
+ have horth:inner ℝ axis (Cylindrical.transverse axis x)=0 := by
90
+ rw [real_inner_comm,Cylindrical.transverse_inner axis x axis_norm]
91
+ rw [hg,norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,norm_add_sq_real]
92
+ simp only [norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,axis_norm,mul_one,
93
+ real_inner_smul_left,real_inner_smul_right,horth,mul_zero,add_zero,
94
+ Cylindrical.transverse_sq axis x axis_norm]
95
+ change (CapAlgebra.Y q capB capC)^2*(capHP s)^2*
96
+ ((V⁻¹)^2+(-a*CapAlgebra.D q capB/V^2)^2*q)=_
97
+ have he : ((V⁻¹)^2+(-a*CapAlgebra.D q capB/V^2)^2*q)=H/V^2 := by
98
+ have hhdef : H=1+9/16*q*(CapAlgebra.D q capB)^2:=rfl
99
+ have ha2 : a^2=9/16*V^2 := by
100
+ dsimp only [s] at hs2
101
+ field_simp at hs2
102
+ nlinarith only [hs2]
103
+ field_simp
104
+ rw [ha2,hhdef]
105
+ ring
106
+ rw [he,hp]
107
+ unfold CapAlgebra.Y
108
+ change (capC*V/Real.sqrt H)^2*(capHP (3/4))^2*(H/V^2)=_
109
+ rw [div_pow,mul_pow,Real.sq_sqrt hh.le]
110
+ field_simp
111
+
112
+ theorem smoothCap_boundary_slope {x:Space 7} (hx:Cylindrical.radiusSq axis x≤1)
113
+ (hs:|Cylindrical.axis axis x/CapAlgebra.V (Cylindrical.radiusSq axis x) capB|=3/4) :
114
+ ‖gradient smoothCap x‖^2≤c7 := by
115
+ rw [smoothCap_boundary_gradient hx hs]
116
+ exact cap_boundary_slope_bound
117
+ end Bernoulli.DeSilvaJerison
118
+
119
+ end
120
+ end
121
+
122
+ end OAI
lean/OAI/Analysis/BernoulliCone/ClampedFoliationGraph.lean ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.SmoothIntervalPrimitive
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter InnerProductSpace MeasureTheory
10
+ open scoped Topology ContDiff
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
13
+ [FiniteDimensional ℝ E]
14
+
15
+ def clampedHeight (u σ v:E→ℝ) (x:E):ℝ:=max (u x) (min (v x) (σ x))
16
+ omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] in
17
+ lemma le_clampedHeight [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
18
+ (u σ v:E→ℝ) (x:E):u x≤clampedHeight u σ v x:=le_max_left _ _
19
+ omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] in
20
+ lemma clampedHeight_le [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
21
+ {u σ v:E→ℝ} {x:E} (h:u x≤v x):clampedHeight u σ v x≤v x:=
22
+ max_le h (min_le_left _ _)
23
+ omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] in
24
+ lemma below_clampedHeight [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
25
+ {u σ v:E→ℝ} {x:E} {t:ℝ}
26
+ (hl:u x<t) (ht:t<clampedHeight u σ v x):t<σ x := by
27
+ have hh:=lt_max_iff.mp ht
28
+ rcases hh with h|h
29
+ · exact False.elim ((not_lt.mpr hl.le) h)
30
+ · exact h.trans_le (min_le_right _ _)
31
+ omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] in
32
+ lemma above_clampedHeight [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
33
+ {u σ v:E→ℝ} {x:E} {t:ℝ}
34
+ (hu:clampedHeight u σ v x<t) (ht:t<v x):σ x<t := by
35
+ have hh:min (v x) (σ x)<t:=(le_max_right _ _).trans_lt hu
36
+ exact (min_lt_iff.mp hh).resolve_left (not_lt.mpr ht.le)
37
+
38
+ omit [FiniteDimensional ℝ E] in
39
+ lemma graphPotential_eq_integral [FiniteDimensional ℝ E]
40
+ {A:E×ℝ→E} (hA:Continuous A) (u v:E→ℝ) (x:E) :
41
+ graphPotential A u v x=(2:ℝ) • (∫s in u x..v x,A (x,s)) := by
42
+ have hc:Continuous (fun s:ℝ=>A (x,s)):=hA.comp (continuous_const.prodMk continuous_id)
43
+ unfold graphPotential ParametricIntegral.heightPrimitive
44
+ rw [←intervalIntegral.integral_interval_sub_left (hc.intervalIntegrable 0 (v x))
45
+ (hc.intervalIntegrable 0 (u x))]
46
+
47
+ lemma clamped_integral_identity {F A B:E×ℝ→E} (hA:Continuous A) (hB:Continuous B)
48
+ {u σ v:E→ℝ} {x:E} (huv:u x≤v x)
49
+ (hFi:∀a b:ℝ,IntervalIntegrable (fun t:ℝ=>F (x,t)) volume a b)
50
+ (hAe:∀t∈Ioo (u x) (v x),t<σ x → F (x,t)=A (x,t))
51
+ (hBe:∀t∈Ioo (u x) (v x),σ x<t → F (x,t)=B (x,t)) :
52
+ (2:ℝ) • (∫s in u x..v x,F (x,s))=
53
+ splitGraphPotential A B u (clampedHeight u σ v) v x := by
54
+ let w:=clampedHeight u σ v x
55
+ have huw:u x≤w:=le_clampedHeight u σ v x
56
+ have hwv:w≤v x:=clampedHeight_le huv
57
+ have heA:(∫s in u x..w,F (x,s))=∫s in u x..w,A (x,s):=
58
+ intervalIntegral.integral_congr_Ioo_of_le huw (fun t ht=>hAe t ⟨ht.1,ht.2.trans_le hwv⟩
59
+ (below_clampedHeight ht.1 ht.2))
60
+ have heB:(∫s in w..v x,F (x,s))=∫s in w..v x,B (x,s):=
61
+ intervalIntegral.integral_congr_Ioo_of_le hwv (fun t ht=>hBe t ⟨huw.trans_lt ht.1,ht.2⟩
62
+ (above_clampedHeight ht.1 ht.2))
63
+ rw [splitGraphPotential,graphPotential_eq_integral hA,graphPotential_eq_integral hB]
64
+ rw [←intervalIntegral.integral_add_adjacent_intervals (hFi (u x) w) (hFi w (v x)),heA,heB,smul_add]
65
+
66
+ lemma integrated_bulk_open {A:E×ℝ→E} (hA:ContDiff ℝ 1 A) (x:E) {a b:ℝ} (hab:a≤b)
67
+ (hbulk:∀s∈Ioo a b,divergence (fun y:E=>A (y,s)) x+
68
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)≤0) :
69
+ 2*(∫s in a..b,divergence (fun y:E=>A (y,s)) x)≤‖A (x,a)‖^2-‖A (x,b)‖^2 := by
70
+ rcases hab.eq_or_lt with he|hlt
71
+ · subst b; simp
72
+ · apply integrated_bulk hA x hab
73
+ have hAC:ContDiff ℝ 1 (fun s:ℝ=>A (x,s)):=hA.comp (contDiff_const.prodMk contDiff_id)
74
+ have hc:Continuous (fun s:ℝ=>divergence (fun y:E=>A (y,s)) x+
75
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)):=
76
+ (continuous_spatial_divergence hA x).add (hAC.continuous.inner (hAC.continuous_deriv (by norm_num)))
77
+ exact fun s hs=>le_on_closure hbulk hc.continuousOn continuousOn_const (by rwa [closure_Ioo hlt.ne])
78
+
79
+ lemma graphPotential_locallyLipschitz {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
80
+ {u v:E→ℝ} (hu:LocallyLipschitz u) (hv:LocallyLipschitz v) :
81
+ LocallyLipschitz (graphPotential A u v) := by
82
+ have hh:= (ParametricIntegral.heightPrimitive_contDiff_one hA).locallyLipschitz
83
+ exact ((2:ℝ) • ContinuousLinearMap.id ℝ E).lipschitzWith.locallyLipschitz.comp
84
+ ((hh.comp (LocallyLipschitz.id.prodMk hv)).sub (hh.comp (LocallyLipschitz.id.prodMk hu)))
85
+
86
+ lemma clamped_split_locallyLipschitz {A B:E×ℝ→E} (hA:ContDiff ℝ 1 A) (hB:ContDiff ℝ 1 B)
87
+ {u σ v:E→ℝ} (hu:LocallyLipschitz u) (hv:LocallyLipschitz v) (hσ:LocallyLipschitz σ) :
88
+ LocallyLipschitz (splitGraphPotential A B u (clampedHeight u σ v) v) := by
89
+ have hw:LocallyLipschitz (clampedHeight u σ v):=hu.max (hv.min h��)
90
+ exact (graphPotential_locallyLipschitz hA hu hw).add (graphPotential_locallyLipschitz hB hw hv)
91
+ end Bernoulli.Foliation
92
+
93
+ end
94
+ end
95
+
96
+ end OAI
lean/OAI/Analysis/BernoulliCone/ClampedGraphBound.lean ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.ClampedSeam
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter InnerProductSpace MeasureTheory
10
+ open scoped Topology ContDiff
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
13
+ [FiniteDimensional ℝ E]
14
+
15
+ lemma gradient_eq_of_order_contact {u v:E→ℝ} {x:E}
16
+ (hu:DifferentiableAt ℝ u x) (hv:DifferentiableAt ℝ v x)
17
+ (hle:∀y,u y≤v y) (he:u x=v x) : gradient u x=gradient v x := by
18
+ have hm:IsLocalMin (fun y=>v y-u y) x:=by
19
+ filter_upwards [] with y
20
+ change v x-u x≤v y-u y
21
+ rw [←he,sub_self]
22
+ exact sub_nonneg.mpr (hle y)
23
+ have hh:=hm.hasFDerivAt_eq_zero (hv.hasFDerivAt.sub hu.hasFDerivAt)
24
+ exact congrArg ((toDual ℝ E).symm) (sub_eq_zero.mp hh).symm
25
+
26
+ lemma graph_divergence_zero_contact {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
27
+ {u v:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) (hv:DifferentiableAt ℝ v x)
28
+ (hle:∀y,u y≤v y) (he:u x=v x) : divergence (graphPotential A u v) x=0 := by
29
+ rw [graph_potential_identity hA hu hv,he,gradient_eq_of_order_contact hu hv hle he]
30
+ simp
31
+
32
+ lemma graph_potential_bulk_bound_open {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
33
+ {u v:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) (hv:DifferentiableAt ℝ v x)
34
+ (huv:u x≤v x)
35
+ (hbulk:∀s∈Ioo (u x) (v x),divergence (fun y:E=>A (y,s)) x+
36
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)≤0) :
37
+ divergence (graphPotential A u v) x≤‖gradient v x‖^2+
38
+ ‖A (x,u x)‖^2-2*inner ℝ (A (x,u x)) (gradient u x) := by
39
+ have hi:=integrated_bulk_open hA x huv hbulk
40
+ have hs:0≤‖gradient v x-A (x,v x)‖^2:=sq_nonneg _
41
+ have he:inner ℝ (gradient v x) (A (x,v x))=inner ℝ (A (x,v x)) (gradient v x):=real_inner_comm _ _
42
+ rw [norm_sub_sq_real,he] at hs
43
+ rw [graph_potential_identity hA hu hv]
44
+ linarith
45
+
46
+ /-- The clamped primitive only needs a jump condition when the seam lies
47
+ strictly between the endpoint graphs. On contact sets the two gradients
48
+ agree, so the spurious branch cancels exactly. -/
49
+ lemma split_graph_bound_open {A B:E×ℝ→E} (hA:ContDiff ℝ 1 A) (hB:ContDiff ℝ 1 B)
50
+ {u w v:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) (hw:DifferentiableAt ℝ w x)
51
+ (hv:DifferentiableAt ℝ v x) (huw:∀y,u y≤w y) (hwv:∀y,w y≤v y)
52
+ (hbulkA:∀s∈Ioo (u x) (w x),divergence (fun y:E=>A (y,s)) x+
53
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)≤0)
54
+ (hbulkB:∀s∈Ioo (w x) (v x),divergence (fun y:E=>B (y,s)) x+
55
+ inner ℝ (B (x,s)) (deriv (fun t:ℝ=>B (x,t)) s)≤0)
56
+ (hjump:u x<w x → w x<v x → ‖B (x,w x)‖^2-‖A (x,w x)‖^2-
57
+ 2*inner ℝ (B (x,w x)-A (x,w x)) (gradient w x)≤0) :
58
+ divergence (splitGraphPotential A B u w v) x≤‖gradient v x‖^2+
59
+ ‖(if u x=w x then B else A) (x,u x)‖^2-
60
+ 2*inner ℝ ((if u x=w x then B else A) (x,u x)) (gradient u x) := by
61
+ have hd:divergence (splitGraphPotential A B u w v) x=
62
+ divergence (graphPotential A u w) x+divergence (graphPotential B w v) x:=
63
+ divergence_add (graphPotential_differentiableAt hA hu hw) (graphPotential_differentiableAt hB hw hv)
64
+ by_cases heu:u x=w x
65
+ · rw [ite_eq_left heu,hd,graph_divergence_zero_contact hA hu hw huw heu,zero_add]
66
+ have heG:=gradient_eq_of_order_contact hu hw huw heu
67
+ simpa only [←heu,←heG] using graph_potential_bulk_bound_open hB hw hv (hwv x) hbulkB
68
+ · rw [ite_eq_right heu]
69
+ by_cases hev:w x=v x
70
+ · rw [hd,graph_divergence_zero_contact hB hw hv hwv hev,add_zero]
71
+ have heG:=gradient_eq_of_order_contact hw hv hwv hev
72
+ simpa only [heG] using graph_potential_bulk_bound_open hA hu hw (huw x) hbulkA
73
+ · have hiA:=integrated_bulk_open hA x (huw x) hbulkA
74
+ have hiB:=integrated_bulk_open hB x (hwv x) hbulkB
75
+ have hj:=hjump (lt_of_le_of_ne (huw x) heu) (lt_of_le_of_ne (hwv x) hev)
76
+ rw [inner_sub_left] at hj
77
+ have hs:0≤‖gradient v x-B (x,v x)‖^2:=sq_nonneg _
78
+ have he:inner ℝ (gradient v x) (B (x,v x))=inner ℝ (B (x,v x)) (gradient v x):=real_inner_comm _ _
79
+ rw [norm_sub_sq_real,he] at hs
80
+ rw [hd,graph_potential_identity hA hu hw,graph_potential_identity hB hw hv]
81
+ linarith
82
+ end Bernoulli.Foliation
83
+
84
+ end
85
+ end
86
+
87
+ end OAI
lean/OAI/Analysis/BernoulliCone/ClampedSeam.lean ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.CompactLipschitzDivergence
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace MeasureTheory
8
+ open scoped Topology ContDiff NNReal
9
+ namespace Bernoulli.DeSilvaJerison
10
+ open Foliation
11
+ lemma clamped_seam_axis {u v:Space 7→ℝ} {x:Space 7} (hu:U x<u x)
12
+ (hq:Cylindrical.radiusSq axis x=0) : clampedHeight u seamHeight v x=u x := by
13
+ have hσ:seamHeight x=0:=by rw [seamHeight_formula,hq,Real.sqrt_zero]; ring
14
+ unfold clampedHeight
15
+ rw [hσ,max_eq_left ((min_le_right _ _).trans ((U_nonneg x).trans hu.le))]
16
+
17
+ lemma clamped_seam_le_lower {u v:Space 7→ℝ} {x:Space 7} (hu:U x<u x)
18
+ (hq:Cylindrical.radiusSq axis ((upperParameter x (u x))⁻¹ • x)<1) :
19
+ clampedHeight u seamHeight v x=u x := by
20
+ rcases (Cylindrical.radiusSq_nonneg axis x axis_norm).eq_or_lt with he|hl
21
+ · exact clamped_seam_axis hu he.symm
22
+ · have hs:seamHeight x≤u x:=(upperParameter_seam_iff (p:=(x,u x)) hu hl).mp hq.le
23
+ exact max_eq_left ((min_le_right _ _).trans hs)
24
+
25
+ theorem clamped_seam_locallyLipschitz {u v:Space 7→ℝ}
26
+ (hu:LocallyLipschitz u) (hv:LocallyLipschitz v) (huU:∀y,U y<u y) :
27
+ LocallyLipschitz (clampedHeight u seamHeight v) := by
28
+ intro x
29
+ rcases (Cylindrical.radiusSq_nonneg axis x axis_norm).eq_or_lt with he|hl
30
+ · have hpx:(x,u x)∈{p:Space 7×ℝ|U p.1<p.2 ∧
31
+ Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)<1}:=by
32
+ refine ⟨huU x,?_⟩
33
+ rw [Cylindrical.radiusSq_smul,←he,mul_zero]
34
+ norm_num
35
+ have hn:∀ᶠ y in 𝓝 x,Cylindrical.radiusSq axis ((upperParameter y (u y))⁻¹ • y)<1:=
36
+ ((continuousAt_id.prodMk hu.continuous.continuousAt).eventually (capTube_isOpen.mem_nhds hpx)).mono fun _ h=>h.2
37
+ obtain ⟨K,V,hV,hL⟩:=hu x
38
+ refine ⟨K,V∩{y|clampedHeight u seamHeight v y=u y},inter_mem hV (hn.mono fun y hy=>clamped_seam_le_lower (huU y) hy),?_⟩
39
+ intro y hy z hz
40
+ rw [hy.2,hz.2]
41
+ exact hL hy.1 hz.1
42
+ · obtain ⟨σ,hσ,hσe⟩:=seamHeight_smooth_germ hl
43
+ have hw:LocallyLipschitz (clampedHeight u σ v):=hu.max (hv.min hσ.locallyLipschitz)
44
+ obtain ⟨K,V,hV,hL⟩:=hw x
45
+ refine ⟨K,V∩{y|σ y=seamHeight y},inter_mem hV hσe,?_⟩
46
+ intro y hy z hz
47
+ have he1:clampedHeight u seamHeight v y=clampedHeight u σ v y:=by
48
+ change max (u y) (min (v y) (seamHeight y))=max (u y) (min (v y) (σ y))
49
+ rw [hy.2]
50
+ have he2:clampedHeight u seamHeight v z=clampedHeight u σ v z:=by
51
+ change max (u z) (min (v z) (seamHeight z))=max (u z) (min (v z) (σ z))
52
+ rw [hz.2]
53
+ rw [he1,he2]
54
+ exact hL hy.1 hz.1
55
+
56
+ lemma clamped_sub_lower_compact {u v:Space 7→ℝ} (h:HasCompactSupport (fun x=>v x-u x)) :
57
+ HasCompactSupport (fun x=>clampedHeight u seamHeight v x-u x) := by
58
+ apply HasCompactSupport.intro h
59
+ intro x hx
60
+ have hvu:v x=u x:=sub_eq_zero.mp (image_eq_zero_of_notMem_tsupport (f:=fun y=>v y-u y) hx)
61
+ change max (u x) (min (v x) (seamHeight x))-u x=0
62
+ rw [hvu,max_eq_left (min_le_left _ _),sub_self]
63
+
64
+ theorem clamped_seam_lipschitz {u v:Space 7→ℝ} {K L:ℝ≥0}
65
+ (hu:LipschitzWith K u) (hv:LipschitzWith L v) (huU:∀y,U y<u y)
66
+ (hc:HasCompactSupport (fun x=>v x-u x)) :
67
+ ∃M:ℝ≥0,LipschitzWith M (clampedHeight u seamHeight v) := by
68
+ have hh:=clamped_seam_locallyLipschitz hu.locallyLipschitz hv.locallyLipschitz huU
69
+ obtain ⟨C,hC⟩:=locallyLipschitz_compact_lipschitz (hh.sub hu.locallyLipschitz) (clamped_sub_lower_compact hc)
70
+ refine ⟨C+K,?_⟩
71
+ convert! hC.add hu using 1
72
+ ext x
73
+ exact (sub_add_cancel _ _).symm
74
+ end Bernoulli.DeSilvaJerison
75
+
76
+ end
77
+ end
78
+
79
+ end OAI
lean/OAI/Analysis/BernoulliCone/ClosedGermExtension.lean ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.SeamHeight
2
+
3
+ namespace OAI
4
+
5
+ universe uE uG
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter
10
+ open scoped Topology ContDiff Manifold
11
+ namespace Bernoulli.LocalExtension
12
+ variable {E : Type uE} {G : Type uG} [NormedAddCommGroup E] [NormedSpace ℝ E]
13
+ [FiniteDimensional ℝ E] [NormedAddCommGroup G] [NormedSpace ℝ G]
14
+ /-- C1 germs agreeing on a closed subset glue to a global C1 extension.
15
+ This is an application of the actual smooth partition of unity, not a Whitney
16
+ extension premise. -/
17
+ lemma exists_contDiff_one_of_closed_germs {S:Set E} (hS:IsClosed S) {F:E→G}
18
+ (hg:∀x∈S,∃B:E→G,ContDiffAt ℝ 1 B x ∧ ∀ᶠ y in 𝓝 x,y∈S→B y=F y) :
19
+ ∃B:E→G,ContDiff ℝ 1 B ∧ EqOn B F S := by
20
+ classical
21
+ let t:E→Set G:=fun x=>if x∈S then {F x} else univ
22
+ have ht(x:E):Convex ℝ (t x):=by
23
+ by_cases hx:x∈S
24
+ · simpa only [t,ite_eq_left hx] using convex_singleton (F x)
25
+ · simpa only [t,ite_eq_right hx] using (convex_univ : Convex ℝ (univ:Set G))
26
+ have hl(x:E):∃U∈𝓝 x,∃g:E→G,ContMDiffOn 𝓘(ℝ,E) 𝓘(ℝ,G) 1 g U ∧
27
+ ∀y∈U,g y∈t y := by
28
+ by_cases hx:x∈S
29
+ · obtain ⟨g,hgc,hge⟩:=hg x hx
30
+ obtain ⟨V,hV,hgV⟩:=hgc.contDiffOn le_rfl (by norm_num)
31
+ refine ⟨V∩{y|y∈S → g y=F y},inter_mem hV hge,g,?_,?_⟩
32
+ · exact (hgV.mono inter_subset_left).contMDiffOn
33
+ · intro y hy
34
+ by_cases hyS:y∈S
35
+ · simp only [t,ite_eq_left hyS,mem_singleton_iff]
36
+ exact hy.2 hyS
37
+ · simp only [t,ite_eq_right hyS,mem_univ]
38
+ · refine ⟨Sᶜ,hS.isOpen_compl.mem_nhds hx,fun _=>0,contMDiffOn_const,?_⟩
39
+ intro y hy
40
+ simp only [t,ite_eq_right hy,mem_univ]
41
+ obtain ⟨B,hB⟩:=exists_contMDiffMap_forall_mem_convex_of_local 𝓘(ℝ,E) ht hl
42
+ refine ⟨B,B.contMDiff.contDiff,?_⟩
43
+ intro x hx
44
+ simpa only [t,ite_eq_left hx,mem_singleton_iff] using hB x
45
+ end Bernoulli.LocalExtension
46
+
47
+ end
48
+ end
49
+
50
+ end OAI
lean/OAI/Analysis/BernoulliCone/CompactGradient.lean ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.HalfspaceDifferential
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli
10
+ open scoped _root_.Bernoulli
11
+ variable {d : ℕ}
12
+
13
+ lemma integral_gradient_compact {q : Space d → ℝ} {K : ℝ≥0}
14
+ (hq : LipschitzWith K q) (hc : HasCompactSupport q) (e : Space d) :
15
+ (∫ x, inner ℝ (gradient q x) e) = 0 := by
16
+ have hh := (LipschitzWith.const (1:ℝ)).integral_lineDeriv_mul_eq
17
+ (μ:=volume) hq hc (-e)
18
+ have he : (fun x => lineDeriv ℝ q x (-(-e)) * (1:ℝ)) =ᵐ[volume]
19
+ (fun x => inner ℝ (gradient q x) e) := by
20
+ filter_upwards [hq.ae_differentiableAt] with x hx
21
+ simp only [neg_neg,mul_one,hx.lineDeriv_eq_fderiv,inner_gradient_left]
22
+ rw [integral_congr_ae he] at hh
23
+ have hz (x : Space d) : lineDeriv ℝ (fun _ : Space d => (1:ℝ)) x (-e)=0 := by
24
+ rw [(differentiableAt_const (1:ℝ)).lineDeriv_eq_fderiv]
25
+ simp
26
+ simpa only [hz,zero_mul,integral_zero] using hh.symm
27
+
28
+ lemma setIntegral_gradient_compact {q : Space d → ℝ} {K : ℝ≥0}
29
+ (hq : LipschitzWith K q) (hc : HasCompactSupport q)
30
+ {D : Set (Space d)} (hD : tsupport q ⊆ D) (e : Space d) :
31
+ (∫ x in D, inner ℝ (gradient q x) e) = 0 := by
32
+ rw [setIntegral_eq_integral_of_forall_compl_eq_zero]
33
+ · exact integral_gradient_compact hq hc e
34
+ · intro x hx
35
+ have hn : x∉tsupport q := fun hh => hx (hD hh)
36
+ simp [gradient,fderiv_of_notMem_tsupport ℝ hn]
37
+ end Bernoulli
38
+
39
+ end
40
+ end
41
+
42
+ end OAI
lean/OAI/Analysis/BernoulliCone/CompactLipschitzDivergence.lean ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.FluxSeam
2
+
3
+ namespace OAI
4
+
5
+ universe uE uG
6
+
7
+ section
8
+ noncomputable section
9
+ open MeasureTheory Set Filter InnerProductSpace
10
+ open scoped Topology ContDiff NNReal
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} {G : Type uG} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E]
13
+ [NormedAddCommGroup G] [NormedSpace ℝ G]
14
+
15
+ omit [NormedSpace ℝ G] in
16
+ lemma locallyLipschitz_compact_lipschitz [NormedSpace ℝ G] {F:E→G} (hl:LocallyLipschitz F)
17
+ (hc:HasCompactSupport F) : ∃K:ℝ≥0,LipschitzWith K F := by
18
+ obtain ⟨R,hR⟩:=hc.isBounded.subset_ball (0:E)
19
+ obtain ⟨K,hK⟩:=hl.locallyLipschitzOn.exists_lipschitzOnWith_of_compact
20
+ (isCompact_closedBall (0:E) (R+1))
21
+ obtain ⟨M,hM⟩:=hc.exists_bound_of_continuousOn hl.continuous.continuousOn
22
+ let C:ℝ≥0:=⟨max (K:ℝ) (max M 0),le_max_of_le_right (le_max_right _ _)⟩
23
+ have hKC:(K:ℝ)≤C:=le_max_left _ _
24
+ have hMC:M≤(C:ℝ):=(le_max_left M 0).trans (le_max_right _ _)
25
+ have hbound (x y:E) (hx:x∈tsupport F) (hy:y∉Metric.closedBall (0:E) (R+1)):
26
+ dist (F x) (F y)≤(C:ℝ)*dist x y := by
27
+ have hFx:dist x 0<R:=hR hx
28
+ have hFy:R+1<dist y 0:=by simpa only [Metric.mem_closedBall,not_le] using hy
29
+ have hdy:1≤dist x y:=by have hh:=dist_triangle y x 0; rw [dist_comm y x] at hh; linarith
30
+ have hyS:y∉tsupport F:=by
31
+ intro hys
32
+ have hyR:=hR hys
33
+ change dist y 0<R at hyR
34
+ linarith
35
+ rw [image_eq_zero_of_notMem_tsupport hyS,dist_zero_right]
36
+ exact (hM x hx).trans (hMC.trans (le_mul_of_one_le_right C.2 hdy))
37
+ refine ⟨C,LipschitzWith.of_dist_le_mul fun x y=>?_⟩
38
+ by_cases hx:x∈tsupport F
39
+ · by_cases hy:y∈Metric.closedBall (0:E) (R+1)
40
+ · have hxB:x∈Metric.closedBall (0:E) (R+1):=by
41
+ have hh:=hR hx
42
+ change dist x 0<R at hh
43
+ change dist x 0≤R+1
44
+ linarith
45
+ exact (hK.dist_le_mul x hxB y hy).trans (mul_le_mul_of_nonneg_right hKC dist_nonneg)
46
+ · exact hbound x y hx hy
47
+ · by_cases hy:y∈tsupport F
48
+ · by_cases hxB:x∈Metric.closedBall (0:E) (R+1)
49
+ · have hyB:y∈Metric.closedBall (0:E) (R+1):=by
50
+ have hh:=hR hy
51
+ change dist y 0<R at hh
52
+ change dist y 0≤R+1
53
+ linarith
54
+ exact (hK.dist_le_mul x hxB y hyB).trans (mul_le_mul_of_nonneg_right hKC dist_nonneg)
55
+ · simpa only [dist_comm] using hbound y x hy hxB
56
+ · rw [image_eq_zero_of_notMem_tsupport hx,image_eq_zero_of_notMem_tsupport hy,dist_self]
57
+ positivity
58
+
59
+ lemma integral_directional_compact {d:ℕ} {f:Space d→ℝ} {K:ℝ≥0}
60
+ (hf:LipschitzWith K f) (hc:HasCompactSupport f) (v:Space d) :
61
+ (∫x,fderiv ℝ f x v)=0 := by
62
+ obtain ⟨φ,hφ,hφc,hφS,hφ1⟩:=LocalExtension.exists_cutoff hc isOpen_univ (subset_univ _)
63
+ have hφT:Test univ φ:=⟨hφ,hφc,hφS⟩
64
+ have hh:=LipschitzSobolev.weakGradient hf univ φ hφT v
65
+ simp only [Measure.restrict_univ,inner_gradient_left] at hh
66
+ have hr:(fun x:Space d=>fderiv ℝ f x v * φ x)=(fun x=>fderiv ℝ f x v):=by
67
+ funext x
68
+ by_cases hx:x∈tsupport f
69
+ · have he:φ x=1:=(show φ =ᶠ[𝓝 x] (fun _=>1) from hφ1.filter_mono (nhds_le_nhdsSet hx)).self_of_nhds
70
+ rw [he,mul_one]
71
+ · rw [fderiv_of_notMem_tsupport ℝ hx,zero_apply,zero_mul]
72
+ have he:(fun x:Space d=>f x*(fderiv ℝ φ x) v)=0:=by
73
+ funext x
74
+ by_cases hx:x∈tsupport f
75
+ · have heq:φ =ᶠ[𝓝 x] (fun _=>1):=hφ1.filter_mono (nhds_le_nhdsSet hx)
76
+ simp only [heq.fderiv_eq,fderiv_fun_const,zero_apply,mul_zero,Pi.zero_apply]
77
+ · rw [image_eq_zero_of_notMem_tsupport hx,zero_mul]
78
+ rfl
79
+ rw [hr,he] at hh
80
+ simpa only [integral_zero,Pi.zero_def,zero_eq_neg] using hh
81
+ lemma integrable_directional_compact {d:ℕ} {f:Space d→ℝ} {K:ℝ≥0}
82
+ (hf:LipschitzWith K f) (hc:HasCompactSupport f) (v:Space d) :
83
+ Integrable (fun x=>fderiv ℝ f x v) := by
84
+ have hs:Function.support (fun x=>fderiv ℝ f x v)⊆tsupport f:=
85
+ (subset_tsupport _).trans (tsupport_fderiv_apply_subset ℝ v)
86
+ apply (integrableOn_iff_integrable_of_support_subset hs).mp
87
+ apply (integrableOn_const (μ:=volume) (C:=((K:ℝ)*‖v‖)) hc.measure_ne_top).mono'
88
+ (((continuous_id.clm_apply continuous_const : Continuous (fun L:Space d→L[ℝ]ℝ=>L v)).measurable.comp (measurable_fderiv ℝ f)).aestronglyMeasurable.restrict)
89
+ filter_upwards [] with x
90
+ exact ((fderiv ℝ f x).le_opNorm v).trans
91
+ (mul_le_mul_of_nonneg_right (norm_fderiv_le_of_lipschitz ℝ hf) (norm_nonneg v))
92
+
93
+ lemma integrable_divergence_compact {d:ℕ} {F:Space d→Space d} {K:ℝ≥0}
94
+ (hF:LipschitzWith K F) (hc:HasCompactSupport F) : Integrable (divergence F) := by
95
+ let e:=stdOrthonormalBasis ℝ (Space d)
96
+ let f:=fun i x=>inner ℝ (e i) (F x)
97
+ have hf i:LipschitzWith (‖innerSL ℝ (e i)‖₊*K) (f i):=
98
+ (innerSL ℝ (e i)).lipschitzWith.comp hF
99
+ have hfc i:HasCompactSupport (f i):=by
100
+ apply HasCompactSupport.intro hc
101
+ intro x hx
102
+ simp only [f,image_eq_zero_of_notMem_tsupport hx,inner_zero_right]
103
+ have he:divergence F =ᵐ[volume] (fun x=>∑i,fderiv ℝ (f i) x (e i)):=by
104
+ filter_upwards [hF.ae_differentiableAt] with x hx
105
+ unfold divergence
106
+ apply Finset.sum_congr rfl
107
+ intro i hi
108
+ have hd:HasFDerivAt (f i) ((innerSL ℝ (e i)) ∘L fderiv ℝ F x) x:=
109
+ (innerSL ℝ (e i)).hasFDerivAt.comp x hx.hasFDerivAt
110
+ rw [hd.fderiv]
111
+ rfl
112
+ exact (integrable_finsetSum _ (fun i hi=>integrable_directional_compact (hf i) (hfc i) (e i))).congr he.symm
113
+
114
+ lemma divergence_zero_outside_support {d:ℕ} {F:Space d→Space d} {x:Space d}
115
+ (hx:x∉tsupport F) : divergence F x=0 := by
116
+ unfold divergence
117
+ simp only [fderiv_of_notMem_tsupport ℝ hx,zero_apply,inner_zero_right,
118
+ Finset.sum_const_zero]
119
+
120
+ /-- The divergence of a genuine compactly supported Lipschitz vector field
121
+ has integral zero, with the a.e. derivative justified by Rademacher. -/
122
+ theorem integral_divergence_compact {d:ℕ} {F:Space d→Space d} {K:ℝ≥0}
123
+ (hF:LipschitzWith K F) (hc:HasCompactSupport F) :
124
+ (∫x,divergence F x)=0 := by
125
+ let e:=stdOrthonormalBasis ℝ (Space d)
126
+ let f:=fun i x=>inner ℝ (e i) (F x)
127
+ have hf i:LipschitzWith (‖innerSL ℝ (e i)‖₊*K) (f i):=
128
+ (innerSL ℝ (e i)).lipschitzWith.comp hF
129
+ have hfc i:HasCompactSupport (f i):=by
130
+ apply HasCompactSupport.intro hc
131
+ intro x hx
132
+ simp only [f,image_eq_zero_of_notMem_tsupport hx,inner_zero_right]
133
+ have he:divergence F =ᵐ[volume] (fun x=>∑i,fderiv ℝ (f i) x (e i)):=by
134
+ filter_upwards [hF.ae_differentiableAt] with x hx
135
+ unfold divergence
136
+ apply Finset.sum_congr rfl
137
+ intro i hi
138
+ have hd:HasFDerivAt (f i) ((innerSL ℝ (e i)) ∘L fderiv ℝ F x) x:=
139
+ (innerSL ℝ (e i)).hasFDerivAt.comp x hx.hasFDerivAt
140
+ rw [hd.fderiv]
141
+ rfl
142
+ rw [integral_congr_ae he,integral_finsetSum _ (fun i hi=>integrable_directional_compact (hf i) (hfc i) (e i))]
143
+ simp only [integral_directional_compact (hf _) (hfc _),Finset.sum_const_zero]
144
+ end Bernoulli.Foliation
145
+
146
+ end
147
+ end
148
+
149
+ end OAI
lean/OAI/Analysis/BernoulliCone/CompactZeroFiber.lean ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.PositiveTrace
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter
10
+ open scoped Topology
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} [TopologicalSpace E]
13
+ /-- Compact zero-fiber control. No convergence of the selected root is needed. -/
14
+ lemma eventually_near_zero_fiber {K:Set E} (hK:IsCompact K) {f g:E→ℝ} {C:ℝ}
15
+ (hf:∀x∈K,ContinuousAt f x) (hg:∀x∈K,ContinuousAt g x)
16
+ (hzero:∀x∈K,f x=0 → g x<C) :
17
+ ∀ᶠ t:ℝ in 𝓝 0,∀x∈K,f x=t → g x<C := by
18
+ apply hK.eventually_forall_of_forall_eventually
19
+ intro x hx
20
+ by_cases hz:f x=0
21
+ · have hh:∀ᶠ p:ℝ×E in 𝓝 (0,x),g p.2<C:=
22
+ ((hg x hx).comp continuous_snd.continuousAt).eventually (gt_mem_nhds (hzero x hx hz))
23
+ exact hh.mono fun p hp _=>hp
24
+ · have hn:f x-(0:ℝ)≠0:=by simpa using hz
25
+ have hh:∀ᶠ p:ℝ×E in 𝓝 (0,x),f p.2-p.1≠0:=
26
+ (((hf x hx).comp continuous_snd.continuousAt).sub continuous_fst.continuousAt).eventually_ne hn
27
+ exact hh.mono fun p hp he=>False.elim (hp (sub_eq_zero.mpr he))
28
+ end Bernoulli.Foliation
29
+
30
+ end
31
+ end
32
+
33
+ end OAI
lean/OAI/Analysis/BernoulliCone/ConePicone.lean ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.DominatedVariation
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli.Halfspace
10
+ open HarmonicKernel
11
+ variable {d : ℕ}
12
+
13
+ lemma positiveSquareRatio_hasFDerivAt {u v : Space d → ℝ} {x : Space d}
14
+ (hu : DifferentiableAt ℝ u x) (hv : DifferentiableAt ℝ v x) (hu0 : 0<u x) :
15
+ HasFDerivAt (positiveSquareRatio v u)
16
+ ((2*v x/u x) • fderiv ℝ v x-(v x/u x)^2 • fderiv ℝ u x) x := by
17
+ have hh := (hv.hasFDerivAt.pow 2).mul ((hasDerivAt_inv hu0.ne').comp_hasFDerivAt x hu.hasFDerivAt)
18
+ have he : positiveSquareRatio v u =ᶠ[𝓝 x] (fun y=>v y^2/u y) := by
19
+ filter_upwards [hu.continuousAt.preimage_mem_nhds (Ioi_mem_nhds hu0)] with y hy
20
+ change 0<u y at hy
21
+ simp only [positiveSquareRatio,ite_eq_left hy]
22
+ simp only [Function.comp_apply] at hh
23
+ convert! hh.congr_of_eventuallyEq he using 1
24
+ ext z
25
+ simp only [sub_apply,smul_apply,smul_eq_mul,add_apply,pow_one,Nat.reduceSub]
26
+ field_simp
27
+ ring
28
+
29
+ lemma positiveSquareRatio_gradient {u v : Space d → ℝ} {x : Space d}
30
+ (hu : DifferentiableAt ℝ u x) (hv : DifferentiableAt ℝ v x) (hu0 : 0<u x) :
31
+ gradient (positiveSquareRatio v u) x=
32
+ (2*v x/u x) • gradient v x-(v x/u x)^2 • gradient u x := by
33
+ apply ext_inner_right ℝ
34
+ intro z
35
+ rw [inner_gradient_left,(positiveSquareRatio_hasFDerivAt hu hv hu0).fderiv]
36
+ simp only [sub_apply,smul_apply,smul_eq_mul,inner_sub_left,real_inner_smul_left,inner_gradient_left]
37
+
38
+ lemma weighted_positiveSquareRatio_gradient {u v : Space d → ℝ} {x : Space d}
39
+ (hu : DifferentiableAt ℝ u x) (hv : DifferentiableAt ℝ v x) (hu0 : 0<u x) :
40
+ gradient (fun y=>potential y*positiveSquareRatio v u y) x =
41
+ positiveSquareRatio v u x • gradient potential x +
42
+ potential x • gradient (positiveSquareRatio v u) x := by
43
+ apply ext_inner_right ℝ
44
+ intro z
45
+ have hh := (contDiff_potential.differentiable (by simp) x).hasFDerivAt.mul
46
+ (positiveSquareRatio_hasFDerivAt hu hv hu0)
47
+ change HasFDerivAt (fun y=>potential y*positiveSquareRatio v u y) _ x at hh
48
+ rw [inner_gradient_left,hh.fderiv]
49
+ simp only [inner_add_left,real_inner_smul_left,inner_gradient_left,add_apply,smul_apply,smul_eq_mul]
50
+ rw [(positiveSquareRatio_hasFDerivAt hu hv hu0).fderiv]
51
+ ring
52
+
53
+ /-- Picone ground-state equality from full minimizing comparison. It is a
54
+ consequence, not a stationarity or regularity assumption in `GlobalMinimizer`. -/
55
+ theorem picone_gradient_equality {u v : Space d → ℝ} {L M C : ℝ≥0}
56
+ (hm : GlobalMinimizer u) (hL : LipschitzWith L u) (hM : LipschitzWith M v)
57
+ (hom : ∀r:ℝ, 0<r → ∀x, u (r•x)=r*u x)
58
+ (hC : 1≤C) (hbound : ∀x, |v x| ≤ (C:ℝ)*u x)
59
+ (hvI : (∫ x in ball (0:Space d) 2, potential x*‖gradient v x‖^2-rawKernel x*v x^2)=0) :
60
+ ∀ᵐ x ∂volume.restrict (ball (0:Space d) 1),
61
+ gradient v x=(v x/u x) • gradient u x := by
62
+ let B := ball (0:Space d) 2
63
+ let μ := volume.restrict B
64
+ let : IsFiniteMeasure μ := isFiniteMeasure_restrict.mpr measure_ball_lt_top.ne
65
+ have hn := hm.nonneg_of_continuous hL.continuous
66
+ let q := fun x=>potential x*positiveSquareRatio v u x
67
+ have hφ : Test B potential := radial_potential_test
68
+ obtain ⟨K,hφL⟩ := ContDiff.lipschitzWith_of_hasCompactSupport hφ.2.1 hφ.1 (by simp)
69
+ obtain ⟨J,hq'⟩ := lipschitz_mul_compact (positiveSquareRatio_lipschitz hL hM hC hn hbound) hφL hφ.2.1
70
+ have hq : LipschitzWith J q := by simpa only [q,mul_comm] using hq'
71
+ have hc : HasCompactSupport q := hφ.2.1.mul_right
72
+ have hs : tsupport q ⊆ B := tsupport_mul_subset_left.trans hφ.2.2
73
+ obtain ⟨A,hA⟩ := hφ.2.1.exists_bound_of_continuous contDiff_potential.continuous
74
+ have hC0 : 0<(C:ℝ) := lt_of_lt_of_le zero_lt_one (show 1≤(C:ℝ) from hC)
75
+ have hqbound : ∀x, |q x| ≤ ((|A|+1)*(C:ℝ)^2)*u x := by
76
+ intro x
77
+ rw [show q x=potential x*positiveSquareRatio v u x from rfl,abs_mul,
78
+ abs_of_nonneg (positiveSquareRatio_nonneg x)]
79
+ have hb := positiveSquareRatio_bound C.coe_nonneg hn hbound x
80
+ have hφb : |potential x| ≤ |A|+1 := (hA x).trans (by linarith [le_abs_self A])
81
+ calc
82
+ _ ≤ (|A|+1)*((C:ℝ)^2*u x) := mul_le_mul hφb hb (positiveSquareRatio_nonneg x) (by positivity)
83
+ _ = _ := by ring
84
+ have hqI := hm.dominatedVariation hL (by norm_num : 0<(2:ℝ))
85
+ (LipschitzSobolev.h10 hq hc isOpen_ball hs)
86
+ (show 0<(|A|+1)*(C:ℝ)^2 by positivity) (Eventually.of_forall hqbound)
87
+ have hu0 := SobolevCalculus.gradient_zero_on_zero_set isOpen_ball (LipschitzSobolev.h1_ball hL 0 2)
88
+ have hv0 := SobolevCalculus.gradient_zero_on_zero_set isOpen_ball (LipschitzSobolev.h1_ball hM 0 2)
89
+ have hq0 := SobolevCalculus.gradient_zero_on_zero_set isOpen_ball (LipschitzSobolev.h1_ball hq 0 2)
90
+ let F := fun x=>potential x*‖gradient v x‖^2-rawKernel x*v x^2
91
+ let E := fun x=>inner ℝ (gradient u x) (gradient q x)
92
+ let R := fun x=>potential x*‖gradient v x-(v x/u x) ��� gradient u x‖^2
93
+ have hRE : R =ᵐ[μ] (fun x=>F x-E x) := by
94
+ filter_upwards [ae_restrict_of_ae hL.ae_differentiableAt,
95
+ ae_restrict_of_ae hM.ae_differentiableAt,hu0,hv0,hq0] with x hux hvx hug hvg hqg
96
+ by_cases hup : 0<u x
97
+ · have he := ConeCalculus.euler_identity hux hom
98
+ rw [←inner_gradient_left] at he
99
+ dsimp [R,F,E,q]
100
+ rw [weighted_positiveSquareRatio_gradient hux hvx hup,
101
+ positiveSquareRatio_gradient hux hvx hup,potential_gradient]
102
+ rw [←real_inner_self_eq_norm_sq]
103
+ simp only [inner_sub_left,inner_sub_right,real_inner_smul_left,real_inner_smul_right,
104
+ inner_add_right,real_inner_self_eq_norm_sq,positiveSquareRatio,ite_eq_left hup,
105
+ real_inner_comm (gradient v x) (gradient u x),he,norm_smul,Real.norm_eq_abs,mul_pow,sq_abs]
106
+ field_simp
107
+ ring
108
+ · have huz : u x=0 := le_antisymm (not_lt.mp hup) (hn x)
109
+ have hvz : v x=0 := abs_eq_zero.mp (le_antisymm (by simpa only [huz,mul_zero] using hbound x) (abs_nonneg _))
110
+ have hqz : q x=0 := by simp [q,positiveSquareRatio,hup]
111
+ simp only [R,F,E,huz,hvz,hug huz,hvg hvz,hqg hqz,zero_div,zero_smul,sub_self,
112
+ norm_zero,zero_pow (by norm_num : 2≠0),mul_zero,inner_zero_left]
113
+ have hFi : Integrable F μ := radial_outer_integrable hM
114
+ have hEi : Integrable E μ := integrable_inner_of_memLp (LipschitzSobolev.h1_ball hL 0 2).2.1
115
+ (LipschitzSobolev.h1_ball hq 0 2).2.1
116
+ have hRi : Integrable R μ := (hFi.sub hEi).congr hRE.symm
117
+ have hRI : (∫ x, R x ∂μ)=0 := by
118
+ rw [integral_congr_ae hRE,integral_sub hFi hEi]
119
+ change (∫x in B,F x)-(∫x in B,E x)=0
120
+ rw [hvI,hqI,sub_self]
121
+ have haz : R =ᵐ[μ] 0 := (integral_eq_zero_iff_of_nonneg_ae
122
+ (Eventually.of_forall (fun x=>mul_nonneg (potential_nonneg x) (sq_nonneg _))) hRi).mp hRI
123
+ have hle : volume.restrict (ball (0:Space d) 1)≤μ :=
124
+ Measure.restrict_mono (ball_subset_ball (by norm_num)) le_rfl
125
+ filter_upwards [ae_mono hle haz,ae_restrict_mem measurableSet_ball] with x hx hxb
126
+ have hsq : ‖gradient v x-(v x/u x) • gradient u x‖^2=0 :=
127
+ (mul_eq_zero.mp hx).resolve_left (potential_pos hxb).ne'
128
+ exact sub_eq_zero.mp (norm_eq_zero.mp (sq_eq_zero_iff.mp hsq))
129
+ end Bernoulli.Halfspace
130
+
131
+ end
132
+ end
133
+
134
+ end OAI
lean/OAI/Analysis/BernoulliCone/CylindricalCalculus.lean ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.ScalarLaplacian
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter Finset
10
+ open scoped Topology ContDiff Laplacian
11
+ namespace Bernoulli.Cylindrical
12
+ open ScalarLaplacian
13
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
14
+ [FiniteDimensional ℝ E]
15
+ def axis (e x:E) : ℝ := inner ℝ x e
16
+ def transverse (e x:E) : E := x-axis e x • e
17
+ def radiusSq (e x:E) : ℝ := ‖x‖^2-(axis e x)^2
18
+
19
+ omit [FiniteDimensional ℝ E] in
20
+ theorem transverse_inner [FiniteDimensional ℝ E] (e x:E) (he:‖e‖=1) : inner ℝ (transverse e x) e=0 := by
21
+ simp [transverse,axis,inner_sub_left,real_inner_smul_left,he]
22
+ omit [FiniteDimensional ℝ E] in
23
+ theorem transverse_sq [FiniteDimensional ℝ E] (e x:E) (he:‖e‖=1) : ‖transverse e x‖^2=radiusSq e x := by
24
+ rw [transverse,norm_sub_sq_real,norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,he,
25
+ real_inner_smul_right]
26
+ unfold radiusSq axis
27
+ ring
28
+ lemma radiusSq_nonneg (e x:E) (he:‖e‖=1) : 0≤radiusSq e x := by
29
+ rw [←transverse_sq e x he]; positivity
30
+ omit [FiniteDimensional ℝ E] in
31
+ lemma axis_contDiff [FiniteDimensional ℝ E] (e:E) {n:WithTop ℕ∞} : ContDiff ℝ n (axis e) := contDiff_id.inner ℝ contDiff_const
32
+ lemma radiusSq_contDiff (e:E) {n:WithTop ℕ∞} : ContDiff ℝ n (radiusSq e) :=
33
+ (contDiff_norm_sq (𝕜:=ℝ) (E:=E) (n:=n)).sub ((axis_contDiff e).pow 2)
34
+ lemma gradient_axis (e x:E) : gradient (axis e) x=e := by
35
+ apply ext_inner_right ℝ
36
+ intro v
37
+ rw [←line_deriv (axis_contDiff e (n:=1) |>.differentiable (by norm_num) x) v]
38
+ have hh:=Axisymmetric.hasDerivAt_axis x v e 0
39
+ change deriv (fun t:ℝ=>inner ℝ (x+t • v) e) 0 = _
40
+ rw [hh.deriv,real_inner_comm]
41
+ lemma gradient_norm_sq (x:E) : gradient (fun z:E=>‖z‖^2) x=(2:ℝ) • x := by
42
+ apply ext_inner_right ℝ
43
+ intro v
44
+ rw [←line_deriv (contDiff_norm_sq (𝕜:=ℝ) (E:=E) (n:=1) |>.differentiable (by norm_num) x) v]
45
+ have hl : HasDerivAt (fun t:ℝ=>x+t • v) v 0 := by
46
+ simpa using ((hasDerivAt_id (0:ℝ)).smul_const v).const_add x
47
+ rw [hl.norm_sq.deriv]
48
+ simp [real_inner_smul_left]
49
+ lemma laplacian_axis (e x:E) : Δ (axis e) x=0 := by
50
+ rw [laplacian_sum_line (axis_contDiff e).contDiffAt]
51
+ apply Finset.sum_eq_zero
52
+ intro i hi
53
+ have hh : deriv (fun t:ℝ=>axis e (x+t • stdOrthonormalBasis ℝ E i))=
54
+ fun _=>inner ℝ (stdOrthonormalBasis ℝ E i) e := by
55
+ funext t; exact (Axisymmetric.hasDerivAt_axis x _ e t).deriv
56
+ rw [hh,deriv_const]
57
+ lemma laplacian_norm_sq (x:E) : Δ (fun z:E=>‖z‖^2) x=2*(Module.finrank ℝ E : ℝ) := by
58
+ rw [laplacian_sum_line (contDiff_norm_sq (𝕜:=ℝ) (E:=E) (n:=2)).contDiffAt]
59
+ have hh (v:E) : deriv (deriv (fun t:ℝ=>‖x+t • v‖^2)) 0=2*‖v‖^2 := by
60
+ have hl (t:ℝ) : HasDerivAt (fun s:ℝ=>x+s • v) v t := by
61
+ simpa using ((hasDerivAt_id t).smul_const v).const_add x
62
+ have he : deriv (fun t:ℝ=>‖x+t • v‖^2)=fun t=>2*inner ℝ (x+t • v) v := by
63
+ funext t; exact (hl t).norm_sq.deriv
64
+ rw [he]
65
+ have hd:=((hl 0).inner ℝ (hasDerivAt_const (0:ℝ) v)).const_mul 2
66
+ simpa using hd.deriv
67
+ simp_rw [hh]
68
+ simp [mul_comm]
69
+ lemma gradient_radiusSq (e x:E) : gradient (radiusSq e) x=(2:ℝ) • transverse e x := by
70
+ have ha := (axis_contDiff e (n:=1)).differentiable (by norm_num) x
71
+ have hn := (contDiff_norm_sq (𝕜:=ℝ) (E:=E) (n:=1)).differentiable (by norm_num) x
72
+ apply ext_inner_right ℝ
73
+ intro v
74
+ rw [inner_gradient_left]
75
+ change (fderiv ℝ (fun z:E=>‖z‖^2-(axis e z)^2) x) v = _
76
+ have hh:=hn.hasFDerivAt.sub (ha.hasFDerivAt.pow 2)
77
+ change (fderiv ℝ ((fun z:E=>‖z‖^2)-(fun z:E=>(axis e z)^2)) x) v = _
78
+ rw [hh.fderiv]
79
+ simp only [sub_apply,smul_apply]
80
+ rw [←inner_gradient_left,gradient_norm_sq,←inner_gradient_left,gradient_axis]
81
+ dsimp [transverse]
82
+ simp only [real_inner_smul_left,inner_sub_left]
83
+ ring
84
+ lemma laplacian_radiusSq (e x:E) (he:‖e‖=1) : Δ (radiusSq e) x=2*((Module.finrank ℝ E : ℝ)-1) := by
85
+ have hφ : ContDiffAt ℝ 2 (fun s:ℝ=>s^2) (axis e x) := contDiffAt_id.pow 2
86
+ have hh:=laplacian_comp hφ (axis_contDiff e).contDiffAt
87
+ have hder : deriv (fun s:ℝ=>s^2) = fun s=>2*s := by funext s; simp
88
+ have hder2 : deriv (deriv (fun s:ℝ=>s^2)) (axis e x)=2 := by rw [hder]; simp
89
+ rw [hder2,gradient_axis,he,laplacian_axis] at hh
90
+ change Δ ((fun z:E=>‖z‖^2)-(fun z:E=>(axis e z)^2)) x = _
91
+ rw [(contDiff_norm_sq (𝕜:=ℝ) (E:=E) (n:=2)).contDiffAt.laplacian_sub ((axis_contDiff e).pow 2).contDiffAt,
92
+ laplacian_norm_sq,hh]
93
+ ring
94
+
95
+ /-- A smooth cylindrical cap, expressed using the squared transverse radius so
96
+ that the symmetry axis is included without a singular-coordinate convention. -/
97
+ def lift (e:E) (y k h:ℝ→ℝ) (x:E) : ℝ := y (radiusSq e x)*h (axis e x*k (radiusSq e x))
98
+ lemma contDiffAt_lift {e x:E} {y k h:ℝ→ℝ} {n:WithTop ℕ∞}
99
+ (hy:ContDiffAt ℝ n y (radiusSq e x)) (hk:ContDiffAt ℝ n k (radiusSq e x))
100
+ (hh:ContDiffAt ℝ n h (axis e x*k (radiusSq e x))) : ContDiffAt ℝ n (lift e y k h) x := by
101
+ exact (hy.comp x (radiusSq_contDiff e).contDiffAt).mul
102
+ (hh.comp x ((axis_contDiff e).contDiffAt.mul (hk.comp x (radiusSq_contDiff e).contDiffAt)))
103
+
104
+ lemma gradient_lift {e x:E} {y k h:ℝ→ℝ}
105
+ (hy:DifferentiableAt ℝ y (radiusSq e x)) (hk:DifferentiableAt ℝ k (radiusSq e x))
106
+ (hh:DifferentiableAt ℝ h (axis e x*k (radiusSq e x))) :
107
+ gradient (lift e y k h) x =
108
+ (2*deriv y (radiusSq e x)*h (axis e x*k (radiusSq e x))) • transverse e x+
109
+ (y (radiusSq e x)*deriv h (axis e x*k (radiusSq e x))) •
110
+ (k (radiusSq e x) • e+(2*axis e x*deriv k (radiusSq e x)) • transverse e x) := by
111
+ have hq: DifferentiableAt ℝ (radiusSq e) x :=
112
+ (radiusSq_contDiff e (n:=1)).differentiable (by norm_num) x
113
+ have ha: DifferentiableAt ℝ (axis e) x :=
114
+ (axis_contDiff e (n:=1)).differentiable (by norm_num) x
115
+ have hyq : DifferentiableAt ℝ (fun z=>y (radiusSq e z)) x := hy.comp x hq
116
+ have hkq : DifferentiableAt ℝ (fun z=>k (radiusSq e z)) x := hk.comp x hq
117
+ have hs : DifferentiableAt ℝ (fun z=>axis e z*k (radiusSq e z)) x := ha.mul hkq
118
+ have hhs : DifferentiableAt ℝ (fun z=>h (axis e z*k (radiusSq e z))) x := hh.comp x hs
119
+ change gradient (fun z=>y (radiusSq e z)*h (axis e z*k (radiusSq e z))) x=_
120
+ rw [gradient_mul hyq hhs,gradient_comp hy hq,gradient_comp (f:=fun z:E=>axis e z*k (radiusSq e z)) hh hs,
121
+ gradient_mul ha hkq,gradient_comp hk hq,gradient_radiusSq,gradient_axis]
122
+ simp only [smul_smul]
123
+ module
124
+
125
+ lemma laplacian_lift {e x:E} (he:‖e‖=1) {y k h:ℝ→ℝ}
126
+ (hy:ContDiffAt ℝ 2 y (radiusSq e x)) (hk:ContDiffAt ℝ 2 k (radiusSq e x))
127
+ (hh:ContDiffAt ℝ 2 h (axis e x*k (radiusSq e x))) :
128
+ Δ (lift e y k h) x =
129
+ y (radiusSq e x)*deriv (deriv h) (axis e x*k (radiusSq e x))*
130
+ ((k (radiusSq e x))^2+4*radiusSq e x*(axis e x)^2*(deriv k (radiusSq e x))^2)+
131
+ deriv h (axis e x*k (radiusSq e x))*
132
+ (axis e x*y (radiusSq e x)*(4*radiusSq e x*deriv (deriv k) (radiusSq e x)+
133
+ 2*((Module.finrank ℝ E:ℝ)-1)*deriv k (radiusSq e x))+
134
+ 8*radiusSq e x*axis e x*deriv y (radiusSq e x)*deriv k (radiusSq e x))+
135
+ h (axis e x*k (radiusSq e x))*(4*radiusSq e x*deriv (deriv y) (radiusSq e x)+
136
+ 2*((Module.finrank ℝ E:ℝ)-1)*deriv y (radiusSq e x)) := by
137
+ let q := radiusSq e
138
+ let a := axis e
139
+ let Y := fun z=>y (q z)
140
+ let K := fun z=>k (q z)
141
+ let s := fun z=>a z*K z
142
+ have hq : ContDiffAt ℝ 2 q x := (radiusSq_contDiff e).contDiffAt
143
+ have ha : ContDiffAt ℝ 2 a x := (axis_contDiff e).contDiffAt
144
+ have hY : ContDiffAt ℝ 2 Y x := hy.comp x hq
145
+ have hK : ContDiffAt ℝ 2 K x := hk.comp x hq
146
+ have hs : ContDiffAt ℝ 2 s x := ha.mul hK
147
+ have gY : gradient Y x=deriv y (q x) • ((2:ℝ) • transverse e x) := by
148
+ rw [gradient_comp (hy.differentiableAt (by norm_num)) (hq.differentiableAt (by norm_num))]
149
+ rw [show gradient q x=(2:ℝ) • transverse e x from gradient_radiusSq e x]
150
+ have gK : gradient K x=deriv k (q x) • ((2:ℝ) • transverse e x) := by
151
+ rw [gradient_comp (hk.differentiableAt (by norm_num)) (hq.differentiableAt (by norm_num))]
152
+ rw [show gradient q x=(2:ℝ) • transverse e x from gradient_radiusSq e x]
153
+ have gs : gradient s x=K x • e+(a x*deriv k (q x)*2) • transverse e x := by
154
+ rw [gradient_mul (ha.differentiableAt (by norm_num)) (hK.differentiableAt (by norm_num)),gK]
155
+ rw [show gradient a x=e from gradient_axis e x]
156
+ simp [smul_smul,mul_assoc]
157
+ have gn : ‖gradient q x‖^2=4*q x := by
158
+ rw [show gradient q x=(2:ℝ) • transverse e x from gradient_radiusSq e x,norm_smul,mul_pow,
159
+ Real.norm_eq_abs,transverse_sq e x he]
160
+ norm_num [q]
161
+ have gort : inner ℝ e (transverse e x)=0 := by rw [real_inner_comm,transverse_inner e x he]
162
+ have gsn : ‖gradient s x‖^2=(K x)^2+4*q x*(a x)^2*(deriv k (q x))^2 := by
163
+ rw [gs,norm_add_sq_real]
164
+ simp only [norm_smul,mul_pow,Real.norm_eq_abs,sq_abs,he,mul_one,
165
+ real_inner_smul_left,real_inner_smul_right,gort,mul_zero,add_zero,transverse_sq e x he]
166
+ dsimp [q]; ring
167
+ have gaK : inner ℝ (gradient a x) (gradient K x)=0 := by
168
+ rw [show gradient a x=e from gradient_axis e x,gK]
169
+ simp [real_inner_smul_right,gort]
170
+ have gYs : inner ℝ (gradient Y x) (gradient s x)=4*q x*a x*deriv y (q x)*deriv k (q x) := by
171
+ rw [gY,gs]
172
+ simp only [inner_add_right,real_inner_smul_left,real_inner_smul_right,
173
+ transverse_inner e x he,mul_zero,zero_add,real_inner_self_eq_norm_sq,transverse_sq e x he]
174
+ dsimp [q]; ring
175
+ have lY : Δ Y x=deriv (deriv y) (q x)*(4*q x)+deriv y (q x)*(2*((Module.finrank ℝ E:ℝ)-1)) := by
176
+ rw [laplacian_comp hy hq,gn,show Δ q x=2*((Module.finrank ℝ E:ℝ)-1) from laplacian_radiusSq e x he]
177
+ have lK : Δ K x=deriv (deriv k) (q x)*(4*q x)+deriv k (q x)*(2*((Module.finrank ℝ E:ℝ)-1)) := by
178
+ rw [laplacian_comp hk hq,gn,show Δ q x=2*((Module.finrank ℝ E:ℝ)-1) from laplacian_radiusSq e x he]
179
+ have ls : Δ s x=a x*Δ K x := by
180
+ rw [laplacian_mul ha hK,show Δ a x=0 from laplacian_axis e x,gaK]
181
+ ring
182
+ have gH : gradient (fun z=>h (s z)) x=deriv h (s x) • gradient s x :=
183
+ gradient_comp (hh.differentiableAt (by norm_num)) (hs.differentiableAt (by norm_num))
184
+ change Δ (fun z=>Y z*h (s z)) x = _
185
+ have hH : ContDiffAt ℝ 2 (fun z=>h (s z)) x := hh.comp x hs
186
+ rw [laplacian_mul hY hH,laplacian_comp (f:=s) hh hs,gH,
187
+ real_inner_smul_right,gYs,gsn,ls,lK,lY]
188
+ dsimp [Y,K,s,a,q]
189
+ ring
190
+ end Bernoulli.Cylindrical
191
+
192
+ end
193
+ end
194
+
195
+ end OAI
lean/OAI/Analysis/BernoulliCone/DominatedVariation.lean ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.HalfspaceGroundstate
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli
10
+ open scoped _root_.Bernoulli
11
+ variable {d : ℕ} {D : Set (Space d)}
12
+
13
+ lemma dominatedVariation_of_comparison [IsFiniteMeasure (volume.restrict D)]
14
+ {u v : Space d → ℝ} {G V : Space d → Space d}
15
+ (hu : H1 D u G) (hv : H10 D v V)
16
+ (hn : ∀ᵐ x ∂volume.restrict D, 0≤u x)
17
+ {C : ℝ} (hC : 0<C) (hbound : ∀ᵐ x ∂volume.restrict D, |v x| ≤ C*u x)
18
+ (hmin : ∀ (w : Space d → ℝ) (W : Space d → Space d),
19
+ H1 D w W → (∀ᵐ x ∂volume.restrict D, 0≤w x) →
20
+ H10 D (fun x=>w x-u x) (fun x=>W x-G x) → energy D u G≤energy D w W) :
21
+ (∫ x in D, inner ℝ (G x) (V x))=0 := by
22
+ apply linear_coefficient_eq_zero _ (∫ x in D, ‖V x‖^2) (inv_pos.mpr hC)
23
+ intro t ht
24
+ have htC : |t| * C<1 := by
25
+ calc |t| * C < C⁻¹*C := mul_lt_mul_of_pos_right ht hC
26
+ _ = 1 := inv_mul_cancel₀ hC.ne'
27
+ have hcontrol : ∀ᵐ x ∂volume.restrict D,
28
+ 0≤u x+t*v x ∧ ((0<u x+t*v x) ↔ 0<u x) := by
29
+ filter_upwards [hn,hbound] with x hx hbx
30
+ have hb : |t*v x| ≤ (|t| * C)*u x := by
31
+ rw [abs_mul,mul_assoc]
32
+ exact mul_le_mul_of_nonneg_left hbx (abs_nonneg t)
33
+ by_cases hup : 0<u x
34
+ · have hp : 0<u x+t*v x := by
35
+ have := neg_abs_le (t*v x)
36
+ nlinarith
37
+ exact ⟨hp.le,iff_of_true hp hup⟩
38
+ · have hz : u x=0 := le_antisymm (not_lt.mp hup) hx
39
+ have hvz : v x=0 := abs_eq_zero.mp (le_antisymm (by simpa only [hz,mul_zero] using hbx) (abs_nonneg _))
40
+ simp only [hz,hvz,mul_zero,add_zero,le_refl,lt_self_iff_false,iff_self,and_self]
41
+ have hc := hmin (fun x=>u x+t*v x) (fun x=>G x+t • V x)
42
+ (hu.add (hv.1.const_smul t)) (hcontrol.mono fun _ hx=>hx.1)
43
+ (by simpa only [add_sub_cancel_left] using hv.const_smul t)
44
+ rw [energy_affine hu.1 hu.2.1 hv.1.2.1 t (hcontrol.mono fun _ hx=>hx.2)] at hc
45
+ linarith
46
+
47
+ lemma GlobalMinimizer.dominatedVariation {u v : Space d → ℝ} {L : ℝ≥0}
48
+ (hm : GlobalMinimizer u) (hL : LipschitzWith L u)
49
+ {a : Space d} {R C : ℝ} (hR : 0<R)
50
+ {V : Space d → Space d} (hv : H10 (ball a R) v V)
51
+ (hC : 0<C) (hbound : ∀ᵐ x ∂volume.restrict (ball a R), |v x| ≤ C*u x) :
52
+ (∫ x in ball a R, inner ℝ (gradient u x) (V x))=0 := by
53
+ let : IsFiniteMeasure (volume.restrict (ball a R)) :=
54
+ isFiniteMeasure_restrict.mpr measure_ball_lt_top.ne
55
+ obtain ⟨_,G,hG,hn,hmin⟩ := hm
56
+ have hu := hG a R hR (subset_univ _)
57
+ have he := hu.gradient_unique isOpen_ball (LipschitzSobolev.h1_ball hL a R)
58
+ have hh := dominatedVariation_of_comparison hu hv
59
+ (ae_restrict_of_ae (by simpa only [Measure.restrict_univ] using hn)) hC hbound
60
+ (hmin a R hR (subset_univ _))
61
+ rw [←hh]
62
+ apply integral_congr_ae
63
+ filter_upwards [he] with x hx
64
+ rw [hx]
65
+ end Bernoulli
66
+
67
+ end
68
+ end
69
+
70
+ end OAI
lean/OAI/Analysis/BernoulliCone/ExteriorCalibration.lean ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.FluxBounds
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+ lemma upperFamily_outer_gradient {x:Space 7} {l:ℝ} (hl:0<l)
11
+ (hq:l^2<Cylindrical.radiusSq axis x) (hp:0<upperFamily l x) :
12
+ gradient (upperFamily l) x=κ • gradient Zsigned x+
13
+ (κ*capAmplitude*l^3) • gradient KSup x := by
14
+ have hqp:0<Cylindrical.radiusSq axis x:=(sq_pos_of_pos hl).trans hq
15
+ obtain ⟨hx,ha⟩:=radiusSq_pos_data hqp
16
+ have hdZ:DifferentiableAt ℝ Zsigned x:=(signed_contDiffAt (n:=1) hx ha).differentiableAt (by norm_num)
17
+ have hdK:DifferentiableAt ℝ KSup x:=(KSup_contDiffAt (n:=1) hx ha).differentiableAt (by norm_num)
18
+ have he:upperFamily l =ᶠ[𝓝 x] (fun y=>κ*(Zsigned y+capAmplitude*l^3*KSup y)) := by
19
+ filter_upwards [((Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt).eventually (lt_mem_nhds hq),
20
+ (upperFamily_continuous l).continuousAt.eventually (lt_mem_nhds hp)] with y hy hpy
21
+ rw [upperFamily_outer_formula hl hy.le] at hpy ⊢
22
+ have hh:0<Zsigned y+capAmplitude*l^3*KSup y:=by
23
+ have hm:=pos_of_mul_pos_right hpy κ_pos.le
24
+ simpa using hm
25
+ rw [max_eq_left hh.le]
26
+ rw [gradient,he.fderiv_eq]
27
+ change gradient (fun y=>κ*(Zsigned y+capAmplitude*l^3*KSup y)) x=_
28
+ have hdf:DifferentiableAt ℝ (fun y=>Zsigned y+capAmplitude*l^3*KSup y) x:=
29
+ hdZ.add (hdK.const_mul (capAmplitude*l^3))
30
+ rw [gradient_const_mul κ hdf,
31
+ gradient_add' hdZ (hdK.const_mul (capAmplitude*l^3)),gradient_const_mul (capAmplitude*l^3) hdK,smul_add,smul_smul]
32
+ congr 2
33
+ ring
34
+
35
+ /-- On the actual exterior branch the inverse leaf parameter cancels completely.
36
+ The calibration extends affinely to the lower graph; there is no cube-root
37
+ singularity in the field itself. -/
38
+ theorem upperCalibration_outer_affine {p:Space 7×ℝ} (hp:U p.1<p.2)
39
+ (hq:(upperParameter p.1 p.2)^2<Cylindrical.radiusSq axis p.1) :
40
+ upperCalibration p=κ • gradient Zsigned p.1+
41
+ ((p.2-κ*Zsigned p.1)/KSup p.1) • gradient KSup p.1 := by
42
+ let l:=upperParameter p.1 p.2
43
+ obtain ⟨hl,he⟩:=upperParameter_spec hp
44
+ change 0<l at hl
45
+ change upperFamily l p.1=p.2 at he
46
+ have ht:0<p.2:=(U_nonneg _).trans_lt hp
47
+ have hpos:0<upperFamily l p.1:=by rw [he]; exact ht
48
+ have hqp:0<Cylindrical.radiusSq axis p.1:=(sq_pos_of_pos hl).trans hq
49
+ obtain ⟨hx,ha⟩:=radiusSq_pos_data hqp
50
+ have hK:KSup p.1≠0:=(KSup_pos hx ha).ne'
51
+ have hqe:Cylindrical.radiusSq axis (l⁻¹ • p.1)≠1:=by
52
+ rw [Cylindrical.radiusSq_smul]
53
+ have hh:(l⁻¹)^2*Cylindrical.radiusSq axis p.1>1:=by
54
+ rw [inv_pow,←div_eq_inv_mul]
55
+ change 1<Cylindrical.radiusSq axis p.1/l^2
56
+ exact (lt_div_iff₀ (sq_pos_of_pos hl)).mpr (by simpa only [one_mul] using hq)
57
+ exact ne_of_gt hh
58
+ rw [upperCalibration,Foliation.spatialGradient_eq
59
+ ((upperFamily_contDiffAt_swap hl hpos hqe).differentiableAt (by simp)),
60
+ upperFamily_outer_gradient hl hq hpos]
61
+ congr 1
62
+ have hh:=upperFamily_outer_formula hl hq.le
63
+ rw [he] at hh
64
+ have hsg:0<Zsigned p.1+capAmplitude*l^3*KSup p.1:=by
65
+ have hm:0 < max (Zsigned p.1+capAmplitude*l^3*KSup p.1) 0:=by
66
+ exact pos_of_mul_pos_right (hh ▸ ht) κ_pos.le
67
+ simpa using hm
68
+ rw [max_eq_left hsg.le] at hh
69
+ apply congrArg (fun a:ℝ=>a • gradient KSup p.1)
70
+ apply (eq_div_iff hK).mpr
71
+ nlinarith [hh]
72
+ end Bernoulli.DeSilvaJerison
73
+
74
+ end
75
+ end
76
+
77
+ end OAI
lean/OAI/Analysis/BernoulliCone/FluxBounds.lean ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.CalibrationTraces
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+ open Axisymmetric
11
+ lemma cap_positive_bounded {x:Space 7} (hq:Cylindrical.radiusSq axis x≤1)
12
+ (hp:0<smoothCap x) : ‖x‖≤2 := by
13
+ have hq0:=Cylindrical.radiusSq_nonneg axis x axis_norm
14
+ obtain ⟨hv,hv1⟩:=CapAlgebra.V_bounds hq0 hq capB_bounds.1 capB_bounds.2
15
+ have hy:=CapAlgebra.Y_pos hq0 hv capC_pos
16
+ have hH:0<capH (Cylindrical.axis axis x/CapAlgebra.V (Cylindrical.radiusSq axis x) capB):=by
17
+ change 0<CapAlgebra.Y _ _ _ * capH (_ * (CapAlgebra.V _ _)⁻¹) at hp
18
+ rw [←div_eq_mul_inv] at hp
19
+ exact pos_of_mul_pos_right hp hy.le
20
+ have ha:|Cylindrical.axis axis x|<3/4:=by
21
+ have hh:=(capH_pos_iff _).mp hH
22
+ rw [abs_div,abs_of_pos hv,div_lt_iff₀ hv] at hh
23
+ nlinarith
24
+ have hsq:(Cylindrical.axis axis x)^2<(3/4:ℝ)^2:=by
25
+ rw [←sq_abs]
26
+ exact (sq_lt_sq₀ (abs_nonneg _) (by norm_num)).mpr ha
27
+ unfold Cylindrical.radiusSq at hq
28
+ nlinarith [norm_nonneg x]
29
+ lemma cap_gradient_uniform_bound : ∃C:ℝ,0<C ∧
30
+ ∀x:Space 7,Cylindrical.radiusSq axis x≤1 → 0<smoothCap x → ‖gradient smoothCap x‖≤C := by
31
+ let S:Set (Space 7):={x|Cylindrical.radiusSq axis x≤1} ∩ Metric.closedBall 0 2
32
+ have hs:IsCompact S:=(isCompact_closedBall (0:Space 7) 2).inter_left
33
+ (isClosed_le (Cylindrical.radiusSq_contDiff axis (n:=1)).continuous continuous_const)
34
+ have hg:ContinuousOn (gradient smoothCap) S:=by
35
+ intro x hx
36
+ have hh:ContDiffAt ℝ ∞ (gradient smoothCap) x:=
37
+ (toDual ℝ (Space 7)).symm.toContinuousLinearEquiv.contDiff.contDiffAt.comp x
38
+ ((smoothCap_contDiffAt hx.1).fderiv_right (by simp))
39
+ exact hh.continuousAt.continuousWithinAt
40
+ obtain ⟨C,hC⟩:=hs.exists_bound_of_continuousOn hg
41
+ refine ⟨|C|+1,by positivity,?_⟩
42
+ intro x hq hp
43
+ have hx:x∈S:=⟨hq,by simpa using cap_positive_bounded hq hp⟩
44
+ exact (hC x hx).trans (by linarith [le_abs_self C])
45
+ lemma polarGradient_norm_bound {x:Space 7} (hx:x≠0) (a b:ℝ) :
46
+ ‖polarGradient axis x a b‖≤|a|+|b| := by
47
+ have hh:=norm_sq_polarGradient axis_norm hx a b
48
+ have hab:0≤|a| * |b|:=mul_nonneg (abs_nonneg _) (abs_nonneg _)
49
+ have hb:0≤(inner ℝ x axis/‖x‖)^2*b^2:=mul_nonneg (sq_nonneg _) (sq_nonneg _)
50
+ nlinarith [sq_abs a,sq_abs b,norm_nonneg (polarGradient axis x a b),abs_nonneg a,abs_nonneg b]
51
+ lemma outer_gradient_uniform_bound : ∃C:ℝ,0<C ∧
52
+ ∀x:Space 7,1≤Cylindrical.radiusSq axis x → 0<outerSigned x → ‖gradient outerSigned x‖≤C := by
53
+ let R:ℝ→ℝ:=fun t=>|f t|+|fp t|+capAmplitude*(2*|gSup t|+|gSup1 t|)
54
+ have hR:ContinuousOn R (Icc (-3/5:ℝ) (3/5)):=by
55
+ intro t ht
56
+ have ht1:t∈Ioo (-1:ℝ) 1:=⟨by linarith [ht.1],by linarith [ht.2]⟩
57
+ have ht2:|t|<1:=abs_lt.mpr ht1
58
+ exact (((hasDerivAt_f ht1).continuousAt.abs.add (hasDerivAt_fp ht1).continuousAt.abs).add
59
+ (continuousAt_const.mul (((hasDerivAt_gSup ht2).continuousAt.abs.const_mul 2).add
60
+ (hasDerivAt_gSup1 ht2).continuousAt.abs))).continuousWithinAt
61
+ obtain ⟨C,hC⟩:=isCompact_Icc.exists_bound_of_continuousOn hR
62
+ refine ⟨|C|+1,by positivity,?_⟩
63
+ intro x hq hp
64
+ obtain ⟨hx,ha⟩:=radiusSq_pos_data (show 0<Cylindrical.radiusSq axis x by linarith)
65
+ have hat:|angle x|≤3/5:=outer_nonnegative_angle hq hp.le
66
+ have hn:1≤‖x‖:=by
67
+ unfold Cylindrical.radiusSq at hq
68
+ nlinarith [norm_nonneg x,sq_nonneg (Cylindrical.axis axis x)]
69
+ have hn0:0<‖x‖:=by linarith
70
+ have hfac:0≤‖x‖^(-2:ℝ)/‖x‖ ∧ ‖x‖^(-2:ℝ)/‖x‖≤1:=by
71
+ rw [Real.rpow_neg (norm_nonneg x),Real.rpow_two]
72
+ constructor
73
+ · positivity
74
+ · apply (div_le_one hn0).mpr
75
+ exact (inv_le_one_of_one_le₀ (by nlinarith : 1≤‖x‖^2)).trans hn
76
+ have hc:0≤capAmplitude*(‖x‖^(-2:ℝ)/‖x‖):=mul_nonneg capAmplitude_pos.le hfac.1
77
+ have hc1:capAmplitude*(‖x‖^(-2:ℝ)/‖x‖)≤capAmplitude:=by nlinarith [capAmplitude_pos]
78
+ have hm:‖gradient outerSigned x‖≤R (angle x):=by
79
+ rw [outerSigned_gradient hx ha]
80
+ calc
81
+ _≤‖polarGradient axis x (f (angle x)) (fp (angle x))‖+
82
+ ‖(capAmplitude*(‖x‖^(-2:ℝ)/‖x‖)) • polarGradient axis x (-2*gSup (angle x)) (gSup1 (angle x))‖ := norm_add_le _ _
83
+ _≤(|f (angle x)|+|fp (angle x)|)+
84
+ capAmplitude*(2*|gSup (angle x)|+|gSup1 (angle x)|) := by
85
+ rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hc]
86
+ apply add_le_add (polarGradient_norm_bound hx _ _)
87
+ have hh:=polarGradient_norm_bound hx (-2*gSup (angle x)) (gSup1 (angle x))
88
+ norm_num only [abs_mul,abs_neg,abs_of_pos (by norm_num : 0<(2:ℝ))] at hh
89
+ exact (mul_le_mul_of_nonneg_left hh hc).trans
90
+ (mul_le_mul_of_nonneg_right hc1 (show 0≤2*|gSup (angle x)|+|gSup1 (angle x)| by positivity))
91
+ _=R (angle x):=rfl
92
+ have hbound:‖R (angle x)‖≤C:=hC _ (by simpa only [neg_div,Set.mem_Icc] using abs_le.mp hat)
93
+ exact hm.trans ((le_abs_self _).trans (hbound.trans (by linarith [le_abs_self C])))
94
+ end Bernoulli.DeSilvaJerison
95
+
96
+ end
97
+ end
98
+
99
+ end OAI
lean/OAI/Analysis/BernoulliCone/FluxBulk.lean ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.FoliationBulkGerm
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+ open Foliation
11
+ lemma normalized_radius_eq_one_iff {p:Space 7×ℝ} (hp:U p.1<p.2)
12
+ (hq:0<Cylindrical.radiusSq axis p.1) :
13
+ Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)=1 ↔ seamHeight p.1=p.2 := by
14
+ let l:=upperParameter p.1 p.2
15
+ let r:=Real.sqrt (Cylindrical.radiusSq axis p.1)
16
+ have hl:0<l:=(upperParameter_spec hp).1
17
+ have hr:0<r:=Real.sqrt_pos.mpr hq
18
+ have hr2:r^2=Cylindrical.radiusSq axis p.1:=Real.sq_sqrt hq.le
19
+ have hrl:Cylindrical.radiusSq axis (l⁻¹ • p.1)=1 ↔ l=r:=by
20
+ rw [Cylindrical.radiusSq_smul,inv_pow,←div_eq_inv_mul,div_eq_one_iff_eq (pow_ne_zero 2 hl.ne'),←hr2]
21
+ exact (sq_eq_sq₀ hr.le hl.le).trans eq_comm
22
+ rw [hrl]
23
+ constructor
24
+ · intro he
25
+ have hh:upperFamily r p.1=p.2:=by simpa only [←he] using (upperParameter_spec hp).2
26
+ rw [upperFamily_at_seam hq] at hh
27
+ have ht:0<p.2:=(U_nonneg _).trans_lt hp
28
+ have hs:0<seamHeight p.1:=by
29
+ by_contra hn
30
+ rw [max_eq_right (le_of_not_gt hn)] at hh
31
+ linarith
32
+ rwa [max_eq_left hs.le] at hh
33
+ · intro he
34
+ exact upperParameter_unique hp hr (by rw [upperFamily_at_seam hq,he,max_eq_left ((U_nonneg _).trans hp.le)])
35
+
36
+ lemma upperFlux_bulk {p:Space 7×ℝ} (hp:U p.1<p.2)
37
+ (hq:Cylindrical.radiusSq axis ((upperParameter p.1 p.2)⁻¹ • p.1)≠1) :
38
+ bulkExpression upperFlux p≤0 := by
39
+ rw [bulkExpression_congr (upperFlux_eventually_eq hp hq)]
40
+ exact upperCalibration_bulk hp hq
41
+
42
+ lemma upperFlux_bulk_off_seam {p:Space 7×ℝ} (hp:U p.1<p.2)
43
+ (hq:0<Cylindrical.radiusSq axis p.1) (hs:seamHeight p.1≠p.2) :
44
+ bulkExpression upperFlux p≤0 :=
45
+ upperFlux_bulk hp (fun h=>hs ((normalized_radius_eq_one_iff hp hq).mp h))
46
+
47
+ lemma exteriorFlux_eventually_eq {p:Space 7×ℝ} (hp:U p.1<p.2)
48
+ (hq:0<Cylindrical.radiusSq axis p.1) (hs:p.2<seamHeight p.1) :
49
+ exteriorFlux =ᶠ[𝓝 p] upperFlux := by
50
+ have hqn:∀ᶠ z:Space 7×ℝ in 𝓝 p,0<Cylindrical.radiusSq axis z.1:=
51
+ ((Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt.comp continuous_fst.continuousAt).eventually (lt_mem_nhds hq)
52
+ have hsn:∀ᶠ z:Space 7×ℝ in 𝓝 p,z.2<seamHeight z.1:=
53
+ continuous_snd.continuousAt.eventually_lt ((seamHeight_contDiffAt hq).continuousAt.comp continuous_fst.continuousAt) hs
54
+ filter_upwards [above_U_isOpen.mem_nhds hp,hqn,hsn] with z hz hzq hzs
55
+ exact (upperFlux_eq_exterior hz hzq hzs).symm
56
+ end Bernoulli.DeSilvaJerison
57
+
58
+ end
59
+ end
60
+
61
+ end OAI
lean/OAI/Analysis/BernoulliCone/FluxSeam.lean ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.FluxBulk
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace
8
+ open scoped Topology ContDiff
9
+ namespace Bernoulli.DeSilvaJerison
10
+ lemma outerSigned_dilation_formula {x:Space 7} {l:ℝ} (hl:0<l)
11
+ (hq:0<Cylindrical.radiusSq axis x) :
12
+ κ*l*outerSigned (l⁻¹ • x)=κ*(Zsigned x+capAmplitude*l^3*KSup x) := by
13
+ rw [outerSigned,Zsigned_smul x (inv_pos.mpr hl),KSup_smul hq (inv_pos.mpr hl)]
14
+ norm_num only [zpow_neg,zpow_ofNat,inv_inv]
15
+ field_simp
16
+
17
+ lemma outerSigned_dilation_gradient {x:Space 7} {l:ℝ} (hl:0<l)
18
+ (hq:0<Cylindrical.radiusSq axis x) :
19
+ κ • gradient outerSigned (l⁻¹ • x)=κ • gradient Zsigned x+
20
+ (κ*capAmplitude*l^3) • gradient KSup x := by
21
+ obtain ⟨hx,ha⟩:=radiusSq_pos_data hq
22
+ have hqy:0<Cylindrical.radiusSq axis (l⁻¹ • x):=by rw [Cylindrical.radiusSq_smul]; positivity
23
+ obtain ⟨hyn,hya⟩:=radiusSq_pos_data hqy
24
+ have hdz:DifferentiableAt ℝ Zsigned x:=(signed_contDiffAt (n:=1) hx ha).differentiableAt (by norm_num)
25
+ have hdk:DifferentiableAt ℝ KSup x:=(KSup_contDiffAt (n:=1) hx ha).differentiableAt (by norm_num)
26
+ have he:(fun y=>κ*l*outerSigned (l⁻¹ • y)) =ᶠ[𝓝 x]
27
+ (fun y=>κ*(Zsigned y+capAmplitude*l^3*KSup y)):=by
28
+ filter_upwards [((Cylindrical.radiusSq_contDiff axis (n:=1)).continuous.continuousAt).eventually (lt_mem_nhds hq)] with y hy
29
+ exact outerSigned_dilation_formula hl hy
30
+ rw [←gradient_dilation hl.ne' ((outerSigned_contDiffAt (n:=1) hyn hya).differentiableAt (by simp)),gradient,he.fderiv_eq]
31
+ change gradient (fun y=>κ*(Zsigned y+capAmplitude*l^3*KSup y)) x=_
32
+ have hdf:DifferentiableAt ℝ (fun y=>Zsigned y+capAmplitude*l^3*KSup y) x:=
33
+ hdz.add (hdk.const_mul (capAmplitude*l^3))
34
+ rw [gradient_const_mul κ hdf,gradient_add' hdz (hdk.const_mul (capAmplitude*l^3)),
35
+ gradient_const_mul (capAmplitude*l^3) hdk,smul_add,smul_smul]
36
+ congr 2
37
+ ring
38
+
39
+ lemma seamHeight_signed_dilation {x:Space 7} (hq:0<Cylindrical.radiusSq axis x) :
40
+ seamHeight x=κ*Real.sqrt (Cylindrical.radiusSq axis x)*
41
+ outerSigned ((Real.sqrt (Cylindrical.radiusSq axis x))⁻¹ • x) := by
42
+ rw [outerSigned_at_seam (normalized_radius_seam hq),seamHeight_formula,Cylindrical.axis_smul,div_eq_mul_inv,mul_comm (Cylindrical.axis axis x)]
43
+
44
+ lemma exteriorFlux_at_seam {x:Space 7} (hq:0<Cylindrical.radiusSq axis x) :
45
+ exteriorFlux (x,seamHeight x)=
46
+ κ • gradient outerSigned ((Real.sqrt (Cylindrical.radiusSq axis x))⁻¹ • x) := by
47
+ let l:=Real.sqrt (Cylindrical.radiusSq axis x)
48
+ have hl:0<l:=Real.sqrt_pos.mpr hq
49
+ obtain ⟨hx,ha⟩:=radiusSq_pos_data hq
50
+ have he:seamHeight x=κ*(Zsigned x+capAmplitude*l^3*KSup x):=by
51
+ rw [seamHeight_signed_dilation hq]
52
+ exact outerSigned_dilation_formula hl hq
53
+ rw [outerSigned_dilation_gradient hl hq]
54
+ unfold exteriorFlux
55
+ dsimp only
56
+ rw [he]
57
+ congr 1
58
+ congr 1
59
+ apply (div_eq_iff (KSup_pos hx ha).ne').mpr
60
+ ring
61
+
62
+ lemma upperParameter_at_seam {x:Space 7} (hq:0<Cylindrical.radiusSq axis x)
63
+ (hp:U x<seamHeight x) : upperParameter x (seamHeight x)=Real.sqrt (Cylindrical.radiusSq axis x) := by
64
+ exact (upperParameter_unique hp (Real.sqrt_pos.mpr hq)
65
+ ((upperFamily_at_seam hq).trans (max_eq_left ((U_nonneg x).trans hp.le))))
66
+
67
+ lemma upperFlux_at_seam {x:Space 7} (hq:0<Cylindrical.radiusSq axis x)
68
+ (hp:U x<seamHeight x) : upperFlux (x,seamHeight x)=
69
+ κ • gradient smoothCap ((Real.sqrt (Cylindrical.radiusSq axis x))⁻¹ • x) := by
70
+ rw [upperFlux,ite_eq_left hp,upperParameter_at_seam hq hp,
71
+ ite_eq_left (normalized_radius_seam hq).le]
72
+
73
+ theorem upperFlux_seam_jump {x:Space 7} (hq:0<Cylindrical.radiusSq axis x)
74
+ (hp:U x<seamHeight x) :
75
+ ‖upperFlux (x,seamHeight x)‖^2-‖exteriorFlux (x,seamHeight x)‖^2-
76
+ 2*inner ℝ (upperFlux (x,seamHeight x)-exteriorFlux (x,seamHeight x)) (gradient seamHeight x)≤0 := by
77
+ rw [upperFlux_at_seam hq hp,exteriorFlux_at_seam hq,gradient_seamHeight hq]
78
+ apply upperCalibration_seam (normalized_radius_seam hq)
79
+ have hh:0<seamHeight x:=(U_nonneg x).trans_lt hp
80
+ rw [seamHeight_signed_dilation hq,←upper_seam_agreement (normalized_radius_seam hq)] at hh
81
+ exact pos_of_mul_pos_right hh (mul_nonneg κ_pos.le (Real.sqrt_nonneg _))
82
+ end Bernoulli.DeSilvaJerison
83
+
84
+ end
85
+ end
86
+
87
+ end OAI
lean/OAI/Analysis/BernoulliCone/FoliationBulkGerm.lean ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.PrimitiveLocal
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter InnerProductSpace
10
+ open scoped Topology
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
13
+ [FiniteDimensional ℝ E]
14
+ def bulkExpression (A:E×ℝ→E) (p:E×ℝ):ℝ:=
15
+ divergence (fun x=>A (x,p.2)) p.1+inner ℝ (A p) (deriv (fun t=>A (p.1,t)) p.2)
16
+ lemma bulkExpression_congr {A B:E×ℝ→E} {p:E×ℝ} (he:A =ᶠ[𝓝 p] B) :
17
+ bulkExpression A p=bulkExpression B p := by
18
+ have hx:(fun x=>A (x,p.2)) =ᶠ[𝓝 p.1] (fun x=>B (x,p.2)):=
19
+ he.comp_tendsto (continuousAt_id.prodMk continuousAt_const)
20
+ have ht:(fun t=>A (p.1,t)) =ᶠ[𝓝 p.2] (fun t=>B (p.1,t)):=
21
+ he.comp_tendsto (continuousAt_const.prodMk continuousAt_id)
22
+ unfold bulkExpression divergence
23
+ rw [hx.fderiv_eq,he.self_of_nhds,ht.deriv_eq]
24
+ end Bernoulli.Foliation
25
+
26
+ end
27
+ end
28
+
29
+ end OAI
lean/OAI/Analysis/BernoulliCone/FoliationDifferential.lean ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.UpperSmoothLeaves
2
+
3
+ namespace OAI
4
+
5
+ universe uE uG
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter InnerProductSpace
10
+ open scoped Topology ContDiff Laplacian
11
+ namespace Bernoulli.Foliation
12
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
13
+ [FiniteDimensional ℝ E]
14
+
15
+ /-- Spatial gradient of a smooth one-parameter family, as a joint field. -/
16
+ def spatialGradient (F:E×ℝ→ℝ) (p:E×ℝ) : E :=
17
+ (toDual ℝ E).symm (fderiv ℝ F p ∘L ContinuousLinearMap.inl ℝ E ℝ)
18
+
19
+ def divergence (V:E→E) (x:E) : ℝ :=
20
+ ∑ i, inner ℝ (stdOrthonormalBasis ℝ E i) (fderiv ℝ V x (stdOrthonormalBasis ℝ E i))
21
+
22
+ lemma inner_spatialGradient (F:E×ℝ→ℝ) (p:E×ℝ) (v:E) :
23
+ inner ℝ (spatialGradient F p) v = fderiv ℝ F p (v,0) := by
24
+ rw [spatialGradient,←toDual_apply_apply (𝕜:=ℝ),LinearIsometryEquiv.apply_symm_apply]
25
+ rfl
26
+
27
+ omit [FiniteDimensional ℝ E] in
28
+ lemma linear_prod_decomposition {G : Type uG} [NormedAddCommGroup G] [NormedSpace ℝ G]
29
+ (L:E×ℝ→L[ℝ] G) (v:E) (s:ℝ) : L (v,s)=L (v,0)+s • L (0,1) := by
30
+ calc
31
+ _ = L ((v,0)+s • ((0:E),(1:ℝ))) := by congr 1; ext <;> simp
32
+ _ = _ := by rw [map_add,map_smul]
33
+
34
+ omit [FiniteDimensional ℝ E] in
35
+ lemma sliceLeft_hasFDerivAt {G : Type uG} [NormedAddCommGroup G] [NormedSpace ℝ G]
36
+ {F:E×ℝ→G} {p:E×ℝ} (hF:DifferentiableAt ℝ F p) :
37
+ HasFDerivAt (fun x:E=>F (x,p.2)) (fderiv ℝ F p ∘L ContinuousLinearMap.inl ℝ E ℝ) p.1 := by
38
+ rcases p with ⟨x,t⟩
39
+ have hi:HasFDerivAt (fun y:E=>(y,t)) (ContinuousLinearMap.inl ℝ E ℝ) x := by
40
+ simpa only [ContinuousLinearMap.inl,id_eq] using (hasFDerivAt_id (𝕜:=ℝ) x).prodMk (hasFDerivAt_const t x)
41
+ exact hF.hasFDerivAt.comp x hi
42
+
43
+ lemma spatialGradient_eq {F:E×ℝ→ℝ} {p:E×ℝ} (hF:DifferentiableAt ℝ F p) :
44
+ spatialGradient F p=gradient (fun x:E=>F (x,p.2)) p.1 := by
45
+ apply ext_inner_right ℝ
46
+ intro v
47
+ rw [inner_spatialGradient,inner_gradient_left]
48
+ have hd := sliceLeft_hasFDerivAt hF
49
+ rw [hd.fderiv]
50
+ simp
51
+
52
+ lemma spatialGradient_contDiffAt {F:E×ℝ→ℝ} {p:E×ℝ} (hF:ContDiffAt ℝ ∞ F p) :
53
+ ContDiffAt ℝ ∞ (spatialGradient F) p := by
54
+ have hpart : ContDiffAt ℝ ∞ (fun q:E×ℝ=>fderiv ℝ F q ∘L ContinuousLinearMap.inl ℝ E ℝ) p :=
55
+ (hF.fderiv_right (by simp)).clm_comp contDiffAt_const
56
+ exact (toDual ℝ E).symm.toContinuousLinearEquiv.contDiff.contDiffAt.comp p hpart
57
+
58
+ lemma parameter_directional {F:E×ℝ→ℝ} {L:E×ℝ→ℝ} {p:E×ℝ}
59
+ (hF:DifferentiableAt ℝ F (p.1,L p)) (hL:DifferentiableAt ℝ L p)
60
+ (he:∀ᶠ z in 𝓝 p,F (z.1,L z)=z.2)
61
+ (hρ:fderiv ℝ F (p.1,L p) (0,1)≠0) (v:E) (s:ℝ) :
62
+ fderiv ℝ L p (v,s)=(s-inner ℝ (spatialGradient F (p.1,L p)) v)/
63
+ fderiv ℝ F (p.1,L p) (0,1) := by
64
+ have hd := hF.hasFDerivAt.comp p ((hasFDerivAt_fst (p:=p)).prodMk hL.hasFDerivAt)
65
+ have hh := congrArg (fun T:E×ℝ→L[ℝ] ℝ=>T (v,s))
66
+ ((hd.congr_of_eventuallyEq (he.mono (fun _ h=>h.symm))).unique (hasFDerivAt_snd (p:=p)))
67
+ simp only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply,
68
+ ] at hh
69
+ rw [linear_prod_decomposition,smul_eq_mul,←inner_spatialGradient] at hh
70
+ change inner ℝ (spatialGradient F (p.1,L p)) v +
71
+ fderiv ℝ L p (v,s) * fderiv ℝ F (p.1,L p) (0,1) = s at hh
72
+ apply (eq_div_iff hρ).mpr
73
+ linarith
74
+
75
+ lemma divergence_gradient {f:E→ℝ} {x:E} (hf:ContDiffAt ℝ ∞ f x) :
76
+ divergence (gradient f) x=Δ f x := by
77
+ have hg:ContDiffAt ℝ ∞ (gradient f) x :=
78
+ (toDual ℝ E).symm.toContinuousLinearEquiv.contDiff.contDiffAt.comp x (hf.fderiv_right (by simp))
79
+ rw [divergence,laplacian_eq_iteratedFDeriv_stdOrthonormalBasis]
80
+ apply Finset.sum_congr rfl
81
+ intro i _
82
+ let v:=stdOrthonormalBasis ℝ E i
83
+ have he:(fun y=>inner ℝ (gradient f y) v)=(fun y=>fderiv ℝ f y v) := by
84
+ ext y
85
+ exact inner_gradient_left
86
+ have hh := congrArg (fun T:E→L[ℝ] ℝ=>T v) (congrArg (fun a:E→ℝ=>fderiv ℝ a x) he)
87
+ have hdir: DifferentiableAt ℝ (fderiv ℝ f) x :=
88
+ (hf.fderiv_right (m:=∞) (by simp)).differentiableAt (by simp)
89
+ rw [((hg.differentiableAt (by simp)).hasFDerivAt.inner ℝ (hasFDerivAt_const v x)).fderiv,
90
+ fderiv_clm_apply hdir (differentiableAt_const v)] at hh
91
+ simp only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply,
92
+ zero_apply,add_apply,ContinuousLinearMap.flip_apply,
93
+ fderiv_const_apply,map_zero,zero_add] at hh
94
+ simp only [fderivInnerCLM_apply,inner_zero_right,zero_add] at hh
95
+ rw [real_inner_comm] at hh
96
+ rw [iteratedFDeriv_two_apply]
97
+ simpa only [Fin.isValue, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_fin_one] using hh
98
+
99
+ /-- Cancellation of the parameter derivatives in the extended calibration.
100
+ This is the differential identity for an actual foliation, not an assumed PDE. -/
101
+ lemma foliation_divergence {F:E×ℝ→ℝ} {L:E×ℝ→ℝ} {p:E×ℝ}
102
+ (hF:ContDiffAt ℝ ∞ F (p.1,L p)) (hL:ContDiffAt ℝ ∞ L p)
103
+ (he:∀ᶠ z in 𝓝 p,F (z.1,L z)=z.2)
104
+ (hρ:fderiv ℝ F (p.1,L p) (0,1)≠0) :
105
+ let A:E×ℝ→E:=fun z=>spatialGradient F (z.1,L z)
106
+ divergence (fun x=>A (x,p.2)) p.1+
107
+ inner ℝ (A p) (deriv (fun t=>A (p.1,t)) p.2)=
108
+ Δ (fun x:E=>F (x,L p)) p.1 := by
109
+ dsimp only
110
+ let q:E×ℝ:=(p.1,L p)
111
+ let B:=spatialGradient F
112
+ let A:E×ℝ→E:=fun z=>B (z.1,L z)
113
+ let T:=fderiv ℝ B q (0,1)
114
+ let ρ:=fderiv ℝ F q (0,1)
115
+ have hBd:DifferentiableAt ℝ B q:=(spatialGradient_contDiffAt hF).differentiableAt (by simp)
116
+ have hLd:DifferentiableAt ℝ L p:=hL.differentiableAt (by simp)
117
+ have hFd:DifferentiableAt ℝ F q:=hF.differentiableAt (by simp)
118
+ have hmap:HasFDerivAt (fun z:E×ℝ=>(z.1,L z))
119
+ ((ContinuousLinearMap.fst ℝ E ℝ).prod (fderiv ℝ L p)) p :=
120
+ hasFDerivAt_fst.prodMk hLd.hasFDerivAt
121
+ have hAd:HasFDerivAt A (fderiv ℝ B q ∘L
122
+ ((ContinuousLinearMap.fst ℝ E ℝ).prod (fderiv ℝ L p))) p :=
123
+ by simpa only [A,Function.comp_def,q] using hBd.hasFDerivAt.comp p hmap
124
+ have hd (v:E) (s:ℝ) : fderiv ℝ A p (v,s)=fderiv ℝ B q (v,0)+
125
+ ((s-inner ℝ (B q) v)/ρ) • T := by
126
+ rw [hAd.fderiv]
127
+ change fderiv ℝ B q (v,fderiv ℝ L p (v,s)) = _
128
+ rw [linear_prod_decomposition,parameter_directional hFd hLd he hρ]
129
+ have hx (v:E) : fderiv ℝ (fun x:E=>A (x,p.2)) p.1 v=fderiv ℝ A p (v,0) := by
130
+ rw [(sliceLeft_hasFDerivAt hAd.differentiableAt).fderiv]
131
+ simp
132
+ have ht : deriv (fun t:ℝ=>A (p.1,t)) p.2=ρ⁻¹ • T := by
133
+ have hh:=hAd.comp_hasDerivAt p.2 ((hasDerivAt_const p.2 p.1).prodMk (hasDerivAt_id p.2))
134
+ change HasDerivAt (fun t:ℝ=>A (p.1,t)) _ p.2 at hh
135
+ rw [←hAd.fderiv] at hh
136
+ rw [hh.deriv]
137
+ rw [hd]
138
+ simp only [inner_zero_right,sub_zero,one_div]
139
+ rw [show ((0:E),(0:ℝ))=(0:E×ℝ) from rfl,map_zero,zero_add]
140
+ have hspatial : divergence (fun x:E=>B (x,L p)) p.1=Δ (fun x:E=>F (x,L p)) p.1 := by
141
+ have heq:(fun x:E=>B (x,L p)) =ᶠ[𝓝 p.1] gradient (fun x:E=>F (x,L p)) := by
142
+ have hn:Tendsto (fun x:E=>(x,L p)) (𝓝 p.1) (𝓝 q):=continuousAt_id.prodMk continuousAt_const
143
+ have hF1:ContDiffAt ℝ 1 F q:=hF.of_le (by simp)
144
+ filter_upwards [hn.eventually (hF1.eventually (by simp))] with x hx
145
+ exact spatialGradient_eq (hx.differentiableAt (by simp))
146
+ have hfs:ContDiffAt ℝ ∞ (fun x:E=>F (x,L p)) p.1 :=
147
+ hF.comp p.1 (contDiffAt_id.prodMk contDiffAt_const)
148
+ rw [divergence,heq.fderiv_eq]
149
+ exact divergence_gradient hfs
150
+ have hbase (v:E):fderiv ℝ (fun x:E=>B (x,L p)) p.1 v=fderiv ℝ B q (v,0) := by
151
+ rw [(sliceLeft_hasFDerivAt hBd).fderiv]
152
+ simp
153
+ change divergence (fun x=>A (x,p.2)) p.1+inner ℝ (B q) (deriv (fun t=>A (p.1,t)) p.2)=_
154
+ rw [ht,←hspatial,divergence,divergence]
155
+ simp_rw [hx,hbase,hd,inner_add_right,real_inner_smul_right,zero_sub,neg_div]
156
+ rw [Finset.sum_add_distrib]
157
+ have hec:(∑ i, -(inner ℝ (B q) (stdOrthonormalBasis ℝ E i)/ρ)*
158
+ inner ℝ (stdOrthonormalBasis ℝ E i) T) = - (inner ℝ (B q) T/ρ) := by
159
+ simp only [neg_mul,Finset.sum_neg_distrib,div_mul_eq_mul_div,←Finset.sum_div]
160
+ rw [(stdOrthonormalBasis ℝ E).sum_inner_mul_inner]
161
+ rw [hec]
162
+ ring
163
+ end Bernoulli.Foliation
164
+
165
+ end
166
+ end
167
+
168
+ end OAI
lean/OAI/Analysis/BernoulliCone/FoliationGraph.lean ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.JointIntervalIntegral
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open MeasureTheory Set Filter InnerProductSpace
10
+ open scoped Topology ContDiff
11
+ namespace Bernoulli.Foliation
12
+ open ParametricIntegral
13
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
14
+ [FiniteDimensional ℝ E]
15
+ lemma divergence_graph_primitive {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
16
+ {u:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) :
17
+ divergence (fun y:E=>heightPrimitive A (y,u y)) x=
18
+ (∫s in (0:ℝ)..u x,divergence (fun y:E=>A (y,s)) x)+
19
+ inner ℝ (A (x,u x)) (gradient u x) := by
20
+ let e:=stdOrthonormalBasis ℝ E
21
+ have hc:Continuous (fun s:ℝ=>fderiv ℝ A (x,s)):=
22
+ (hA.continuous_fderiv (by norm_num)).comp (continuous_const.prodMk continuous_id)
23
+ have hci (i):Continuous (fun s:ℝ=>inner ℝ (e i) (fderiv ℝ A (x,s) (e i,0))):=
24
+ continuous_const.inner (hc.clm_apply continuous_const)
25
+ have hi (s:ℝ) (v:E):fderiv ℝ (fun y:E=>A (y,s)) x v=fderiv ℝ A (x,s) (v,0):=by
26
+ rw [(sliceLeft_hasFDerivAt ((hA.differentiable (by norm_num)) (x,s))).fderiv]
27
+ simp
28
+ have he (v:E):inner ℝ v (∫s in (0:ℝ)..u x,fderiv ℝ A (x,s) (v,0))=
29
+ ∫s in (0:ℝ)..u x,inner ℝ v (fderiv ℝ A (x,s) (v,0)) :=
30
+ ((innerSL ℝ v).intervalIntegral_comp_comm
31
+ ((hc.clm_apply continuous_const).intervalIntegrable 0 (u x))).symm
32
+ rw [divergence]
33
+ simp_rw [graph_fderiv hA hu,inner_add_right,real_inner_smul_right,he]
34
+ rw [Finset.sum_add_distrib]
35
+ congr 1
36
+ · rw [←intervalIntegral.integral_finsetSum (fun i _=>(hci i).intervalIntegrable 0 (u x))]
37
+ apply intervalIntegral.integral_congr
38
+ intro s _
39
+ simp only [divergence,hi]
40
+ rfl
41
+ · simp_rw [←inner_gradient_left]
42
+ rw [(stdOrthonormalBasis ℝ E).sum_inner_mul_inner]
43
+ exact real_inner_comm _ _
44
+ lemma continuous_spatial_divergence {A:E×ℝ→E} (hA:ContDiff ℝ 1 A) (x:E) :
45
+ Continuous (fun s:ℝ=>divergence (fun y:E=>A (y,s)) x) := by
46
+ have hc:Continuous (fun s:ℝ=>fderiv ℝ A (x,s)):=
47
+ (hA.continuous_fderiv (by norm_num)).comp (continuous_const.prodMk continuous_id)
48
+ have hi (s:ℝ) (v:E):fderiv ℝ (fun y:E=>A (y,s)) x v=fderiv ℝ A (x,s) (v,0):=by
49
+ rw [(sliceLeft_hasFDerivAt ((hA.differentiable (by norm_num)) (x,s))).fderiv]
50
+ simp
51
+ simp only [divergence,hi]
52
+ exact continuous_finsetSum _ (fun i _=>continuous_const.inner (hc.clm_apply continuous_const))
53
+
54
+ /-- Integrating the nonlinear bulk inequality gives exactly the flux difference.
55
+ This is FTC and parameter differentiation, not a postulated graph comparison. -/
56
+ lemma integrated_bulk {A:E×ℝ→E} (hA:ContDiff ℝ 1 A) (x:E) {a b:ℝ} (hab:a≤b)
57
+ (hbulk:∀s∈Icc a b,divergence (fun y:E=>A (y,s)) x+
58
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)≤0) :
59
+ 2*(∫s in a..b,divergence (fun y:E=>A (y,s)) x)≤‖A (x,a)‖^2-‖A (x,b)‖^2 := by
60
+ have hAC:ContDiff ℝ 1 (fun s:ℝ=>A (x,s)):=hA.comp (contDiff_const.prodMk contDiff_id)
61
+ have hDC:Continuous (deriv (fun t:ℝ=>A (x,t))) := hAC.continuous_deriv (by norm_num)
62
+ have hAD(s:ℝ):HasDerivAt (fun t:ℝ=>A (x,t)) (deriv (fun t:ℝ=>A (x,t)) s) s:=
63
+ (hAC.differentiable (by norm_num) s).hasDerivAt
64
+ have hN(s:ℝ):HasDerivAt (fun t:ℝ=>‖A (x,t)‖^2)
65
+ (2*inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)) s:=by
66
+ simpa only [real_inner_self_eq_norm_sq,real_inner_comm (deriv (fun t:ℝ=>A (x,t)) s),two_mul] using
67
+ (hAD s).inner ℝ (hAD s)
68
+ have hc:Continuous (fun s:ℝ=>2*inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)):=
69
+ continuous_const.mul (hAC.continuous.inner hDC)
70
+ have hFTC:(∫s in a..b,2*inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s))=
71
+ ‖A (x,b)‖^2-‖A (x,a)‖^2:=
72
+ intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _=>hN s) (hc.intervalIntegrable a b)
73
+ have hi:IntervalIntegrable (fun s:ℝ=>2*divergence (fun y:E=>A (y,s)) x) volume a b:=
74
+ (continuous_const.mul (continuous_spatial_divergence hA x)).intervalIntegrable a b
75
+ have hle:(∫s in a..b,2*divergence (fun y:E=>A (y,s)) x+
76
+ 2*inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s))≤0 := by
77
+ have hh:=intervalIntegral.integral_mono_on hab (hi.add (hc.intervalIntegrable a b))
78
+ (intervalIntegrable_const (c:=(0:ℝ))) (fun s hs=>by linarith [hbulk s hs])
79
+ simpa using hh
80
+ rw [intervalIntegral.integral_add hi (hc.intervalIntegrable a b),hFTC,
81
+ intervalIntegral.integral_const_mul] at hle
82
+ linarith
83
+ lemma divergence_smul_sub {f g:E→E} {x:E}
84
+ (hf:DifferentiableAt ℝ f x) (hg:DifferentiableAt ℝ g x) (c:ℝ) :
85
+ divergence (fun y=>c • (f y-g y)) x=c*(divergence f x-divergence g x) := by
86
+ have hh:HasFDerivAt (fun y=>c • (f y-g y)) (c • (fderiv ℝ f x-fderiv ℝ g x)) x:=
87
+ (hf.hasFDerivAt.sub hg.hasFDerivAt).const_smul c
88
+ rw [divergence,hh.fderiv]
89
+ simp only [smul_apply,sub_apply,
90
+ real_inner_smul_right,inner_sub_right,Finset.mul_sum,Finset.sum_sub_distrib,divergence,mul_sub]
91
+
92
+ def graphPotential (A:E×ℝ→E) (u v:E→ℝ) (x:E) : E :=
93
+ (2:ℝ) • (heightPrimitive A (x,v x)-heightPrimitive A (x,u x))
94
+ lemma graph_potential_identity {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
95
+ {u v:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) (hv:DifferentiableAt ℝ v x) :
96
+ divergence (graphPotential A u v) x=
97
+ 2*(∫s in u x..v x,divergence (fun y:E=>A (y,s)) x)+
98
+ 2*inner ℝ (A (x,v x)) (gradient v x)-2*inner ℝ (A (x,u x)) (gradient u x) := by
99
+ have hd(w:E→ℝ)(hw:DifferentiableAt ℝ w x):
100
+ DifferentiableAt ℝ (fun y:E=>heightPrimitive A (y,w y)) x:=
101
+ DifferentiableAt.comp (f:=fun y:E=>(y,w y)) (g:=heightPrimitive A) x
102
+ (heightPrimitive_differentiable hA (x,w x)) (differentiableAt_id.prodMk hw)
103
+ unfold graphPotential
104
+ rw [divergence_smul_sub (hd v hv) (hd u hu),
105
+ divergence_graph_primitive hA hv,divergence_graph_primitive hA hu]
106
+ have hi:=intervalIntegral.integral_interval_sub_left (μ:=volume)
107
+ ((continuous_spatial_divergence hA x).intervalIntegrable 0 (v x))
108
+ ((continuous_spatial_divergence hA x).intervalIntegrable 0 (u x))
109
+ rw [←hi]
110
+ ring
111
+
112
+ lemma graph_potential_bulk_bound {A:E×ℝ→E} (hA:ContDiff ℝ 1 A)
113
+ {u v:E→ℝ} {x:E} (hu:DifferentiableAt ℝ u x) (hv:DifferentiableAt ℝ v x)
114
+ (huv:u x≤v x)
115
+ (hbulk:∀s∈Icc (u x) (v x),divergence (fun y:E=>A (y,s)) x+
116
+ inner ℝ (A (x,s)) (deriv (fun t:ℝ=>A (x,t)) s)≤0) :
117
+ divergence (graphPotential A u v) x≤‖gradient v x‖^2+
118
+ ‖A (x,u x)‖^2-2*inner ℝ (A (x,u x)) (gradient u x) := by
119
+ have hi:=integrated_bulk hA x huv hbulk
120
+ have hs:0≤‖gradient v x-A (x,v x)‖^2:=sq_nonneg _
121
+ rw [norm_sub_sq_real] at hs
122
+ have he:inner ℝ (gradient v x) (A (x,v x))=inner ℝ (A (x,v x)) (gradient v x):=real_inner_comm _ _
123
+ rw [he] at hs
124
+ rw [graph_potential_identity hA hu hv]
125
+ linarith
126
+ end Bernoulli.Foliation
127
+
128
+ end
129
+ end
130
+
131
+ end OAI
lean/OAI/Analysis/BernoulliCone/FoliationSeam.lean ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.UpperCalibration
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open scoped RealInnerProductSpace
10
+ namespace Bernoulli.Foliation
11
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
12
+ /-- The extended calibration jump across the graph of a matching seam. -/
13
+ lemma seam_flux_identity (Gp Gm H N:E) (ρp ρm:ℝ)
14
+ (hp:H=Gp+ρp • N) (hm:H=Gm+ρm • N) :
15
+ ‖Gp‖^2-‖Gm‖^2-2*inner ℝ (Gp-Gm) H=
16
+ -(ρp+ρm)*inner ℝ (Gp-Gm) N := by
17
+ have hh:Gp+Gm-(2:ℝ) • H=-(ρp+ρm) • N := by
18
+ rw [hp] at hm
19
+ have hg:Gm=Gp+(ρp-ρm) • N := by
20
+ calc
21
+ Gm = (Gm+ρm • N)-ρm • N := by abel
22
+ _ = _ := by rw [←hm]; module
23
+ rw [hg,hp]
24
+ module
25
+ have hid:inner ℝ (Gp-Gm) (Gp+Gm-(2:ℝ) • H)=
26
+ ‖Gp‖^2-‖Gm‖^2-2*inner ℝ (Gp-Gm) H := by
27
+ simp only [inner_sub_right,inner_add_right,inner_sub_left,real_inner_smul_right,
28
+ real_inner_self_eq_norm_sq]
29
+ rw [real_inner_comm Gm Gp]
30
+ ring
31
+ rw [←hid,hh,real_inner_smul_right]
32
+ lemma seam_flux_nonpos (Gp Gm H N:E) (ρp ρm:ℝ)
33
+ (hp:H=Gp+ρp • N) (hm:H=Gm+ρm • N)
34
+ (hρ:0≤ρp+ρm) (hj:0 ≤ inner ℝ (Gp-Gm) N) :
35
+ ‖Gp‖^2-‖Gm‖^2-2*inner ℝ (Gp-Gm) H≤0 := by
36
+ rw [seam_flux_identity Gp Gm H N ρp ρm hp hm]
37
+ exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hρ) hj
38
+ end Bernoulli.Foliation
39
+
40
+ end
41
+ end
42
+
43
+ end OAI
lean/OAI/Analysis/BernoulliCone/GlobalMinimizer.lean ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.UpperComparison
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open Set Filter InnerProductSpace MeasureTheory
8
+ open scoped Topology ContDiff NNReal
9
+ namespace Bernoulli.DeSilvaJerison
10
+
11
+ /-- The constructed double-cone is a global energy minimizer against the full
12
+ arbitrary Sobolev competitor class. Upper and lower comparisons are joined by
13
+ the exact Sobolev lattice identity, including its contact-level gradients. -/
14
+ theorem U_global_minimizer : GlobalMinimizer U := by
15
+ refine ⟨isOpen_univ,gradient U,U_h1loc,?_,?_⟩
16
+ · simpa only [Measure.restrict_univ] using (Eventually.of_forall U_nonneg : ∀ᵐ x:Space 7 ∂volume,0≤U x)
17
+ intro c r hr hB v V hv hvn htrace
18
+ let B:=Metric.ball c r
19
+ let G:=gradient U
20
+ have hu:H1 B U G:=U_h1loc c r hr (subset_univ _)
21
+ have hpos:=SobolevCalculus.h10_positivePart Metric.isOpen_ball htrace
22
+ have hneg:H10 B (fun x=>max (U x-v x) 0)
23
+ (fun x=>(if 0<U x-v x then (1:ℝ) else 0) • (G x-V x)):=by
24
+ simpa only [neg_sub] using SobolevCalculus.h10_positivePart Metric.isOpen_ball htrace.neg
25
+ let p:=fun x=>U x+max (v x-U x) 0
26
+ let P:=fun x=>G x+(if 0<v x-U x then (1:ℝ) else 0) • (V x-G x)
27
+ let m:=fun x=>U x-max (U x-v x) 0
28
+ let M:=fun x=>G x-(if 0<U x-v x then (1:ℝ) else 0) • (G x-V x)
29
+ have hp:H1 B p P:=hu.add hpos.1
30
+ have hm:H1 B m M:=hu.sub hneg.1
31
+ have hpt:H10 B (fun x=>p x-U x) (fun x=>P x-G x):=by
32
+ apply hpos.congr
33
+ · exact Eventually.of_forall (fun x=>by dsimp [p]; ring)
34
+ · exact Eventually.of_forall (fun x=>by dsimp [P]; abel)
35
+ have hmt:H10 B (fun x=>m x-U x) (fun x=>M x-G x):=by
36
+ apply hneg.neg.congr
37
+ · exact Eventually.of_forall (fun x=>by dsimp [m]; ring)
38
+ · exact Eventually.of_forall (fun x=>by dsimp [M]; abel)
39
+ have hUp:∀ᵐ x ∂volume.restrict B,U x≤p x:=
40
+ Eventually.of_forall fun x=>le_add_of_nonneg_right (le_max_right _ _)
41
+ have hmU:∀ᵐ x ∂volume.restrict B,m x≤U x:=
42
+ Eventually.of_forall fun x=>sub_le_self _ (le_max_right _ _)
43
+ have hmn:∀ᵐ x ∂volume.restrict B, 0 ≤ m x:=by
44
+ filter_upwards [hvn] with x hx
45
+ change 0≤U x-max (U x-v x) 0
46
+ exact sub_nonneg.mpr (max_le (by linarith) (U_nonneg x))
47
+ have hupper:=U_upper_comparison c r hr hp hUp hpt
48
+ have hlower:=U_lower_comparison c r hr hm hmn hmU hmt
49
+ let :IsFiniteMeasure (volume.restrict B):=isFiniteMeasure_restrict.mpr measure_ball_lt_top.ne
50
+ have hI {f:Space 7→ℝ} {F:Space 7→Space 7} (h:H1 B f F):
51
+ Integrable (fun x=>‖F x‖^2+if 0<f x then (1:ℝ) else 0) (volume.restrict B):=
52
+ (h.2.1.integrable_norm_pow (by norm_num)).add (integrable_phase h.1.aestronglyMeasurable)
53
+ have henergy:energy B m M+energy B p P=energy B U G+energy B v V:=by
54
+ rw [energy,energy,energy,energy,←integral_add (hI hm) (hI hp),←integral_add (hI hu) (hI hv)]
55
+ apply integral_congr_ae
56
+ filter_upwards [SobolevCalculus.gradient_zero_on_zero_set Metric.isOpen_ball htrace.1] with x hz
57
+ rcases lt_trichotomy (v x) (U x) with hlt|he|hgt
58
+ · have h1:¬0<v x-U x:=by linarith
59
+ have h2:0<U x-v x:=by linarith
60
+ have he:m x=v x:=by dsimp [m]; rw [max_eq_left h2.le]; ring
61
+ simp only [he,p,P,M,ite_eq_right h1,ite_eq_left h2,zero_smul,one_smul,add_zero,
62
+ sub_sub_cancel,max_eq_right (not_lt.mp h1)]
63
+ ring
64
+ · have hVG:V x=G x:=sub_eq_zero.mp (hz (by rw [he,sub_self]))
65
+ simp only [p,P,m,M,he,hVG,sub_self,lt_self_iff_false,ite_false,zero_smul,
66
+ max_self,add_zero,sub_zero]
67
+ · have h1:0<v x-U x:=by linarith
68
+ have h2:¬0<U x-v x:=by linarith
69
+ have he:p x=v x:=by dsimp [p]; rw [max_eq_left h1.le]; ring
70
+ simp only [he,m,M,P,ite_eq_left h1,ite_eq_right h2,zero_smul,one_smul,sub_zero,
71
+ add_sub_cancel,max_eq_right (not_lt.mp h2)]
72
+ change energy B U G≤energy B p P at hupper
73
+ change energy B U G≤energy B m M at hlower
74
+ linarith
75
+
76
+ theorem exists_nonflat_dimension_seven :
77
+ ∃u:Space 7→ℝ,GlobalMinimizer u ∧ Nonzero u ∧ OneHomogeneous u ∧ ¬Flat u :=
78
+ ⟨U,U_global_minimizer,U_nonzero,U_homogeneous,U_not_flat⟩
79
+ end Bernoulli.DeSilvaJerison
80
+
81
+ end
82
+ end
83
+
84
+ end OAI
lean/OAI/Analysis/BernoulliCone/GroundState.lean ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.ConePicone
2
+
3
+ namespace OAI
4
+
5
+ universe uF
6
+
7
+ section
8
+ noncomputable section
9
+ open MeasureTheory Set Filter
10
+ open scoped ENNReal Topology ContDiff Laplacian
11
+ namespace Bernoulli
12
+ open scoped _root_.Bernoulli
13
+ variable {d : ℕ} {D : Set (Space d)}
14
+ namespace GroundState
15
+
16
+ lemma compact_extension_near_test (hD : IsOpen D) {Y φ : Space d → ℝ}
17
+ (hY : ContDiffOn ℝ ∞ Y D) (hφ : Test D φ) :
18
+ ∃ F : Space d → ℝ, ContDiff ℝ ∞ F ∧ HasCompactSupport F ∧
19
+ ∀x∈tsupport φ, F =ᶠ[𝓝 x] Y := by
20
+ obtain ⟨χ,hχ,hχc,hχD,hχ1,_⟩ := exists_cutoff hφ.2.1 hD hφ.2.2
21
+ refine ⟨fun x=>χ x*Y x,?_,hχc.mul_right,?_⟩
22
+ · rw [contDiff_iff_contDiffAt]
23
+ intro x
24
+ by_cases hx : x∈tsupport χ
25
+ · exact hχ.contDiffAt.mul (hY.contDiffAt (hD.mem_nhds (hχD hx)))
26
+ · apply (contDiffAt_const (c:=(0:ℝ))).congr_of_eventuallyEq
27
+ filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy
28
+ simp [hy]
29
+ · intro x hx
30
+ filter_upwards [hχ1.filter_mono (nhds_le_nhdsSet hx)] with y hy
31
+ simp [hy]
32
+
33
+ lemma compact_green {F φ : Space d → ℝ} (hF : ContDiff ℝ ∞ F)
34
+ (hc : HasCompactSupport F) (hφ : Test univ φ) :
35
+ (∫x, inner ℝ (gradient F x) (gradient φ x)) = -(∫x, Δ F x*φ x) := by
36
+ have hi := (show Test univ F from ⟨hF,hc,subset_univ _⟩).h1.laplacian_ibp hφ
37
+ simp only [Measure.restrict_univ] at hi
38
+ have hs := SchwartzMap.integral_mul_laplacian_right_eq_left
39
+ (hc.toSchwartzMap hF) (hφ.2.1.toSchwartzMap hφ.1) (μ:=volume)
40
+ simp only [SchwartzMap.laplacian_apply] at hs
41
+ change (∫x, F x*Δ φ x)=(∫x, Δ F x*φ x) at hs
42
+ linarith
43
+
44
+ lemma local_green (hD : IsOpen D) {Y φ : Space d → ℝ}
45
+ (hY : ContDiffOn ℝ ∞ Y D) (hφ : Test D φ) :
46
+ (∫x, inner ℝ (gradient Y x) (gradient φ x)) = -(∫x, Δ Y x*φ x) := by
47
+ obtain ⟨F,hF,hFc,hFY⟩ := compact_extension_near_test hD hY hφ
48
+ have hi := compact_green hF hFc (show Test univ φ from ⟨hφ.1,hφ.2.1,subset_univ _⟩)
49
+ convert! hi using 1
50
+ · apply integral_congr_ae
51
+ exact ae_of_all _ fun x=>by
52
+ by_cases hx : x∈tsupport φ
53
+ · dsimp only
54
+ simp only [gradient,(hFY x hx).fderiv_eq]
55
+ · have hz : gradient φ x=0 := by rw [gradient,fderiv_of_notMem_tsupport ℝ hx,map_zero]
56
+ simp [hz]
57
+ · congr 1
58
+ apply integral_congr_ae
59
+ exact ae_of_all _ fun x=>by
60
+ by_cases hx : x∈tsupport φ
61
+ · dsimp only
62
+ rw [(InnerProductSpace.laplacian_congr_nhds (hFY x hx)).eq_of_nhds]
63
+ · simp [image_eq_zero_of_notMem_tsupport hx]
64
+
65
+ lemma local_green_integrable (hD : IsOpen D) {Y φ : Space d → ℝ}
66
+ (hY : ContDiffOn ℝ ∞ Y D) (hφ : Test D φ) :
67
+ Integrable (fun x=>inner ℝ (gradient Y x) (gradient φ x)) ∧
68
+ Integrable (fun x=>Δ Y x*φ x) := by
69
+ obtain ⟨F,hF,hFc,hFY⟩ := compact_extension_near_test hD hY hφ
70
+ have hFtest : Test univ F := ⟨hF,hFc,subset_univ _⟩
71
+ have hφtest : Test univ φ := ⟨hφ.1,hφ.2.1,subset_univ _⟩
72
+ have hgrad := integrable_inner_of_memLp hFtest.memLp_gradient hφtest.memLp_gradient
73
+ simp only [Measure.restrict_univ] at hgrad
74
+ have hLap : Continuous (Δ F) := by
75
+ let S := hFc.toSchwartzMap hF
76
+ have he : (Laplacian.laplacian S : Space d → ℝ)=Δ F := funext fun x=>SchwartzMap.laplacian_apply S x
77
+ exact he ▸ (Laplacian.laplacian S).continuous
78
+ have hi : Integrable (fun x=>Δ F x*φ x) volume :=
79
+ (hLap.mul hφ.1.continuous).integrable_of_hasCompactSupport hφ.2.1.mul_left
80
+ constructor
81
+ · apply hgrad.congr
82
+ exact ae_of_all _ fun x=>by
83
+ by_cases hx : x∈tsupport φ
84
+ · dsimp only
85
+ simp only [gradient,(hFY x hx).fderiv_eq]
86
+ · have hz : gradient φ x=0 := by rw [gradient,fderiv_of_notMem_tsupport ℝ hx,map_zero]
87
+ simp [hz]
88
+ · apply hi.congr
89
+ exact ae_of_all _ fun x=>by
90
+ by_cases hx : x∈tsupport φ
91
+ · dsimp only
92
+ rw [(InnerProductSpace.laplacian_congr_nhds (hFY x hx)).eq_of_nhds]
93
+ · simp [image_eq_zero_of_notMem_tsupport hx]
94
+
95
+ open Halfspace
96
+
97
+ lemma square_ratio_test (hD : IsOpen D) {Y φ : Space d → ℝ}
98
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x) (hφ : Test D φ) :
99
+ Test D (positiveSquareRatio φ Y) := by
100
+ have hs : tsupport (positiveSquareRatio φ Y)⊆tsupport φ := by
101
+ apply closure_mono
102
+ intro x hx
103
+ by_contra hn
104
+ have hz : φ x=0 := Function.notMem_support.mp hn
105
+ change positiveSquareRatio φ Y x ≠ 0 at hx
106
+ exact hx (by simp [positiveSquareRatio,hz])
107
+ refine ⟨?_,hφ.2.1.of_isClosed_subset (isClosed_tsupport _) hs,hs.trans hφ.2.2⟩
108
+ rw [contDiff_iff_contDiffAt]
109
+ intro x
110
+ by_cases hx : x∈tsupport φ
111
+ · have hy := hY.contDiffAt (hD.mem_nhds (hφ.2.2 hx))
112
+ have hp := hYp x (hφ.2.2 hx)
113
+ have he : positiveSquareRatio φ Y =ᶠ[𝓝 x] (fun y=>φ y^2/Y y) := by
114
+ filter_upwards [hy.continuousAt.preimage_mem_nhds (Ioi_mem_nhds hp)] with y hh
115
+ change 0 < Y y at hh
116
+ simp only [positiveSquareRatio,ite_eq_left hh]
117
+ exact ((hφ.1.contDiffAt.pow 2).div hy hp.ne').congr_of_eventuallyEq he
118
+ · apply (contDiffAt_const (c:=(0:ℝ))).congr_of_eventuallyEq
119
+ filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy
120
+ change φ y = 0 at hy
121
+ simp [positiveSquareRatio,hy]
122
+
123
+ lemma picone_identity (hD : IsOpen D) {Y φ : Space d → ℝ}
124
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x) (hφ : Test D φ) (x : Space d) :
125
+ ‖gradient φ x-(φ x/Y x) • gradient Y x‖^2 = ‖gradient φ x‖^2-
126
+ inner ℝ (gradient Y x) (gradient (positiveSquareRatio φ Y) x) := by
127
+ by_cases hx : x∈D
128
+ · rw [positiveSquareRatio_gradient
129
+ ((hY.contDiffAt (hD.mem_nhds hx)).differentiableAt (by simp))
130
+ (hφ.1.differentiable (by simp) x) (hYp x hx)]
131
+ rw [norm_sub_sq_real]
132
+ simp only [inner_sub_right,real_inner_smul_right,real_inner_self_eq_norm_sq,
133
+ norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,real_inner_comm (gradient φ x) (gradient Y x)]
134
+ ring
135
+ · rw [hφ.eq_zero_outside hx,hφ.gradient_eq_zero_outside hx,
136
+ (square_ratio_test hD hY hYp hφ).gradient_eq_zero_outside hx]
137
+ simp
138
+
139
+ /-- Ground-state square completion for arbitrary compact smooth tests in a
140
+ positive superharmonic domain. It is proved by the weak integration-by-parts
141
+ identity, not inserted as an assumption about the explicit barrier. -/
142
+ theorem picone_test (hD : IsOpen D) {Y φ : Space d → ℝ}
143
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x)
144
+ (hLap : ∀x∈D, Δ Y x≤0) (hφ : Test D φ) :
145
+ (∫x, ‖gradient φ x-(φ x/Y x) • gradient Y x‖^2) ≤
146
+ (∫x, ‖gradient φ x‖^2) := by
147
+ have hq := square_ratio_test hD hY hYp hφ
148
+ have hqi := local_green_integrable hD hY hq
149
+ have hgr := local_green hD hY hq
150
+ have hn : (∫x, Δ Y x*positiveSquareRatio φ Y x)≤0 := by
151
+ apply integral_nonpos
152
+ intro x
153
+ by_cases hx : x∈D
154
+ · exact mul_nonpos_of_nonpos_of_nonneg (hLap x hx) (positiveSquareRatio_nonneg x)
155
+ · simp [hq.eq_zero_outside hx]
156
+ have hφtest : Test univ φ := ⟨hφ.1,hφ.2.1,subset_univ _⟩
157
+ have hi := hφtest.memLp_gradient.integrable_norm_pow (show (2:ℕ)≠0 by simp)
158
+ simp only [Measure.restrict_univ] at hi
159
+ simp_rw [picone_identity hD hY hYp hφ]
160
+ rw [integral_sub hi hqi.1]
161
+ linarith
162
+
163
+ lemma drift_test_memLp (hD : IsOpen D) {Y φ : Space d → ℝ}
164
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x) (hφ : Test D φ) :
165
+ MemLp (fun x=>gradient φ x-(φ x/Y x) • gradient Y x) 2 volume := by
166
+ have hc : Continuous (fun x=>(φ x/Y x) • gradient Y x) := by
167
+ rw [continuous_iff_continuousAt]
168
+ intro x
169
+ by_cases hx : x∈tsupport φ
170
+ · have hy := hY.contDiffAt (hD.mem_nhds (hφ.2.2 hx))
171
+ exact (hφ.1.continuous.continuousAt.div hy.continuousAt (hYp x (hφ.2.2 hx)).ne').smul
172
+ ((InnerProductSpace.toDual ℝ (Space d)).symm.continuous.continuousAt.comp
173
+ (hy.continuousAt_fderiv (by simp)))
174
+ · apply (continuousAt_const (y:=(0:Space d))).congr_of_eventuallyEq
175
+ filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy
176
+ change φ y=0 at hy
177
+ simp [hy]
178
+ have hs : HasCompactSupport (fun x=>(φ x/Y x) • gradient Y x) := by
179
+ apply hφ.2.1.of_isClosed_subset (isClosed_tsupport _)
180
+ apply closure_mono
181
+ intro x hx
182
+ change (φ x/Y x) • gradient Y x ≠ 0 at hx
183
+ change φ x ≠ 0
184
+ intro hz
185
+ exact hx (by simp [hz])
186
+ have hφt : Test univ φ := ⟨hφ.1,hφ.2.1,subset_univ _⟩
187
+ have hg := hφt.memLp_gradient
188
+ simp only [Measure.restrict_univ] at hg
189
+ exact hg.sub (hc.memLp_of_hasCompactSupport hs)
190
+
191
+ lemma integral_norm_sq_eq {F : Type uF} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
192
+ {μ : Measure (Space d)} {f : Space d → F} (hf : MemLp f 2 μ) :
193
+ (∫x, ‖f x‖^2 ∂μ)=‖hf.toLp f‖^2 := by
194
+ rw [← real_inner_self_eq_norm_sq,L2.inner_def]
195
+ apply integral_congr_ae
196
+ filter_upwards [hf.coeFn_toLp] with x hx
197
+ rw [hx,real_inner_self_eq_norm_sq]
198
+
199
+ lemma picone_test_eLpNorm (hD : IsOpen D) {Y φ : Space d → ℝ}
200
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x)
201
+ (hLap : ∀x∈D, Δ Y x≤0) (hφ : Test D φ) :
202
+ eLpNorm (fun x=>gradient φ x-(φ x/Y x) • gradient Y x) 2 (volume.restrict D) ≤
203
+ eLpNorm (gradient φ) 2 (volume.restrict D) := by
204
+ have hφt : Test univ φ := ⟨hφ.1,hφ.2.1,subset_univ _⟩
205
+ have hg := hφt.memLp_gradient
206
+ simp only [Measure.restrict_univ] at hg
207
+ have hl := drift_test_memLp hD hY hYp hφ
208
+ have hi := picone_test hD hY hYp hLap hφ
209
+ rw [integral_norm_sq_eq hl,integral_norm_sq_eq hg] at hi
210
+ have hn : ‖hl.toLp _‖ ≤ ‖hg.toLp _‖ := (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mp hi
211
+ have hh : eLpNorm (fun x=>gradient φ x-(φ x/Y x) • gradient Y x) 2 volume ≤
212
+ eLpNorm (gradient φ) 2 volume := by
213
+ rw [← Lp.enorm_toLp hl,← Lp.enorm_toLp hg,← ofReal_norm,← ofReal_norm]
214
+ exact ENNReal.ofReal_le_ofReal hn
215
+ have he : eLpNorm (gradient φ) 2 (volume.restrict D)=eLpNorm (gradient φ) 2 volume := by
216
+ rw [← eLpNorm_indicator_eq_eLpNorm_restrict hD.measurableSet]
217
+ congr 1
218
+ ext x
219
+ by_cases hx : x∈D
220
+ · simp [hx]
221
+ · simp [hx,hφ.gradient_eq_zero_outside hx]
222
+ rw [he]
223
+ exact (eLpNorm_mono_measure _ Measure.restrict_le_self).trans hh
224
+
225
+ /-- The full H¹₀ ground-state inequality. Fatou's lemma handles the singular
226
+ coefficient at the boundary or cone vertex; no bounded-drift or Hardy hypothesis
227
+ is imposed. -/
228
+ theorem picone_h10_eLpNorm (hD : IsOpen D) {Y w : Space d → ℝ} {G : Space d → Space d}
229
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x)
230
+ (hLap : ∀x∈D, Δ Y x≤0) (hw : H10 D w G) :
231
+ MemLp (fun x=>G x-(w x/Y x) • gradient Y x) 2 (volume.restrict D) ∧
232
+ eLpNorm (fun x=>G x-(w x/Y x) • gradient Y x) 2 (volume.restrict D) ≤
233
+ eLpNorm G 2 (volume.restrict D) := by
234
+ obtain ⟨φ,hφ,hφw,hφG⟩ := SobolevCalculus.H10_sequence hw
235
+ have htψ := tendstoInMeasure_of_tendsto_eLpNorm (by norm_num : (2:ENNReal)≠0)
236
+ hφw
237
+ have htG := tendstoInMeasure_of_tendsto_eLpNorm (by norm_num : (2:ENNReal)≠0)
238
+ hφG
239
+ obtain ⟨a,ha,haw⟩ := htψ.exists_seq_tendsto_ae
240
+ obtain ⟨b,hb,hbG⟩ := (htG.comp ha.tendsto_atTop).exists_seq_tendsto_ae
241
+ let ψ := fun n=>φ (a (b n))
242
+ have hψ : ∀n, Test D (ψ n) := fun n=>hφ (a (b n))
243
+ let T := fun n x=>gradient (ψ n) x-(ψ n x/Y x) • gradient Y x
244
+ let L := fun x=>G x-(w x/Y x) • gradient Y x
245
+ have hT : ∀n, MemLp (T n) 2 (volume.restrict D) := fun n=>
246
+ (drift_test_memLp hD hY hYp (hψ n)).mono_measure Measure.restrict_le_self
247
+ have hTL : ∀ᵐ x ∂volume.restrict D, Tendsto (fun n=>T n x) atTop (𝓝 (L x)) := by
248
+ filter_upwards [haw,hbG] with x hx hy
249
+ exact hy.sub (((hx.comp hb.tendsto_atTop).div_const (Y x)).smul tendsto_const_nhds)
250
+ have hLm := aestronglyMeasurable_of_tendsto_ae _
251
+ (fun n=>(hT n).aestronglyMeasurable) hTL
252
+ have hl := Lp.eLpNorm_lim_le_liminf_eLpNorm (p:=2)
253
+ (fun n=>(hT n).aestronglyMeasurable) L hLm hTL
254
+ have hGnorm : Tendsto (fun n=>eLpNorm (gradient (ψ n)) 2 (volume.restrict D)) atTop
255
+ (𝓝 (eLpNorm G 2 (volume.restrict D))) := by
256
+ have hLp : Tendsto (fun n=>(hφ n).memLp_gradient.toLp (gradient (φ n))) atTop
257
+ (𝓝 (hw.1.2.1.toLp G)) := by
258
+ apply tendsto_iff_enorm_sub_tendsto_zero.mpr
259
+ simpa only [← MemLp.toLp_sub,Lp.enorm_toLp] using hφG
260
+ have hh := hLp.enorm.comp (ha.tendsto_atTop.comp hb.tendsto_atTop)
261
+ simpa only [Lp.enorm_toLp,Function.comp_def,ψ] using hh
262
+ have hbound : eLpNorm L 2 (volume.restrict D) ≤ eLpNorm G 2 (volume.restrict D) := by
263
+ refine hl.trans ?_
264
+ rw [← hGnorm.liminf_eq]
265
+ apply Filter.liminf_le_liminf
266
+ · exact Eventually.of_forall fun n=>picone_test_eLpNorm hD hY hYp hLap (hψ n)
267
+ all_goals isBoundedDefault
268
+ exact ⟨hbound.trans_lt hw.1.2.1,hbound⟩
269
+
270
+ theorem picone_h10 (hD : IsOpen D) {Y w : Space d → ℝ} {G : Space d → Space d}
271
+ (hY : ContDiffOn ℝ ∞ Y D) (hYp : ∀x∈D, 0<Y x)
272
+ (hLap : ∀x∈D, Δ Y x≤0) (hw : H10 D w G) :
273
+ (∫x in D, ‖G x-(w x/Y x) • gradient Y x‖^2) ≤
274
+ (∫x in D, ‖G x‖^2) := by
275
+ obtain ⟨hl,hb⟩ := picone_h10_eLpNorm hD hY hYp hLap hw
276
+ have ht := ENNReal.toReal_mono hw.1.2.1.ne hb
277
+ rw [integral_norm_sq_eq hl,integral_norm_sq_eq hw.1.2.1,Lp.norm_toLp,Lp.norm_toLp]
278
+ exact pow_le_pow_left₀ ENNReal.toReal_nonneg ht 2
279
+
280
+ lemma orthogonal_h10_of_tests {G : Space d → Space d}
281
+ (hG : MemLp G 2 (volume.restrict D))
282
+ (ht : ∀φ, Test D φ → (∫x in D, inner ℝ (G x) (gradient φ x))=0) :
283
+ ∀v V, H10 D v V → (∫x in D, inner ℝ (G x) (V x))=0 := by
284
+ intro v V hv
285
+ obtain ⟨f,hf,_,hfG⟩ := SobolevCalculus.H10_sequence hv
286
+ have hl : Tendsto (fun n => (hf n).memLp_gradient.toLp (gradient (f n)))
287
+ atTop (𝓝 (hv.1.2.1.toLp V)) := by
288
+ apply tendsto_iff_enorm_sub_tendsto_zero.mpr
289
+ simpa only [← MemLp.toLp_sub,Lp.enorm_toLp] using hfG
290
+ have hi : Tendsto (fun n => inner ℝ (hG.toLp G)
291
+ ((hf n).memLp_gradient.toLp (gradient (f n)))) atTop
292
+ (𝓝 (inner ℝ (hG.toLp G) (hv.1.2.1.toLp V))) := tendsto_const_nhds.inner hl
293
+ have he n : inner ℝ (hG.toLp G) ((hf n).memLp_gradient.toLp (gradient (f n)))=0 := by
294
+ rw [L2.inner_def]
295
+ convert! ht (f n) (hf n) using 1
296
+ apply integral_congr_ae
297
+ filter_upwards [hG.coeFn_toLp,(hf n).memLp_gradient.coeFn_toLp] with x hx hy
298
+ rw [hx,hy]
299
+ simp only [he] at hi
300
+ have hz := tendsto_nhds_unique hi tendsto_const_nhds
301
+ rw [L2.inner_def] at hz
302
+ convert! hz using 1
303
+ apply integral_congr_ae
304
+ filter_upwards [hG.coeFn_toLp,hv.1.2.1.coeFn_toLp] with x hx hy
305
+ rw [hx,hy]
306
+
307
+ theorem harmonic_h10 (hD : IsOpen D) {u w : Space d → ℝ} {G : Space d → Space d}
308
+ (hu : ContDiffOn ℝ ∞ u D) (hLap : ∀x∈D, Δ u x=0)
309
+ (hG : MemLp (gradient u) 2 (volume.restrict D)) (hw : H10 D w G) :
310
+ (∫x in D, inner ℝ (gradient u x) (G x))=0 := by
311
+ apply orthogonal_h10_of_tests hG _ w G hw
312
+ intro φ hφ
313
+ rw [setIntegral_eq_integral_of_forall_compl_eq_zero
314
+ (fun x hx=>by rw [hφ.gradient_eq_zero_outside hx,inner_zero_right])]
315
+ rw [local_green hD hu hφ]
316
+ suffices hh : (fun x=>Δ u x*φ x)=(fun _=>0) by rw [hh,integral_zero,neg_zero]
317
+ ext x
318
+ by_cases hx:x∈D
319
+ · simp [hLap x hx]
320
+ · simp [hφ.eq_zero_outside hx]
321
+
322
+ end GroundState
323
+ end Bernoulli
324
+
325
+ end
326
+ end
327
+
328
+ end OAI
lean/OAI/Analysis/BernoulliCone/HalfspaceDensity.lean ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.HalfspacePullback
2
+
3
+ namespace OAI
4
+
5
+ universe uE
6
+
7
+ section
8
+ noncomputable section
9
+ open Set Filter
10
+ open scoped Topology NNReal
11
+ namespace Bernoulli.Shape
12
+ variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]
13
+
14
+ def density (u : E → ℝ) (x : E) : ℝ := ‖gradient u x‖^2+if 0 < u x then 1 else 0
15
+
16
+ def firstTerm (φ : E → ℝ) (e : E) (x : E) : ℝ :=
17
+ if 0 < inner ℝ e x then fderiv ℝ φ x e else 0
18
+
19
+ lemma density_nonneg (u : E → ℝ) (x : E) : 0 ≤ density u x := by
20
+ unfold density
21
+ split_ifs <;> positivity
22
+
23
+ lemma gradient_norm_le_lipschitz {φ : E → ℝ} {C : ℝ≥0}
24
+ (hφ : LipschitzWith C φ) {x : E} (hd : DifferentiableAt ℝ φ x) :
25
+ ‖gradient φ x‖ ≤ C := by
26
+ rw [gradient,LinearIsometryEquiv.norm_map]
27
+ exact hd.hasFDerivAt.le_of_lipschitz hφ
28
+
29
+ lemma density_pullback_bound {φ : E → ℝ} {C : ℝ≥0} {x : E}
30
+ (hφ : DifferentiableAt ℝ φ x) (hLip : LipschitzWith C φ)
31
+ (e : E) (t : ℝ) (h : (1:ℝ)/2 ≤ 1+t*fderiv ℝ φ x e)
32
+ (g : E ≃ₜ E) (hg : ∀ y, g y=deform φ e t y) (hx : inner ℝ e x ≠ 0) :
33
+ (1+t*fderiv ℝ φ x e)*density (fun y => positiveLinear e (g.symm y)) (g x) ≤
34
+ density (positiveLinear e) x + t*(1-‖e‖^2)*firstTerm φ e x +
35
+ t^2*(2*‖e‖^4*C^2) := by
36
+ have hpos : 0 < 1+t*fderiv ℝ φ x e := lt_of_lt_of_le (by norm_num) h
37
+ have hne := hpos.ne'
38
+ have hv : positiveLinear e (g.symm (g x)) = positiveLinear e x := by rw [g.symm_apply_apply]
39
+ rcases lt_or_gt_of_ne hx with hx|hx
40
+ · rw [density,pullback_gradient_neg hφ e t hne g hg hx,hv,density,
41
+ positiveLinear_gradient_neg e hx,firstTerm]
42
+ simp only [positiveLinear,max_eq_right hx.le,lt_self_iff_false,ite_false,norm_zero,zero_pow,
43
+ ne_eq,OfNat.ofNat_ne_zero,not_false_eq_true,zero_add,mul_zero,add_zero,not_lt.mpr hx.le]
44
+ positivity
45
+ · have hgNorm := gradient_norm_le_lipschitz hLip hφ
46
+ have hsq : ‖gradient φ x‖^2 ≤ (C:ℝ)^2 := by nlinarith [norm_nonneg (gradient φ x),C.coe_nonneg]
47
+ have hnum : 0 ≤ t^2*‖e‖^4 := mul_nonneg (sq_nonneg _) (pow_nonneg (norm_nonneg _) _)
48
+ have hn : 0 ≤ t^2*‖e‖^4*(C:ℝ)^2 := mul_nonneg hnum (sq_nonneg _)
49
+ have hr : t^2*‖e‖^4*‖gradient φ x‖^2/(1+t*fderiv ℝ φ x e) ≤
50
+ t^2*(2*‖e‖^4*C^2) := by
51
+ apply (div_le_iff₀ hpos).mpr
52
+ have h1 := mul_le_mul_of_nonneg_left hsq hnum
53
+ have h2 : t^2*‖e‖^4*(C:ℝ)^2 ≤ (2*(t^2*‖e‖^4*(C:ℝ)^2))*(1+t*fderiv ℝ φ x e) := by
54
+ nlinarith
55
+ apply h1.trans
56
+ calc
57
+ _ ≤ (2*(t^2*‖e‖^4*(C:ℝ)^2))*(1+t*fderiv ℝ φ x e) := h2
58
+ _ = _ := by ring
59
+ have hc := pullback_density_algebra e (gradient φ x) t (by simpa only [inner_gradient_right,conj_trivial] using hne)
60
+ simp only [inner_gradient_right,conj_trivial] at hc
61
+ rw [density,pullback_gradient_pos hφ e t hne g hg hx,hv,density,
62
+ positiveLinear_gradient_pos e hx,firstTerm,ite_eq_left hx]
63
+ simp only [positiveLinear,max_eq_left hx.le,ite_eq_left hx]
64
+ linarith
65
+ end Bernoulli.Shape
66
+
67
+ end
68
+ end
69
+
70
+ end OAI
lean/OAI/Analysis/BernoulliCone/HalfspaceDifferential.lean ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.HomogeneousCalculus
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli.Halfspace
10
+ open HarmonicKernel
11
+ variable {d : ℕ}
12
+
13
+ lemma squareQuotient_hasFDerivAt {u : Space d → ℝ} {e x : Space d}
14
+ (hu : DifferentiableAt ℝ u x) (ht : 0 < inner ℝ x e) :
15
+ HasFDerivAt (squareQuotient u e)
16
+ ((inner ℝ x e)⁻¹ • ((2*u x) • fderiv ℝ u x)-
17
+ (u x^2/(inner ℝ x e)^2) • innerSL ℝ e) x := by
18
+ have hi : HasFDerivAt (fun y : Space d => inner ℝ y e) (innerSL ℝ e) x := by
19
+ convert! (innerSL ℝ e).hasFDerivAt (x:=x) using 1
20
+ funext y
21
+ exact (real_inner_comm y e).symm
22
+ have hh := (hu.hasFDerivAt.pow 2).mul ((hasDerivAt_inv ht.ne').comp_hasFDerivAt x hi)
23
+ have he : (squareQuotient u e) =ᶠ[𝓝 x] (fun y=>u y^2/inner ℝ y e) := by
24
+ filter_upwards [(continuous_id.inner continuous_const).continuousAt.preimage_mem_nhds
25
+ (Ioi_mem_nhds ht)] with y hy
26
+ change 0 < inner ℝ y e at hy
27
+ simp only [squareQuotient,ite_eq_left hy]
28
+ simp only [Function.comp_apply] at hh
29
+ convert! hh.congr_of_eventuallyEq he using 1
30
+ ext v
31
+ simp only [sub_apply,smul_apply,smul_eq_mul,innerSL_apply_apply,add_apply,
32
+ Nat.cast_ofNat,pow_one,Nat.reduceSub,nsmul_eq_mul]
33
+ field_simp
34
+ ring
35
+
36
+ lemma potential_gradient (x : Space d) :
37
+ gradient (potential : Space d → ℝ) x = -rawKernel x • x := by
38
+ apply ext_inner_right ℝ
39
+ intro e
40
+ rw [inner_gradient_left,real_inner_smul_left]
41
+ have hh := radial_directional (contDiff_profile.differentiable (by simp)) x e
42
+ rw [show (fun y : Space d=>profile (‖y‖^2))=potential from rfl] at hh
43
+ rw [hh]
44
+ simp only [rawKernel,kernelProfile]
45
+ ring
46
+
47
+ lemma potential_nonneg (x : Space d) : 0 ≤ potential x := expNegInvGlue.nonneg _
48
+ lemma potential_pos {x : Space d} (hx : x∈ball (0:Space d) 1) : 0 < potential x := by
49
+ apply expNegInvGlue.pos_of_pos
50
+ rw [mem_ball_zero_iff] at hx
51
+ nlinarith [norm_nonneg x]
52
+
53
+ lemma weightedQuotient_directional {u : Space d → ℝ} {e x : Space d}
54
+ (hu : DifferentiableAt ℝ u x) (ht : 0 < inner ℝ x e) (he : ‖e‖=1) :
55
+ inner ℝ (gradient (fun y=>potential y*squareQuotient u e y) x) e =
56
+ -rawKernel x*u x^2 + potential x*(
57
+ 2*(u x/inner ℝ x e)*inner ℝ (gradient u x) e-(u x/inner ℝ x e)^2) := by
58
+ have hφ := (contDiff_potential.differentiable (by simp) x).hasFDerivAt
59
+ have hq := squareQuotient_hasFDerivAt hu ht
60
+ have hp := hφ.mul hq
61
+ change HasFDerivAt (fun y=>potential y*squareQuotient u e y) _ x at hp
62
+ rw [inner_gradient_left,hp.fderiv]
63
+ simp only [add_apply,smul_apply,smul_eq_mul,sub_apply,innerSL_apply_apply]
64
+ simp only [← inner_gradient_left,potential_gradient,real_inner_smul_left,
65
+ real_inner_self_eq_norm_sq,he]
66
+ simp only [squareQuotient,ite_eq_left ht,one_pow,mul_one]
67
+ field_simp
68
+ ring
69
+
70
+ lemma radial_outer_identity {u : Space d → ℝ} {L : ℝ≥0}
71
+ (hm : GlobalMinimizer u) (hL : LipschitzWith L u)
72
+ (hom : ∀r:ℝ, 0<r → ∀x, u (r•x)=r*u x) :
73
+ (∫ x in ball (0:Space d) 2, potential x*‖gradient u x‖^2-rawKernel x*u x^2)=0 := by
74
+ have hφ : Test (ball (0:Space d) 2) potential := by
75
+ have he : (potential : Space d → ℝ)=scaledPotential 1 0 := by
76
+ funext x; simp [potential,scaledPotential]
77
+ rw [he]
78
+ exact scaledPotential_test (by norm_num) 0 (closedBall_subset_ball (by norm_num))
79
+ have hh := hm.outerVariation hL (by norm_num : 0 < (2:ℝ)) hφ
80
+ rw [← hh]
81
+ apply integral_congr_ae
82
+ filter_upwards [ae_restrict_of_ae hL.ae_differentiableAt] with x hx
83
+ have he := ConeCalculus.euler_identity hx hom
84
+ rw [← inner_gradient_left] at he
85
+ simp only [inner_add_right,real_inner_smul_right,real_inner_self_eq_norm_sq,potential_gradient]
86
+ rw [he]
87
+ ring
88
+ end Bernoulli.Halfspace
89
+
90
+ end
91
+ end
92
+
93
+ end OAI
lean/OAI/Analysis/BernoulliCone/HalfspaceEnergy.lean ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.RankOneDeterminant
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli.Shape
10
+ variable {d : ℕ}
11
+
12
+ lemma inner_ne_zero_ae {e : Space d} (he : e ≠ 0) :
13
+ ∀ᵐ x ∂volume, inner ℝ e x ≠ 0 := by
14
+ let a := innerSL ℝ e
15
+ have ha : a ≠ 0 := by
16
+ intro hh
17
+ have hx : inner ℝ e e=0 := by
18
+ have h := congrArg (fun f : Space d →L[ℝ] ℝ => f e) hh
19
+ simpa [a] using h
20
+ exact he ((inner_self_eq_zero).mp hx)
21
+ have hker : volume (LinearMap.ker a.toLinearMap : Set (Space d))=0 := by
22
+ apply Measure.addHaar_submodule
23
+ rw [Ne,LinearMap.ker_eq_top]
24
+ intro hh
25
+ exact ha (ContinuousLinearMap.coe_injective hh)
26
+ rw [ae_iff]
27
+ change volume {x | ¬ inner ℝ e x ≠ 0}=0
28
+ change volume {x | inner ℝ e x=0}=0 at hker
29
+ simpa only [not_not] using hker
30
+
31
+ lemma density_integrable_ball {u : Space d → ℝ} {C : ℝ≥0} (hu : LipschitzWith C u)
32
+ (a : Space d) (R : ℝ) : IntegrableOn (density u) (ball a R) := by
33
+ let : IsFiniteMeasure (volume.restrict (ball a R)) :=
34
+ isFiniteMeasure_restrict.mpr (measure_ball_lt_top.ne)
35
+ have hh := LipschitzSobolev.h1_ball hu a R
36
+ exact (hh.2.1.integrable_norm_pow (by norm_num)).add (integrable_phase hh.1.aestronglyMeasurable)
37
+
38
+ lemma firstTerm_integrable_ball {φ : Space d → ℝ} (hφ : ContDiff ℝ ∞ φ)
39
+ (e a : Space d) (R : ℝ) : IntegrableOn (firstTerm φ e) (ball a R) := by
40
+ have hc : Continuous (fun x => fderiv ℝ φ x e) := (hφ.continuous_fderiv (by simp)).clm_apply continuous_const
41
+ have hi : IntegrableOn (fun x => fderiv ℝ φ x e) (ball a R) volume :=
42
+ (hc.continuousOn.integrableOn_compact (isCompact_closedBall a R)).mono_set ball_subset_closedBall
43
+ have hpos : MeasurableSet {x : Space d | 0 < inner ℝ e x} :=
44
+ (isOpen_lt continuous_const (innerSL ℝ e).continuous).measurableSet
45
+ exact hi.indicator hpos
46
+
47
+ lemma energy_pullback_upper {φ : Space d → ℝ} {C : ℝ≥0}
48
+ (hφ : ContDiff ℝ ∞ φ) (hLip : LipschitzWith C φ)
49
+ {e : Space d} (he : e ≠ 0) (t : ℝ)
50
+ (hdet : ∀ x, (1:ℝ)/2 ≤ 1+t*fderiv ℝ φ x e)
51
+ (g : Space d ≃ₜ Space d) (hg : ∀ y, g y=deform φ e t y)
52
+ (a : Space d) (R : ℝ) (hfix : ∀ x ∉ ball a R, φ x=0) :
53
+ energy (ball a R) (fun y => positiveLinear e (g.symm y))
54
+ (gradient (fun y => positiveLinear e (g.symm y))) ≤
55
+ energy (ball a R) (positiveLinear e) (gradient (positiveLinear e)) +
56
+ t*(1-‖e‖^2)*(∫ x in ball a R, firstTerm φ e x) +
57
+ t^2*(2*‖e‖^4*C^2)*(volume (ball a R)).toReal := by
58
+ let : IsFiniteMeasure (volume.restrict (ball a R)) :=
59
+ isFiniteMeasure_restrict.mpr (measure_ball_lt_top.ne)
60
+ let v := fun y => positiveLinear e (g.symm y)
61
+ have him : g '' ball a R=ball a R := image_eq_of_fixed_compl g _ (by
62
+ intro x hx
63
+ rw [hg]
64
+ simp [deform,hfix x hx])
65
+ have hchange := integral_image_eq_integral_abs_det_fderiv_smul (s:=ball a R) volume measurableSet_ball
66
+ (f:=g) (f':=fun x => rankOneMap (fderiv ℝ φ x) e t)
67
+ (fun x _ => (show HasFDerivAt g (rankOneMap (fderiv ℝ φ x) e t) x from by
68
+ rw [show (g : Space d → Space d)=deform φ e t from funext hg]
69
+ exact hasFDerivAt_deform ((hφ.differentiable (by simp)) x).hasFDerivAt e t).hasFDerivWithinAt) (g.injective.injOn) (density v)
70
+ rw [him] at hchange
71
+ have hdetpos (x : Space d) : 0 ≤ 1+t*fderiv ℝ φ x e := le_trans (by norm_num) (hdet x)
72
+ simp_rw [rankOneMap_det,abs_of_nonneg (hdetpos _),smul_eq_mul] at hchange
73
+ change energy (ball a R) v (gradient v) = _ at hchange
74
+ rw [hchange]
75
+ have hi : Integrable (fun x => density (positiveLinear e) x+t*(1-‖e‖^2)*firstTerm φ e x+
76
+ t^2*(2*‖e‖^4*C^2)) (volume.restrict (ball a R)) := by
77
+ convert ((density_integrable_ball (positiveLinear_lipschitz e) a R).add
78
+ ((firstTerm_integrable_ball hφ e a R).const_mul (t*(1-‖e‖^2)))).add
79
+ (integrable_const (t^2*(2*‖e‖^4*C^2))) using 1; rfl
80
+ have hm := integral_mono_of_nonneg
81
+ (μ:=volume.restrict (ball a R))
82
+ (f:=fun x => (1+t*fderiv ℝ φ x e)*density v (g x))
83
+ (g:=fun x => density (positiveLinear e) x+t*(1-‖e‖^2)*firstTerm φ e x+
84
+ t^2*(2*‖e‖^4*C^2))
85
+ (Eventually.of_forall (fun x => mul_nonneg (hdetpos x) (density_nonneg v (g x)))) hi
86
+ (by
87
+ filter_upwards [ae_restrict_of_ae (inner_ne_zero_ae he)] with x hx
88
+ exact density_pullback_bound ((hφ.differentiable (by simp)) x) hLip e t (hdet x) g hg hx)
89
+ have hiE := density_integrable_ball (positiveLinear_lipschitz e) a R
90
+ have hiF := (firstTerm_integrable_ball hφ e a R).const_mul (t*(1-‖e‖^2))
91
+ have hsum : (∫ x in ball a R, density (positiveLinear e) x+t*(1-‖e‖^2)*firstTerm φ e x+
92
+ t^2*(2*‖e‖^4*C^2)) =
93
+ energy (ball a R) (positiveLinear e) (gradient (positiveLinear e)) +
94
+ t*(1-‖e‖^2)*(∫ x in ball a R, firstTerm φ e x) +
95
+ t^2*(2*‖e‖^4*C^2)*(volume (ball a R)).toReal := by
96
+ have hadd := integral_add (hiE.add hiF) (integrable_const (t^2*(2*‖e‖^4*C^2)))
97
+ have hadd2 := integral_add hiE hiF
98
+ simp only [Pi.add_apply] at hadd
99
+ rw [hadd2,integral_const_mul,integral_const] at hadd
100
+ convert hadd using 1; first | rfl | (simp only [Measure.restrict_apply_univ,Measure.real,smul_eq_mul]; dsimp [energy,density]; ring)
101
+ rw [hsum] at hm
102
+ exact hm
103
+ end Bernoulli.Shape
104
+
105
+ end
106
+ end
107
+
108
+ end OAI
lean/OAI/Analysis/BernoulliCone/HalfspaceGroundstate.lean ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.BernoulliCone.CompactGradient
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ noncomputable section
7
+ open MeasureTheory Set Filter Metric
8
+ open scoped Topology NNReal ENNReal ContDiff
9
+ namespace Bernoulli.Halfspace
10
+ open HarmonicKernel
11
+ variable {d : ℕ}
12
+
13
+ lemma radial_potential_test : Test (ball (0:Space d) 2) potential := by
14
+ have he : (potential : Space d → ℝ)=scaledPotential 1 0 := by
15
+ funext x; simp [potential,scaledPotential]
16
+ rw [he]
17
+ exact scaledPotential_test (by norm_num) 0 (closedBall_subset_ball (by norm_num))
18
+
19
+ lemma radial_outer_integrable {u : Space d → ℝ} {L : ℝ≥0} (hL : LipschitzWith L u) :
20
+ IntegrableOn (fun x=> potential x*‖gradient u x‖^2-rawKernel x*u x^2) (ball (0:Space d) 2) := by
21
+ have hu := LipschitzSobolev.h1_ball hL 0 2
22
+ have hi := (memLp_two_iff_integrable_sq_norm hu.2.1.aestronglyMeasurable).mp hu.2.1
23
+ obtain ⟨C,hC⟩ := (radial_potential_test (d:=d)).2.1.exists_bound_of_continuous contDiff_potential.continuous
24
+ have hi' := hi.bdd_mul contDiff_potential.continuous.aestronglyMeasurable (Eventually.of_forall hC)
25
+ have hq : Integrable (fun x=>rawKernel x*u x^2) volume :=
26
+ (contDiff_rawKernel.continuous.mul (hL.continuous.pow 2)).integrable_of_hasCompactSupport rawKernel_compact.mul_right
27
+ exact hi'.sub hq.integrableOn
28
+
29
+ /-- Ground-state equality for a true homogeneous minimizing cone supported in
30
+ one closed halfspace. This uses a Lipschitz perspective competitor, not a
31
+ regularity assumption or a boundary trace quotient. -/
32
+ theorem gradient_parallel_of_halfspace_support {u : Space d → ℝ} {L : ℝ≥0}
33
+ (hm : GlobalMinimizer u) (hL : LipschitzWith L u)
34
+ (hom : ∀r:ℝ, 0<r → ∀x, u (r•x)=r*u x)
35
+ {e : Space d} (he : ‖e‖=1) (hz : ∀x, inner ℝ x e ≤ 0 → u x=0) :
36
+ ∀ᵐ x ∂volume.restrict (ball (0:Space d) 1),
37
+ gradient u x=(u x/inner ℝ x e) • e := by
38
+ let B := ball (0:Space d) 2
39
+ let μ := volume.restrict B
40
+ let : IsFiniteMeasure μ := isFiniteMeasure_restrict.mpr measure_ball_lt_top.ne
41
+ let q := fun x=>potential x*squareQuotient u e x
42
+ have hφ : Test B potential := radial_potential_test
43
+ obtain ⟨K,hφL⟩ := ContDiff.lipschitzWith_of_hasCompactSupport hφ.2.1 hφ.1 (by simp)
44
+ obtain ⟨C,hq'⟩ := lipschitz_mul_compact (squareQuotient_lipschitz hL he hz) hφL hφ.2.1
45
+ have hq : LipschitzWith C q := by
46
+ simpa only [q,mul_comm] using hq'
47
+ have hc : HasCompactSupport q := hφ.2.1.mul_right
48
+ have hs : tsupport q ⊆ B := tsupport_mul_subset_left.trans hφ.2.2
49
+ have hq0 := setIntegral_gradient_compact hq hc hs e
50
+ have hu0 := SobolevCalculus.gradient_zero_on_zero_set isOpen_ball (LipschitzSobolev.h1_ball hL 0 2)
51
+ have hqz := SobolevCalculus.gradient_zero_on_zero_set isOpen_ball (LipschitzSobolev.h1_ball hq 0 2)
52
+ let F := fun x=>potential x*‖gradient u x‖^2-rawKernel x*u x^2
53
+ let R := fun x=>potential x*‖gradient u x-(u x/inner ℝ x e) • e‖^2
54
+ have hR : R =ᵐ[μ] (fun x=>F x-inner ℝ (gradient q x) e) := by
55
+ filter_upwards [ae_restrict_of_ae hL.ae_differentiableAt,hu0,hqz] with x hx hux hqx
56
+ by_cases ht : 0 < inner ℝ x e
57
+ · dsimp [R,F,q]
58
+ rw [weightedQuotient_directional hx ht he]
59
+ rw [← real_inner_self_eq_norm_sq]
60
+ simp only [inner_sub_left,inner_sub_right,real_inner_smul_left,real_inner_smul_right,
61
+ real_inner_self_eq_norm_sq, norm_smul, Real.norm_eq_abs, he, mul_one, sq_abs, real_inner_comm e (gradient u x)]
62
+ ring
63
+ · have hu : u x=0 := hz x (not_lt.mp ht)
64
+ have hqv : q x=0 := by simp [q,squareQuotient,ht]
65
+ simp only [R,F,hu,hux hu,hqx hqv,zero_div,zero_smul,sub_self,norm_zero,zero_pow (by norm_num : 2≠0),
66
+ mul_zero,inner_zero_left]
67
+ have hFi : Integrable F μ := radial_outer_integrable hL
68
+ have hQi : Integrable (fun x=>inner ℝ (gradient q x) e) μ :=
69
+ (memLp_inner_const (LipschitzSobolev.h1_ball hq 0 2).2.1 e).integrable (by norm_num)
70
+ have hRi : Integrable R μ := (hFi.sub hQi).congr hR.symm
71
+ have hRint : (∫ x, R x ∂μ)=0 := by
72
+ rw [integral_congr_ae hR,integral_sub hFi hQi]
73
+ change (∫ x in B, F x)-(∫ x in B, inner ℝ (gradient q x) e)=0
74
+ rw [radial_outer_identity hm hL hom,hq0,sub_self]
75
+ have haz : R =ᵐ[μ] 0 := (integral_eq_zero_iff_of_nonneg_ae
76
+ (Eventually.of_forall (fun x=>mul_nonneg (potential_nonneg x) (sq_nonneg _))) hRi).mp hRint
77
+ have hle : volume.restrict (ball (0:Space d) 1) ≤ μ :=
78
+ Measure.restrict_mono (ball_subset_ball (by norm_num)) le_rfl
79
+ filter_upwards [ae_mono hle haz,ae_restrict_mem measurableSet_ball] with x hx hxb
80
+ have hsq : ‖gradient u x-(u x/inner ℝ x e) • e‖^2=0 :=
81
+ (mul_eq_zero.mp hx).resolve_left (potential_pos hxb).ne'
82
+ exact sub_eq_zero.mp (norm_eq_zero.mp (sq_eq_zero_iff.mp hsq))
83
+ end Bernoulli.Halfspace
84
+
85
+ end
86
+ end
87
+
88
+ end OAI