roseking commited on
Commit
ddc84c5
·
verified ·
1 Parent(s): 159357f

Add lean source and binary files (part 17)

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/CStarAlgebra/PureInfiniteness/Avoidance.lean +188 -0
  2. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/ChoicePairs.lean +327 -0
  3. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/ClosedIdeal.lean +83 -0
  4. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Comparison.lean +301 -0
  5. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Compression.lean +271 -0
  6. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Cutoffs.lean +343 -0
  7. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Defect.lean +275 -0
  8. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Diagonalization.lean +106 -0
  9. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/FourChoices.lean +266 -0
  10. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Graph.lean +639 -0
  11. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Hereditary.lean +613 -0
  12. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/IdealComparison.lean +164 -0
  13. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/IdealDetection.lean +192 -0
  14. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Main.lean +56 -0
  15. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/MatrixEntries.lean +166 -0
  16. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Nonvanishing.lean +138 -0
  17. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/OrthogonalSlots.lean +395 -0
  18. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/PositiveFunctional.lean +94 -0
  19. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Products.lean +287 -0
  20. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Representation.lean +273 -0
  21. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Separation.lean +114 -0
  22. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Shrinking.lean +244 -0
  23. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Signal.lean +200 -0
  24. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Stabilization.lean +275 -0
  25. lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Ultrafilter.lean +75 -0
  26. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/HighProjection.lean +174 -0
  27. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/IntegrableIntegralAeTendsto.lean +199 -0
  28. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/IntegrableTsumSummableNormIntegral.lean +124 -0
  29. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/JoinSpins.lean +227 -0
  30. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LeftPotential.lean +225 -0
  31. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LipschitzTestEnergy.lean +150 -0
  32. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LowProjection.lean +53 -0
  33. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/MeridianMap.lean +520 -0
  34. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/MinimizerMidpointControl.lean +83 -0
  35. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/ModulatedRealDerivativeNorm.lean +113 -0
  36. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NearCoulombFiveHalves.lean +211 -0
  37. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NewtonInterior.lean +179 -0
  38. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NewtonSubmean.lean +160 -0
  39. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NormSqSumCosets.lean +245 -0
  40. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/Occupancy.lean +206 -0
  41. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/OuterJoinConfiguration.lean +546 -0
  42. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PairRegroup.lean +94 -0
  43. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PatchNegativeMean.lean +75 -0
  44. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PatchRawTransfer.lean +69 -0
  45. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PermOrCompSwapOffTwo.lean +275 -0
  46. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PermuteJoinBlock.lean +234 -0
  47. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PhaseRegion.lean +221 -0
  48. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PhysicalPoisson.lean +165 -0
  49. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PoissonInterior.lean +213 -0
  50. lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PositiveField.lean +79 -0
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Avoidance.lean ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Ultrafilter
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ open Filter
11
+ open scoped Topology
12
+ universe u v
13
+ variable {ι : Type*} {A : Type u} [CStarAlgebra A]
14
+ local instance avoidanceLimitPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
15
+ local instance avoidanceLimitStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
16
+ local instance avoidanceLimitOperatorPartialOrder (J : Type*) [NormedAddCommGroup J]
17
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
18
+ PartialOrder (J →L[ℂ] J) := CStarAlgebra.spectralOrder _
19
+ local instance avoidanceLimitOperatorStarOrderedRing (J : Type*) [NormedAddCommGroup J]
20
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
21
+ StarOrderedRing (J →L[ℂ] J) := CStarAlgebra.spectralOrderedRing _
22
+ variable {H : ι → Type v} [∀ i, NormedAddCommGroup (H i)]
23
+ [∀ i, InnerProductSpace ℂ (H i)] [∀ i, CompleteSpace (H i)]
24
+
25
+ theorem four_limit_impossible (ω : Ultrafilter ι)
26
+ (π : ∀ i, A →⋆ₐ[ℂ] (H i →L[ℂ] H i)) (ξ : ∀ i, H i) (hξ : ∀ i, ‖ξ i‖ ≤ 1)
27
+ {X : A} (hX : 0 ≤ X) (B : Fin 4 → A)
28
+ (hV : ∀ᶠ i in (ω : Filter ι), (1/8 : ℝ) ≤ ‖π i (firstV X) (ξ i)‖)
29
+ (hD₁ : ∀ i, π i (B 0) * star (π i (B 0)) ≤ (1/2 : ℝ) • 1)
30
+ (hm₁ : ∀ i, π i (B 1 * star (B 1)) = π i (B 0 * star (B 0)))
31
+ (hc₁ : ∀ i, π i (B 0 * star (B 1)) = 0)
32
+ (hs₀ : ∀ i, π i (firstH X * star (B 0)) = π i (star (B 0)))
33
+ (hs₁ : ∀ i, π i (firstH X * star (B 1)) = π i (star (B 1)))
34
+ (hU : ∀ w : A, Tendsto (fun i => ‖π i (firstU X (B 0) * w * firstV X)‖)
35
+ (ω : Filter ι) (𝓝 0))
36
+ (hD₃ : ∀ i, π i (B 2) * star (π i (B 2)) ≤ (1/2 : ℝ) • 1)
37
+ (hc₃ : ∀ i, π i (star (B 2) * B 3) = 0)
38
+ (hm₃ : ∀ i, π i (star (B 2) * B 2) = π i (star (B 3) * B 3))
39
+ (hR : Tendsto (fun i => ‖π i (lastR X (B 0) (B 2))‖) (ω : Filter ι) (𝓝 0))
40
+ (hs₃ : ∀ i, π i (ramp (prospectiveDefect X (B 0)) 0 (1/2) * B 3) = π i (B 3)) : False := by
41
+ let ρ := limitRep ω π ξ hξ
42
+ let Ψ := rangeRestriction ρ (firstV X)
43
+ have hkill : ∀ a : A, Tendsto (fun i => ‖π i a‖) (ω : Filter ι) (𝓝 0) → Ψ a = 0 := by
44
+ intro a ha
45
+ have hz : ρ a = 0 := limitRep_annihilates ω π ξ hξ a ha
46
+ ext x
47
+ change (ρ a x : LimitHilbert ω π ξ hξ) = 0
48
+ rw [hz, zero_apply]
49
+ have hzero : ∀ a : A, (∀ i, π i a = 0) → Ψ a = 0 := by
50
+ intro a ha
51
+ apply hkill a
52
+ simp only [ha, norm_zero]
53
+ exact tendsto_const_nhds
54
+ have heq : ∀ a b : A, (∀ i, π i a = π i b) → Ψ a = Ψ b := by
55
+ intro a b hab
56
+ have hz := hzero (a-b) (fun i => by rw [map_sub, hab i, sub_self])
57
+ exact sub_eq_zero.mp (by simpa only [map_sub] using hz)
58
+ have hbound (j : Fin 4) (hj : ∀ i, π i (B j) * star (π i (B j)) ≤ (1/2 : ℝ) • 1) := by
59
+ have hz := hzero (cut (B j * star (B j)) (1/2)) (fun i => by
60
+ rw [map_cut_sa (π i) (.mul_star_self _) (by norm_num), map_mul, map_star]
61
+ exact cut_zero_of_le (mul_star_self_nonneg _) (by norm_num) (hj i))
62
+ rw [map_cut_sa (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (IsSelfAdjoint.mul_star_self (B j)) (by norm_num : (0:ℝ) ≤ 1/2), map_mul, map_star] at hz
63
+ exact le_of_cut_zero (mul_star_self_nonneg _) (by norm_num) hz
64
+ have hψV : firstV (Ψ X) ≠ 0 := by
65
+ rw [← map_firstV (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)]
66
+ exact rangeRestriction_nonzero ρ (firstV X) (.of_nonneg (cut_nonneg X _))
67
+ (limitRep_nonzero ω π ξ hξ (firstV X) (by norm_num : (0:ℝ) < 1/8) hV)
68
+ have hψU : firstU (Ψ X) (Ψ (B 0)) = 0 := by
69
+ rw [← map_firstU (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)]
70
+ apply rangeRestriction_kills ρ (firstV X) (firstU X (B 0))
71
+ intro w
72
+ simpa only [map_mul] using limitRep_annihilates ω π ξ hξ _ (hU w)
73
+ apply four_fixed_impossible (map_nonneg Ψ hX) (fun i => Ψ (B i)) hψV
74
+ (hbound 0 hD₁) ?_ ?_ ?_ ?_ hψU (hbound 2 hD₃) ?_ ?_ ?_ ?_
75
+ · simpa only [map_mul, map_star] using heq _ _ hm₁
76
+ · simpa only [map_mul, map_star] using hzero _ hc₁
77
+ · simpa only [map_mul, map_star, map_firstH (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)] using heq _ _ hs₀
78
+ · simpa only [map_mul, map_star, map_firstH (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)] using heq _ _ hs₁
79
+ · simpa only [map_mul, map_star] using hzero _ hc₃
80
+ · simpa only [map_mul, map_star] using heq _ _ hm₃
81
+ · simpa only [map_lastR (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)] using hkill _ hR
82
+ · have hp : IsSelfAdjoint (prospectiveDefect X (B 0)) :=
83
+ .of_nonneg (prospectiveDefect_nonneg X _)
84
+ simpa only [map_mul, map_ramp_sa (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ hp le_rfl, map_prospectiveDefect (D := generatedRange ρ (firstV X) →L[ℂ] generatedRange ρ (firstV X)) Ψ (.of_nonneg hX)] using
85
+ heq _ _ hs₃
86
+
87
+ end MainGap
88
+
89
+ namespace MainGap
90
+ universe u v
91
+ open Filter
92
+ open scoped Topology
93
+ variable (A : Type u) [CStarAlgebra A]
94
+
95
+ structure HilbertRep where
96
+ H : Type v
97
+ [normed : NormedAddCommGroup H]
98
+ [inner : InnerProductSpace ℂ H]
99
+ [complete : CompleteSpace H]
100
+ hom : A →⋆ₐ[ℂ] (H →L[ℂ] H)
101
+
102
+ attribute [instance] HilbertRep.normed HilbertRep.inner HilbertRep.complete
103
+
104
+ variable {A}
105
+ local instance avoidancePartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
106
+ local instance avoidanceStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
107
+ local instance avoidanceOperatorPartialOrder (J : Type*) [NormedAddCommGroup J]
108
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
109
+ PartialOrder (J →L[ℂ] J) := CStarAlgebra.spectralOrder _
110
+ local instance avoidanceOperatorStarOrderedRing (J : Type*) [NormedAddCommGroup J]
111
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
112
+ StarOrderedRing (J →L[ℂ] J) := CStarAlgebra.spectralOrderedRing _
113
+
114
+ theorem four_avoidance_unital {X : A} (hX : 0 ≤ X) (B : Fin 4 → A)
115
+ (hp : ∀ z : A, 0 ≤ z → z ∈ fourHer X → ProperlyInfinite z) :
116
+ ∃ T : Fin 4 → A, (∀ j, ‖T j‖ ≤ 1) ∧ (∀ j, T j ∈ fourHer X) ∧
117
+ ∀ R : HilbertRep.{u,v} A, (1/4 : ℝ) < ‖R.hom X‖ →
118
+ ¬ ∀ j, R.hom (T j) = R.hom (B j) := by
119
+ classical
120
+ by_contra! hbad
121
+ let F : ∀ i : FourIndex A, FourChoice.{v,u} X B i.2 (fourEta A i) :=
122
+ fun i => Classical.choice (fourChoice_nonempty hX B hp i.2 (fourEta_pos A i))
123
+ have hbad' : ∀ i : FourIndex A, ∃ R : HilbertRep.{u,v} A,
124
+ (1/4 : ℝ) < ‖R.hom X‖ ∧ ∀ j, R.hom ((F i).T j) = R.hom (B j) :=
125
+ fun i => hbad (F i).T (F i).contractive (F i).mem
126
+ choose R hRX hmatch using hbad'
127
+ let π := fun i => (R i).hom
128
+ change ∀ i j, π i ((F i).T j) = π i (B j) at hmatch
129
+ have hVbig : ∀ i, (1/8 : ℝ) < ‖π i (firstV X)‖ := by
130
+ intro i
131
+ have hn : ‖π i X - π i (firstV X)‖ ≤ (1/8 : ℝ) := by
132
+ rw [← map_sub]
133
+ exact (NonUnitalStarAlgHom.norm_apply_le (π i) _).trans
134
+ (norm_sub_cut_le hX (by norm_num))
135
+ have hm := norm_sub_norm_le (π i X) (π i (firstV X))
136
+ have hi := hRX i
137
+ change (1/4 : ℝ) < ‖π i X‖ at hi
138
+ linarith
139
+ choose ξ hξ hξV using fun i => (π i (firstV X)).exists_lt_apply_of_lt_opNorm (hVbig i)
140
+ have hnξ : ∀ i, ‖ξ i‖ ≤ 1 := fun i => (hξ i).le
141
+ have hEt := fourEta_ultra A
142
+ apply four_limit_impossible (fourUltra A) π ξ hnξ hX B
143
+ (Filter.Eventually.of_forall (fun i => (hξV i).le))
144
+ (fun i => (F i).first_bound (π i) hX (fourEta_pos A i) (hmatch i)) ?_ ?_ ?_ ?_ ?_
145
+ (fun i => (F i).last_bound (π i) hX (fourEta_pos A i) (hmatch i)) ?_ ?_ ?_ ?_
146
+ · intro i
147
+ have hm := congrArg (π i) (F i).first_equal
148
+ simpa only [map_mul, map_star, hmatch i] using hm
149
+ · intro i
150
+ have hm := congrArg (π i) (F i).first_cross
151
+ simpa only [map_mul, map_star, hmatch i, map_zero] using hm
152
+ · intro i
153
+ have hm := congrArg (π i) ((F i).first_support₀ hX)
154
+ simpa only [map_mul, map_star, hmatch i] using hm
155
+ · intro i
156
+ have hm := congrArg (π i) ((F i).first_support₁ hX)
157
+ simpa only [map_mul, map_star, hmatch i] using hm
158
+ · intro w
159
+ have hg : Tendsto (fun i : FourIndex A =>
160
+ Real.sqrt (2 * fourEta A i) * ‖CFC.sqrt (firstV X)‖ +
161
+ fourEta A i * ‖w‖ * ‖firstV X‖) (fourUltra A : Filter (FourIndex A)) (𝓝 0) := by
162
+ convert ((hEt.const_mul 2).sqrt.mul_const ‖CFC.sqrt (firstV X)‖).add
163
+ ((hEt.mul_const ‖w‖).mul_const ‖firstV X‖) using 1; norm_num
164
+ apply squeeze_zero' (Filter.Eventually.of_forall (fun i => norm_nonneg _)) ?_ hg
165
+ filter_upwards [fourUltra_le A (fourIndex_eventually_mem A w)] with i hi
166
+ exact represented_mixed_estimate (π i) (firstU_nonneg _ _) (cut_nonneg X _)
167
+ (fourEta_pos A i) hi ((F i).first_norm (π i) hX (fourEta_pos A i) (hmatch i)).le
168
+ · intro i
169
+ have hm := congrArg (π i) (F i).last_cross
170
+ simpa only [map_mul, map_star, hmatch i, map_zero] using hm
171
+ · intro i
172
+ have hm := congrArg (π i) (F i).last_equal
173
+ simpa only [map_mul, map_star, hmatch i] using hm
174
+ · have ht : Tendsto (fun i : FourIndex A => 4 * fourEta A i)
175
+ (fourUltra A : Filter (FourIndex A)) (𝓝 0) := by
176
+ simpa using hEt.const_mul 4
177
+ exact squeeze_zero' (Filter.Eventually.of_forall (fun i => norm_nonneg _))
178
+ (Filter.Eventually.of_forall (fun i =>
179
+ ((F i).last_norm_lt (π i) hX (fourEta_pos A i) (hmatch i)).le)) ht
180
+ · intro i
181
+ have hm := congrArg (π i) (F i).last_support
182
+ simpa only [map_mul, hmatch i] using hm
183
+
184
+ end MainGap
185
+
186
+ end
187
+
188
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/ChoicePairs.lean ADDED
@@ -0,0 +1,327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Cutoffs
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance choicePairsPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance choicePairsStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ lemma norm_sqrt_le_one {d : A} (hd : 0 ≤ d) (hn : ‖d‖ ≤ 1) : ‖CFC.sqrt d‖ ≤ 1 := by
15
+ have hh : ‖CFC.sqrt d‖ ^ 2 = ‖d‖ := by
16
+ rw [pow_two, ← CStarRing.norm_star_mul_self,
17
+ (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg d)).star_eq, CFC.sqrt_mul_sqrt_self d hd]
18
+ nlinarith [norm_nonneg (CFC.sqrt d)]
19
+
20
+ lemma fixed_left_of_modulus {b z : A} (h : b * (z * star z) = z * star z) : b*z=z := by
21
+ apply sub_eq_zero.mp
22
+ apply (CStarRing.mul_star_self_eq_zero_iff _).mp
23
+ have hs := congrArg star h
24
+ simp only [star_mul, star_star] at hs
25
+ calc
26
+ (b*z-z) * star (b*z-z) = b*(z*star z)*star b - (z*star z)*star b - b*(z*star z) + z*star z := by
27
+ simp only [star_sub, star_mul]; noncomm_ring
28
+ _ = 0 := by rw [h]; noncomm_ring
29
+
30
+ lemma carrier_mem_Her {n : ℕ} {h v k : A} (S : OrthogonalSlots n h v)
31
+ (hv : v ∈ Her k) (i : Fin n) (e : Her h) (he : (e : A) ∈ Her k) :
32
+ S.carrier i e ∈ Her k := by
33
+ apply mem_Her_of_moduli
34
+ · exact Her_mono_of_mem hv (S.outer i i e e)
35
+ · rw [S.inner, ite_eq_left rfl]
36
+ exact (Her k).mul_mem ((Her k).star_mem' he) he
37
+
38
+ theorem first_pair_choice {d v k : A} (hd : 0 ≤ d) (hv : 0 ≤ v)
39
+ (hdv : FiniteCuntzLE (diagonalCorner 2 d) (scalarCorner v))
40
+ (hdk : d ∈ Her k) (hvk : v ∈ Her k) {η : ℝ} (hη : 0 < η) :
41
+ ∃ T : Fin 2 → A,
42
+ (∀ i, ‖T i‖ ≤ 1) ∧ (∀ i, T i ∈ Her k) ∧
43
+ (∀ i j, T i * star (T j) = if i=j then ramp d η (2*η) else 0) ∧
44
+ (∀ i j, star (T i) * T j ∈ Her v) := by
45
+ let D := ramp d η (2*η)
46
+ have hDpos : 0 ≤ D := ramp_nonneg d (by linarith)
47
+ have hDmem : D ∈ Her (cut d η) := ramp_mem_Her_cut hd hη.le
48
+ let e : Her (cut d η) := ⟨CFC.sqrt D, sqrt_mem_Her hDmem hDpos⟩
49
+ obtain ⟨S⟩ := orthogonalSlots_of_comparison hd hv hdv hη
50
+ have hnorm : ‖(e : A)‖ ≤ 1 := norm_sqrt_le_one hDpos (norm_ramp_le_one d (by linarith))
51
+ have he : (e : A) ∈ Her k :=
52
+ Her_mono_of_mem hdk (Her_mono_of_mem (cut_mem_Her hd η) e.property)
53
+ have hsa : star (e : A) = (e : A) := (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg D)).star_eq
54
+ refine ⟨fun i => star (S.carrier i e), ?_, ?_, ?_, ?_⟩
55
+ · intro i
56
+ rw [norm_star, S.norm_carrier]
57
+ exact hnorm
58
+ · intro i
59
+ exact (Her k).star_mem' (carrier_mem_Her S hvk i e he)
60
+ · intro i j
61
+ rw [star_star, S.inner, hsa]
62
+ split_ifs
63
+ · exact CFC.sqrt_mul_sqrt_self D hDpos
64
+ · rfl
65
+ · intro i j
66
+ rw [star_star]
67
+ exact S.outer i j e e
68
+
69
+ theorem last_pair_choice {R k : A} (hR : 0 ≤ R) (hRk : R ∈ Her k)
70
+ {η : ℝ} (hη : 0 < η) (hp : ProperlyInfinite (cut R η)) :
71
+ ∃ T : Fin 2 → A,
72
+ (∀ i, ‖T i‖ ≤ 1) ∧ (∀ i, T i ∈ Her k) ∧
73
+ (∀ i j, star (T i) * T j = if i=j then ramp R (2*η) (4*η) * ramp R (2*η) (4*η) else 0) ∧
74
+ (∀ i j, T i * star (T j) ∈ Her (cut R η)) ∧
75
+ (∀ {B : Type*} [NonUnitalCStarAlgebra B] (π : A →⋆ₙₐ[ℂ] B),
76
+ 4*η ≤ ‖π R‖ → ∀ i, ‖π (T i)‖ = 1) := by
77
+ let t := ramp R (2*η) (4*η)
78
+ have ht : t ∈ Her (cut (cut R η) η) := by
79
+ rw [cut_cut hR hη.le hη.le, ← two_mul η]
80
+ exact ramp_mem_Her_cut hR (by positivity)
81
+ let e : Her (cut (cut R η) η) := ⟨t, ht⟩
82
+ obtain ⟨S⟩ := hp.orthogonalSlots (cut_nonneg R η) 2 hη
83
+ have hcut : cut R η ∈ Her k := Her_mono_of_mem hRk (cut_mem_Her hR η)
84
+ have htk : t ∈ Her k := Her_mono_of_mem hRk
85
+ (Her_mono_of_mem (cut_mem_Her hR (2*η)) (ramp_mem_Her_cut hR (by positivity)))
86
+ refine ⟨fun i => S.carrier i e, ?_, ?_, ?_, (fun i j => S.outer i j e e), ?_⟩
87
+ · intro i
88
+ rw [S.norm_carrier]
89
+ exact norm_ramp_le_one R (by linarith)
90
+ · intro i
91
+ exact carrier_mem_Her S hcut i e htk
92
+ · intro i j
93
+ rw [S.inner, (IsSelfAdjoint.of_nonneg (ramp_nonneg R (by linarith : 2*η ≤ 4*η))).star_eq]
94
+ · intro B _ π hnorm i
95
+ let : PartialOrder B := CStarAlgebra.spectralOrder B
96
+ let : StarOrderedRing B := CStarAlgebra.spectralOrderedRing B
97
+ rw [S.represented_norm]
98
+ change ‖π (ramp R (2*η) (4*η))‖ = 1
99
+ rw [map_ramp π hR (by positivity)]
100
+ exact norm_ramp_eq_one (map_nonneg π hR) (by positivity) (by linarith) hnorm
101
+
102
+ end MainGap
103
+
104
+ namespace MainGap
105
+ variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
106
+
107
+ def firstSandwich (U V : A) (η : ℝ) (E : Finset A) : A :=
108
+ cut U η * (∑ w ∈ E, w * V * star w) * cut U η
109
+
110
+ lemma firstSandwich_nonneg {U V : A} (hV : 0 ≤ V) (η : ℝ) (E : Finset A) :
111
+ 0 ≤ firstSandwich U V η E := by
112
+ have hsum : 0 ≤ ∑ w ∈ E, w * V * star w :=
113
+ Finset.sum_nonneg (fun w _ => star_right_conjugate_nonneg hV w)
114
+ simpa only [firstSandwich, IsSelfAdjoint.of_nonneg (cut_nonneg U η) |>.star_eq] using
115
+ star_right_conjugate_nonneg hsum (cut U η)
116
+
117
+ lemma firstSandwich_mem (U V : A) (η : ℝ) (E : Finset A) :
118
+ firstSandwich U V η E ∈ Her (cut U η) := by
119
+ simpa only [firstSandwich, IsSelfAdjoint.of_nonneg (cut_nonneg U η) |>.star_eq] using
120
+ sandwich_mem_Her (cut U η) (∑ w ∈ E, w * V * star w)
121
+
122
+ lemma firstSandwich_two_cuntzLE {U V : A} (hV : ProperlyInfinite V)
123
+ (η : ℝ) (E : Finset A) :
124
+ FiniteCuntzLE (diagonalCorner 2 (firstSandwich U V η E)) (scalarCorner V) := by
125
+ have heq : firstSandwich U V η E =
126
+ ∑ w ∈ E, star (star w * cut U η) * V * (star w * cut U η) := by
127
+ simp only [firstSandwich, Finset.mul_sum, Finset.sum_mul, star_mul, star_star,
128
+ IsSelfAdjoint.of_nonneg (cut_nonneg U η) |>.star_eq]
129
+ apply Finset.sum_congr rfl
130
+ intro w _
131
+ noncomm_ring
132
+ rw [heq]
133
+ exact finsetSum_cuntzLE hV E _
134
+
135
+ lemma norm_ramp_bound {d : A} (hd : 0 ≤ d) {η h : ℝ} (hη : 0 < η)
136
+ (hh0 : 0 ≤ h) (hh : h < 1) (hbound : ramp d η (2*η) ≤ h • (1 : A)) : ‖d‖ < 2*η := by
137
+ by_contra! hnorm
138
+ have hone := norm_ramp_eq_one hd hη.le (by linarith) hnorm
139
+ have hD := ramp_nonneg d (by linarith : η ≤ 2*η)
140
+ have hnle : ‖ramp d η (2*η)‖ ≤ h := by
141
+ exact (CStarAlgebra.norm_le_iff_le_algebraMap _ hh0 hD).mpr (by
142
+ simpa only [Algebra.algebraMap_eq_smul_one] using hbound)
143
+ linarith
144
+
145
+ end MainGap
146
+
147
+ namespace MainGap
148
+
149
+ variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
150
+
151
+ def scalingComplement (H : A) : A := CFC.sqrt (1 - H * H)
152
+
153
+ def scalingIsometry (H r : A) : A := r + scalingComplement H
154
+
155
+ def scalingDefect (H r : A) : A := 1 - scalingIsometry H r * star (scalingIsometry H r)
156
+
157
+ lemma complement_nonneg {H : A} (hH : IsSelfAdjoint H) (hnorm : ‖H‖ ≤ 1) :
158
+ 0 ≤ 1 - H * H := by
159
+ apply sub_nonneg.mpr
160
+ apply (CStarAlgebra.norm_le_one_iff_of_nonneg (H * H) ?_).mp
161
+ · calc
162
+ ‖H * H‖ = ‖H‖ ^ 2 := hH.norm_mul_self
163
+ _ ≤ 1 := (sq_le_one_iff₀ (norm_nonneg H)).mpr hnorm
164
+ · simpa only [hH.star_eq] using star_mul_self_nonneg H
165
+
166
+ lemma scalingComplement_mul_self {H : A} (hH : IsSelfAdjoint H) (hnorm : ‖H‖ ≤ 1) :
167
+ scalingComplement H * scalingComplement H = 1 - H * H :=
168
+ CFC.sqrt_mul_sqrt_self _ (complement_nonneg hH hnorm)
169
+
170
+ lemma scalingComplement_selfAdjoint (H : A) : IsSelfAdjoint (scalingComplement H) :=
171
+ IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg _)
172
+
173
+ lemma scalingComplement_mul_eq_zero {H r : A} (hH : IsSelfAdjoint H)
174
+ (hnorm : ‖H‖ ≤ 1) (hHr : H * r = r) : scalingComplement H * r = 0 := by
175
+ apply (CStarRing.star_mul_self_eq_zero_iff _).mp
176
+ rw [star_mul, (scalingComplement_selfAdjoint H).star_eq]
177
+ calc
178
+ star r * scalingComplement H * (scalingComplement H * r) =
179
+ star r * (scalingComplement H * scalingComplement H) * r := by noncomm_ring
180
+ _ = star r * (1 - H * H) * r := by rw [scalingComplement_mul_self hH hnorm]
181
+ _ = 0 := by simp only [mul_sub, sub_mul, mul_one, mul_assoc, hHr, sub_self]
182
+
183
+ lemma scalingIsometry_star_mul_self {H r : A} (hH : IsSelfAdjoint H)
184
+ (hnorm : ‖H‖ ≤ 1) (hHr : H * r = r) (hrr : star r * r = H * H) :
185
+ star (scalingIsometry H r) * scalingIsometry H r = 1 := by
186
+ have hbr := scalingComplement_mul_eq_zero hH hnorm hHr
187
+ have hrb : star r * scalingComplement H = 0 := by
188
+ simpa only [star_mul, star_zero, (scalingComplement_selfAdjoint H).star_eq] using
189
+ congrArg star hbr
190
+ simp only [scalingIsometry, star_add, (scalingComplement_selfAdjoint H).star_eq,
191
+ add_mul, mul_add, hbr, hrb, hrr, scalingComplement_mul_self hH hnorm]
192
+ noncomm_ring
193
+
194
+ lemma scalingDefect_projection {H r : A} (hH : IsSelfAdjoint H)
195
+ (hnorm : ‖H‖ ≤ 1) (hHr : H * r = r) (hrr : star r * r = H * H) :
196
+ IsStarProjection (scalingDefect H r) := by
197
+ apply IsStarProjection.one_sub
198
+ constructor
199
+ · change (scalingIsometry H r * star (scalingIsometry H r)) *
200
+ (scalingIsometry H r * star (scalingIsometry H r)) =
201
+ scalingIsometry H r * star (scalingIsometry H r)
202
+ rw [mul_assoc, ← mul_assoc (star (scalingIsometry H r)),
203
+ scalingIsometry_star_mul_self hH hnorm hHr hrr, one_mul]
204
+ · exact IsSelfAdjoint.mul_star_self _
205
+
206
+ lemma scalingDefect_fixes_second {H r₁ r₂ : A} (hH : IsSelfAdjoint H)
207
+ (hnorm : ‖H‖ ≤ 1) (hHr₂ : H * r₂ = r₂) (hcross : star r₁ * r₂ = 0) :
208
+ scalingDefect H r₁ * r₂ = r₂ := by
209
+ have hvr : star (scalingIsometry H r₁) * r₂ = 0 := by
210
+ simp only [scalingIsometry, star_add, add_mul,
211
+ (scalingComplement_selfAdjoint H).star_eq, hcross,
212
+ scalingComplement_mul_eq_zero hH hnorm hHr₂, add_zero]
213
+ simp only [scalingDefect, sub_mul, one_mul, mul_assoc, hvr, mul_zero, sub_zero]
214
+
215
+ lemma scalingDefect_ne_zero {H r₁ r₂ : A} (hH : IsSelfAdjoint H)
216
+ (hnorm : ‖H‖ ≤ 1) (hHne : H ≠ 0) (hHr₂ : H * r₂ = r₂)
217
+ (hcross : star r₁ * r₂ = 0) (hr₂ : star r₂ * r₂ = H * H) :
218
+ scalingDefect H r₁ ≠ 0 := by
219
+ intro hP
220
+ have hr₂zero : r₂ = 0 := by
221
+ have := scalingDefect_fixes_second hH hnorm hHr₂ hcross
222
+ simpa only [hP, zero_mul, eq_comm] using this
223
+ apply hHne
224
+ apply (CStarRing.star_mul_self_eq_zero_iff H).mp
225
+ rw [hH.star_eq, ← hr₂, hr₂zero, star_zero, zero_mul]
226
+
227
+ omit [PartialOrder A] [StarOrderedRing A] in
228
+ lemma last_pair_kills_defect {P B₃ B₄ : A} {h : ℝ} (hh : h ≠ 0)
229
+ (hPB₄ : P * B₄ = B₄) (hcross : star B₃ * B₄ = 0)
230
+ (hmod : star B₃ * B₃ = star B₄ * B₄)
231
+ (hD : (B₃ * star B₃) * P = h • P) : P = 0 := by
232
+ have hB₄ : h • B₄ = 0 := by
233
+ calc
234
+ h • B₄ = (h • P) * B₄ := by rw [smul_mul_assoc, hPB₄]
235
+ _ = ((B₃ * star B₃) * P) * B₄ := by rw [hD]
236
+ _ = B₃ * (star B₃ * B₄) := by rw [mul_assoc, hPB₄, mul_assoc]
237
+ _ = 0 := by rw [hcross, mul_zero]
238
+ have hB₄zero : B₄ = 0 := (smul_eq_zero.mp hB₄).resolve_left hh
239
+ have hB₃zero : B₃ = 0 := (CStarRing.star_mul_self_eq_zero_iff B₃).mp (by
240
+ rw [hmod, hB₄zero, star_zero, zero_mul])
241
+ have hP : h • P = 0 := by simpa only [hB₃zero, zero_mul] using hD.symm
242
+ exact (smul_eq_zero.mp hP).resolve_left hh
243
+
244
+ end MainGap
245
+
246
+ namespace MainGap
247
+ variable {A : Type*} [CStarAlgebra A]
248
+ local instance : PartialOrder A := CStarAlgebra.spectralOrder A
249
+ local instance : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
250
+
251
+ def deficiency (d : A) : A := cfc (fun t : ℝ => max ((1/2 : ℝ)-t) 0) d
252
+
253
+ def firstX (X : A) : A := cut X (1/16)
254
+ def firstV (X : A) : A := cut X (1/8)
255
+ def firstU (X B : A) : A := firstX X * deficiency (B * star B) *
256
+ deficiency (B * star B) * firstX X
257
+
258
+ def firstH (X : A) : A := ramp X (3/32) (1/8)
259
+ def firstK (X : A) : A := ramp X (3/64) (1/16)
260
+ def firstR (X B : A) : A := (Real.sqrt 2) • (star B * firstH X)
261
+ def prospectiveDefect (X B : A) : A :=
262
+ ramp (firstK X * scalingDefect (firstH X) (firstR X B) * firstK X) 0 1
263
+
264
+ def lastX (X B : A) : A := cut (prospectiveDefect X B) (1/2)
265
+ def lastR (X B₁ B₃ : A) : A := lastX X B₁ * deficiency (B₃ * star B₃) *
266
+ deficiency (B₃ * star B₃) * lastX X B₁
267
+
268
+ def fourHer (X : A) : NonUnitalStarSubalgebra ℂ A := Her (cut X (1/32))
269
+
270
+ lemma deficiency_nonneg (d : A) : 0 ≤ deficiency d := cfc_nonneg (fun _ _ => le_max_right _ _)
271
+ lemma deficiency_selfAdjoint (d : A) : IsSelfAdjoint (deficiency d) := IsSelfAdjoint.cfc
272
+
273
+ lemma squareSandwich_nonneg {x : A} (hx : IsSelfAdjoint x) (Q : A) (hQ : IsSelfAdjoint Q) :
274
+ 0 ≤ x * Q * Q * x := by
275
+ have := star_mul_self_nonneg (Q*x)
276
+ simpa only [star_mul, hx.star_eq, hQ.star_eq, mul_assoc] using this
277
+
278
+ lemma squareSandwich_mem {x : A} (hx : IsSelfAdjoint x) (Q : A) :
279
+ x * Q * Q * x ∈ Her x := by
280
+ simpa only [hx.star_eq, mul_assoc] using sandwich_mem_Her x (Q*Q)
281
+
282
+ lemma cut_mem_cutHer {X : A} (hX : 0 ≤ X) {l u : ℝ} (hl : 0 ≤ l) (hlu : l ≤ u) :
283
+ cut X u ∈ Her (cut X l) := by
284
+ have heq : cut X u = cut (cut X l) (u-l) := by
285
+ rw [cut_cut hX hl (sub_nonneg.mpr hlu)]
286
+ congr 1
287
+ ring
288
+ rw [heq]
289
+ exact cut_mem_Her (cut_nonneg X l) _
290
+
291
+ lemma firstX_mem {X : A} (hX : 0 ≤ X) : firstX X ∈ fourHer X :=
292
+ cut_mem_cutHer hX (by norm_num) (by norm_num)
293
+ lemma firstV_mem {X : A} (hX : 0 ≤ X) : firstV X ∈ fourHer X :=
294
+ cut_mem_cutHer hX (by norm_num) (by norm_num)
295
+ lemma firstU_nonneg (X B : A) : 0 ≤ firstU X B :=
296
+ squareSandwich_nonneg (.of_nonneg (cut_nonneg X _)) _ (deficiency_selfAdjoint _)
297
+ lemma firstU_mem {X : A} (hX : 0 ≤ X) (B : A) : firstU X B ∈ fourHer X :=
298
+ Her_mono_of_mem (firstX_mem hX) (squareSandwich_mem (.of_nonneg (cut_nonneg X _)) _)
299
+
300
+ lemma firstK_mem {X : A} (hX : 0 ≤ X) : firstK X ∈ fourHer X := by
301
+ exact Her_mono_of_mem (cut_mem_cutHer hX (by norm_num : (0:ℝ) ≤ 1/32)
302
+ (by norm_num : (1/32:ℝ) ≤ 3/64)) (ramp_mem_Her_cut hX (by norm_num))
303
+
304
+ lemma prospectiveDefect_nonneg (X B : A) : 0 ≤ prospectiveDefect X B :=
305
+ ramp_nonneg _ (by norm_num)
306
+ lemma prospectiveDefect_norm (X B : A) : ‖prospectiveDefect X B‖ ≤ 1 :=
307
+ norm_ramp_le_one _ (by norm_num)
308
+ lemma prospectiveDefect_mem {X : A} (hX : 0 ≤ X) (B : A) :
309
+ prospectiveDefect X B ∈ fourHer X := by
310
+ change cfcₙ _ _ ∈ Her (cut X (1/32))
311
+ apply cfcₙ_mem (𝕜' := ℂ)
312
+ have h := Her_sandwich (firstK_mem hX) (scalingDefect (firstH X) (firstR X B))
313
+ simpa only [firstK, IsSelfAdjoint.of_nonneg (ramp_nonneg X (by norm_num : (3/64:ℝ) ≤ 1/16)) |>.star_eq] using h
314
+
315
+ lemma lastX_nonneg (X B : A) : 0 ≤ lastX X B := cut_nonneg _ _
316
+ lemma lastX_mem {X : A} (hX : 0 ≤ X) (B : A) : lastX X B ∈ fourHer X :=
317
+ Her_mono_of_mem (prospectiveDefect_mem hX B) (cut_mem_Her (prospectiveDefect_nonneg X B) _)
318
+ lemma lastR_nonneg (X B₁ B₃ : A) : 0 ≤ lastR X B₁ B₃ :=
319
+ squareSandwich_nonneg (.of_nonneg (lastX_nonneg X B₁)) _ (deficiency_selfAdjoint _)
320
+ lemma lastR_mem {X : A} (hX : 0 ≤ X) (B₁ B₃ : A) : lastR X B₁ B₃ ∈ fourHer X :=
321
+ Her_mono_of_mem (lastX_mem hX B₁) (squareSandwich_mem (.of_nonneg (lastX_nonneg X B₁)) _)
322
+
323
+ end MainGap
324
+
325
+ end
326
+
327
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/ClosedIdeal.lean ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [CStarAlgebra A]
11
+
12
+ def idealWords (v : A) : Set A := { z | ∃ x y : A, z = x * v * y }
13
+ def idealSpan (v : A) : Submodule ℂ A := Submodule.span ℂ (idealWords v)
14
+
15
+ lemma idealSpan_word (v x y : A) : x * v * y ∈ idealSpan v :=
16
+ Submodule.subset_span ⟨x, y, rfl⟩
17
+
18
+ lemma idealSpan_left {v z : A} (hz : z ∈ idealSpan v) (a : A) : a * z ∈ idealSpan v := by
19
+ induction hz using Submodule.span_induction with
20
+ | mem z hz =>
21
+ obtain ⟨x, y, rfl⟩ := hz
22
+ simpa only [mul_assoc] using idealSpan_word v (a * x) y
23
+ | zero => simp
24
+ | add x y hx hy ihx ihy => simpa only [mul_add] using (idealSpan v).add_mem ihx ihy
25
+ | smul c x hx ih => simpa only [mul_smul_comm] using (idealSpan v).smul_mem c ih
26
+
27
+ lemma idealSpan_right {v z : A} (hz : z ∈ idealSpan v) (a : A) : z * a ∈ idealSpan v := by
28
+ induction hz using Submodule.span_induction with
29
+ | mem z hz =>
30
+ obtain ⟨x, y, rfl⟩ := hz
31
+ simpa only [mul_assoc] using idealSpan_word v x (y * a)
32
+ | zero => simp
33
+ | add x y hx hy ihx ihy => simpa only [add_mul] using (idealSpan v).add_mem ihx ihy
34
+ | smul c x hx ih => simpa only [smul_mul_assoc] using (idealSpan v).smul_mem c ih
35
+
36
+ lemma idealSpan_star {v z : A} (hv : IsSelfAdjoint v) (hz : z ∈ idealSpan v) :
37
+ star z ∈ idealSpan v := by
38
+ induction hz using Submodule.span_induction with
39
+ | mem z hz =>
40
+ obtain ⟨x, y, rfl⟩ := hz
41
+ simpa only [star_mul, hv.star_eq, mul_assoc] using idealSpan_word v (star y) (star x)
42
+ | zero => simp
43
+ | add x y hx hy ihx ihy => simpa only [star_add] using (idealSpan v).add_mem ihx ihy
44
+ | smul c x hx ih => simpa only [star_smul] using (idealSpan v).smul_mem (star c) ih
45
+
46
+ def idealAlgebra (v : A) (hv : IsSelfAdjoint v) : NonUnitalStarSubalgebra ℂ A where
47
+ carrier := idealSpan v
48
+ zero_mem' := (idealSpan v).zero_mem
49
+ add_mem' := (idealSpan v).add_mem
50
+ smul_mem' := fun c _ hz => (idealSpan v).smul_mem c hz
51
+ mul_mem' := fun _ hy => idealSpan_left hy _
52
+ star_mem' := idealSpan_star hv
53
+
54
+ def closedIdeal (v : A) (hv : IsSelfAdjoint v) : NonUnitalStarSubalgebra ℂ A :=
55
+ (idealAlgebra v hv).topologicalClosure
56
+
57
+ lemma closedIdeal_closed (v : A) (hv : IsSelfAdjoint v) :
58
+ IsClosed (closedIdeal v hv : Set A) := isClosed_closure
59
+
60
+ instance closedIdeal_complete (v : A) (hv : IsSelfAdjoint v) :
61
+ CompleteSpace (closedIdeal v hv) := (closedIdeal_closed v hv).completeSpace_coe
62
+
63
+ lemma closedIdeal_word (v : A) (hv : IsSelfAdjoint v) (x y : A) :
64
+ x * v * y ∈ closedIdeal v hv := subset_closure (idealSpan_word v x y)
65
+
66
+ lemma self_mem_closedIdeal (v : A) (hv : IsSelfAdjoint v) : v ∈ closedIdeal v hv := by
67
+ simpa using closedIdeal_word v hv 1 1
68
+
69
+ lemma closedIdeal_left {v z : A} (hv : IsSelfAdjoint v) (hz : z ∈ closedIdeal v hv) (a : A) :
70
+ a * z ∈ closedIdeal v hv := by
71
+ refine (closedIdeal_closed v hv).preimage (continuous_const.mul continuous_id)
72
+ |>.closure_subset_iff.mpr (fun x hx => subset_closure (idealSpan_left hx a)) hz
73
+
74
+ lemma closedIdeal_right {v z : A} (hv : IsSelfAdjoint v) (hz : z ∈ closedIdeal v hv) (a : A) :
75
+ z * a ∈ closedIdeal v hv := by
76
+ refine (closedIdeal_closed v hv).preimage (continuous_id.mul continuous_const)
77
+ |>.closure_subset_iff.mpr (fun x hx => subset_closure (idealSpan_right hx a)) hz
78
+
79
+ end MainGap
80
+
81
+ end
82
+
83
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Comparison.lean ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Hereditary
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+
11
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
12
+
13
+ local instance positivityOrder : PartialOrder A := CStarAlgebra.spectralOrder A
14
+ local instance positivityStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
15
+
16
+ def FiniteCuntzLE {m n : ℕ} (d : CStarMatrix (Fin n) (Fin n) A)
17
+ (v : CStarMatrix (Fin m) (Fin m) A) : Prop :=
18
+ ∃ r : ℕ → CStarMatrix (Fin m) (Fin n) A,
19
+ Tendsto (fun j => (r j).conjTranspose * v * r j) atTop (𝓝 d)
20
+
21
+ def scalarCorner (h : A) : CStarMatrix (Fin 1) (Fin 1) A :=
22
+ CStarMatrix.ofMatrix (fun _ _ => h)
23
+
24
+ def doubleCorner (h : A) : CStarMatrix (Fin 2) (Fin 2) A :=
25
+ CStarMatrix.ofMatrix (Matrix.diagonal (fun _ => h))
26
+
27
+ def ProperlyInfinite (h : A) : Prop :=
28
+ FiniteCuntzLE (doubleCorner h) (scalarCorner h)
29
+
30
+ def PropertyP (A : Type*) [NonUnitalCStarAlgebra A] : Prop :=
31
+ ∀ h : A, 0 ≤ h → ProperlyInfinite h
32
+
33
+ def Diagonalization (a b c : A) (ε : ℝ) : Prop :=
34
+ ∃ s t : A,
35
+ ‖star s * a * s - a‖ < ε ∧
36
+ ‖star t * b * t - b‖ < ε ∧
37
+ ‖star s * c * t‖ < ε
38
+
39
+ def UnrestrictedDiagonalization (A : Type*) [NonUnitalCStarAlgebra A] : Prop :=
40
+ ∀ a b : A, 0 ≤ a → 0 ≤ b → ∀ c : A, ∀ ε : ℝ, 0 < ε →
41
+ Diagonalization a b c ε
42
+
43
+ def StronglyPurelyInfinite (A : Type*) [NonUnitalCStarAlgebra A] : Prop :=
44
+ ∀ x y : A, 0 ≤ x → 0 ≤ y → ∀ ε : ℝ, 0 < ε →
45
+ Diagonalization (x * x) (y * y) (x * y) ε
46
+
47
+ lemma matrix_mul_assoc {l m n k : ℕ} (x : CStarMatrix (Fin l) (Fin m) A)
48
+ (y : CStarMatrix (Fin m) (Fin n) A) (z : CStarMatrix (Fin n) (Fin k) A) :
49
+ (x * y) * z = x * (y * z) := Matrix.mul_assoc x y z
50
+
51
+ lemma matrix_star_mul {l m n : ℕ} (x : CStarMatrix (Fin l) (Fin m) A)
52
+ (y : CStarMatrix (Fin m) (Fin n) A) :
53
+ (x * y).conjTranspose = y.conjTranspose * x.conjTranspose :=
54
+ Matrix.conjTranspose_mul x y
55
+
56
+ lemma continuous_matrix_mul {X : Type*} [TopologicalSpace X] {l m n : ℕ}
57
+ {x : X → CStarMatrix (Fin l) (Fin m) A} {y : X → CStarMatrix (Fin m) (Fin n) A}
58
+ (hx : Continuous x) (hy : Continuous y) : Continuous (fun t => x t * y t) :=
59
+ hx.matrix_mul hy
60
+
61
+ lemma continuous_matrix_star {X : Type*} [TopologicalSpace X] {l m : ℕ}
62
+ {x : X → CStarMatrix (Fin l) (Fin m) A} (hx : Continuous x) :
63
+ Continuous (fun t => (x t).conjTranspose) := by
64
+ change Continuous (fun t => Matrix.conjTranspose (x t))
65
+ fun_prop
66
+
67
+ lemma finiteCuntzLE_iff_closure {m n : ℕ} (d : CStarMatrix (Fin n) (Fin n) A)
68
+ (v : CStarMatrix (Fin m) (Fin m) A) :
69
+ FiniteCuntzLE d v ↔ d ∈ closure (Set.range
70
+ (fun r : CStarMatrix (Fin m) (Fin n) A => r.conjTranspose * v * r)) := by
71
+ rw [mem_closure_iff_seq_limit]
72
+ constructor
73
+ · rintro ⟨r, hr⟩
74
+ exact ⟨_, fun j => ⟨r j, rfl⟩, hr⟩
75
+ · rintro ⟨x, hx, ht⟩
76
+ choose r hr using hx
77
+ exact ⟨r, by simpa only [hr] using ht⟩
78
+
79
+ lemma FiniteCuntzLE.exists_approx {m n : ℕ} {d : CStarMatrix (Fin n) (Fin n) A}
80
+ {v : CStarMatrix (Fin m) (Fin m) A} (h : FiniteCuntzLE d v)
81
+ {ε : ℝ} (hε : 0 < ε) :
82
+ ∃ r : CStarMatrix (Fin m) (Fin n) A, ‖d - r.conjTranspose * v * r‖ < ε := by
83
+ rw [finiteCuntzLE_iff_closure, Metric.mem_closure_iff] at h
84
+ obtain ⟨x, ⟨r, rfl⟩, hr⟩ := h ε hε
85
+ exact ⟨r, by simpa only [dist_eq_norm] using hr⟩
86
+
87
+ lemma finiteCuntzLE_of_forall_approx {m n : ℕ} {d : CStarMatrix (Fin n) (Fin n) A}
88
+ {v : CStarMatrix (Fin m) (Fin m) A}
89
+ (h : ∀ ε > 0, ∃ r : CStarMatrix (Fin m) (Fin n) A,
90
+ ‖d - r.conjTranspose * v * r‖ < ε) : FiniteCuntzLE d v := by
91
+ rw [finiteCuntzLE_iff_closure, Metric.mem_closure_iff]
92
+ intro ε hε
93
+ obtain ⟨r, hr⟩ := h ε hε
94
+ exact ⟨_, ⟨r, rfl⟩, by simpa only [dist_eq_norm] using hr⟩
95
+
96
+ lemma FiniteCuntzLE.conjugate {l m n : ℕ} {d : CStarMatrix (Fin n) (Fin n) A}
97
+ {v : CStarMatrix (Fin m) (Fin m) A} (hdv : FiniteCuntzLE d v)
98
+ (x : CStarMatrix (Fin n) (Fin l) A) :
99
+ FiniteCuntzLE (x.conjTranspose * d * x) v := by
100
+ obtain ⟨r, hr⟩ := hdv
101
+ refine ⟨fun j => r j * x, ?_⟩
102
+ have hc : Continuous (fun d : CStarMatrix (Fin n) (Fin n) A =>
103
+ x.conjTranspose * d * x) :=
104
+ continuous_matrix_mul (continuous_matrix_mul continuous_const continuous_id) continuous_const
105
+ convert hc.continuousAt.tendsto.comp hr using 1
106
+ ext j
107
+ rw [matrix_star_mul]
108
+ simp only [Function.comp_apply, matrix_mul_assoc]
109
+
110
+ lemma FiniteCuntzLE.trans {l m n : ℕ} {d : CStarMatrix (Fin n) (Fin n) A}
111
+ {v : CStarMatrix (Fin m) (Fin m) A} {w : CStarMatrix (Fin l) (Fin l) A}
112
+ (hdv : FiniteCuntzLE d v) (hvw : FiniteCuntzLE v w) : FiniteCuntzLE d w := by
113
+ rw [finiteCuntzLE_iff_closure] at hdv ⊢
114
+ apply closure_minimal _ isClosed_closure hdv
115
+ rintro _ ⟨x, rfl⟩
116
+ exact (finiteCuntzLE_iff_closure _ _).mp (hvw.conjugate x)
117
+
118
+ lemma isClosed_finiteCuntzLE {m n : ℕ} (v : CStarMatrix (Fin m) (Fin m) A) :
119
+ IsClosed {d : CStarMatrix (Fin n) (Fin n) A | FiniteCuntzLE d v} := by
120
+ simp_rw [finiteCuntzLE_iff_closure]
121
+ exact isClosed_closure
122
+
123
+ lemma FiniteCuntzLE.of_tendsto {m n : ℕ} {v : CStarMatrix (Fin m) (Fin m) A}
124
+ {d : ℕ → CStarMatrix (Fin n) (Fin n) A} {u : CStarMatrix (Fin n) (Fin n) A}
125
+ (hd : ∀ j, FiniteCuntzLE (d j) v) (ht : Tendsto d atTop (𝓝 u)) :
126
+ FiniteCuntzLE u v := (isClosed_finiteCuntzLE v).mem_of_tendsto ht (Eventually.of_forall hd)
127
+
128
+ lemma FiniteCuntzLE.refl {n : ℕ} (v : CStarMatrix (Fin n) (Fin n) A) :
129
+ FiniteCuntzLE v v := by
130
+ let M := CStarMatrix (Fin n) (Fin n) A
131
+ let : PartialOrder M := CStarAlgebra.spectralOrder M
132
+ let : StarOrderedRing M := CStarAlgebra.spectralOrderedRing M
133
+ have hu := CStarAlgebra.increasingApproximateUnit M
134
+ apply finiteCuntzLE_of_forall_approx
135
+ intro ε hε
136
+ have hl : ∀ᶠ e : M in CStarAlgebra.approximateUnit M, ‖v - v * e‖ < ε / 2 := by
137
+ have ht := ((tendsto_const_nhds (x := v)).sub (hu.tendsto_mul_left v)).norm
138
+ simpa only [sub_self, norm_zero] using ht.eventually (Iio_mem_nhds (by simpa only [sub_self, norm_zero] using half_pos hε))
139
+ have hr : ∀ᶠ e : M in CStarAlgebra.approximateUnit M, ‖v - e * v‖ < ε / 2 := by
140
+ have ht := ((tendsto_const_nhds (x := v)).sub (hu.tendsto_mul_right v)).norm
141
+ simpa only [sub_self, norm_zero] using ht.eventually (Iio_mem_nhds (by simpa only [sub_self, norm_zero] using half_pos hε))
142
+ obtain ⟨e, hesa, hen, hel, her⟩ :=
143
+ (hu.eventually_star_eq.and (hu.eventually_norm.and (hl.and hr))).exists
144
+ refine ⟨e, ?_⟩
145
+ change ‖v - star e * v * e‖ < ε
146
+ rw [hesa]
147
+ calc
148
+ ‖v - e * v * e‖ = ‖(v - e * v) + e * (v - v * e)‖ := by rw [mul_sub, ← mul_assoc]; congr 1; abel
149
+ _ ≤ ‖v - e * v‖ + ‖e‖ * ‖v - v * e‖ :=
150
+ (norm_add_le _ _).trans (add_le_add_right (norm_mul_le _ _) _)
151
+ _ ≤ ‖v - e * v‖ + ‖v - v * e‖ := by nlinarith [norm_nonneg (v - v * e)]
152
+ _ < ε := by linarith
153
+
154
+ def matrixBlock {m n p q : ℕ} (x : CStarMatrix (Fin m) (Fin n) A)
155
+ (y : CStarMatrix (Fin p) (Fin q) A) : CStarMatrix (Fin (m+p)) (Fin (n+q)) A :=
156
+ CStarMatrix.ofMatrix ((Matrix.fromBlocks (CStarMatrix.ofMatrix.symm x) 0 0 (CStarMatrix.ofMatrix.symm y)).submatrix
157
+ finSumFinEquiv.symm finSumFinEquiv.symm)
158
+
159
+ lemma matrixBlock_mul {m n p q r s : ℕ}
160
+ (x : CStarMatrix (Fin m) (Fin n) A) (y : CStarMatrix (Fin p) (Fin q) A)
161
+ (u : CStarMatrix (Fin n) (Fin r) A) (v : CStarMatrix (Fin q) (Fin s) A) :
162
+ matrixBlock x y * matrixBlock u v = matrixBlock (x * u) (y * v) := by
163
+ apply CStarMatrix.ofMatrix.symm.injective
164
+ change (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm x) 0 0 (CStarMatrix.ofMatrix.symm y)).submatrix
165
+ finSumFinEquiv.symm finSumFinEquiv.symm *
166
+ (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm u) 0 0 (CStarMatrix.ofMatrix.symm v)).submatrix
167
+ finSumFinEquiv.symm finSumFinEquiv.symm =
168
+ (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm x * CStarMatrix.ofMatrix.symm u) 0 0
169
+ (CStarMatrix.ofMatrix.symm y * CStarMatrix.ofMatrix.symm v)).submatrix _ _
170
+ rw [Matrix.submatrix_mul_equiv, Matrix.fromBlocks_multiply]
171
+ simp only [Matrix.zero_mul, Matrix.mul_zero, add_zero, zero_add]
172
+
173
+ lemma matrixBlock_star {m n p q : ℕ}
174
+ (x : CStarMatrix (Fin m) (Fin n) A) (y : CStarMatrix (Fin p) (Fin q) A) :
175
+ (matrixBlock x y).conjTranspose = matrixBlock x.conjTranspose y.conjTranspose := by
176
+ apply CStarMatrix.ext
177
+ intro i j
178
+ change star (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm x) 0 0 (CStarMatrix.ofMatrix.symm y) (finSumFinEquiv.symm j) (finSumFinEquiv.symm i)) = _
179
+ generalize hi : finSumFinEquiv.symm i = i'
180
+ generalize hj : finSumFinEquiv.symm j = j'
181
+ cases i' <;> cases j' <;> simp [matrixBlock, Matrix.fromBlocks, Matrix.submatrix, hi, hj]
182
+
183
+ lemma continuous_matrixBlock {X : Type*} [TopologicalSpace X] {m n p q : ℕ}
184
+ {x : X → CStarMatrix (Fin m) (Fin n) A} {y : X → CStarMatrix (Fin p) (Fin q) A}
185
+ (hx : Continuous x) (hy : Continuous y) : Continuous (fun t => matrixBlock (x t) (y t)) := by
186
+ change Continuous (fun t => (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm (x t)) 0 0
187
+ (CStarMatrix.ofMatrix.symm (y t))).submatrix finSumFinEquiv.symm finSumFinEquiv.symm)
188
+ apply continuous_pi
189
+ intro i
190
+ apply continuous_pi
191
+ intro j
192
+ change Continuous (fun t => Matrix.fromBlocks (CStarMatrix.ofMatrix.symm (x t)) 0 0
193
+ (CStarMatrix.ofMatrix.symm (y t)) (finSumFinEquiv.symm i) (finSumFinEquiv.symm j))
194
+ cases finSumFinEquiv.symm i with
195
+ | inl i' =>
196
+ cases finSumFinEquiv.symm j with
197
+ | inl j' =>
198
+ change Continuous (fun t => CStarMatrix.ofMatrix.symm (x t) i' j')
199
+ exact (continuous_apply j').comp ((continuous_apply i').comp hx)
200
+ | inr j' => exact continuous_const
201
+ | inr i' =>
202
+ cases finSumFinEquiv.symm j with
203
+ | inl j' => exact continuous_const
204
+ | inr j' =>
205
+ change Continuous (fun t => CStarMatrix.ofMatrix.symm (y t) i' j')
206
+ exact (continuous_apply j').comp ((continuous_apply i').comp hy)
207
+
208
+ lemma tendsto_matrixBlock {X : Type*} {f : Filter X} {m n p q : ℕ}
209
+ {x : X → CStarMatrix (Fin m) (Fin n) A} {y : X → CStarMatrix (Fin p) (Fin q) A}
210
+ {u : CStarMatrix (Fin m) (Fin n) A} {v : CStarMatrix (Fin p) (Fin q) A}
211
+ (hx : Tendsto x f (𝓝 u)) (hy : Tendsto y f (𝓝 v)) :
212
+ Tendsto (fun t => matrixBlock (x t) (y t)) f (𝓝 (matrixBlock u v)) := by
213
+ change Tendsto (fun t => CStarMatrix.ofMatrix.symm (matrixBlock (x t) (y t))) f
214
+ (𝓝 (CStarMatrix.ofMatrix.symm (matrixBlock u v)))
215
+ apply tendsto_pi_nhds.mpr
216
+ intro i
217
+ apply tendsto_pi_nhds.mpr
218
+ intro j
219
+ change Tendsto (fun t => Matrix.fromBlocks (CStarMatrix.ofMatrix.symm (x t)) 0 0
220
+ (CStarMatrix.ofMatrix.symm (y t)) (finSumFinEquiv.symm i) (finSumFinEquiv.symm j)) f
221
+ (𝓝 (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm u) 0 0
222
+ (CStarMatrix.ofMatrix.symm v) (finSumFinEquiv.symm i) (finSumFinEquiv.symm j)))
223
+ cases finSumFinEquiv.symm i with
224
+ | inl i' =>
225
+ cases finSumFinEquiv.symm j with
226
+ | inl j' => exact (hx.apply_nhds i').apply_nhds j'
227
+ | inr j' => exact tendsto_const_nhds
228
+ | inr i' =>
229
+ cases finSumFinEquiv.symm j with
230
+ | inl j' => exact tendsto_const_nhds
231
+ | inr j' => exact (hy.apply_nhds i').apply_nhds j'
232
+
233
+ lemma matrixBlock_conjugate {m n p q : ℕ}
234
+ (r : CStarMatrix (Fin m) (Fin n) A) (s : CStarMatrix (Fin p) (Fin q) A)
235
+ (v : CStarMatrix (Fin m) (Fin m) A) (w : CStarMatrix (Fin p) (Fin p) A) :
236
+ (matrixBlock r s).conjTranspose * matrixBlock v w * matrixBlock r s =
237
+ matrixBlock (r.conjTranspose * v * r) (s.conjTranspose * w * s) := by
238
+ rw [matrixBlock_star, matrixBlock_mul, matrixBlock_mul]
239
+
240
+ lemma FiniteCuntzLE.block {m n p q : ℕ}
241
+ {d : CStarMatrix (Fin n) (Fin n) A} {v : CStarMatrix (Fin m) (Fin m) A}
242
+ {d' : CStarMatrix (Fin q) (Fin q) A} {v' : CStarMatrix (Fin p) (Fin p) A}
243
+ (h : FiniteCuntzLE d v) (h' : FiniteCuntzLE d' v') :
244
+ FiniteCuntzLE (matrixBlock d d') (matrixBlock v v') := by
245
+ obtain ⟨r, hr⟩ := h
246
+ obtain ⟨s, hs⟩ := h'
247
+ refine ⟨fun j => matrixBlock (r j) (s j), ?_⟩
248
+ have heq : (fun j => (matrixBlock (r j) (s j)).conjTranspose *
249
+ matrixBlock v v' * matrixBlock (r j) (s j)) =
250
+ (fun j => matrixBlock ((r j).conjTranspose * v * r j)
251
+ ((s j).conjTranspose * v' * s j)) := by
252
+ funext j
253
+ exact matrixBlock_conjugate (r j) (s j) v v'
254
+ rw [heq]
255
+ exact tendsto_matrixBlock hr hs
256
+
257
+ def diagonalCorner (n : ℕ) (h : A) : CStarMatrix (Fin n) (Fin n) A :=
258
+ CStarMatrix.ofMatrix (Matrix.diagonal (fun _ => h))
259
+
260
+ lemma matrixBlock_diagonal (n m : ℕ) (h : A) :
261
+ matrixBlock (diagonalCorner n h) (diagonalCorner m h) = diagonalCorner (n+m) h := by
262
+ apply CStarMatrix.ext
263
+ intro i j
264
+ change (Matrix.fromBlocks (Matrix.diagonal (fun _ => h)) 0 0
265
+ (Matrix.diagonal (fun _ => h))).submatrix _ _ i j = _
266
+ rw [Matrix.fromBlocks_diagonal]
267
+ simp only [Matrix.submatrix_apply, Matrix.diagonal_apply, diagonalCorner,
268
+ CStarMatrix.ofMatrix_apply, Equiv.apply_eq_iff_eq]
269
+ split_ifs with hij
270
+ · cases finSumFinEquiv.symm i <;> rfl
271
+ · rfl
272
+
273
+ lemma diagonalCorner_one (h : A) : diagonalCorner 1 h = scalarCorner h := by
274
+ ext i j
275
+ have hij : i = j := Subsingleton.elim _ _
276
+ change Matrix.diagonal (fun _ => h) i j = h
277
+ simp [Matrix.diagonal, hij]
278
+
279
+ lemma ProperlyInfinite.finite_copies {h : A} (hh : ProperlyInfinite h) (n : ℕ) :
280
+ FiniteCuntzLE (diagonalCorner n h) (scalarCorner h) := by
281
+ induction n with
282
+ | zero =>
283
+ refine ⟨fun _ => 0, ?_⟩
284
+ have heq : (fun _ : ℕ => (0 : CStarMatrix (Fin 1) (Fin 0) A).conjTranspose *
285
+ scalarCorner h * (0 : CStarMatrix (Fin 1) (Fin 0) A)) = fun _ => diagonalCorner 0 h := by
286
+ funext j
287
+ apply CStarMatrix.ext
288
+ intro i
289
+ exact Fin.elim0 i
290
+ rw [heq]
291
+ exact tendsto_const_nhds
292
+ | succ n hn =>
293
+ have hblock := hn.block (FiniteCuntzLE.refl (scalarCorner h))
294
+ rw [← diagonalCorner_one h, matrixBlock_diagonal, matrixBlock_diagonal] at hblock
295
+ exact hblock.trans hh
296
+
297
+ end MainGap
298
+
299
+ end
300
+
301
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Compression.lean ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Nonvanishing
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
11
+
12
+ def cutInverseFn (δ t : ℝ) : ℝ := t/(max δ t)^2
13
+
14
+ lemma continuous_cutInverseFn {δ : ℝ} (hδ : 0 < δ) : Continuous (cutInverseFn δ) := by
15
+ exact continuous_id.div (((continuous_const.max continuous_id).pow 2))
16
+ (fun t => pow_ne_zero _ (ne_of_gt (hδ.trans_le (le_max_left _ _))))
17
+
18
+ lemma cutInverseFn_zero (δ : ℝ) : cutInverseFn δ 0=0 := by simp [cutInverseFn]
19
+
20
+ def cutInverse (a : A) (δ : ℝ) : A := cfcₙ (cutInverseFn δ) a
21
+
22
+ lemma cutInverseFn_bound {δ t : ℝ} (hδ : 0 < δ) (ht : 0 ≤ t) :
23
+ 0 ≤ cutInverseFn δ t ∧ cutInverseFn δ t ≤ 1/δ := by
24
+ refine ⟨div_nonneg ht (sq_nonneg _), ?_⟩
25
+ by_cases htδ : t ≤ δ
26
+ · dsimp [cutInverseFn]
27
+ rw [max_eq_left htδ]
28
+ apply (div_le_iff₀ (sq_pos_of_pos hδ)).mpr
29
+ calc
30
+ t ≤ δ := htδ
31
+ _ = 1/δ*δ^2 := by field_simp
32
+ · have htpos : 0 < t := hδ.trans (lt_of_not_ge htδ)
33
+ have he : cutInverseFn δ t=1/t := by
34
+ dsimp [cutInverseFn]
35
+ rw [max_eq_right (le_of_not_ge htδ)]
36
+ field_simp
37
+ rw [he]
38
+ exact one_div_le_one_div_of_le hδ (le_of_not_ge htδ)
39
+
40
+ lemma norm_cutInverse_le {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 < δ) :
41
+ ‖cutInverse a δ‖ ≤ 1/δ := by
42
+ apply norm_cfcₙ_le
43
+ intro t ht
44
+ have hb := cutInverseFn_bound hδ (quasispectrum_nonneg_of_nonneg a ha t ht)
45
+ rw [Real.norm_eq_abs, abs_of_nonneg hb.1]
46
+ exact hb.2
47
+
48
+ lemma cut_mul_cutInverse {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 < δ) :
49
+ cut a δ * (cutInverse a δ * a) = cut a δ := by
50
+ have hc : Continuous (fun t : ℝ => max (t-δ) 0) := by fun_prop
51
+ have h0 : (fun t : ℝ => max (t-δ) 0) 0=0 := by
52
+ simp [max_eq_right (neg_nonpos.mpr hδ.le)]
53
+ have he : cutInverse a δ*a = cfcₙ (fun t : ℝ => cutInverseFn δ t*t) a := by
54
+ simpa only [id_eq, cfcₙ_id' ℝ a ha.isSelfAdjoint, cutInverse] using
55
+ (cfcₙ_mul (cutInverseFn δ) id a (continuous_cutInverseFn hδ).continuousOn
56
+ (cutInverseFn_zero δ) continuousOn_id rfl).symm
57
+ rw [he, cut, ← cfcₙ_mul (fun t : ℝ => max (t-δ) 0)
58
+ (fun t : ℝ => cutInverseFn δ t*t) a hc.continuousOn h0
59
+ ((continuous_cutInverseFn hδ).mul continuous_id).continuousOn (by simp [cutInverseFn_zero])]
60
+ apply cfcₙ_congr
61
+ intro t _
62
+ dsimp only
63
+ by_cases ht : t ≤ δ
64
+ · rw [max_eq_right (sub_nonpos.mpr ht), zero_mul]
65
+ · have ht0 : t ≠ 0 := ne_of_gt (hδ.trans (lt_of_not_ge ht))
66
+ dsimp [cutInverseFn]
67
+ rw [max_eq_right (le_of_not_ge ht)]
68
+ field_simp
69
+
70
+ lemma Her_right_fixed_cutInverse {a x : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 < δ)
71
+ (hx : x ∈ Her (cut a δ)) : x*(cutInverse a δ*a)=x :=
72
+ Her_fixed_right (cut_nonneg a δ).isSelfAdjoint (cut_mul_cutInverse ha hδ) hx
73
+
74
+ end MainGap
75
+
76
+ namespace MainGap
77
+ variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
78
+
79
+ def HerCompression (p q c : A) (κ : ℝ) : Prop :=
80
+ ∀ x : A, x ∈ Her p → ∀ k : A, k ∈ Her q → ‖x*c*k‖ ≤ κ * ‖x‖ * ‖k‖
81
+
82
+ lemma cut_sqrt_lower {d : A} (hd : 0 ≤ d) {δ : ℝ} (hδ : 0 ≤ δ) :
83
+ δ • cut d δ ≤ CFC.sqrt (cut d δ) * d * CFC.sqrt (cut d δ) := by
84
+ let f : ℝ → ℝ := fun t => max (t-δ) 0
85
+ have hf : Continuous f := (continuous_id.sub continuous_const).max continuous_const
86
+ have hf0 : f 0=0 := by simp [f, max_eq_right (neg_nonpos.mpr hδ)]
87
+ have hl : δ • cut d δ ≤ d * cut d δ := by
88
+ change δ • cfcₙ f d ≤ d * cfcₙ f d
89
+ have hu : cfcₙ (fun t => t*f t) d = d*cfcₙ f d := by
90
+ rw [cfcₙ_mul (fun t : ℝ => t) f d continuousOn_id rfl hf.continuousOn hf0]
91
+ exact congrArg (fun x => x*cfcₙ f d) (cfcₙ_id ℝ d hd.isSelfAdjoint)
92
+ rw [← cfcₙ_const_mul δ f d hf.continuousOn hf0, ← hu]
93
+ apply (cfcₙ_le_iff _ _ d (continuous_const.mul hf).continuousOn
94
+ (continuous_id.mul hf).continuousOn (by simp [hf0]) (by simp [hf0]) hd.isSelfAdjoint).mpr
95
+ intro t _
96
+ by_cases ht : δ ≤ t
97
+ · exact mul_le_mul_of_nonneg_right ht (le_max_right _ _)
98
+ · simp [f, max_eq_right (by linarith : t-δ ≤ 0)]
99
+ have hc : Commute (cut d δ) d := (Commute.refl d).cfcₙ_real f
100
+ have hs : Commute (CFC.sqrt (cut d δ)) d := hc.cfcₙ_nnreal NNReal.sqrt
101
+ calc
102
+ δ • cut d δ ≤ d * cut d δ := hl
103
+ _ = CFC.sqrt (cut d δ) * d * CFC.sqrt (cut d δ) := by
104
+ rw [hs.eq, mul_assoc, CFC.sqrt_mul_sqrt_self (cut d δ) (cut_nonneg d δ)]
105
+
106
+ lemma norm_mul_factor_of_order {m z : A} {r : ℝ} (hr : 0 ≤ r)
107
+ (h : star (m*z) * (m*z) ≤ r^2 • (star z*z)) (b : A) :
108
+ ‖m*(z*b)‖ ≤ r*‖z*b‖ := by
109
+ have ho := star_left_conjugate_le_conjugate h b
110
+ have ht : star (m*(z*b))*(m*(z*b)) ≤ r^2 • (star (z*b)*(z*b)) := by
111
+ simpa only [star_mul, mul_assoc, mul_smul_comm, smul_mul_assoc] using ho
112
+ have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg ht (star_mul_self_nonneg _)
113
+ rw [CStarRing.norm_star_mul_self, norm_smul, Real.norm_eq_abs,
114
+ abs_of_nonneg (sq_nonneg r), CStarRing.norm_star_mul_self] at hn
115
+ apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hr (norm_nonneg _))).mp
116
+ calc
117
+ ‖m*(z*b)‖^2 = ‖m*(z*b)‖*‖m*(z*b)‖ := pow_two _
118
+ _ ≤ r^2 * (‖z*b‖*‖z*b‖) := hn
119
+ _ = (r*‖z*b‖)^2 := by ring
120
+
121
+ lemma norm_mul_Her_of_order {m z : A} {r : ℝ} (hr : 0 ≤ r)
122
+ (h : star (m*z) * (m*z) ≤ r^2 • (star z*z))
123
+ {k : A} (hk : k ∈ Her (z*star z)) : ‖m*k‖ ≤ r*‖k‖ := by
124
+ have hc : IsClosed {k : A | ‖m*k‖ ≤ r*‖k‖} := isClosed_le (by fun_prop) (by fun_prop)
125
+ apply closure_minimal (s := Set.range (fun b : A => (z*star z)*b*star (z*star z))) _ hc hk
126
+ rintro k ⟨b, rfl⟩
127
+ change ‖m*((z*star z)*b*star (z*star z))‖ ≤ r*‖(z*star z)*b*star (z*star z)‖
128
+ simpa only [star_mul, star_star, mul_assoc] using
129
+ norm_mul_factor_of_order hr h (star z*b*(z*star z))
130
+
131
+ end MainGap
132
+
133
+ namespace MainGap
134
+ variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
135
+
136
+ lemma conditional_defect_bounds {p y c : A} (hp : 0 ≤ p) (hy : 0 ≤ y)
137
+ (hpn : ‖p‖ ≤ 1) (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1) :
138
+ 0 ≤ y*(1-star c*(p*p)*c)*y ∧
139
+ y*(1-star c*(p*p)*c)*y ≤ y*y ∧ y*y ≤ 1 := by
140
+ have hm : ‖p*c‖ ≤ 1 := (norm_mul_le _ _).trans (by nlinarith [norm_nonneg p, norm_nonneg c])
141
+ have hm₁ : star (p*c)*(p*c) ≤ 1 := by
142
+ apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ (star_mul_self_nonneg _)).mp
143
+ rw [CStarRing.norm_star_mul_self]
144
+ nlinarith [norm_nonneg (p*c)]
145
+ have he : star (p*c)*(p*c) = star c*(p*p)*c := by
146
+ simp only [star_mul, hp.isSelfAdjoint.star_eq, mul_assoc]
147
+ have hn : 0 ≤ 1-star c*(p*p)*c := sub_nonneg.mpr (he ▸ hm₁)
148
+ have hl : 1-star c*(p*p)*c ≤ 1 := sub_le_self _ (he ▸ star_mul_self_nonneg (p*c))
149
+ refine ⟨?_, ?_, ?_⟩
150
+ · simpa only [hy.isSelfAdjoint.star_eq] using star_left_conjugate_nonneg hn y
151
+ · simpa only [hy.isSelfAdjoint.star_eq, mul_one] using star_left_conjugate_le_conjugate hl y
152
+ · apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ ?_).mp
153
+ · rw [hy.isSelfAdjoint.norm_mul_self]
154
+ nlinarith [norm_nonneg y]
155
+ · simpa only [hy.isSelfAdjoint.star_eq] using star_mul_self_nonneg y
156
+
157
+ lemma conditional_order_loss {p y c d : A} (hp : 0 ≤ p) (hy : 0 ≤ y)
158
+ (hd : 0 ≤ d) (_hyd : d ≤ y*y) (hy₂ : y*y ≤ 1)
159
+ (he : d=y*(1-star c*(p*p)*c)*y) {δ : ℝ} (hδ : 0 ≤ δ) :
160
+ let z := y*CFC.sqrt (cut d δ)
161
+ star ((p*c)*z)*((p*c)*z) ≤ (1-δ) • (star z*z) := by
162
+ let s := CFC.sqrt (cut d δ)
163
+ let z := y*s
164
+ have hs : IsSelfAdjoint s := (CFC.sqrt_nonneg _).isSelfAdjoint
165
+ have hZ : star z*z ≤ cut d δ := by
166
+ calc
167
+ star z*z = s*(y*y)*s := by
168
+ dsimp [z]
169
+ simp only [star_mul, hs.star_eq, hy.isSelfAdjoint.star_eq, mul_assoc]
170
+ _ ≤ s*1*s := by
171
+ simpa only [hs.star_eq] using star_left_conjugate_le_conjugate hy₂ s
172
+ _ = cut d δ := by
173
+ rw [mul_one]
174
+ exact CFC.sqrt_mul_sqrt_self (cut d δ) (cut_nonneg d δ)
175
+ have hδZ : δ • (star z*z) ≤ s*d*s :=
176
+ (smul_le_smul_of_nonneg_left hZ hδ).trans (cut_sqrt_lower hd hδ)
177
+ have hid : star ((p*c)*z)*((p*c)*z) = star z*z-s*d*s := by
178
+ dsimp [z]
179
+ rw [he]
180
+ simp only [star_mul, hp.isSelfAdjoint.star_eq, hy.isSelfAdjoint.star_eq, hs.star_eq]
181
+ noncomm_ring
182
+ change star ((p*c)*z)*((p*c)*z) ≤ (1-δ) • (star z*z)
183
+ rw [hid, sub_smul, one_smul]
184
+ exact sub_le_sub_left hδZ _
185
+
186
+ lemma conditional_Her_loss {p y c : A} (hp : 0 ≤ p) (hy : 0 ≤ y)
187
+ (hpn : ‖p‖ ≤ 1) (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1)
188
+ {δ : ℝ} (hδ : 0 ≤ δ) (hδ₁ : δ ≤ 1) :
189
+ let d := y*(1-star c*(p*p)*c)*y
190
+ let q := y*cut d δ*y
191
+ ∀ k : A, k ∈ Her q → ‖p*c*k‖ ≤ Real.sqrt (1-δ) * ‖k‖ := by
192
+ let d := y*(1-star c*(p*p)*c)*y
193
+ let z := y*CFC.sqrt (cut d δ)
194
+ have hb := conditional_defect_bounds hp hy hpn hyn hcn
195
+ have hh : star ((p*c)*z)*((p*c)*z) ≤ (Real.sqrt (1-δ))^2 • (star z*z) := by
196
+ rw [Real.sq_sqrt (sub_nonneg.mpr hδ₁)]
197
+ exact conditional_order_loss hp hy hb.1 hb.2.1 hb.2.2 rfl hδ
198
+ have hq : z*star z=y*cut d δ*y := by
199
+ dsimp [z]
200
+ simp only [star_mul, hy.isSelfAdjoint.star_eq, (CFC.sqrt_nonneg (cut d δ)).isSelfAdjoint.star_eq]
201
+ calc
202
+ y*CFC.sqrt (cut d δ)*(CFC.sqrt (cut d δ)*y) =
203
+ y*(CFC.sqrt (cut d δ)*CFC.sqrt (cut d δ))*y := by simp only [mul_assoc]
204
+ _ = _ := by rw [CFC.sqrt_mul_sqrt_self (cut d δ) (cut_nonneg d δ)]
205
+ change ∀ k : A, k ∈ Her (y*cut d δ*y) → ‖p*c*k‖ ≤ Real.sqrt (1-δ)*‖k‖
206
+ intro k hk
207
+ exact norm_mul_Her_of_order (Real.sqrt_nonneg _) hh (hq.symm ▸ hk)
208
+
209
+ end MainGap
210
+
211
+ namespace MainGap
212
+ variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
213
+
214
+ lemma conditional_q_zero {p y c : A} (hp : 0 ≤ p) (hy : 0 ≤ y)
215
+ (hpn : ‖p‖ ≤ 1) (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1)
216
+ {δ : ℝ} (hδ : 0 < δ)
217
+ (hq : y*cut (y*(1-star c*(p*p)*c)*y) δ*y=0) :
218
+ ‖y*(1-star c*(p*p)*c)*y‖ ≤ δ := by
219
+ let d := y*(1-star c*(p*p)*c)*y
220
+ let h := cut d δ
221
+ let s := CFC.sqrt h
222
+ have hs : IsSelfAdjoint s := (CFC.sqrt_nonneg h).isSelfAdjoint
223
+ have hd := conditional_defect_bounds hp hy hpn hyn hcn
224
+ have hzz : (y*s)*star (y*s) = y*h*y := by
225
+ simp only [star_mul, hs.star_eq, hy.isSelfAdjoint.star_eq]
226
+ calc
227
+ y*s*(s*y)= y*(s*s)*y := by simp only [mul_assoc]
228
+ _ = y*h*y := by rw [show s*s=h from CFC.sqrt_mul_sqrt_self h (cut_nonneg d δ)]
229
+ have hz : y*s=0 := (CStarRing.mul_star_self_eq_zero_iff _).mp (hzz.trans hq)
230
+ have hl : δ • h ≤ 0 := by
231
+ calc
232
+ δ • h ≤ s*d*s := cut_sqrt_lower hd.1 hδ.le
233
+ _ ≤ s*(y*y)*s := by
234
+ simpa only [hs.star_eq] using star_left_conjugate_le_conjugate hd.2.1 s
235
+ _ = star (y*s)*(y*s) := by
236
+ simp only [star_mul, hs.star_eq, hy.isSelfAdjoint.star_eq, mul_assoc]
237
+ _ = 0 := by rw [hz, star_zero, mul_zero]
238
+ have hsm : δ • h=0 := le_antisymm hl (smul_nonneg hδ.le (cut_nonneg d δ))
239
+ have hh : h=0 := (smul_eq_zero.mp hsm).resolve_left (ne_of_gt hδ)
240
+ have hb := norm_sub_cut_le hd.1 hδ.le
241
+ change ‖d-h‖ ≤ δ at hb
242
+ simpa only [hh, sub_zero] using hb
243
+
244
+ lemma compression_of_conditional_loss {p q c : A} (hp : 0 ≤ p) {τ r : ℝ}
245
+ (hτ : 0 < τ) (_hr : 0 ≤ r)
246
+ (h : ∀ k : A, k ∈ Her q → ‖p*c*k‖ ≤ r*‖k‖) :
247
+ HerCompression (ramp p τ 1) q c (r/τ) := by
248
+ intro x hx k hk
249
+ have hxH : x ∈ Her (cut p τ) :=
250
+ Her_mono_of_mem (ramp_mem_Her_cut hp hτ.le) hx
251
+ have hfix : x*(cutInverse p τ*p)=x := Her_right_fixed_cutInverse hp hτ hxH
252
+ have he : x*c*k = (x*cutInverse p τ)*(p*c*k) := by
253
+ calc
254
+ x*c*k = (x*(cutInverse p τ*p))*c*k := by rw [hfix]
255
+ _ = _ := by simp only [mul_assoc]
256
+ rw [he]
257
+ calc
258
+ ‖(x*cutInverse p τ)*(p*c*k)‖ ≤ ‖x*cutInverse p τ‖*‖p*c*k‖ := norm_mul_le _ _
259
+ _ ≤ (‖x‖*(1/τ))*(r*‖k‖) := by
260
+ apply mul_le_mul
261
+ · exact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_left (norm_cutInverse_le hp hτ) (norm_nonneg x))
262
+ · exact h k hk
263
+ · exact norm_nonneg _
264
+ · positivity
265
+ _ = (r/τ)*‖x‖*‖k‖ := by ring
266
+
267
+ end MainGap
268
+
269
+ end
270
+
271
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Cutoffs.lean ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.OrthogonalSlots
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ section MoreHer
12
+ variable [PartialOrder A] [StarOrderedRing A]
13
+
14
+ omit [PartialOrder A] [StarOrderedRing A] in
15
+ lemma norm_left_remainder_sq {e z : A} (he : IsSelfAdjoint e) :
16
+ ‖z - e * z‖ ^ 2 = ‖twoSidedRemainder e (z * star z)‖ := by
17
+ rw [pow_two, ← CStarRing.norm_self_mul_star]
18
+ congr 1
19
+ simp only [twoSidedRemainder, star_sub, star_mul, he.star_eq]
20
+ noncomm_ring
21
+
22
+ omit [PartialOrder A] [StarOrderedRing A] in
23
+ lemma norm_right_remainder_sq {e z : A} (he : IsSelfAdjoint e) :
24
+ ‖z - z * e‖ ^ 2 = ‖twoSidedRemainder e (star z * z)‖ := by
25
+ rw [← norm_star (z - z * e), star_sub, star_mul, he.star_eq,
26
+ norm_left_remainder_sq he, star_star]
27
+
28
+ lemma norm_left_remainder_sq_le {e z b : A} (he : IsSelfAdjoint e)
29
+ (hen : ‖e‖ ≤ 1) (hle : z * star z ≤ b) :
30
+ ‖z - e * z‖ ^ 2 ≤ 2 * ‖b - e * b‖ := by
31
+ rw [norm_left_remainder_sq he]
32
+ exact (CStarAlgebra.norm_le_norm_of_le_of_nonneg
33
+ (twoSidedRemainder_mono he hle)
34
+ (twoSidedRemainder_nonneg he (mul_star_self_nonneg z))).trans
35
+ (norm_twoSidedRemainder_le hen b)
36
+
37
+ lemma norm_right_remainder_sq_le {e z b : A} (he : IsSelfAdjoint e)
38
+ (hen : ‖e‖ ≤ 1) (hle : star z * z ≤ b) :
39
+ ‖z - z * e‖ ^ 2 ≤ 2 * ‖b - e * b‖ := by
40
+ rw [norm_right_remainder_sq he]
41
+ exact (CStarAlgebra.norm_le_norm_of_le_of_nonneg
42
+ (twoSidedRemainder_mono he hle)
43
+ (twoSidedRemainder_nonneg he (star_mul_self_nonneg z))).trans
44
+ (norm_twoSidedRemainder_le hen b)
45
+
46
+ lemma mem_Her_of_moduli {h z : A} (hl : z * star z ∈ Her h)
47
+ (hr : star z * z ∈ Her h) : z ∈ Her h := by
48
+ let b := z * star z + star z * z
49
+ have hb : 0 ≤ b := add_nonneg (mul_star_self_nonneg z) (star_mul_self_nonneg z)
50
+ have hbh : b ∈ Her h := (Her h).add_mem hl hr
51
+ have hbl : z * star z ≤ b := le_add_of_nonneg_right (star_mul_self_nonneg z)
52
+ have hbr : star z * z ≤ b := le_add_of_nonneg_left (mul_star_self_nonneg z)
53
+ have hzc : z ∈ closure (Her h : Set A) := by
54
+ rw [Metric.mem_closure_iff]
55
+ intro ε hε
56
+ obtain ⟨e, he, hesa, hen, hs⟩ := Her_exists_approx_unit hb
57
+ (show 0 < ε^2 / 8 by positivity)
58
+ have hδ : 2 * ‖b - e * b‖ < (ε / 2)^2 := by linarith
59
+ have hle : ‖z - e * z‖ < ε / 2 := by
60
+ exact (sq_lt_sq₀ (norm_nonneg _) (by positivity)).mp
61
+ ((norm_left_remainder_sq_le hesa hen hbl).trans_lt hδ)
62
+ have hre : ‖z - z * e‖ < ε / 2 := by
63
+ exact (sq_lt_sq₀ (norm_nonneg _) (by positivity)).mp
64
+ ((norm_right_remainder_sq_le hesa hen hbr).trans_lt hδ)
65
+ refine ⟨e * z * e, ?_, ?_⟩
66
+ · change e * z * e ∈ Her h
67
+ simpa only [hesa.star_eq] using Her_sandwich (Her_mono_of_mem hbh he) z
68
+ · rw [dist_eq_norm]
69
+ have heq : z - e * z * e = (z - e * z) + e * (z - z * e) := by noncomm_ring
70
+ rw [heq]
71
+ calc
72
+ ‖(z - e * z) + e * (z - z * e)‖ ≤ ‖z - e * z‖ + ‖e * (z - z * e)‖ := norm_add_le _ _
73
+ _ ≤ ‖z - e * z‖ + ‖e‖ * ‖z - z * e‖ := by gcongr; exact norm_mul_le _ _
74
+ _ ≤ ‖z - e * z‖ + ‖z - z * e‖ := by nlinarith [norm_nonneg (z - z * e)]
75
+ _ < ε := by linarith
76
+ rwa [(isClosed_Her h).closure_eq] at hzc
77
+
78
+ end MoreHer
79
+ end MainGap
80
+
81
+ namespace MainGap
82
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
83
+ section Ramps
84
+ variable [PartialOrder A] [StarOrderedRing A]
85
+
86
+ lemma norm_mem_quasispectrum_of_nonneg {a : A} (ha : 0 ≤ a) :
87
+ ‖a‖ ∈ quasispectrum ℝ a := by
88
+ simpa using quasispectrum.algebraMap_mem ℝ
89
+ (NonUnitalIsometricContinuousFunctionalCalculus.isGreatest_quasispectrum a ha).1
90
+
91
+ def rampFn (l u t : ℝ) : ℝ := min 1 (max (t-l) 0 / (u-l))
92
+
93
+ lemma continuous_rampFn (l u : ℝ) : Continuous (rampFn l u) :=
94
+ continuous_const.min (((continuous_id.sub continuous_const).max continuous_const).div_const _)
95
+
96
+ lemma rampFn_nonneg {l u t : ℝ} (hlu : l ≤ u) : 0 ≤ rampFn l u t :=
97
+ le_min (by norm_num) (div_nonneg (le_max_right _ _) (sub_nonneg.mpr hlu))
98
+
99
+ lemma rampFn_le_one (l u t : ℝ) : rampFn l u t ≤ 1 := min_le_left _ _
100
+
101
+ lemma rampFn_zero {l u t : ℝ} (ht : t ≤ l) : rampFn l u t = 0 := by
102
+ simp only [rampFn, max_eq_right (sub_nonpos.mpr ht), zero_div, min_eq_right (by norm_num : (0:ℝ) ≤ 1)]
103
+
104
+ lemma rampFn_one {l u t : ℝ} (hlu : l < u) (ht : u ≤ t) : rampFn l u t = 1 := by
105
+ apply min_eq_left
106
+ apply (le_div_iff₀ (sub_pos.mpr hlu)).mpr
107
+ rw [one_mul, max_eq_left (sub_nonneg.mpr (hlu.le.trans ht))]
108
+ linarith
109
+
110
+ def ramp (a : A) (l u : ℝ) : A := cfcₙ (rampFn l u) a
111
+
112
+ lemma ramp_nonneg (a : A) {l u : ℝ} (hlu : l ≤ u) : 0 ≤ ramp a l u :=
113
+ cfcₙ_nonneg (fun _ _ => rampFn_nonneg hlu)
114
+
115
+ omit [PartialOrder A] [StarOrderedRing A] in
116
+ lemma norm_ramp_le_one (a : A) {l u : ℝ} (hlu : l ≤ u) : ‖ramp a l u‖ ≤ 1 := by
117
+ apply norm_cfcₙ_le
118
+ intro t _
119
+ rw [Real.norm_eq_abs, abs_of_nonneg (rampFn_nonneg hlu)]
120
+ exact rampFn_le_one _ _ _
121
+
122
+ lemma ramp_mem_Her_cut {a : A} (ha : 0 ≤ a) {l u : ℝ} (hl : 0 ≤ l) :
123
+ ramp a l u ∈ Her (cut a l) := by
124
+ have hcomp : ramp a l u = cfcₙ (fun t : ℝ => min 1 (t / (u-l))) (cut a l) := by
125
+ unfold ramp cut
126
+ exact cfcₙ_comp (fun t : ℝ => min 1 (t / (u-l))) (fun t : ℝ => max (t-l) 0) a
127
+ (continuous_const.min (continuous_id.div_const _)).continuousOn (by norm_num)
128
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
129
+ (by simp [max_eq_right (neg_nonpos.mpr hl)]) (.of_nonneg ha)
130
+ rw [hcomp]
131
+ exact cfcₙ_mem (𝕜' := ℂ) _ (self_mem_Her (cut_nonneg a l))
132
+
133
+ lemma norm_ramp_eq_one {a : A} (ha : 0 ≤ a) {l u : ℝ} (hl : 0 ≤ l)
134
+ (hlu : l < u) (hu : u ≤ ‖a‖) : ‖ramp a l u‖ = 1 := by
135
+ apply le_antisymm (norm_ramp_le_one a hlu.le)
136
+ have ht := norm_apply_le_norm_cfcₙ (rampFn l u) a
137
+ (norm_mem_quasispectrum_of_nonneg ha) (continuous_rampFn l u).continuousOn
138
+ (rampFn_zero hl) (.of_nonneg ha)
139
+ change 1 ≤ ‖cfcₙ (rampFn l u) a‖
140
+ simpa only [rampFn_one hlu hu, norm_one] using ht
141
+
142
+ lemma map_ramp {B : Type*} [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B]
143
+ (π : A →⋆ₙₐ[ℂ] B) {a : A} (ha : 0 ≤ a) {l u : ℝ} (hl : 0 ≤ l) :
144
+ π (ramp a l u) = ramp (π a) l u :=
145
+ π.map_cfcₙ (rampFn l u) a (continuous_rampFn l u).continuousOn (rampFn_zero hl)
146
+ (map_continuous π) (.of_nonneg ha) (.of_nonneg (map_nonneg π ha))
147
+
148
+ lemma map_cut {B : Type*} [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B]
149
+ (π : A →⋆ₙₐ[ℂ] B) {a : A} (ha : 0 ≤ a) {l : ℝ} (hl : 0 ≤ l) :
150
+ π (cut a l) = cut (π a) l :=
151
+ π.map_cfcₙ (fun t : ℝ => max (t-l) 0) a
152
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
153
+ (by simp [max_eq_right (neg_nonpos.mpr hl)]) (map_continuous π)
154
+ (.of_nonneg ha) (.of_nonneg (map_nonneg π ha))
155
+
156
+ lemma cut_cut {a : A} (ha : 0 ≤ a) {l u : ℝ} (hl : 0 ≤ l) (hu : 0 ≤ u) :
157
+ cut (cut a l) u = cut a (l+u) := by
158
+ let f : ℝ → ℝ := fun t => max (t-l) 0
159
+ let g : ℝ → ℝ := fun t => max (t-u) 0
160
+ have hcomp := cfcₙ_comp g f a
161
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
162
+ (by simp [g, max_eq_right (neg_nonpos.mpr hu)])
163
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
164
+ (by simp [f, max_eq_right (neg_nonpos.mpr hl)]) (.of_nonneg ha)
165
+ change cfcₙ g (cfcₙ f a) = _
166
+ rw [← hcomp]
167
+ apply cfcₙ_congr
168
+ intro t _
169
+ dsimp [f, g]
170
+ by_cases ht : l ≤ t
171
+ · rw [max_eq_left (sub_nonneg.mpr ht)]
172
+ congr 1
173
+ ring
174
+ · rw [max_eq_right (by linarith : t-l ≤ 0), zero_sub,
175
+ max_eq_right (neg_nonpos.mpr hu), max_eq_right (by linarith : t-(l+u) ≤ 0)]
176
+
177
+ lemma norm_sub_cut_le {a : A} (ha : 0 ≤ a) {l : ℝ} (hl : 0 ≤ l) :
178
+ ‖a - cut a l‖ ≤ l := by
179
+ conv_lhs => arg 1; lhs; rw [← cfcₙ_id ℝ a (.of_nonneg ha)]
180
+ rw [cut, ← cfcₙ_sub id (fun t : ℝ => max (t-l) 0) a continuousOn_id rfl
181
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
182
+ (by simp [max_eq_right (neg_nonpos.mpr hl)])]
183
+ apply norm_cfcₙ_le
184
+ intro t ht
185
+ have ht0 : 0 ≤ t := quasispectrum_nonneg_of_nonneg a ha t ht
186
+ dsimp only [id_eq]
187
+ rw [Real.norm_eq_abs, abs_le]
188
+ constructor
189
+ · have hh : max (t-l) 0 ≤ t := max_le (by linarith) ht0
190
+ linarith
191
+ · have hh := le_max_left (t-l) 0
192
+ linarith
193
+
194
+ omit [StarOrderedRing A] in
195
+ lemma ramp_mul_cut {a : A} (_ha : 0 ≤ a) {l u v : ℝ} (hl : 0 ≤ l)
196
+ (hlu : l < u) (huv : u ≤ v) : ramp a l u * cut a v = cut a v := by
197
+ have hv : 0 ≤ v := hl.trans (hlu.le.trans huv)
198
+ unfold ramp cut
199
+ rw [← cfcₙ_mul (rampFn l u) (fun t : ℝ => max (t-v) 0) a (continuous_rampFn l u).continuousOn (rampFn_zero hl)
200
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
201
+ (by simp [max_eq_right (neg_nonpos.mpr hv)])]
202
+ apply cfcₙ_congr
203
+ intro t _
204
+ dsimp only
205
+ by_cases ht : v ≤ t
206
+ · rw [rampFn_one hlu (huv.trans ht), one_mul]
207
+ · rw [max_eq_right (by linarith : t-v ≤ 0), mul_zero]
208
+
209
+ end Ramps
210
+ end MainGap
211
+
212
+ namespace MainGap
213
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
214
+
215
+ lemma Her_map {B : Type*} [NonUnitalCStarAlgebra B] (π : A →⋆ₙₐ[ℂ] B)
216
+ {h k : A} (hk : k ∈ Her h) : π k ∈ Her (π h) := by
217
+ have hc : IsClosed {k : A | π k ∈ Her (π h)} :=
218
+ (isClosed_Her (π h)).preimage (map_continuous π)
219
+ apply closure_minimal (s := Set.range (fun a : A => h * a * star h)) _ hc hk
220
+ rintro k ⟨a, rfl⟩
221
+ change π (h * a * star h) ∈ Her (π h)
222
+ simpa only [map_mul, map_star] using sandwich_mem_Her (π h) (π a)
223
+
224
+ lemma Her_fixed_left {h t : A} (ht : t * h = h) {k : A} (hk : k ∈ Her h) : t * k = k := by
225
+ have hc : IsClosed {k : A | t * k = k} := isClosed_eq (by fun_prop) continuous_id
226
+ apply closure_minimal (s := Set.range (fun a : A => h * a * star h)) _ hc hk
227
+ rintro k ⟨a, rfl⟩
228
+ change t * (h * a * star h) = h * a * star h
229
+ simp only [← mul_assoc, ht]
230
+
231
+ lemma Her_killed_left {h t : A} (ht : t * h = 0) {k : A} (hk : k ∈ Her h) : t * k = 0 := by
232
+ have hc : IsClosed {k : A | t * k = 0} := isClosed_eq (by fun_prop) continuous_const
233
+ apply closure_minimal (s := Set.range (fun a : A => h * a * star h)) _ hc hk
234
+ rintro k ⟨a, rfl⟩
235
+ change t * (h * a * star h) = 0
236
+ simp only [← mul_assoc, ht, zero_mul]
237
+
238
+ lemma positive_kernel_factor [PartialOrder A] [StarOrderedRing A] {x Q z : A} (hx : 0 ≤ x) (hQ : IsSelfAdjoint Q)
239
+ (hz : Q * (x * Q * z) = 0) : x * Q * z = 0 := by
240
+ let s := CFC.sqrt x
241
+ have hs : IsSelfAdjoint s := .of_nonneg (CFC.sqrt_nonneg x)
242
+ have hss : s * s = x := CFC.sqrt_mul_sqrt_self x hx
243
+ have hzero : star (s * Q * z) * (s * Q * z) = 0 := by
244
+ rw [star_mul, star_mul, hs.star_eq, hQ.star_eq]
245
+ calc
246
+ star z * (Q * s) * (s * Q * z) = star z * (Q * ((s * s) * Q * z)) := by noncomm_ring
247
+ _ = 0 := by rw [hss, hz, mul_zero]
248
+ have hz' := (CStarRing.star_mul_self_eq_zero_iff _).mp hzero
249
+ rw [← hss, mul_assoc s s, mul_assoc s, hz', mul_zero]
250
+
251
+ section UnitalCutBounds
252
+ variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B]
253
+
254
+ omit [PartialOrder B] [StarOrderedRing B] in
255
+ lemma cut_eq_cfc (d : B) {ε : ℝ} (hε : 0 ≤ ε) :
256
+ cut d ε = cfc (fun t : ℝ => max (t - ε) 0) d := by
257
+ unfold cut
258
+ apply cfcₙ_eq_cfc
259
+ · exact ((continuous_id.sub continuous_const).max continuous_const).continuousOn
260
+ · simp [max_eq_right (neg_nonpos.mpr hε)]
261
+
262
+ lemma continuous_reciprocalCutoff {η : ℝ} (hη : 0 < η) :
263
+ Continuous (fun t : ℝ => (max t η)⁻¹) := by
264
+ apply Continuous.inv₀ (continuous_id.max continuous_const)
265
+ intro t
266
+ exact ne_of_gt (hη.trans_le (le_max_right t η))
267
+
268
+ omit [PartialOrder B] [StarOrderedRing B] in
269
+ lemma cutoffHer_factor {x Q : B} (hx : IsSelfAdjoint x) (hQ : IsSelfAdjoint Q)
270
+ {η : ℝ} (hη : 0 < η) {k : B} (hk : k ∈ Her (cut (x * Q * Q * x) η)) :
271
+ ∃ z : B, k = x * Q * z := by
272
+ let U := x * Q * Q * x
273
+ let f : ℝ → ℝ := fun t => (max t η)⁻¹
274
+ have hU : IsSelfAdjoint U := by
275
+ change star (x * Q * Q * x) = x * Q * Q * x
276
+ simp only [star_mul, hx.star_eq, hQ.star_eq]
277
+ noncomm_ring
278
+ have hf : Continuous f := continuous_reciprocalCutoff hη
279
+ have hg : Continuous (fun t : ℝ => max (t - η) 0) :=
280
+ (continuous_id.sub continuous_const).max continuous_const
281
+ have hfix : (U * cfc f U) * cut U η = cut U η := by
282
+ rw [cut_eq_cfc U hη.le]
283
+ conv_lhs => lhs; lhs; rw [← cfc_id ℝ U hU]
284
+ rw [← cfc_mul _ _ U continuousOn_id hf.continuousOn]
285
+ simp only [id_eq]
286
+ have hif : ContinuousOn (fun t : ℝ => t * f t) (spectrum ℝ U) := (continuous_id.mul hf).continuousOn
287
+ rw [← cfc_mul _ _ U hif hg.continuousOn]
288
+ apply cfc_congr
289
+ intro t _
290
+ dsimp only
291
+ by_cases ht : η ≤ t
292
+ · simp only [f, max_eq_left ht, mul_inv_cancel₀ (ne_of_gt (hη.trans_le ht)), one_mul]
293
+ · rw [max_eq_right (by linarith : t - η ≤ 0), mul_zero]
294
+ have hfixk := Her_fixed_left hfix hk
295
+ refine ⟨Q * x * cfc f U * k, ?_⟩
296
+ calc
297
+ k = (U * cfc f U) * k := hfixk.symm
298
+ _ = x * Q * (Q * x * cfc f U * k) := by dsimp [U]; noncomm_ring
299
+
300
+ lemma selfConsistent_cutoff_bound {x d : B} (hx : 0 ≤ x) (hd : 0 ≤ d)
301
+ {η h : ℝ} (hη : 0 < η) (hh : 0 ≤ h)
302
+ (hmem : d ∈ Her (cut (x * cfc (fun t : ℝ => max (h - t) 0) d *
303
+ cfc (fun t : ℝ => max (h - t) 0) d * x) η)) :
304
+ d ≤ h • (1 : B) := by
305
+ let Q := cfc (fun t : ℝ => max (h - t) 0) d
306
+ have hQ : IsSelfAdjoint Q := IsSelfAdjoint.cfc
307
+ have hq : Continuous (fun t : ℝ => max (h - t) 0) :=
308
+ (continuous_const.sub continuous_id).max continuous_const
309
+ have hk : Continuous (fun t : ℝ => max (t - h) 0) :=
310
+ (continuous_id.sub continuous_const).max continuous_const
311
+ have hkill : Q * cut d h = 0 := by
312
+ rw [cut_eq_cfc d hh]
313
+ change cfc (fun t : ℝ => max (h-t) 0) d * cfc (fun t : ℝ => max (t-h) 0) d = 0
314
+ rw [← cfc_mul _ _ d hq.continuousOn hk.continuousOn, ← cfc_zero d (R := ℝ)]
315
+ apply cfc_congr
316
+ intro t _
317
+ by_cases ht : h ≤ t
318
+ · simp [max_eq_right (by linarith : h - t ≤ 0)]
319
+ · simp [max_eq_right (by linarith : t - h ≤ 0)]
320
+ have hcutmem : cut d h ∈ Her (cut (x * Q * Q * x) η) :=
321
+ Her_mono_of_mem hmem (cut_mem_Her hd h)
322
+ obtain ⟨z, hz⟩ := cutoffHer_factor (.of_nonneg hx) hQ hη hcutmem
323
+ have hcutzero : cut d h = 0 := by
324
+ rw [hz]
325
+ exact positive_kernel_factor hx hQ (by rwa [← hz])
326
+ rw [cut_eq_cfc d hh, ← cfc_zero d (R := ℝ)] at hcutzero
327
+ have hzspec := eqOn_of_cfc_eq_cfc (ha := IsSelfAdjoint.of_nonneg hd) hcutzero
328
+ rw [← Algebra.algebraMap_eq_smul_one, ← cfc_const h d]
329
+ conv_lhs => rw [← cfc_id ℝ d (.of_nonneg hd)]
330
+ apply (cfc_le_iff _ _ d continuousOn_id continuousOn_const (.of_nonneg hd)).mpr
331
+ intro t ht
332
+ have hm : max (t - h) 0 = 0 := hzspec ht
333
+ have := le_max_left (t - h) 0
334
+ dsimp only [id_eq]
335
+ linarith
336
+
337
+ end UnitalCutBounds
338
+
339
+ end MainGap
340
+
341
+ end
342
+
343
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Defect.lean ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.FourChoices
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [CStarAlgebra A]
11
+ local instance deficiencyOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance deficiencyStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ lemma deficiency_eq_sub {d : A} (hd : 0 ≤ d) (hb : d ≤ (1/2 : ℝ) • (1 : A)) :
15
+ deficiency d = (1/2 : ℝ) • (1 : A) - d := by
16
+ have hdsa : IsSelfAdjoint d := .of_nonneg hd
17
+ have hb' : cfc (fun t : ℝ => t) d ≤ cfc (fun _ : ℝ => (1/2 : ℝ)) d := by
18
+ rw [cfc_id' ℝ d hdsa, cfc_const (1/2 : ℝ) d hdsa, Algebra.algebraMap_eq_smul_one]
19
+ exact hb
20
+ have hs := (cfc_le_iff _ _ d continuousOn_id continuousOn_const hdsa).mp hb'
21
+ calc
22
+ deficiency d = cfc (fun t : ℝ => (1/2 : ℝ)-t) d := by
23
+ apply cfc_congr
24
+ intro t ht
25
+ exact max_eq_left (sub_nonneg.mpr (hs t ht))
26
+ _ = cfc (fun _ : ℝ => (1/2 : ℝ)) d - cfc (fun t : ℝ => t) d :=
27
+ cfc_sub _ _ d continuousOn_const continuousOn_id
28
+ _ = (1/2 : ℝ) • (1 : A) - d := by
29
+ rw [cfc_const (1/2 : ℝ) d hdsa, cfc_id' ℝ d hdsa, Algebra.algebraMap_eq_smul_one]
30
+
31
+ lemma sandwich_zero_eigen {x d : A} (hx : 0 ≤ x) (hd : 0 ≤ d)
32
+ (hdle : d ≤ (1/2 : ℝ) • (1 : A))
33
+ (hU : x * deficiency d * deficiency d * x = 0) : d * x = (1/2 : ℝ) • x := by
34
+ have hQx : deficiency d * x = 0 := by
35
+ apply (CStarRing.star_mul_self_eq_zero_iff _).mp
36
+ simpa only [star_mul, IsSelfAdjoint.of_nonneg hx |>.star_eq,
37
+ deficiency_selfAdjoint d |>.star_eq, mul_assoc] using hU
38
+ rw [deficiency_eq_sub hd hdle, sub_mul, smul_mul_assoc, one_mul] at hQx
39
+ exact (sub_eq_zero.mp hQx).symm
40
+
41
+ lemma Her_eigen_left {x d k : A} {h : ℝ} (hx : d*x=h•x) (hk : k ∈ Her x) :
42
+ d*k=h•k := by
43
+ have hz : (d-h • (1:A))*x=0 := by
44
+ simp only [sub_mul, smul_mul_assoc, one_mul, hx, sub_self]
45
+ have := Her_killed_left hz hk
46
+ simpa only [sub_mul, smul_mul_assoc, one_mul, sub_eq_zero] using this
47
+
48
+ lemma firstH_mem_firstX {X : A} (hX : 0 ≤ X) : firstH X ∈ Her (firstX X) :=
49
+ Her_mono_of_mem (cut_mem_cutHer hX (by norm_num : (0:ℝ) ≤ 1/16)
50
+ (by norm_num : (1/16:ℝ) ≤ 3/32)) (ramp_mem_Her_cut hX (by norm_num))
51
+
52
+ lemma firstK_fixes_H {X : A} (hX : 0 ≤ X) : firstK X * firstH X = firstH X :=
53
+ Her_fixed_left (ramp_mul_cut hX (by norm_num : (0:ℝ) ≤ 3/64)
54
+ (by norm_num : (3/64:ℝ) < 1/16) le_rfl) (firstH_mem_firstX hX)
55
+
56
+ lemma firstR_fixed_left {X B : A} (hX : 0 ≤ X) (hB : star B * B ∈ Her (firstV X)) :
57
+ firstH X * firstR X B = firstR X B := by
58
+ have hstar : firstH X * star B = star B := by
59
+ apply fixed_left_of_modulus
60
+ simp only [star_star]
61
+ exact Her_fixed_left (firstH_fixes_V hX) hB
62
+ simp only [firstR, mul_smul_comm, ← mul_assoc, hstar]
63
+
64
+ lemma firstR_inner {X B C : A} (hmod : B * star C = B * star B)
65
+ (hDH : B * star B * firstH X = (1/2 : ℝ) • firstH X) :
66
+ star (firstR X B) * firstR X C = firstH X * firstH X := by
67
+ have hH : star (firstH X) = firstH X := (IsSelfAdjoint.of_nonneg (ramp_nonneg X (by norm_num : (3/32:ℝ) ≤ 1/8))).star_eq
68
+ simp only [firstR, star_smul, star_trivial, star_mul, hH, star_star,
69
+ smul_mul_smul]
70
+ rw [Real.mul_self_sqrt (by norm_num : (0:ℝ) ≤ 2)]
71
+ calc
72
+ (2:ℝ) • ((firstH X * B) * (star C * firstH X)) =
73
+ (2:ℝ) • (firstH X * ((B * star C) * firstH X)) := by congr 1; noncomm_ring
74
+ _ = firstH X * firstH X := by rw [hmod, hDH, mul_smul_comm, smul_smul]; norm_num
75
+
76
+ lemma firstR_orthogonal {X B C : A} (hcross : B * star C = 0) :
77
+ star (firstR X B) * firstR X C = 0 := by
78
+ simp only [firstR, star_smul, star_trivial, star_mul, star_star, smul_mul_smul]
79
+ calc
80
+ _ = (Real.sqrt 2 * Real.sqrt 2) • (star (firstH X) * (B * star C) * firstH X) := by
81
+ congr 1; noncomm_ring
82
+ _ = 0 := by rw [hcross, mul_zero, zero_mul, smul_zero]
83
+
84
+ end MainGap
85
+
86
+ namespace MainGap
87
+ variable {A : Type*} [CStarAlgebra A]
88
+ local instance scalingDefectOrder : PartialOrder A := CStarAlgebra.spectralOrder A
89
+ local instance scalingDefectStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
90
+
91
+ lemma ramp_projection {P : A} (hP : IsStarProjection P) {l u : ℝ} (hl : 0 ≤ l)
92
+ (hlu : l < u) (hu : u ≤ 1) : ramp P l u = P := by
93
+ conv_rhs => rw [← cfcₙ_id ℝ P hP.isSelfAdjoint]
94
+ apply cfcₙ_congr
95
+ intro t ht
96
+ rcases Set.mem_insert_iff.mp (hP.isIdempotentElem.quasispectrum_subset ℝ ht) with ht | ht
97
+ · subst t
98
+ exact rampFn_zero hl
99
+ · have ht : t = 1 := Set.mem_singleton_iff.mp ht
100
+ subst t
101
+ exact rampFn_one hlu hu
102
+
103
+ lemma cut_projection {P : A} (hP : IsStarProjection P) {l : ℝ} (hl : 0 ≤ l) (hl1 : l ≤ 1) :
104
+ cut P l = (1-l) • P := by
105
+ conv_rhs => rw [← cfcₙ_id ℝ P hP.isSelfAdjoint]
106
+ rw [← cfcₙ_smul (1-l) id P continuousOn_id rfl]
107
+ apply cfcₙ_congr
108
+ intro t ht
109
+ rcases Set.mem_insert_iff.mp (hP.isIdempotentElem.quasispectrum_subset ℝ ht) with ht | ht
110
+ · subst t
111
+ simp [max_eq_right (neg_nonpos.mpr hl)]
112
+ · have ht : t = 1 := Set.mem_singleton_iff.mp ht
113
+ subst t
114
+ simp [max_eq_left (sub_nonneg.mpr hl1)]
115
+
116
+ lemma scalingDefect_expansion {H r : A} (hH : IsSelfAdjoint H) (hnorm : ‖H‖ ≤ 1) :
117
+ scalingDefect H r = H*H-r*star r-r*scalingComplement H-scalingComplement H*star r := by
118
+ have hb := scalingComplement_mul_self hH hnorm
119
+ simp only [scalingDefect, scalingIsometry, star_add, scalingComplement_selfAdjoint H |>.star_eq,
120
+ add_mul, mul_add]
121
+ rw [hb]
122
+ noncomm_ring
123
+
124
+ lemma scalingDefect_compress {H K r : A} (hH : IsSelfAdjoint H) (hK : IsSelfAdjoint K)
125
+ (hnorm : ‖H‖ ≤ 1) (hKH : K*H=H) (hHr : H*r=r) (hrK : r*K=r) :
126
+ K * scalingDefect H r * K = scalingDefect H r := by
127
+ have hHK : H*K=H := by
128
+ simpa only [star_mul, hH.star_eq, hK.star_eq] using congrArg star hKH
129
+ have hKr : K*r=r := by rw [← hHr, ← mul_assoc, hKH]
130
+ have hsrK : star r*K=star r := by
131
+ simpa only [star_mul, hK.star_eq, star_star] using congrArg star hKr
132
+ have hKsr : K*star r=star r := by
133
+ simpa only [star_mul, hK.star_eq, star_star] using congrArg star hrK
134
+ have hcomm : Commute K H := (show K*H=H*K by rw [hKH,hHK])
135
+ have hbcomm : Commute K (scalingComplement H) := by
136
+ exact ((Commute.one_right K).sub_right (hcomm.mul_right hcomm)).symm.cfcₙ_nnreal NNReal.sqrt |>.symm
137
+ have hleft : K * scalingDefect H r = scalingDefect H r := by
138
+ rw [scalingDefect_expansion hH hnorm]
139
+ simp only [mul_sub, ← mul_assoc, hKH, hKr]
140
+ rw [hbcomm.eq, mul_assoc, hKsr]
141
+ have hright : scalingDefect H r * K = scalingDefect H r := by
142
+ simpa only [star_mul, hK.star_eq, show star (scalingDefect H r) = scalingDefect H r from
143
+ ((IsSelfAdjoint.one A).sub (IsSelfAdjoint.mul_star_self _)).star_eq] using congrArg star hleft
144
+ rw [hleft, hright]
145
+
146
+ end MainGap
147
+
148
+ namespace MainGap
149
+ variable {A : Type*} [CStarAlgebra A]
150
+ local instance fourFixedOrder : PartialOrder A := CStarAlgebra.spectralOrder A
151
+ local instance fourFixedStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
152
+
153
+ theorem four_fixed_impossible {X : A} (hX : 0 ≤ X) (B : Fin 4 → A)
154
+ (hV : firstV X ≠ 0)
155
+ (hD : B 0 * star (B 0) ≤ (1/2 : ℝ) • (1 : A))
156
+ (hmod : B 1 * star (B 1) = B 0 * star (B 0))
157
+ (hcross : B 0 * star (B 1) = 0)
158
+ (hHB₀ : firstH X * star (B 0) = star (B 0))
159
+ (hHB₁ : firstH X * star (B 1) = star (B 1))
160
+ (hU : firstU X (B 0) = 0)
161
+ (hD₃ : B 2 * star (B 2) ≤ (1/2 : ℝ) • (1 : A))
162
+ (hc₃ : star (B 2) * B 3 = 0)
163
+ (hm₃ : star (B 2) * B 2 = star (B 3) * B 3)
164
+ (hR : lastR X (B 0) (B 2) = 0)
165
+ (hs₃ : ramp (prospectiveDefect X (B 0)) 0 (1/2) * B 3 = B 3) : False := by
166
+ have hH : IsSelfAdjoint (firstH X) := .of_nonneg (ramp_nonneg X (by norm_num))
167
+ have hK : IsSelfAdjoint (firstK X) := .of_nonneg (ramp_nonneg X (by norm_num))
168
+ have hHnorm : ‖firstH X‖ ≤ 1 := norm_ramp_le_one _ (by norm_num)
169
+ have hHne : firstH X ≠ 0 := by
170
+ intro hz
171
+ apply hV
172
+ simpa only [hz, zero_mul] using (firstH_fixes_V hX).symm
173
+ have hDx : (B 0 * star (B 0)) * firstX X = (1/2 : ℝ) • firstX X :=
174
+ sandwich_zero_eigen (cut_nonneg X _) (mul_star_self_nonneg _) hD hU
175
+ have hDH : (B 0 * star (B 0)) * firstH X = (1/2 : ℝ) • firstH X :=
176
+ Her_eigen_left hDx (firstH_mem_firstX hX)
177
+ have hρ₀ : star (firstR X (B 0)) * firstR X (B 0) = firstH X * firstH X :=
178
+ firstR_inner rfl hDH
179
+ have hρ₁ : star (firstR X (B 1)) * firstR X (B 1) = firstH X * firstH X :=
180
+ firstR_inner rfl (hmod ▸ hDH)
181
+ have hρc : star (firstR X (B 0)) * firstR X (B 1) = 0 := firstR_orthogonal hcross
182
+ have hHr₀ : firstH X * firstR X (B 0) = firstR X (B 0) := by
183
+ simp only [firstR, mul_smul_comm, ← mul_assoc, hHB₀]
184
+ have hHr₁ : firstH X * firstR X (B 1) = firstR X (B 1) := by
185
+ simp only [firstR, mul_smul_comm, ← mul_assoc, hHB₁]
186
+ let P := scalingDefect (firstH X) (firstR X (B 0))
187
+ have hP : IsStarProjection P := scalingDefect_projection hH hHnorm hHr₀ hρ₀
188
+ have hPne : P ≠ 0 := scalingDefect_ne_zero hH hHnorm hHne hHr₁ hρc hρ₁
189
+ have hKH : firstK X * firstH X = firstH X := firstK_fixes_H hX
190
+ have hHK : firstH X * firstK X = firstH X := by
191
+ simpa only [star_mul, hK.star_eq, hH.star_eq] using congrArg star hKH
192
+ have hrK : firstR X (B 0) * firstK X = firstR X (B 0) := by
193
+ simp only [firstR, smul_mul_assoc, mul_assoc, hHK]
194
+ have hP₀ : prospectiveDefect X (B 0) = P := by
195
+ change ramp (firstK X * P * firstK X) 0 1 = P
196
+ rw [scalingDefect_compress hH hK hHnorm hKH hHr₀ hrK]
197
+ exact ramp_projection hP (by norm_num) (by norm_num) le_rfl
198
+ have hx' : lastX X (B 0) = (1/2 : ℝ) • P := by
199
+ simp only [lastX, hP₀, cut_projection hP (by norm_num : (0:ℝ) ≤ 1/2)
200
+ (by norm_num : (1/2:ℝ) ≤ 1)]
201
+ norm_num
202
+ have hD₃x : (B 2 * star (B 2)) * lastX X (B 0) = (1/2 : ℝ) • lastX X (B 0) :=
203
+ sandwich_zero_eigen (lastX_nonneg X _) (mul_star_self_nonneg _) hD₃ hR
204
+ have hD₃P : (B 2 * star (B 2)) * P = (1/2 : ℝ) • P := by
205
+ rw [hx', mul_smul_comm, smul_comm] at hD₃x
206
+ exact (smul_right_injective A (by norm_num : (1/2 : ℝ) ≠ 0)) hD₃x
207
+ have hPB : P * B 3 = B 3 := by
208
+ rw [hP₀, ramp_projection hP (by norm_num) (by norm_num) (by norm_num)] at hs₃
209
+ exact hs₃
210
+ exact hPne (last_pair_kills_defect (by norm_num : (1/2 : ℝ) ≠ 0) hPB hc₃ hm₃ hD₃P)
211
+
212
+ end MainGap
213
+
214
+ namespace MainGap
215
+ variable {A D : Type*} [CStarAlgebra A] [CStarAlgebra D]
216
+ local instance defectSandwichOrder : PartialOrder A := CStarAlgebra.spectralOrder A
217
+ local instance defectSandwichStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
218
+ local instance representedDefectOrder : PartialOrder D := CStarAlgebra.spectralOrder D
219
+ local instance representedDefectStarOrder : StarOrderedRing D := CStarAlgebra.spectralOrderedRing D
220
+
221
+ lemma firstSandwich_single_le {U V w : A} (hV : 0 ≤ V) (η : ℝ) {E : Finset A}
222
+ (hw : w ∈ E) :
223
+ (cut U η * w * CFC.sqrt V) * star (cut U η * w * CFC.sqrt V) ≤
224
+ firstSandwich U V η E := by
225
+ have hsum : w * V * star w ≤ ∑ v ∈ E, v * V * star v :=
226
+ Finset.single_le_sum (fun v _ => star_right_conjugate_nonneg hV v) hw
227
+ have h := conjugate_le_conjugate_of_nonneg hsum (cut_nonneg U η)
228
+ have heq : (cut U η * w * CFC.sqrt V) * star (cut U η * w * CFC.sqrt V) =
229
+ cut U η * (w * V * star w) * cut U η := by
230
+ simp only [star_mul, IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg V) |>.star_eq,
231
+ IsSelfAdjoint.of_nonneg (cut_nonneg U η) |>.star_eq]
232
+ calc
233
+ _ = cut U η * w * (CFC.sqrt V * CFC.sqrt V) * star w * cut U η := by noncomm_ring
234
+ _ = _ := by rw [CFC.sqrt_mul_sqrt_self V hV]; noncomm_ring
235
+ rw [heq]
236
+ exact h
237
+
238
+ lemma represented_single_sq_le (π : A →⋆ₐ[ℂ] D) {U V w : A} (hV : 0 ≤ V)
239
+ (η : ℝ) {E : Finset A} (hw : w ∈ E) :
240
+ ‖π (cut U η * w * CFC.sqrt V)‖ ^ 2 ≤ ‖π (firstSandwich U V η E)‖ := by
241
+ have h := OrderHomClass.mono π (firstSandwich_single_le (U := U) hV η hw)
242
+ rw [map_mul, map_star] at h
243
+ simpa only [CStarRing.norm_self_mul_star, sq] using
244
+ CStarAlgebra.norm_le_norm_of_le_of_nonneg h (mul_star_self_nonneg _)
245
+
246
+ lemma represented_mixed_estimate (π : A →⋆ₐ[ℂ] D) {U V w : A} (hU : 0 ≤ U) (hV : 0 ≤ V)
247
+ {η : ℝ} (hη : 0 < η) {E : Finset A} (hw : w ∈ E)
248
+ (hD : ‖π (firstSandwich U V η E)‖ ≤ 2*η) :
249
+ ‖π (U*w*V)‖ ≤ Real.sqrt (2*η) * ‖CFC.sqrt V‖ + η*‖w‖*‖V‖ := by
250
+ have hr : ‖π (cut U η * w * CFC.sqrt V)‖ ≤ Real.sqrt (2*η) := by
251
+ exact (Real.le_sqrt (norm_nonneg _) (by positivity)).mpr
252
+ ((represented_single_sq_le π hV η hw).trans hD)
253
+ have hsplit : U*w*V = (cut U η * w * CFC.sqrt V) * CFC.sqrt V +
254
+ (U-cut U η)*w*V := by
255
+ rw [mul_assoc (cut U η * w), CFC.sqrt_mul_sqrt_self V hV]
256
+ noncomm_ring
257
+ rw [hsplit, map_add]
258
+ apply norm_add_le _ _ |>.trans
259
+ apply add_le_add
260
+ · rw [map_mul]
261
+ exact (norm_mul_le _ _).trans (mul_le_mul hr (NonUnitalStarAlgHom.norm_apply_le π _) (norm_nonneg _) (by positivity))
262
+ · rw [map_mul, map_mul]
263
+ calc
264
+ ‖(π (U-cut U η) * π w) * π V‖ ≤ ‖π (U-cut U η)‖ * ‖π w‖ * ‖π V‖ :=
265
+ (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _))
266
+ _ ≤ η*‖w‖*‖V‖ := mul_le_mul
267
+ (mul_le_mul ((NonUnitalStarAlgHom.norm_apply_le π _).trans (norm_sub_cut_le hU hη.le))
268
+ (NonUnitalStarAlgHom.norm_apply_le π w) (norm_nonneg _) hη.le)
269
+ (NonUnitalStarAlgHom.norm_apply_le π V) (norm_nonneg _) (by positivity)
270
+
271
+ end MainGap
272
+
273
+ end
274
+
275
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Diagonalization.lean ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Signal
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance boundedDiagonalizationPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance boundedDiagonalizationStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ theorem bounded_diagonalization (hP : PropertyP A) {a b : A} (ha : 0 ≤ a) (hb : 0 ≤ b)
15
+ (han : ‖a‖ ≤ 1) (hbn : ‖b‖ ≤ 1) (c : A) {δ ρ ζ : ℝ}
16
+ (hδ : 0 < δ) (hδhalf : δ < 1/2) (hρ : 0 < ρ) (hρδ : ρ ≤ 2*δ) (hζ : 0 < ζ) :
17
+ ∃ s t : A, ‖star s*a*s-a‖ < 2*δ+ρ ∧ ‖star t*b*t-b‖ < 2*δ+ρ ∧
18
+ ‖star s*c*t‖ < ζ ∧ ‖s‖ ≤ Real.sqrt δ⁻¹ ∧ ‖t‖ ≤ Real.sqrt δ⁻¹ := by
19
+ let M := max 1 ‖c‖
20
+ have hM1 : 1 ≤ M := le_max_left _ _
21
+ have hM : 0 < M := lt_of_lt_of_le zero_lt_one hM1
22
+ have hcn : ‖M⁻¹ • c‖ ≤ 1 := by
23
+ rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hM)]
24
+ calc M⁻¹ * ‖c‖ ≤ M⁻¹ * M := mul_le_mul_of_nonneg_left (le_max_right _ _) (inv_nonneg.mpr hM.le)
25
+ _ = 1 := inv_mul_cancel₀ hM.ne'
26
+ obtain ⟨p,q,κ,hp0,hpn,hpH,hq0,hqn,hqH,hκ0,hκζ,hcomp,hps,hqs⟩ :=
27
+ iterated_separation hP (ramp_nonneg a (by linarith : δ ≤ 2*δ))
28
+ (norm_ramp_le_one a (by linarith : δ ≤ 2*δ))
29
+ (ramp_nonneg b (by linarith : δ ≤ 2*δ))
30
+ (norm_ramp_le_one b (by linarith : δ ≤ 2*δ)) hcn
31
+ (by positivity : 0 < δ*ζ/M)
32
+ obtain ⟨w,hw,hsn⟩ := signal_coefficient hP ha han hδ hδhalf hρ hρδ hpH hps
33
+ obtain ⟨z,hz,htn⟩ := signal_coefficient hP hb hbn hδ hδhalf hρ hρδ hqH hqs
34
+ refine ⟨p*w,q*z,hw,hz,?_,hsn,htn⟩
35
+ have hc : HerCompression p q c (M*κ) := by
36
+ intro x hx y hy
37
+ have hh := hcomp x hx y hy
38
+ rw [mul_smul_comm, smul_mul_assoc, norm_smul, Real.norm_eq_abs,
39
+ abs_of_pos (inv_pos.mpr hM)] at hh
40
+ have hh' := mul_le_mul_of_nonneg_left hh hM.le
41
+ calc ‖x*c*y‖ = M * (M⁻¹ * ‖x*c*y‖) := by rw [← mul_assoc, mul_inv_cancel₀ hM.ne', one_mul]
42
+ _ ≤ M*(κ*‖x‖*‖y‖) := hh'
43
+ _ = (M*κ)*‖x‖*‖y‖ := by ring
44
+ have hprod : ‖p*w‖*‖q*z‖ ≤ δ⁻¹ := by
45
+ calc ‖p*w‖*‖q*z‖ ≤ Real.sqrt δ⁻¹ * Real.sqrt δ⁻¹ :=
46
+ mul_le_mul hsn htn (norm_nonneg _) (Real.sqrt_nonneg _)
47
+ _ = δ⁻¹ := Real.mul_self_sqrt (inv_nonneg.mpr hδ.le)
48
+ calc
49
+ ‖star (p*w)*c*(q*z)‖ ≤ (M*κ)*‖p*w‖*‖q*z‖ :=
50
+ HerCompression.right_products (mul_nonneg hM.le hκ0) hp0 hq0 hc w z
51
+ _ = (M*κ)*(‖p*w‖*‖q*z‖) := by ring
52
+ _ ≤ (M*κ)*δ⁻¹ := mul_le_mul_of_nonneg_left hprod (mul_nonneg hM.le hκ0)
53
+ _ < ζ := by
54
+ rw [← div_eq_mul_inv]
55
+ apply (div_lt_iff₀ hδ).mpr
56
+ have hh := (lt_div_iff₀ hM).mp hκζ
57
+ nlinarith
58
+
59
+ end MainGap
60
+
61
+ namespace MainGap
62
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
63
+ local instance diagonalizationPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
64
+ local instance diagonalizationStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
65
+
66
+ theorem individual_to_strong (hP : PropertyP A) : UnrestrictedDiagonalization A := by
67
+ intro a b ha hb c ε hε
68
+ let M := max 1 (max ‖a‖ ‖b‖)
69
+ have hM1 : 1 ≤ M := le_max_left _ _
70
+ have hM : 0 < M := lt_of_lt_of_le zero_lt_one hM1
71
+ have haM : ‖a‖ ≤ M := (le_max_left _ _).trans (le_max_right _ _)
72
+ have hbM : ‖b‖ ≤ M := (le_max_right _ _).trans (le_max_right _ _)
73
+ let δ := min (1/4 : ℝ) (ε/(8*M))
74
+ have hδ : 0 < δ := lt_min (by norm_num) (div_pos hε (mul_pos (by norm_num) hM))
75
+ have hδhalf : δ < 1/2 := (min_le_left _ _).trans_lt (by norm_num)
76
+ have hsmall : M*(2*δ+δ) < ε := by
77
+ have hh : δ ≤ ε/(8*M) := min_le_right _ _
78
+ have hh' := (le_div_iff₀ (by positivity : 0 < 8*M)).mp hh
79
+ nlinarith
80
+ have hn {x : A} (hx : ‖x‖ ≤ M) : ‖M⁻¹ • x‖ ≤ 1 := by
81
+ rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hM)]
82
+ calc M⁻¹*‖x‖ ≤ M⁻¹*M := mul_le_mul_of_nonneg_left hx (inv_nonneg.mpr hM.le)
83
+ _ = 1 := inv_mul_cancel₀ hM.ne'
84
+ obtain ⟨s,t,hs,ht,hc,hsn,htn⟩ := bounded_diagonalization hP
85
+ (smul_nonneg (inv_nonneg.mpr hM.le) ha) (smul_nonneg (inv_nonneg.mpr hM.le) hb)
86
+ (hn haM) (hn hbM) c hδ hδhalf hδ (by linarith : δ ≤ 2*δ) hε
87
+ have hscale (x r : A) : M • (star r*(M⁻¹ • x)*r-(M⁻¹ • x)) = star r*x*r-x := by
88
+ simp only [mul_smul_comm, smul_mul_assoc, smul_sub, smul_smul,
89
+ mul_inv_cancel₀ hM.ne', one_smul]
90
+ refine ⟨s,t,?_,?_,hc⟩
91
+ · rw [← hscale a s, norm_smul, Real.norm_eq_abs, abs_of_pos hM]
92
+ exact (mul_lt_mul_of_pos_left hs hM).trans hsmall
93
+ · rw [← hscale b t, norm_smul, Real.norm_eq_abs, abs_of_pos hM]
94
+ exact (mul_lt_mul_of_pos_left ht hM).trans hsmall
95
+
96
+ theorem individual_to_strong_spi (hP : PropertyP A) : StronglyPurelyInfinite A := by
97
+ intro x y hx hy ε hε
98
+ exact individual_to_strong hP (x*x) (y*y)
99
+ (by simpa only [hx.isSelfAdjoint.star_eq] using star_mul_self_nonneg x)
100
+ (by simpa only [hy.isSelfAdjoint.star_eq] using star_mul_self_nonneg y) (x*y) ε hε
101
+
102
+ end MainGap
103
+
104
+ end
105
+
106
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/FourChoices.lean ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.ChoicePairs
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [CStarAlgebra A]
11
+ local instance fourChoicesPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance fourChoicesStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ theorem finite_four_choices {X : A} (hX : 0 ≤ X) (B : Fin 4 → A)
15
+ (hp : ∀ z : A, 0 ≤ z → z ∈ fourHer X → ProperlyInfinite z)
16
+ (E : Finset A) {η : ℝ} (hη : 0 < η) :
17
+ ∃ T : Fin 4 → A,
18
+ (∀ i, ‖T i‖ ≤ 1) ∧ (∀ i, T i ∈ fourHer X) ∧
19
+ T 0 * star (T 0) = ramp (firstSandwich (firstU X (B 0)) (firstV X) η E) η (2*η) ∧
20
+ T 1 * star (T 1) = T 0 * star (T 0) ∧ T 0 * star (T 1) = 0 ∧
21
+ star (T 0) * T 0 ∈ Her (firstV X) ∧ star (T 1) * T 1 ∈ Her (firstV X) ∧
22
+ star (T 2) * T 3 = 0 ∧ star (T 2) * T 2 = star (T 3) * T 3 ∧
23
+ T 2 * star (T 2) ∈ Her (cut (lastR X (B 0) (B 2)) η) ∧
24
+ T 3 * star (T 3) ∈ Her (cut (lastR X (B 0) (B 2)) η) ∧
25
+ (∀ {D : Type*} [NonUnitalCStarAlgebra D] (π : A →⋆ₙₐ[ℂ] D),
26
+ 4*η ≤ ‖π (lastR X (B 0) (B 2))‖ → ‖π (T 2)‖ = 1) := by
27
+ let U := firstU X (B 0)
28
+ let V := firstV X
29
+ let R := lastR X (B 0) (B 2)
30
+ let D₀ := firstSandwich U V η E
31
+ have hV : 0 ≤ V := cut_nonneg X _
32
+ have hVk : V ∈ fourHer X := firstV_mem hX
33
+ have hDk : D₀ ∈ fourHer X := Her_mono_of_mem (firstU_mem hX (B 0))
34
+ (Her_mono_of_mem (cut_mem_Her (firstU_nonneg X (B 0)) η) (firstSandwich_mem U V η E))
35
+ obtain ⟨T₀, hT₀norm, hT₀mem, hT₀mod, hT₀outer⟩ :=
36
+ first_pair_choice (firstSandwich_nonneg hV η E) hV
37
+ (firstSandwich_two_cuntzLE (hp V hV hVk) η E) hDk hVk hη
38
+ obtain ⟨T₂, hT₂norm, hT₂mem, hT₂mod, hT₂outer, hT₂rep⟩ :=
39
+ last_pair_choice (lastR_nonneg X (B 0) (B 2)) (lastR_mem hX _ _) hη
40
+ (hp (cut R η) (cut_nonneg R η)
41
+ (Her_mono_of_mem (lastR_mem hX _ _) (cut_mem_Her (lastR_nonneg X (B 0) (B 2)) η)))
42
+ refine ⟨![T₀ 0, T₀ 1, T₂ 0, T₂ 1], ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩
43
+ · intro i; fin_cases i <;> first | exact hT₀norm _ | exact hT₂norm _
44
+ · intro i; fin_cases i <;> first | exact hT₀mem _ | exact hT₂mem _
45
+ · simpa using hT₀mod 0 0
46
+ · simpa using (hT₀mod 1 1).trans (hT₀mod 0 0).symm
47
+ · simpa using hT₀mod 0 1
48
+ · exact hT₀outer 0 0
49
+ · exact hT₀outer 1 1
50
+ · simpa using hT₂mod 0 1
51
+ · simpa using (hT₂mod 0 0).trans (hT₂mod 1 1).symm
52
+ · exact hT₂outer 0 0
53
+ · exact hT₂outer 1 1
54
+ · intro D _ π hR
55
+ exact hT₂rep π hR 0
56
+
57
+ end MainGap
58
+
59
+ namespace MainGap
60
+ variable {A D : Type*} [CStarAlgebra A] [CStarAlgebra D]
61
+ local instance fourChoicesMapDomainOrder : PartialOrder A := CStarAlgebra.spectralOrder A
62
+ local instance fourChoicesMapDomainStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
63
+ local instance fourChoicesMapCodomainOrder : PartialOrder D := CStarAlgebra.spectralOrder D
64
+ local instance fourChoicesMapCodomainStarOrder : StarOrderedRing D := CStarAlgebra.spectralOrderedRing D
65
+ variable (π : A →⋆ₐ[ℂ] D)
66
+
67
+ lemma map_cut_sa {a : A} (ha : IsSelfAdjoint a) {l : ℝ} (hl : 0 ≤ l) :
68
+ π (cut a l) = cut (π a) l :=
69
+ π.toNonUnitalStarAlgHom.map_cfcₙ (fun t : ℝ => max (t-l) 0) a
70
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
71
+ (by simp [max_eq_right (neg_nonpos.mpr hl)]) (map_continuous π) ha (ha.map π)
72
+
73
+ lemma map_ramp_sa {a : A} (ha : IsSelfAdjoint a) {l u : ℝ} (hl : 0 ≤ l) :
74
+ π (ramp a l u) = ramp (π a) l u :=
75
+ π.toNonUnitalStarAlgHom.map_cfcₙ (rampFn l u) a
76
+ (continuous_rampFn l u).continuousOn (rampFn_zero hl)
77
+ (map_continuous π) ha (ha.map π)
78
+
79
+ lemma map_deficiency {d : A} (hd : IsSelfAdjoint d) :
80
+ π (deficiency d) = deficiency (π d) :=
81
+ π.map_cfc (fun t : ℝ => max (1/2-t) 0) d
82
+ ((continuous_const.sub continuous_id).max continuous_const).continuousOn
83
+ (map_continuous π) hd (hd.map π)
84
+
85
+ lemma map_sqrt {a : A} (ha : 0 ≤ a) : π (CFC.sqrt a) = CFC.sqrt (π a) :=
86
+ π.toNonUnitalStarAlgHom.map_cfcₙ NNReal.sqrt a (by fun_prop) (by simp)
87
+ (map_continuous π) ha (map_nonneg π ha)
88
+
89
+ lemma map_firstX {X : A} (hX : IsSelfAdjoint X) : π (firstX X) = firstX (π X) :=
90
+ map_cut_sa π hX (by norm_num)
91
+ lemma map_firstV {X : A} (hX : IsSelfAdjoint X) : π (firstV X) = firstV (π X) :=
92
+ map_cut_sa π hX (by norm_num)
93
+ lemma map_firstH {X : A} (hX : IsSelfAdjoint X) : π (firstH X) = firstH (π X) :=
94
+ map_ramp_sa π hX (by norm_num)
95
+ lemma map_firstK {X : A} (hX : IsSelfAdjoint X) : π (firstK X) = firstK (π X) :=
96
+ map_ramp_sa π hX (by norm_num)
97
+
98
+ lemma map_firstU {X : A} (hX : IsSelfAdjoint X) (B : A) :
99
+ π (firstU X B) = firstU (π X) (π B) := by
100
+ simp only [firstU, map_mul, map_firstX π hX,
101
+ map_deficiency π (.mul_star_self B), map_star]
102
+
103
+ lemma map_firstR {X : A} (hX : IsSelfAdjoint X) (B : A) :
104
+ π (firstR X B) = firstR (π X) (π B) := by
105
+ change π ((Real.sqrt 2) • (star B * firstH X)) = _
106
+ calc
107
+ π ((Real.sqrt 2) • (star B * firstH X)) = (Real.sqrt 2) • π (star B * firstH X) :=
108
+ π.toAlgHom.map_smul_of_tower _ _
109
+ _ = firstR (π X) (π B) := by simp only [firstR, map_mul, map_star, map_firstH π hX]
110
+
111
+ lemma map_scalingComplement {H : A} (hH : IsSelfAdjoint H) (hn : ‖H‖ ≤ 1) :
112
+ π (scalingComplement H) = scalingComplement (π H) := by
113
+ simp only [scalingComplement, map_sqrt π (complement_nonneg hH hn), map_sub, map_one, map_mul]
114
+
115
+ lemma map_scalingDefect {H : A} (hH : IsSelfAdjoint H) (hn : ‖H‖ ≤ 1) (r : A) :
116
+ π (scalingDefect H r) = scalingDefect (π H) (π r) := by
117
+ simp only [scalingDefect, scalingIsometry, map_sub, map_mul, map_star, map_one, map_add,
118
+ map_scalingComplement π hH hn]
119
+
120
+ lemma scalingDefect_selfAdjoint (H r : A) : IsSelfAdjoint (scalingDefect H r) :=
121
+ (IsSelfAdjoint.one A).sub (.mul_star_self _)
122
+
123
+ lemma prospective_input_selfAdjoint (X B : A) :
124
+ IsSelfAdjoint (firstK X * scalingDefect (firstH X) (firstR X B) * firstK X) := by
125
+ have hK : IsSelfAdjoint (firstK X) := .of_nonneg (ramp_nonneg X (by norm_num))
126
+ rw [isSelfAdjoint_iff]
127
+ simp only [star_mul, hK.star_eq, scalingDefect_selfAdjoint _ _ |>.star_eq, mul_assoc]
128
+
129
+ lemma map_prospectiveDefect {X : A} (hX : IsSelfAdjoint X) (B : A) :
130
+ π (prospectiveDefect X B) = prospectiveDefect (π X) (π B) := by
131
+ have hH : IsSelfAdjoint (firstH X) := .of_nonneg (ramp_nonneg X (by norm_num))
132
+ have hn : ‖firstH X‖ ≤ 1 := norm_ramp_le_one _ (by norm_num)
133
+ simp only [prospectiveDefect, map_ramp_sa π (prospective_input_selfAdjoint X B) le_rfl,
134
+ map_mul, map_firstK π hX, map_scalingDefect π hH hn, map_firstH π hX,
135
+ map_firstR π hX]
136
+
137
+ lemma map_lastX {X : A} (hX : IsSelfAdjoint X) (B : A) :
138
+ π (lastX X B) = lastX (π X) (π B) := by
139
+ have hp : IsSelfAdjoint (prospectiveDefect X B) := .of_nonneg (ramp_nonneg _ (by norm_num))
140
+ rw [lastX, map_cut_sa π hp (by norm_num), map_prospectiveDefect π hX]
141
+ rfl
142
+
143
+ lemma map_lastR {X : A} (hX : IsSelfAdjoint X) (B C : A) :
144
+ π (lastR X B C) = lastR (π X) (π B) (π C) := by
145
+ simp only [lastR, map_mul, map_lastX π hX,
146
+ map_deficiency π (.mul_star_self C), map_star]
147
+
148
+ end MainGap
149
+
150
+ namespace MainGap
151
+ variable {A : Type*} [CStarAlgebra A]
152
+ local instance fourChoiceStructureOrder : PartialOrder A := CStarAlgebra.spectralOrder A
153
+ local instance fourChoiceStructureStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
154
+
155
+ universe v
156
+
157
+ structure FourChoice (X : A) (B : Fin 4 → A) (E : Finset A) (η : ℝ) where
158
+ T : Fin 4 → A
159
+ contractive : ∀ i, ‖T i‖ ≤ 1
160
+ mem : ∀ i, T i ∈ fourHer X
161
+ first_mod : T 0 * star (T 0) = ramp (firstSandwich (firstU X (B 0)) (firstV X) η E) η (2*η)
162
+ first_equal : T 1 * star (T 1) = T 0 * star (T 0)
163
+ first_cross : T 0 * star (T 1) = 0
164
+ outer₀ : star (T 0) * T 0 ∈ Her (firstV X)
165
+ outer₁ : star (T 1) * T 1 ∈ Her (firstV X)
166
+ last_cross : star (T 2) * T 3 = 0
167
+ last_equal : star (T 2) * T 2 = star (T 3) * T 3
168
+ outer₂ : T 2 * star (T 2) ∈ Her (cut (lastR X (B 0) (B 2)) η)
169
+ outer₃ : T 3 * star (T 3) ∈ Her (cut (lastR X (B 0) (B 2)) η)
170
+ last_norm : ∀ {D : Type v} [NonUnitalCStarAlgebra D] (π : A →⋆ₙₐ[ℂ] D),
171
+ 4*η ≤ ‖π (lastR X (B 0) (B 2))‖ → ‖π (T 2)‖ = 1
172
+
173
+ theorem fourChoice_nonempty {X : A} (hX : 0 ≤ X) (B : Fin 4 → A)
174
+ (hp : ∀ z : A, 0 ≤ z → z ∈ fourHer X → ProperlyInfinite z)
175
+ (E : Finset A) {η : ℝ} (hη : 0 < η) : Nonempty (FourChoice.{v, _} X B E η) := by
176
+ obtain ⟨T, h₁, h₂, h₃, h₄, h₅, h₆, h₇, h₈, h₉, h₁₀, h₁₁, h₁₂⟩ :=
177
+ finite_four_choices hX B hp E hη
178
+ exact ⟨⟨T, h₁, h₂, h₃, h₄, h₅, h₆, h₇, h₈, h₉, h₁₀, h₁₁, h₁₂⟩⟩
179
+
180
+ lemma firstH_fixes_V {X : A} (hX : 0 ≤ X) : firstH X * firstV X = firstV X :=
181
+ ramp_mul_cut hX (by norm_num) (by norm_num) le_rfl
182
+
183
+ namespace FourChoice
184
+ variable {X : A} {B : Fin 4 → A} {E : Finset A} {η : ℝ} (F : FourChoice.{v, _} X B E η)
185
+
186
+ lemma first_mem (hη : 0 < η) :
187
+ F.T 0 * star (F.T 0) ∈ Her (cut (firstU X (B 0)) η) := by
188
+ rw [F.first_mod]
189
+ exact Her_mono_of_mem (firstSandwich_mem _ _ η E)
190
+ (Her_mono_of_mem (cut_mem_Her (firstSandwich_nonneg (cut_nonneg X _) η E) η)
191
+ (ramp_mem_Her_cut (firstSandwich_nonneg (cut_nonneg X _) η E) hη.le))
192
+
193
+ lemma first_support₀ (hX : 0 ≤ X) : firstH X * star (F.T 0) = star (F.T 0) := by
194
+ apply fixed_left_of_modulus
195
+ simp only [star_star]
196
+ exact Her_fixed_left (firstH_fixes_V hX) F.outer₀
197
+
198
+ lemma first_support₁ (hX : 0 ≤ X) : firstH X * star (F.T 1) = star (F.T 1) := by
199
+ apply fixed_left_of_modulus
200
+ simp only [star_star]
201
+ exact Her_fixed_left (firstH_fixes_V hX) F.outer₁
202
+
203
+ lemma last_support : ramp (prospectiveDefect X (B 0)) 0 (1/2) * F.T 3 = F.T 3 := by
204
+ apply fixed_left_of_modulus
205
+ apply Her_fixed_left (ramp_mul_cut (prospectiveDefect_nonneg X _)
206
+ le_rfl (by norm_num : (0:ℝ) < 1/2) le_rfl)
207
+ exact Her_mono_of_mem (squareSandwich_mem (.of_nonneg (lastX_nonneg X _)) _)
208
+ (Her_mono_of_mem (cut_mem_Her (lastR_nonneg X _ _) η) F.outer₃)
209
+
210
+ variable {D : Type v} [CStarAlgebra D]
211
+ local instance fourChoiceRepresentationOrder : PartialOrder D := CStarAlgebra.spectralOrder D
212
+ local instance fourChoiceRepresentationStarOrder : StarOrderedRing D :=
213
+ CStarAlgebra.spectralOrderedRing D
214
+ variable (π : A →⋆ₐ[ℂ] D) (hX : 0 ≤ X) (hη : 0 < η)
215
+ (hmatch : ∀ i, π (F.T i) = π (B i))
216
+
217
+ include F hX hη hmatch in
218
+ lemma first_bound : π (B 0) * star (π (B 0)) ≤ (1/2 : ℝ) • (1 : D) := by
219
+ have hm := Her_map π.toNonUnitalStarAlgHom (F.first_mem hη)
220
+ change π (F.T 0 * star (F.T 0)) ∈ Her (π (cut (firstU X (B 0)) η)) at hm
221
+ simp only [map_mul, map_star, hmatch] at hm
222
+ rw [map_cut_sa π (.of_nonneg (firstU_nonneg X (B 0))) hη.le,
223
+ map_firstU π (.of_nonneg hX)] at hm
224
+ exact selfConsistent_cutoff_bound (cut_nonneg (π X) _)
225
+ (mul_star_self_nonneg _) hη (by norm_num) hm
226
+
227
+ include F hX hη hmatch in
228
+ lemma last_bound : π (B 2) * star (π (B 2)) ≤ (1/2 : ℝ) • (1 : D) := by
229
+ have hm := Her_map π.toNonUnitalStarAlgHom F.outer₂
230
+ change π (F.T 2 * star (F.T 2)) ∈ Her (π (cut (lastR X (B 0) (B 2)) η)) at hm
231
+ simp only [map_mul, map_star, hmatch] at hm
232
+ rw [map_cut_sa π (.of_nonneg (lastR_nonneg X (B 0) (B 2))) hη.le,
233
+ map_lastR π (.of_nonneg hX)] at hm
234
+ exact selfConsistent_cutoff_bound (lastX_nonneg (π X) _)
235
+ (mul_star_self_nonneg _) hη (by norm_num) hm
236
+
237
+ include F hX hη hmatch in
238
+ lemma first_norm : ‖π (firstSandwich (firstU X (B 0)) (firstV X) η E)‖ < 2*η := by
239
+ have hpos : 0 ≤ firstSandwich (firstU X (B 0)) (firstV X) η E :=
240
+ firstSandwich_nonneg (cut_nonneg X _) η E
241
+ have hmod := congrArg π F.first_mod
242
+ rw [map_mul, map_star, hmatch, map_ramp_sa π (.of_nonneg hpos) hη.le] at hmod
243
+ apply norm_ramp_bound (map_nonneg π hpos)
244
+ hη (by norm_num : (0:ℝ) ≤ 1/2) (by norm_num : (1/2:ℝ) < 1)
245
+ rw [← hmod]
246
+ exact F.first_bound π hX hη hmatch
247
+
248
+ include F hX hη hmatch in
249
+ lemma last_norm_lt : ‖π (lastR X (B 0) (B 2))‖ < 4*η := by
250
+ by_contra! hn
251
+ have hone : ‖π (B 2)‖ = 1 := by
252
+ have ht : ‖π (F.T 2)‖ = 1 := F.last_norm π.toNonUnitalStarAlgHom hn
253
+ rwa [hmatch] at ht
254
+ have hle : ‖π (B 2) * star (π (B 2))‖ ≤ 1/2 := by
255
+ apply (CStarAlgebra.norm_le_iff_le_algebraMap _ (by norm_num : (0:ℝ) ≤ 1/2)
256
+ (mul_star_self_nonneg _)).mpr
257
+ simpa only [Algebra.algebraMap_eq_smul_one] using F.last_bound π hX hη hmatch
258
+ rw [CStarRing.norm_self_mul_star, hone] at hle
259
+ norm_num at hle
260
+
261
+ end FourChoice
262
+ end MainGap
263
+
264
+ end
265
+
266
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Graph.lean ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Avoidance
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ namespace OrthogonalSlots
12
+ section GraphAlgebra
13
+ variable {n : ℕ} {h v : A} (S : OrthogonalSlots n h v)
14
+
15
+ def graphWord (R : Fin n → A) (hR : ∀ i (k : Her h), R i * (k : A) ∈ Her h)
16
+ (k : Her h) : A := ∑ i, S.carrier i ⟨R i * (k : A), hR i k⟩
17
+
18
+ lemma graphWord_inner (R : Fin n → A) (hR : ∀ i (k : Her h), R i * (k : A) ∈ Her h)
19
+ (k l : Her h) :
20
+ star (S.graphWord R hR k) * S.graphWord R hR l =
21
+ star (k : A) * (∑ i, star (R i) * R i) * (l : A) := by
22
+ classical
23
+ simp only [graphWord, star_sum, Finset.sum_mul, Finset.mul_sum, S.inner]
24
+ simp only [Finset.sum_ite_eq', Finset.mem_univ, ite_true]
25
+ simp only [star_mul, mul_assoc]
26
+
27
+ lemma graphWord_outer (R : Fin n → A) (hR : ∀ i (k : Her h), R i * (k : A) ∈ Her h)
28
+ (k l : Her h) : S.graphWord R hR k * star (S.graphWord R hR l) ∈ Her v := by
29
+ classical
30
+ simp only [graphWord, star_sum, Finset.sum_mul, Finset.mul_sum]
31
+ exact (Her v).sum_mem fun i _ => (Her v).sum_mem fun j _ => S.outer j i _ _
32
+
33
+ lemma slot_graphWord (R : Fin n → A) (hR : ∀ i (k : Her h), R i * (k : A) ∈ Her h)
34
+ (i : Fin n) (k l : Her h) :
35
+ star (S.carrier i k) * S.graphWord R hR l = star (k : A) * R i * (l : A) := by
36
+ classical
37
+ simp only [graphWord, Finset.mul_sum, S.inner]
38
+ simp [mul_assoc]
39
+
40
+ lemma graphWord_mul (R : Fin n → A) (hR : ∀ i (k : Her h), R i * (k : A) ∈ Her h)
41
+ (k l : Her h) : S.graphWord R hR (k*l) = S.graphWord R hR k * (l : A) := by
42
+ classical
43
+ simp only [graphWord, Finset.sum_mul]
44
+ apply Finset.sum_congr rfl
45
+ intro i hi
46
+ have he : (⟨R i * ((k*l : Her h) : A), hR i (k*l)⟩ : Her h) =
47
+ ⟨R i * (k : A), hR i k⟩ * l := by apply Subtype.ext; exact (mul_assoc _ _ _).symm
48
+ rw [he, S.mul]
49
+
50
+ end GraphAlgebra
51
+ end OrthogonalSlots
52
+
53
+ section UnitalGraph
54
+ variable {D : Type*} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
55
+
56
+ omit [PartialOrder D] [StarOrderedRing D] in
57
+ lemma cfc_mul_mem_Her {h q : D} (hq : q ∈ Her h) (hqa : IsSelfAdjoint q)
58
+ (f : ℝ → ℝ) (hf : Continuous f) {k : D} (hk : k ∈ Her h) :
59
+ cfc f q * k ∈ Her h := by
60
+ have hm : cfcₙ (fun x => f x - f 0) q ∈ Her h := cfcₙ_mem (𝕜' := ℂ) _ hq
61
+ have he : cfcₙ (fun x => f x - f 0) q = cfc f q - (f 0) • (1 : D) := by
62
+ rw [cfcₙ_eq_cfc (f := fun x => f x - f 0) (a := q) ((hf.sub continuous_const).continuousOn) (by simp),
63
+ cfc_sub f (fun _ => f 0) q hf.continuousOn continuous_const.continuousOn,
64
+ cfc_const _ q hqa, Algebra.algebraMap_eq_smul_one]
65
+ have he' : cfc f q = cfcₙ (fun x => f x - f 0) q + (f 0) • (1 : D) := by rw [he]; abel
66
+ rw [he', add_mul, smul_mul_assoc, one_mul]
67
+ exact (Her h).add_mem ((Her h).mul_mem hm hk) (real_smul_mem_Her hk _)
68
+
69
+ def graphComplement (S : Fin 4 → D) : D :=
70
+ cfc (fun t : ℝ => Real.sqrt ((15-t)/16)) (∑ i, star (S i)*S i)
71
+
72
+ lemma graphComplement_nonneg (S : Fin 4 → D) : 0 ≤ graphComplement S :=
73
+ cfc_nonneg fun _ _ => Real.sqrt_nonneg _
74
+
75
+ lemma graphComplement_mul_self (S : Fin 4 → D) (hS : ∀ i, ‖S i‖ ≤ 1) :
76
+ graphComplement S * graphComplement S =
77
+ (15/16 : ℝ) • (1 : D) - (1/16 : ℝ) • (∑ i, star (S i)*S i) := by
78
+ rcases subsingleton_or_nontrivial D with hD | hD
79
+ · exact Subsingleton.elim _ _
80
+ let q := ∑ i, star (S i)*S i
81
+ have hq : 0 ≤ q := Finset.sum_nonneg fun i _ => star_mul_self_nonneg _
82
+ have hn : ‖q‖ ≤ 4 := by
83
+ calc
84
+ ‖q‖ ≤ ∑ i, ‖star (S i)*S i‖ := norm_sum_le _ _
85
+ _ ≤ ∑ _i : Fin 4, (1 : ℝ) := by
86
+ apply Finset.sum_le_sum
87
+ intro i hi
88
+ rw [CStarRing.norm_star_mul_self]
89
+ simpa using mul_self_le_mul_self (norm_nonneg _) (hS i)
90
+ _ = 4 := by simp
91
+ have hc : Continuous (fun t : ℝ => Real.sqrt ((15-t)/16)) := by fun_prop
92
+ change cfc _ q * cfc _ q = _
93
+ rw [← cfc_mul _ _ q hc.continuousOn hc.continuousOn]
94
+ have he : cfc (fun t : ℝ => Real.sqrt ((15-t)/16) * Real.sqrt ((15-t)/16)) q =
95
+ cfc (fun t : ℝ => 15/16 - (1/16)*t) q := by
96
+ apply cfc_congr
97
+ intro t ht
98
+ have ht' : t ≤ 4 := (Real.le_norm_self t).trans ((spectrum.norm_le_norm_of_mem ht).trans hn)
99
+ dsimp only
100
+ rw [Real.mul_self_sqrt (by linarith : 0 ≤ (15-t)/16)]
101
+ ring
102
+ rw [he, cfc_sub (fun _ : ℝ => 15/16) (fun t : ℝ => (1/16)*t) q,
103
+ cfc_const _ q hq.isSelfAdjoint, cfc_const_mul (1/16 : ℝ) (fun t : ℝ => t) q,
104
+ cfc_id' ℝ q hq.isSelfAdjoint, Algebra.algebraMap_eq_smul_one]
105
+
106
+ lemma graphComplement_mul_mem {h : D} (S : Fin 4 → D) (hS : ∀ i, S i ∈ Her h)
107
+ {k : D} (hk : k ∈ Her h) : graphComplement S * k ∈ Her h := by
108
+ apply cfc_mul_mem_Her ?_ ?_ _ (by fun_prop) hk
109
+ · exact (Her h).sum_mem fun i _ => (Her h).mul_mem (StarMemClass.star_mem (s := Her h) (hS i)) (hS i)
110
+ · exact (Finset.sum_nonneg fun i _ => star_mul_self_nonneg (S i)).isSelfAdjoint
111
+
112
+ def graphCoeffs (T : Fin 4 → D) : Fin 6 → D :=
113
+ ![(1/4 : ℝ) • 1, (1/4 : ℝ) • T 0, (1/4 : ℝ) • T 1,
114
+ (1/4 : ℝ) • T 2, (1/4 : ℝ) • T 3, graphComplement T]
115
+
116
+ lemma graphCoeffs_inner (T : Fin 4 → D) (hT : ∀ i, ‖T i‖ ≤ 1) :
117
+ ∑ i, star (graphCoeffs T i) * graphCoeffs T i = 1 := by
118
+ classical
119
+ rw [Fin.sum_univ_six]
120
+ dsimp [graphCoeffs]
121
+ simp only [star_smul, star_trivial, star_one, smul_mul_assoc, mul_smul_comm,
122
+ smul_smul, one_mul]
123
+ rw [(graphComplement_nonneg T).isSelfAdjoint.star_eq,
124
+ graphComplement_mul_self T hT, Fin.sum_univ_four]
125
+ module
126
+
127
+ lemma graphCoeffs_mem {h : D} (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h)
128
+ (i : Fin 6) (k : Her h) : graphCoeffs T i * (k : D) ∈ Her h := by
129
+ fin_cases i <;> dsimp [graphCoeffs] <;> try simp only [smul_mul_assoc, one_mul]
130
+ · exact real_smul_mem_Her k.property _
131
+ · exact real_smul_mem_Her ((Her h).mul_mem (hT 0) k.property) _
132
+ · exact real_smul_mem_Her ((Her h).mul_mem (hT 1) k.property) _
133
+ · exact real_smul_mem_Her ((Her h).mul_mem (hT 2) k.property) _
134
+ · exact real_smul_mem_Her ((Her h).mul_mem (hT 3) k.property) _
135
+ · exact graphComplement_mul_mem T hT k.property
136
+
137
+ end UnitalGraph
138
+ lemma Her_fixed_right {h t : A} (hh : IsSelfAdjoint h) (ht : h * t = h)
139
+ {k : A} (hk : k ∈ Her h) : k * t = k := by
140
+ have he : star t * h = h := by
141
+ simpa only [star_mul, hh.star_eq] using congrArg star ht
142
+ have hs := Her_fixed_left he (StarMemClass.star_mem (s := Her h) hk)
143
+ simpa only [star_mul, star_star] using congrArg star hs
144
+
145
+ def graphInverseFn (t : ℝ) : ℝ := t / (max (1/32 : ℝ) t)^2
146
+
147
+ lemma continuous_graphInverseFn : Continuous graphInverseFn := by
148
+ apply Continuous.div continuous_id
149
+ (((continuous_const : Continuous (fun _ : ℝ => (1/32 : ℝ))).max continuous_id).pow 2)
150
+ intro t
151
+ exact pow_ne_zero _ (ne_of_gt (lt_of_lt_of_le (by norm_num : (0:ℝ)<1/32) (le_max_left _ _)))
152
+
153
+ lemma graphInverseFn_zero : graphInverseFn 0 = 0 := by simp [graphInverseFn]
154
+
155
+ def graphInverse (X : A) : A := cfcₙ graphInverseFn X
156
+
157
+ section InverseOrder
158
+ variable [PartialOrder A] [StarOrderedRing A]
159
+
160
+ omit [PartialOrder A] [StarOrderedRing A] in
161
+ lemma graphInverse_mem {h X : A} (hX : X ∈ Her h) : graphInverse X ∈ Her h :=
162
+ cfcₙ_mem (𝕜' := ℂ) _ hX
163
+
164
+ lemma cut_mul_graphInverse {X : A} (hX : 0 ≤ X) :
165
+ cut X (1/32) * (X * graphInverse X) = cut X (1/32) := by
166
+ have hc : Continuous (fun t : ℝ => max (t-1/32) 0) := by fun_prop
167
+ have h0 : (fun t : ℝ => max (t-1/32) 0) 0 = 0 := by norm_num
168
+ have he : X * graphInverse X = cfcₙ (fun t : ℝ => t * graphInverseFn t) X := by
169
+ simpa only [id_eq, cfcₙ_id' ℝ X hX.isSelfAdjoint, graphInverse] using
170
+ (cfcₙ_mul id graphInverseFn X continuousOn_id rfl
171
+ continuous_graphInverseFn.continuousOn graphInverseFn_zero).symm
172
+ rw [he, cut, ← cfcₙ_mul (fun t : ℝ => max (t-1/32) 0)
173
+ (fun t : ℝ => t * graphInverseFn t) X hc.continuousOn h0
174
+ (continuous_id.mul continuous_graphInverseFn).continuousOn (by simp)]
175
+ apply cfcₙ_congr
176
+ intro t ht
177
+ dsimp only
178
+ by_cases h : t ≤ 1/32
179
+ · rw [max_eq_right (sub_nonpos.mpr h), zero_mul]
180
+ · have ht0 : t ≠ 0 := ne_of_gt (lt_trans (by norm_num) (lt_of_not_ge h))
181
+ dsimp [graphInverseFn]
182
+ rw [max_eq_right (le_of_not_ge h)]
183
+ field_simp
184
+
185
+ lemma right_fixed_by_graphInverse {X S : A} (hX : 0 ≤ X)
186
+ (hS : S ∈ Her (cut X (1/32))) : S * (X * graphInverse X) = S :=
187
+ Her_fixed_right (cut_nonneg X (1/32)).isSelfAdjoint (cut_mul_graphInverse hX) hS
188
+
189
+ lemma map_graphInverse {B : Type*} [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B]
190
+ (π : A →⋆ₙₐ[ℂ] B) {X : A} (hX : 0 ≤ X) :
191
+ π (graphInverse X) = graphInverse (π X) :=
192
+ π.map_cfcₙ graphInverseFn X continuous_graphInverseFn.continuousOn graphInverseFn_zero
193
+ (map_continuous π) hX.isSelfAdjoint (map_nonneg π hX).isSelfAdjoint
194
+
195
+ end InverseOrder
196
+ section GraphDefect
197
+ variable {D : Type*} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
198
+
199
+ lemma positive_mul_zero_of_conjugate_zero {a x : D} (ha : 0 ≤ a)
200
+ (hz : star x * a * x = 0) : a * x = 0 := by
201
+ have hr : CFC.sqrt a * x = 0 := by
202
+ apply (CStarRing.star_mul_self_eq_zero_iff _).mp
203
+ calc
204
+ star (CFC.sqrt a * x) * (CFC.sqrt a * x) =
205
+ star x * (CFC.sqrt a * CFC.sqrt a) * x := by
206
+ simp only [star_mul, (CFC.sqrt_nonneg a).isSelfAdjoint.star_eq, mul_assoc]
207
+ _ = 0 := by rw [CFC.sqrt_mul_sqrt_self a ha, hz]
208
+ rw [← CFC.sqrt_mul_sqrt_self a ha, mul_assoc, hr, mul_zero]
209
+
210
+ lemma positive_fixed_of_square_fixed {p x : D} (hp : 0 ≤ p)
211
+ (he : p * p * x = x) : p * x = x := by
212
+ have hi : IsUnit ((1 : D) + p) := CStarAlgebra.isUnit_of_le 1 (le_add_of_nonneg_right hp)
213
+ apply hi.mul_left_cancel
214
+ simp only [add_mul, one_mul, ← mul_assoc, he]
215
+ exact add_comm _ _
216
+
217
+ lemma sqrt_fixed_of_fixed {p x : D} (hp : 0 ≤ p) (he : p*x=x) : CFC.sqrt p*x=x := by
218
+ apply positive_fixed_of_square_fixed (CFC.sqrt_nonneg _)
219
+ rwa [CFC.sqrt_mul_sqrt_self p hp]
220
+
221
+ lemma star_mul_le_one_of_norm_le_one {x : D} (hx : ‖x‖ ≤ 1) : star x * x ≤ 1 := by
222
+ apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ (star_mul_self_nonneg x)).mp
223
+ rw [CStarRing.norm_star_mul_self]
224
+ simpa using mul_self_le_mul_self (norm_nonneg _) hx
225
+
226
+ lemma graph_defect_forces {p c y : D} (hp : 0 ≤ p) (hpn : ‖p‖ ≤ 1)
227
+ (hcn : ‖c‖ ≤ 1) (hy : 0 ≤ y)
228
+ (hd : y * (1 - star c * (p*p) * c) * y = 0) :
229
+ p * (c*y) = c*y ∧ star c * c * y = y := by
230
+ have hp2 : 0 ≤ 1 - p*p := sub_nonneg.mpr (by
231
+ simpa only [hp.isSelfAdjoint.star_eq] using star_mul_le_one_of_norm_le_one hpn)
232
+ have hc2 : 0 ≤ 1 - star c*c := sub_nonneg.mpr (star_mul_le_one_of_norm_le_one hcn)
233
+ have h₁ : 0 ≤ y*(1-star c*c)*y := by
234
+ simpa only [hy.isSelfAdjoint.star_eq] using star_left_conjugate_nonneg hc2 y
235
+ have h₂ : 0 ≤ star (c*y)*(1-p*p)*(c*y) := star_left_conjugate_nonneg hp2 _
236
+ have he : y*(1-star c*c)*y + star (c*y)*(1-p*p)*(c*y) = 0 := by
237
+ calc
238
+ _ = y * (1 - star c * (p*p) * c) * y := by
239
+ simp only [star_mul, hy.isSelfAdjoint.star_eq]; noncomm_ring
240
+ _ = 0 := hd
241
+ have hz₁ : y*(1-star c*c)*y = 0 := le_antisymm ((le_add_of_nonneg_right h₂).trans_eq he) h₁
242
+ have hz₂ : star (c*y)*(1-p*p)*(c*y) = 0 := le_antisymm ((le_add_of_nonneg_left h₁).trans_eq he) h₂
243
+ have hcfix := positive_mul_zero_of_conjugate_zero hc2
244
+ (show star y*(1-star c*c)*y=0 by simpa only [hy.isSelfAdjoint.star_eq] using hz₁)
245
+ have hpfix := positive_mul_zero_of_conjugate_zero hp2 hz₂
246
+ have hec : star c*c*y=y := by
247
+ apply Eq.symm
248
+ apply sub_eq_zero.mp
249
+ simpa only [sub_mul, one_mul] using hcfix
250
+ have hep : p*p*(c*y)=c*y := by
251
+ apply Eq.symm
252
+ apply sub_eq_zero.mp
253
+ simpa only [sub_mul, one_mul] using hpfix
254
+ exact ⟨positive_fixed_of_square_fixed hp hep, hec⟩
255
+
256
+ lemma norm_conjugate_eq_of_isometric_on {c y : D} (hy : 0 ≤ y)
257
+ (hc : star c*c*y=y) : ‖c*y*star c‖=‖y‖ := by
258
+ have hs := Her_fixed_left hc (sqrt_mem_Her (self_mem_Her hy) hy)
259
+ have he : c*y*star c = (c*CFC.sqrt y)*star (c*CFC.sqrt y) := by
260
+ simp only [star_mul, (CFC.sqrt_nonneg y).isSelfAdjoint.star_eq]
261
+ rw [show c*y*star c = c * (CFC.sqrt y * CFC.sqrt y) * star c by rw [CFC.sqrt_mul_sqrt_self y hy]]
262
+ simp only [mul_assoc]
263
+ rw [he, CStarRing.norm_self_mul_star, ← CStarRing.norm_star_mul_self]
264
+ congr 1
265
+ calc
266
+ star (c*CFC.sqrt y)*(c*CFC.sqrt y) = CFC.sqrt y*(star c*c*CFC.sqrt y) := by
267
+ simp only [star_mul, (CFC.sqrt_nonneg y).isSelfAdjoint.star_eq, mul_assoc]
268
+ _ = y := by rw [hs, CFC.sqrt_mul_sqrt_self y hy]
269
+
270
+ end GraphDefect
271
+
272
+ section GraphConstruction
273
+ variable {D : Type*} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
274
+ variable {h a t : D} (V : OrthogonalSlots 6 h a) (ht : 0 ≤ t) (htH : t ∈ Her h)
275
+
276
+ def graphSlot (i : Fin 6) : D := V.carrier i ⟨t, htH⟩
277
+
278
+ def graphZ (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) : D :=
279
+ V.graphWord (graphCoeffs T) (graphCoeffs_mem T hT) ⟨CFC.sqrt t, sqrt_mem_Her htH ht⟩
280
+
281
+ def graphP (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) : D :=
282
+ graphZ V ht htH T hT * star (graphZ V ht htH T hT)
283
+
284
+ lemma graphZ_inner (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) (hn : ∀ i, ‖T i‖ ≤ 1) :
285
+ star (graphZ V ht htH T hT) * graphZ V ht htH T hT = t := by
286
+ rw [graphZ, V.graphWord_inner, graphCoeffs_inner T hn]
287
+ simpa only [mul_one, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq] using CFC.sqrt_mul_sqrt_self t ht
288
+
289
+ lemma graphP_nonneg (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) : 0 ≤ graphP V ht htH T hT :=
290
+ mul_star_self_nonneg _
291
+
292
+ lemma graphP_mem (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) : graphP V ht htH T hT ∈ Her a :=
293
+ V.graphWord_outer _ _ _ _
294
+
295
+ lemma graphP_represented_norm {E : Type*} [NonUnitalCStarAlgebra E]
296
+ (π : D →⋆ₙₐ[ℂ] E) (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) (hn : ∀ i, ‖T i‖ ≤ 1) :
297
+ ‖π (graphP V ht htH T hT)‖ = ‖π t‖ := by
298
+ rw [graphP, map_mul, map_star, CStarRing.norm_self_mul_star,
299
+ ← CStarRing.norm_star_mul_self, ← map_star, ← map_mul, graphZ_inner V ht htH T hT hn]
300
+
301
+ include ht in
302
+ lemma slot_sandwich_mem (i j : Fin 6) (F : D) :
303
+ star (graphSlot V htH i) * F * graphSlot V htH j ∈ Her h := by
304
+ let r : Her h := ⟨CFC.sqrt t, sqrt_mem_Her htH ht⟩
305
+ have he : (⟨t, htH⟩ : Her h) = r*r := by
306
+ apply Subtype.ext
307
+ exact (CFC.sqrt_mul_sqrt_self t ht).symm
308
+ have hWi : graphSlot V htH i = V.carrier i r * CFC.sqrt t := by rw [graphSlot, he, V.mul]
309
+ have hWj : graphSlot V htH j = V.carrier j r * CFC.sqrt t := by rw [graphSlot, he, V.mul]
310
+ rw [hWi, hWj, star_mul, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq]
311
+ have hm := Her_sandwich (sqrt_mem_Her htH ht) (star (V.carrier i r) * F * V.carrier j r)
312
+ simpa only [(CFC.sqrt_nonneg t).isSelfAdjoint.star_eq, mul_assoc] using hm
313
+
314
+ def graphX (F : D) : D := (16 : ℝ) • (star (graphSlot V htH 0) * F * graphSlot V htH 0)
315
+
316
+ def graphB (F : D) (i : Fin 4) : D := (16 : ℝ) •
317
+ (star (graphSlot V htH i.castSucc.succ) * F * graphSlot V htH 0 * graphInverse (graphX V htH F))
318
+
319
+ lemma graphX_nonneg {F : D} (hF : 0 ≤ F) : 0 ≤ graphX V htH F :=
320
+ smul_nonneg (by norm_num) (star_left_conjugate_nonneg hF _)
321
+
322
+ include ht in
323
+ lemma graphX_mem (F : D) : graphX V htH F ∈ Her h :=
324
+ real_smul_mem_Her (slot_sandwich_mem V ht htH 0 0 F) _
325
+
326
+ include ht in
327
+ lemma graphB_mem (F : D) (i : Fin 4) : graphB V htH F i ∈ Her h :=
328
+ real_smul_mem_Her ((Her h).mul_mem (slot_sandwich_mem V ht htH _ _ F)
329
+ (graphInverse_mem (graphX_mem V ht htH F))) _
330
+
331
+ lemma graphSlot0_Z (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) :
332
+ star (graphSlot V htH 0) * graphZ V ht htH T hT = (1/4 : ℝ) • (t * CFC.sqrt t) := by
333
+ rw [graphSlot, graphZ, V.slot_graphWord]
334
+ simp [graphCoeffs, ht.isSelfAdjoint.star_eq]
335
+
336
+ lemma graphSlot_Z (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) (i : Fin 4) :
337
+ star (graphSlot V htH i.castSucc.succ) * graphZ V ht htH T hT =
338
+ (1/4 : ℝ) • (t * T i * CFC.sqrt t) := by
339
+ rw [graphSlot, graphZ, V.slot_graphWord]
340
+ have he : graphCoeffs T i.castSucc.succ = (1/4 : ℝ) • T i := by fin_cases i <;> rfl
341
+ rw [he, ht.isSelfAdjoint.star_eq, mul_smul_comm, smul_mul_assoc]
342
+
343
+ lemma norm_compression_eq_of_fixed {z F : D} (hF : 0 ≤ F) (hfix : z*star z*F=F) :
344
+ ‖star z*F*z‖=‖F‖ := by
345
+ have hs := Her_fixed_left hfix (sqrt_mem_Her (self_mem_Her hF) hF)
346
+ calc
347
+ ‖star z*F*z‖ = ‖star (CFC.sqrt F*z)*(CFC.sqrt F*z)‖ := by
348
+ congr 1
349
+ simp only [star_mul, (CFC.sqrt_nonneg F).isSelfAdjoint.star_eq]
350
+ calc
351
+ star z*F*z = star z*(CFC.sqrt F*CFC.sqrt F)*z := by rw [CFC.sqrt_mul_sqrt_self F hF]
352
+ _ = _ := by noncomm_ring
353
+ _ = ‖(CFC.sqrt F*z)*star (CFC.sqrt F*z)‖ := by
354
+ rw [CStarRing.norm_star_mul_self, CStarRing.norm_self_mul_star]
355
+ _ = ‖F‖ := by
356
+ congr 1
357
+ calc
358
+ (CFC.sqrt F*z)*star (CFC.sqrt F*z) = CFC.sqrt F*(z*star z*CFC.sqrt F) := by
359
+ simp only [star_mul, (CFC.sqrt_nonneg F).isSelfAdjoint.star_eq, mul_assoc]
360
+ _ = F := by rw [hs, CFC.sqrt_mul_sqrt_self F hF]
361
+
362
+ theorem graph_failure (htn : ‖t‖ ≤ 1) (c y : D) (hy : 0 ≤ y) (hcn : ‖c‖ ≤ 1)
363
+ (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) (hTn : ∀ i, ‖T i‖ ≤ 1)
364
+ (hTX : ∀ i, T i ∈ Her (cut (graphX V htH (c*y*star c)) (1/32)))
365
+ (hd : y * (1-star c*(graphP V ht htH T hT * graphP V ht htH T hT)*c)*y=0) :
366
+ ‖graphX V htH (c*y*star c)‖=‖y‖ ∧ ∀ i, graphB V htH (c*y*star c) i = T i := by
367
+ let z := graphZ V ht htH T hT
368
+ let p := z*star z
369
+ let F := c*y*star c
370
+ let H₀ := star z*F*z
371
+ have hp : 0 ≤ p := mul_star_self_nonneg z
372
+ have hpn : ‖p‖ ≤ 1 := by
373
+ change ‖graphP V ht htH T hT‖ ≤ 1
374
+ change ‖z*star z‖ ≤ 1
375
+ rw [CStarRing.norm_self_mul_star, ← CStarRing.norm_star_mul_self]
376
+ change ‖star (graphZ V ht htH T hT)*graphZ V ht htH T hT‖ ≤ 1
377
+ rw [graphZ_inner V ht htH T hT hTn]
378
+ exact htn
379
+ have hz : star z*z=t := graphZ_inner V ht htH T hT hTn
380
+ have hdf : y*(1-star c*(p*p)*c)*y=0 := hd
381
+ obtain ⟨hpc,hcc⟩ := graph_defect_forces hp hpn hcn hy hdf
382
+ have hF : 0 ≤ F := star_right_conjugate_nonneg hy c
383
+ have hFH : 0 ≤ H₀ := star_left_conjugate_nonneg hF z
384
+ have hpF : p*F=F := by
385
+ change p*(c*y*star c)=c*y*star c
386
+ rw [← mul_assoc, hpc]
387
+ have hFp : F*p=F := by
388
+ simpa only [star_mul, hF.isSelfAdjoint.star_eq, hp.isSelfAdjoint.star_eq] using congrArg star hpF
389
+ have heF : F=z*H₀*star z := by
390
+ calc
391
+ F = p*F*p := by rw [hpF,hFp]
392
+ _ = z*H₀*star z := by dsimp [p,H₀]; noncomm_ring
393
+ have htH₀ : t*H₀=H₀ := by
394
+ calc
395
+ t*H₀ = star z*(p*F)*z := by rw [← hz]; dsimp [H₀,p]; noncomm_ring
396
+ _ = H₀ := by rw [hpF]
397
+ have hH₀t : H₀*t=H₀ := by
398
+ simpa only [star_mul, hFH.isSelfAdjoint.star_eq, ht.isSelfAdjoint.star_eq] using congrArg star htH₀
399
+ have hrH₀ : CFC.sqrt t*H₀=H₀ := sqrt_fixed_of_fixed ht htH₀
400
+ have hH₀r : H₀*CFC.sqrt t=H₀ := by
401
+ simpa only [star_mul, hFH.isSelfAdjoint.star_eq, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq]
402
+ using congrArg star hrH₀
403
+ have hW₀ : star (graphSlot V htH 0)*z=(1/4 : ℝ) • (t*CFC.sqrt t) :=
404
+ graphSlot0_Z V ht htH T hT
405
+ have hzW : star z*graphSlot V htH 0=(1/4 : ℝ) • (CFC.sqrt t*t) := by
406
+ simpa only [star_mul, star_star, star_smul, star_trivial,
407
+ ht.isSelfAdjoint.star_eq, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq] using congrArg star hW₀
408
+ have hW (i : Fin 6) : star (graphSlot V htH i)*F*graphSlot V htH 0 =
409
+ (star (graphSlot V htH i)*z)*H₀*(star z*graphSlot V htH 0) := by
410
+ rw [heF]; noncomm_ring
411
+ have hXeq : graphX V htH F=H₀ := by
412
+ rw [graphX, hW 0, hW₀, hzW]
413
+ simp only [smul_mul_assoc, mul_smul_comm, smul_smul]
414
+ rw [show (t*CFC.sqrt t)*H₀*(CFC.sqrt t*t)=H₀ by
415
+ rw [mul_assoc t (CFC.sqrt t) H₀, hrH₀, htH₀, ← mul_assoc, hH₀r, hH₀t]]
416
+ norm_num
417
+ have hX : 0 ≤ graphX V htH F := graphX_nonneg V htH hF
418
+ refine ⟨?_, fun i => ?_⟩
419
+ · rw [hXeq, norm_compression_eq_of_fixed hF hpF, norm_conjugate_eq_of_isometric_on hy hcc]
420
+ · have hTi := hTX i
421
+ change T i ∈ Her (cut (graphX V htH F) (1/32)) at hTi
422
+ have htX : t*graphX V htH F=graphX V htH F := by rw [hXeq]; exact htH₀
423
+ have htT : t*T i=T i := Her_fixed_left htX (Her_mono_of_mem (cut_mem_Her hX _) hTi)
424
+ have hright := right_fixed_by_graphInverse hX hTi
425
+ change graphB V htH F i=T i
426
+ rw [graphB, hW i.castSucc.succ, graphSlot_Z V ht htH T hT i, hzW]
427
+ simp only [smul_mul_assoc, mul_smul_comm, smul_smul]
428
+ have he : (t*T i*CFC.sqrt t)*H₀*(CFC.sqrt t*t)*graphInverse (graphX V htH F) = T i := by
429
+ calc
430
+ _ = (t*T i)*H₀*graphInverse (graphX V htH F) := by
431
+ rw [mul_assoc (t*T i) (CFC.sqrt t) H₀, hrH₀,
432
+ mul_assoc (t*T i) H₀ (CFC.sqrt t*t), ← mul_assoc H₀,
433
+ hH₀r, hH₀t]
434
+ _ = T i := by rw [htT, ← hXeq, mul_assoc]; exact hright
435
+ rw [he]
436
+ norm_num
437
+
438
+ end GraphConstruction
439
+
440
+ section AbstractMeasurements
441
+ variable {D : Type*} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
442
+
443
+ def measurementX (w F : D) : D := (16 : ℝ) • (star w*F*w)
444
+ def measurementB (w : Fin 6 → D) (F : D) (i : Fin 4) : D :=
445
+ (16 : ℝ) • (star (w i.castSucc.succ)*F*w 0*graphInverse (measurementX (w 0) F))
446
+
447
+ theorem graph_failure_of_identities {t z : D} (ht : 0 ≤ t) (htn : ‖t‖ ≤ 1)
448
+ (w : Fin 6 → D) (hz : star z*z=t) (T : Fin 4 → D)
449
+ (hW₀ : star (w 0)*z=(1/4 : ℝ) • (t*CFC.sqrt t))
450
+ (hWi : ∀ i : Fin 4, star (w i.castSucc.succ)*z=(1/4 : ℝ) • (t*T i*CFC.sqrt t))
451
+ (c y : D) (hy : 0 ≤ y) (hcn : ‖c‖ ≤ 1)
452
+ (hTX : ∀ i, T i ∈ Her (cut (measurementX (w 0) (c*y*star c)) (1/32)))
453
+ (hd : y*(1-star c*((z*star z)*(z*star z))*c)*y=0) :
454
+ ‖measurementX (w 0) (c*y*star c)‖=‖y‖ ∧ ∀ i, measurementB w (c*y*star c) i=T i := by
455
+ let p := z*star z
456
+ let F := c*y*star c
457
+ let H₀ := star z*F*z
458
+ have hp : 0 ≤ p := mul_star_self_nonneg z
459
+ have hpn : ‖p‖ ≤ 1 := by
460
+ change ‖z*star z‖ ≤ 1
461
+ rw [CStarRing.norm_self_mul_star, ← CStarRing.norm_star_mul_self, hz]
462
+ exact htn
463
+ have hdf : y*(1-star c*(p*p)*c)*y=0 := hd
464
+ obtain ⟨hpc,hcc⟩ := graph_defect_forces hp hpn hcn hy hdf
465
+ have hF : 0 ≤ F := star_right_conjugate_nonneg hy c
466
+ have hFH : 0 ≤ H₀ := star_left_conjugate_nonneg hF z
467
+ have hpF : p*F=F := by
468
+ change p*(c*y*star c)=c*y*star c
469
+ rw [← mul_assoc, hpc]
470
+ have hFp : F*p=F := by
471
+ simpa only [star_mul, hF.isSelfAdjoint.star_eq, hp.isSelfAdjoint.star_eq] using congrArg star hpF
472
+ have heF : F=z*H₀*star z := by
473
+ calc
474
+ F = p*F*p := by rw [hpF,hFp]
475
+ _ = z*H₀*star z := by dsimp [p,H₀]; noncomm_ring
476
+ have htH₀ : t*H₀=H₀ := by
477
+ calc
478
+ t*H₀ = star z*(p*F)*z := by rw [← hz]; dsimp [H₀,p]; noncomm_ring
479
+ _ = H₀ := by rw [hpF]
480
+ have hH₀t : H₀*t=H₀ := by
481
+ simpa only [star_mul, hFH.isSelfAdjoint.star_eq, ht.isSelfAdjoint.star_eq] using congrArg star htH₀
482
+ have hrH₀ : CFC.sqrt t*H₀=H₀ := sqrt_fixed_of_fixed ht htH₀
483
+ have hH₀r : H₀*CFC.sqrt t=H₀ := by
484
+ simpa only [star_mul, hFH.isSelfAdjoint.star_eq, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq]
485
+ using congrArg star hrH₀
486
+ have hzW : star z*w 0=(1/4 : ℝ) • (CFC.sqrt t*t) := by
487
+ simpa only [star_mul, star_star, star_smul, star_trivial,
488
+ ht.isSelfAdjoint.star_eq, (CFC.sqrt_nonneg t).isSelfAdjoint.star_eq] using congrArg star hW₀
489
+ have hW (i : Fin 6) : star (w i)*F*w 0 =
490
+ (star (w i)*z)*H₀*(star z*w 0) := by
491
+ rw [heF]; noncomm_ring
492
+ have hXeq : measurementX (w 0) F=H₀ := by
493
+ rw [measurementX, hW 0, hW₀, hzW]
494
+ simp only [smul_mul_assoc, mul_smul_comm, smul_smul]
495
+ rw [show (t*CFC.sqrt t)*H₀*(CFC.sqrt t*t)=H₀ by
496
+ rw [mul_assoc t (CFC.sqrt t) H₀, hrH₀, htH₀, ← mul_assoc, hH₀r, hH₀t]]
497
+ norm_num
498
+ have hX : 0 ≤ measurementX (w 0) F := smul_nonneg (by norm_num) (star_left_conjugate_nonneg hF (w 0))
499
+ refine ⟨?_, fun i => ?_⟩
500
+ · rw [hXeq, norm_compression_eq_of_fixed hF hpF, norm_conjugate_eq_of_isometric_on hy hcc]
501
+ · have hTi := hTX i
502
+ change T i ∈ Her (cut (measurementX (w 0) F) (1/32)) at hTi
503
+ have htX : t*measurementX (w 0) F=measurementX (w 0) F := by rw [hXeq]; exact htH₀
504
+ have htT : t*T i=T i := Her_fixed_left htX (Her_mono_of_mem (cut_mem_Her hX _) hTi)
505
+ have hright := right_fixed_by_graphInverse hX hTi
506
+ change measurementB w F i=T i
507
+ rw [measurementB, hW i.castSucc.succ, hWi i, hzW]
508
+ simp only [smul_mul_assoc, mul_smul_comm, smul_smul]
509
+ have he : (t*T i*CFC.sqrt t)*H₀*(CFC.sqrt t*t)*graphInverse (measurementX (w 0) F) = T i := by
510
+ calc
511
+ _ = (t*T i)*H₀*graphInverse (measurementX (w 0) F) := by
512
+ rw [mul_assoc (t*T i) (CFC.sqrt t) H₀, hrH₀,
513
+ mul_assoc (t*T i) H₀ (CFC.sqrt t*t), ← mul_assoc H₀,
514
+ hH₀r, hH₀t]
515
+ _ = T i := by rw [htT, ← hXeq, mul_assoc]; exact hright
516
+ rw [he]
517
+ norm_num
518
+
519
+ end AbstractMeasurements
520
+
521
+ section RepresentedGraph
522
+ variable {D E : Type*} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
523
+ [CStarAlgebra E] [PartialOrder E] [StarOrderedRing E]
524
+ variable (π : D →⋆ₐ[ℂ] E) {h a t : D} (V : OrthogonalSlots 6 h a)
525
+ (ht : 0 ≤ t) (htH : t ∈ Her h)
526
+
527
+ omit [PartialOrder D] [StarOrderedRing D] [PartialOrder E] [StarOrderedRing E] in
528
+ lemma graph_map_real_smul (r : ℝ) (x : D) : π (r • x) = r • π x :=
529
+ π.toAlgHom.map_smul_of_tower r x
530
+
531
+ lemma graph_map_inverse {X : D} (hX : 0 ≤ X) :
532
+ π (graphInverse X)=graphInverse (π X) := map_graphInverse π.toNonUnitalStarAlgHom hX
533
+
534
+ omit [PartialOrder D] [StarOrderedRing D] [PartialOrder E] [StarOrderedRing E] in
535
+ lemma graphX_map (F : D) : π (graphX V htH F) =
536
+ measurementX (π (graphSlot V htH 0)) (π F) := by
537
+ simp only [graphX, measurementX, graph_map_real_smul π, map_mul, map_star]
538
+
539
+ lemma graphB_map {F : D} (hF : 0 ≤ F) (i : Fin 4) : π (graphB V htH F i) =
540
+ measurementB (fun j => π (graphSlot V htH j)) (π F) i := by
541
+ simp only [graphB, measurementB, graph_map_real_smul π, map_mul, map_star,
542
+ graph_map_inverse π (graphX_nonneg V htH hF), graphX_map]
543
+
544
+ theorem graph_failure_represented (htn : ‖t‖ ≤ 1) (c y : D) (hy : 0 ≤ y) (hcn : ‖c‖ ≤ 1)
545
+ (T : Fin 4 → D) (hT : ∀ i, T i ∈ Her h) (hTn : ∀ i, ‖T i‖ ≤ 1)
546
+ (hTX : ∀ i, T i ∈ Her (cut (graphX V htH (c*y*star c)) (1/32)))
547
+ (hd : π (y * (1-star c*(graphP V ht htH T hT * graphP V ht htH T hT)*c)*y)=0) :
548
+ ‖π (graphX V htH (c*y*star c))‖=‖π y‖ ∧
549
+ ∀ i, π (graphB V htH (c*y*star c) i) = π (T i) := by
550
+ have hF : 0 ≤ c*y*star c := star_right_conjugate_nonneg hy c
551
+ have hm : π (CFC.sqrt t)=CFC.sqrt (π t) :=
552
+ π.toNonUnitalStarAlgHom.map_cfcₙ NNReal.sqrt t (by fun_prop) (by simp)
553
+ (map_continuous π) ht (map_nonneg π ht)
554
+ have hc := graph_failure_of_identities (map_nonneg π ht)
555
+ ((NonUnitalStarAlgHom.norm_apply_le π t).trans htn)
556
+ (fun j => π (graphSlot V htH j)) (z := π (graphZ V ht htH T hT))
557
+ (by simpa only [map_mul, map_star] using congrArg π (graphZ_inner V ht htH T hT hTn))
558
+ (fun i => π (T i))
559
+ (by simpa only [map_mul, map_star, graph_map_real_smul π, hm] using
560
+ (congrArg π (graphSlot0_Z V ht htH T hT)))
561
+ (fun i => by simpa only [map_mul, map_star, graph_map_real_smul π, hm] using
562
+ (congrArg π (graphSlot_Z V ht htH T hT i)))
563
+ (π c) (π y) (map_nonneg π hy)
564
+ ((NonUnitalStarAlgHom.norm_apply_le π c).trans hcn) (fun i => ?_) ?_
565
+ · simpa only [graphX_map, graphB_map π V htH hF, map_mul, map_star] using hc
566
+ · have hmem := Her_map π.toNonUnitalStarAlgHom (hTX i)
567
+ have hh := cut_map π.toNonUnitalStarAlgHom (graphX V htH (c*y*star c)) (1/32)
568
+ (graphX_nonneg V htH hF).isSelfAdjoint (by norm_num)
569
+ change π (T i) ∈ Her (π (cut (graphX V htH (c*y*star c)) (1/32))) at hmem
570
+ change cut (π (graphX V htH (c*y*star c))) (1/32) =
571
+ π (cut (graphX V htH (c*y*star c)) (1/32)) at hh
572
+ rw [← hh] at hmem
573
+ simpa only [graphX_map, map_mul, map_star] using hmem
574
+ · simpa only [graphP, map_mul, map_star, map_sub, map_one] using hd
575
+
576
+ end RepresentedGraph
577
+
578
+ end MainGap
579
+
580
+ namespace MainGap
581
+ universe u v
582
+ variable {A : Type u} [CStarAlgebra A]
583
+ local instance graphNonvanishingOrder : PartialOrder A := CStarAlgebra.spectralOrder A
584
+ local instance graphNonvanishingStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
585
+ local instance graphOperatorOrder (J : Type*) [NormedAddCommGroup J] [InnerProductSpace ℂ J] [CompleteSpace J] :
586
+ PartialOrder (J →L[ℂ] J) := CStarAlgebra.spectralOrder _
587
+ local instance graphOperatorStarOrder (J : Type*) [NormedAddCommGroup J] [InnerProductSpace ℂ J] [CompleteSpace J] :
588
+ StarOrderedRing (J →L[ℂ] J) := CStarAlgebra.spectralOrderedRing _
589
+
590
+ theorem graph_nonvanishing {a y c : A} (ha : 0 ≤ a) (hy : 0 ≤ y) (hcn : ‖c‖ ≤ 1)
591
+ (hp : ∀ z : A, 0 ≤ z → z ∈ Her a → ProperlyInfinite z) :
592
+ ∃ p : A, 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
593
+ (∀ R : HilbertRep.{u,v} A, (1/2 : ℝ) < ‖R.hom a‖ → ‖R.hom p‖=1) ∧
594
+ (∀ R : HilbertRep.{u,v} A, R.hom (y*(1-star c*(p*p)*c)*y)=0 → ‖R.hom y‖ ≤ (1/4 : ℝ)) := by
595
+ classical
596
+ obtain ⟨V⟩ := (hp a ha (self_mem_Her ha)).orthogonalSlots ha 6 (by norm_num : (0:ℝ)<1/8)
597
+ let t := ramp a (1/4) (1/2)
598
+ have ht : 0 ≤ t := ramp_nonneg a (by norm_num)
599
+ have htn : ‖t‖ ≤ 1 := norm_ramp_le_one a (by norm_num)
600
+ have htH : t ∈ Her (cut a (1/8)) := by
601
+ have hcut : cut a (1/4) ∈ Her (cut a (1/8)) := by
602
+ have hh := cut_mem_Her (cut_nonneg a (1/8)) (1/8)
603
+ rw [cut_cut ha (by norm_num) (by norm_num)] at hh
604
+ convert hh using 1; norm_num
605
+ exact Her_mono_of_mem hcut (ramp_mem_Her_cut ha (by norm_num))
606
+ let F := c*y*star c
607
+ have hF : 0 ≤ F := star_right_conjugate_nonneg hy c
608
+ let X := graphX V htH F
609
+ let B := graphB V htH F
610
+ have hX : 0 ≤ X := graphX_nonneg V htH hF
611
+ have hXH : X ∈ Her (cut a (1/8)) := graphX_mem V ht htH F
612
+ have hfour : fourHer X ≤ Her (cut a (1/8)) :=
613
+ Her_mono_of_mem (Her_mono_of_mem hXH (cut_mem_Her hX (1/32)))
614
+ obtain ⟨T,hTn,hTX,havoid⟩ := four_avoidance_unital.{u,v} hX B (fun z hz hzm =>
615
+ hp z hz (Her_mono_of_mem (cut_mem_Her ha (1/8)) (hfour hzm)))
616
+ have hT : ∀ i, T i ∈ Her (cut a (1/8)) := fun i => hfour (hTX i)
617
+ let p := graphP V ht htH T hT
618
+ have hpn : ‖p‖ ≤ 1 := by
619
+ have he := graphP_represented_norm V ht htH (NonUnitalStarAlgHom.id ℂ A) T hT hTn
620
+ change ‖p‖=‖t‖ at he
621
+ rw [he]
622
+ exact htn
623
+ refine ⟨p, graphP_nonneg V ht htH T hT, hpn, graphP_mem V ht htH T hT, ?_, ?_⟩
624
+ · intro R hRa
625
+ change ‖R.hom.toNonUnitalStarAlgHom (graphP V ht htH T hT)‖=1
626
+ rw [graphP_represented_norm V ht htH R.hom.toNonUnitalStarAlgHom T hT hTn]
627
+ change ‖R.hom (ramp a (1/4) (1/2))‖=1
628
+ rw [map_ramp_sa R.hom ha.isSelfAdjoint (by norm_num)]
629
+ exact norm_ramp_eq_one (map_nonneg R.hom ha) (by norm_num) (by norm_num) hRa.le
630
+ · intro R hd
631
+ by_contra! hRy
632
+ obtain ⟨hRX,hB⟩ := graph_failure_represented R.hom V ht htH htn c y hy hcn T hT hTn hTX hd
633
+ exact havoid R (by rw [hRX]; exact hRy)
634
+ (fun i => (hB i).symm)
635
+ end MainGap
636
+
637
+ end
638
+
639
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Hereditary.lean ADDED
@@ -0,0 +1,613 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+
11
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
12
+
13
+ def sandwichAlgebra (h : A) : NonUnitalStarSubalgebra ℂ A where
14
+ carrier := Set.range (fun a : A => h * a * star h)
15
+ zero_mem' := ⟨0, by simp⟩
16
+ add_mem' := by
17
+ rintro _ _ ⟨a, rfl⟩ ⟨b, rfl⟩
18
+ exact ⟨a + b, by simp [mul_add, add_mul]⟩
19
+ mul_mem' := by
20
+ rintro _ _ ⟨a, rfl⟩ ⟨b, rfl⟩
21
+ exact ⟨a * star h * h * b, by simp only [mul_assoc]⟩
22
+ smul_mem' := by
23
+ rintro c _ ⟨a, rfl⟩
24
+ exact ⟨c • a, by simp only [mul_smul_comm, smul_mul_assoc]⟩
25
+ star_mem' := by
26
+ rintro _ ⟨a, rfl⟩
27
+ exact ⟨star a, by simp only [star_mul, star_star, mul_assoc]⟩
28
+
29
+ def Her (h : A) : NonUnitalStarSubalgebra ℂ A := (sandwichAlgebra h).topologicalClosure
30
+
31
+ lemma mem_Her_iff {h a : A} : a ∈ Her h ↔
32
+ a ∈ closure (Set.range (fun b : A => h * b * star h)) := Iff.rfl
33
+
34
+ lemma isClosed_Her (h : A) : IsClosed (Her h : Set A) := isClosed_closure
35
+
36
+ instance (h : A) : IsClosed (Her h : Set A) := isClosed_Her h
37
+
38
+ lemma sandwich_mem_Her (h a : A) : h * a * star h ∈ Her h :=
39
+ subset_closure ⟨a, rfl⟩
40
+
41
+ instance (h : A) : CompleteSpace (Her h) := (isClosed_Her h).completeSpace_coe
42
+
43
+ def sandwichMap (h : A) : A →ₗ[ℂ] Her h where
44
+ toFun a := ⟨h * a * star h, sandwich_mem_Her h a⟩
45
+ map_add' a b := Subtype.ext (by
46
+ change h * (a + b) * star h = h * a * star h + h * b * star h
47
+ simp only [mul_add, add_mul])
48
+ map_smul' c a := Subtype.ext (by
49
+ change h * (c • a) * star h = c • (h * a * star h)
50
+ simp only [mul_smul_comm, smul_mul_assoc])
51
+
52
+ @[simp] lemma sandwichMap_val (h a : A) : (sandwichMap h a : A) = h * a * star h := rfl
53
+
54
+ lemma sandwichMap_dense (h : A) : DenseRange (sandwichMap h) := by
55
+ intro a
56
+ rw [closure_subtype]
57
+ have heq : Subtype.val '' Set.range (sandwichMap h) =
58
+ Set.range (fun b : A => h * b * star h) := by
59
+ ext b
60
+ constructor
61
+ · rintro ⟨k, ⟨c, rfl⟩, rfl⟩
62
+ exact ⟨c, rfl⟩
63
+ · rintro ⟨c, rfl⟩
64
+ exact ⟨sandwichMap h c, ⟨c, rfl⟩, rfl⟩
65
+ rw [heq]
66
+ exact a.property
67
+
68
+ lemma norm_mul_eq_of_star_mul_eq {z h : A} (hzh : star z * z = star h * h) (a : A) :
69
+ ‖z * a‖ = ‖h * a‖ := by
70
+ apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp
71
+ simp only [pow_two, ← CStarRing.norm_star_mul_self, star_mul]
72
+ congr 1
73
+ calc
74
+ star a * star z * (z * a) = star a * (star z * z) * a := by noncomm_ring
75
+ _ = star a * (star h * h) * a := by rw [hzh]
76
+ _ = star a * star h * (h * a) := by noncomm_ring
77
+
78
+ def carrierNumerator (z h : A) : A →ₗ[ℂ] A where
79
+ toFun a := z * a * star h
80
+ map_add' a b := by simp only [mul_add, add_mul]
81
+ map_smul' c a := by simp only [mul_smul_comm, smul_mul_assoc, RingHom.id_apply]
82
+
83
+ def carrier (z h : A) : Her h →L[ℂ] A :=
84
+ (carrierNumerator z h).extendOfNorm (sandwichMap h)
85
+
86
+ lemma carrier_on_sandwich {z h : A} (hzh : star z * z = star h * h) (a : A) :
87
+ carrier z h (sandwichMap h a) = z * a * star h := by
88
+ apply LinearMap.extendOfNorm_eq (sandwichMap_dense h)
89
+ refine ⟨1, fun b => ?_⟩
90
+ change ‖z * b * star h‖ ≤ 1 * ‖h * b * star h‖
91
+ rw [one_mul, mul_assoc, mul_assoc, norm_mul_eq_of_star_mul_eq hzh]
92
+
93
+ lemma carrier_norm {z h : A} (hzh : star z * z = star h * h) (k : Her h) :
94
+ ‖carrier z h k‖ = ‖(k : A)‖ := by
95
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
96
+ intro a
97
+ rw [carrier_on_sandwich hzh, sandwichMap_val, mul_assoc, mul_assoc,
98
+ norm_mul_eq_of_star_mul_eq hzh]
99
+
100
+ lemma carrier_inner {z h : A} (hzh : star z * z = star h * h) (k l : Her h) :
101
+ star (carrier z h k) * carrier z h l = star (k : A) * (l : A) := by
102
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
103
+ intro a
104
+ refine (sandwichMap_dense h).induction_on l (isClosed_eq (by fun_prop) (by fun_prop)) ?_
105
+ intro b
106
+ simp only [carrier_on_sandwich hzh, sandwichMap_val, star_mul, star_star]
107
+ calc
108
+ h * (star a * star z) * (z * b * star h) =
109
+ h * star a * (star z * z) * b * star h := by noncomm_ring
110
+ _ = h * star a * (star h * h) * b * star h := by rw [hzh]
111
+ _ = h * (star a * star h) * (h * b * star h) := by noncomm_ring
112
+
113
+ lemma carrier_mul {z h : A} (hzh : star z * z = star h * h) (k l : Her h) :
114
+ carrier z h (k * l) = carrier z h k * (l : A) := by
115
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
116
+ intro a
117
+ refine (sandwichMap_dense h).induction_on l (isClosed_eq (by fun_prop) (by fun_prop)) ?_
118
+ intro b
119
+ have heq : sandwichMap h a * sandwichMap h b =
120
+ sandwichMap h (a * star h * h * b) := Subtype.ext (by
121
+ change (h * a * star h) * (h * b * star h) =
122
+ h * (a * star h * h * b) * star h
123
+ simp only [mul_assoc])
124
+ rw [heq, carrier_on_sandwich hzh, carrier_on_sandwich hzh, sandwichMap_val]
125
+ simp only [mul_assoc]
126
+
127
+ lemma norm_mul_star_eq_of_star_mul_eq {z h : A} (hzh : star z * z = star h * h) (a : A) :
128
+ ‖a * star z‖ = ‖a * star h‖ := by
129
+ calc
130
+ ‖a * star z‖ = ‖star (a * star z)‖ := (norm_star _).symm
131
+ _ = ‖z * star a‖ := by rw [star_mul, star_star]
132
+ _ = ‖h * star a‖ := norm_mul_eq_of_star_mul_eq hzh _
133
+ _ = ‖star (a * star h)‖ := by rw [star_mul, star_star]
134
+ _ = ‖a * star h‖ := norm_star _
135
+
136
+ lemma norm_sandwich_eq {z h : A} (hzh : star z * z = star h * h) (a : A) :
137
+ ‖z * a * star z‖ = ‖h * a * star h‖ := by
138
+ rw [norm_mul_star_eq_of_star_mul_eq hzh, mul_assoc, mul_assoc,
139
+ norm_mul_eq_of_star_mul_eq hzh]
140
+
141
+ def conjugationNumerator (z : A) : A →ₗ[ℂ] A where
142
+ toFun a := z * a * star z
143
+ map_add' a b := by simp only [mul_add, add_mul]
144
+ map_smul' c a := by simp only [mul_smul_comm, smul_mul_assoc, RingHom.id_apply]
145
+
146
+ def conjugation (z h : A) : Her h →L[ℂ] A :=
147
+ (conjugationNumerator z).extendOfNorm (sandwichMap h)
148
+
149
+ lemma conjugation_on_sandwich {z h : A} (hzh : star z * z = star h * h) (a : A) :
150
+ conjugation z h (sandwichMap h a) = z * a * star z := by
151
+ apply LinearMap.extendOfNorm_eq (sandwichMap_dense h)
152
+ refine ⟨1, fun b => ?_⟩
153
+ change ‖z * b * star z‖ ≤ 1 * ‖h * b * star h‖
154
+ rw [one_mul, norm_sandwich_eq hzh]
155
+
156
+ lemma conjugation_norm {z h : A} (hzh : star z * z = star h * h) (k : Her h) :
157
+ ‖conjugation z h k‖ = ‖(k : A)‖ := by
158
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
159
+ intro a
160
+ rw [conjugation_on_sandwich hzh, sandwichMap_val, norm_sandwich_eq hzh]
161
+
162
+ lemma conjugation_mem {z h : A} (hzh : star z * z = star h * h) (k : Her h) :
163
+ conjugation z h k ∈ Her z := by
164
+ refine (sandwichMap_dense h).induction_on k
165
+ ((isClosed_Her z).preimage (conjugation z h).continuous) ?_
166
+ intro a
167
+ rw [conjugation_on_sandwich hzh]
168
+ exact sandwich_mem_Her z a
169
+
170
+ lemma conjugation_mul {z h : A} (hzh : star z * z = star h * h) (k l : Her h) :
171
+ conjugation z h (k * l) = conjugation z h k * conjugation z h l := by
172
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
173
+ intro a
174
+ refine (sandwichMap_dense h).induction_on l (isClosed_eq (by fun_prop) (by fun_prop)) ?_
175
+ intro b
176
+ have heq : sandwichMap h a * sandwichMap h b =
177
+ sandwichMap h (a * star h * h * b) := Subtype.ext (by
178
+ change (h * a * star h) * (h * b * star h) =
179
+ h * (a * star h * h * b) * star h
180
+ simp only [mul_assoc])
181
+ rw [heq, conjugation_on_sandwich hzh, conjugation_on_sandwich hzh,
182
+ conjugation_on_sandwich hzh]
183
+ calc
184
+ z * (a * star h * h * b) * star z = z * a * (star h * h) * b * star z := by
185
+ noncomm_ring
186
+ _ = z * a * (star z * z) * b * star z := by rw [hzh]
187
+ _ = (z * a * star z) * (z * b * star z) := by noncomm_ring
188
+
189
+ lemma carrier_outer {z h : A} (hzh : star z * z = star h * h) (k l : Her h) :
190
+ carrier z h k * star (carrier z h l) = conjugation z h (k * star l) := by
191
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
192
+ intro a
193
+ refine (sandwichMap_dense h).induction_on l (isClosed_eq (by fun_prop) (by fun_prop)) ?_
194
+ intro b
195
+ have heq : sandwichMap h a * star (sandwichMap h b) =
196
+ sandwichMap h (a * star h * h * star b) := Subtype.ext (by
197
+ change (h * a * star h) * star (h * b * star h) =
198
+ h * (a * star h * h * star b) * star h
199
+ simp only [star_mul, star_star, mul_assoc])
200
+ rw [heq, carrier_on_sandwich hzh, carrier_on_sandwich hzh, conjugation_on_sandwich hzh]
201
+ simp only [star_mul, star_star, mul_assoc]
202
+
203
+ lemma conjugation_star {z h : A} (hzh : star z * z = star h * h) (k : Her h) :
204
+ conjugation z h (star k) = star (conjugation z h k) := by
205
+ refine (sandwichMap_dense h).induction_on k
206
+ (isClosed_eq ((conjugation z h).continuous.comp continuous_star)
207
+ (continuous_star.comp (conjugation z h).continuous)) ?_
208
+ intro a
209
+ have heq : star (sandwichMap h a) = sandwichMap h (star a) := Subtype.ext (by
210
+ change star (h * a * star h) = h * star a * star h
211
+ simp only [star_mul, star_star, mul_assoc])
212
+ rw [heq, conjugation_on_sandwich hzh, conjugation_on_sandwich hzh]
213
+ simp only [star_mul, star_star, mul_assoc]
214
+
215
+ def transportHom {z h : A} (hzh : star z * z = star h * h) : Her h →⋆ₙₐ[ℂ] A :=
216
+ { (conjugation z h).toLinearMap with
217
+ map_zero' := map_zero (conjugation z h)
218
+ map_mul' := conjugation_mul hzh
219
+ map_star' := conjugation_star hzh }
220
+
221
+ lemma transportHom_injective {z h : A} (hzh : star z * z = star h * h) :
222
+ Function.Injective (transportHom hzh) := by
223
+ intro k l heq
224
+ apply sub_eq_zero.mp
225
+ apply Subtype.val_injective
226
+ apply norm_eq_zero.mp
227
+ rw [← conjugation_norm hzh]
228
+ change ‖transportHom hzh (k - l)‖ = 0
229
+ rw [map_sub, heq, sub_self, norm_zero]
230
+
231
+ lemma transport_represented_norm {B : Type*} [NonUnitalCStarAlgebra B]
232
+ (π : A →⋆ₙₐ[ℂ] B) {z h : A} (hzh : star z * z = star h * h) (k : Her h) :
233
+ ‖π (transportHom hzh k)‖ = ‖π (k : A)‖ := by
234
+ refine (sandwichMap_dense h).induction_on k (isClosed_eq (by fun_prop) (by fun_prop)) ?_
235
+ intro a
236
+ change ‖π (conjugation z h (sandwichMap h a))‖ = ‖π (h * a * star h)‖
237
+ rw [conjugation_on_sandwich hzh]
238
+ simp only [map_mul, map_star]
239
+ apply norm_sandwich_eq
240
+ simpa only [map_mul, map_star] using congrArg π hzh
241
+
242
+ lemma Her_sandwich {h k : A} (hk : k ∈ Her h) (a : A) : k * a * star k ∈ Her h := by
243
+ let k' : Her h := ⟨k, hk⟩
244
+ change (k' : A) * a * star (k' : A) ∈ Her h
245
+ refine (sandwichMap_dense h).induction_on k'
246
+ ((isClosed_Her h).preimage (by fun_prop)) ?_
247
+ intro b
248
+ change (h * b * star h) * a * star (h * b * star h) ∈ Her h
249
+ convert sandwich_mem_Her h (b * star h * a * h * star b) using 1
250
+ simp only [star_mul, star_star, mul_assoc]
251
+
252
+ lemma Her_mono_of_mem {h k : A} (hk : k ∈ Her h) : Her k ≤ Her h := by
253
+ apply closure_minimal _ (isClosed_Her h)
254
+ rintro _ ⟨a, rfl⟩
255
+ exact Her_sandwich hk a
256
+
257
+ lemma Her_mul_le (h k : A) : Her (h * k) ≤ Her h := by
258
+ apply closure_minimal _ (isClosed_Her h)
259
+ rintro _ ⟨a, rfl⟩
260
+ change (h * k) * a * star (h * k) ∈ Her h
261
+ convert sandwich_mem_Her h (k * a * star k) using 1
262
+ simp only [star_mul, mul_assoc]
263
+
264
+ structure RegularTransport (h v : A) where
265
+ carrier : Her h →L[ℂ] A
266
+ hom : Her h →⋆ₙₐ[ℂ] A
267
+ inner : ∀ k l : Her h, star (carrier k) * carrier l = star (k : A) * (l : A)
268
+ outer : ∀ k l : Her h, carrier k * star (carrier l) = hom (k * star l)
269
+ mul : ∀ k l : Her h, carrier (k * l) = carrier k * (l : A)
270
+ image : ∀ k : Her h, hom k ∈ Her v
271
+
272
+ namespace RegularTransport
273
+ variable {h v : A} (T : RegularTransport h v)
274
+
275
+ def restrict {k : A} (T : RegularTransport k v) (hle : Her h ≤ Her k) :
276
+ RegularTransport h v := by
277
+ let ι : Her h →⋆ₙₐ[ℂ] Her k := NonUnitalStarSubalgebra.inclusion hle
278
+ let i : Her h →L[ℂ] Her k := {
279
+ toFun := ι
280
+ map_add' := map_add ι
281
+ map_smul' := map_smul ι
282
+ cont := by fun_prop }
283
+ exact {
284
+ carrier := T.carrier.comp i
285
+ hom := T.hom.comp ι
286
+ inner := fun a b => T.inner (ι a) (ι b)
287
+ outer := fun a b => by
288
+ change T.carrier (ι a) * star (T.carrier (ι b)) = T.hom (ι (a * star b))
289
+ rw [map_mul, map_star]
290
+ exact T.outer (ι a) (ι b)
291
+ mul := fun a b => by
292
+ change T.carrier (ι (a * b)) = T.carrier (ι a) * (b : A)
293
+ rw [map_mul]
294
+ exact T.mul (ι a) (ι b)
295
+ image := fun a => T.image (ι a) }
296
+
297
+ lemma carrier_represented_norm {B : Type*} [NonUnitalCStarAlgebra B]
298
+ (π : A →⋆ₙₐ[ℂ] B) (k : Her h) : ‖π (T.carrier k)‖ = ‖π (k : A)‖ := by
299
+ apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp
300
+ simp only [pow_two, ← CStarRing.norm_star_mul_self, ← map_star, ← map_mul, T.inner]
301
+
302
+ lemma represented_norm {B : Type*} [NonUnitalCStarAlgebra B]
303
+ (π : A →⋆ₙₐ[ℂ] B) (k : Her h) : ‖π (T.hom k)‖ = ‖π (k : A)‖ := by
304
+ apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp
305
+ calc
306
+ ‖π (T.hom k)‖ ^ 2 = ‖π (T.hom (star k * k))‖ := by
307
+ simp only [map_mul, map_star, CStarRing.norm_star_mul_self, pow_two]
308
+ _ = ‖π (T.carrier (star k) * star (T.carrier (star k)))‖ := by
309
+ rw [T.outer, star_star]
310
+ _ = ‖π (T.carrier (star k))‖ ^ 2 := by
311
+ simp only [map_mul, map_star, CStarRing.norm_self_mul_star, pow_two]
312
+ _ = ‖π (star (k : A))‖ ^ 2 := by
313
+ rw [T.carrier_represented_norm, StarMemClass.coe_star]
314
+ _ = ‖π (k : A)‖ ^ 2 := by rw [map_star, norm_star]
315
+
316
+ lemma norm_hom (k : Her h) : ‖T.hom k‖ = ‖(k : A)‖ :=
317
+ T.represented_norm (NonUnitalStarAlgHom.id ℂ A) k
318
+
319
+ lemma injective : Function.Injective T.hom := by
320
+ intro k l hkl
321
+ apply sub_eq_zero.mp
322
+ apply Subtype.val_injective
323
+ apply norm_eq_zero.mp
324
+ rw [← T.norm_hom, map_sub, hkl, sub_self, norm_zero]
325
+
326
+ end RegularTransport
327
+
328
+ section Order
329
+ variable [PartialOrder A] [StarOrderedRing A]
330
+
331
+ lemma mul_star_mem_Her (h : A) : h * star h ∈ Her h := by
332
+ apply (isClosed_Her h).mem_of_tendsto
333
+ (((CStarAlgebra.increasingApproximateUnit A).tendsto_mul_left h).mul_const (star h))
334
+ exact Filter.Eventually.of_forall (sandwich_mem_Her h)
335
+
336
+ lemma sqrt_mem_Her {h k : A} (hk : k ∈ Her h) (hkpos : 0 ≤ k) : CFC.sqrt k ∈ Her h := by
337
+ rw [CFC.sqrt_eq_real_sqrt k hkpos]
338
+ exact cfcₙ_mem (𝕜' := ℂ) Real.sqrt hk
339
+
340
+ lemma self_mem_Her {h : A} (hh : 0 ≤ h) : h ∈ Her h := by
341
+ have hm : h * h ∈ Her h := by
342
+ simpa only [IsSelfAdjoint.of_nonneg hh |>.star_eq] using mul_star_mem_Her h
343
+ simpa only [CFC.sqrt_mul_self h hh] using
344
+ sqrt_mem_Her hm (by simpa only [IsSelfAdjoint.of_nonneg hh |>.star_eq] using
345
+ star_mul_self_nonneg h)
346
+
347
+ lemma sqrt_Her_eq {h : A} (hh : 0 ≤ h) : Her (CFC.sqrt h) = Her h := by
348
+ apply le_antisymm
349
+ · exact Her_mono_of_mem (sqrt_mem_Her (self_mem_Her hh) hh)
350
+ · apply Her_mono_of_mem
351
+ have ht := self_mem_Her (CFC.sqrt_nonneg h)
352
+ have hm : CFC.sqrt h * CFC.sqrt h ∈ Her (CFC.sqrt h) := (Her (CFC.sqrt h)).mul_mem ht ht
353
+ rwa [CFC.sqrt_mul_sqrt_self h hh] at hm
354
+
355
+ def twoSidedRemainder (e a : A) : A := a - e * a - a * e + e * a * e
356
+
357
+ lemma twoSidedRemainder_as_square {e a : A} (he : IsSelfAdjoint e) (ha : 0 ≤ a) :
358
+ twoSidedRemainder e a =
359
+ (CFC.sqrt a - e * CFC.sqrt a) * star (CFC.sqrt a - e * CFC.sqrt a) := by
360
+ have hs : star (CFC.sqrt a) = CFC.sqrt a := (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg a)).star_eq
361
+ simp only [star_sub, star_mul, he.star_eq, hs]
362
+ calc
363
+ twoSidedRemainder e a = a - e * a - a * e + e * a * e := rfl
364
+ _ = (CFC.sqrt a * CFC.sqrt a) - e * (CFC.sqrt a * CFC.sqrt a) -
365
+ (CFC.sqrt a * CFC.sqrt a) * e + e * (CFC.sqrt a * CFC.sqrt a) * e := by
366
+ rw [CFC.sqrt_mul_sqrt_self a ha]
367
+ _ = _ := by noncomm_ring
368
+
369
+ lemma twoSidedRemainder_nonneg {e a : A} (he : IsSelfAdjoint e) (ha : 0 ≤ a) :
370
+ 0 ≤ twoSidedRemainder e a := by
371
+ rw [twoSidedRemainder_as_square he ha]
372
+ exact mul_star_self_nonneg _
373
+
374
+ lemma twoSidedRemainder_mono {e a b : A} (he : IsSelfAdjoint e) (hab : a ≤ b) :
375
+ twoSidedRemainder e a ≤ twoSidedRemainder e b := by
376
+ apply sub_nonneg.mp
377
+ convert twoSidedRemainder_nonneg he (sub_nonneg.mpr hab) using 1
378
+ simp only [twoSidedRemainder]
379
+ noncomm_ring
380
+
381
+ omit [PartialOrder A] [StarOrderedRing A] in
382
+ lemma norm_twoSidedRemainder_le {e : A} (he : ‖e‖ ≤ 1) (b : A) :
383
+ ‖twoSidedRemainder e b‖ ≤ 2 * ‖b - e * b‖ := by
384
+ have heq : twoSidedRemainder e b = (b - e * b) - (b - e * b) * e := by
385
+ simp only [twoSidedRemainder]
386
+ noncomm_ring
387
+ rw [heq]
388
+ calc
389
+ ‖(b - e * b) - (b - e * b) * e‖ ≤ ‖b - e * b‖ + ‖(b - e * b) * e‖ := norm_sub_le _ _
390
+ _ ≤ ‖b - e * b‖ + ‖b - e * b‖ * ‖e‖ := by gcongr; exact norm_mul_le _ _
391
+ _ ≤ 2 * ‖b - e * b‖ := by nlinarith [norm_nonneg (b - e * b)]
392
+
393
+ lemma norm_sqrt_remainder_sq_le {e a b : A} (he : IsSelfAdjoint e) (hen : ‖e‖ ≤ 1)
394
+ (ha : 0 ≤ a) (hab : a ≤ b) :
395
+ ‖CFC.sqrt a - e * CFC.sqrt a‖ ^ 2 ≤ 2 * ‖b - e * b‖ := by
396
+ calc
397
+ ‖CFC.sqrt a - e * CFC.sqrt a‖ ^ 2 = ‖twoSidedRemainder e a‖ := by
398
+ rw [twoSidedRemainder_as_square he ha, CStarRing.norm_self_mul_star, pow_two]
399
+ _ ≤ ‖twoSidedRemainder e b‖ :=
400
+ CStarAlgebra.norm_le_norm_of_le_of_nonneg (twoSidedRemainder_mono he hab)
401
+ (twoSidedRemainder_nonneg he ha)
402
+ _ ≤ 2 * ‖b - e * b‖ := norm_twoSidedRemainder_le hen b
403
+
404
+ lemma norm_compression_error_le {e a : A} (he : IsSelfAdjoint e) (hen : ‖e‖ ≤ 1)
405
+ (ha : 0 ≤ a) :
406
+ ‖a - e * a * e‖ ≤ 2 * ‖CFC.sqrt a - e * CFC.sqrt a‖ * ‖CFC.sqrt a‖ := by
407
+ have ha' : IsSelfAdjoint a := .of_nonneg ha
408
+ have hstar : ‖a - a * e‖ = ‖a - e * a‖ := by
409
+ rw [← norm_star (a - a * e), star_sub, star_mul, he.star_eq, ha'.star_eq]
410
+ have heq : a - e * a * e = (a - e * a) + e * (a - a * e) := by noncomm_ring
411
+ have hbound : ‖a - e * a‖ ≤ ‖CFC.sqrt a - e * CFC.sqrt a‖ * ‖CFC.sqrt a‖ := by
412
+ calc
413
+ ‖a - e * a‖ = ‖(CFC.sqrt a - e * CFC.sqrt a) * CFC.sqrt a‖ := by
414
+ rw [sub_mul, mul_assoc e, CFC.sqrt_mul_sqrt_self a ha]
415
+ _ ≤ _ := norm_mul_le _ _
416
+ calc
417
+ ‖a - e * a * e‖ = ‖(a - e * a) + e * (a - a * e)‖ := congrArg norm heq
418
+ _ ≤ ‖a - e * a‖ + ‖e * (a - a * e)‖ := norm_add_le _ _
419
+ _ ≤ ‖a - e * a‖ + ‖e‖ * ‖a - a * e‖ := by gcongr; exact norm_mul_le _ _
420
+ _ ≤ 2 * ‖a - e * a‖ := by rw [hstar]; nlinarith [norm_nonneg (a - e * a)]
421
+ _ ≤ _ := by nlinarith
422
+
423
+ lemma norm_compression_error_sq_le {e a b : A} (he : IsSelfAdjoint e) (hen : ‖e‖ ≤ 1)
424
+ (ha : 0 ≤ a) (hab : a ≤ b) :
425
+ ‖a - e * a * e‖ ^ 2 ≤ 8 * ‖a‖ * ‖b - e * b‖ := by
426
+ have hsa : IsSelfAdjoint (CFC.sqrt a) := .of_nonneg (CFC.sqrt_nonneg _)
427
+ have hsq : ‖CFC.sqrt a‖ ^ 2 = ‖a‖ := by
428
+ rw [← hsa.norm_mul_self, CFC.sqrt_mul_sqrt_self a ha]
429
+ calc
430
+ ‖a - e * a * e‖ ^ 2 ≤
431
+ (2 * ‖CFC.sqrt a - e * CFC.sqrt a‖ * ‖CFC.sqrt a‖) ^ 2 :=
432
+ (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr (norm_compression_error_le he hen ha)
433
+ _ = 4 * ‖a‖ * ‖CFC.sqrt a - e * CFC.sqrt a‖ ^ 2 := by rw [← hsq]; ring
434
+ _ ≤ 4 * ‖a‖ * (2 * ‖b - e * b‖) := by
435
+ gcongr
436
+ exact norm_sqrt_remainder_sq_le he hen ha hab
437
+ _ = _ := by ring
438
+
439
+ lemma Her_exists_approx_unit {b : A} (hb : 0 ≤ b) {δ : ℝ} (hδ : 0 < δ) :
440
+ ∃ e : A, e ∈ Her b ∧ IsSelfAdjoint e ∧ ‖e‖ ≤ 1 ∧ ‖b - e * b‖ < δ := by
441
+ let b' : Her b := ⟨b, self_mem_Her hb⟩
442
+ let : PartialOrder (Her b) := CStarAlgebra.spectralOrder (Her b)
443
+ let : StarOrderedRing (Her b) := CStarAlgebra.spectralOrderedRing (Her b)
444
+ have hunit := CStarAlgebra.increasingApproximateUnit (Her b)
445
+ have ht : Tendsto (fun e : Her b => ‖b' - e * b'‖)
446
+ (CStarAlgebra.approximateUnit (Her b)) (𝓝 (0 : ℝ)) := by
447
+ simpa only [sub_self, norm_zero] using
448
+ ((tendsto_const_nhds (x := b')).sub (hunit.tendsto_mul_right b')).norm
449
+ have hsmall : ∀ᶠ e : Her b in CStarAlgebra.approximateUnit (Her b), ‖b' - e * b'‖ < δ :=
450
+ ht.eventually (Iio_mem_nhds hδ)
451
+ obtain ⟨e, hn, hp, hs⟩ := (hunit.eventually_norm.and (hunit.eventually_nonneg.and hsmall)).exists
452
+ refine ⟨e, e.property, ?_, hn, hs⟩
453
+ change star (e : A) = (e : A)
454
+ have he := congrArg (fun x : Her b => (x : A)) (IsSelfAdjoint.of_nonneg hp |>.star_eq)
455
+ exact he
456
+
457
+ lemma mem_Her_of_nonneg_le {a b : A} (ha : 0 ≤ a) (hab : a ≤ b) : a ∈ Her b := by
458
+ have hb : 0 ≤ b := ha.trans hab
459
+ have hc : a ∈ closure (Her b : Set A) := by
460
+ rw [Metric.mem_closure_iff]
461
+ intro ε hε
462
+ have hden : 0 < 8 * ‖a‖ + 1 := by positivity
463
+ have hδ : 0 < ε ^ 2 / (8 * ‖a‖ + 1) := div_pos (sq_pos_of_pos hε) hden
464
+ obtain ⟨e, he, hesa, hen, hesmall⟩ := Her_exists_approx_unit hb hδ
465
+ refine ⟨e * a * e, ?_, ?_⟩
466
+ · change e * a * e ∈ Her b
467
+ simpa only [hesa.star_eq] using Her_sandwich he a
468
+ · rw [dist_eq_norm]
469
+ have hsq := norm_compression_error_sq_le hesa hen ha hab
470
+ have hp : (8 * ‖a‖ + 1) * ‖b - e * b‖ < ε ^ 2 := by
471
+ have ht := mul_lt_mul_of_pos_left hesmall hden
472
+ rwa [mul_div_cancel₀ _ (ne_of_gt hden)] at ht
473
+ have hfinal : ‖a - e * a * e‖ ^ 2 < ε ^ 2 := by
474
+ nlinarith [norm_nonneg (b - e * b)]
475
+ exact (sq_lt_sq₀ (norm_nonneg _) hε.le).mp hfinal
476
+ rwa [(isClosed_Her b).closure_eq] at hc
477
+
478
+ lemma Her_mono {a b : A} (ha : 0 ≤ a) (hab : a ≤ b) : Her a ≤ Her b :=
479
+ Her_mono_of_mem (mem_Her_of_nonneg_le ha hab)
480
+
481
+ omit [PartialOrder A] [StarOrderedRing A] in
482
+ lemma real_smul_mem_Her {h a : A} (ha : a ∈ Her h) (r : ℝ) : r • a ∈ Her h := by
483
+ change r • a ∈ (Her h).toSubmodule
484
+ simpa only [Complex.coe_smul] using (Her h).smul_mem (r : ℂ) ha
485
+
486
+ lemma smul_Her_eq {h : A} (hh : 0 ≤ h) {r : ℝ} (hr : 0 < r) :
487
+ Her (r • h) = Her h := by
488
+ apply le_antisymm
489
+ · exact Her_mono_of_mem (real_smul_mem_Her (self_mem_Her hh) r)
490
+ · apply Her_mono_of_mem
491
+ have hm := real_smul_mem_Her (self_mem_Her (smul_nonneg hr.le hh)) r⁻¹
492
+ simpa only [smul_smul, inv_mul_cancel₀ (ne_of_gt hr), one_smul] using hm
493
+
494
+ lemma square_Her_eq {h : A} (hh : 0 ≤ h) : Her (h * h) = Her h := by
495
+ have hm : 0 ≤ h * h := by
496
+ simpa only [(IsSelfAdjoint.of_nonneg hh).star_eq] using star_mul_self_nonneg h
497
+ simpa only [CFC.sqrt_mul_self h hh] using (sqrt_Her_eq hm).symm
498
+
499
+ lemma Her_eq_of_order_bounds {a b : A} (ha : 0 ≤ a) (hb : 0 ≤ b)
500
+ {r R : ℝ} (hr : 0 < r) (hR : 0 < R) (hl : r • a ≤ b) (hu : b ≤ R • a) :
501
+ Her b = Her a := by
502
+ apply le_antisymm
503
+ · simpa only [smul_Her_eq ha hR] using Her_mono hb hu
504
+ · simpa only [smul_Her_eq ha hr] using Her_mono (smul_nonneg hr.le ha) hl
505
+
506
+ def cut (d : A) (ε : ℝ) : A := cfcₙ (fun t : ℝ => max (t - ε) 0) d
507
+
508
+ lemma cut_nonneg (d : A) (ε : ℝ) : 0 ≤ cut d ε := by
509
+ exact cfcₙ_nonneg (fun _ _ => le_max_right _ _)
510
+
511
+ lemma cut_mem_Her {d : A} (hd : 0 ≤ d) (ε : ℝ) : cut d ε ∈ Her d := by
512
+ exact cfcₙ_mem (𝕜' := ℂ) _ (self_mem_Her hd)
513
+
514
+ lemma cut_sandwich_lower {d : A} (hd : IsSelfAdjoint d) {ε : ℝ} (hε : 0 ≤ ε) :
515
+ ε • (cut d ε * cut d ε) ≤ cut d ε * d * cut d ε := by
516
+ let f : ℝ → ℝ := fun t => max (t - ε) 0
517
+ have hf : Continuous f := (continuous_id.sub continuous_const).max continuous_const
518
+ have hf0 : f 0 = 0 := by simp [f, max_eq_right (neg_nonpos.mpr hε)]
519
+ have hid : cfcₙ (fun t : ℝ => t) d = d := cfcₙ_id ℝ d hd
520
+ have hl : cfcₙ (fun t => ε * (f t * f t)) d = ε • (cut d ε * cut d ε) := by
521
+ rw [cfcₙ_const_mul ε (fun t => f t * f t) d (hf.mul hf).continuousOn
522
+ (by simp [hf0]), cfcₙ_mul f f d hf.continuousOn hf0 hf.continuousOn hf0]
523
+ rfl
524
+ have hu : cfcₙ (fun t => f t * t * f t) d = cut d ε * d * cut d ε := by
525
+ rw [cfcₙ_mul (fun t => f t * t) f d (hf.mul continuous_id).continuousOn
526
+ (by simp [hf0]) hf.continuousOn hf0,
527
+ cfcₙ_mul f (fun t => t) d hf.continuousOn hf0 continuousOn_id rfl, hid]
528
+ rfl
529
+ rw [← hl, ← hu]
530
+ apply (cfcₙ_le_iff _ _ d (continuous_const.mul (hf.mul hf)).continuousOn
531
+ ((hf.mul continuous_id).mul hf).continuousOn (by simp [hf0]) (by simp [hf0]) hd).mpr
532
+ intro t _
533
+ by_cases ht : ε ≤ t
534
+ · calc
535
+ ε * (f t * f t) ≤ t * (f t * f t) :=
536
+ mul_le_mul_of_nonneg_right ht (mul_self_nonneg _)
537
+ _ = f t * t * f t := by ring
538
+ · simp [f, max_eq_right (by linarith : t - ε ≤ 0)]
539
+
540
+ lemma cut_transport_lower {d v s : A} (hd : 0 ≤ d) (hv : 0 ≤ v)
541
+ {ε : ℝ} (hε : 0 ≤ ε) :
542
+ (ε - ‖d - star s * v * s‖) • (cut d ε * cut d ε) ≤
543
+ cut d ε * (star s * v * s) * cut d ε := by
544
+ let h := cut d ε
545
+ have hh : IsSelfAdjoint h := .of_nonneg (cut_nonneg d ε)
546
+ have hb : IsSelfAdjoint (d - star s * v * s) :=
547
+ (IsSelfAdjoint.of_nonneg hd).sub (.of_nonneg (star_left_conjugate_nonneg hv s))
548
+ have hbound : h * d * h - h * (star s * v * s) * h ≤
549
+ ‖d - star s * v * s‖ • (h * h) := by
550
+ simpa only [hh.star_eq, mul_sub, sub_mul] using
551
+ CStarAlgebra.star_left_conjugate_le_norm_smul h (d - star s * v * s) hb
552
+ calc
553
+ (ε - ‖d - star s * v * s‖) • (h * h) =
554
+ ε • (h * h) - ‖d - star s * v * s‖ • (h * h) := sub_smul _ _ _
555
+ _ ≤ h * d * h - ‖d - star s * v * s‖ • (h * h) :=
556
+ sub_le_sub_right (cut_sandwich_lower (.of_nonneg hd) hε) _
557
+ _ ≤ h * (star s * v * s) * h := (sub_le_comm).mp hbound
558
+
559
+ theorem regularTransport_of_approx {d v s : A} (hd : 0 ≤ d) (hv : 0 ≤ v)
560
+ {ε : ℝ} (hε : 0 < ε) (hs : ‖d - star s * v * s‖ < ε) :
561
+ Nonempty (RegularTransport (cut d ε) v) := by
562
+ let h := cut d ε
563
+ let z := CFC.sqrt v * s * h
564
+ have hhpos : 0 ≤ h := cut_nonneg d ε
565
+ have hh : IsSelfAdjoint h := .of_nonneg hhpos
566
+ have hvroot : IsSelfAdjoint (CFC.sqrt v) := .of_nonneg (CFC.sqrt_nonneg v)
567
+ have hzz : star z * z = h * (star s * v * s) * h := by
568
+ simp only [z, star_mul, hh.star_eq, hvroot.star_eq]
569
+ calc
570
+ h * (star s * CFC.sqrt v) * (CFC.sqrt v * s * h) =
571
+ h * (star s * (CFC.sqrt v * CFC.sqrt v) * s) * h := by noncomm_ring
572
+ _ = _ := by rw [CFC.sqrt_mul_sqrt_self v hv]
573
+ have hspos : 0 ≤ star s * v * s := star_left_conjugate_nonneg hv s
574
+ have hh2pos : 0 ≤ h * h := by simpa only [hh.star_eq] using star_mul_self_nonneg h
575
+ have hl : (ε - ‖d - star s * v * s‖) • (h * h) ≤ star z * z := by
576
+ rw [hzz]
577
+ exact cut_transport_lower hd hv hε.le
578
+ have hu : star z * z ≤ (‖star s * v * s‖ + 1) • (h * h) := by
579
+ rw [hzz]
580
+ calc
581
+ h * (star s * v * s) * h ≤ ‖star s * v * s‖ • (h * h) := by
582
+ simpa only [hh.star_eq] using
583
+ CStarAlgebra.star_left_conjugate_le_norm_smul h (star s * v * s) (.of_nonneg hspos)
584
+ _ ≤ _ := smul_le_smul_of_nonneg_right (by linarith) hh2pos
585
+ have heq : Her (star z * z) = Her h := by
586
+ rw [Her_eq_of_order_bounds hh2pos (star_mul_self_nonneg z)
587
+ (sub_pos.mpr hs) (by positivity) hl hu, square_Her_eq hhpos]
588
+ let q := CFC.sqrt (star z * z)
589
+ have hq : star z * z = star q * q := by
590
+ rw [(IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg (star z * z))).star_eq]
591
+ exact (CFC.sqrt_mul_sqrt_self _ (star_mul_self_nonneg z)).symm
592
+ have hqHer : Her q = Her h := (sqrt_Her_eq (star_mul_self_nonneg z)).trans heq
593
+ have hrange : Her z ≤ Her v := by
594
+ calc
595
+ Her z = Her (CFC.sqrt v * (s * h)) := by simp only [z, mul_assoc]
596
+ _ ≤ Her (CFC.sqrt v) := Her_mul_le _ _
597
+ _ = Her v := sqrt_Her_eq hv
598
+ let T : RegularTransport q v := {
599
+ carrier := carrier z q
600
+ hom := transportHom hq
601
+ inner := carrier_inner hq
602
+ outer := carrier_outer hq
603
+ mul := carrier_mul hq
604
+ image := fun k => hrange (conjugation_mem hq k) }
605
+ exact ⟨T.restrict hqHer.ge⟩
606
+
607
+ end Order
608
+
609
+ end MainGap
610
+
611
+ end
612
+
613
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/IdealComparison.lean ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.ClosedIdeal
2
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.IdealDetection
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+ open Filter
8
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
9
+
10
+ namespace MainGap
11
+ variable {A : Type*} [CStarAlgebra A]
12
+ local instance idealComparisonPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance idealComparisonStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+
15
+ lemma ScalarCuntzLE.conjugate_scalar {u v : A} (h : ScalarCuntzLE u v) (x : A) :
16
+ ScalarCuntzLE (star x * u * x) v := by
17
+ have hc : Continuous (fun z : A => star x * z * x) := by fun_prop
18
+ have hm := image_closure_subset_closure_image hc ⟨u, h, rfl⟩
19
+ apply closure_mono (s := (fun z : A => star x * z * x) ''
20
+ Set.range (fun w : A => star w * v * w)) _ hm
21
+ rintro _ ⟨_, ⟨w, rfl⟩, rfl⟩
22
+ exact ⟨w * x, by simp only [star_mul, mul_assoc]⟩
23
+
24
+ lemma scalarCuntzLE_left_square (x z : A) :
25
+ ScalarCuntzLE (star (x * z) * (x * z)) (star z * z) := by
26
+ have hnorm : star x * x ≤ (‖x‖ ^ 2 + 1) • (1 : A) := by
27
+ apply (CStarAlgebra.star_mul_le_algebraMap_norm_sq (a := x)).trans
28
+ rw [Algebra.algebraMap_eq_smul_one]
29
+ exact smul_le_smul_of_nonneg_right (by linarith) (zero_le_one : (0 : A) ≤ 1)
30
+ have h := star_left_conjugate_le_conjugate hnorm z
31
+ have hh : star (x * z) * (x * z) ≤ (‖x‖ ^ 2 + 1) • (star z * z) := by
32
+ simpa only [star_mul, mul_assoc, mul_smul_comm, smul_mul_assoc, mul_one] using h
33
+ exact (scalarCuntzLE_of_order (star_mul_self_nonneg _) hh).trans
34
+ (scalarCuntzLE_smul (star_mul_self_nonneg _) (by positivity))
35
+
36
+ lemma scalarCuntzLE_add_of_proper {u w v : A} (hv : ProperlyInfinite v)
37
+ (hu : ScalarCuntzLE u v) (hw : ScalarCuntzLE w v) : ScalarCuntzLE (u + w) v := by
38
+ have h := ((scalarCuntzLE_iff_finite _ _).mp hu).block
39
+ ((scalarCuntzLE_iff_finite _ _).mp hw)
40
+ have heq : matrixBlock (scalarCorner v) (scalarCorner v) = doubleCorner v := by
41
+ rw [← diagonalCorner_one v, matrixBlock_diagonal]
42
+ rfl
43
+ rw [heq] at h
44
+ have hh := h.trans hv
45
+ let Y : CStarMatrix (Fin 2) (Fin 1) A := CStarMatrix.ofMatrix (fun _ _ => 1)
46
+ have hy : Y.conjTranspose * matrixBlock (scalarCorner u) (scalarCorner w) * Y =
47
+ scalarCorner (u + w) := by
48
+ apply CStarMatrix.ext
49
+ intro i j
50
+ fin_cases i
51
+ fin_cases j
52
+ simp only [CStarMatrix.mul_apply, Fin.sum_univ_two]
53
+ rw [Fin.sum_univ_two]
54
+ change ((star (1 : A) * u + star 1 * 0) * 1 +
55
+ (star 1 * 0 + star 1 * w) * 1) = u + w
56
+ simp
57
+ exact (scalarCuntzLE_iff_finite _ _).mpr (by simpa only [hy] using hh.conjugate Y)
58
+
59
+ lemma square_add_le (x y : A) :
60
+ star (x + y) * (x + y) ≤ (2 : ℝ) • (star x * x + star y * y) := by
61
+ have hh := star_mul_self_nonneg (x - y)
62
+ have heq : (2 : ℝ) • (star x * x + star y * y) - star (x + y) * (x + y) =
63
+ star (x - y) * (x - y) := by
64
+ simp only [star_add, star_sub, two_smul]
65
+ noncomm_ring
66
+ rw [← sub_nonneg, heq]
67
+ exact hh
68
+
69
+ lemma square_comparison_add {x y v : A} (hv : ProperlyInfinite v)
70
+ (hx : ScalarCuntzLE (star x * x) v) (hy : ScalarCuntzLE (star y * y) v) :
71
+ ScalarCuntzLE (star (x + y) * (x + y)) v := by
72
+ exact (scalarCuntzLE_of_order (star_mul_self_nonneg _) (square_add_le x y)).trans
73
+ ((scalarCuntzLE_smul (add_nonneg (star_mul_self_nonneg _) (star_mul_self_nonneg _))
74
+ (by norm_num : (0 : ℝ) < 2)).trans (scalarCuntzLE_add_of_proper hv hx hy))
75
+
76
+ lemma idealSpan_square_comparison {v z : A} (hv : 0 ≤ v) (hpi : ProperlyInfinite v)
77
+ (hz : z ∈ idealSpan v) : ScalarCuntzLE (star z * z) v := by
78
+ induction hz using Submodule.span_induction with
79
+ | mem z hz =>
80
+ obtain ⟨x, y, rfl⟩ := hz
81
+ have hvv : ScalarCuntzLE (star v * v) v := by
82
+ apply scalarCuntzLE_of_mem_Her (star_mul_self_nonneg _) hv
83
+ rw [hv.isSelfAdjoint.star_eq]
84
+ exact mul_mem (self_mem_Her hv) (self_mem_Her hv)
85
+ have hh := ((scalarCuntzLE_left_square x v).trans hvv).conjugate_scalar y
86
+ simpa only [star_mul, mul_assoc] using hh
87
+ | zero =>
88
+ exact subset_closure ⟨0, by simp⟩
89
+ | add x y hx hy ihx ihy => exact square_comparison_add hpi ihx ihy
90
+ | smul c x hx ih =>
91
+ have hh := (scalarCuntzLE_left_square (c • (1 : A)) x).trans ih
92
+ simpa only [smul_mul_assoc, one_mul] using hh
93
+
94
+ theorem closedIdeal_comparison {u v : A} (hu : 0 ≤ u) (hv : 0 ≤ v)
95
+ (hpi : ProperlyInfinite v) (h : u ∈ closedIdeal v hv.isSelfAdjoint) :
96
+ ScalarCuntzLE u v := by
97
+ let J := closedIdeal v hv.isSelfAdjoint
98
+ have hs : CFC.sqrt u ∈ J := by
99
+ rw [CFC.sqrt_eq_real_sqrt u hu]
100
+ let : IsClosed (J : Set A) := closedIdeal_closed v hv.isSelfAdjoint
101
+ exact cfcₙ_mem (𝕜' := ℂ) Real.sqrt h
102
+ have hc : Continuous (fun x : A => star x * x) := by fun_prop
103
+ have hh := image_closure_subset_closure_image hc ⟨CFC.sqrt u, hs, rfl⟩
104
+ simp only [(CFC.sqrt_nonneg u).isSelfAdjoint.star_eq, CFC.sqrt_mul_sqrt_self u hu] at hh
105
+ apply isClosed_closure.closure_subset_iff.mpr _ hh
106
+ rintro _ ⟨x, hx, rfl⟩
107
+ exact idealSpan_square_comparison hv hpi hx
108
+
109
+ end MainGap
110
+
111
+ namespace MainGap
112
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
113
+ local instance idealComparisonNonUnitalPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
114
+ local instance idealComparisonNonUnitalStarOrderedRing : StarOrderedRing A :=
115
+ CStarAlgebra.spectralOrderedRing A
116
+
117
+ lemma scalarCuntzLE_of_inr {u v : A} (hv : 0 ≤ v)
118
+ (h : ScalarCuntzLE (Unitization.inr u : Unitization ℂ A) (Unitization.inr v)) :
119
+ ScalarCuntzLE u v := by
120
+ let V : Unitization ℂ A := Unitization.inr v
121
+ have hc : IsClosed {z : Unitization ℂ A | ScalarCuntzLE z.snd v} :=
122
+ isClosed_closure.preimage Unitization.continuous_snd
123
+ apply closure_minimal (s := Set.range (fun w : Unitization ℂ A => star w * V * w)) _ hc h
124
+ rintro _ ⟨w, rfl⟩
125
+ change ScalarCuntzLE (star w * V * w).snd v
126
+ let hau := CStarAlgebra.increasingApproximateUnit A
127
+ let x := CFC.sqrt v
128
+ have hxx : star x * x = v := by
129
+ rw [(CFC.sqrt_nonneg v).isSelfAdjoint.star_eq, CFC.sqrt_mul_sqrt_self v]
130
+ have ht : Tendsto (fun e : A => star (x * e) * (x * e))
131
+ (CStarAlgebra.approximateUnit A) (𝓝 v) := by
132
+ simpa only [hxx] using (hau.tendsto_mul_left x).star.mul (hau.tendsto_mul_left x)
133
+ have hti := (Unitization.continuous_inr (𝕜 := ℂ)).tendsto v |>.comp ht
134
+ have htfinal : Tendsto
135
+ (fun e : A => (star w * (Unitization.inr (star (x*e)*(x*e)) : Unitization ℂ A) * w).snd)
136
+ (CStarAlgebra.approximateUnit A) (𝓝 (star w * V * w).snd) :=
137
+ Unitization.continuous_snd.tendsto _ |>.comp (tendsto_const_nhds.mul hti |>.mul tendsto_const_nhds)
138
+ apply isClosed_closure.mem_of_tendsto htfinal
139
+ apply Filter.Eventually.of_forall
140
+ intro e
141
+ let r : A := ((Unitization.inr e : Unitization ℂ A) * w).snd
142
+ have hr : (Unitization.inr r : Unitization ℂ A) = Unitization.inr e * w := by
143
+ have he := Unitization.inl_fst_add_inr_snd_eq ((Unitization.inr e : Unitization ℂ A) * w)
144
+ simpa [r] using he
145
+ have heq : (star w * (Unitization.inr (star (x*e)*(x*e)) : Unitization ℂ A) * w).snd =
146
+ star r * v * r := by
147
+ apply Unitization.inr_injective (R := ℂ)
148
+ have hs : (Unitization.inr (star r * v * r) : Unitization ℂ A) =
149
+ star w * Unitization.inr (star (x*e)*(x*e)) * w := by
150
+ simp only [Unitization.inr_mul, Unitization.inr_star, hr, star_mul]
151
+ have hx := congrArg (Unitization.inr : A → Unitization ℂ A) hxx
152
+ simp only [Unitization.inr_mul, Unitization.inr_star] at hx
153
+ simp only [mul_assoc] at hx ⊢
154
+ rw [← hx]
155
+ simp only [mul_assoc]
156
+ rw [← hs]
157
+ rfl
158
+ exact heq ▸ subset_closure ⟨r, rfl⟩
159
+
160
+ end MainGap
161
+
162
+ end
163
+
164
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/IdealDetection.lean ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.PositiveFunctional
2
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Separation
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+ open Filter
8
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
9
+
10
+ namespace MainGap
11
+ universe u
12
+ variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
13
+
14
+ def compressedPositive (f : A →ₚ[ℂ] ℂ) (u : A) : A →ₚ[ℂ] ℂ where
15
+ toFun a := f (star u * a * u)
16
+ map_add' a b := by simp only [mul_add, add_mul, map_add]
17
+ map_smul' c a := by simp only [mul_smul_comm, smul_mul_assoc, map_smul, RingHom.id_apply]
18
+ monotone' := fun _ _ hab => f.monotone (star_left_conjugate_le_conjugate hab _)
19
+
20
+ lemma compressedPositive_norm (f : A →ₚ[ℂ] ℂ) (hf : ∀ a, ‖f a‖ ≤ ‖a‖)
21
+ {u : A} (hu : ‖u‖ ≤ 1) (a : A) : ‖compressedPositive f u a‖ ≤ ‖a‖ := by
22
+ calc
23
+ ‖compressedPositive f u a‖ ≤ ‖star u * a * u‖ := hf _
24
+ _ ≤ ‖u‖ * ‖a‖ * ‖u‖ := by
25
+ grw [norm_mul_le, norm_mul_le, norm_star]
26
+ _ ≤ 1 * ‖a‖ * 1 := by gcongr
27
+ _ = ‖a‖ := by ring
28
+
29
+ lemma compressedPositive_square (f : A →ₚ[ℂ] ℂ) (u a : A) :
30
+ compressedPositive f u (star a * a) = f (star (a * u) * (a * u)) := by
31
+ change f (star u * (star a * a) * u) = _
32
+ simp only [star_mul, mul_assoc]
33
+
34
+ lemma norm_one_sub_positive_contraction {e : A} (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) :
35
+ ‖1 - e‖ ≤ 1 := by
36
+ have he1 : e ≤ 1 := (CStarAlgebra.norm_le_one_iff_of_nonneg e he).mp hen
37
+ exact (CStarAlgebra.norm_le_one_iff_of_nonneg (1 - e) (sub_nonneg.mpr he1)).mpr
38
+ (sub_le_self _ he)
39
+
40
+ lemma exists_rep_killing_ideal (J : NonUnitalStarSubalgebra ℂ A)
41
+ (hJ : IsClosed (J : Set A))
42
+ (hleft : ∀ a : A, ∀ z ∈ J, a * z ∈ J)
43
+ (hright : ∀ a : A, ∀ z ∈ J, z * a ∈ J)
44
+ {a : A} (ha : a ∉ J) :
45
+ ∃ R : HilbertRep.{u,u} A, (∀ z ∈ J, R.hom z = 0) ∧ R.hom a ≠ 0 := by
46
+ classical
47
+ have : Nontrivial A := ⟨⟨a, 0, fun h => ha (h.symm ▸ J.zero_mem)⟩⟩
48
+ have : CompleteSpace J := hJ.completeSpace_coe
49
+ let : PartialOrder J := CStarAlgebra.spectralOrder J
50
+ let : StarOrderedRing J := CStarAlgebra.spectralOrderedRing J
51
+ have hau := CStarAlgebra.increasingApproximateUnit J
52
+ let I := {e : J // @LE.le J (CStarAlgebra.spectralOrder J).toLE 0 e ∧ ‖e‖ ≤ 1}
53
+ let F : Filter I := Filter.comap Subtype.val (CStarAlgebra.approximateUnit J)
54
+ have : F.NeBot := Filter.NeBot.comap_of_range_mem inferInstance (by
55
+ filter_upwards [hau.eventually_nonneg.and hau.eventually_norm] with e he
56
+ exact ⟨⟨e, he⟩, rfl⟩)
57
+ let ω := Ultrafilter.of F
58
+ have hω : (ω : Filter I) ≤ F := Ultrafilter.of_le F
59
+ have hunit (z : J) : Tendsto (fun e : I => (z : A) * (1 - (e.val : A)))
60
+ (ω : Filter I) (𝓝 0) := by
61
+ have hh := (continuous_subtype_val.tendsto z).comp
62
+ (hau.tendsto_mul_left z |>.comp (Filter.tendsto_comap.mono_left hω))
63
+ have hz := (tendsto_const_nhds (x := (z : A))).sub hh
64
+ convert hz using 1 <;> simp only [mul_sub, mul_one, sub_self]
65
+ rfl
66
+ have hadef : a ∉ closure (J : Set A) := by rwa [hJ.closure_eq]
67
+ rw [Metric.mem_closure_iff] at hadef
68
+ push Not at hadef
69
+ obtain ⟨r, hr, hdist⟩ := hadef
70
+ have hlower (e : I) : r ≤ ‖a * (1 - (e.val : A))‖ := by
71
+ have hh := hdist (a * (e.val : A)) (hleft a _ e.val.property)
72
+ simpa only [dist_eq_norm, mul_sub, mul_one] using hh
73
+ have hen (e : I) : ‖1 - (e.val : A)‖ ≤ 1 := by
74
+ apply norm_one_sub_positive_contraction
75
+ · obtain ⟨b, hb⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp e.property.1
76
+ have hm := congrArg (fun z : J => (z : A)) hb
77
+ change (e.val : A) = star (b : A) * (b : A) at hm
78
+ rw [hm]
79
+ exact star_mul_self_nonneg _
80
+ · exact e.property.2
81
+ have hex (e : I) := exists_norming_positive (A := A)
82
+ (star_mul_self_nonneg (a * (1 - (e.val : A))))
83
+ choose f hf hfa using hex
84
+ let g (e : I) := compressedPositive (f e) (1 - (e.val : A))
85
+ have hg (e : I) (z : A) : ‖g e z‖ ≤ ‖z‖ := compressedPositive_norm (f e) (hf e) (hen e) z
86
+ let L := ultraPositive ω g hg
87
+ have hL (z : A) (hz : z ∈ J) : L.gnsStarAlgHom z = 0 := by
88
+ change L.gnsNonUnitalStarAlgHom z = 0
89
+ apply gns_zero_of_sandwich
90
+ intro b
91
+ apply ultraPositive_eq_zero_of_tendsto
92
+ have hlim := (hunit ⟨z * b, hright b z hz⟩).norm
93
+ apply squeeze_zero_norm (fun e => ?_) (by simpa only [norm_zero, mul_zero] using hlim.mul hlim)
94
+ calc
95
+ ‖g e (star (z * b) * (z * b))‖ =
96
+ ‖f e (star ((z * b) * (1 - (e.val : A))) * ((z * b) * (1 - (e.val : A))))‖ := by
97
+ change ‖compressedPositive (f e) (1 - (e.val : A)) (star (z * b) * (z * b))‖ = _
98
+ rw [compressedPositive_square]
99
+ _ ≤ ‖star ((z * b) * (1 - (e.val : A))) * ((z * b) * (1 - (e.val : A)))‖ := hf e _
100
+ _ = _ := CStarRing.norm_star_mul_self
101
+ have hnon : L (star a * a) ≠ 0 := by
102
+ have hv (e : I) : g e (star a * a) = (‖a * (1 - (e.val : A))‖ ^ 2 : ℝ) := by
103
+ change compressedPositive (f e) (1 - (e.val : A)) (star a * a) = _
104
+ rw [compressedPositive_square, hfa e, CStarRing.norm_star_mul_self, pow_two]
105
+ have hb : (r ^ 2 : ℂ) ≤ L (star a * a) :=
106
+ ge_of_tendsto' (tendsto_ultraPositive ω g hg _) (fun e => by
107
+ rw [hv e]
108
+ exact_mod_cast pow_le_pow_left₀ hr.le (hlower e) 2)
109
+ intro heq
110
+ rw [heq] at hb
111
+ have : r ^ 2 ≤ 0 := by exact_mod_cast hb
112
+ nlinarith
113
+ exact ⟨⟨L.GNS, L.gnsStarAlgHom⟩, hL, gnsStar_nonzero_of_value L a hnon⟩
114
+ end MainGap
115
+
116
+ namespace MainGap
117
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
118
+ local instance idealDetectionOrder : PartialOrder A := CStarAlgebra.spectralOrder A
119
+ local instance idealDetectionStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
120
+
121
+ def ScalarCuntzLE (u v : A) : Prop :=
122
+ u ∈ closure (Set.range (fun w : A => star w * v * w))
123
+
124
+ lemma scalarCuntzLE_iff_finite (u v : A) :
125
+ ScalarCuntzLE u v ↔ FiniteCuntzLE (scalarCorner u) (scalarCorner v) := by
126
+ let E : A ≃⋆ₐ[ℂ] CStarMatrix (Fin 1) (Fin 1) A :=
127
+ CStarMatrix.toOneByOne (Fin 1) ℂ A
128
+ have hc : Continuous E := (StarAlgEquiv.isometry E).continuous
129
+ have hci : Continuous E.symm := (StarAlgEquiv.isometry E.symm).continuous
130
+ rw [finiteCuntzLE_iff_closure]
131
+ change u ∈ closure (Set.range (fun w : A => star w * v * w)) ↔
132
+ E u ∈ closure (Set.range (fun w : CStarMatrix (Fin 1) (Fin 1) A =>
133
+ star w * E v * w))
134
+ constructor
135
+ · intro h
136
+ apply closure_mono (s := E '' Set.range (fun w : A => star w * v * w)) _
137
+ (image_closure_subset_closure_image hc ⟨u, h, rfl⟩)
138
+ rintro _ ⟨_, ⟨w, rfl⟩, rfl⟩
139
+ exact ⟨E w, by simp [map_star]⟩
140
+ · intro h
141
+ have hh := image_closure_subset_closure_image hci ⟨E u, h, rfl⟩
142
+ simp only [StarAlgEquiv.symm_apply_apply] at hh
143
+ apply closure_mono (s := E.symm '' Set.range (fun w => star w * E v * w)) _ hh
144
+ rintro _ ⟨_, ⟨w, rfl⟩, rfl⟩
145
+ exact ⟨E.symm w, by simp [map_star]⟩
146
+
147
+ lemma ScalarCuntzLE.exists_approx {u v : A} (h : ScalarCuntzLE u v)
148
+ {ε : ℝ} (hε : 0 < ε) : ∃ w : A, ‖star w * v * w - u‖ < ε := by
149
+ obtain ⟨_, ⟨w, rfl⟩, hw⟩ := Metric.mem_closure_iff.mp h ε hε
150
+ exact ⟨w, by simpa only [dist_eq_norm, norm_sub_rev] using hw⟩
151
+
152
+ lemma ScalarCuntzLE.trans {u v w : A} (h : ScalarCuntzLE u v)
153
+ (h' : ScalarCuntzLE v w) : ScalarCuntzLE u w :=
154
+ (scalarCuntzLE_iff_finite _ _).mpr
155
+ (((scalarCuntzLE_iff_finite _ _).mp h).trans ((scalarCuntzLE_iff_finite _ _).mp h'))
156
+
157
+ lemma scalarCuntzLE_of_mem_Her {u v : A} (hu : 0 ≤ u) (hv : 0 ≤ v)
158
+ (h : u ∈ Her v) : ScalarCuntzLE u v := by
159
+ have hs := sqrt_mem_Her h hu
160
+ have hc : Continuous (fun z : A => star z * z) := by fun_prop
161
+ have hm := image_closure_subset_closure_image hc ⟨CFC.sqrt u, hs, rfl⟩
162
+ simp only [(CFC.sqrt_nonneg u).isSelfAdjoint.star_eq, CFC.sqrt_mul_sqrt_self u hu] at hm
163
+ apply closure_mono (s := (fun z : A => star z * z) ''
164
+ Set.range (fun w : A => v * w * star v)) _ hm
165
+ rintro _ ⟨_, ⟨w, rfl⟩, rfl⟩
166
+ refine ⟨CFC.sqrt v * w * v, ?_⟩
167
+ have hsv := (CFC.sqrt_nonneg v).isSelfAdjoint.star_eq
168
+ have hsq := CFC.sqrt_mul_sqrt_self v hv
169
+ simp only [star_mul, hv.isSelfAdjoint.star_eq, hsv, mul_assoc]
170
+ have hh : CFC.sqrt v * v * CFC.sqrt v = v * v := by
171
+ calc
172
+ _ = CFC.sqrt v * (CFC.sqrt v * CFC.sqrt v) * CFC.sqrt v :=
173
+ congrArg (fun t => CFC.sqrt v * t * CFC.sqrt v) hsq.symm
174
+ _ = (CFC.sqrt v * CFC.sqrt v) * (CFC.sqrt v * CFC.sqrt v) := by noncomm_ring
175
+ _ = v * v := by rw [hsq]
176
+ calc
177
+ _ = v * star w * (CFC.sqrt v * v * CFC.sqrt v) * w * v := by noncomm_ring
178
+ _ = _ := by rw [hh]; noncomm_ring
179
+
180
+ lemma scalarCuntzLE_of_order {u v : A} (hu : 0 ≤ u) (h : u ≤ v) :
181
+ ScalarCuntzLE u v := scalarCuntzLE_of_mem_Her hu (hu.trans h) (mem_Her_of_nonneg_le hu h)
182
+
183
+ lemma scalarCuntzLE_smul {v : A} (hv : 0 ≤ v) {K : ℝ} (hK : 0 < K) :
184
+ ScalarCuntzLE (K • v) v := by
185
+ apply scalarCuntzLE_of_mem_Her (smul_nonneg hK.le hv) hv
186
+ exact real_smul_mem_Her (self_mem_Her hv) K
187
+
188
+ end MainGap
189
+
190
+ end
191
+
192
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Main.lean ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Diagonalization
2
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.MatrixEntries
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+ open Filter
8
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
9
+
10
+ namespace MainGap.Manuscript
11
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
12
+ local instance positivityOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance positivityStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+
15
+ def CuntzLE (d v : Stable.Stabilization A) : Prop :=
16
+ ∃ r : ℕ → Stable.Stabilization A,
17
+ Tendsto (fun j => star (r j) * v * r j) atTop (𝓝 d)
18
+
19
+ def ProperlyInfinite (h : A) : Prop :=
20
+ CuntzLE ((⟦⟨2, MainGap.doubleCorner h⟩⟧ : Stable.Algebraic A) : Stable.Stabilization A)
21
+ ((⟦⟨1, MainGap.scalarCorner h⟩⟧ : Stable.Algebraic A) : Stable.Stabilization A)
22
+
23
+ def PropertyP (A : Type*) [NonUnitalCStarAlgebra A] : Prop :=
24
+ ∀ h : A, 0 ≤ h → ProperlyInfinite h
25
+
26
+ lemma finiteCuntzLE_of_stable {m n : ℕ} (d : Stable.Mat A n) (v : Stable.Mat A m)
27
+ (h : CuntzLE (Stable.corner n d) (Stable.corner m v)) : MainGap.FiniteCuntzLE d v := by
28
+ obtain ⟨r,hr⟩ := h
29
+ refine ⟨fun j => Stable.block m n (r j), ?_⟩
30
+ have ht := (Stable.continuous_block (A := A) n n).continuousAt.tendsto.comp hr
31
+ simpa only [Function.comp_def, Stable.block_conjugate, Stable.block_corner_self] using ht
32
+
33
+ lemma PropertyP.finite (hP : PropertyP A) : MainGap.PropertyP A := by
34
+ intro h hh
35
+ exact finiteCuntzLE_of_stable _ _ (hP h hh)
36
+
37
+ theorem individual_to_strong (hP : PropertyP A) : MainGap.UnrestrictedDiagonalization A :=
38
+ MainGap.individual_to_strong hP.finite
39
+
40
+ theorem individual_to_strong_spi (hP : PropertyP A) : MainGap.StronglyPurelyInfinite A :=
41
+ MainGap.individual_to_strong_spi hP.finite
42
+
43
+ theorem individual_to_strong_main (hP : PropertyP A) :
44
+ (∀ a b : A, 0 ≤ a → 0 ≤ b → ∀ c : A, ∀ ε : ℝ, 0 < ε →
45
+ ∃ s t : A,
46
+ ‖star s * a * s - a‖ < ε ∧
47
+ ‖star t * b * t - b‖ < ε ∧
48
+ ‖star s * c * t‖ < ε) ∧
49
+ MainGap.StronglyPurelyInfinite A := by
50
+ exact ⟨individual_to_strong hP, individual_to_strong_spi hP⟩
51
+
52
+ end MainGap.Manuscript
53
+
54
+ end
55
+
56
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/MatrixEntries.lean ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Stabilization
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap.Stable
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance matrixEntryOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance matrixEntryStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+ local instance algebraicTopology' : TopologicalSpace (Algebraic A) :=
14
+ (inferInstance : PseudoMetricSpace (Algebraic A)).toUniformSpace.toTopologicalSpace
15
+
16
+ def paddedEntry (i j n : ℕ) (x : Mat A n) : A :=
17
+ if hi : i < n then if hj : j < n then x ⟨i,hi⟩ ⟨j,hj⟩ else 0 else 0
18
+
19
+ lemma paddedEntry_pad (i j : ℕ) {n m : ℕ} (h : n ≤ m) (x : Mat A n) :
20
+ paddedEntry i j m (pad h x) = paddedEntry i j n x := by
21
+ by_cases hi : i < n <;> by_cases hj : j < n
22
+ · have hi' := lt_of_lt_of_le hi h
23
+ have hj' := lt_of_lt_of_le hj h
24
+ simp [paddedEntry, hi, hj, hi', hj', pad_entry]
25
+ · by_cases hi' : i < m <;> by_cases hj' : j < m <;>
26
+ simp [paddedEntry, hi, hj, hi', hj', pad_entry]
27
+ · by_cases hi' : i < m <;> by_cases hj' : j < m <;>
28
+ simp [paddedEntry, hi, hi', hj', pad_entry]
29
+ · by_cases hi' : i < m <;> by_cases hj' : j < m <;>
30
+ simp [paddedEntry, hi, hi', hj', pad_entry]
31
+
32
+ def entryAlgLinear (i j : ℕ) : Algebraic A →ₗ[ℂ] A where
33
+ toFun := DirectLimit.lift _ (paddedEntry i j) (fun _ _ h x => (paddedEntry_pad i j h x).symm)
34
+ map_add' := DirectLimit.induction₂ _ fun n x y => by
35
+ rw [DirectLimit.add_def]
36
+ change paddedEntry i j n (x+y) = paddedEntry i j n x + paddedEntry i j n y
37
+ by_cases hi : i < n <;> by_cases hj : j < n <;> simp [paddedEntry, hi, hj]
38
+ map_smul' c := DirectLimit.induction _ fun n x => by
39
+ rw [DirectLimit.smul_def]
40
+ change paddedEntry i j n (c • x) = c • paddedEntry i j n x
41
+ by_cases hi : i < n <;> by_cases hj : j < n <;> simp [paddedEntry, hi, hj]
42
+
43
+ @[simp] lemma entryAlgLinear_corner (i j n : ℕ) (x : Mat A n) :
44
+ entryAlgLinear i j (cornerAlg n x) = paddedEntry i j n x := rfl
45
+
46
+ lemma norm_entryAlgLinear_le (i j : ℕ) (x : Algebraic A) :
47
+ ‖entryAlgLinear i j x‖ ≤ ‖x‖ := by
48
+ induction x using DirectLimit.induction with
49
+ | ih n x =>
50
+ change ‖paddedEntry i j n x‖ ≤ ‖x‖
51
+ by_cases hi : i < n <;> by_cases hj : j < n
52
+ · simpa [paddedEntry, hi, hj] using
53
+ (CStarMatrix.norm_entry_le_norm (M := x) (i := ⟨i,hi⟩) (j := ⟨j,hj⟩))
54
+ all_goals simp [paddedEntry, hi, hj]
55
+
56
+ def entryAlg (i j : ℕ) : Algebraic A →L[ℂ] A :=
57
+ (entryAlgLinear i j).mkContinuous 1 (fun x => by simpa using norm_entryAlgLinear_le i j x)
58
+
59
+ def entry (i j : ℕ) : Stabilization A → A :=
60
+ UniformSpace.Completion.extension (entryAlg (A := A) i j)
61
+
62
+ lemma continuous_entry (i j : ℕ) : Continuous (entry (A := A) i j) :=
63
+ UniformSpace.Completion.continuous_extension
64
+
65
+ @[simp] lemma entry_coe (i j : ℕ) (x : Algebraic A) :
66
+ entry i j (x : Stabilization A) = entryAlg (A := A) i j x := by
67
+ unfold entry
68
+ exact UniformSpace.Completion.extension_coe (f := (entryAlg (A := A) i j))
69
+ (ContinuousLinearMap.uniformContinuous (entryAlg (A := A) i j)) x
70
+
71
+ @[simp] lemma entry_corner (i j n : ℕ) (x : Mat A n) :
72
+ entry i j (corner n x) = paddedEntry i j n x := by
73
+ rw [corner_apply, entry_coe]
74
+ rfl
75
+
76
+ def block (m n : ℕ) (x : Stabilization A) : CStarMatrix (Fin m) (Fin n) A :=
77
+ CStarMatrix.ofMatrix fun i j => entry i.val j.val x
78
+
79
+ @[simp] lemma block_apply (m n : ℕ) (x : Stabilization A) (i : Fin m) (j : Fin n) :
80
+ block m n x i j = entry i.val j.val x := rfl
81
+
82
+ lemma continuous_block (m n : ℕ) : Continuous (block (A := A) m n) := by
83
+ exact continuous_pi fun i => continuous_pi fun j => (continuous_entry i.val j.val)
84
+
85
+ @[simp] lemma block_corner_self (n : ℕ) (x : Mat A n) : block n n (corner n x) = x := by
86
+ ext i j
87
+ simp only [block_apply, entry_corner, paddedEntry, dite_eq_left i.isLt, dite_eq_left j.isLt]
88
+
89
+ end MainGap.Stable
90
+
91
+ namespace MainGap.Stable
92
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
93
+ local instance blockConjugateOrder : PartialOrder A := CStarAlgebra.spectralOrder A
94
+ local instance blockConjugateStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
95
+ local instance algebraicTopology'' : TopologicalSpace (Algebraic A) :=
96
+ (inferInstance : PseudoMetricSpace (Algebraic A)).toUniformSpace.toTopologicalSpace
97
+
98
+ lemma paddedEntry_star (i j n : ℕ) (x : Mat A n) :
99
+ paddedEntry i j n (star x) = star (paddedEntry j i n x) := by
100
+ by_cases hi : i < n <;> by_cases hj : j < n <;>
101
+ simp [paddedEntry, hi, hj, CStarMatrix.star_apply]
102
+
103
+ lemma paddedEntry_mul (i j n : ℕ) (x y : Mat A n) :
104
+ paddedEntry i j n (x*y) =
105
+ ∑ k : Fin n, paddedEntry i k.val n x * paddedEntry k.val j n y := by
106
+ by_cases hi : i < n <;> by_cases hj : j < n <;>
107
+ simp [paddedEntry, hi, hj, CStarMatrix.mul_apply]
108
+
109
+ lemma paddedEntry_conjugate (i j : ℕ) {m N : ℕ} (h : m ≤ N)
110
+ (z : Mat A N) (v : Mat A m) :
111
+ paddedEntry i j N (star z * pad h v * z) =
112
+ ∑ q : Fin m, ∑ p : Fin m,
113
+ star (paddedEntry p.val i N z) * v p q * paddedEntry q.val j N z := by
114
+ classical
115
+ simp only [paddedEntry_mul, paddedEntry_star, paddedEntry_pad]
116
+ rw [← sum_pad h (fun q : Fin m => ∑ p : Fin m,
117
+ star (paddedEntry p.val i N z) * v p q * paddedEntry q.val j N z)]
118
+ apply Finset.sum_congr rfl
119
+ intro q _
120
+ by_cases hq : q.val < m
121
+ · rw [dite_eq_left hq, Finset.sum_mul]
122
+ rw [← sum_pad h (fun p : Fin m =>
123
+ star (paddedEntry p.val i N z) * v p ⟨q,hq⟩ * paddedEntry q.val j N z)]
124
+ apply Finset.sum_congr rfl
125
+ intro p _
126
+ by_cases hp : p.val < m <;> simp [paddedEntry, hp, hq]
127
+ · simp [paddedEntry, hq]
128
+
129
+ lemma block_conjugate_corner {m N : ℕ} (h : m ≤ N) (n : ℕ)
130
+ (v : Mat A m) (z : Mat A N) :
131
+ block n n (star (corner N z) * corner m v * corner N z) =
132
+ (block m n (corner N z)).conjTranspose * v * block m n (corner N z) := by
133
+ rw [← corner_pad h v]
134
+ have he : star (corner N z) * corner N (pad h v) * corner N z =
135
+ corner N (star z * pad h v * z) := by rw [map_mul, map_mul, map_star]
136
+ rw [he]
137
+ ext i j
138
+ simp only [block_apply, entry_corner, CStarMatrix.mul_apply,
139
+ CStarMatrix.conjTranspose_apply, Finset.sum_mul]
140
+ exact paddedEntry_conjugate i.val j.val h z v
141
+
142
+ lemma block_conjugate (m n : ℕ) (v : Mat A m) (x : Stabilization A) :
143
+ block n n (star x * corner m v * x) =
144
+ (block m n x).conjTranspose * v * block m n x := by
145
+ refine UniformSpace.Completion.induction_on x ?_ ?_
146
+ · apply isClosed_eq
147
+ · exact (continuous_block n n).comp ((continuous_star.mul continuous_const).mul continuous_id)
148
+ · have hc : Continuous (fun x : Stabilization A => (block m n x).conjTranspose) := by
149
+ change Continuous (fun x : Stabilization A =>
150
+ fun i j => star (block m n x j i))
151
+ exact continuous_pi fun i => continuous_pi fun j =>
152
+ continuous_star.comp (continuous_entry j.val i.val)
153
+ exact (hc.matrix_mul continuous_const).matrix_mul (continuous_block m n)
154
+ · intro z
155
+ induction z using DirectLimit.induction with
156
+ | ih k z =>
157
+ change block n n (star (corner k z) * corner m v * corner k z) =
158
+ (block m n (corner k z)).conjTranspose * v * block m n (corner k z)
159
+ rw [← corner_pad (le_max_right m k) z]
160
+ exact block_conjugate_corner (le_max_left m k) n v _
161
+
162
+ end MainGap.Stable
163
+
164
+ end
165
+
166
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Nonvanishing.lean ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Graph
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ universe u v
11
+ variable {A : Type u} [CStarAlgebra A]
12
+ local instance nonvanishingPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance nonvanishingStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+ local instance nonvanishingOperatorPartialOrder (J : Type*)
15
+ [NormedAddCommGroup J] [InnerProductSpace ℂ J] [CompleteSpace J] :
16
+ PartialOrder (J →L[ℂ] J) := CStarAlgebra.spectralOrder _
17
+ local instance nonvanishingOperatorStarOrderedRing (J : Type*)
18
+ [NormedAddCommGroup J] [InnerProductSpace ℂ J] [CompleteSpace J] :
19
+ StarOrderedRing (J →L[ℂ] J) := CStarAlgebra.spectralOrderedRing _
20
+ lemma cut_eq_zero_of_norm_le {a : A} (ha : 0 ≤ a) {l : ℝ} (hl : ‖a‖ ≤ l) :
21
+ cut a l = 0 := by
22
+ apply norm_eq_zero.mp
23
+ apply le_antisymm _ (norm_nonneg _)
24
+ change ‖cfcₙ (fun t : ℝ => max (t-l) 0) a‖ ≤ 0
25
+ apply norm_cfcₙ_le
26
+ intro r hr
27
+ have hb := NonUnitalIsometricContinuousFunctionalCalculus.norm_quasispectrum_le a hr
28
+ ha.isSelfAdjoint
29
+ have hb' : |r| ≤ ‖a‖ := by simpa only [Real.norm_eq_abs] using hb
30
+ have ht : r ≤ l := (le_abs_self r).trans (hb'.trans hl)
31
+ rw [max_eq_right (sub_nonpos.mpr ht), norm_zero]
32
+
33
+ theorem quantitative_nonvanishing {d y : A} (hy : 0 ≤ y)
34
+ (h : ∀ R : HilbertRep.{u,u} A, R.hom d=0 → ‖R.hom y‖ ≤ (1/4 : ℝ)) :
35
+ ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ ∀ R : HilbertRep.{u,u} A,
36
+ (3/8 : ℝ) < ‖R.hom y‖ → δ < ‖R.hom d‖ := by
37
+ classical
38
+ by_contra! hh
39
+ let η : ℕ → ℝ := fun n => 1 / ((n : ℝ)+2)
40
+ have hηpos (n : ℕ) : 0 < η n := by dsimp [η]; positivity
41
+ have hηlt (n : ℕ) : η n < 1 := by
42
+ dsimp [η]
43
+ apply (div_lt_one (by positivity)).mpr
44
+ linarith [Nat.cast_nonneg (α := ℝ) n]
45
+ have hbad (n : ℕ) : ∃ R : HilbertRep.{u,u} A,
46
+ (3/8 : ℝ) < ‖R.hom y‖ ∧ ‖R.hom d‖ ≤ η n := hh (η n) (hηpos n) (hηlt n)
47
+ choose R hRy hRd using hbad
48
+ let π := fun n => (R n).hom
49
+ let a := cut y (5/16)
50
+ have ha : ∀ n, (1/16 : ℝ) < ‖π n a‖ := by
51
+ intro n
52
+ have h₁ : ‖π n y - π n a‖ ≤ (5/16 : ℝ) := by
53
+ rw [← map_sub]
54
+ exact (NonUnitalStarAlgHom.norm_apply_le (π n) _).trans
55
+ (norm_sub_cut_le hy (by norm_num))
56
+ have h₂ := norm_sub_norm_le (π n y) (π n a)
57
+ have h₃ := hRy n
58
+ change (3/8 : ℝ) < ‖π n y‖ at h₃
59
+ linarith
60
+ choose ξ hξ hξa using fun n => (π n a).exists_lt_apply_of_lt_opNorm (ha n)
61
+ have hnξ : ∀ n, ‖ξ n‖ ≤ 1 := fun n => (hξ n).le
62
+ let ω : Ultrafilter ℕ := Ultrafilter.of atTop
63
+ have hω : (ω : Filter ℕ) ≤ atTop := Ultrafilter.of_le _
64
+ have hη : Tendsto η (ω : Filter ℕ) (𝓝 0) := by
65
+ have he : η = fun n : ℕ => 1 / (((n+1 : ℕ) : ℝ)+1) := by
66
+ funext n
67
+ dsimp [η]
68
+ push_cast
69
+ congr 1; ring
70
+ rw [he]
71
+ exact ((tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).comp
72
+ (tendsto_add_atTop_nat 1)).mono_left hω
73
+ let ρ : HilbertRep.{u,u} A := ⟨LimitHilbert ω π ξ hnξ, limitRep ω π ξ hnξ⟩
74
+ have hd₀ : ρ.hom d=0 := limitRep_annihilates ω π ξ hnξ d
75
+ (squeeze_zero (fun n => norm_nonneg _) hRd hη)
76
+ have han : ρ.hom a ≠ 0 := limitRep_nonzero ω π ξ hnξ a (by norm_num : (0:ℝ)<1/16)
77
+ (Filter.Eventually.of_forall (fun n => (hξa n).le))
78
+ apply han
79
+ change ρ.hom (cut y (5/16))=0
80
+ rw [map_cut_sa ρ.hom hy.isSelfAdjoint (by norm_num)]
81
+ exact cut_eq_zero_of_norm_le (map_nonneg ρ.hom hy) ((h ρ hd₀).trans (by norm_num))
82
+
83
+ theorem quantitative_nonvanishing_general {d y : A} (hy : 0 ≤ y)
84
+ {s s' : ℝ} (hs : 0 ≤ s) (hss : s < s')
85
+ (h : ∀ R : HilbertRep.{u,u} A, R.hom d=0 → ‖R.hom y‖ ≤ s) :
86
+ ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ ∀ R : HilbertRep.{u,u} A,
87
+ s' < ‖R.hom y‖ → δ < ‖R.hom d‖ := by
88
+ classical
89
+ by_contra! hh
90
+ let η : ℕ → ℝ := fun n => 1 / ((n : ℝ)+2)
91
+ have hηpos (n : ℕ) : 0 < η n := by dsimp [η]; positivity
92
+ have hηlt (n : ℕ) : η n < 1 := by
93
+ dsimp [η]
94
+ apply (div_lt_one (by positivity)).mpr
95
+ linarith [Nat.cast_nonneg (α := ℝ) n]
96
+ have hbad (n : ℕ) : ∃ R : HilbertRep.{u,u} A,
97
+ s' < ‖R.hom y‖ ∧ ‖R.hom d‖ ≤ η n := hh (η n) (hηpos n) (hηlt n)
98
+ choose R hRy hRd using hbad
99
+ let π := fun n => (R n).hom
100
+ let a := cut y ((s+s')/2)
101
+ have ha : ∀ n, ((s'-s)/2) < ‖π n a‖ := by
102
+ intro n
103
+ have h₁ : ‖π n y - π n a‖ ≤ ((s+s')/2) := by
104
+ rw [← map_sub]
105
+ exact (NonUnitalStarAlgHom.norm_apply_le (π n) _).trans
106
+ (norm_sub_cut_le hy (by linarith))
107
+ have h₂ := norm_sub_norm_le (π n y) (π n a)
108
+ have h₃ := hRy n
109
+ change s' < ‖π n y‖ at h₃
110
+ linarith
111
+ choose ξ hξ hξa using fun n => (π n a).exists_lt_apply_of_lt_opNorm (ha n)
112
+ have hnξ : ∀ n, ‖ξ n‖ ≤ 1 := fun n => (hξ n).le
113
+ let ω : Ultrafilter ℕ := Ultrafilter.of atTop
114
+ have hω : (ω : Filter ℕ) ≤ atTop := Ultrafilter.of_le _
115
+ have hη : Tendsto η (ω : Filter ℕ) (𝓝 0) := by
116
+ have he : η = fun n : ℕ => 1 / (((n+1 : ℕ) : ℝ)+1) := by
117
+ funext n
118
+ dsimp [η]
119
+ push_cast
120
+ congr 1; ring
121
+ rw [he]
122
+ exact ((tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).comp
123
+ (tendsto_add_atTop_nat 1)).mono_left hω
124
+ let ρ : HilbertRep.{u,u} A := ⟨LimitHilbert ω π ξ hnξ, limitRep ω π ξ hnξ⟩
125
+ have hd₀ : ρ.hom d=0 := limitRep_annihilates ω π ξ hnξ d
126
+ (squeeze_zero (fun n => norm_nonneg _) hRd hη)
127
+ have han : ρ.hom a ≠ 0 := limitRep_nonzero ω π ξ hnξ a (by linarith : (0:ℝ)<(s'-s)/2)
128
+ (Filter.Eventually.of_forall (fun n => (hξa n).le))
129
+ apply han
130
+ change ρ.hom (cut y ((s+s')/2))=0
131
+ rw [map_cut_sa ρ.hom hy.isSelfAdjoint (by linarith)]
132
+ exact cut_eq_zero_of_norm_le (map_nonneg ρ.hom hy) ((h ρ hd₀).trans (by linarith))
133
+
134
+ end MainGap
135
+
136
+ end
137
+
138
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/OrthogonalSlots.lean ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Comparison
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ open scoped CStarAlgebra
12
+ local instance orthogonalSlotsPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance orthogonalSlotsStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+ local instance orthogonalSlotsMatrixIsScalarTower (n : ℕ) :
15
+ IsScalarTower ℝ (CStarMatrix (Fin n) (Fin n) A)
16
+ (CStarMatrix (Fin n) (Fin n) A) where
17
+ smul_assoc r x y := CStarMatrix.smul_mul r x y
18
+ local instance orthogonalSlotsMatrixSMulCommClass (n : ℕ) :
19
+ SMulCommClass ℝ (CStarMatrix (Fin n) (Fin n) A)
20
+ (CStarMatrix (Fin n) (Fin n) A) where
21
+ smul_comm r x y := (CStarMatrix.mul_smul x r y).symm
22
+
23
+ lemma cut_map {B : Type*} [NonUnitalCStarAlgebra B]
24
+ (f : A →⋆ₙₐ[ℂ] B) (a : A) (ε : ℝ) (ha : IsSelfAdjoint a) (hε : 0 ≤ ε) :
25
+ cut (f a) ε = f (cut a ε) :=
26
+ (f.map_cfcₙ (q := IsSelfAdjoint) (fun t : ℝ => max (t-ε) 0) a
27
+ (hf₀ := by simp [hε]) (ha := ha)).symm
28
+
29
+ def entry {n : ℕ} (i j : Fin n) (a : A) : CStarMatrix (Fin n) (Fin n) A :=
30
+ CStarMatrix.ofMatrix (Matrix.single i j a)
31
+
32
+ @[simp] lemma entry_apply {n : ℕ} (i j k l : Fin n) (a : A) :
33
+ entry i j a k l = if i = k ∧ j = l then a else 0 := rfl
34
+
35
+ @[simp] lemma entry_mul {n : ℕ} (i j k : Fin n) (a b : A) :
36
+ entry i j a * entry j k b = entry i k (a * b) :=
37
+ Matrix.single_mul_single_same a i j k b
38
+
39
+ lemma entry_mul_of_ne {n : ℕ} (i j k l : Fin n) (a b : A) (h : j ≠ k) :
40
+ entry i j a * entry k l b = 0 :=
41
+ Matrix.single_mul_single_of_ne a i j k h b
42
+
43
+ @[simp] lemma star_entry {n : ℕ} (i j : Fin n) (a : A) :
44
+ star (entry i j a) = entry j i (star a) := by
45
+ apply CStarMatrix.ext
46
+ intro k l
47
+ change star (Matrix.single i j a l k) = Matrix.single j i (star a) k l
48
+ simp only [Matrix.single_apply]
49
+ split_ifs <;> simp_all
50
+
51
+ @[simp] lemma entry_add {n : ℕ} (i j : Fin n) (a b : A) :
52
+ entry i j (a+b) = entry i j a + entry i j b := Matrix.single_add _ _ _ _
53
+
54
+ @[simp] lemma entry_smul {n : ℕ} (i j : Fin n) (c : ℂ) (a : A) :
55
+ entry i j (c • a) = c • entry i j a := (Matrix.smul_single _ _ _ _).symm
56
+
57
+ @[simp] lemma entry_zero {n : ℕ} (i j : Fin n) : entry i j (0 : A) = 0 :=
58
+ Matrix.single_zero _ _
59
+
60
+ def cornerHom {n : ℕ} (i : Fin n) : A →⋆ₙₐ[ℂ] CStarMatrix (Fin n) (Fin n) A where
61
+ toFun := entry i i
62
+ map_zero' := entry_zero i i
63
+ map_add' := entry_add i i
64
+ map_mul' := fun a b => (entry_mul i i i a b).symm
65
+ map_smul' := entry_smul i i
66
+ map_star' := fun a => (star_entry i i a).symm
67
+
68
+ lemma diagonalCorner_mul {n : ℕ} (a b : A) :
69
+ diagonalCorner n (a*b) = diagonalCorner n a * diagonalCorner n b := by
70
+ exact congrArg CStarMatrix.ofMatrix (Matrix.diagonal_mul_diagonal (fun _ => a) (fun _ => b)).symm
71
+
72
+ lemma star_diagonalCorner {n : ℕ} (a : A) :
73
+ star (diagonalCorner n a) = diagonalCorner n (star a) := by
74
+ apply CStarMatrix.ext
75
+ intro i j
76
+ change star (Matrix.diagonal (fun _ => a) j i) = Matrix.diagonal (fun _ => star a) i j
77
+ simp only [Matrix.diagonal_apply]
78
+ split_ifs <;> simp_all
79
+
80
+ def diagonalHom (n : ℕ) : A →⋆ₙₐ[ℂ] CStarMatrix (Fin n) (Fin n) A where
81
+ toFun := diagonalCorner n
82
+ map_zero' := by ext i j; simp [diagonalCorner]
83
+ map_add' a b := by ext i j; simp [diagonalCorner, Matrix.diagonal_apply]; split_ifs <;> simp
84
+ map_mul' := diagonalCorner_mul
85
+ map_smul' c a := by ext i j; simp [diagonalCorner, Matrix.diagonal_apply]
86
+ map_star' := fun a => star_diagonalCorner a |>.symm
87
+
88
+ lemma corner_cut {n : ℕ} (i : Fin n) (a : A) (ε : ℝ) (ha : IsSelfAdjoint a) (hε : 0 ≤ ε) :
89
+ cut (entry i i a) ε = entry i i (cut a ε) := by
90
+ exact cut_map (cornerHom i) a ε ha hε
91
+
92
+ lemma diagonal_cut (n : ℕ) (a : A) (ε : ℝ) (ha : IsSelfAdjoint a) (hε : 0 ≤ ε) :
93
+ cut (diagonalCorner n a) ε = diagonalCorner n (cut a ε) := by
94
+ exact cut_map (diagonalHom n) a ε ha hε
95
+
96
+ lemma continuous_entry {n : ℕ} (i j : Fin n) : Continuous (entry (A := A) i j) := by
97
+ change Continuous (fun a : A => (Matrix.single i j a : Matrix (Fin n) (Fin n) A))
98
+ apply continuous_pi; intro k
99
+ apply continuous_pi; intro l
100
+ change Continuous (fun a : A => if i = k ∧ j = l then a else 0)
101
+ split_ifs
102
+ · exact continuous_id
103
+ · exact continuous_const
104
+
105
+ lemma entry_mem_diagonalHer {n : ℕ} (i j : Fin n) {h a : A} (ha : a ∈ Her h) :
106
+ entry i j a ∈ Her (diagonalCorner n h) := by
107
+ refine closure_minimal (s := Set.range (fun b : A => h*b*star h))
108
+ (t := {b | entry i j b ∈ Her (diagonalCorner n h)}) ?_ ?_ ha
109
+ · rintro _ ⟨b, rfl⟩
110
+ have heq : entry i j (h*b*star h) =
111
+ diagonalCorner n h * entry i j b * star (diagonalCorner n h) := by
112
+ rw [star_diagonalCorner]
113
+ apply CStarMatrix.ext
114
+ intro k l
115
+ change Matrix.single i j (h*b*star h) k l =
116
+ ((Matrix.diagonal (fun _ : Fin n => h) * Matrix.single i j b *
117
+ Matrix.diagonal (fun _ : Fin n => star h)) : Matrix (Fin n) (Fin n) A) k l
118
+ simp only [Matrix.mul_diagonal, Matrix.diagonal_mul, Matrix.single_apply]
119
+ split_ifs <;> simp
120
+ change entry i j (h*b*star h) ∈ Her _
121
+ rw [heq]
122
+ exact sandwich_mem_Her _ _
123
+ · exact (isClosed_Her _).preimage (continuous_entry i j)
124
+
125
+ lemma cornerHer_entries {n : ℕ} (i : Fin n) {h : A}
126
+ {a : CStarMatrix (Fin n) (Fin n) A} (ha : a ∈ Her (entry i i h))
127
+ (j k : Fin n) : a j k ∈ Her h ∧ (j ≠ i ∨ k ≠ i → a j k = 0) := by
128
+ refine closure_minimal (s := Set.range (fun b => entry i i h * b * star (entry i i h)))
129
+ (t := {b | b j k ∈ Her h ∧ (j ≠ i ∨ k ≠ i → b j k = 0)}) ?_ ?_ ha
130
+ · rintro _ ⟨b, rfl⟩
131
+ have heq : entry i i h * b * star (entry i i h) = entry i i (h*b i i*star h) := by
132
+ rw [star_entry]
133
+ exact Matrix.single_mul_mul_single i i i i h (CStarMatrix.ofMatrix.symm b) (star h)
134
+ change (entry i i h * b * star (entry i i h)) j k ∈ Her h ∧
135
+ (j ≠ i ∨ k ≠ i → (entry i i h * b * star (entry i i h)) j k = 0)
136
+ rw [heq, entry_apply]
137
+ split_ifs with heq
138
+ · refine ⟨sandwich_mem_Her h _, ?_⟩
139
+ intro hjk
140
+ rcases hjk with hj | hk
141
+ · exact (hj heq.1.symm).elim
142
+ · exact (hk heq.2.symm).elim
143
+ · exact ⟨(Her h).zero_mem, by simp⟩
144
+ · apply IsClosed.inter
145
+ · exact (isClosed_Her _).preimage (by fun_prop)
146
+ · by_cases hjk : j ≠ i ∨ k ≠ i
147
+ · change IsClosed {b : CStarMatrix (Fin n) (Fin n) A | j ≠ i ∨ k ≠ i → b j k = 0}
148
+ simpa only [hjk, true_implies] using
149
+ (isClosed_eq (show Continuous (fun a : CStarMatrix (Fin n) (Fin n) A => a j k) by fun_prop)
150
+ continuous_const)
151
+ · simp only [hjk, false_implies]
152
+ exact isClosed_univ
153
+
154
+ def rowMatrix {n : ℕ} (i : Fin n) (r : CStarMatrix (Fin 1) (Fin n) A) :
155
+ CStarMatrix (Fin n) (Fin n) A :=
156
+ CStarMatrix.ofMatrix (fun j k => if j = i then r 0 k else 0)
157
+
158
+ lemma rowMatrix_conjugate {n : ℕ} (i : Fin n)
159
+ (r : CStarMatrix (Fin 1) (Fin n) A) (v : A) :
160
+ star (rowMatrix i r) * entry i i v * rowMatrix i r =
161
+ r.conjTranspose * scalarCorner v * r := by
162
+ apply CStarMatrix.ext
163
+ intro j k
164
+ change (∑ l : Fin n, (∑ p : Fin n,
165
+ star (if p = i then r 0 j else 0) * (if i = p ∧ i = l then v else 0)) *
166
+ (if l = i then r 0 k else 0)) =
167
+ ∑ l : Fin 1, (∑ p : Fin 1, star (r p j) * v) * r l k
168
+ simp [mul_ite]
169
+
170
+ lemma finiteCuntzLE_corner_approx {n : ℕ} (i : Fin n) {d : CStarMatrix (Fin n) (Fin n) A}
171
+ {v : A} (hdv : FiniteCuntzLE d (scalarCorner v)) {ε : ℝ} (hε : 0 < ε) :
172
+ ∃ s : CStarMatrix (Fin n) (Fin n) A, ‖d - star s * entry i i v * s‖ < ε := by
173
+ obtain ⟨r, hr⟩ := hdv.exists_approx hε
174
+ exact ⟨rowMatrix i r, by rwa [rowMatrix_conjugate]⟩
175
+
176
+ lemma regularTransport_diagonal {n : ℕ} (i : Fin n) {d v : A} (hd : 0 ≤ d) (hv : 0 ≤ v)
177
+ (hdv : FiniteCuntzLE (diagonalCorner n d) (scalarCorner v)) {ε : ℝ} (hε : 0 < ε) :
178
+ Nonempty (RegularTransport (diagonalCorner n (cut d ε)) (entry i i v)) := by
179
+ obtain ⟨s, hs⟩ := finiteCuntzLE_corner_approx i hdv hε
180
+ have hd' : 0 ≤ diagonalCorner n d := map_nonneg (diagonalHom n) hd
181
+ have hv' : 0 ≤ entry i i v := map_nonneg (cornerHom i) hv
182
+ have ht := regularTransport_of_approx hd' hv' hε hs
183
+ rwa [diagonal_cut n d ε (.of_nonneg hd) hε.le] at ht
184
+
185
+ lemma row_zero_of_self_star {n : ℕ} (M : CStarMatrix (Fin n) (Fin n) A) (i : Fin n)
186
+ (hi : (M * star M) i i = 0) (j : Fin n) : M i j = 0 := by
187
+ have hs : ∑ k : Fin n, M i k * star (M i k) = 0 := hi
188
+ have hnonneg : ∀ k ∈ (Finset.univ : Finset (Fin n)), 0 ≤ M i k * star (M i k) :=
189
+ fun k _ => mul_star_self_nonneg _
190
+ have hzero := ((Finset.sum_eq_zero_iff_of_nonneg hnonneg).mp hs) j (Finset.mem_univ j)
191
+ apply norm_eq_zero.mp
192
+ have hn : ‖M i j‖ * ‖M i j‖ = 0 := by rw [← CStarRing.norm_self_mul_star, hzero, norm_zero]
193
+ nlinarith [norm_nonneg (M i j)]
194
+
195
+ lemma col_zero_of_star_self {n : ℕ} (M : CStarMatrix (Fin n) (Fin n) A) (i : Fin n)
196
+ (hi : (star M * M) i i = 0) (j : Fin n) : M j i = 0 := by
197
+ have h := row_zero_of_self_star (star M) i (by simpa only [star_star] using hi) j
198
+ change star (M j i) = 0 at h
199
+ exact star_eq_zero.mp h
200
+
201
+ def entryHer {n : ℕ} {h : A} (i j : Fin n) (k : Her h) : Her (diagonalCorner n h) :=
202
+ ⟨entry i j (k : A), entry_mem_diagonalHer i j k.property⟩
203
+
204
+ @[simp] lemma entryHer_val {n : ℕ} {h : A} (i j : Fin n) (k : Her h) :
205
+ (entryHer i j k : CStarMatrix (Fin n) (Fin n) A) = entry i j (k : A) := rfl
206
+
207
+ namespace RegularTransport
208
+ variable {n : ℕ} {h v : A} (i₀ : Fin n)
209
+ (T : RegularTransport (diagonalCorner n h) (entry i₀ i₀ v))
210
+
211
+ lemma carrier_entryHer (i : Fin n) (k : Her h) :
212
+ T.carrier (entryHer i i₀ k) =
213
+ entry i₀ i₀ ((T.carrier (entryHer i i₀ k)) i₀ i₀) := by
214
+ let M := T.carrier (entryHer i i₀ k)
215
+ have hrow (j : Fin n) (hj : j ≠ i₀) : ∀ l, M j l = 0 := by
216
+ apply row_zero_of_self_star
217
+ have hout := T.outer (entryHer i i₀ k) (entryHer i i₀ k)
218
+ have hm := T.image (entryHer i i₀ k * star (entryHer i i₀ k))
219
+ rw [← hout] at hm
220
+ exact (cornerHer_entries i₀ hm j j).2 (Or.inl hj)
221
+ have hcol (j : Fin n) (hj : j ≠ i₀) : ∀ l, M l j = 0 := by
222
+ apply col_zero_of_star_self
223
+ have hin := T.inner (entryHer i i₀ k) (entryHer i i₀ k)
224
+ simp only [entryHer_val, star_entry, entry_mul] at hin
225
+ have he := congrArg (fun a : CStarMatrix (Fin n) (Fin n) A => a j j) hin
226
+ simpa only [entry_apply, ne_comm.mp hj, false_and, ite_false] using he
227
+ apply CStarMatrix.ext
228
+ intro j l
229
+ change M j l = (entry i₀ i₀ (M i₀ i₀)) j l
230
+ rw [entry_apply]
231
+ by_cases hj : j = i₀
232
+ · subst j
233
+ by_cases hl : l = i₀
234
+ · subst l; simp
235
+ · simp only [true_and, ne_comm.mp hl, ite_false]
236
+ exact hcol l hl i₀
237
+ · simp only [ne_comm.mp hj, false_and, ite_false]
238
+ exact hrow j hj l
239
+
240
+ def slot (i : Fin n) (k : Her h) : A := T.carrier (entryHer i i₀ k) i₀ i₀
241
+
242
+ lemma slot_inner (i j : Fin n) (k l : Her h) :
243
+ star (T.slot i₀ i k) * T.slot i₀ j l =
244
+ if i = j then star (k : A) * (l : A) else 0 := by
245
+ have hin := T.inner (entryHer i i₀ k) (entryHer j i₀ l)
246
+ rw [T.carrier_entryHer i₀ i k, T.carrier_entryHer i₀ j l] at hin
247
+ simp only [entryHer_val, star_entry, entry_mul] at hin
248
+ change entry i₀ i₀ (star (T.slot i₀ i k) * T.slot i₀ j l) = _ at hin
249
+ by_cases hij : i = j
250
+ · subst j
251
+ rw [entry_mul] at hin
252
+ have he := congrArg (fun a : CStarMatrix (Fin n) (Fin n) A => a i₀ i₀) hin
253
+ simpa only [entry_apply, and_self, ite_true] using he
254
+ · rw [entry_mul_of_ne _ _ _ _ _ _ hij] at hin
255
+ have he := congrArg (fun a : CStarMatrix (Fin n) (Fin n) A => a i₀ i₀) hin
256
+ simpa only [entry_apply, and_self, ite_true, hij, ite_false, CStarMatrix.zero_apply] using he
257
+
258
+ lemma slot_outer_mem (i j : Fin n) (k l : Her h) :
259
+ T.slot i₀ i k * star (T.slot i₀ j l) ∈ Her v := by
260
+ have hout := T.outer (entryHer i i₀ k) (entryHer j i₀ l)
261
+ have hm := T.image (entryHer i i₀ k * star (entryHer j i₀ l))
262
+ rw [← hout, T.carrier_entryHer i₀ i k, T.carrier_entryHer i₀ j l,
263
+ star_entry, entry_mul] at hm
264
+ simpa only [slot, entry_apply, and_self, ite_true] using (cornerHer_entries i₀ hm i₀ i₀).1
265
+
266
+ lemma slot_mul (i : Fin n) (k l : Her h) :
267
+ T.slot i₀ i (k*l) = T.slot i₀ i k * (l : A) := by
268
+ have heq : entryHer i i₀ (k*l) = entryHer i i₀ k * entryHer i₀ i₀ l := by
269
+ apply Subtype.ext
270
+ exact (entry_mul i i₀ i₀ (k : A) (l : A)).symm
271
+ have ht := T.mul (entryHer i i₀ k) (entryHer i₀ i₀ l)
272
+ rw [← heq, T.carrier_entryHer i₀ i (k*l), T.carrier_entryHer i₀ i k, entryHer_val,
273
+ entry_mul] at ht
274
+ simpa only [slot, entry_apply, and_self, ite_true] using
275
+ congrArg (fun a : CStarMatrix (Fin n) (Fin n) A => a i₀ i₀) ht
276
+
277
+ lemma slot_add (i : Fin n) (k l : Her h) :
278
+ T.slot i₀ i (k+l) = T.slot i₀ i k + T.slot i₀ i l := by
279
+ have heq : entryHer i i₀ (k+l) = entryHer i i₀ k + entryHer i i₀ l := by
280
+ apply Subtype.ext
281
+ exact entry_add i i₀ (k : A) (l : A)
282
+ simp only [slot, heq, map_add, CStarMatrix.add_apply]
283
+
284
+ lemma slot_smul (i : Fin n) (c : ℂ) (k : Her h) :
285
+ T.slot i₀ i (c • k) = c • T.slot i₀ i k := by
286
+ have heq : entryHer i i₀ (c • k) = c • entryHer i i₀ k := by
287
+ apply Subtype.ext
288
+ exact entry_smul i i₀ c (k : A)
289
+ simp only [slot, heq, map_smul, CStarMatrix.smul_apply]
290
+
291
+ lemma continuous_slot (i : Fin n) : Continuous (T.slot i₀ i) := by
292
+ have he : Continuous (fun k : Her h => entryHer i i₀ k) := by
293
+ apply Continuous.subtype_mk
294
+ exact (continuous_entry i i₀).comp continuous_subtype_val
295
+ change Continuous (fun k : Her h => T.carrier (entryHer i i₀ k) i₀ i₀)
296
+ exact (continuous_apply i₀).comp ((continuous_apply i₀).comp (T.carrier.continuous.comp he))
297
+
298
+ def slotCLM (i : Fin n) : Her h →L[ℂ] A where
299
+ toFun := T.slot i₀ i
300
+ map_add' := T.slot_add i₀ i
301
+ map_smul' := T.slot_smul i₀ i
302
+ cont := T.continuous_slot i₀ i
303
+
304
+ end RegularTransport
305
+
306
+ structure OrthogonalSlots (n : ℕ) (h v : A) where
307
+ carrier : Fin n → Her h →L[ℂ] A
308
+ inner : ∀ i j k l, star (carrier i k) * carrier j l =
309
+ if i = j then star (k : A) * (l : A) else 0
310
+ outer : ∀ i j k l, carrier i k * star (carrier j l) ∈ Her v
311
+ mul : ∀ i k l, carrier i (k*l) = carrier i k * (l : A)
312
+
313
+ theorem orthogonalSlots_of_comparison {n : ℕ} {d v : A} (hd : 0 ≤ d) (hv : 0 ≤ v)
314
+ (hdv : FiniteCuntzLE (diagonalCorner n d) (scalarCorner v)) {ε : ℝ} (hε : 0 < ε) :
315
+ Nonempty (OrthogonalSlots n (cut d ε) v) := by
316
+ by_cases hn : n = 0
317
+ · subst n
318
+ exact ⟨{
319
+ carrier := fun i => Fin.elim0 i
320
+ inner := fun i => Fin.elim0 i
321
+ outer := fun i => Fin.elim0 i
322
+ mul := fun i => Fin.elim0 i }⟩
323
+ · let i₀ : Fin n := ⟨0, Nat.pos_of_ne_zero hn⟩
324
+ obtain ⟨T⟩ := regularTransport_diagonal i₀ hd hv hdv hε
325
+ exact ⟨{
326
+ carrier := T.slotCLM i₀
327
+ inner := T.slot_inner i₀
328
+ outer := T.slot_outer_mem i₀
329
+ mul := T.slot_mul i₀ }⟩
330
+
331
+ theorem ProperlyInfinite.orthogonalSlots {d : A} (hd : 0 ≤ d) (hp : ProperlyInfinite d)
332
+ (n : ℕ) {ε : ℝ} (hε : 0 < ε) : Nonempty (OrthogonalSlots n (cut d ε) d) :=
333
+ orthogonalSlots_of_comparison hd hd (hp.finite_copies n) hε
334
+
335
+ namespace OrthogonalSlots
336
+ variable {n : ℕ} {h v : A} (S : OrthogonalSlots n h v)
337
+
338
+ lemma represented_norm {B : Type*} [NonUnitalCStarAlgebra B]
339
+ (π : A →⋆ₙₐ[ℂ] B) (i : Fin n) (k : Her h) :
340
+ ‖π (S.carrier i k)‖ = ‖π (k : A)‖ := by
341
+ apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp
342
+ simp only [pow_two, ← CStarRing.norm_star_mul_self, ← map_star, ← map_mul,
343
+ S.inner, ite_true]
344
+
345
+ lemma norm_carrier (i : Fin n) (k : Her h) : ‖S.carrier i k‖ = ‖(k : A)‖ :=
346
+ S.represented_norm (NonUnitalStarAlgHom.id ℂ A) i k
347
+
348
+ end OrthogonalSlots
349
+
350
+ section FiniteSum
351
+
352
+ lemma FiniteCuntzLE.double {d v : A}
353
+ (hdv : FiniteCuntzLE (scalarCorner d) (scalarCorner v)) :
354
+ FiniteCuntzLE (doubleCorner d) (doubleCorner v) := by
355
+ have hh := hdv.block hdv
356
+ rw [← diagonalCorner_one d, ← diagonalCorner_one v, matrixBlock_diagonal,
357
+ matrixBlock_diagonal] at hh
358
+ exact hh
359
+
360
+ lemma finiteSum_cuntzLE {v : A} (hv : ProperlyInfinite v) {n : ℕ} (r : Fin n → A) :
361
+ FiniteCuntzLE (scalarCorner (∑ i, star (r i) * v * r i)) (scalarCorner v) := by
362
+ let x : CStarMatrix (Fin n) (Fin 1) A := CStarMatrix.ofMatrix (fun i _ => r i)
363
+ have hcomp : x.conjTranspose * diagonalCorner n v * x =
364
+ scalarCorner (∑ i, star (r i) * v * r i) := by
365
+ ext i j
366
+ change (∑ k : Fin n, (∑ l : Fin n, star (r l) *
367
+ (if l = k then v else 0)) * r k) = _
368
+ simp only [mul_ite, mul_zero, Finset.sum_ite_eq', Finset.mem_univ, ite_true]
369
+ rfl
370
+ rw [← hcomp]
371
+ exact (hv.finite_copies n).conjugate x
372
+
373
+ lemma finiteSum_two_cuntzLE {v : A} (hv : ProperlyInfinite v) {n : ℕ} (r : Fin n → A) :
374
+ FiniteCuntzLE (diagonalCorner 2 (∑ i, star (r i) * v * r i)) (scalarCorner v) :=
375
+ (finiteSum_cuntzLE hv r).double.trans hv
376
+
377
+ lemma finsetSum_cuntzLE {v : A} (hv : ProperlyInfinite v) {ι : Type*}
378
+ (E : Finset ι) (r : ι → A) :
379
+ FiniteCuntzLE (diagonalCorner 2 (∑ i ∈ E, star (r i) * v * r i)) (scalarCorner v) := by
380
+ classical
381
+ let e : Fin (Fintype.card E) ≃ E := (Fintype.equivFin E).symm
382
+ have hsum : (∑ i : Fin (Fintype.card E), star (r (e i)) * v * r (e i)) =
383
+ ∑ i ∈ E, star (r i) * v * r i := by
384
+ calc
385
+ _ = ∑ i : E, star (r i) * v * r i := Equiv.sum_comp e _
386
+ _ = _ := by simpa using (Finset.sum_attach E (fun i => star (r i) * v * r i))
387
+ rw [← hsum]
388
+ exact finiteSum_two_cuntzLE hv _
389
+
390
+ end FiniteSum
391
+ end MainGap
392
+
393
+ end
394
+
395
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/PositiveFunctional.lean ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [CStarAlgebra A]
11
+ variable [PartialOrder A] [StarOrderedRing A]
12
+
13
+ lemma norm_add_one_of_nonneg [Nontrivial A] {d : A} (hd : 0 ≤ d) :
14
+ ‖d + 1‖ = ‖d‖ + 1 := by
15
+ apply le_antisymm
16
+ · simpa using norm_add_le d 1
17
+ have hh := norm_apply_le_norm_cfc (fun t : ℝ => t + 1) d
18
+ (CStarAlgebra.norm_mem_spectrum_of_nonneg d hd)
19
+ have he : cfc (fun t : ℝ => t + 1) d = d + 1 := by
20
+ rw [cfc_add_const (1 : ℝ) (fun t : ℝ => t) d, cfc_id' ℝ d, map_one]
21
+ simpa only [he, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ ‖d‖ + 1)] using hh
22
+
23
+ lemma real_norm_one_positive (F : A →L[ℝ] ℝ) (hF : ‖F‖ ≤ 1) (h1 : F 1 = 1)
24
+ {h : A} (hh : 0 ≤ h) : 0 ≤ F h := by
25
+ have hu : h ≤ algebraMap ℝ A ‖h‖ :=
26
+ IsSelfAdjoint.le_algebraMap_norm_self h (.of_nonneg hh)
27
+ have hp : 0 ≤ algebraMap ℝ A ‖h‖ - h := sub_nonneg.mpr hu
28
+ have hb : ‖algebraMap ℝ A ‖h‖ - h‖ ≤ ‖h‖ :=
29
+ (CStarAlgebra.norm_le_iff_le_algebraMap _ (norm_nonneg _) hp).2 (sub_le_self _ hh)
30
+ have he := F.le_opNorm (algebraMap ℝ A ‖h‖ - h)
31
+ have hx : F (algebraMap ℝ A ‖h‖ - h) = ‖h‖ - F h := by
32
+ rw [map_sub, Algebra.algebraMap_eq_smul_one, map_smul, h1, smul_eq_mul, mul_one]
33
+ have : F (algebraMap ℝ A ‖h‖ - h) ≤ ‖h‖ :=
34
+ (le_abs_self _).trans (he.trans ((mul_le_mul_of_nonneg_right hF (norm_nonneg _)).trans
35
+ (by simpa using hb)))
36
+ linarith
37
+
38
+ def realPartCLM : A →L[ℝ] A :=
39
+ ((selfAdjoint.submodule ℝ A).subtype.comp (realPart : A →ₗ[ℝ] selfAdjoint A)).mkContinuous 1
40
+ (fun a => by
41
+ change ‖(realPart a : A)‖ ≤ 1 * ‖a‖
42
+ simpa using realPart.norm_le a)
43
+
44
+ omit [PartialOrder A] [StarOrderedRing A] in
45
+ @[simp] lemma realPartCLM_apply (a : A) : realPartCLM a = (realPart a : A) := rfl
46
+
47
+ omit [PartialOrder A] [StarOrderedRing A] in
48
+ lemma norm_realPartCLM : ‖(realPartCLM : A →L[ℝ] A)‖ ≤ 1 := by
49
+ apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one
50
+ intro a
51
+ simpa using realPart.norm_le a
52
+
53
+ lemma exists_norming_positive [Nontrivial A] {d : A} (hd : 0 ≤ d) :
54
+ ∃ f : A →ₚ[ℂ] ℂ, (∀ a, ‖f a‖ ≤ ‖a‖) ∧ f d = (‖d‖ : ℂ) := by
55
+ obtain ⟨F, hF, hFd⟩ := exists_dual_vector'' ℝ (d + 1)
56
+ have hFa (a : A) : F a ≤ ‖a‖ :=
57
+ (le_abs_self _).trans ((F.le_opNorm a).trans
58
+ (by simpa using mul_le_mul_of_nonneg_right hF (norm_nonneg a)))
59
+ have h1 : F 1 = 1 := by
60
+ rw [map_add, norm_add_one_of_nonneg hd] at hFd
61
+ simp only [RCLike.ofReal_real_eq_id, id_eq] at hFd
62
+ have h1' := hFa 1
63
+ have hd' := hFa d
64
+ simp only [norm_one] at h1'
65
+ linarith
66
+ have hFd' : F d = ‖d‖ := by
67
+ rw [map_add, norm_add_one_of_nonneg hd, h1] at hFd
68
+ simpa only [RCLike.ofReal_real_eq_id, id_eq, add_left_inj] using hFd
69
+ let G : A →L[ℝ] ℝ := F.comp realPartCLM
70
+ let H : A →L[ℂ] ℂ := StrongDual.extendRCLike G
71
+ have hG : ‖G‖ ≤ 1 := (ContinuousLinearMap.opNorm_comp_le _ _).trans
72
+ ((mul_le_mul hF norm_realPartCLM (norm_nonneg _) zero_le_one).trans (by norm_num))
73
+ have hH (a : A) (ha : IsSelfAdjoint a) : H a = (F a : ℂ) := by
74
+ simp [H, StrongDual.extendRCLike_apply, G, ha.coe_realPart, realPart_I_smul,
75
+ ha.imaginaryPart]
76
+ let f : A →ₚ[ℂ] ℂ :=
77
+ { H.toLinearMap with
78
+ monotone' := fun a b hab => by
79
+ have hn : 0 ≤ H (b - a) := by
80
+ rw [hH _ (.of_nonneg (sub_nonneg.mpr hab))]
81
+ exact_mod_cast real_norm_one_positive F hF h1 (sub_nonneg.mpr hab)
82
+ change H a ≤ H b
83
+ simpa only [map_sub, sub_nonneg] using hn }
84
+ refine ⟨f, fun a => ?_, ?_⟩
85
+ · change ‖H a‖ ≤ ‖a‖
86
+ exact (H.le_opNorm a).trans (by
87
+ simpa [H] using mul_le_mul_of_nonneg_right hG (norm_nonneg a))
88
+ · change H d = _
89
+ rw [hH d (.of_nonneg hd), hFd']
90
+ end MainGap
91
+
92
+ end
93
+
94
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Products.lean ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Shrinking
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance boundedSlotsOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance boundedSlotsStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ lemma cut_le_self {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 ≤ δ) : cut a δ ≤ a := by
15
+ have he : cfcₙ (fun t : ℝ => t) a = a := cfcₙ_id ℝ a ha.isSelfAdjoint
16
+ conv_rhs => rw [← he]
17
+ change cfcₙ (fun t : ℝ => max (t-δ) 0) a ≤ cfcₙ (fun t : ℝ => t) a
18
+ exact cfcₙ_mono (fun t ht => max_le (by linarith) (quasispectrum_nonneg_of_nonneg a ha t ht))
19
+ ((continuous_id.sub continuous_const).max continuous_const).continuousOn
20
+ continuousOn_id (by simp [max_eq_right (neg_nonpos.mpr hδ)]) rfl
21
+
22
+ lemma norm_cut_le {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 ≤ δ) : ‖cut a δ‖ ≤ ‖a‖ :=
23
+ CStarAlgebra.norm_le_norm_of_le_of_nonneg (cut_le_self ha hδ) (cut_nonneg a δ)
24
+
25
+ lemma cutInverse_nonneg {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 < δ) :
26
+ 0 ≤ cutInverse a δ := by
27
+ apply cfcₙ_nonneg
28
+ intro t ht
29
+ exact (cutInverseFn_bound hδ (quasispectrum_nonneg_of_nonneg a ha t ht)).1
30
+
31
+ lemma fixed_of_outer_fixed {F r : A} (h : F*(r*star r)=r*star r) : F*r=r := by
32
+ apply sub_eq_zero.mp
33
+ apply (CStarRing.mul_star_self_eq_zero_iff _).mp
34
+ have hs : r*star r*star F = r*star r := by
35
+ simpa only [star_mul, star_star, mul_assoc] using congrArg star h
36
+ calc
37
+ (F*r-r)*star (F*r-r) = F*(r*star r)*star F - F*(r*star r) - r*star r*star F+r*star r := by
38
+ simp only [star_sub, star_mul]
39
+ noncomm_ring
40
+ _ = 0 := by rw [h, hs]; noncomm_ring
41
+
42
+ lemma cutInverse_fixed_carrier {a r : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 < δ)
43
+ (hr : r*star r ∈ Her (cut a δ)) : (cutInverse a δ*a)*r=r := by
44
+ have hFsa : IsSelfAdjoint (cutInverse a δ*a) := by
45
+ have hcomm : Commute (cutInverse a δ) a := (Commute.refl a).cfcₙ_real (cutInverseFn δ)
46
+ exact (IsSelfAdjoint.commute_iff (cutInverse_nonneg ha hδ).isSelfAdjoint ha.isSelfAdjoint).mp hcomm
47
+ have ht := Her_right_fixed_cutInverse ha hδ hr
48
+ have hs : (cutInverse a δ*a)*(r*star r)=r*star r := by
49
+ simpa only [star_mul, star_star, hFsa.star_eq] using congrArg star ht
50
+ exact fixed_of_outer_fixed hs
51
+
52
+ theorem bounded_two_slots (hp : PropertyP A) {d : A} (hd : 0 ≤ d) {δ : ℝ} (hδ : 0 < δ) :
53
+ ∃ s : Fin 2 → A,
54
+ (∀ i j, star (s i)*d*s j = if i=j then cut d (δ+δ) else 0) ∧
55
+ (∀ i, ‖s i‖ ≤ Real.sqrt (1/δ) * Real.sqrt ‖d‖) := by
56
+ let h := cut d δ
57
+ let k := cut h δ
58
+ have hh : 0 ≤ h := cut_nonneg d δ
59
+ have hk : 0 ≤ k := cut_nonneg h δ
60
+ obtain ⟨S⟩ := (hp h hh).orthogonalSlots hh 2 hδ
61
+ let z : Her k := ⟨CFC.sqrt k, sqrt_mem_Her (self_mem_Her hk) hk⟩
62
+ let r := fun i => S.carrier i z
63
+ let v := CFC.sqrt (cutInverse d δ)
64
+ have hv : 0 ≤ cutInverse d δ := cutInverse_nonneg hd hδ
65
+ have hvr : ∀ i, (cutInverse d δ*d)*r i=r i := fun i =>
66
+ cutInverse_fixed_carrier hd hδ (S.outer i i z z)
67
+ have hvd : star v*d*v=cutInverse d δ*d := by
68
+ have hc : Commute v d := by
69
+ exact ((Commute.refl d).cfcₙ_real (cutInverseFn δ)).cfcₙ_nnreal NNReal.sqrt
70
+ rw [(CFC.sqrt_nonneg (cutInverse d δ)).isSelfAdjoint.star_eq]
71
+ calc
72
+ v*d*v = v*v*d := by rw [mul_assoc, ← hc.eq, ← mul_assoc]
73
+ _ = cutInverse d δ*d := by rw [show v*v=cutInverse d δ from CFC.sqrt_mul_sqrt_self _ hv]
74
+ refine ⟨fun i => v*r i, ?_, ?_⟩
75
+ · intro i j
76
+ calc
77
+ star (v*r i)*d*(v*r j) = star (r i)*(star v*d*v)*r j := by simp only [star_mul]; noncomm_ring
78
+ _ = star (r i)*r j := by rw [hvd, mul_assoc, hvr]
79
+ _ = if i=j then cut d (δ+δ) else 0 := by
80
+ rw [S.inner]
81
+ have he : k=cut d (δ+δ) := cut_cut hd hδ.le hδ.le
82
+ change (if i=j then star (CFC.sqrt k)*CFC.sqrt k else 0) = if i=j then cut d (δ+δ) else 0
83
+ rw [(CFC.sqrt_nonneg k).isSelfAdjoint.star_eq, CFC.sqrt_mul_sqrt_self _ hk, he]
84
+ · intro i
85
+ calc
86
+ ‖v*r i‖ ≤ ‖v‖*‖r i‖ := norm_mul_le _ _
87
+ _ ≤ Real.sqrt (1/δ) * Real.sqrt ‖d‖ := by
88
+ apply mul_le_mul
89
+ · rw [CFC.norm_sqrt _ hv]
90
+ exact Real.sqrt_le_sqrt (norm_cutInverse_le hd hδ)
91
+ · rw [S.norm_carrier, CFC.norm_sqrt _ hk]
92
+ exact Real.sqrt_le_sqrt ((norm_cut_le hh hδ.le).trans (norm_cut_le hd hδ.le))
93
+ · exact norm_nonneg _
94
+ · positivity
95
+ end MainGap
96
+
97
+ namespace MainGap
98
+ open scoped ENNReal
99
+ variable {I : Type*} {E : I → Type*} [∀ i, NonUnitalCStarAlgebra (E i)]
100
+ local instance productFactorOrder (i : I) : PartialOrder (E i) := CStarAlgebra.spectralOrder _
101
+ local instance productFactorStarOrder (i : I) : StarOrderedRing (E i) := CStarAlgebra.spectralOrderedRing _
102
+ local instance boundedProductOrder : PartialOrder (lp E ∞) := CStarAlgebra.spectralOrder _
103
+ local instance boundedProductStarOrder : StarOrderedRing (lp E ∞) := CStarAlgebra.spectralOrderedRing _
104
+
105
+ def lpEval (i : I) : lp E ∞ →⋆ₙₐ[ℂ] E i where
106
+ toFun f := f i
107
+ map_zero' := rfl
108
+ map_add' _ _ := rfl
109
+ map_mul' _ _ := rfl
110
+ map_smul' _ _ := rfl
111
+ map_star' _ := rfl
112
+
113
+ @[simp] lemma lpEval_apply (i : I) (f : lp E ∞) : lpEval i f=f i := rfl
114
+
115
+ def lpBuild (f : ∀ i, E i) (M : ℝ) (h : ∀ i, ‖f i‖ ≤ M) : lp E ∞ :=
116
+ ⟨f, memℓp_infty ⟨M, by rintro t ⟨i,rfl⟩; exact h i⟩⟩
117
+
118
+ @[simp] lemma lpBuild_apply (f : ∀ i, E i) (M : ℝ) (h : ∀ i, ‖f i‖ ≤ M) (i : I) :
119
+ lpBuild f M h i = f i := rfl
120
+
121
+ lemma lp_nonneg_iff (d : lp E ∞) : 0 ≤ d ↔ ∀ i, 0 ≤ d i := by
122
+ constructor
123
+ · intro hd i
124
+ exact map_nonneg (lpEval i) hd
125
+ · intro hd
126
+ let v := lpBuild (fun i => CFC.sqrt (d i)) (Real.sqrt ‖d‖) (fun i => by
127
+ rw [CFC.norm_sqrt (d i) (hd i)]
128
+ exact Real.sqrt_le_sqrt (lp.norm_apply_le_norm ENNReal.top_ne_zero d i))
129
+ have he : star v*v=d := by
130
+ ext i
131
+ change star (CFC.sqrt (d i))*CFC.sqrt (d i)=d i
132
+ rw [(CFC.sqrt_nonneg _).isSelfAdjoint.star_eq, CFC.sqrt_mul_sqrt_self _ (hd i)]
133
+ rw [← he]
134
+ exact star_mul_self_nonneg v
135
+
136
+ theorem propertyP_lp (hp : ∀ i, PropertyP (E i)) : PropertyP (lp E ∞) := by
137
+ intro d hd
138
+ apply finiteCuntzLE_of_forall_approx
139
+ intro ε hε
140
+ let δ := ε/4
141
+ have hδ : 0 < δ := by dsimp [δ]; positivity
142
+ have hd' : ∀ i, 0 ≤ d i := (lp_nonneg_iff d).mp hd
143
+ choose s hs hn using fun i => bounded_two_slots (hp i) (hd' i) hδ
144
+ have hb (i : I) (j : Fin 2) :
145
+ ‖s i j‖ ≤ Real.sqrt (1/δ)*Real.sqrt ‖d‖ :=
146
+ (hn i j).trans (mul_le_mul_of_nonneg_left
147
+ (Real.sqrt_le_sqrt (lp.norm_apply_le_norm ENNReal.top_ne_zero d i)) (Real.sqrt_nonneg _))
148
+ let S : Fin 2 → lp E ∞ := fun j => lpBuild (fun i => s i j) _ (fun i => hb i j)
149
+ let R : CStarMatrix (Fin 1) (Fin 2) (lp E ∞) := CStarMatrix.ofMatrix (fun _ j => S j)
150
+ have he : R.conjTranspose * scalarCorner d * R = doubleCorner (cut d (δ+δ)) := by
151
+ apply CStarMatrix.ext
152
+ intro j k
153
+ apply lp.ext
154
+ funext i
155
+ change ((∑ l : Fin 1, (∑ m : Fin 1, star (R m j)*scalarCorner d m l)*R l k) i) =
156
+ (Matrix.diagonal (fun _ : Fin 2 => cut d (δ+δ)) j k) i
157
+ simp only [Fin.sum_univ_one]
158
+ change star (s i j)*d i*s i k=(if j=k then cut d (δ+δ) else 0) i
159
+ rw [hs i j k]
160
+ split_ifs with hjk
161
+ · exact (map_cut (lpEval i) hd (show 0 ≤ δ+δ by positivity)).symm
162
+ · rfl
163
+ refine ⟨R,?_⟩
164
+ rw [he]
165
+ change ‖diagonalHom 2 d - diagonalHom 2 (cut d (δ+δ))‖ < ε
166
+ rw [← map_sub]
167
+ exact ((NonUnitalStarAlgHom.norm_apply_le (diagonalHom (A := lp E ∞) 2) _).trans
168
+ (norm_sub_cut_le hd (by positivity))).trans_lt (by dsimp [δ]; linarith)
169
+
170
+ end MainGap
171
+
172
+ namespace MainGap
173
+ open scoped ENNReal
174
+ variable {I : Type*} {E : I → Type*} [∀ i, NonUnitalCStarAlgebra (E i)] [DecidableEq I]
175
+
176
+ lemma lp_single_mem_Her (i : I) {p : lp E ∞} {x : E i} (hx : x ∈ Her (p i)) :
177
+ lp.single ∞ i x ∈ Her p := by
178
+ have hc : IsClosed {x : E i | lp.single ∞ i x ∈ Her p} :=
179
+ (isClosed_Her p).preimage (lp.isometry_single i).continuous
180
+ apply closure_minimal (s := Set.range (fun b : E i => p i*b*star (p i))) _ hc hx
181
+ rintro x ⟨b,rfl⟩
182
+ change lp.single ∞ i (p i*b*star (p i)) ∈ Her p
183
+ have he : lp.single ∞ i (p i*b*star (p i)) = p*lp.single ∞ i b*star p := by
184
+ apply lp.ext
185
+ funext j
186
+ by_cases hj : j=i
187
+ · subst j
188
+ change lp.single ∞ i (p i*b*star (p i)) i = p i*lp.single ∞ i b i*star (p i)
189
+ simp only [lp.single_apply_self]
190
+ · change lp.single ∞ i (p i*b*star (p i)) j = p j*lp.single ∞ i b j*star (p j)
191
+ rw [lp.single_apply_ne _ _ _ hj, lp.single_apply_ne _ _ _ hj, mul_zero, zero_mul]
192
+ rw [he]
193
+ exact sandwich_mem_Her p _
194
+
195
+ lemma HerCompression.lp_eval {p q c : lp E ∞} {κ : ℝ}
196
+ (h : HerCompression p q c κ) (i : I) : HerCompression (p i) (q i) (c i) κ := by
197
+ intro x hx k hk
198
+ have hi := h _ (lp_single_mem_Her i hx) _ (lp_single_mem_Her i hk)
199
+ have he : lp.single ∞ i x*c*lp.single ∞ i k = lp.single ∞ i (x*c i*k) := by
200
+ apply lp.ext
201
+ funext j
202
+ by_cases hj : j=i
203
+ · subst j
204
+ change lp.single ∞ i x i*c i*lp.single ∞ i k i=lp.single ∞ i (x*c i*k) i
205
+ simp only [lp.single_apply_self]
206
+ · change lp.single ∞ i x j*c j*lp.single ∞ i k j=lp.single ∞ i (x*c i*k) j
207
+ rw [lp.single_apply_ne _ _ _ hj, lp.single_apply_ne _ _ _ hj,
208
+ lp.single_apply_ne _ _ _ hj, zero_mul, mul_zero]
209
+ rw [he, lp.norm_single (by simp : (0 : ℝ≥0∞)<∞),
210
+ lp.norm_single (by simp : (0 : ℝ≥0∞)<∞),
211
+ lp.norm_single (by simp : (0 : ℝ≥0∞)<∞)] at hi
212
+ exact hi
213
+ end MainGap
214
+
215
+ namespace MainGap
216
+ open scoped ENNReal
217
+ universe u
218
+ variable {A : Type u} [NonUnitalCStarAlgebra A]
219
+ local instance sequenceFactorOrder : PartialOrder A := CStarAlgebra.spectralOrder A
220
+ local instance sequenceFactorStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
221
+ local instance boundedSequenceOrder : PartialOrder (lp (fun _ : ℕ => A) ∞) := CStarAlgebra.spectralOrder _
222
+ local instance boundedSequenceStarOrder : StarOrderedRing (lp (fun _ : ℕ => A) ∞) := CStarAlgebra.spectralOrderedRing _
223
+
224
+ lemma NormSignal.lp_eval {a p : lp (fun _ : ℕ => A) ∞} (h : NormSignal a p) (i : ℕ) :
225
+ NormSignal (a i) (p i) := by
226
+ intro R hR
227
+ let S : HilbertRep.{u,u} (Unitization ℂ (lp (fun _ : ℕ => A) ∞)) :=
228
+ { R with hom := R.hom.comp (Unitization.starMap (lpEval i)) }
229
+ have he (x : lp (fun _ : ℕ => A) ∞) :
230
+ S.hom (x : Unitization ℂ (lp (fun _ : ℕ => A) ∞)) =
231
+ R.hom (x i : Unitization ℂ A) := by
232
+ simp [S]
233
+ have hr : (1/2:ℝ)<‖S.hom (a : Unitization ℂ (lp (fun _ : ℕ => A) ∞))‖ := by
234
+ rwa [he]
235
+ have ht := h S hr
236
+ rwa [he] at ht
237
+
238
+ theorem uniform_shrinking (hp : PropertyP A) :
239
+ ∃ θ : ℝ, 0 < θ ∧ θ < 1 ∧
240
+ ∀ a y c : A, 0 ≤ a → ‖a‖ ≤ 1 → 0 ≤ y → ‖y‖ ≤ 1 → ‖c‖ ≤ 1 →
241
+ ∃ p q : A, 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
242
+ 0 ≤ q ∧ ‖q‖ ≤ 1 ∧ q ∈ Her y ∧
243
+ HerCompression p q c θ ∧ NormSignal a p ∧ NormSignal y q := by
244
+ classical
245
+ by_contra hn
246
+ push Not at hn
247
+ let θ : ℕ → ℝ := fun n => 1-1/((n:ℝ)+2)
248
+ have hθ0 (n : ℕ) : 0 < θ n := by
249
+ dsimp [θ]
250
+ have h : (1:ℝ)/((n:ℝ)+2)<1 := (div_lt_one (by positivity)).mpr (by linarith [Nat.cast_nonneg (α := ℝ) n])
251
+ linarith
252
+ have hθ1 (n : ℕ) : θ n < 1 := by
253
+ dsimp [θ]
254
+ have : 0 < (1:ℝ)/((n:ℝ)+2) := by positivity
255
+ linarith
256
+ choose a y c ha han hy hyn hcn hfail using fun n => hn (θ n) (hθ0 n) (hθ1 n)
257
+ let a' : lp (fun _ : ℕ => A) ∞ := lpBuild a 1 han
258
+ let y' : lp (fun _ : ℕ => A) ∞ := lpBuild y 1 hyn
259
+ let c' : lp (fun _ : ℕ => A) ∞ := lpBuild c 1 hcn
260
+ have ha' : 0 ≤ a' := (lp_nonneg_iff a').mpr ha
261
+ have hy' : 0 ≤ y' := (lp_nonneg_iff y').mpr hy
262
+ have hyn' : ‖y'‖ ≤ 1 := lp.norm_le_of_forall_le (by norm_num) hyn
263
+ have hcn' : ‖c'‖ ≤ 1 := lp.norm_le_of_forall_le (by norm_num) hcn
264
+ obtain ⟨p,q,κ,hp0,hpn,hpH,hq0,hqn,hqH,hκ0,hκ1,hcomp,hps,hqs⟩ :=
265
+ shrinking_nonunital (propertyP_lp (fun _ : ℕ => hp)) ha' hy' hyn' hcn'
266
+ obtain ⟨n,hnκ⟩ := exists_nat_gt (1/(1-κ))
267
+ have hκθ : κ ≤ θ n := by
268
+ have hn2 : 1/(1-κ) < (n:ℝ)+2 := by linarith
269
+ have hmul : (1:ℝ) < ((n:ℝ)+2)*(1-κ) := (div_lt_iff₀ (by linarith)).mp hn2
270
+ have hdiv : 1/((n:ℝ)+2) < 1-κ := (div_lt_iff₀ (by positivity)).mpr (by nlinarith)
271
+ dsimp [θ]; linarith
272
+ apply hfail n (p n) (q n)
273
+ · exact (lp_nonneg_iff p).mp hp0 n
274
+ · exact (lp.norm_apply_le_norm ENNReal.top_ne_zero p n).trans hpn
275
+ · exact Her_map (lpEval n) hpH
276
+ · exact (lp_nonneg_iff q).mp hq0 n
277
+ · exact (lp.norm_apply_le_norm ENNReal.top_ne_zero q n).trans hqn
278
+ · exact Her_map (lpEval n) hqH
279
+ · intro x hx k hk
280
+ exact ((hcomp.lp_eval n) x hx k hk).trans (by gcongr)
281
+ · exact hps.lp_eval n
282
+ · exact hqs.lp_eval n
283
+ end MainGap
284
+
285
+ end
286
+
287
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Representation.lean ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+
11
+ section Ultra
12
+ variable {ι : Type*} (ω : Ultrafilter ι)
13
+
14
+ lemma exists_complex_ultralimit (z : ι → ℂ) (R : ℝ) (hz : ∀ i, ‖z i‖ ≤ R) :
15
+ ∃ c : ℂ, Tendsto z (ω : Filter ι) (𝓝 c) := by
16
+ obtain ⟨c, _, hc⟩ := (isCompact_closedBall (0 : ℂ) R).ultrafilter_le_nhds
17
+ (ω.map z) (by
18
+ rw [Ultrafilter.coe_map, Filter.le_principal_iff]
19
+ change ∀ᶠ i in (ω : Filter ι), z i ∈ Metric.closedBall 0 R
20
+ exact Filter.Eventually.of_forall (fun i => by simpa using hz i))
21
+ exact ⟨c, by
22
+ change Filter.map z (ω : Filter ι) ≤ 𝓝 c
23
+ simpa only [Ultrafilter.coe_map] using hc⟩
24
+
25
+ variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A]
26
+ variable (f : ι → A →ₚ[ℂ] ℂ) (hf : ∀ i a, ‖f i a‖ ≤ ‖a‖)
27
+
28
+ def ultraValue (a : A) : ℂ :=
29
+ (exists_complex_ultralimit ω (fun i => f i a) ‖a‖ (fun i => hf i a)).choose
30
+
31
+ lemma tendsto_ultraValue (a : A) :
32
+ Tendsto (fun i => f i a) (ω : Filter ι) (𝓝 (ultraValue ω f hf a)) :=
33
+ (exists_complex_ultralimit ω (fun i => f i a) ‖a‖ (fun i => hf i a)).choose_spec
34
+
35
+ def ultraPositive : A →ₚ[ℂ] ℂ where
36
+ toFun := ultraValue ω f hf
37
+ map_add' a b := by
38
+ apply tendsto_nhds_unique (tendsto_ultraValue ω f hf (a + b))
39
+ simpa only [map_add] using (tendsto_ultraValue ω f hf a).add
40
+ (tendsto_ultraValue ω f hf b)
41
+ map_smul' c a := by
42
+ apply tendsto_nhds_unique (tendsto_ultraValue ω f hf (c • a))
43
+ simpa only [map_smul, RingHom.id_apply] using (tendsto_ultraValue ω f hf a).const_smul c
44
+ monotone' := by
45
+ intro a b hab
46
+ exact le_of_tendsto_of_tendsto (tendsto_ultraValue ω f hf a)
47
+ (tendsto_ultraValue ω f hf b) (Filter.Eventually.of_forall fun i => (f i).monotone hab)
48
+
49
+ lemma tendsto_ultraPositive (a : A) :
50
+ Tendsto (fun i => f i a) (ω : Filter ι) (𝓝 (ultraPositive ω f hf a)) :=
51
+ tendsto_ultraValue ω f hf a
52
+
53
+ lemma ultraPositive_norm_le (a : A) : ‖ultraPositive ω f hf a‖ ≤ ‖a‖ :=
54
+ le_of_tendsto' (tendsto_ultraPositive ω f hf a).norm (fun i => hf i a)
55
+
56
+ lemma ultraPositive_eq_zero_of_tendsto {a : A}
57
+ (ha : Tendsto (fun i => f i a) (ω : Filter ι) (𝓝 0)) :
58
+ ultraPositive ω f hf a = 0 :=
59
+ tendsto_nhds_unique (tendsto_ultraPositive ω f hf a) ha
60
+ end Ultra
61
+
62
+ section GNS
63
+ variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
64
+ variable (f : A →ₚ[ℂ] ℂ)
65
+
66
+ lemma gns_zero_of_sandwich (a : A)
67
+ (ha : ∀ b : A, f (star (a * b) * (a * b)) = 0) :
68
+ f.gnsNonUnitalStarAlgHom a = 0 := by
69
+ ext x
70
+ induction x using UniformSpace.Completion.induction_on with
71
+ | hp => exact isClosed_eq (f.gnsNonUnitalStarAlgHom a).continuous continuous_const
72
+ | ih b =>
73
+ rw [zero_apply, ← norm_eq_zero]
74
+ rw [f.gnsNonUnitalStarAlgHom_apply_coe, UniformSpace.Completion.norm_coe]
75
+ change ‖f.toPreGNS (a * f.ofPreGNS b)‖ = 0
76
+ rw [f.preGNS_norm_def]
77
+ simp only [f.ofPreGNS_toPreGNS, ha, Complex.zero_re, Real.sqrt_zero]
78
+
79
+ lemma gnsStar_nonzero_of_value {B : Type*} [CStarAlgebra B] [PartialOrder B]
80
+ [StarOrderedRing B] (g : B →ₚ[ℂ] ℂ) (a : B)
81
+ (ha : g (star a * a) ≠ 0) : g.gnsStarAlgHom a ≠ 0 := by
82
+ intro h
83
+ have hx := congrArg (fun T : g.GNS →L[ℂ] g.GNS => T
84
+ (↑(g.toPreGNS 1) : g.GNS)) h
85
+ have hn := congrArg norm hx
86
+ change ‖g.gnsNonUnitalStarAlgHom a (↑(g.toPreGNS 1) : g.GNS)‖ = ‖(0 : g.GNS)‖ at hn
87
+ rw [g.gnsNonUnitalStarAlgHom_apply_coe, UniformSpace.Completion.norm_coe] at hn
88
+ have hab : ‖g.toPreGNS a‖ = 0 := by
89
+ simp only [norm_zero] at hn
90
+ change ‖g.toPreGNS (a * 1)‖ = 0 at hn
91
+ simpa using hn
92
+ have hh := g.preGNS_norm_sq (g.toPreGNS a)
93
+ rw [hab] at hh
94
+ apply ha
95
+ simpa using hh.symm
96
+ end GNS
97
+
98
+ section Vector
99
+ variable {A H : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
100
+ variable [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
101
+ variable (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (ξ : H)
102
+
103
+ def vectorPositive : A →ₚ[ℂ] ℂ where
104
+ toFun a := ⟪ξ, π a ξ⟫_ℂ
105
+ map_add' a b := by simp
106
+ map_smul' c a := by simp
107
+ monotone' := by
108
+ intro a b hab
109
+ rw [← sub_nonneg, ← inner_sub_right, ← sub_apply, ← map_sub]
110
+ exact ContinuousLinearMap.nonneg_iff_isPositive.mp
111
+ (map_nonneg π (sub_nonneg.mpr hab)) |>.inner_nonneg_right ξ
112
+
113
+ lemma vectorPositive_norm_le (hξ : ‖ξ‖ ≤ 1) (a : A) :
114
+ ‖vectorPositive π ξ a‖ ≤ ‖a‖ := by
115
+ calc
116
+ ‖vectorPositive π ξ a‖ ≤ ‖ξ‖ * ‖π a ξ‖ := norm_inner_le_norm ξ (π a ξ)
117
+ _ ≤ ‖ξ‖ * (‖a‖ * ‖ξ‖) := mul_le_mul_of_nonneg_left
118
+ ((π a).le_opNorm ξ |>.trans (mul_le_mul_of_nonneg_right
119
+ (NonUnitalStarAlgHom.norm_apply_le π a) (norm_nonneg ξ))) (norm_nonneg ξ)
120
+ _ ≤ 1 * (‖a‖ * 1) := mul_le_mul hξ
121
+ (mul_le_mul_of_nonneg_left hξ (norm_nonneg a)) (by positivity) (by positivity)
122
+ _ = ‖a‖ := by ring
123
+
124
+ lemma vectorPositive_star_mul (a : A) :
125
+ vectorPositive π ξ (star a * a) = (‖π a ξ‖ ^ 2 : ℝ) := by
126
+ change ⟪ξ, π (star a * a) ξ⟫_ℂ = _
127
+ rw [map_mul, map_star, mul_apply_eq_comp, ContinuousLinearMap.star_eq_adjoint,
128
+ ContinuousLinearMap.adjoint_inner_right, inner_self_eq_norm_sq_to_K, Complex.ofReal_pow]
129
+ rfl
130
+ end Vector
131
+
132
+ section LimitRep
133
+ variable {ι A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
134
+ variable {H : ι → Type*} [∀ i, NormedAddCommGroup (H i)]
135
+ [∀ i, InnerProductSpace ℂ (H i)] [∀ i, CompleteSpace (H i)]
136
+ variable (ω : Ultrafilter ι) (π : ∀ i, A →⋆ₐ[ℂ] (H i →L[ℂ] H i))
137
+ (ξ : ∀ i, H i) (hξ : ∀ i, ‖ξ i‖ ≤ 1)
138
+
139
+ def limitFunctional : A →ₚ[ℂ] ℂ :=
140
+ ultraPositive ω (fun i => vectorPositive (π i) (ξ i))
141
+ (fun i => vectorPositive_norm_le (π i) (ξ i) (hξ i))
142
+
143
+ abbrev LimitHilbert := (limitFunctional ω π ξ hξ).GNS
144
+
145
+ def limitRep : A →⋆ₐ[ℂ] (LimitHilbert ω π ξ hξ →L[ℂ] LimitHilbert ω π ξ hξ) :=
146
+ (limitFunctional ω π ξ hξ).gnsStarAlgHom
147
+
148
+ lemma limitFunctional_tendsto (a : A) :
149
+ Tendsto (fun i => vectorPositive (π i) (ξ i) a) (ω : Filter ι)
150
+ (𝓝 (limitFunctional ω π ξ hξ a)) := tendsto_ultraPositive _ _ _ _
151
+
152
+ lemma limitRep_annihilates (a : A)
153
+ (ha : Tendsto (fun i => ‖π i a‖) (ω : Filter ι) (𝓝 0)) :
154
+ limitRep ω π ξ hξ a = 0 := by
155
+ change (limitFunctional ω π ξ hξ).gnsNonUnitalStarAlgHom a = 0
156
+ apply gns_zero_of_sandwich
157
+ intro b
158
+ apply ultraPositive_eq_zero_of_tendsto
159
+ have hh : Tendsto (fun i => ‖π i (a * b) (ξ i)‖) (ω : Filter ι) (𝓝 0) := by
160
+ apply squeeze_zero (fun i => norm_nonneg _) (fun i => ?_)
161
+ (show Tendsto (fun i => ‖π i a‖ * ‖b‖) (ω : Filter ι) (𝓝 0) by
162
+ simpa using ha.mul_const ‖b‖)
163
+ have hmul : ‖π i (a * b)‖ ≤ ‖π i a‖ * ‖b‖ := by
164
+ rw [map_mul]
165
+ exact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_left
166
+ (NonUnitalStarAlgHom.norm_apply_le (π i) b) (norm_nonneg _))
167
+ calc
168
+ ‖π i (a * b) (ξ i)‖ ≤ ‖π i (a * b)‖ * ‖ξ i‖ := (π i (a * b)).le_opNorm _
169
+ _ ≤ (‖π i a‖ * ‖b‖) * 1 := mul_le_mul hmul (hξ i) (norm_nonneg _) (by positivity)
170
+ _ = ‖π i a‖ * ‖b‖ := mul_one _
171
+ simpa only [vectorPositive_star_mul, zero_pow (by decide : 2 ≠ 0), Complex.ofReal_zero]
172
+ using (hh.pow 2).ofReal
173
+
174
+ lemma limitRep_nonzero (a : A) {δ : ℝ} (hδ : 0 < δ)
175
+ (ha : ∀ᶠ i in (ω : Filter ι), δ ≤ ‖π i a (ξ i)‖) :
176
+ limitRep ω π ξ hξ a ≠ 0 := by
177
+ apply gnsStar_nonzero_of_value
178
+ have hlim := (Complex.continuous_re.tendsto _).comp
179
+ (limitFunctional_tendsto ω π ξ hξ (star a * a))
180
+ have hle : δ ^ 2 ≤ (limitFunctional ω π ξ hξ (star a * a)).re := by
181
+ apply ge_of_tendsto hlim
182
+ filter_upwards [ha] with i hi
183
+ simp only [Function.comp_apply, vectorPositive_star_mul, Complex.ofReal_re]
184
+ exact pow_le_pow_left₀ hδ.le hi 2
185
+ intro hf
186
+ rw [hf, Complex.zero_re] at hle
187
+ nlinarith [sq_pos_of_pos hδ]
188
+ end LimitRep
189
+ end MainGap
190
+
191
+ noncomputable section
192
+ open scoped Topology ComplexOrder InnerProductSpace
193
+ namespace MainGap
194
+
195
+ variable {A H : Type*} [CStarAlgebra A]
196
+ variable [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
197
+ variable (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (v : A)
198
+
199
+ def generatedRange : Submodule ℂ H :=
200
+ (Submodule.span ℂ {x | ∃ a : A, ∃ y : H, x = π a (π v y)}).topologicalClosure
201
+
202
+ instance : CompleteSpace (generatedRange π v) := by
203
+ unfold generatedRange
204
+ infer_instance
205
+
206
+ lemma range_mem_generatedRange (y : H) : π v y ∈ generatedRange π v := by
207
+ apply Submodule.le_topologicalClosure
208
+ apply Submodule.subset_span
209
+ exact ⟨1, y, by simp⟩
210
+
211
+ lemma generatedRange_invariant (a : A) :
212
+ ∀ x ∈ generatedRange π v, π a x ∈ generatedRange π v := by
213
+ change generatedRange π v ≤ (generatedRange π v).comap (π a).toLinearMap
214
+ apply Submodule.topologicalClosure_minimal
215
+ · apply Submodule.span_le.mpr
216
+ rintro x ⟨b, y, rfl⟩
217
+ apply Submodule.le_topologicalClosure
218
+ apply Submodule.subset_span
219
+ exact ⟨a * b, y, by simp⟩
220
+ · exact (Submodule.isClosed_topologicalClosure _).preimage (π a).continuous
221
+
222
+ def rangeRestriction : A →⋆ₐ[ℂ] (generatedRange π v →L[ℂ] generatedRange π v) where
223
+ toFun a := (π a).restrict (generatedRange_invariant π v a)
224
+ map_one' := by ext x; simp [ContinuousLinearMap.restrict]
225
+ map_mul' a b := by ext x; simp [ContinuousLinearMap.restrict]
226
+ map_add' a b := by ext x; simp [ContinuousLinearMap.restrict]
227
+ commutes' c := by ext x; simp [ContinuousLinearMap.restrict, Algebra.algebraMap_eq_smul_one]
228
+ map_zero' := by ext x; simp [ContinuousLinearMap.restrict]
229
+ map_star' a := by
230
+ change (π (star a)).restrict (generatedRange_invariant π v (star a)) =
231
+ ContinuousLinearMap.adjoint ((π a).restrict (generatedRange_invariant π v a))
232
+ apply (ContinuousLinearMap.eq_adjoint_iff _ _).mpr
233
+ intro x y
234
+ change ⟪π (star a) (x : H), (y : H)⟫_ℂ = ⟪(x : H), π a (y : H)⟫_ℂ
235
+ rw [map_star, ContinuousLinearMap.star_eq_adjoint,
236
+ ContinuousLinearMap.adjoint_inner_left]
237
+
238
+ @[simp]
239
+ lemma rangeRestriction_apply (a : A) (x : generatedRange π v) :
240
+ ((rangeRestriction π v a x : generatedRange π v) : H) = π a (x : H) := rfl
241
+
242
+ lemma rangeRestriction_kills (u : A) (hu : ∀ a : A, π u * π a * π v = 0) :
243
+ rangeRestriction π v u = 0 := by
244
+ have hle : generatedRange π v ≤ (π u).ker := by
245
+ apply Submodule.topologicalClosure_minimal
246
+ · apply Submodule.span_le.mpr
247
+ rintro x ⟨a, y, rfl⟩
248
+ change π u (π a (π v y)) = 0
249
+ have := congrArg (fun T : H →L[ℂ] H => T y) (hu a)
250
+ simpa using this
251
+ · exact (π u).isClosed_ker
252
+ ext x
253
+ exact hle x.property
254
+
255
+ lemma rangeRestriction_nonzero (hv : IsSelfAdjoint v) (hne : π v ≠ 0) :
256
+ rangeRestriction π v v ≠ 0 := by
257
+ intro h
258
+ apply hne
259
+ apply (CStarRing.star_mul_self_eq_zero_iff (π v)).mp
260
+ have hv' : IsSelfAdjoint (π v) := hv.map π
261
+ rw [hv'.star_eq]
262
+ ext y
263
+ have hy := congrArg (fun T : generatedRange π v →L[ℂ] generatedRange π v =>
264
+ T ⟨π v y, range_mem_generatedRange π v y⟩) h
265
+ have := congrArg (fun x : generatedRange π v => (x : H)) hy
266
+ simpa using this
267
+
268
+ end MainGap
269
+
270
+ end
271
+ end
272
+
273
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Separation.lean ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Products
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ universe u
11
+ variable {A : Type u} [NonUnitalCStarAlgebra A]
12
+ local instance separationPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance separationStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+
15
+ lemma ramp_mem_Her {a : A} (ha : 0 ≤ a) {l u : ℝ} (hl : 0 ≤ l) :
16
+ ramp a l u ∈ Her a :=
17
+ Her_mono_of_mem (cut_mem_Her ha l) (ramp_mem_Her_cut ha hl)
18
+
19
+ lemma NormSignal.cutoff_ramp {a p : A} (h : NormSignal a p) (hp : 0 ≤ p) :
20
+ NormSignal a (ramp p (1/2) 1) := by
21
+ intro R hR
22
+ let π := R.hom.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom ℂ A)
23
+ change ‖π (ramp p (1/2) 1)‖=1
24
+ rw [map_ramp π hp (by norm_num : (0:ℝ)≤1/2)]
25
+ apply norm_ramp_eq_one (map_nonneg π hp) (by norm_num) (by norm_num)
26
+ exact (h R hR).symm.le
27
+
28
+ lemma HerCompression.mono {p q c : A} {κ τ : ℝ} (h : HerCompression p q c κ)
29
+ (hκτ : κ ≤ τ) : HerCompression p q c τ := by
30
+ intro x hx k hk
31
+ exact (h x hx k hk).trans (by gcongr)
32
+
33
+ lemma iteration_step {p q c : A} {r θ : ℝ} (hp : 0 ≤ p) (hq : 0 ≤ q)
34
+ (hr : 0 < r) (_h : HerCompression p q c r)
35
+ {p' q' : A} (hp'H : p' ∈ Her (ramp p (1/2) 1))
36
+ (hq'H : q' ∈ Her (ramp q (1/2) 1))
37
+ (h' : HerCompression p' q'
38
+ (r⁻¹ • (ramp p (1/4) (1/2)*c*ramp q (1/4) (1/2))) θ) :
39
+ HerCompression p' q' c (r*θ) := by
40
+ have hpg : ramp p (1/4) (1/2)*cut p (1/2)=cut p (1/2) :=
41
+ ramp_mul_cut hp (by norm_num) (by norm_num) le_rfl
42
+ have hqg : ramp q (1/4) (1/2)*cut q (1/2)=cut q (1/2) :=
43
+ ramp_mul_cut hq (by norm_num) (by norm_num) le_rfl
44
+ have hpg' : cut p (1/2)*ramp p (1/4) (1/2)=cut p (1/2) := by
45
+ simpa only [star_mul, (cut_nonneg p (1/2)).isSelfAdjoint.star_eq,
46
+ (ramp_nonneg p (by norm_num : (1/4:ℝ)≤1/2)).isSelfAdjoint.star_eq] using congrArg star hpg
47
+ intro x hx k hk
48
+ have hxcut : x ∈ Her (cut p (1/2)) :=
49
+ Her_mono_of_mem (ramp_mem_Her_cut hp (by norm_num : (0:ℝ)≤1/2))
50
+ (Her_mono_of_mem hp'H hx)
51
+ have hkcut : k ∈ Her (cut q (1/2)) :=
52
+ Her_mono_of_mem (ramp_mem_Her_cut hq (by norm_num : (0:ℝ)≤1/2))
53
+ (Her_mono_of_mem hq'H hk)
54
+ have hxg := Her_fixed_right (cut_nonneg p (1/2)).isSelfAdjoint hpg' hxcut
55
+ have hgk := Her_fixed_left hqg hkcut
56
+ have he : x*(r⁻¹ • (ramp p (1/4) (1/2)*c*ramp q (1/4) (1/2)))*k =
57
+ r⁻¹ • (x*c*k) := by
58
+ rw [mul_smul_comm, smul_mul_assoc]
59
+ congr 1
60
+ simp only [mul_assoc, ← mul_assoc x (ramp p (1/4) (1/2)), hxg, hgk]
61
+ have hb := h' x hx k hk
62
+ rw [he, norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hr)] at hb
63
+ have hbr := mul_le_mul_of_nonneg_left hb hr.le
64
+ simpa only [← mul_assoc, mul_inv_cancel₀ hr.ne', one_mul] using hbr
65
+
66
+ theorem iterated_separation (hp : PropertyP A) {a b c : A} (ha : 0 ≤ a) (han : ‖a‖ ≤ 1)
67
+ (hb : 0 ≤ b) (hbn : ‖b‖ ≤ 1) (hcn : ‖c‖ ≤ 1) {ζ : ℝ} (hζ : 0 < ζ) :
68
+ ∃ (p q : A) (κ : ℝ), 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
69
+ 0 ≤ q ∧ ‖q‖ ≤ 1 ∧ q ∈ Her b ∧ 0 ≤ κ ∧ κ < ζ ∧
70
+ HerCompression p q c κ ∧ NormSignal a p ∧ NormSignal b q := by
71
+ obtain ⟨θ,hθ0,hθ1,huniform⟩ := uniform_shrinking hp
72
+ have hi : ∀ n : ℕ, ∃ p q : A, 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
73
+ 0 ≤ q ∧ ‖q‖ ≤ 1 ∧ q ∈ Her b ∧
74
+ HerCompression p q c (θ^(n+1)) ∧ NormSignal a p ∧ NormSignal b q := by
75
+ intro n
76
+ induction n with
77
+ | zero => simpa only [Nat.zero_add, pow_one] using huniform a b c ha han hb hbn hcn
78
+ | succ n ih =>
79
+ obtain ⟨p,q,hp0,hpn,hpH,hq0,hqn,hqH,hcomp,hps,hqs⟩ := ih
80
+ let f : A → A := fun p => ramp p (1/2) 1
81
+ let g : A → A := fun p => ramp p (1/4) (1/2)
82
+ let r := θ^(n+1)
83
+ have hr : 0 < r := pow_pos hθ0 _
84
+ have hgH (p : A) (hp : 0 ≤ p) : g p ∈ Her p := ramp_mem_Her hp (by norm_num)
85
+ have hgn (p : A) : ‖g p‖ ≤ 1 := norm_ramp_le_one p (by norm_num)
86
+ have hf0 (p : A) : 0 ≤ f p := ramp_nonneg p (by norm_num)
87
+ have hfn (p : A) : ‖f p‖ ≤ 1 := norm_ramp_le_one p (by norm_num)
88
+ have hc' : ‖r⁻¹ • (g p*c*g q)‖ ≤ 1 := by
89
+ rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hr)]
90
+ have hh : ‖g p*c*g q‖ ≤ r := (hcomp _ (hgH p hp0) _ (hgH q hq0)).trans (by
91
+ calc r*‖g p‖*‖g q‖ ≤ r*1*1 := by gcongr <;> apply hgn
92
+ _ = r := by ring)
93
+ calc r⁻¹*‖g p*c*g q‖ ≤ r⁻¹*r := mul_le_mul_of_nonneg_left hh (inv_nonneg.mpr hr.le)
94
+ _ = 1 := inv_mul_cancel₀ hr.ne'
95
+ obtain ⟨p',q',hp'0,hp'n,hp'H,hq'0,hq'n,hq'H,hcomp',hps',hqs'⟩ :=
96
+ huniform (f p) (f q) (r⁻¹ • (g p*c*g q)) (hf0 p) (hfn p) (hf0 q) (hfn q) hc'
97
+ refine ⟨p',q',hp'0,hp'n,?_,hq'0,hq'n,?_,?_,?_,?_⟩
98
+ · exact Her_mono_of_mem hpH (Her_mono_of_mem (ramp_mem_Her hp0 (by norm_num)) hp'H)
99
+ · exact Her_mono_of_mem hqH (Her_mono_of_mem (ramp_mem_Her hq0 (by norm_num)) hq'H)
100
+ · have hh := iteration_step hp0 hq0 hr hcomp hp'H hq'H hcomp'
101
+ simpa only [r, pow_succ] using hh
102
+ · intro R hR
103
+ exact hps' R (by rw [hps.cutoff_ramp hp0 R hR]; norm_num)
104
+ · intro R hR
105
+ exact hqs' R (by rw [hqs.cutoff_ramp hq0 R hR]; norm_num)
106
+ obtain ⟨n,hn⟩ := exists_pow_lt_of_lt_one hζ hθ1
107
+ obtain ⟨p,q,hp0,hpn,hpH,hq0,hqn,hqH,hcomp,hps,hqs⟩ := hi n
108
+ refine ⟨p,q,θ^(n+1),hp0,hpn,hpH,hq0,hqn,hqH,(pow_pos hθ0 _).le,?_,hcomp,hps,hqs⟩
109
+ exact (by rw [pow_succ]; nlinarith [pow_pos hθ0 n] : θ^(n+1)≤θ^n).trans_lt hn
110
+ end MainGap
111
+
112
+ end
113
+
114
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Shrinking.lean ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Compression
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ universe u v
11
+ variable {A : Type u} [CStarAlgebra A]
12
+ local instance shrinkingPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
13
+ local instance shrinkingStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
14
+ local instance shrinkingOperatorPartialOrder (J : Type*) [NormedAddCommGroup J]
15
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
16
+ PartialOrder (J →L[ℂ] J) := CStarAlgebra.spectralOrder _
17
+ local instance shrinkingOperatorStarOrderedRing (J : Type*) [NormedAddCommGroup J]
18
+ [InnerProductSpace ℂ J] [CompleteSpace J] :
19
+ StarOrderedRing (J →L[ℂ] J) := CStarAlgebra.spectralOrderedRing _
20
+
21
+ theorem conditional_shrinking {a y c p : A} (_ha : 0 ≤ a) (hy : 0 ≤ y)
22
+ (hp : 0 ≤ p) (hpn : ‖p‖ ≤ 1) (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1)
23
+ (hpH : p ∈ Her a)
24
+ (hsignal : ∀ R : HilbertRep.{u,u} A, (1/2:ℝ)<‖R.hom a‖ → ‖R.hom p‖=1)
25
+ (hvan : ∀ R : HilbertRep.{u,u} A,
26
+ R.hom (y*(1-star c*(p*p)*c)*y)=0 → ‖R.hom y‖ ≤ (1/4:ℝ)) :
27
+ ∃ (p₁ q₁ : A) (κ : ℝ), 0 ≤ p₁ ∧ ‖p₁‖ ≤ 1 ∧ p₁ ∈ Her a ∧
28
+ 0 ≤ q₁ ∧ ‖q₁‖ ≤ 1 ∧ q₁ ∈ Her y ∧ 0 ≤ κ ∧ κ < 1 ∧
29
+ HerCompression p₁ q₁ c κ ∧
30
+ (∀ R : HilbertRep.{u,u} A, (1/2:ℝ)<‖R.hom a‖ → ‖R.hom p₁‖=1) ∧
31
+ (∀ R : HilbertRep.{u,u} A, (1/2:ℝ)<‖R.hom y‖ → ‖R.hom q₁‖=1) := by
32
+ obtain ⟨δ,hδ,hδ₁,hquant⟩ := quantitative_nonvanishing hy hvan
33
+ let d := y*(1-star c*(p*p)*c)*y
34
+ have hd : 0 ≤ d := (conditional_defect_bounds hp hy hpn hyn hcn).1
35
+ let q := y*cut d δ*y
36
+ have hq : 0 ≤ q := by
37
+ simpa only [hy.isSelfAdjoint.star_eq] using star_left_conjugate_nonneg (cut_nonneg d δ) y
38
+ have hqH : q ∈ Her y := by
39
+ simpa only [hy.isSelfAdjoint.star_eq] using sandwich_mem_Her y (cut d δ)
40
+ have hqvan (R : HilbertRep.{u,u} A) (hz : R.hom q=0) : ‖R.hom y‖ ≤ (3/8:ℝ) := by
41
+ have hqzero : R.hom y * cut (R.hom y*(1-star (R.hom c)*(R.hom p*R.hom p)*R.hom c)*R.hom y) δ * R.hom y=0 := by
42
+ change R.hom (y*cut d δ*y)=0 at hz
43
+ rw [map_mul, map_mul, map_cut_sa R.hom hd.isSelfAdjoint hδ.le] at hz
44
+ simpa only [d, map_mul, map_sub, map_one, map_star] using hz
45
+ have hb := conditional_q_zero (map_nonneg R.hom hp) (map_nonneg R.hom hy)
46
+ ((NonUnitalStarAlgHom.norm_apply_le R.hom p).trans hpn)
47
+ ((NonUnitalStarAlgHom.norm_apply_le R.hom y).trans hyn)
48
+ ((NonUnitalStarAlgHom.norm_apply_le R.hom c).trans hcn) hδ hqzero
49
+ have hb' : ‖R.hom d‖ ≤ δ := by
50
+ simpa only [d, map_mul, map_sub, map_one, map_star] using hb
51
+ by_contra! hRy
52
+ exact (not_lt_of_ge hb') (hquant R hRy)
53
+ obtain ⟨δ',hδ',hδ'₁,hquant'⟩ := quantitative_nonvanishing_general hy
54
+ (by norm_num : (0:ℝ)≤3/8) (by norm_num : (3/8:ℝ)<1/2) hqvan
55
+ let r := Real.sqrt (1-δ)
56
+ have hr : 0 ≤ r := Real.sqrt_nonneg _
57
+ have hr₁ : r < 1 := by
58
+ apply (Real.sqrt_lt' (by norm_num : (0:ℝ)<1)).mpr
59
+ linarith
60
+ let τ := (r+1)/2
61
+ have hτ : 0 < τ := by dsimp [τ]; linarith
62
+ have hrτ : r < τ := by dsimp [τ]; linarith
63
+ have hτ₁ : τ < 1 := by dsimp [τ]; linarith
64
+ let p₁ := ramp p τ 1
65
+ let q₁ := ramp q (δ'/2) δ'
66
+ have hp₁ : 0 ≤ p₁ := ramp_nonneg p hτ₁.le
67
+ have hq₁ : 0 ≤ q₁ := ramp_nonneg q (by linarith)
68
+ have hq₁H : q₁ ∈ Her q :=
69
+ Her_mono_of_mem (cut_mem_Her hq (δ'/2)) (ramp_mem_Her_cut hq (by positivity))
70
+ refine ⟨p₁,q₁,r/τ,hp₁,norm_ramp_le_one p hτ₁.le,?_,hq₁,
71
+ norm_ramp_le_one q (by linarith),Her_mono_of_mem hqH hq₁H,
72
+ div_nonneg hr hτ.le,(div_lt_one hτ).mpr hrτ,?_,?_,?_⟩
73
+ · exact Her_mono_of_mem hpH (Her_mono_of_mem (cut_mem_Her hp τ) (ramp_mem_Her_cut hp hτ.le))
74
+ · have hcomp := compression_of_conditional_loss hp hτ hr (conditional_Her_loss hp hy hpn hyn hcn hδ.le hδ₁.le)
75
+ intro x hx k hk
76
+ exact hcomp x hx k (Her_mono_of_mem hq₁H hk)
77
+ · intro R hRa
78
+ change ‖R.hom (ramp p τ 1)‖=1
79
+ rw [map_ramp_sa R.hom hp.isSelfAdjoint hτ.le]
80
+ exact norm_ramp_eq_one (map_nonneg R.hom hp) hτ.le hτ₁ (by rw [hsignal R hRa])
81
+ · intro R hRy
82
+ change ‖R.hom (ramp q (δ'/2) δ')‖=1
83
+ rw [map_ramp_sa R.hom hq.isSelfAdjoint (by positivity)]
84
+ exact norm_ramp_eq_one (map_nonneg R.hom hq) (by positivity) (by linarith) (hquant' R hRy).le
85
+
86
+ theorem shrinking_unital_local {a y c : A} (ha : 0 ≤ a) (hy : 0 ≤ y)
87
+ (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1)
88
+ (hp : ∀ z : A, 0 ≤ z → z ∈ Her a → ProperlyInfinite z) :
89
+ ∃ (p q : A) (κ : ℝ), 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
90
+ 0 ≤ q ∧ ‖q‖ ≤ 1 ∧ q ∈ Her y ∧ 0 ≤ κ ∧ κ < 1 ∧
91
+ HerCompression p q c κ ∧
92
+ (∀ R : HilbertRep.{u,u} A, (1/2:ℝ)<‖R.hom a‖ → ‖R.hom p‖=1) ∧
93
+ (∀ R : HilbertRep.{u,u} A, (1/2:ℝ)<‖R.hom y‖ → ‖R.hom q‖=1) := by
94
+ obtain ⟨p,hpp,hpn,hpH,hsignal,hvan⟩ := graph_nonvanishing.{u,u} ha hy hcn hp
95
+ exact conditional_shrinking ha hy hpp hpn hyn hcn hpH hsignal hvan
96
+
97
+ end MainGap
98
+
99
+ namespace MainGap
100
+ variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B]
101
+
102
+ def matrixMap (π : A →⋆ₙₐ[ℂ] B) {m n : ℕ} (x : CStarMatrix (Fin m) (Fin n) A) :
103
+ CStarMatrix (Fin m) (Fin n) B := CStarMatrix.ofMatrix (fun i j => π (x i j))
104
+
105
+ lemma matrixMap_mul (π : A →⋆ₙₐ[ℂ] B) {l m n : ℕ}
106
+ (x : CStarMatrix (Fin l) (Fin m) A) (y : CStarMatrix (Fin m) (Fin n) A) :
107
+ matrixMap π (x*y)=matrixMap π x * matrixMap π y := by
108
+ ext i j
109
+ change π (∑ k, x i k * y k j) = ∑ k, π (x i k) * π (y k j)
110
+ simp only [map_sum, map_mul]
111
+
112
+ lemma matrixMap_star (π : A →⋆ₙₐ[ℂ] B) {m n : ℕ}
113
+ (x : CStarMatrix (Fin m) (Fin n) A) :
114
+ matrixMap π x.conjTranspose=(matrixMap π x).conjTranspose := by
115
+ ext i j
116
+ change π (star (x j i)) = star (π (x j i))
117
+ exact map_star π _
118
+
119
+ lemma continuous_matrixMap (π : A →⋆ₙₐ[ℂ] B) {m n : ℕ} :
120
+ Continuous (matrixMap π : CStarMatrix (Fin m) (Fin n) A → CStarMatrix (Fin m) (Fin n) B) := by
121
+ apply continuous_pi
122
+ intro i
123
+ apply continuous_pi
124
+ intro j
125
+ exact (map_continuous π).comp ((continuous_apply j).comp (continuous_apply i))
126
+
127
+ lemma FiniteCuntzLE.map (π : A →⋆ₙₐ[ℂ] B) {m n : ℕ}
128
+ {d : CStarMatrix (Fin n) (Fin n) A} {v : CStarMatrix (Fin m) (Fin m) A}
129
+ (h : FiniteCuntzLE d v) : FiniteCuntzLE (matrixMap π d) (matrixMap π v) := by
130
+ obtain ⟨r,ht⟩ := h
131
+ refine ⟨fun j => matrixMap π (r j), ?_⟩
132
+ have he := (continuous_matrixMap π).continuousAt.tendsto.comp ht
133
+ change Tendsto (fun j => matrixMap π ((r j).conjTranspose * v * r j)) atTop (𝓝 (matrixMap π d)) at he
134
+ simpa only [matrixMap_mul, matrixMap_star] using he
135
+
136
+ lemma ProperlyInfinite.map (π : A →⋆ₙₐ[ℂ] B) {h : A} (hh : ProperlyInfinite h) :
137
+ ProperlyInfinite (π h) := by
138
+ have he := FiniteCuntzLE.map π hh
139
+ have hdouble : matrixMap π (doubleCorner h)=doubleCorner (π h) := by
140
+ ext i j
141
+ change π (if i=j then h else 0) = if i=j then π h else 0
142
+ split_ifs <;> simp
143
+ have hsingle : matrixMap π (scalarCorner h)=scalarCorner (π h) := rfl
144
+ change FiniteCuntzLE _ _
145
+ rwa [hdouble, hsingle] at he
146
+
147
+ end MainGap
148
+
149
+ namespace MainGap
150
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
151
+ local instance shrinkingHerPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
152
+ local instance shrinkingHerStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
153
+ local instance shrinkingHerUnitizationPartialOrder : PartialOrder (Unitization ℂ A) :=
154
+ CStarAlgebra.spectralOrder _
155
+ local instance shrinkingHerUnitizationStarOrderedRing : StarOrderedRing (Unitization ℂ A) :=
156
+ CStarAlgebra.spectralOrderedRing _
157
+
158
+ lemma unitization_Her {a : A} {z : Unitization ℂ A}
159
+ (hz : z ∈ Her (a : Unitization ℂ A)) : z.fst=0 ∧ z.snd ∈ Her a := by
160
+ have hc : IsClosed {z : Unitization ℂ A | z.fst=0 ∧ z.snd ∈ Her a} :=
161
+ (isClosed_eq Unitization.continuous_fst continuous_const).inter
162
+ ((isClosed_Her a).preimage Unitization.continuous_snd)
163
+ apply closure_minimal (s := Set.range (fun b : Unitization ℂ A =>
164
+ (a : Unitization ℂ A)*b*star (a : Unitization ℂ A))) _ hc hz
165
+ rintro z ⟨b,rfl⟩
166
+ constructor
167
+ · simp
168
+ · change ((a : Unitization ℂ A)*b*star (a : Unitization ℂ A)).snd ∈ Her a
169
+ have he : ((a : Unitization ℂ A)*b*star (a : Unitization ℂ A)).snd =
170
+ b.fst • (a*star a) + a*b.snd*star a := by
171
+ simp [Unitization.snd_mul, Unitization.fst_mul, add_mul, smul_mul_assoc]
172
+ rw [he]
173
+ exact (Her a).add_mem ((Her a).smul_mem b.fst (mul_star_mem_Her a)) (sandwich_mem_Her a b.snd)
174
+
175
+ lemma unitization_inr_snd_of_Her {a : A} {z : Unitization ℂ A}
176
+ (hz : z ∈ Her (a : Unitization ℂ A)) : (z.snd : Unitization ℂ A)=z := by
177
+ have he := Unitization.inl_fst_add_inr_snd_eq z
178
+ simpa only [(unitization_Her hz).1, Unitization.inl_zero, zero_add] using he
179
+
180
+ lemma unitization_proper_hereditary (hp : PropertyP A) {a : A}
181
+ {z : Unitization ℂ A} (hz : 0 ≤ z) (hzH : z ∈ Her (a : Unitization ℂ A)) :
182
+ ProperlyInfinite z := by
183
+ have he := unitization_inr_snd_of_Her hzH
184
+ have hz' : 0 ≤ z.snd := Unitization.inr_nonneg_iff.mp (he.symm ▸ hz)
185
+ have hh := (hp z.snd hz').map (Unitization.inrNonUnitalStarAlgHom ℂ A)
186
+ change ProperlyInfinite (z.snd : Unitization ℂ A) at hh
187
+ rwa [he] at hh
188
+
189
+ end MainGap
190
+
191
+ namespace MainGap
192
+ universe u
193
+ variable {A : Type u} [NonUnitalCStarAlgebra A]
194
+ local instance shrinkingNonunitalPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
195
+ local instance shrinkingNonunitalStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
196
+ local instance shrinkingNonunitalUnitizationPartialOrder : PartialOrder (Unitization ℂ A) :=
197
+ CStarAlgebra.spectralOrder _
198
+ local instance shrinkingNonunitalUnitizationStarOrderedRing : StarOrderedRing (Unitization ℂ A) :=
199
+ CStarAlgebra.spectralOrderedRing _
200
+
201
+ def NormSignal (a p : A) : Prop :=
202
+ ∀ R : HilbertRep.{u,u} (Unitization ℂ A), (1/2:ℝ)<‖R.hom (a : Unitization ℂ A)‖ →
203
+ ‖R.hom (p : Unitization ℂ A)‖=1
204
+
205
+ theorem shrinking_nonunital (hp : PropertyP A) {a y c : A} (ha : 0 ≤ a) (hy : 0 ≤ y)
206
+ (hyn : ‖y‖ ≤ 1) (hcn : ‖c‖ ≤ 1) :
207
+ ∃ (p q : A) (κ : ℝ), 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ p ∈ Her a ∧
208
+ 0 ≤ q ∧ ‖q‖ ≤ 1 ∧ q ∈ Her y ∧ 0 ≤ κ ∧ κ < 1 ∧
209
+ HerCompression p q c κ ∧ NormSignal a p ∧ NormSignal y q := by
210
+ obtain ⟨p,q,κ,hp0,hpn,hpH,hq0,hqn,hqH,hκ0,hκ1,hcomp,hps,hqs⟩ :=
211
+ shrinking_unital_local (Unitization.inr_nonneg_iff.mpr ha)
212
+ (Unitization.inr_nonneg_iff.mpr hy)
213
+ (by simpa only [Unitization.norm_inr] using hyn : ‖(y : Unitization ℂ A)‖ ≤ 1)
214
+ (by simpa only [Unitization.norm_inr] using hcn : ‖(c : Unitization ℂ A)‖ ≤ 1)
215
+ (fun z hz hzH => unitization_proper_hereditary hp hz hzH)
216
+ have hep := unitization_inr_snd_of_Her hpH
217
+ have heq := unitization_inr_snd_of_Her hqH
218
+ refine ⟨p.snd,q.snd,κ,Unitization.inr_nonneg_iff.mp (hep.symm ▸ hp0),?_,
219
+ (unitization_Her hpH).2,Unitization.inr_nonneg_iff.mp (heq.symm ▸ hq0),?_,
220
+ (unitization_Her hqH).2,hκ0,hκ1,?_,?_,?_⟩
221
+ · have hn : ‖p.snd‖=‖p‖ := by simpa only [Unitization.norm_inr] using congrArg norm hep
222
+ rwa [hn]
223
+ · have hn : ‖q.snd‖=‖q‖ := by simpa only [Unitization.norm_inr] using congrArg norm heq
224
+ rwa [hn]
225
+ · intro x hx k hk
226
+ have hx' := Her_map (Unitization.inrNonUnitalStarAlgHom ℂ A) hx
227
+ have hk' := Her_map (Unitization.inrNonUnitalStarAlgHom ℂ A) hk
228
+ change (x : Unitization ℂ A) ∈ Her (p.snd : Unitization ℂ A) at hx'
229
+ change (k : Unitization ℂ A) ∈ Her (q.snd : Unitization ℂ A) at hk'
230
+ rw [hep] at hx'
231
+ rw [heq] at hk'
232
+ have hb := hcomp _ hx' _ hk'
233
+ simpa only [← Unitization.inr_mul, Unitization.norm_inr] using hb
234
+ · intro R hRa
235
+ rw [hep]
236
+ exact hps R hRa
237
+ · intro R hRy
238
+ rw [heq]
239
+ exact hqs R hRy
240
+ end MainGap
241
+
242
+ end
243
+
244
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Signal.lean ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.IdealComparison
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance signalCutPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance signalCutStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ lemma Her_cut_lower {a : A} (ha : 0 ≤ a) {δ : ℝ} (hδ : 0 ≤ δ)
15
+ {p : A} (hp : p ∈ Her (cut a δ)) :
16
+ δ • (star p * p) ≤ star p * a * p := by
17
+ have hc : IsClosed {p : A | δ • (star p * p) ≤ star p * a * p} :=
18
+ isClosed_le (by fun_prop) (by fun_prop)
19
+ apply closure_minimal (s := Set.range (fun w : A => cut a δ * w * star (cut a δ))) _ hc hp
20
+ rintro _ ⟨w, rfl⟩
21
+ change δ • (star (cut a δ * w * star (cut a δ)) *
22
+ (cut a δ * w * star (cut a δ))) ≤
23
+ star (cut a δ * w * star (cut a δ)) * a * (cut a δ * w * star (cut a δ))
24
+ have hh := star_left_conjugate_le_conjugate (cut_sandwich_lower ha.isSelfAdjoint hδ)
25
+ (w * cut a δ)
26
+ simpa only [star_mul, (cut_nonneg a δ).isSelfAdjoint.star_eq,
27
+ mul_smul_comm, smul_mul_assoc, mul_assoc] using hh
28
+
29
+ lemma norm_cut_le_sub {a : A} (ha : 0 ≤ a) {M δ : ℝ} (han : ‖a‖ ≤ M)
30
+ (hδ : δ ≤ M) : ‖cut a δ‖ ≤ M - δ := by
31
+ apply norm_cfcₙ_le
32
+ intro t ht
33
+ have htM : t ≤ M := (le_abs_self t).trans
34
+ ((NonUnitalIsometricContinuousFunctionalCalculus.norm_quasispectrum_le a ht ha.isSelfAdjoint).trans han)
35
+ rw [Real.norm_eq_abs, abs_of_nonneg (le_max_right _ _)]
36
+ exact max_le (by linarith) (sub_nonneg.mpr hδ)
37
+
38
+ lemma cut_eq_zero_of_norm_le_nonunital {a : A} (ha : 0 ≤ a) {δ : ℝ} (haδ : ‖a‖ ≤ δ) :
39
+ cut a δ = 0 := by
40
+ apply norm_eq_zero.mp
41
+ exact le_antisymm (by simpa using norm_cut_le_sub ha haδ le_rfl) (norm_nonneg _)
42
+
43
+ end MainGap
44
+
45
+ namespace MainGap
46
+ universe u
47
+ variable {A : Type u} [NonUnitalCStarAlgebra A]
48
+ local instance signalComparisonPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
49
+ local instance signalComparisonStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
50
+ local instance signalOperatorPartialOrder (H : Type*) [NormedAddCommGroup H]
51
+ [InnerProductSpace ℂ H] [CompleteSpace H] :
52
+ PartialOrder (H →L[ℂ] H) := CStarAlgebra.spectralOrder _
53
+ local instance signalOperatorStarOrderedRing (H : Type*) [NormedAddCommGroup H]
54
+ [InnerProductSpace ℂ H] [CompleteSpace H] :
55
+ StarOrderedRing (H →L[ℂ] H) := CStarAlgebra.spectralOrderedRing _
56
+
57
+ lemma signal_cut_comparison (hP : PropertyP A) {a p : A} (ha : 0 ≤ a) {δ : ℝ}
58
+ (hδ : 0 < δ) (hpH : p ∈ Her (ramp a δ (2*δ)))
59
+ (hsignal : NormSignal (ramp a δ (2*δ)) p) :
60
+ ScalarCuntzLE (cut a (2*δ)) (star p * a * p) := by
61
+ let v := star p * a * p
62
+ have hv : 0 ≤ v := star_left_conjugate_nonneg ha p
63
+ let V : Unitization ℂ A := Unitization.inr v
64
+ have hV : 0 ≤ V := Unitization.inr_nonneg_iff.mpr hv
65
+ let J := closedIdeal V hV.isSelfAdjoint
66
+ have hcut : (Unitization.inr (cut a (2*δ)) : Unitization ℂ A) ∈ J := by
67
+ by_contra hh
68
+ obtain ⟨R,hRJ,hRcut⟩ := exists_rep_killing_ideal J
69
+ (closedIdeal_closed V hV.isSelfAdjoint)
70
+ (fun x z hz => closedIdeal_left hV.isSelfAdjoint hz x)
71
+ (fun x z hz => closedIdeal_right hV.isSelfAdjoint hz x) hh
72
+ let π := R.hom.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom ℂ A)
73
+ have hvzero : π v = 0 := hRJ V (self_mem_closedIdeal V hV.isSelfAdjoint)
74
+ have hlower := Her_cut_lower ha hδ.le
75
+ (Her_mono_of_mem (ramp_mem_Her_cut ha hδ.le) hpH)
76
+ have hpos := map_nonneg π (sub_nonneg.mpr hlower)
77
+ have hsmul (r : ℝ) (z : A) : π (r • z)=r • π z :=
78
+ LinearMapClass.map_smul_of_tower π r z
79
+ change 0 ≤ π (v - δ • (star p * p)) at hpos
80
+ rw [map_sub, hvzero, hsmul, map_mul, map_star] at hpos
81
+ have hz : δ • (star (π p) * π p) = 0 :=
82
+ le_antisymm (by simpa only [zero_sub, neg_nonneg] using hpos)
83
+ (smul_nonneg hδ.le (star_mul_self_nonneg _))
84
+ have hpzero : π p = 0 := (CStarRing.star_mul_self_eq_zero_iff _).mp
85
+ ((smul_eq_zero.mp hz).resolve_left hδ.ne')
86
+ have hnorm : 2*δ < ‖π a‖ := by
87
+ by_contra! hn
88
+ apply hRcut
89
+ change π (cut a (2*δ)) = 0
90
+ rw [map_cut π ha (by positivity), cut_eq_zero_of_norm_le (map_nonneg π ha) hn]
91
+ have hramp : ‖π (ramp a δ (2*δ))‖ = 1 := by
92
+ rw [map_ramp π ha hδ.le]
93
+ exact norm_ramp_eq_one (map_nonneg π ha) hδ.le (by linarith) hnorm.le
94
+ have hpn := hsignal R (by change (1/2:ℝ) < ‖π (ramp a δ (2*δ))‖; rw [hramp]; norm_num)
95
+ change ‖π p‖ = 1 at hpn
96
+ rw [hpzero, norm_zero] at hpn
97
+ norm_num at hpn
98
+ apply scalarCuntzLE_of_inr hv
99
+ exact closedIdeal_comparison (Unitization.inr_nonneg_iff.mpr (cut_nonneg _ _)) hV
100
+ ((hP v hv).map (Unitization.inrNonUnitalStarAlgHom ℂ A)) hcut
101
+
102
+ end MainGap
103
+
104
+ namespace MainGap
105
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
106
+ local instance signalCoefficientPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
107
+ local instance signalCoefficientStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
108
+
109
+ lemma signal_coefficient (hP : PropertyP A) {a p : A} (ha : 0 ≤ a) (han : ‖a‖ ≤ 1)
110
+ {δ ρ : ℝ} (hδ : 0 < δ) (hδhalf : δ < 1/2) (hρ : 0 < ρ) (hρδ : ρ ≤ 2*δ)
111
+ (hpH : p ∈ Her (ramp a δ (2*δ))) (hsignal : NormSignal (ramp a δ (2*δ)) p) :
112
+ ∃ w : A, ‖star (p*w)*a*(p*w)-a‖ < 2*δ+ρ ∧
113
+ ‖p*w‖ ≤ Real.sqrt δ⁻¹ := by
114
+ have hcomp := signal_cut_comparison hP ha hδ hpH hsignal
115
+ obtain ⟨w,hw⟩ := hcomp.exists_approx hρ
116
+ have hw' : ‖star (p*w)*a*(p*w) - cut a (2*δ)‖ < ρ := by
117
+ simpa only [star_mul, mul_assoc] using hw
118
+ refine ⟨w, ?_, ?_⟩
119
+ · calc
120
+ ‖star (p*w)*a*(p*w)-a‖ ≤
121
+ ‖star (p*w)*a*(p*w)-cut a (2*δ)‖ + ‖cut a (2*δ)-a‖ := by simpa only [dist_eq_norm] using dist_triangle (star (p*w)*a*(p*w)) (cut a (2*δ)) a
122
+ _ < ρ + 2*δ := add_lt_add_of_lt_of_le hw'
123
+ (by simpa only [norm_sub_rev] using norm_sub_cut_le ha (by positivity : 0 ≤ 2*δ))
124
+ _ = 2*δ+ρ := by ring
125
+ · have hlower := star_left_conjugate_le_conjugate
126
+ (Her_cut_lower ha hδ.le (Her_mono_of_mem (ramp_mem_Her_cut ha hδ.le) hpH)) w
127
+ have hlower' : δ • (star (p*w)*(p*w)) ≤ star (p*w)*a*(p*w) := by
128
+ simpa only [star_mul, mul_smul_comm, smul_mul_assoc, mul_assoc] using hlower
129
+ have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg hlower'
130
+ (smul_nonneg hδ.le (star_mul_self_nonneg (p*w)))
131
+ simp only [norm_smul, Real.norm_eq_abs, abs_of_pos hδ, CStarRing.norm_star_mul_self] at hn
132
+ have hupper : ‖star (p*w)*a*(p*w)‖ < 1 := by
133
+ calc
134
+ ‖star (p*w)*a*(p*w)‖ ≤
135
+ ‖star (p*w)*a*(p*w)-cut a (2*δ)‖ + ‖cut a (2*δ)‖ := norm_le_norm_sub_add _ _
136
+ _ < ρ + (1-2*δ) := add_lt_add_of_lt_of_le hw'
137
+ (norm_cut_le_sub ha han (by linarith))
138
+ _ ≤ 1 := by linarith
139
+ have hsq : ‖p*w‖ ^ 2 ≤ δ⁻¹ := by
140
+ have hh : δ * (‖p*w‖ ^ 2) ≤ 1 := by nlinarith
141
+ have hh' := (le_inv_mul_iff₀ hδ).mpr hh
142
+ simpa only [mul_one] using hh'
143
+ have hsqrt := Real.sq_sqrt (inv_nonneg.mpr hδ.le)
144
+ nlinarith [Real.sqrt_nonneg δ⁻¹, norm_nonneg (p*w)]
145
+
146
+ end MainGap
147
+
148
+ namespace MainGap
149
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
150
+ local instance signalProductsPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
151
+ local instance signalProductsStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
152
+
153
+ lemma HerCompression.right_products {p q c : A} {κ : ℝ} (hκ : 0 ≤ κ)
154
+ (hp : 0 ≤ p) (hq : 0 ≤ q) (h : HerCompression p q c κ) (w z : A) :
155
+ ‖star (p*w) * c * (q*z)‖ ≤ κ * ‖p*w‖ * ‖q*z‖ := by
156
+ let : PartialOrder (Her p) := CStarAlgebra.spectralOrder _
157
+ let : StarOrderedRing (Her p) := CStarAlgebra.spectralOrderedRing _
158
+ let : PartialOrder (Her q) := CStarAlgebra.spectralOrder _
159
+ let : StarOrderedRing (Her q) := CStarAlgebra.spectralOrderedRing _
160
+ let ap := CStarAlgebra.increasingApproximateUnit (Her p)
161
+ let aq := CStarAlgebra.increasingApproximateUnit (Her q)
162
+ let pp : Her p := ⟨p, self_mem_Her hp⟩
163
+ let qq : Her q := ⟨q, self_mem_Her hq⟩
164
+ have htp : Tendsto (fun e : Her p => (e : A) * (p*w))
165
+ (CStarAlgebra.approximateUnit (Her p)) (𝓝 (p*w)) := by
166
+ have hh := ((continuous_subtype_val.tendsto pp).comp (ap.tendsto_mul_right pp)).mul
167
+ (tendsto_const_nhds (x := w))
168
+ change Tendsto (fun e : Her p => ((e : A) * p) * w) _ (𝓝 (p*w)) at hh
169
+ simpa only [mul_assoc] using hh
170
+ have htq : Tendsto (fun e : Her q => (e : A) * (q*z))
171
+ (CStarAlgebra.approximateUnit (Her q)) (𝓝 (q*z)) := by
172
+ have hh := ((continuous_subtype_val.tendsto qq).comp (aq.tendsto_mul_right qq)).mul
173
+ (tendsto_const_nhds (x := z))
174
+ change Tendsto (fun e : Her q => ((e : A) * q) * z) _ (𝓝 (q*z)) at hh
175
+ simpa only [mul_assoc] using hh
176
+ have ht := ((htp.comp tendsto_fst).star.mul (tendsto_const_nhds (x := c))).mul
177
+ (htq.comp tendsto_snd)
178
+ apply le_of_tendsto ht.norm
179
+ filter_upwards [ap.eventually_norm.prod_mk aq.eventually_norm] with ef hef
180
+ rcases ef with ⟨e,f⟩
181
+ change ‖star ((e : A)*(p*w))*c*((f : A)*(q*z))‖ ≤ _
182
+ have he : ‖(e : A)‖ ≤ 1 := hef.1
183
+ have hf : ‖(f : A)‖ ≤ 1 := hef.2
184
+ calc
185
+ ‖star ((e : A)*(p*w))*c*((f : A)*(q*z))‖ =
186
+ ‖star (p*w) * (star (e : A)*c*(f : A)) * (q*z)‖ := by
187
+ simp only [star_mul, mul_assoc]
188
+ _ ≤ ‖p*w‖ * ‖star (e : A)*c*(f : A)‖ * ‖q*z‖ := by
189
+ grw [norm_mul_le, norm_mul_le, norm_star]
190
+ _ ≤ ‖p*w‖ * (κ*‖(e : A)‖*‖(f : A)‖) * ‖q*z‖ := by
191
+ gcongr
192
+ simpa only [norm_star] using h (star (e : A)) (star_mem e.property) (f : A) f.property
193
+ _ ≤ ‖p*w‖ * (κ*1*1) * ‖q*z‖ := by gcongr
194
+ _ = κ * ‖p*w‖ * ‖q*z‖ := by ring
195
+
196
+ end MainGap
197
+
198
+ end
199
+
200
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Stabilization.lean ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ noncomputable section
6
+ open Filter
7
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
8
+
9
+ namespace MainGap.Stable
10
+ variable {A : Type*} [NonUnitalCStarAlgebra A]
11
+ local instance positivityOrder : PartialOrder A := CStarAlgebra.spectralOrder A
12
+ local instance positivityStarOrder : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
13
+
14
+ abbrev Mat (A : Type*) (n : ℕ) := CStarMatrix (Fin n) (Fin n) A
15
+
16
+ def pad {n m : ℕ} (_ : n ≤ m) (x : Mat A n) : Mat A m :=
17
+ CStarMatrix.ofMatrix fun i j =>
18
+ if hi : i.val < n then if hj : j.val < n then x ⟨i,hi⟩ ⟨j,hj⟩ else 0 else 0
19
+
20
+ @[simp] lemma pad_entry {n m : ℕ} (h : n ≤ m) (x : Mat A n) (i j : Fin m) :
21
+ pad h x i j = (if hi : i.val < n then if hj : j.val < n then x ⟨i,hi⟩ ⟨j,hj⟩ else 0 else 0) := rfl
22
+
23
+ @[simp] lemma pad_apply {n m : ℕ} (h : n ≤ m) (x : Mat A n) (i j : Fin n) :
24
+ pad h x (Fin.castLE h i) (Fin.castLE h j) = x i j := by simp [pad_entry]
25
+
26
+ lemma sum_pad {n m : ℕ} (h : n ≤ m) {B : Type*} [AddCommMonoid B] (f : Fin n → B) :
27
+ ∑ k : Fin m, (if hk : k.val < n then f ⟨k,hk⟩ else 0) = ∑ k : Fin n, f k := by
28
+ classical
29
+ symm
30
+ apply Finset.sum_bij_ne_zero (fun i _ _ => Fin.castLE h i)
31
+ · simp
32
+ · intro i _ _ j _ _ hij
33
+ exact Fin.ext (congrArg (fun k : Fin m => k.val) hij)
34
+ · intro j _ hj0
35
+ have hj : j.val < n := by
36
+ by_contra hn
37
+ simp [hn] at hj0
38
+ exact ⟨⟨j,hj⟩, Finset.mem_univ _, by simpa [hj] using hj0, rfl⟩
39
+ · intro i _ _
40
+ simp
41
+
42
+ lemma pad_mul {n m : ℕ} (h : n ≤ m) (x y : Mat A n) :
43
+ pad h (x*y) = pad h x * pad h y := by
44
+ ext i j
45
+ by_cases hi : i.val < n <;> by_cases hj : j.val < n
46
+ · simp only [pad_entry, dite_eq_left hi, dite_eq_left hj,
47
+ CStarMatrix.mul_apply]
48
+ rw [← sum_pad h (fun k => x ⟨i,hi⟩ k * y k ⟨j,hj⟩)]
49
+ apply Finset.sum_congr rfl
50
+ intro k _
51
+ by_cases hk : k.val < n <;> simp [hk]
52
+ · simp [pad_entry, hi, hj, CStarMatrix.mul_apply]
53
+ · simp [pad_entry, hi, CStarMatrix.mul_apply]
54
+ · simp [pad_entry, hi, CStarMatrix.mul_apply]
55
+
56
+ def padHom {n m : ℕ} (h : n ≤ m) : Mat A n →⋆ₙₐ[ℂ] Mat A m where
57
+ toFun := pad h
58
+ map_zero' := by ext i j; simp [pad_entry]
59
+ map_add' x y := by ext i j; by_cases hi : i.val < n <;> by_cases hj : j.val < n <;> simp [pad_entry, hi, hj]
60
+ map_mul' := pad_mul h
61
+ map_smul' c x := by ext i j; by_cases hi : i.val < n <;> by_cases hj : j.val < n <;> simp [pad_entry, hi, hj]
62
+ map_star' x := by ext i j; by_cases hi : i.val < n <;> by_cases hj : j.val < n <;> simp [pad_entry, hi, hj, CStarMatrix.star_apply]
63
+
64
+ lemma pad_injective {n m : ℕ} (h : n ≤ m) : Function.Injective (pad (A := A) h) := by
65
+ intro x y hxy
66
+ ext i j
67
+ have hh := congrArg (fun z : Mat A m => z (Fin.castLE h i) (Fin.castLE h j)) hxy
68
+ simpa using hh
69
+
70
+ lemma norm_pad {n m : ℕ} (h : n ≤ m) (x : Mat A n) : ‖pad h x‖ = ‖x‖ :=
71
+ NonUnitalStarAlgHom.norm_map (padHom h) (pad_injective h) x
72
+
73
+ lemma pad_self (n : ℕ) (x : Mat A n) : pad le_rfl x = x := by
74
+ ext i j
75
+ simp [pad_entry]
76
+
77
+ lemma pad_pad {n m k : ℕ} (h : n ≤ m) (h' : m ≤ k) (x : Mat A n) :
78
+ pad h' (pad h x) = pad (h.trans h') x := by
79
+ ext i j
80
+ by_cases hi : i.val < n <;> by_cases hj : j.val < n
81
+ · have hi' : i.val < m := lt_of_lt_of_le hi h
82
+ have hj' : j.val < m := lt_of_lt_of_le hj h
83
+ simp [pad_entry, hi, hj, hi', hj']
84
+ · by_cases hi' : i.val < m <;> by_cases hj' : j.val < m <;> simp [pad_entry, hi, hj, hi', hj']
85
+ · by_cases hi' : i.val < m <;> by_cases hj' : j.val < m <;> simp [pad_entry, hi, hi', hj']
86
+ · by_cases hi' : i.val < m <;> by_cases hj' : j.val < m <;> simp [pad_entry, hi, hi', hj']
87
+
88
+ instance pad_directedSystem : DirectedSystem (Mat A) (fun _ _ h => padHom h) where
89
+ map_self := fun {_} x => pad_self _ x
90
+ map_map := fun {_ _ _} h h' x => pad_pad h h' x
91
+
92
+ abbrev Algebraic (A : Type*) [NonUnitalCStarAlgebra A] :=
93
+ DirectLimit (Mat A) (fun _ _ h => padHom h)
94
+
95
+ local instance matLinear (n m : ℕ) :
96
+ LinearMapClass (Mat A n →⋆ₙₐ[ℂ] Mat A m) ℂ (Mat A n) (Mat A m) where
97
+ map_add f x y := f.map_add x y
98
+ map_smulₛₗ f c x := f.map_smul c x
99
+
100
+ instance : Module ℂ (Algebraic A) := DirectLimit.instModule
101
+
102
+ instance : Norm (Algebraic A) where
103
+ norm := DirectLimit.lift _ (fun _ x => ‖x‖) (fun _ _ h x => (norm_pad h x).symm)
104
+
105
+ @[simp] lemma norm_mk (n : ℕ) (x : Mat A n) :
106
+ ‖(⟦⟨n,x⟩⟧ : Algebraic A)‖ = ‖x‖ := rfl
107
+
108
+ lemma normedCore : NormedSpace.Core ℂ (Algebraic A) where
109
+ norm_nonneg := DirectLimit.induction _ fun n x => norm_nonneg x
110
+ norm_smul c := DirectLimit.induction _ fun n x => by
111
+ rw [DirectLimit.smul_def, norm_mk, norm_mk, norm_smul]
112
+ norm_triangle := DirectLimit.induction₂ _ fun n x y => by
113
+ rw [DirectLimit.add_def, norm_mk, norm_mk, norm_mk]
114
+ exact norm_add_le x y
115
+ norm_eq_zero_iff := DirectLimit.induction _ fun n x => by
116
+ rw [norm_mk, norm_eq_zero]
117
+ constructor
118
+ · rintro rfl
119
+ exact (DirectLimit.zero_def (f := fun _ _ h => padHom (A := A) h) n).symm
120
+ · intro h
121
+ apply pad_injective (le_rfl : n ≤ n)
122
+ have hi := DirectLimit.mk_injective (fun _ _ h => padHom (A := A) h) (fun _ _ h => pad_injective h) n
123
+ exact congrArg (pad le_rfl) (hi (h.trans (DirectLimit.zero_def (f := fun _ _ h => padHom (A := A) h) n)))
124
+
125
+ instance : NormedAddCommGroup (Algebraic A) := .ofCore (𝕜 := ℂ) (normedCore (A := A))
126
+ instance : NormedSpace ℂ (Algebraic A) := .ofCore (normedCore (A := A))
127
+ instance : NonUnitalNormedRing (Algebraic A) where
128
+ dist_eq _ _ := rfl
129
+ norm_mul_le := DirectLimit.induction₂ _ fun n x y => by
130
+ rw [DirectLimit.mul_def, norm_mk, norm_mk, norm_mk]
131
+ exact norm_mul_le x y
132
+ instance : CStarRing (Algebraic A) where
133
+ norm_mul_self_le := DirectLimit.induction _ fun n x => by
134
+ rw [DirectLimit.star_def, DirectLimit.mul_def, norm_mk, norm_mk]
135
+ exact CStarRing.norm_mul_self_le x
136
+
137
+ def cornerAlg (n : ℕ) : Mat A n →⋆ₙₐ[ℂ] Algebraic A where
138
+ __ := DirectLimit.NonUnitalAlgebra.of (Mat A) (fun _ _ h => padHom h) n
139
+ map_star' _ := rfl
140
+
141
+ @[simp] lemma cornerAlg_apply (n : ℕ) (x : Mat A n) :
142
+ cornerAlg n x = (⟦⟨n,x⟩⟧ : Algebraic A) := rfl
143
+
144
+ lemma cornerAlg_isometry (n : ℕ) : Isometry (cornerAlg (A := A) n) :=
145
+ AddMonoidHomClass.isometry_of_norm (cornerAlg n) (fun _ => rfl)
146
+
147
+ abbrev Stabilization (A : Type*) [NonUnitalCStarAlgebra A] := UniformSpace.Completion (Algebraic A)
148
+
149
+ local instance algebraicTopology : TopologicalSpace (Algebraic A) :=
150
+ (inferInstance : PseudoMetricSpace (Algebraic A)).toUniformSpace.toTopologicalSpace
151
+
152
+ open UniformSpace
153
+ open UniformSpace.Completion
154
+
155
+ instance : Mul (Stabilization A) :=
156
+ ⟨Function.curry <| (isDenseInducing_coe.prodMap isDenseInducing_coe).extend
157
+ ((↑) ∘ Function.uncurry (· * · : Algebraic A → Algebraic A → Algebraic A))⟩
158
+
159
+ @[simp, norm_cast] lemma coe_mul_stable (x y : Algebraic A) :
160
+ ((x*y : Algebraic A) : Stabilization A) = (x : Stabilization A) * (y : Stabilization A) :=
161
+ ((isDenseInducing_coe.prodMap isDenseInducing_coe).extend_eq
162
+ ((continuous_coe _).comp continuous_mul) (x,y)).symm
163
+
164
+ instance : ContinuousMul (Stabilization A) where
165
+ continuous_mul := by
166
+ let m := (AddMonoidHom.mul : Algebraic A →+ Algebraic A →+ Algebraic A).compr₂ toCompl
167
+ have hh : Continuous fun p : Algebraic A × Algebraic A => m p.1 p.2 :=
168
+ (continuous_coe _).comp continuous_mul
169
+ have di : IsDenseInducing (toCompl : Algebraic A → Stabilization A) := isDenseInducing_coe
170
+ exact di.extend_Z_bilin di hh
171
+
172
+ instance : NonUnitalRing (Stabilization A) where
173
+ __ : AddCommGroup (Stabilization A) := inferInstance
174
+ zero_mul x := Completion.induction_on x (isClosed_eq (by fun_prop) continuous_const)
175
+ fun x => by rw [← coe_zero, ← coe_mul_stable, zero_mul]
176
+ mul_zero x := Completion.induction_on x (isClosed_eq (by fun_prop) continuous_const)
177
+ fun x => by rw [← coe_zero, ← coe_mul_stable, mul_zero]
178
+ mul_assoc x y z := Completion.induction_on₃ x y z
179
+ (isClosed_eq (by fun_prop) (by fun_prop)) fun x y z => by
180
+ rw [← coe_mul_stable, ← coe_mul_stable, ← coe_mul_stable, ← coe_mul_stable, mul_assoc]
181
+ left_distrib x y z := Completion.induction_on₃ x y z
182
+ (isClosed_eq (by fun_prop) (by fun_prop)) fun x y z => by
183
+ rw [← coe_add, ← coe_mul_stable, ← coe_mul_stable, ← coe_mul_stable, ← coe_add, mul_add]
184
+ right_distrib x y z := Completion.induction_on₃ x y z
185
+ (isClosed_eq (by fun_prop) (by fun_prop)) fun x y z => by
186
+ rw [← coe_add, ← coe_mul_stable, ← coe_mul_stable, ← coe_mul_stable, ← coe_add, add_mul]
187
+
188
+ instance : NonUnitalNormedRing (Stabilization A) where
189
+ dist_eq := dist_eq_norm_neg_add
190
+ norm_mul_le x y := Completion.induction_on₂ x y
191
+ (isClosed_le (by fun_prop) (by fun_prop)) fun x y => by
192
+ simpa only [← coe_mul_stable, norm_coe] using norm_mul_le x y
193
+
194
+ instance : Star (Stabilization A) := ⟨Completion.map (star : Algebraic A → Algebraic A)⟩
195
+
196
+ @[simp, norm_cast] lemma coe_star_stable (x : Algebraic A) :
197
+ ((star x : Algebraic A) : Stabilization A) = star (x : Stabilization A) :=
198
+ (Completion.map_coe star_isometry.uniformContinuous x).symm
199
+
200
+ instance : ContinuousStar (Stabilization A) where
201
+ continuous_star := Completion.continuous_map
202
+
203
+ instance : StarRing (Stabilization A) where
204
+ star_involutive x := Completion.induction_on x
205
+ (isClosed_eq (by fun_prop) continuous_id) fun x => by
206
+ rw [← coe_star_stable, ← coe_star_stable, star_star]
207
+ star_add x y := Completion.induction_on₂ x y
208
+ (isClosed_eq (by fun_prop) (by fun_prop)) fun x y => by
209
+ rw [← coe_add, ← coe_star_stable, ← coe_star_stable, ← coe_star_stable, ← coe_add, star_add]
210
+ star_mul x y := Completion.induction_on₂ x y
211
+ (isClosed_eq (by fun_prop) (by fun_prop)) fun x y => by
212
+ rw [← coe_mul_stable, ← coe_star_stable, ← coe_star_stable, ← coe_star_stable,
213
+ ← coe_mul_stable, star_mul]
214
+
215
+ instance : CStarRing (Stabilization A) where
216
+ norm_mul_self_le x := Completion.induction_on x
217
+ (isClosed_le (by fun_prop) (by fun_prop)) fun x => by
218
+ simpa only [← coe_star_stable, ← coe_mul_stable, norm_coe] using CStarRing.norm_mul_self_le x
219
+
220
+ instance : IsScalarTower ℂ (Stabilization A) (Stabilization A) where
221
+ smul_assoc c x y := by
222
+ change (c • x) * y = c • (x*y)
223
+ refine Completion.induction_on₂ x y ?_ ?_
224
+ · exact isClosed_eq ((continuous_fst.const_smul c).mul continuous_snd)
225
+ ((continuous_fst.mul continuous_snd).const_smul c)
226
+ · intro x y
227
+ rw [← coe_smul, ← coe_mul_stable, ← coe_mul_stable, ← coe_smul, smul_mul_assoc]
228
+
229
+ instance : SMulCommClass ℂ (Stabilization A) (Stabilization A) where
230
+ smul_comm c x y := by
231
+ change c • (x*y) = x * (c • y)
232
+ refine Completion.induction_on₂ x y ?_ ?_
233
+ · exact isClosed_eq ((continuous_fst.mul continuous_snd).const_smul c)
234
+ (continuous_fst.mul (continuous_snd.const_smul c))
235
+ · intro x y
236
+ rw [← coe_mul_stable, ← coe_smul, ← coe_smul, ← coe_mul_stable, mul_smul_comm]
237
+
238
+ instance : StarModule ℂ (Stabilization A) where
239
+ star_smul c x := by
240
+ refine Completion.induction_on x ?_ ?_
241
+ · exact isClosed_eq (continuous_star.comp (continuous_const_smul c))
242
+ (continuous_star.const_smul (star c))
243
+ · intro x
244
+ rw [← coe_smul, ← coe_star_stable, ← coe_star_stable, ← coe_smul, star_smul]
245
+
246
+ @[instance_reducible] def stabilizationCStarAlgebra : NonUnitalCStarAlgebra (Stabilization A) where
247
+
248
+ def corner (n : ℕ) : Mat A n →⋆ₙₐ[ℂ] Stabilization A where
249
+ toFun x := (cornerAlg n x : Stabilization A)
250
+ map_zero' := by rw [map_zero, coe_zero]
251
+ map_add' x y := by simp [map_add, coe_add]
252
+ map_mul' x y := by simp [map_mul]
253
+ map_smul' c x := by simp [map_smul, coe_smul]
254
+ map_star' x := by simp [map_star]
255
+
256
+ @[simp] lemma corner_apply (n : ℕ) (x : Mat A n) :
257
+ corner n x = (cornerAlg n x : Stabilization A) := rfl
258
+
259
+ lemma norm_corner (n : ℕ) (x : Mat A n) : ‖corner n x‖ = ‖x‖ := by
260
+ rw [corner_apply, norm_coe, cornerAlg_apply, norm_mk]
261
+
262
+ lemma corner_isometry (n : ℕ) : Isometry (corner (A := A) n) :=
263
+ AddMonoidHomClass.isometry_of_norm (corner n) (norm_corner n)
264
+
265
+ lemma corner_pad {n m : ℕ} (h : n ≤ m) (x : Mat A n) :
266
+ corner m (pad h x) = corner n x := by
267
+ change ((⟦⟨m,padHom h x⟩⟧ : Algebraic A) : Stabilization A) =
268
+ ((⟦⟨n,x⟩⟧ : Algebraic A) : Stabilization A)
269
+ rw [DirectLimit.mk_apply]
270
+
271
+ end MainGap.Stable
272
+
273
+ end
274
+
275
+ end OAI
lean/OAI/Analysis/CStarAlgebra/PureInfiniteness/Ultrafilter.lean ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Representation
2
+ import OAI.Analysis.CStarAlgebra.PureInfiniteness.Defect
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+ open Filter
8
+ open scoped Topology CStarAlgebra ComplexOrder InnerProductSpace
9
+
10
+ namespace MainGap
11
+ variable (A : Type*)
12
+ abbrev FourIndex := ℕ × Finset A
13
+
14
+ def fourEta (i : FourIndex A) : ℝ := 1 / ((i.1 : ℝ)+1)
15
+
16
+ lemma fourEta_pos (i : FourIndex A) : 0 < fourEta A i := by
17
+ unfold fourEta
18
+ positivity
19
+
20
+ lemma fourEta_tendsto : Tendsto (fourEta A) atTop (𝓝 0) := by
21
+ have h : Tendsto (fun n : ℕ => 1 / ((n:ℝ)+1)) atTop (𝓝 0) := by
22
+ simpa using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ))
23
+ have hf : Tendsto (fun i : FourIndex A => i.1) atTop atTop := by
24
+ apply tendsto_atTop.mpr
25
+ intro n
26
+ filter_upwards [eventually_ge_atTop (n, (∅ : Finset A))] with i hi
27
+ exact hi.1
28
+ exact h.comp hf
29
+
30
+ lemma fourIndex_eventually_mem (w : A) : ∀ᶠ i : FourIndex A in atTop, w ∈ i.2 := by
31
+ classical
32
+ filter_upwards [eventually_ge_atTop ((0:ℕ), ({w} : Finset A))] with i hi
33
+ exact hi.2 (Finset.mem_singleton_self w)
34
+
35
+ noncomputable def fourUltra : Ultrafilter (FourIndex A) := by
36
+ classical
37
+ exact Ultrafilter.of atTop
38
+
39
+ lemma fourUltra_le : (fourUltra A : Filter (FourIndex A)) ≤ atTop := by
40
+ classical
41
+ exact Ultrafilter.of_le atTop
42
+
43
+ lemma fourEta_ultra : Tendsto (fourEta A) (fourUltra A : Filter (FourIndex A)) (𝓝 0) :=
44
+ (fourEta_tendsto A).mono_left (fourUltra_le A)
45
+ end MainGap
46
+
47
+ namespace MainGap
48
+ variable {A : Type*} [CStarAlgebra A]
49
+ local instance ultrafilterPartialOrder : PartialOrder A := CStarAlgebra.spectralOrder A
50
+ local instance ultrafilterStarOrderedRing : StarOrderedRing A := CStarAlgebra.spectralOrderedRing A
51
+
52
+ lemma cut_zero_of_le {d : A} (hd : 0 ≤ d) {h : ℝ} (hh : 0 ≤ h)
53
+ (hle : d ≤ h • (1:A)) : cut d h = 0 := by
54
+ have hdsa : IsSelfAdjoint d := .of_nonneg hd
55
+ have hle' : cfc (fun t : ℝ => t) d ≤ cfc (fun _ : ℝ => h) d := by
56
+ rw [cfc_id' ℝ d hdsa, cfc_const h d hdsa, Algebra.algebraMap_eq_smul_one]
57
+ exact hle
58
+ have hs := (cfc_le_iff _ _ d continuousOn_id continuousOn_const hdsa).mp hle'
59
+ rw [cut_eq_cfc d hh, ← cfc_zero d (R := ℝ)]
60
+ apply cfc_congr
61
+ intro t ht
62
+ exact max_eq_right (sub_nonpos.mpr (hs t ht))
63
+
64
+ lemma le_of_cut_zero {d : A} (hd : 0 ≤ d) {h : ℝ} (hh : 0 ≤ h)
65
+ (hz : cut d h = 0) : d ≤ h • (1:A) := by
66
+ have hn := norm_sub_cut_le hd hh
67
+ rw [hz, sub_zero] at hn
68
+ simpa only [Algebra.algebraMap_eq_smul_one] using
69
+ (CStarAlgebra.norm_le_iff_le_algebraMap d hh hd).mp hn
70
+
71
+ end MainGap
72
+
73
+ end
74
+
75
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/HighProjection.lean ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.ThomasFermi.FirstFiber
3
+
4
+ namespace OAI
5
+
6
+ open MeasureTheory Set
7
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
8
+ namespace Coulomb
9
+
10
+ section
11
+ variable {A B ι : Type*} [MeasurableSpace A] [MeasurableSpace B]
12
+ {μ : Measure A} {ν : Measure B} [SigmaFinite μ] [SigmaFinite ν]
13
+ (v : ι → A → ℂ) (hv : ∀ i, MemLp (v i) 2 μ)
14
+ (ho : ∀ i j, (∫ a, star (v i a) * v j a ∂μ) = if i = j then (1 : ℂ) else 0)
15
+
16
+ omit [MeasurableSpace B] [SigmaFinite μ] in
17
+ include hv ho in
18
+ lemma fiberContract_lowProjection (s : Finset ι) (f : B × A → ℂ) (a : ι) (y : B) :
19
+ fiberContract (μ := μ) (v a) (lowProjection (μ := μ) v s f) y =
20
+ if a ∈ s then fiberContract (μ := μ) (v a) f y else 0 := by
21
+ classical
22
+ dsimp only [lowProjection, fiberContract]
23
+ rw [show (fun x => star (v a x) * ∑ i ∈ s,
24
+ (∫ z, star (v i z) * f (y,z) ∂μ) * v i x) =
25
+ (fun x => ∑ i ∈ s, (∫ z, star (v i z) * f (y,z) ∂μ) * (star (v a x) * v i x)) from by
26
+ funext x
27
+ rw [Finset.mul_sum]
28
+ apply Finset.sum_congr rfl
29
+ intro i _
30
+ ring]
31
+ rw [integral_finsetSum s (fun i _ => (integrable_star_mul (hv a) (hv i)).const_mul _)]
32
+ simp only [integral_const_mul, ho, mul_ite, mul_one, mul_zero]
33
+ rw [Finset.sum_ite_eq]
34
+
35
+ noncomputable def highProjection (s : Finset ι) (f : B × A → ℂ) : B × A → ℂ :=
36
+ f - lowProjection (μ := μ) v s f
37
+
38
+ include hv in
39
+ lemma highProjection_memLp (s : Finset ι) {f : B × A → ℂ}
40
+ (hf : MemLp f 2 (ν.prod μ)) :
41
+ MemLp (highProjection (μ := μ) v s f) 2 (ν.prod μ) := by
42
+ have hp : MemLp (lowProjection (μ := μ) v s f) 2 (ν.prod μ) :=
43
+ lowProjection_memLp v hv s hf
44
+ change MemLp (f - lowProjection (μ := μ) v s f) 2 (ν.prod μ)
45
+ exact hf.sub hp
46
+
47
+ include hv ho in
48
+ lemma fiberContract_highProjection (s : Finset ι) {f : B × A → ℂ}
49
+ (hf : MemLp f 2 (ν.prod μ)) (a : ι) :
50
+ fiberContract (μ := μ) (v a) (highProjection (μ := μ) v s f) =ᵐ[ν]
51
+ fun y => if a ∈ s then 0 else fiberContract (μ := μ) (v a) f y := by
52
+ classical
53
+ filter_upwards [memLp_fiber_ae hf] with y hy
54
+ have hp : MemLp (fun x => lowProjection (μ := μ) v s f (y,x)) 2 μ :=
55
+ orbital_sum_memLp v hv s (fun i => fiberContract (μ := μ) (v i) f y)
56
+ change (∫ x, star (v a x) * (f (y,x) - lowProjection (μ := μ) v s f (y,x)) ∂μ) = _
57
+ simp only [mul_sub]
58
+ rw [integral_sub (integrable_star_mul (hv a) hy) (integrable_star_mul (hv a) hp)]
59
+ change fiberContract (μ := μ) (v a) f y -
60
+ fiberContract (μ := μ) (v a) (lowProjection (μ := μ) v s f) y = _
61
+ rw [fiberContract_lowProjection v hv ho]
62
+ split_ifs <;> simp only [sub_self, sub_zero]
63
+
64
+ include hv ho in
65
+ lemma fiberContract_finite_bessel (s : Finset ι) {f : B × A → ℂ}
66
+ (hf : MemLp f 2 (ν.prod μ)) :
67
+ ∑ i ∈ s, (∫ y, ‖fiberContract (μ := μ) (v i) f y‖^2 ∂ν) ≤
68
+ ∫ z, ‖f z‖^2 ∂(ν.prod μ) := by
69
+ rw [← integral_finsetSum s (fun i _ => (fiberContract_memLp (hv i) hf).norm.integrable_sq)]
70
+ rw [integral_prod _ hf.norm.integrable_sq]
71
+ apply integral_mono_ae
72
+ (integrable_finsetSum s (fun i _ => (fiberContract_memLp (hv i) hf).norm.integrable_sq))
73
+ hf.norm.integrable_sq.integral_prod_left
74
+ filter_upwards [memLp_fiber_ae hf] with y hy
75
+ have H := (orbital_orthonormal v hv ho).sum_inner_products_le (s := s) (hy.toLp _)
76
+ simpa only [inner_toLp_complex, norm_toLp_sq_complex, fiberContract] using H
77
+
78
+ include hv ho in
79
+ lemma fiberContract_norm_summable {f : B × A → ℂ} (hf : MemLp f 2 (ν.prod μ)) :
80
+ Summable (fun i => ∫ y, ‖fiberContract (μ := μ) (v i) f y‖^2 ∂ν) :=
81
+ summable_of_sum_le (fun _ => integral_nonneg fun _ => sq_nonneg _)
82
+ (fun s => fiberContract_finite_bessel v hv ho s hf)
83
+
84
+ end
85
+
86
+ noncomputable def firstUnfiber {A : Type*} {n : ℕ} (f : (Fin n → A) × A → ℂ)
87
+ (x : Fin (n+1) → A) : ℂ := f (Fin.tail x, x 0)
88
+
89
+ lemma firstFiber_firstUnfiber {A : Type*} {n : ℕ} (f : (Fin n → A) × A → ℂ) :
90
+ firstFiber (firstUnfiber f) = f := by
91
+ funext z
92
+ simp only [firstFiber, firstUnfiber, Fin.tail_cons, Fin.cons_zero]
93
+
94
+ lemma firstUnfiber_memLp {A : Type*} [MeasurableSpace A] {μ : Measure A} [SigmaFinite μ]
95
+ {n : ℕ} {f : (Fin n → A) × A → ℂ}
96
+ (hf : MemLp f 2 ((Measure.pi fun _ : Fin n => μ).prod μ)) :
97
+ MemLp (firstUnfiber f) 2 (Measure.pi fun _ => μ) := by
98
+ let e := (MeasurableEquiv.piFinSuccAbove (fun _ : Fin (n+1) => A) 0).trans
99
+ (MeasurableEquiv.prodComm : A × (Fin n → A) ≃ᵐ (Fin n → A) × A)
100
+ have he : MeasurePreserving e (Measure.pi fun _ => μ)
101
+ ((Measure.pi fun _ : Fin n => μ).prod μ) :=
102
+ (measurePreserving_piFinSuccAbove (fun _ => μ) 0).trans Measure.measurePreserving_swap
103
+ have heq : ∀ x : Fin (n+1) → A, e x = (Fin.tail x, x 0) := by
104
+ intro x
105
+ rfl
106
+ change MemLp (fun x : Fin (n+1) → A => f (Fin.tail x, x 0)) 2 (Measure.pi fun _ => μ)
107
+ simpa only [Function.comp_def, heq] using hf.comp_measurePreserving he
108
+
109
+ lemma firstUnfiber_norm_sq {A : Type*} [MeasurableSpace A] {μ : Measure A} [SigmaFinite μ]
110
+ {n : ℕ} (f : (Fin n → A) × A → ℂ) :
111
+ (∫ x, ‖firstUnfiber f x‖^2 ∂(Measure.pi fun _ => μ)) =
112
+ ∫ z, ‖f z‖^2 ∂((Measure.pi fun _ : Fin n => μ).prod μ) := by
113
+ let e := (MeasurableEquiv.piFinSuccAbove (fun _ : Fin (n+1) => A) 0).trans
114
+ (MeasurableEquiv.prodComm : A × (Fin n → A) ≃ᵐ (Fin n → A) × A)
115
+ have he : MeasurePreserving e (Measure.pi fun _ => μ)
116
+ ((Measure.pi fun _ : Fin n => μ).prod μ) :=
117
+ (measurePreserving_piFinSuccAbove (fun _ => μ) 0).trans Measure.measurePreserving_swap
118
+ exact he.integral_comp' (fun z => ‖f z‖^2)
119
+
120
+ lemma scalarCoefficient_congr {A ι : Type*} [MeasurableSpace A] {μ : Measure A}
121
+ {n : ℕ} {f g : (Fin n → A) → ℂ} (he : f =ᵐ[Measure.pi fun _ => μ] g)
122
+ (v : ι → A → ℂ) (b : Fin n → ι) :
123
+ scalarCoefficient (μ := μ) f v b = scalarCoefficient (μ := μ) g v b := by
124
+ apply integral_congr_ae
125
+ filter_upwards [he] with x hx
126
+ rw [hx]
127
+
128
+ variable {A ι : Type*} [MeasurableSpace A] {μ : Measure A} [SigmaFinite μ]
129
+ (v : ι → A → ℂ) (hv : ∀ i, MemLp (v i) 2 μ)
130
+ (ho : ∀ i j, (∫ a, star (v i a) * v j a ∂μ) = if i = j then (1 : ℂ) else 0)
131
+
132
+ include hv ho in
133
+ lemma scalarCoefficient_highFirst {n : ℕ} {f : (Fin (n+1) → A) → ℂ}
134
+ (hf : MemLp f 2 (Measure.pi fun _ => μ)) (s : Finset ι) (b : Fin (n+1) → ι) :
135
+ scalarCoefficient (μ := μ) (firstUnfiber (highProjection (μ := μ) v s (firstFiber f))) v b =
136
+ if b 0 ∈ s then 0 else scalarCoefficient (μ := μ) f v b := by
137
+ classical
138
+ have hff := firstFiber_memLp hf
139
+ have hh := highProjection_memLp v hv s hff
140
+ have hu := firstUnfiber_memLp hh
141
+ have hb : Fin.cons (b 0) (Fin.tail b) = b := by
142
+ ext i
143
+ exact Fin.cases rfl (fun j => rfl) i
144
+ rw [← hb, scalarCoefficient_contract _ hu v hv, scalarCoefficient_contract f hf v hv]
145
+ change scalarCoefficient (μ := μ)
146
+ (fiberContract (μ := μ) (v (b 0)) (firstFiber (firstUnfiber
147
+ (highProjection (μ := μ) v s (firstFiber f))))) v (Fin.tail b) = _
148
+ rw [firstFiber_firstUnfiber]
149
+ rw [scalarCoefficient_congr (fiberContract_highProjection v hv ho s hff (b 0))]
150
+ by_cases hs : b 0 ∈ s
151
+ · simp only [Fin.cons_zero, hs, ite_true, scalarCoefficient, mul_zero, integral_zero]
152
+ · simp only [Fin.cons_zero, hs, ite_false]
153
+ rfl
154
+
155
+ include hv ho in
156
+ lemma highProjection_norm_spectrum [Countable ι] (hc : CompleteOrbitals μ v)
157
+ {n : ℕ} {f : (Fin (n+1) → A) → ℂ}
158
+ (hf : MemLp f 2 (Measure.pi fun _ => μ)) (s : Finset ι) :
159
+ (∫ z, ‖highProjection (μ := μ) v s (firstFiber f) z‖^2
160
+ ∂((Measure.pi fun _ : Fin n => μ).prod μ)) =
161
+ ∑' b, if b 0 ∈ s then 0 else ‖scalarCoefficient (μ := μ) f v b‖^2 := by
162
+ rw [← firstUnfiber_norm_sq]
163
+ have hh := highProjection_memLp v hv s (firstFiber_memLp hf)
164
+ rw [← scalarCoefficient_parseval _ (firstUnfiber_memLp hh) v hv ho hc]
165
+ apply tsum_congr
166
+ intro b
167
+ rw [scalarCoefficient_highFirst v hv ho hf s b]
168
+ split_ifs <;> norm_num
169
+
170
+ end Coulomb
171
+ open MeasureTheory Set Filter
172
+ open scoped ENNReal NNReal
173
+
174
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/IntegrableIntegralAeTendsto.lean ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FormDomain.Translate
3
+
4
+ namespace OAI
5
+
6
+ section
7
+ section
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ namespace Coulomb
21
+
22
+ lemma integrable_and_integral_le_of_ae_tendsto {A : Type*} [MeasurableSpace A]
23
+ {μ : Measure A} {F : ℕ → A → ℝ} {f : A → ℝ} {u : ℕ → ℝ} {C : ℝ}
24
+ (hF : ∀ n, Integrable (F n) μ) (hFn : ∀ n x, 0 ≤ F n x)
25
+ (hfn : ∀ x, 0 ≤ f x)
26
+ (ht : ∀ᵐ x ∂μ, Tendsto (fun n => F n x) atTop (𝓝 (f x)))
27
+ (hb : ∀ n, (∫ x, F n x ∂μ) ≤ u n) (hu : Tendsto u atTop (𝓝 C)) :
28
+ Integrable f μ ∧ (∫ x, f x ∂μ) ≤ C := by
29
+ have hmeas : AEStronglyMeasurable f μ :=
30
+ aestronglyMeasurable_of_tendsto_ae _ (fun n => (hF n).1) ht
31
+ have hfat : (∫⁻ x, ENNReal.ofReal (f x) ∂μ) ≤ ENNReal.ofReal C := by
32
+ calc
33
+ _ = ∫⁻ x, liminf (fun n => ENNReal.ofReal (F n x)) atTop ∂μ := by
34
+ apply lintegral_congr_ae
35
+ filter_upwards [ht] with x hx
36
+ exact ((ENNReal.continuous_ofReal.tendsto _).comp hx).liminf_eq.symm
37
+ _ ≤ liminf (fun n => ∫⁻ x, ENNReal.ofReal (F n x) ∂μ) atTop :=
38
+ lintegral_liminf_le' (fun n => (hF n).aemeasurable.ennreal_ofReal)
39
+ _ ≤ liminf (fun n => ENNReal.ofReal (u n)) atTop := by
40
+ apply liminf_le_liminf (hv := isBoundedUnder_of ⟨0, fun _ => bot_le⟩)
41
+ (hu := (isBoundedUnder_of ⟨⊤, fun _ => le_top⟩).isCoboundedUnder_ge)
42
+ exact Eventually.of_forall fun n => by
43
+ rw [← ofReal_integral_eq_lintegral_ofReal (hF n) (Eventually.of_forall (hFn n))]
44
+ exact ENNReal.ofReal_le_ofReal (hb n)
45
+ _ = ENNReal.ofReal C := ((ENNReal.continuous_ofReal.tendsto _).comp hu).liminf_eq
46
+ have hf : Integrable f μ := by
47
+ refine ⟨hmeas, ?_⟩
48
+ rw [hasFiniteIntegral_iff_norm]
49
+ simp_rw [Real.norm_eq_abs, abs_of_nonneg (hfn _)]
50
+ exact hfat.trans_lt ENNReal.ofReal_lt_top
51
+ refine ⟨hf, ?_⟩
52
+ have hC : 0 ≤ C := ge_of_tendsto' hu fun n => (integral_nonneg (hFn n)).trans (hb n)
53
+ apply (ENNReal.ofReal_le_ofReal_iff hC).mp
54
+ rwa [ofReal_integral_eq_lintegral_ofReal hf (Eventually.of_forall hfn)]
55
+
56
+ lemma pi_exhaustion {A : Type*} {s : ℕ → Set A} (hs : Monotone s)
57
+ (hU : (⋃ k, s k) = univ) (n : ℕ) :
58
+ (⋃ k, (univ.pi fun _ : Fin n => s k)) = univ := by
59
+ ext z
60
+ simp only [mem_iUnion, mem_univ_pi, mem_univ, iff_true]
61
+ have hx (i : Fin n) : ∃ k, z i ∈ s k := by
62
+ have hi : z i ∈ ⋃ k, s k := by rw [hU]; trivial
63
+ simpa only [mem_iUnion] using hi
64
+ choose k hk using hx
65
+ refine ⟨Finset.univ.sup k, fun i => hs (Finset.le_sup (f := k) (Finset.mem_univ i)) (hk i)⟩
66
+
67
+ lemma density_power_exhaustion {A : Type*} [MeasurableSpace A] {μ : Measure A}
68
+ [SigmaFinite μ] {n : ℕ} {f : (Fin (n+1) → A) → ℂ}
69
+ (hf : MemLp f 2 (Measure.pi fun _ => μ)) {s : ℕ → Set A}
70
+ (hs : ∀ k, MeasurableSet (s k)) (hmono : Monotone s) (hU : (⋃ k, s k) = univ)
71
+ {p : ℝ} (hp : 0 < p) {u : ℕ → ℝ} {C : ℝ}
72
+ (hi : ∀ k, Integrable (fun x => (firstParticleDensity (μ := μ.restrict (s k)) f x)^p)
73
+ (μ.restrict (s k)))
74
+ (hb : ∀ k, (∫ x, (firstParticleDensity (μ := μ.restrict (s k)) f x)^p ∂(μ.restrict (s k))) ≤ u k)
75
+ (hu : Tendsto u atTop (𝓝 C)) :
76
+ Integrable (fun x => (firstParticleDensity (μ := μ) f x)^p) μ ∧
77
+ (∫ x, (firstParticleDensity (μ := μ) f x)^p ∂μ) ≤ C := by
78
+ let F (k : ℕ) : A → ℝ := (s k).indicator
79
+ (fun x => (firstParticleDensity (μ := μ.restrict (s k)) f x)^p)
80
+ have hdn {ν : Measure A} (x : A) : 0 ≤ firstParticleDensity (μ := ν) f x :=
81
+ mul_nonneg (by positivity) (integral_nonneg (fun _ => sq_nonneg _))
82
+ have hn (k) (x) : 0 ≤ F k x :=
83
+ indicator_nonneg (fun _ _ => Real.rpow_nonneg (hdn _) p) x
84
+ apply integrable_and_integral_le_of_ae_tendsto
85
+ (F := F) (u := u) (fun k => (integrable_indicator_iff (hs k)).mpr (hi k)) hn
86
+ (fun x => Real.rpow_nonneg (hdn x) p)
87
+ ?_ (fun k => by simpa only [F, integral_indicator (hs k)] using hb k) hu
88
+ have hslice := (firstFiber_memLp hf).norm.integrable_sq.prod_left_ae
89
+ filter_upwards [hslice] with x hx
90
+ have hset : (⋃ k, (univ.pi fun _ : Fin n => s k)) = univ := pi_exhaustion hmono hU n
91
+ have hlim := tendsto_setIntegral_of_monotone
92
+ (fun k => MeasurableSet.univ_pi (fun _ : Fin n => hs k))
93
+ (fun k l hkl z hz i _ => hmono hkl (hz i (mem_univ i)))
94
+ (f := fun y => ‖firstFiber f (y,x)‖^2) (μ := Measure.pi fun _ : Fin n => μ)
95
+ (by simpa only [hset, integrableOn_univ] using hx)
96
+ simp only [hset, Measure.restrict_univ, Measure.restrict_pi_pi] at hlim
97
+ have hd : Tendsto (fun k => firstParticleDensity (μ := μ.restrict (s k)) f x) atTop
98
+ (𝓝 (firstParticleDensity (μ := μ) f x)) := hlim.const_mul _
99
+ have hpw := hd.rpow_const (Or.inr hp.le)
100
+ have hex : ∃ k, x ∈ s k := by
101
+ have hi : x ∈ ⋃ k, s k := by rw [hU]; trivial
102
+ simpa only [mem_iUnion] using hi
103
+ obtain ⟨k,hk⟩ := hex
104
+ apply hpw.congr'
105
+ filter_upwards [eventually_ge_atTop k] with l hl
106
+ simp only [F, indicator_of_mem (hmono hl hk)]
107
+
108
+ end Coulomb
109
+
110
+ open MeasureTheory Set Filter
111
+ open scoped ENNReal NNReal BigOperators Classical Topology
112
+ namespace Coulomb
113
+
114
+ lemma spinCubeEquiv_full_measurePreserving (n : ℕ) :
115
+ MeasurePreserving (spinCubeEquiv n) (Measure.pi fun _ : Fin n => spinSpaceMeasure)
116
+ (Measure.count.prod volume) := by
117
+ have h1 := measurePreserving_arrowProdEquivProdArrow (Fin 2) (Fin 3 → ℝ) (Fin n)
118
+ (fun _ => Measure.count) (fun _ => volume)
119
+ rw [measure_pi_count] at h1
120
+ have h2 := (MeasurePreserving.id (Measure.count : Measure (Spins n))).prod
121
+ (measurePreserving_const_uncurry (I := Fin n) (J := Fin 3) (volume : Measure ℝ))
122
+ exact h2.comp h1
123
+
124
+ lemma H1Vector.spinSpace_memLp {n : ℕ} (ψ : H1Vector n) :
125
+ MemLp (fun sx : Spins n × ((Fin n × Fin 3) → ℝ) =>
126
+ ψ.value sx.1 (WithLp.toLp 2 sx.2)) 2 (Measure.count.prod volume) := by
127
+ have hi (s : Spins n) : MemLp (fun t : Spins n => if t = s then (1:ℂ) else 0) 2 Measure.count := by
128
+ apply MemLp.of_bound (by fun_prop) 1
129
+ exact ae_of_all _ (fun t => by split_ifs <;> norm_num)
130
+ have H := memLp_finsetSum Finset.univ (fun (s : Spins n) _ => tensorPair_memLp (hi s)
131
+ ((ψ.value_L2 s).comp_measurePreserving (PiLp.volume_preserving_toLp _)))
132
+ convert H using 1
133
+ funext sx
134
+ simp only [ite_mul, one_mul, zero_mul]
135
+ simp
136
+
137
+ lemma H1Vector.cubeState_full_memLp {n : ℕ} (ψ : H1Vector n) :
138
+ MemLp (cubeState ψ) 2 (Measure.pi fun _ : Fin n => spinSpaceMeasure) :=
139
+ ψ.spinSpace_memLp.comp_measurePreserving (spinCubeEquiv_full_measurePreserving n)
140
+
141
+ lemma cubeState_full_mass {n : ℕ} (ψ : H1Vector n) :
142
+ (∫ z, ‖cubeState ψ z‖^2 ∂(Measure.pi fun _ : Fin n => spinSpaceMeasure)) = mass ψ := by
143
+ change (∫ z, ‖ψ.value ((spinCubeEquiv n) z).1 (WithLp.toLp 2 ((spinCubeEquiv n) z).2)‖^2
144
+ ∂(Measure.pi fun _ : Fin n => spinSpaceMeasure)) = mass ψ
145
+ rw [(spinCubeEquiv_full_measurePreserving n).integral_comp'
146
+ (fun sx => ‖ψ.value sx.1 (WithLp.toLp 2 sx.2)‖^2)]
147
+ rw [integral_prod _ ψ.spinSpace_memLp.norm.integrable_sq, integral_count]
148
+ unfold mass
149
+ apply Finset.sum_congr rfl
150
+ intro s _
151
+ exact (show MeasurePreserving (MeasurableEquiv.toLp 2 ((Fin n × Fin 3) → ℝ)) volume volume from
152
+ PiLp.volume_preserving_toLp _).integral_comp' (fun x => ‖ψ.value s x‖^2)
153
+
154
+ lemma centeredSpinCube_monotone : Monotone centeredSpinCube := by
155
+ intro R S hRS x hx
156
+ simp only [centeredSpinCube, mem_prod, mem_univ, true_and, mem_univ_pi, mem_Ioc] at *
157
+ intro i
158
+ obtain ⟨h1,h2⟩ := hx i
159
+ constructor <;> linarith
160
+
161
+ lemma centeredSpinCube_exhaustion : (⋃ k : ℕ, centeredSpinCube (k+1)) = univ := by
162
+ ext x
163
+ simp only [mem_iUnion, mem_univ, iff_true]
164
+ obtain ⟨k,hk⟩ := exists_nat_gt (‖x.2‖ : ℝ)
165
+ refine ⟨k, ?_⟩
166
+ simp only [centeredSpinCube, mem_prod, mem_univ, true_and, mem_univ_pi, mem_Ioc]
167
+ intro i
168
+ have hi : |x.2 i| ≤ ‖x.2‖ := by simpa only [Real.norm_eq_abs] using norm_le_pi_norm x.2 i
169
+ have h := abs_le.mp hi
170
+ constructor <;> linarith
171
+
172
+ theorem global_spin_density_power_bound {n : ℕ} (ψ : H1Vector (n+1))
173
+ (hψ : Antisymmetric ψ) (hm : mass ψ ≤ 1) :
174
+ Integrable (fun x => (firstParticleDensity (μ := spinSpaceMeasure) (cubeState ψ) x)^(5/3:ℝ))
175
+ spinSpaceMeasure ∧
176
+ (∫ x, (firstParticleDensity (μ := spinSpaceMeasure) (cubeState ψ) x)^(5/3:ℝ)
177
+ ∂spinSpaceMeasure) ≤ (8192/(3*Real.pi^2))*kinetic ψ := by
178
+ apply density_power_exhaustion ψ.cubeState_full_memLp
179
+ (s := fun k : ℕ => centeredSpinCube (k+1)) (fun k => centeredSpinCube_measurable _)
180
+ (fun k l h => centeredSpinCube_monotone (by exact_mod_cast Nat.add_le_add_right h 1))
181
+ centeredSpinCube_exhaustion (by norm_num : (0:ℝ) < 5/3)
182
+ (u := fun k : ℕ => (64/(k+1:ℝ)^2)*((n+1:ℕ):ℝ)+(8192/(3*Real.pi^2))*kinetic ψ)
183
+ (fun k => (centered_density_power_bound ψ hψ hm (by positivity : (0:ℝ)<k+1)).1)
184
+ (fun k => (centered_density_power_bound ψ hψ hm (by positivity : (0:ℝ)<k+1)).2)
185
+ have ht : Tendsto (fun k : ℕ => (k:ℝ)+1) atTop atTop :=
186
+ Filter.tendsto_atTop_add_const_right atTop 1 tendsto_natCast_atTop_atTop
187
+ have hi := ((tendsto_inv_atTop_zero (𝕜 := ℝ)).comp ((tendsto_pow_atTop (α := ℝ) (by norm_num : (2 : ℕ) ≠ 0)).comp ht)).const_mul 64
188
+ convert (hi.mul_const ((n+1:ℕ):ℝ)).add_const ((8192/(3*Real.pi^2))*kinetic ψ) using 1 <;>
189
+ simp [Function.comp_apply, div_eq_mul_inv]
190
+
191
+ end Coulomb
192
+
193
+ open MeasureTheory Set Filter
194
+ open scoped ENNReal NNReal BigOperators Classical Topology
195
+
196
+ end
197
+ end
198
+
199
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/IntegrableTsumSummableNormIntegral.lean ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FormDomain.L2MeasureInclusion
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ namespace Coulomb
77
+ variable {Y ι : Type*} [MeasurableSpace Y] [Countable ι]
78
+
79
+ lemma integrable_tsum_of_summable_norm_integral {ν : Measure Y} {F : ι → Y → ℝ}
80
+ (hF : ∀ i, Integrable (F i) ν) (hs : Summable (fun i => ∫ y, ‖F i y‖ ∂ν)) :
81
+ Integrable (fun y => ∑' i, F i y) ν ∧ ∀ᵐ y ∂ν, Summable (fun i => F i y) := by
82
+ let f : ι → Lp ℝ 1 ν := fun i => (hF i).toL1 (F i)
83
+ have hn (i : ι) : ‖f i‖ = ∫ y, ‖F i y‖ ∂ν := by
84
+ rw [Integrable.norm_toL1_eq_lintegral_norm]
85
+ exact (integral_eq_lintegral_of_nonneg_ae (Filter.Eventually.of_forall (fun _ => norm_nonneg _))
86
+ (hF i).norm.aestronglyMeasurable).symm
87
+ have he : ∑' i, ‖f i‖ₑ ≠ ⊤ := by
88
+ apply tsum_enorm_ne_top_iff_summable_norm.mpr
89
+ simpa only [hn] using hs
90
+ have ha : ∀ᵐ y ∂ν, ∀ i, f i y = F i y := ae_all_iff.mpr (fun i => (hF i).coeFn_toL1)
91
+ have hb := Lp.hasSum_coeFn_tsum he
92
+ have hc : (fun y => ∑' i, F i y) =ᵐ[ν] (∑' i, f i : Lp ℝ 1 ν) := by
93
+ filter_upwards [ha, hb] with y hy hz
94
+ simpa only [hy] using hz.tsum_eq
95
+ refine ⟨(L1.integrable_coeFn (∑' i, f i)).congr hc.symm, ?_⟩
96
+ filter_upwards [ha, hb] with y hy hz
97
+ simpa only [hy] using hz.summable
98
+
99
+ lemma l2_weighted_density_integrable {ν : Measure Y} (u : ι → Lp ℂ 2 ν) (w : ι → ℝ)
100
+ (hw : ∀ i, 0 ≤ w i) (hs : Summable (fun i => w i * ‖u i‖^2)) :
101
+ Integrable (fun y => ∑' i, w i * ‖u i y‖^2) ν ∧
102
+ ∀ᵐ y ∂ν, Summable (fun i => w i * ‖u i y‖^2) := by
103
+ apply integrable_tsum_of_summable_norm_integral
104
+ · intro i
105
+ exact ((Lp.memLp (u i)).integrable_norm_pow (by norm_num : (2:ℕ) ≠ 0)).const_mul _
106
+ · simpa only [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (hw _) (sq_nonneg _)),
107
+ integral_const_mul, ← l2_norm_sq] using hs
108
+
109
+ lemma l2_weighted_density_hasSum {ν : Measure Y} (u : ι → Lp ℂ 2 ν) (w : ι → ℝ)
110
+ (hw : ∀ i, 0 ≤ w i) {s : ℝ} (hs : HasSum (fun i => w i * ‖u i‖^2) s) :
111
+ (∫ y, ∑' i, w i * ‖u i y‖^2 ∂ν) = s := by
112
+ have hi (i : ι) : Integrable (fun y => w i * ‖u i y‖^2) ν :=
113
+ ((Lp.memLp (u i)).integrable_norm_pow (by norm_num : (2:ℕ) ≠ 0)).const_mul (w i)
114
+ have hn : Summable (fun i => ∫ y, ‖w i * ‖u i y‖^2‖ ∂ν) := by
115
+ simpa only [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (hw _) (sq_nonneg _)),
116
+ integral_const_mul, ← l2_norm_sq] using hs.summable
117
+ have h := hasSum_integral_of_summable_integral_norm hi hn
118
+ simp only [integral_const_mul, ← l2_norm_sq] at h
119
+ exact h.unique hs
120
+ end Coulomb
121
+
122
+ end
123
+
124
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/JoinSpins.lean ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.BlockIndex
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ namespace Coulomb
61
+ def joinSpins (m k : ℕ) : Spins m × Spins k ≃ Spins (m+k) where
62
+ toFun := fun s => Fin.addCases s.1 s.2
63
+ invFun := fun s => (s ∘ Fin.castAdd k, s ∘ Fin.natAdd m)
64
+ left_inv := by
65
+ intro s
66
+ ext i <;> simp
67
+ right_inv := by
68
+ intro s
69
+ funext i
70
+ refine Fin.addCases ?_ ?_ i <;> intro j <;> simp [Function.comp_def]
71
+
72
+ lemma joinSpins_left (m k : ℕ) (s : Spins m) (t : Spins k) :
73
+ (joinSpins m k (s,t)) ∘ Fin.castAdd k = s := by
74
+ funext i
75
+ simp [joinSpins, Function.comp_def]
76
+ lemma joinSpins_right (m k : ℕ) (s : Spins m) (t : Spins k) :
77
+ (joinSpins m k (s,t)) ∘ Fin.natAdd m = t := by
78
+ funext i
79
+ simp [joinSpins, Function.comp_def]
80
+
81
+ lemma sum_joinSpins {m k : ℕ} (F : Spins (m+k) → ℝ) :
82
+ (∑ s, F s) = ∑ s : Spins m, ∑ t : Spins k, F (joinSpins m k (s,t)) := by
83
+ rw [← Equiv.sum_comp (joinSpins m k), Fintype.sum_prod_type]
84
+
85
+ lemma sum_configurationBlocks {m k : ℕ} (F : Fin (m+k) × Fin 3 → ℝ) :
86
+ (∑ a, F a) = (∑ a : Fin m × Fin 3, F (Fin.castAdd k a.1,a.2)) +
87
+ (∑ a : Fin k × Fin 3, F (Fin.natAdd m a.1,a.2)) := by
88
+ simp only [Fintype.sum_prod_type]
89
+ exact Fin.sum_univ_add _
90
+
91
+ lemma tensorValue_square_integral {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
92
+ (s : Spins (m+k)) :
93
+ (∫ x, ‖tensorValue u v s x‖^2) =
94
+ (∫ x, ‖u.value (s ∘ Fin.castAdd k) x‖^2)*
95
+ (∫ y, ‖v.value (s ∘ Fin.natAdd m) y‖^2) := by
96
+ rw [← (joinConfiguration_measurePreserving m k).integral_comp'
97
+ (fun x => ‖tensorValue u v s x‖^2)]
98
+ change (∫ z : Configuration m × Configuration k,
99
+ ‖tensorValue u v s (joinConfiguration m k z)‖^2 ∂(volume.prod volume)) = _
100
+ simp_rw [tensorValue_join, norm_mul, mul_pow]
101
+ exact integral_prod_mul (μ := volume) (ν := volume)
102
+ (fun x : Configuration m => ‖u.value (s ∘ Fin.castAdd k) x‖^2)
103
+ (fun y : Configuration k => ‖v.value (s ∘ Fin.natAdd m) y‖^2)
104
+
105
+ lemma tensorGradient_square_integral_left {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
106
+ (s : Spins (m+k)) (a : Fin m × Fin 3) :
107
+ (∫ x, ‖tensorGradient u v s (Fin.castAdd k a.1,a.2) x‖^2) =
108
+ (∫ x, ‖u.gradient (s ∘ Fin.castAdd k) a x‖^2)*
109
+ (∫ y, ‖v.value (s ∘ Fin.natAdd m) y‖^2) := by
110
+ rw [← (joinConfiguration_measurePreserving m k).integral_comp'
111
+ (fun x => ‖tensorGradient u v s (Fin.castAdd k a.1,a.2) x‖^2)]
112
+ change (∫ z : Configuration m × Configuration k,
113
+ ‖tensorGradient u v s (Fin.castAdd k a.1,a.2) (joinConfiguration m k z)‖^2
114
+ ∂(volume.prod volume)) = _
115
+ simp_rw [tensorGradient_join_left, norm_mul, mul_pow]
116
+ exact integral_prod_mul (μ := volume) (ν := volume)
117
+ (fun x : Configuration m => ‖u.gradient (s ∘ Fin.castAdd k) a x‖^2)
118
+ (fun y : Configuration k => ‖v.value (s ∘ Fin.natAdd m) y‖^2)
119
+
120
+ lemma tensorGradient_square_integral_right {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
121
+ (s : Spins (m+k)) (a : Fin k × Fin 3) :
122
+ (∫ x, ‖tensorGradient u v s (Fin.natAdd m a.1,a.2) x‖^2) =
123
+ (∫ x, ‖u.value (s ∘ Fin.castAdd k) x‖^2)*
124
+ (∫ y, ‖v.gradient (s ∘ Fin.natAdd m) a y‖^2) := by
125
+ rw [← (joinConfiguration_measurePreserving m k).integral_comp'
126
+ (fun x => ‖tensorGradient u v s (Fin.natAdd m a.1,a.2) x‖^2)]
127
+ change (∫ z : Configuration m × Configuration k,
128
+ ‖tensorGradient u v s (Fin.natAdd m a.1,a.2) (joinConfiguration m k z)‖^2
129
+ ∂(volume.prod volume)) = _
130
+ simp_rw [tensorGradient_join_right, norm_mul, mul_pow]
131
+ exact integral_prod_mul (μ := volume) (ν := volume)
132
+ (fun x : Configuration m => ‖u.value (s ∘ Fin.castAdd k) x‖^2)
133
+ (fun y : Configuration k => ‖v.gradient (s ∘ Fin.natAdd m) a y‖^2)
134
+
135
+ lemma mass_tensor {m k : ℕ} (u : H1Vector m) (v : H1Vector k) :
136
+ mass (u.tensor v) = mass u*mass v := by
137
+ change (∑ s, ∫ x, ‖tensorValue u v s x‖^2) = _
138
+ simp_rw [tensorValue_square_integral]
139
+ rw [sum_joinSpins]
140
+ simp only [joinSpins_left, joinSpins_right, mass, Finset.sum_mul, Finset.mul_sum]
141
+ exact Finset.sum_comm
142
+
143
+ lemma kinetic_tensor {m k : ℕ} (u : H1Vector m) (v : H1Vector k) :
144
+ kinetic (u.tensor v) = kinetic u*mass v+mass u*kinetic v := by
145
+ change (1/2:ℝ)*(∑ s, ∑ a, ∫ x, ‖tensorGradient u v s a x‖^2) = _
146
+ simp_rw [sum_configurationBlocks, tensorGradient_square_integral_left,
147
+ tensorGradient_square_integral_right]
148
+ rw [sum_joinSpins]
149
+ simp only [joinSpins_left, joinSpins_right]
150
+ simp only [mass, kinetic, Finset.sum_add_distrib]
151
+ simp_rw [← Finset.mul_sum, ← Finset.sum_mul]
152
+ rw [← Finset.sum_mul_sum]
153
+ ring
154
+ end Coulomb
155
+
156
+ open scoped Classical
157
+ namespace Coulomb
158
+ def blockHom (m k : ℕ) :
159
+ (Equiv.Perm (Fin m) × Equiv.Perm (Fin k)) →* Equiv.Perm (Fin (m+k)) :=
160
+ ((finSumFinEquiv : Fin m ⊕ Fin k ≃ Fin (m+k)).permCongrHom).toMonoidHom.comp
161
+ (Equiv.Perm.sumCongrHom (Fin m) (Fin k))
162
+
163
+ def blockGroup (m k : ℕ) : Subgroup (Equiv.Perm (Fin (m+k))) := (blockHom m k).range
164
+
165
+ lemma blockHom_left {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k)) (i : Fin m) :
166
+ blockHom m k (p,q) (Fin.castAdd k i) = Fin.castAdd k (p i) := by
167
+ change finSumFinEquiv ((Equiv.sumCongr p q) (finSumFinEquiv.symm (Fin.castAdd k i))) = _
168
+ simp [← finSumFinEquiv_apply_left]
169
+
170
+ lemma blockHom_right {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k)) (i : Fin k) :
171
+ blockHom m k (p,q) (Fin.natAdd m i) = Fin.natAdd m (q i) := by
172
+ change finSumFinEquiv ((Equiv.sumCongr p q) (finSumFinEquiv.symm (Fin.natAdd m i))) = _
173
+ simp [← finSumFinEquiv_apply_right]
174
+
175
+ lemma blockHom_sign {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k)) :
176
+ (blockHom m k (p,q)).sign = p.sign*q.sign := by
177
+ change (finSumFinEquiv.permCongr (Equiv.sumCongr p q)).sign = _
178
+ rw [Equiv.Perm.sign_permCongr, Equiv.Perm.sign_sumCongr]
179
+
180
+ lemma blockHom_injective (m k : ℕ) : Function.Injective (blockHom m k) :=
181
+ (finSumFinEquiv.permCongrHom.injective).comp Equiv.Perm.sumCongrHom_injective
182
+
183
+ lemma card_blockGroup (m k : ℕ) :
184
+ Fintype.card (blockGroup m k) = Nat.factorial m*Nat.factorial k := by
185
+ rw [show Fintype.card (blockGroup m k) =
186
+ Fintype.card (Equiv.Perm (Fin m) × Equiv.Perm (Fin k)) from
187
+ Fintype.card_eq.mpr ⟨(Equiv.ofInjective (blockHom m k) (blockHom_injective m k)).symm⟩]
188
+ simp [Fintype.card_prod, Fintype.card_perm]
189
+
190
+ lemma mem_blockGroup_of_no_crossing {m k : ℕ} (r : Equiv.Perm (Fin (m+k)))
191
+ (hr : ∀ i : Fin m, ∃ j : Fin m, r (Fin.castAdd k i) = Fin.castAdd k j) :
192
+ r ∈ blockGroup m k := by
193
+ let t : Equiv.Perm (Fin m ⊕ Fin k) := finSumFinEquiv.symm.permCongr r
194
+ have ht : Set.MapsTo t (Set.range Sum.inl) (Set.range Sum.inl) := by
195
+ rintro _ ⟨i, rfl⟩
196
+ rcases hr i with ⟨j,hj⟩
197
+ refine ⟨j, ?_⟩
198
+ change Sum.inl j = finSumFinEquiv.symm (r (finSumFinEquiv (Sum.inl i)))
199
+ rw [finSumFinEquiv_apply_left, hj]
200
+ simp [← finSumFinEquiv_apply_left]
201
+ rcases Equiv.Perm.mem_sumCongrHom_range_of_perm_mapsTo_inl ht with ⟨pq,hpq⟩
202
+ refine ⟨pq, ?_⟩
203
+ apply finSumFinEquiv.symm.permCongr.injective
204
+ change finSumFinEquiv.symm.permCongr
205
+ (finSumFinEquiv.permCongr (Equiv.Perm.sumCongrHom (Fin m) (Fin k) pq)) = _
206
+ rw [← Equiv.permCongr_symm, Equiv.symm_apply_apply]
207
+ exact hpq
208
+
209
+ lemma exists_crossing_of_not_mem {m k : ℕ} (r : Equiv.Perm (Fin (m+k)))
210
+ (hr : r ∉ blockGroup m k) :
211
+ ∃ i : Fin m, ∃ j : Fin k, r (Fin.castAdd k i) = Fin.natAdd m j := by
212
+ have hn : ¬ ∀ i : Fin m, ∃ j : Fin m, r (Fin.castAdd k i) = Fin.castAdd k j :=
213
+ fun h => hr (mem_blockGroup_of_no_crossing r h)
214
+ push Not at hn
215
+ rcases hn with ⟨i,hi⟩
216
+ refine ⟨i, ?_⟩
217
+ have hcases := Fin.addCases (motive := fun z : Fin (m+k) =>
218
+ (∃ j : Fin k, z = Fin.natAdd m j) ∨ ∃ j : Fin m, z = Fin.castAdd k j)
219
+ (fun j => Or.inr ⟨j,rfl⟩) (fun j => Or.inl ⟨j,rfl⟩) (r (Fin.castAdd k i))
220
+ rcases hcases with h|⟨j,hj⟩
221
+ · exact h
222
+ · exact (hi j hj).elim
223
+ end Coulomb
224
+
225
+ end
226
+
227
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LeftPotential.lean ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Propagation.NuclearPotential
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ namespace Coulomb
64
+ def leftPotential {m k : ℕ} (W : Configuration m → ℝ) (x : Configuration (m+k)) : ℝ :=
65
+ W ((joinConfiguration m k).symm x).1
66
+ def rightPotential {m k : ℕ} (W : Configuration k → ℝ) (x : Configuration (m+k)) : ℝ :=
67
+ W ((joinConfiguration m k).symm x).2
68
+
69
+ def crossEnergy {m k : ℕ} (u : H1Vector m) (v : H1Vector k) : ℝ :=
70
+ potentialEnergy (fun x => crossPotential ((joinConfiguration m k).symm x).1
71
+ ((joinConfiguration m k).symm x).2) (u.tensor v)
72
+
73
+ lemma tensor_leftPotential_integrable {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
74
+ (W : Configuration m → ℝ) (hW : ∀ s, Integrable (fun x => W x*‖u.value s x‖^2))
75
+ (s : Spins (m+k)) :
76
+ Integrable (fun x => leftPotential W x*‖(u.tensor v).value s x‖^2) := by
77
+ have hp : Integrable (fun z : Configuration m × Configuration k =>
78
+ (W z.1*‖u.value (s ∘ Fin.castAdd k) z.1‖^2)*‖v.value (s ∘ Fin.natAdd m) z.2‖^2)
79
+ (volume.prod volume) :=
80
+ (hW (s ∘ Fin.castAdd k)).mul_prod ((v.value_L2 (s ∘ Fin.natAdd m)).norm.integrable_sq)
81
+ have H := (joinConfiguration_symm_measurePreserving m k).integrable_comp_of_integrable hp
82
+ apply H.congr
83
+ filter_upwards [] with x
84
+ change (W _*‖u.value _ _‖^2)*‖v.value _ _‖^2 = W _*‖u.value _ _*v.value _ _‖^2
85
+ rw [norm_mul,mul_pow,mul_assoc]
86
+ rfl
87
+
88
+ lemma tensor_rightPotential_integrable {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
89
+ (W : Configuration k → ℝ) (hW : ∀ s, Integrable (fun x => W x*‖v.value s x‖^2))
90
+ (s : Spins (m+k)) :
91
+ Integrable (fun x => rightPotential W x*‖(u.tensor v).value s x‖^2) := by
92
+ have hp : Integrable (fun z : Configuration m × Configuration k =>
93
+ ‖u.value (s ∘ Fin.castAdd k) z.1‖^2*(W z.2*‖v.value (s ∘ Fin.natAdd m) z.2‖^2))
94
+ (volume.prod volume) :=
95
+ ((u.value_L2 (s ∘ Fin.castAdd k)).norm.integrable_sq).mul_prod (hW (s ∘ Fin.natAdd m))
96
+ have H := (joinConfiguration_symm_measurePreserving m k).integrable_comp_of_integrable hp
97
+ apply H.congr
98
+ filter_upwards [] with x
99
+ change ‖u.value _ _‖^2*(W _*‖v.value _ _‖^2) = W _*‖u.value _ _*v.value _ _‖^2
100
+ rw [norm_mul,mul_pow,mul_left_comm]
101
+ rfl
102
+
103
+ lemma potentialEnergy_tensor_left {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
104
+ (W : Configuration m → ℝ) :
105
+ potentialEnergy (leftPotential W) (u.tensor v) = potentialEnergy W u*mass v := by
106
+ have hi (s : Spins (m+k)) : (∫ x, leftPotential W x*‖(u.tensor v).value s x‖^2) =
107
+ (∫ x, W x*‖u.value (s ∘ Fin.castAdd k) x‖^2)*
108
+ (∫ y, ‖v.value (s ∘ Fin.natAdd m) y‖^2) := by
109
+ rw [← (joinConfiguration_measurePreserving m k).integral_comp'
110
+ (fun x => leftPotential W x*‖(u.tensor v).value s x‖^2)]
111
+ change (∫ z : Configuration m × Configuration k,
112
+ leftPotential W (joinConfiguration m k z)*‖tensorValue u v s (joinConfiguration m k z)‖^2
113
+ ∂(volume.prod volume)) = _
114
+ simp only [leftPotential, ContinuousLinearEquiv.symm_apply_apply, tensorValue_join,norm_mul,mul_pow,← mul_assoc]
115
+ exact integral_prod_mul (μ := volume) (ν := volume)
116
+ (fun x : Configuration m => W x*‖u.value (s ∘ Fin.castAdd k) x‖^2)
117
+ (fun y : Configuration k => ‖v.value (s ∘ Fin.natAdd m) y‖^2)
118
+ unfold potentialEnergy mass
119
+ rw [sum_joinSpins]
120
+ simp_rw [hi, joinSpins_left, joinSpins_right]
121
+ rw [Finset.sum_mul_sum]
122
+
123
+ lemma potentialEnergy_tensor_right {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
124
+ (W : Configuration k → ℝ) :
125
+ potentialEnergy (rightPotential W) (u.tensor v) = mass u*potentialEnergy W v := by
126
+ have hi (s : Spins (m+k)) : (∫ x, rightPotential W x*‖(u.tensor v).value s x‖^2) =
127
+ (∫ x, ‖u.value (s ∘ Fin.castAdd k) x‖^2)*
128
+ (∫ y, W y*‖v.value (s ∘ Fin.natAdd m) y‖^2) := by
129
+ rw [← (joinConfiguration_measurePreserving m k).integral_comp'
130
+ (fun x => rightPotential W x*‖(u.tensor v).value s x‖^2)]
131
+ change (∫ z : Configuration m × Configuration k,
132
+ rightPotential W (joinConfiguration m k z)*‖tensorValue u v s (joinConfiguration m k z)‖^2
133
+ ∂(volume.prod volume)) = _
134
+ simp only [rightPotential, ContinuousLinearEquiv.symm_apply_apply,tensorValue_join,norm_mul,mul_pow]
135
+ simp_rw [mul_left_comm (W _) (‖u.value _ _‖^2)]
136
+ exact integral_prod_mul (μ := volume) (ν := volume)
137
+ (fun x : Configuration m => ‖u.value (s ∘ Fin.castAdd k) x‖^2)
138
+ (fun y : Configuration k => W y*‖v.value (s ∘ Fin.natAdd m) y‖^2)
139
+ unfold potentialEnergy mass
140
+ rw [sum_joinSpins]
141
+ simp_rw [hi, joinSpins_left, joinSpins_right]
142
+ rw [Finset.sum_mul_sum]
143
+
144
+ lemma potentialEnergy_add {n : ℕ} (u : H1Vector n) (V W : Configuration n → ℝ)
145
+ (hV : ∀ s, Integrable (fun x => V x*‖u.value s x‖^2))
146
+ (hW : ∀ s, Integrable (fun x => W x*‖u.value s x‖^2)) :
147
+ potentialEnergy (fun x => V x+W x) u = potentialEnergy V u+potentialEnergy W u := by
148
+ simp only [potentialEnergy,add_mul]
149
+ simp_rw [integral_add (hV _) (hW _)]
150
+ rw [Finset.sum_add_distrib]
151
+
152
+ lemma nuclearPotential_split {M m k : ℕ} (S : Nuclei M) (x : Configuration (m+k)) :
153
+ nuclearPotential S x = leftPotential (nuclearPotential S) x+
154
+ rightPotential (nuclearPotential S) x := by
155
+ have H := nuclearPotential_join S ((joinConfiguration m k).symm x).1 ((joinConfiguration m k).symm x).2
156
+ simpa only [Prod.mk.eta,ContinuousLinearEquiv.apply_symm_apply,leftPotential,rightPotential] using H
157
+
158
+ lemma pairPotential_split {m k : ℕ} (x : Configuration (m+k)) :
159
+ pairPotential x = leftPotential pairPotential x+rightPotential pairPotential x+
160
+ crossPotential ((joinConfiguration m k).symm x).1 ((joinConfiguration m k).symm x).2 := by
161
+ have H := pairPotential_join ((joinConfiguration m k).symm x).1 ((joinConfiguration m k).symm x).2
162
+ simpa only [Prod.mk.eta,ContinuousLinearEquiv.apply_symm_apply,leftPotential,rightPotential] using H
163
+
164
+ lemma nuclearEnergy_tensor {M m k : ℕ} (S : Nuclei M) (u : H1Vector m) (v : H1Vector k) :
165
+ nuclearEnergy S (u.tensor v) = nuclearEnergy S u*mass v+mass u*nuclearEnergy S v := by
166
+ change potentialEnergy (nuclearPotential S) (u.tensor v) = _
167
+ rw [show (nuclearPotential S : Configuration (m+k) → ℝ) = fun x =>
168
+ leftPotential (nuclearPotential S) x+rightPotential (nuclearPotential S) x
169
+ from funext (nuclearPotential_split S)]
170
+ have h1 : ∀ s, Integrable (fun x => leftPotential (nuclearPotential S) x*‖(u.tensor v).value s x‖^2) :=
171
+ tensor_leftPotential_integrable u v (nuclearPotential S) (u.nuclear_integrable S)
172
+ have h2 : ∀ s, Integrable (fun x => rightPotential (nuclearPotential S) x*‖(u.tensor v).value s x‖^2) :=
173
+ tensor_rightPotential_integrable u v (nuclearPotential S) (v.nuclear_integrable S)
174
+ rw [potentialEnergy_add _ _ _ h1 h2,
175
+ potentialEnergy_tensor_left,potentialEnergy_tensor_right]
176
+ rfl
177
+
178
+ lemma tensor_crossPotential_integrable {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
179
+ (s : Spins (m+k)) : Integrable (fun x =>
180
+ crossPotential ((joinConfiguration m k).symm x).1 ((joinConfiguration m k).symm x).2 *
181
+ ‖(u.tensor v).value s x‖^2) := by
182
+ have H := ((u.tensor v).pair_integrable s).sub
183
+ ((tensor_leftPotential_integrable u v pairPotential u.pair_integrable s).add
184
+ (tensor_rightPotential_integrable u v pairPotential v.pair_integrable s))
185
+ convert H using 1
186
+ funext x
187
+ change _ = pairPotential x*_-(_+_)
188
+ rw [pairPotential_split]
189
+ ring
190
+
191
+ lemma pairEnergy_tensor {m k : ℕ} (u : H1Vector m) (v : H1Vector k) :
192
+ pairEnergy (u.tensor v) = pairEnergy u*mass v+mass u*pairEnergy v+crossEnergy u v := by
193
+ change potentialEnergy pairPotential (u.tensor v) = _
194
+ rw [show (pairPotential : Configuration (m+k) → ℝ) = fun x =>
195
+ (leftPotential pairPotential x+rightPotential pairPotential x)+
196
+ crossPotential ((joinConfiguration m k).symm x).1 ((joinConfiguration m k).symm x).2
197
+ from funext pairPotential_split]
198
+ have h1 := tensor_leftPotential_integrable u v pairPotential u.pair_integrable
199
+ have h2 := tensor_rightPotential_integrable u v pairPotential v.pair_integrable
200
+ have h12 : ∀ s, Integrable (fun x => (leftPotential pairPotential x+rightPotential pairPotential x)*
201
+ ‖(u.tensor v).value s x‖^2) := by
202
+ intro s
203
+ apply ((h1 s).add (h2 s)).congr
204
+ filter_upwards [] with x
205
+ exact (add_mul _ _ _).symm
206
+ rw [potentialEnergy_add _ _ _ h12
207
+ (tensor_crossPotential_integrable u v),
208
+ potentialEnergy_add _ _ _ h1 h2,potentialEnergy_tensor_left,potentialEnergy_tensor_right]
209
+ rfl
210
+
211
+ lemma form_wedge {M m k : ℕ} (S : Nuclei M) (u : H1Vector m) (v : H1Vector k)
212
+ (hu : Antisymmetric u) (hv : Antisymmetric v) (A B : Set Space)
213
+ (hsu : SpatiallySupported u A) (hsv : SpatiallySupported v B)
214
+ (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) :
215
+ form S (u.wedge v) = form S u*mass v+mass u*form S v+crossEnergy u v := by
216
+ unfold form
217
+ rw [kinetic_wedge u v hu hv A B hsu hsv hA hB hAB,
218
+ nuclearEnergy_wedge_tensor S u v hu hv A B hsu hsv hAB,
219
+ pairEnergy_wedge_tensor u v hu hv A B hsu hsv hAB,nuclearEnergy_tensor,pairEnergy_tensor]
220
+ ring
221
+ end Coulomb
222
+
223
+ end
224
+
225
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LipschitzTestEnergy.lean ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.ThomasFermi.TFCountTest
3
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.PoissonInterior
4
+ import OAI.Analysis.CoulombRadii.Packets.LipschitzMollifier
5
+
6
+ namespace OAI
7
+
8
+ noncomputable section
9
+
10
+ section
11
+ open MeasureTheory Set Filter
12
+ open scoped ENNReal NNReal BigOperators Classical Topology ContDiff
13
+ namespace Coulomb
14
+ open NeutralAtom (dirPartial coordinateLaplacian axis)
15
+
16
+ lemma smooth_test_energy_identity {χ : Space → ℝ} (hχ : ContDiff ℝ ∞ χ)
17
+ (hc : HasCompactSupport χ) :
18
+ (∫ x, testCharge χ x*χ x)=
19
+ (4*Real.pi)⁻¹*∑ a : Fin 3, ∫ x, (dirPartial χ (axis a) x)^2 := by
20
+ have hp (v : Space) : ContDiff ℝ ∞ (dirPartial χ v) :=
21
+ NeutralAtom.contDiff_partial (by simpa using hχ) v
22
+ have hpc (v : Space) := NeutralAtom.hasCompactSupport_partial hc v
23
+ have hpp (v : Space) : ContDiff ℝ ∞ (dirPartial (dirPartial χ v) v) :=
24
+ NeutralAtom.contDiff_partial (by simpa using hp v) v
25
+ have hcross (v : Space) : Integrable (fun x : Space => (dirPartial χ v x)^2) (volume : Measure Space) := by
26
+ have hh : HasCompactSupport (fun x => dirPartial χ v x*dirPartial χ v x) := (hpc v).mul_right
27
+ have hc : Continuous (fun x : Space => (dirPartial χ v x)^2) := (hp v).continuous.pow 2
28
+ exact hc.integrable_of_hasCompactSupport (μ := (volume : Measure Space)) (by simpa only [pow_two] using hh)
29
+ have hsecond (v : Space) : Integrable (fun x => χ x*dirPartial (dirPartial χ v) v x) :=
30
+ (hχ.continuous.mul (hpp v).continuous).integrable_of_hasCompactSupport hc.mul_right
31
+ have hprod (v : Space) : Integrable (fun x => χ x*dirPartial χ v x) :=
32
+ (hχ.continuous.mul (hp v).continuous).integrable_of_hasCompactSupport hc.mul_right
33
+ have hibp (v : Space) : (∫ x, χ x*dirPartial (dirPartial χ v) v x)=
34
+ -(∫ x, (dirPartial χ v x)^2) := by
35
+ simpa only [dirPartial,pow_two] using
36
+ (integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable
37
+ (by simpa only [pow_two,dirPartial] using hcross v) (hsecond v) (hprod v)
38
+ (fun x _ => hχ.differentiable (by simp) x)
39
+ (fun x _ => (hp v).differentiable (by simp) x))
40
+ have he : (fun x => testCharge χ x*χ x)=
41
+ (fun x => -(4*Real.pi)⁻¹*∑ a : Fin 3, χ x*dirPartial (dirPartial χ (axis a)) (axis a) x) := by
42
+ funext x
43
+ rw [testCharge,NeutralAtom.coordinateLaplacian_eq_partials
44
+ ((hχ.of_le (by exact WithTop.coe_le_coe.mpr le_top)).contDiffAt),←Finset.mul_sum]
45
+ ring
46
+ rw [he,integral_const_mul,integral_finsetSum _ (fun a _ => hsecond (axis a))]
47
+ simp_rw [hibp]
48
+ rw [Finset.sum_neg_distrib]
49
+ ring
50
+
51
+ lemma smooth_test_energy_le {χ : Space → ℝ} {A R : ℝ} (hA : 0≤A)
52
+ (hχ : ContDiff ℝ ∞ χ) (y : Space)
53
+ (hs : tsupport χ⊆Metric.closedBall y R)
54
+ (hL : ∀ z v, |χ z-χ v|≤A*‖z-v‖) :
55
+ (∫ x, testCharge χ x*χ x)≤
56
+ (4*Real.pi)⁻¹*(3*(volume (Metric.closedBall y R)).toReal*A^2) := by
57
+ have hc : HasCompactSupport χ := (isCompact_closedBall y R).of_isClosed_subset (isClosed_tsupport χ) hs
58
+ rw [smooth_test_energy_identity hχ hc]
59
+ apply mul_le_mul_of_nonneg_left _ (by positivity)
60
+ have hsingle (a : Fin 3) : (∫ x, (dirPartial χ (axis a) x)^2)≤
61
+ (volume (Metric.closedBall y R)).toReal*A^2 := by
62
+ have hd (x : Space) : |dirPartial χ (axis a) x|≤A := by
63
+ have hd := norm_fderiv_le_of_lip' ℝ (f := χ) (x₀ := x) hA (Eventually.of_forall (fun z => by
64
+ simpa only [Real.norm_eq_abs] using hL z x))
65
+ have ha : ‖axis a‖=1 := by simp [axis]
66
+ have hh := (fderiv ℝ χ x).le_opNorm (axis a)
67
+ rw [ha,mul_one] at hh
68
+ exact (show |dirPartial χ (axis a) x|≤‖fderiv ℝ χ x‖ from hh).trans hd
69
+ have hout (x : Space) (hx : x∉Metric.closedBall y R) : (dirPartial χ (axis a) x)^2=0 := by
70
+ rw [image_eq_zero_of_notMem_tsupport (fun hh => hx (hs (NeutralAtom.tsupport_dirPartial_subset χ _ hh)))]
71
+ norm_num
72
+ rw [←setIntegral_eq_integral_of_forall_compl_eq_zero hout]
73
+ have hh := norm_setIntegral_le_of_norm_le_const (μ := volume)
74
+ (isCompact_closedBall y R).measure_lt_top (fun z _ => show ‖(dirPartial χ (axis a) z)^2‖≤A^2 by
75
+ rw [Real.norm_of_nonneg (sq_nonneg _)]
76
+ simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) hA).2 (hd z))
77
+ exact (le_abs_self _).trans (by simpa only [Real.norm_eq_abs,Measure.real,mul_comm] using hh)
78
+ have HH := Finset.sum_le_sum (s := Finset.univ) (fun a _ => hsingle a)
79
+ simpa [mul_assoc] using HH
80
+
81
+ end Coulomb
82
+
83
+ end
84
+ open MeasureTheory Set Filter
85
+ open scoped ENNReal NNReal BigOperators Classical Topology ContDiff
86
+ namespace Coulomb
87
+
88
+ theorem raw_coulomb_lipschitz_test {Ω : Set Space} (hΩ : MeasurableSet Ω)
89
+ [IsFiniteMeasure (volume.restrict Ω)] {σ K : Space → ℝ} {A B R : ℝ}
90
+ (hσ : MemLp σ TFExponent (volume.restrict Ω)) (hσs : ∀ x∉Ω, σ x=0)
91
+ (hA : 0≤A) (hR : 0<R) (y : Space)
92
+ (hB : ∀ x, |K x|≤B) (hK : ∀ x, R<‖x-y‖ → K x=0)
93
+ (hL : ∀ z v, |K z-K v|≤A*‖z-v‖)
94
+ (hball : Metric.closedBall y (2*R)⊆Ω) :
95
+ (∫ x, σ x*K x)^2≤coulombBilinear σ σ*
96
+ ((4*Real.pi)⁻¹*(3*(volume (Metric.closedBall y (2*R))).toReal*A^2)) := by
97
+ let ε : ℕ → ℝ := fun n => R*(1/((n:ℝ)+1))
98
+ have hε (n : ℕ) : 0<ε n := by dsimp [ε]; positivity
99
+ have hεR (n : ℕ) : ε n≤R := by
100
+ dsimp [ε]
101
+ apply mul_le_of_le_one_right hR.le
102
+ exact (div_le_one (by positivity)).2 (by linarith [Nat.cast_nonneg (α := ℝ) n])
103
+ have hεt : Tendsto ε atTop (𝓝 0) := by
104
+ simpa only [mul_zero] using tendsto_one_div_add_atTop_nhds_zero_nat.const_mul R
105
+ choose χ hsm hsp hLip happ using
106
+ (fun n => NeutralAtom.exists_smooth_lipschitz_approx K hA (hε n) y hK hL)
107
+ have hiΩ : Integrable σ (volume.restrict Ω) := hσ.integrable (by norm_num [TFExponent])
108
+ have hind : Ω.indicator σ=σ := by
109
+ funext x
110
+ by_cases hx : x∈Ω
111
+ · exact indicator_of_mem hx σ
112
+ · rw [indicator_of_notMem hx,hσs x hx]
113
+ have hi : Integrable σ := by
114
+ have hh := (integrable_indicator_iff hΩ).2 hiΩ
115
+ rwa [hind] at hh
116
+ have hpoint (x : Space) : Tendsto (fun n => χ n x) atTop (𝓝 (K x)) := by
117
+ apply tendsto_iff_dist_tendsto_zero.mpr
118
+ have hh : Tendsto (fun n => A*ε n) atTop (𝓝 0) := by simpa using hεt.const_mul A
119
+ exact squeeze_zero (fun n => dist_nonneg) (fun n => by simpa only [Real.dist_eq] using happ n x) hh
120
+ have hdom (n : ℕ) (x : Space) : |χ n x|≤B+A*R := by
121
+ calc
122
+ _≤|χ n x-K x|+|K x| := by simpa only [sub_add_cancel] using abs_add_le (χ n x-K x) (K x)
123
+ _≤A*ε n+B := add_le_add (happ n x) (hB x)
124
+ _≤_ := by have hh := mul_le_mul_of_nonneg_left (hεR n) hA; linarith
125
+ have hconv : Tendsto (fun n => ∫ x, σ x*χ n x) atTop (𝓝 (∫ x, σ x*K x)) := by
126
+ apply tendsto_integral_of_dominated_convergence (fun x => ‖σ x‖*(B+A*R))
127
+ · intro n
128
+ exact hi.aestronglyMeasurable.mul (hsm n).continuous.aestronglyMeasurable
129
+ · exact hi.norm.mul_const _
130
+ · intro n
131
+ filter_upwards [] with x
132
+ rw [norm_mul,Real.norm_eq_abs (χ n x)]
133
+ exact mul_le_mul_of_nonneg_left (hdom n x) (norm_nonneg _)
134
+ · filter_upwards [] with x
135
+ exact tendsto_const_nhds.mul (hpoint x)
136
+ have hQ := raw_coulomb_nonneg hΩ hσ hσs
137
+ apply le_of_tendsto (hconv.pow 2)
138
+ filter_upwards [] with n
139
+ have hsp' : tsupport (χ n)⊆Metric.closedBall y (2*R) :=
140
+ (hsp n).trans (Metric.closedBall_subset_closedBall (by linarith [hεR n]))
141
+ have hc : HasCompactSupport (χ n) := (isCompact_closedBall y (2*R)).of_isClosed_subset
142
+ (isClosed_tsupport _) hsp'
143
+ exact (raw_coulomb_smooth_test hΩ (hsm n) hc (hsp'.trans hball) hσ hσs).trans
144
+ (mul_le_mul_of_nonneg_left (smooth_test_energy_le hA (hsm n) y hsp' (hLip n)) hQ)
145
+
146
+ end Coulomb
147
+
148
+ end
149
+
150
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/LowProjection.lean ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.TsumFixed
3
+
4
+ namespace OAI
5
+
6
+ section
7
+ section
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ namespace Coulomb
11
+ section LowProjection
12
+ variable {A B ι : Type*} [MeasurableSpace A] [MeasurableSpace B]
13
+ {μ : Measure A} {ν : Measure B} [SigmaFinite μ] [SigmaFinite ν]
14
+ (v : ι → A → ℂ) (hv : ∀ i, MemLp (v i) 2 μ)
15
+
16
+ noncomputable def lowProjection (s : Finset ι) (f : B × A → ℂ) (z : B × A) : ℂ :=
17
+ ∑ i ∈ s, fiberContract (μ := μ) (v i) f z.1 * v i z.2
18
+
19
+ include hv in
20
+ lemma lowProjection_memLp (s : Finset ι) {f : B × A → ℂ} (hf : MemLp f 2 (ν.prod μ)) :
21
+ MemLp (lowProjection (μ := μ) v s f) 2 (ν.prod μ) :=
22
+ memLp_finsetSum s (fun i _ => tensorPair_memLp (fiberContract_memLp (hv i) hf) (hv i))
23
+
24
+ include hv in
25
+ lemma lowProjection_tail_memLp (s : Finset ι) {f : B × A → ℂ}
26
+ (hf : MemLp f 2 (ν.prod μ)) (x : A) :
27
+ MemLp (fun y => lowProjection (μ := μ) v s f (y,x)) 2 ν :=
28
+ memLp_finsetSum s (fun i _ => (fiberContract_memLp (hv i) hf).mul_const (v i x))
29
+
30
+ include hv in
31
+ lemma lowProjection_eq_contract (s : Finset ι) {f : B × A → ℂ}
32
+ (hf : MemLp f 2 (ν.prod μ)) (x : A) :
33
+ (fun y => lowProjection (μ := μ) v s f (y,x)) =ᵐ[ν]
34
+ fiberContract (μ := μ) (lowOrbital v s x) f := by
35
+ filter_upwards [memLp_fiber_ae hf] with y hy
36
+ unfold lowProjection fiberContract lowOrbital
37
+ rw [show (fun a => star (∑ i ∈ s, star (v i x) * v i a) * f (y,a)) =
38
+ (fun a => ∑ i ∈ s, (star (v i a) * f (y,a)) * v i x) from by
39
+ funext a
40
+ simp only [star_sum, star_mul, star_star, Finset.sum_mul]
41
+ apply Finset.sum_congr rfl
42
+ intro i _
43
+ ring]
44
+ rw [integral_finsetSum s (fun i _ => (integrable_star_mul (hv i) hy).mul_const (v i x))]
45
+ simp only [integral_mul_const]
46
+
47
+ end LowProjection
48
+ end Coulomb
49
+
50
+ end
51
+ end
52
+
53
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/MeridianMap.lean ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Localization.TruncatedCoulomb
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ open MeasureTheory Filter
77
+ open scoped ENNReal NNReal FourierTransform SchwartzMap LineDeriv ComplexConjugate
78
+ open scoped LineDeriv
79
+ open MeasureTheory Set Metric
80
+ open scoped ENNReal NNReal RealInnerProductSpace
81
+ open MeasureTheory Set Metric Filter
82
+ open scoped ENNReal NNReal RealInnerProductSpace Convolution
83
+ open MeasureTheory Set Filter
84
+ open scoped ENNReal NNReal ComplexConjugate
85
+ open MeasureTheory Set Filter
86
+ open scoped ENNReal NNReal ContDiff
87
+ open MeasureTheory Set Filter
88
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal ComplexConjugate Pointwise
89
+ open MeasureTheory Set Filter
90
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
91
+ open MeasureTheory Set Filter
92
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
93
+ open MeasureTheory Set Filter
94
+ open scoped Classical SchwartzMap ENNReal NNReal Pointwise
95
+ open MeasureTheory Set Filter
96
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
97
+ open MeasureTheory Set Filter
98
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
99
+ namespace Coulomb
100
+ noncomputable def meridianMap (p : ℝ × ℝ) : ℝ × ℝ := (Real.sqrt (p.1^2-p.2^2), p.2)
101
+ def meridianDomain : Set (ℝ × ℝ) := {p | |p.2| < p.1}
102
+ lemma meridianDomain_measurable : MeasurableSet meridianDomain :=
103
+ measurableSet_lt (measurable_snd.abs) measurable_fst
104
+ lemma meridian_radicand_pos {p : ℝ × ℝ} (hp : p ∈ meridianDomain) : 0 < p.1^2-p.2^2 := by
105
+ change |p.2| < p.1 at hp
106
+ have h0 := abs_nonneg p.2
107
+ nlinarith [sq_abs p.2]
108
+ noncomputable def meridianDeriv (p : ℝ × ℝ) : (ℝ × ℝ) →L[ℝ] (ℝ × ℝ) :=
109
+ (Matrix.toLin (.finTwoProd ℝ) (.finTwoProd ℝ)
110
+ !![p.1 / Real.sqrt (p.1^2-p.2^2), -p.2 / Real.sqrt (p.1^2-p.2^2); 0, 1]).toContinuousLinearMap
111
+ lemma meridian_hasFDeriv {p : ℝ × ℝ} (hp : p ∈ meridianDomain) :
112
+ HasFDerivAt meridianMap (meridianDeriv p) p := by
113
+ have hf : HasFDerivAt (fun q : ℝ × ℝ => q.1) (ContinuousLinearMap.fst ℝ ℝ ℝ) p := hasFDerivAt_fst
114
+ have hg : HasFDerivAt (fun q : ℝ × ℝ => q.2) (ContinuousLinearMap.snd ℝ ℝ ℝ) p := hasFDerivAt_snd
115
+ have hh := (Real.hasDerivAt_sqrt (meridian_radicand_pos hp).ne').comp_hasFDerivAt p
116
+ ((hf.pow 2).sub (hg.pow 2))
117
+ have h := hh.prodMk (hasFDerivAt_snd (𝕜:=ℝ) (E:=ℝ) (F:=ℝ))
118
+ unfold meridianDeriv
119
+ rw [Matrix.toLin_finTwoProd_toContinuousLinearMap]
120
+ apply h.congr_fderiv
121
+ ext <;> simp [div_eq_mul_inv] <;> ring
122
+ lemma meridian_det (p : ℝ × ℝ) : (meridianDeriv p).det = p.1 / Real.sqrt (p.1^2-p.2^2) := by
123
+ simp [meridianDeriv, LinearMap.det_toContinuousLinearMap, LinearMap.det_toLin,
124
+ Matrix.det_fin_two_of]
125
+ lemma meridianMap_injOn : InjOn meridianMap meridianDomain := by
126
+ intro p hp q hq he
127
+ have h1 : Real.sqrt (p.1^2-p.2^2) = Real.sqrt (q.1^2-q.2^2) := congrArg Prod.fst he
128
+ have h2 : p.2 = q.2 := by simpa [meridianMap] using congrArg Prod.snd he
129
+ have hp0 := meridian_radicand_pos hp
130
+ have hq0 := meridian_radicand_pos hq
131
+ rw [Real.sqrt_inj hp0.le hq0.le] at h1
132
+ have hpp : 0 < p.1 := (abs_nonneg p.2).trans_lt hp
133
+ have hqq : 0 < q.1 := (abs_nonneg q.2).trans_lt hq
134
+ apply Prod.ext _ h2
135
+ rw [h2] at h1
136
+ nlinarith
137
+ lemma meridian_image : meridianMap '' meridianDomain = Ioi (0:ℝ) ×ˢ (univ : Set ℝ) := by
138
+ ext q
139
+ constructor
140
+ · rintro ⟨p, hp, rfl⟩
141
+ exact ⟨Real.sqrt_pos.mpr (meridian_radicand_pos hp), mem_univ _⟩
142
+ · rintro ⟨hq, _⟩
143
+ change 0 < q.1 at hq
144
+ refine ⟨(Real.sqrt (q.1^2+q.2^2), q.2), ?_, ?_⟩
145
+ · change |q.2| < Real.sqrt (q.1^2+q.2^2)
146
+ rw [Real.lt_sqrt (abs_nonneg _)]
147
+ nlinarith [sq_abs q.2, sq_pos_of_pos hq]
148
+ · apply Prod.ext
149
+ · dsimp [meridianMap]
150
+ rw [Real.sq_sqrt (by positivity), add_sub_cancel_right, Real.sqrt_sq hq.le]
151
+ · rfl
152
+
153
+ lemma meridian_lintegral (f : ℝ × ℝ → ℝ≥0∞) :
154
+ (∫⁻ q in Ioi (0:ℝ) ×ˢ (univ : Set ℝ), ENNReal.ofReal q.1 * f q) =
155
+ ∫⁻ p in meridianDomain, ENNReal.ofReal p.1 * f (meridianMap p) := by
156
+ rw [← meridian_image, lintegral_image_eq_lintegral_abs_det_fderiv_mul volume
157
+ meridianDomain_measurable (fun p hp => (meridian_hasFDeriv hp).hasFDerivWithinAt) meridianMap_injOn]
158
+ apply setLIntegral_congr_fun meridianDomain_measurable
159
+ intro p hp
160
+ have hr := meridian_radicand_pos hp
161
+ have hs := Real.sqrt_pos.mpr hr
162
+ have hp0 : 0 < p.1 := (abs_nonneg p.2).trans_lt hp
163
+ dsimp only
164
+ rw [meridian_det, abs_of_pos (div_pos hp0 hs)]
165
+ change ENNReal.ofReal (p.1 / Real.sqrt (p.1^2-p.2^2)) *
166
+ (ENNReal.ofReal (Real.sqrt (p.1^2-p.2^2)) * f _) = _
167
+ rw [← mul_assoc, ← ENNReal.ofReal_mul (div_pos hp0 hs).le, div_mul_cancel₀ _ hs.ne']
168
+
169
+ lemma plane_radial_lintegral (F : ℝ → ℝ≥0∞) (hF : Measurable F) :
170
+ (∫⁻ q : ℝ × ℝ, F (Real.sqrt (q.1^2+q.2^2))) =
171
+ ENNReal.ofReal (2*Real.pi) * ∫⁻ r in Ioi (0:ℝ), ENNReal.ofReal r * F r := by
172
+ rw [← lintegral_comp_polarCoord_symm]
173
+ have hpoint (p : ℝ × ℝ) (hp : p ∈ polarCoord.target) :
174
+ Real.sqrt ((polarCoord.symm p).1^2+(polarCoord.symm p).2^2) = p.1 := by
175
+ have hr : 0 < p.1 := hp.1
176
+ dsimp [polarCoord]
177
+ rw [show (p.1 * Real.cos p.2)^2 + (p.1 * Real.sin p.2)^2 = p.1^2 from by
178
+ nlinarith [Real.sin_sq_add_cos_sq p.2]]
179
+ exact Real.sqrt_sq hr.le
180
+ calc
181
+ _ = ∫⁻ p in polarCoord.target, ENNReal.ofReal p.1 * F p.1 := by
182
+ apply setLIntegral_congr_fun polarCoord.open_target.measurableSet
183
+ intro p hp
184
+ simp only [smul_eq_mul, hpoint p hp]
185
+ _ = _ := by
186
+ change (∫⁻ p : ℝ × ℝ in Ioi (0:ℝ) ×ˢ Ioo (-Real.pi) Real.pi,
187
+ ENNReal.ofReal p.1 * F p.1) = _
188
+ rw [Measure.volume_eq_prod, ← Measure.prod_restrict, lintegral_prod]
189
+ · simp only [lintegral_const, Measure.restrict_apply_univ, Real.volume_Ioo, sub_neg_eq_add]
190
+ rw [show Real.pi + Real.pi = 2*Real.pi by ring, lintegral_mul_const]
191
+ · exact mul_comm _ _
192
+ · exact measurable_id.ennreal_ofReal.mul hF
193
+ · exact ((measurable_fst.ennreal_ofReal).mul (hF.comp measurable_fst)).aemeasurable
194
+
195
+ lemma axisymmetric_lintegral (F : ℝ × ℝ → ℝ≥0∞) (hF : Measurable F) :
196
+ (∫⁻ z : ℝ, ∫⁻ q : ℝ × ℝ, F (Real.sqrt (z^2+q.1^2+q.2^2), z)) =
197
+ ENNReal.ofReal (2*Real.pi) *
198
+ ∫⁻ p in meridianDomain, ENNReal.ofReal p.1 * F p := by
199
+ have hp (z : ℝ) := plane_radial_lintegral
200
+ (fun r => F (Real.sqrt (z^2+r^2), z))
201
+ (hF.comp (((measurable_const.add (measurable_id.pow_const 2)).sqrt).prodMk measurable_const))
202
+ have he (z : ℝ) : (∫⁻ q : ℝ × ℝ, F (Real.sqrt (z^2+q.1^2+q.2^2), z)) =
203
+ ENNReal.ofReal (2*Real.pi) *
204
+ ∫⁻ r in Ioi (0:ℝ), ENNReal.ofReal r * F (Real.sqrt (r^2+z^2), z) := by
205
+ convert hp z using 1
206
+ · apply lintegral_congr
207
+ intro q
208
+ rw [Real.sq_sqrt (by positivity)]
209
+ congr 3
210
+ ring
211
+ · congr 1
212
+ apply lintegral_congr
213
+ intro r
214
+ rw [add_comm (z^2) (r^2)]
215
+ simp_rw [he]
216
+ rw [lintegral_const_mul _ (by fun_prop)]
217
+ congr 1
218
+ have hm : Measurable (fun p : ℝ × ℝ => ENNReal.ofReal p.1 * F (Real.sqrt (p.1^2+p.2^2), p.2)) := by
219
+ exact measurable_fst.ennreal_ofReal.mul
220
+ (hF.comp (((measurable_fst.pow_const 2).add (measurable_snd.pow_const 2)).sqrt.prodMk measurable_snd))
221
+ rw [← lintegral_lintegral_swap hm.aemeasurable]
222
+ rw [← lintegral_prod _ hm.aemeasurable]
223
+ rw [show (volume.restrict (Ioi (0:ℝ))).prod volume =
224
+ (volume : Measure (ℝ × ℝ)).restrict (Ioi (0:ℝ) ×ˢ univ) from by
225
+ rw [Measure.volume_eq_prod, ← Measure.prod_restrict, Measure.restrict_univ]]
226
+ rw [meridian_lintegral]
227
+ apply setLIntegral_congr_fun meridianDomain_measurable
228
+ intro p hp
229
+ dsimp [meridianMap]
230
+ rw [Real.sq_sqrt (meridian_radicand_pos hp).le, sub_add_cancel,
231
+ Real.sqrt_sq ((abs_nonneg p.2).trans_lt hp).le]
232
+
233
+ lemma meridian_lintegral_iterated (F : ℝ × ℝ → ℝ≥0∞) (hF : Measurable F) :
234
+ (∫⁻ p in meridianDomain, ENNReal.ofReal p.1 * F p) =
235
+ ∫⁻ s in Ioi (0:ℝ), ∫⁻ z in Ioo (-s) s, ENNReal.ofReal s * F (s,z) := by
236
+ have hm : Measurable (meridianDomain.indicator (fun p : ℝ × ℝ => ENNReal.ofReal p.1 * F p)) :=
237
+ (measurable_fst.ennreal_ofReal.mul hF).indicator meridianDomain_measurable
238
+ rw [← lintegral_indicator meridianDomain_measurable, Measure.volume_eq_prod,
239
+ lintegral_prod _ hm.aemeasurable, ← lintegral_indicator measurableSet_Ioi]
240
+ apply lintegral_congr
241
+ intro s
242
+ by_cases hs : 0 < s
243
+ · rw [Set.indicator_of_mem (show s ∈ Ioi (0:ℝ) from hs), ← lintegral_indicator measurableSet_Ioo]
244
+ apply lintegral_congr
245
+ intro z
246
+ have he : (s,z) ∈ meridianDomain ↔ z ∈ Ioo (-s) s := by
247
+ change |z| < s ↔ -s < z ∧ z < s
248
+ exact abs_lt
249
+ by_cases hz : z ∈ Ioo (-s) s <;> simp [Set.indicator, he, hz]
250
+ · rw [Set.indicator_of_notMem (show s ∉ Ioi (0:ℝ) from hs)]
251
+ simp [Set.indicator, ENNReal.ofReal_eq_zero.mpr (le_of_not_gt hs)]
252
+
253
+ noncomputable def tripleSpaceEquiv : (ℝ × (ℝ × ℝ)) ≃ᵐ Space :=
254
+ ((MeasurableEquiv.refl ℝ).prodCongr (MeasurableEquiv.piFinTwo (fun _ => ℝ)).symm).trans
255
+ (((MeasurableEquiv.piFinSuccAbove (fun _ : Fin 3 => ℝ) 0).symm).trans
256
+ (MeasurableEquiv.toLp 2 (Fin 3 → ℝ)))
257
+ lemma tripleSpaceEquiv_apply (p : ℝ × (ℝ × ℝ)) :
258
+ tripleSpaceEquiv p = WithLp.toLp 2 ![p.1,p.2.1,p.2.2] := by
259
+ ext i
260
+ fin_cases i <;> rfl
261
+ lemma tripleSpaceEquiv_preserving : MeasurePreserving tripleSpaceEquiv volume volume := by
262
+ have h1 := (MeasurePreserving.id (volume : Measure ℝ)).prod
263
+ ((volume_preserving_piFinTwo (fun _ => ℝ)).symm _)
264
+ have h2 := (volume_preserving_piFinSuccAbove (fun _ : Fin 3 => ℝ) 0).symm _
265
+ have h3 := (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp (Fin 3)).symm _
266
+ exact h3.comp (h2.comp h1)
267
+ lemma norm_tripleSpaceEquiv (p : ℝ × (ℝ × ℝ)) :
268
+ ‖tripleSpaceEquiv p‖ = Real.sqrt (p.1^2 + p.2.1^2+p.2.2^2) := by
269
+ rw [tripleSpaceEquiv_apply, EuclideanSpace.norm_eq]
270
+ simp [Fin.sum_univ_succ, Real.norm_eq_abs, sq_abs, add_assoc]
271
+ lemma axisymmetric_space_lintegral (F : ℝ × ℝ → ℝ≥0∞) (hF : Measurable F) :
272
+ (∫⁻ x : Space, F (‖x‖, x 0)) = ENNReal.ofReal (2*Real.pi) *
273
+ ∫⁻ p in meridianDomain, ENNReal.ofReal p.1 * F p := by
274
+ rw [← tripleSpaceEquiv_preserving.lintegral_comp_emb tripleSpaceEquiv.measurableEmbedding,
275
+ Measure.volume_eq_prod, lintegral_prod]
276
+ · simp only [norm_tripleSpaceEquiv]
277
+ have he (p : ℝ × (ℝ × ℝ)) : tripleSpaceEquiv p 0 = p.1 := by
278
+ rw [tripleSpaceEquiv_apply]; rfl
279
+ simp_rw [he]
280
+ exact axisymmetric_lintegral F hF
281
+ · have hm : Measurable (fun x : Space => F (‖x‖, x 0)) :=
282
+ hF.comp (measurable_norm.prodMk (PiLp.continuous_apply 2 (fun _ : Fin 3 => ℝ) 0).measurable)
283
+ exact (hm.comp tripleSpaceEquiv.measurable).aemeasurable
284
+
285
+ lemma angular_coulomb_integral {r s : ℝ} (hr : 0 < r) (hs : 0 < s) :
286
+ (1/2:ℝ) * (∫ u in (-1:ℝ)..1, (r^2+s^2-2*r*s*u)^(-(1/2):ℝ)) = (max r s)⁻¹ := by
287
+ have H := intervalIntegral.mul_integral_comp_sub_mul (f := fun x : ℝ => x^(-(1/2):ℝ))
288
+ (a := -1) (b := 1) (2*r*s) (r^2+s^2)
289
+ have h1 : r^2+s^2-(2*r*s)*1 = (r-s)^2 := by ring
290
+ have h2 : r^2+s^2-(2*r*s)*(-1) = (r+s)^2 := by ring
291
+ rw [h1, h2, integral_rpow (Or.inl (by norm_num : (-1:ℝ) < -(1/2)))] at H
292
+ norm_num only [show (-(1/2):ℝ)+1 = 1/2 by norm_num] at H
293
+ simp_rw [← Real.sqrt_eq_rpow, Real.sqrt_sq_eq_abs] at H
294
+ rw [abs_of_pos (add_pos hr hs)] at H
295
+ rcases le_total r s with h | h
296
+ · rw [max_eq_right h, abs_of_nonpos (sub_nonpos.mpr h)] at *
297
+ field_simp
298
+ nlinarith
299
+ · rw [max_eq_left h, abs_of_nonneg (sub_nonneg.mpr h)] at *
300
+ field_simp
301
+ nlinarith
302
+
303
+ lemma affine_halfpower_intervalIntegrable (d c a b : ℝ) (hc : c ≠ 0) :
304
+ IntervalIntegrable (fun z => (d-c*z)^(-(1/2):ℝ)) volume a b := by
305
+ have H := ((intervalIntegral.intervalIntegrable_rpow'
306
+ (a:=d-c*a) (b:=d-c*b) (by norm_num : (-1:ℝ) < -(1/2))).comp_sub_left d).comp_mul_left (c:=c)
307
+ convert H using 1 <;> field_simp <;> ring
308
+
309
+ lemma meridian_coulomb_integral {r s : ℝ} (hr : 0 < r) (hs : 0 < s) :
310
+ (∫ z in (-s)..s, (r^2+s^2-2*r*z)^(-(1/2):ℝ)) = 2*s*(max r s)⁻¹ := by
311
+ have H := intervalIntegral.integral_comp_mul_left (a:=(-1:ℝ)) (b:=1)
312
+ (c:=s) (fun z => (r^2+s^2-2*r*z)^(-(1/2):ℝ)) hs.ne'
313
+ have he (u : ℝ) : r^2+s^2-2*r*(s*u) = r^2+s^2-2*r*s*u := by ring
314
+ simp_rw [he] at H
315
+ simp only [mul_neg_one, mul_one, smul_eq_mul] at H
316
+ have A := angular_coulomb_integral hr hs
317
+ rw [H] at A
318
+ have hsi : s*s⁻¹ = 1 := mul_inv_cancel₀ hs.ne'
319
+ calc
320
+ _ = s * (s⁻¹ * ∫ z in (-s)..s, (r^2+s^2-2*r*z)^(-(1/2):ℝ)) := by rw [← mul_assoc, hsi, one_mul]
321
+ _ = _ := by nlinarith
322
+
323
+ lemma meridian_coulomb_lintegral {r s : ℝ} (hr : 0 < r) (hs : 0 < s) :
324
+ (∫⁻ z in Ioo (-s) s, ENNReal.ofReal ((r^2+s^2-2*r*z)^(-(1/2):ℝ))) =
325
+ ENNReal.ofReal (2*s*(max r s)⁻¹) := by
326
+ have hab : -s ≤ s := by linarith
327
+ have hi := (intervalIntegrable_iff_integrableOn_Ioo_of_le hab).mp
328
+ (affine_halfpower_intervalIntegrable (r^2+s^2) (2*r) (-s) s (by positivity))
329
+ rw [← ofReal_integral_eq_lintegral_ofReal hi]
330
+ · rw [setIntegral_congr_set Ioo_ae_eq_Ioc, ← intervalIntegral.integral_of_le hab,
331
+ meridian_coulomb_integral hr hs]
332
+ · filter_upwards [ae_restrict_mem measurableSet_Ioo] with z hz
333
+ exact Real.rpow_nonneg (by nlinarith [sq_nonneg (r-s), hz.2]) _
334
+
335
+ lemma norm_axis_sub_rpow (r : ℝ) (x : Space) :
336
+ ‖EuclideanSpace.single 0 r - x‖⁻¹ =
337
+ (r^2+‖x‖^2-2*r*x 0)^(-(1/2):ℝ) := by
338
+ have he : ‖EuclideanSpace.single 0 r - x‖^2 = r^2+‖x‖^2-2*r*x 0 := by
339
+ rw [norm_sub_sq_real]
340
+ simp [EuclideanSpace.inner_single_left, Real.norm_eq_abs, sq_abs]
341
+ ring
342
+ rw [← he, Real.rpow_neg (sq_nonneg _) (1/2:ℝ), ← Real.sqrt_eq_rpow,
343
+ Real.sqrt_sq (norm_nonneg _)]
344
+
345
+ lemma radial_axis_coulomb_lintegral (F : ℝ → ℝ≥0∞) (hF : Measurable F)
346
+ {r : ℝ} (hr : 0 < r) :
347
+ (∫⁻ x : Space, ENNReal.ofReal ‖EuclideanSpace.single 0 r-x‖⁻¹ * F ‖x‖) =
348
+ ENNReal.ofReal (4*Real.pi) *
349
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (s^2*(max r s)⁻¹) * F s := by
350
+ simp_rw [norm_axis_sub_rpow]
351
+ have hm : Measurable (fun p : ℝ × ℝ =>
352
+ ENNReal.ofReal ((r^2+p.1^2-2*r*p.2)^(-(1/2):ℝ)) * F p.1) := by fun_prop
353
+ rw [axisymmetric_space_lintegral _ hm, meridian_lintegral_iterated _ hm]
354
+ have he (s : ℝ) (hs : s ∈ Ioi (0:ℝ)) :
355
+ (∫⁻ z in Ioo (-s) s, ENNReal.ofReal s *
356
+ (ENNReal.ofReal ((r^2+s^2-2*r*z)^(-(1/2):ℝ)) * F s)) =
357
+ ENNReal.ofReal 2 * (ENNReal.ofReal (s^2*(max r s)⁻¹) * F s) := by
358
+ change 0 < s at hs
359
+ rw [lintegral_const_mul _ (by fun_prop), lintegral_mul_const _ (by fun_prop),
360
+ meridian_coulomb_lintegral hr hs]
361
+ calc
362
+ _ = ENNReal.ofReal (s*(2*s*(max r s)⁻¹))*F s := by
363
+ rw [← mul_assoc, ← ENNReal.ofReal_mul hs.le]
364
+ _ = ENNReal.ofReal (2*(s^2*(max r s)⁻¹))*F s := by congr 2; ring
365
+ _ = _ := by rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ) ≤ 2), mul_assoc]
366
+ rw [setLIntegral_congr_fun measurableSet_Ioi he, lintegral_const_mul _ (by fun_prop),
367
+ ← mul_assoc, ← ENNReal.ofReal_mul (by positivity)]
368
+ congr 2
369
+ ring
370
+
371
+ lemma radial_space_lintegral (F : ℝ → ℝ≥0∞) (hF : Measurable F) :
372
+ (∫⁻ x : Space, F ‖x‖) = ENNReal.ofReal (4*Real.pi) *
373
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (s^2) * F s := by
374
+ have hm : Measurable (fun p : ℝ × ℝ => F p.1) := hF.comp measurable_fst
375
+ rw [axisymmetric_space_lintegral _ hm, meridian_lintegral_iterated _ hm]
376
+ have he (s : ℝ) (hs : s ∈ Ioi (0:ℝ)) :
377
+ (∫⁻ z in Ioo (-s) s, ENNReal.ofReal s * F s) =
378
+ ENNReal.ofReal 2 * (ENNReal.ofReal (s^2) * F s) := by
379
+ change 0 < s at hs
380
+ simp only [lintegral_const, Measure.restrict_apply_univ, Real.volume_Ioo]
381
+ rw [show s- -s = 2*s by ring, mul_comm (ENNReal.ofReal s * F s),
382
+ ← mul_assoc, ← ENNReal.ofReal_mul (by positivity), ← mul_assoc,
383
+ ← ENNReal.ofReal_mul (by norm_num)]
384
+ congr 2
385
+ ring
386
+ rw [setLIntegral_congr_fun measurableSet_Ioi he, lintegral_const_mul _ (by fun_prop),
387
+ ← mul_assoc, ← ENNReal.ofReal_mul (by positivity)]
388
+ congr 2
389
+ ring
390
+
391
+ lemma radial_coulomb_lintegral (F : ℝ → ℝ≥0∞) (hF : Measurable F)
392
+ {x : Space} (hx : x ≠ 0) :
393
+ (∫⁻ y : Space, ENNReal.ofReal ‖x-y‖⁻¹ * F ‖y‖) =
394
+ ENNReal.ofReal (4*Real.pi) *
395
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (s^2*(max ‖x‖ s)⁻¹) * F s := by
396
+ let v : Space := EuclideanSpace.single 0 ‖x‖
397
+ let E := (ℝ ∙ (v-x))ᗮ.reflection
398
+ have hv : ‖v‖ = ‖x‖ := by simp [v]
399
+ have hE : E v = x := Submodule.reflection_sub hv
400
+ calc
401
+ _ = ∫⁻ y : Space, ENNReal.ofReal ‖x-E y‖⁻¹ * F ‖E y‖ :=
402
+ (E.measurePreserving.lintegral_comp_emb E.toHomeomorph.measurableEmbedding _).symm
403
+ _ = ∫⁻ y : Space, ENNReal.ofReal ‖v-y‖⁻¹ * F ‖y‖ := by
404
+ apply lintegral_congr
405
+ intro y
406
+ rw [← hE, ← E.map_sub, E.norm_map, E.norm_map]
407
+ _ = _ := radial_axis_coulomb_lintegral F hF (norm_pos_iff.mpr hx)
408
+
409
+ lemma radial_coulomb_lintegral_le (F : ℝ → ℝ≥0∞) (hF : Measurable F)
410
+ {x : Space} (hx : x ≠ 0) :
411
+ (∫⁻ y : Space, ENNReal.ofReal ‖x-y‖⁻¹ * F ‖y‖) ≤
412
+ ENNReal.ofReal ‖x‖⁻¹ * ∫⁻ y : Space, F ‖y‖ := by
413
+ calc
414
+ _ = ENNReal.ofReal (4*Real.pi) *
415
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (s^2*(max ‖x‖ s)⁻¹) * F s :=
416
+ radial_coulomb_lintegral F hF hx
417
+ _ ≤ ENNReal.ofReal (4*Real.pi) *
418
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (‖x‖⁻¹*s^2) * F s := by
419
+ apply mul_le_mul_right
420
+ apply setLIntegral_mono' measurableSet_Ioi
421
+ intro s _
422
+ apply mul_le_mul_left
423
+ apply ENNReal.ofReal_le_ofReal
424
+ nlinarith [mul_le_mul_of_nonneg_left
425
+ (inv_anti₀ (norm_pos_iff.mpr hx) (le_max_left ‖x‖ s)) (sq_nonneg s)]
426
+ _ = _ := by
427
+ rw [radial_space_lintegral F hF]
428
+ simp_rw [ENNReal.ofReal_mul (inv_nonneg.mpr (norm_nonneg x)), mul_assoc]
429
+ rw [lintegral_const_mul _ (by fun_prop)]
430
+ ac_rfl
431
+
432
+ lemma radial_coulomb_lintegral_eq (F : ℝ → ℝ≥0∞) (hF : Measurable F)
433
+ {R : ℝ} (hFR : ∀ s, R < s → F s = 0)
434
+ {x : Space} (hx : x ≠ 0) (hRx : R ≤ ‖x‖) :
435
+ (∫⁻ y : Space, ENNReal.ofReal ‖x-y‖⁻¹ * F ‖y‖) =
436
+ ENNReal.ofReal ‖x‖⁻¹ * ∫⁻ y : Space, F ‖y‖ := by
437
+ calc
438
+ _ = ENNReal.ofReal (4*Real.pi) *
439
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (s^2*(max ‖x‖ s)⁻¹) * F s :=
440
+ radial_coulomb_lintegral F hF hx
441
+ _ = ENNReal.ofReal (4*Real.pi) *
442
+ ∫⁻ s in Ioi (0:ℝ), ENNReal.ofReal (‖x‖⁻¹*s^2) * F s := by
443
+ congr 1
444
+ apply setLIntegral_congr_fun measurableSet_Ioi
445
+ intro s _
446
+ dsimp only
447
+ by_cases hs : R < s
448
+ · simp [hFR s hs]
449
+ · rw [max_eq_left ((le_of_not_gt hs).trans hRx), mul_comm (s^2)]
450
+ _ = _ := by
451
+ rw [radial_space_lintegral F hF]
452
+ simp_rw [ENNReal.ofReal_mul (inv_nonneg.mpr (norm_nonneg x)), mul_assoc]
453
+ rw [lintegral_const_mul _ (by fun_prop)]
454
+ ac_rfl
455
+
456
+ lemma space_axis_continuous : Continuous (fun s : ℝ => (EuclideanSpace.single (0 : Fin 3) s : Space)) := by
457
+ apply (PiLp.continuous_toLp 2 (fun _ : Fin 3 => ℝ)).comp
458
+ apply continuous_pi
459
+ intro i
460
+ simp only [Pi.single_apply]
461
+ split <;> fun_prop
462
+
463
+ lemma radial_coulomb_integral_le {f : Space → ℝ} (hf : Integrable f)
464
+ (hm : Measurable f) (hf0 : ∀ y, 0 ≤ f y) {M : ℝ} (hfM : ∀ y, f y ≤ M)
465
+ (hrad : ∀ y, f y = f (EuclideanSpace.single 0 ‖y‖))
466
+ {x : Space} (hx : x ≠ 0) :
467
+ (∫ y, coulombKernel (x-y) * f y) ≤ coulombKernel x * ∫ y, f y := by
468
+ let F : ℝ → ℝ≥0∞ := fun s => ENNReal.ofReal (f (EuclideanSpace.single 0 s))
469
+ have hmF : Measurable F := (hm.comp space_axis_continuous.measurable).ennreal_ofReal
470
+ have he (y : Space) : F ‖y‖ = ENNReal.ofReal (f y) := congrArg ENNReal.ofReal (hrad y).symm
471
+ have H := radial_coulomb_lintegral_le F hmF hx
472
+ simp_rw [he] at H
473
+ have hi := coulomb_convolution_integrable hf hm hf0 hfM (by norm_num : (0:ℝ) < 1) x
474
+ have hp (y : Space) : 0 ≤ coulombKernel (x-y)*f y := mul_nonneg (coulombKernel_nonneg _) (hf0 _)
475
+ have hI := ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall hp)
476
+ have hmass := ofReal_integral_eq_lintegral_ofReal hf (Filter.Eventually.of_forall hf0)
477
+ simp_rw [ENNReal.ofReal_mul (coulombKernel_nonneg _)] at hI
478
+ change ENNReal.ofReal (∫ y, coulombKernel (x-y)*f y) =
479
+ ∫⁻ y, ENNReal.ofReal ‖x-y‖⁻¹*ENNReal.ofReal (f y) at hI
480
+ rw [← hI, ← hmass, ← ENNReal.ofReal_mul (inv_nonneg.mpr (norm_nonneg _))] at H
481
+ exact (ENNReal.ofReal_le_ofReal_iff (mul_nonneg (coulombKernel_nonneg x) (integral_nonneg hf0))).mp H
482
+
483
+ lemma radial_coulomb_integral_eq {f : Space → ℝ} (hf : Integrable f)
484
+ (hm : Measurable f) (hf0 : ∀ y, 0 ≤ f y) {M : ℝ} (hfM : ∀ y, f y ≤ M)
485
+ (hrad : ∀ y, f y = f (EuclideanSpace.single 0 ‖y‖))
486
+ {R : ℝ} (hR : 0 ≤ R) (hfs : ∀ y, R < ‖y‖ → f y = 0)
487
+ {x : Space} (hx : x ≠ 0) (hRx : R ≤ ‖x‖) :
488
+ (∫ y, coulombKernel (x-y) * f y) = coulombKernel x * ∫ y, f y := by
489
+ let F : ℝ → ℝ≥0∞ := fun s => ENNReal.ofReal (f (EuclideanSpace.single 0 s))
490
+ have hmF : Measurable F := (hm.comp space_axis_continuous.measurable).ennreal_ofReal
491
+ have he (y : Space) : F ‖y‖ = ENNReal.ofReal (f y) := congrArg ENNReal.ofReal (hrad y).symm
492
+ have hs : ∀ s, R < s → F s = 0 := by
493
+ intro s hs
494
+ have hsp : 0 < s := hR.trans_lt hs
495
+ have h := hfs (EuclideanSpace.single 0 s) (by simpa [Real.norm_eq_abs, abs_of_pos hsp] using hs)
496
+ simp only [F, h, ENNReal.ofReal_zero]
497
+ have H := radial_coulomb_lintegral_eq F hmF hs hx hRx
498
+ simp_rw [he] at H
499
+ have hi := coulomb_convolution_integrable hf hm hf0 hfM (by norm_num : (0:ℝ) < 1) x
500
+ have hp (y : Space) : 0 ≤ coulombKernel (x-y)*f y := mul_nonneg (coulombKernel_nonneg _) (hf0 _)
501
+ have hI := ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall hp)
502
+ have hmass := ofReal_integral_eq_lintegral_ofReal hf (Filter.Eventually.of_forall hf0)
503
+ simp_rw [ENNReal.ofReal_mul (coulombKernel_nonneg _)] at hI
504
+ change ENNReal.ofReal (∫ y, coulombKernel (x-y)*f y) =
505
+ ∫⁻ y, ENNReal.ofReal ‖x-y‖⁻¹*ENNReal.ofReal (f y) at hI
506
+ rw [← hI, ← hmass, ← ENNReal.ofReal_mul (inv_nonneg.mpr (norm_nonneg _))] at H
507
+ change ENNReal.ofReal (∫ y, coulombKernel (x-y)*f y) =
508
+ ENNReal.ofReal (coulombKernel x * ∫ y, f y) at H
509
+ have H' := congrArg ENNReal.toReal H
510
+ simpa only [ENNReal.toReal_ofReal (integral_nonneg hp),
511
+ ENNReal.toReal_ofReal (mul_nonneg (coulombKernel_nonneg x) (integral_nonneg hf0))] using H'
512
+
513
+ end Coulomb
514
+
515
+ open MeasureTheory Set Filter
516
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
517
+
518
+ end
519
+
520
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/MinimizerMidpointControl.lean ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ section
7
+ open MeasureTheory Set Filter
8
+ open scoped ENNReal NNReal BigOperators Classical Topology
9
+ open MeasureTheory Set Filter
10
+ open scoped ENNReal NNReal BigOperators Classical Topology
11
+ open MeasureTheory Set Filter
12
+ open scoped ENNReal NNReal BigOperators Classical Topology
13
+ open MeasureTheory Set Filter
14
+ open scoped ENNReal NNReal BigOperators Classical Topology
15
+ open MeasureTheory Set Filter
16
+ open scoped ENNReal NNReal BigOperators Classical Topology
17
+ open MeasureTheory Set Filter
18
+ open scoped ENNReal NNReal BigOperators Classical Topology
19
+ open MeasureTheory Set Filter
20
+ open scoped ENNReal NNReal BigOperators Classical Topology
21
+ open MeasureTheory Set Filter
22
+ open scoped ENNReal NNReal BigOperators Classical Topology
23
+ open MeasureTheory Set Filter
24
+ open scoped ENNReal NNReal BigOperators Classical Topology
25
+ namespace Coulomb
26
+ lemma exists_minimizer_of_midpoint_control {E : Type*} [NormedAddCommGroup E]
27
+ [NormedSpace ℝ E] [CompleteSpace E] {S : Set E} (hS : IsClosed S) (hne : S.Nonempty)
28
+ (hm : ∀ f ∈ S, ∀ g ∈ S, (1/2:ℝ) • (f+g) ∈ S)
29
+ {J : E → ℝ} (hJ : Continuous J) (hb : BddBelow (J '' S))
30
+ (hconv : ∀ f ∈ S, ∀ g ∈ S, J ((1/2:ℝ) • (f+g)) ≤ (J f+J g)/2)
31
+ (hR : ∀ a : ℝ, ∃ R : ℝ, 0 < R ∧ ∀ f ∈ S, J f ≤ a → ‖f‖ ≤ R)
32
+ (hgap : ∀ R : ℝ, 0 < R → ∃ C : ℝ, 0 < C ∧
33
+ ∀ f ∈ S, ∀ g ∈ S, ‖f‖ ≤ R → ‖g‖ ≤ R →
34
+ ‖f-g‖^(5/3:ℝ) ≤ C * ((J f+J g)/2 - J ((1/2:ℝ) • (f+g)))^(5/6:ℝ)) :
35
+ ∃ f ∈ S, ∀ g ∈ S, J f ≤ J g := by
36
+ let I := sInf (J '' S)
37
+ obtain ⟨u, hu, hulim, huS⟩ := exists_seq_tendsto_sInf (hne.image J) hb
38
+ choose f hfS hfu using huS
39
+ obtain ⟨R,hR0,hRb⟩ := hR (u 0)
40
+ have hfR (n : ℕ) : ‖f n‖ ≤ R := hRb _ (hfS n) (by rw [hfu]; exact hu (Nat.zero_le n))
41
+ obtain ⟨C,hC,hCb⟩ := hgap R hR0
42
+ have hlow {g : E} (hg : g ∈ S) : I ≤ J g := csInf_le hb ⟨g,hg,rfl⟩
43
+ have huI (n : ℕ) : 0 ≤ u n-I := by have := hlow (hfS n); rw [hfu] at this; linarith
44
+ have hwlim : Tendsto (fun n => C*(u n-I)^(5/6:ℝ)) atTop (𝓝 0) := by
45
+ have hl : Tendsto (fun n => u n-I) atTop (𝓝 (0:ℝ)) := by
46
+ simpa only [I,sub_self] using hulim.sub_const I
47
+ have hlr := hl.rpow_const (p := (5/6:ℝ)) (Or.inr (by norm_num))
48
+ simpa using hlr.const_mul C
49
+ have hcauchy : CauchySeq f := by
50
+ rw [Metric.cauchySeq_iff]
51
+ intro ε hε
52
+ have hεp : 0 < ε^(5/3:ℝ) := Real.rpow_pos_of_pos hε _
53
+ obtain ⟨N,hN⟩ := eventually_atTop.mp (hwlim.eventually (gt_mem_nhds hεp))
54
+ refine ⟨N,fun m hm' n hn' => ?_⟩
55
+ have hmid := hlow (hm _ (hfS m) _ (hfS n))
56
+ have hg0 : 0 ≤ (J (f m)+J (f n))/2-J ((1/2:ℝ) • (f m+f n)) := by
57
+ exact sub_nonneg.mpr (hconv _ (hfS m) _ (hfS n))
58
+ have hgup : (J (f m)+J (f n))/2-J ((1/2:ℝ) • (f m+f n)) ≤ u N-I := by
59
+ have hum := hu hm'
60
+ have hun := hu hn'
61
+ rw [← hfu m] at hum
62
+ rw [← hfu n] at hun
63
+ linarith
64
+ have H := (hCb _ (hfS m) _ (hfS n) (hfR m) (hfR n)).trans
65
+ (mul_le_mul_of_nonneg_left (Real.rpow_le_rpow hg0 hgup (by norm_num : (0:ℝ)≤5/6)) hC.le)
66
+ have Hlt := H.trans_lt (hN N le_rfl)
67
+ have hd : ‖f m-f n‖ < ε := (Real.rpow_lt_rpow_iff (norm_nonneg _) hε.le (by norm_num : (0:ℝ)<5/3)).mp Hlt
68
+ simpa only [dist_eq_norm] using hd
69
+ obtain ⟨g,hg⟩ := cauchySeq_tendsto_of_complete hcauchy
70
+ have hgS : g ∈ S := hS.mem_of_tendsto hg (Eventually.of_forall hfS)
71
+ have hJI : J g = I := by
72
+ apply tendsto_nhds_unique (hJ.continuousAt.tendsto.comp hg)
73
+ simpa only [Function.comp_def,hfu] using hulim
74
+ exact ⟨g,hgS,fun x hx => by rw [hJI]; exact hlow hx⟩
75
+ end Coulomb
76
+
77
+ open MeasureTheory Set Filter
78
+ open scoped ENNReal NNReal BigOperators Classical Topology
79
+
80
+ end
81
+ end
82
+
83
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/ModulatedRealDerivativeNorm.lean ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.Space
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ open MeasureTheory Filter
77
+ open scoped ENNReal NNReal FourierTransform SchwartzMap LineDeriv ComplexConjugate
78
+ open scoped LineDeriv
79
+ namespace Coulomb
80
+ lemma modulated_real_derivative_norm (G : Space → ℝ) (hG : Differentiable ℝ G)
81
+ (y p x a : Space) :
82
+ ‖fderiv ℝ (fun z : Space => Complex.exp ((2*Real.pi*inner ℝ z p : ℝ)*Complex.I) *
83
+ (G (z-y) : ℂ)) x a‖^2 =
84
+ (2*Real.pi*inner ℝ a p)^2 * G (x-y)^2 + (fderiv ℝ G (x-y) a)^2 := by
85
+ have hθ := ((Complex.ofRealCLM.hasFDerivAt.comp x
86
+ (((innerSL ℝ).flip p).hasFDerivAt.const_mul (2*Real.pi)))).mul_const Complex.I
87
+ have hq := Complex.ofRealCLM.hasFDerivAt.comp x
88
+ ((hG (x-y)).hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const y))
89
+ have H := congrArg (fun L : Space →L[ℝ] ℂ => L a) (hθ.cexp.mul hq).fderiv
90
+ have hd : fderiv ℝ (fun z : Space => Complex.exp ((2*Real.pi*inner ℝ z p : ℝ)*Complex.I) *
91
+ (G (z-y) : ℂ)) x a =
92
+ Complex.exp ((2*Real.pi*inner ℝ x p : ℝ)*Complex.I) *
93
+ ((fderiv ℝ G (x-y) a : ℂ) + (2*Real.pi*inner ℝ a p*G (x-y) : ℝ)*Complex.I) := by
94
+ calc
95
+ _ = _ := H
96
+ _ = _ := by
97
+ simp only [add_apply, smul_apply,
98
+ ContinuousLinearMap.comp_apply, Function.comp_apply, id_eq,
99
+ ContinuousLinearMap.id_apply,
100
+ Complex.ofRealCLM_apply, ContinuousLinearMap.flip_apply, innerSL_apply_apply,
101
+ smul_eq_mul, Complex.ofReal_mul, Complex.ofReal_ofNat]
102
+ ring
103
+ rw [hd, norm_mul, Complex.norm_exp]
104
+ simp only [Complex.mul_re, Complex.ofReal_re, Complex.I_im, mul_one,
105
+ Complex.ofReal_im, Complex.I_re, mul_zero, sub_zero, Real.exp_zero, one_mul]
106
+ rw [Complex.sq_norm]
107
+ simp [Complex.normSq_apply]
108
+ ring
109
+ end Coulomb
110
+
111
+ end
112
+
113
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NearCoulombFiveHalves.lean ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Localization.TruncatedCoulomb
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ open MeasureTheory Filter
77
+ open scoped ENNReal NNReal FourierTransform SchwartzMap LineDeriv ComplexConjugate
78
+ open scoped LineDeriv
79
+ open MeasureTheory Set Metric
80
+ open scoped ENNReal NNReal RealInnerProductSpace
81
+ open MeasureTheory Set Metric Filter
82
+ open scoped ENNReal NNReal RealInnerProductSpace Convolution
83
+ open MeasureTheory Set Filter
84
+ open scoped ENNReal NNReal ComplexConjugate
85
+ open MeasureTheory Set Filter
86
+ open scoped ENNReal NNReal ContDiff
87
+ open MeasureTheory Set Filter
88
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal ComplexConjugate Pointwise
89
+ open MeasureTheory Set Filter
90
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
91
+ open MeasureTheory Set Filter
92
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
93
+ open MeasureTheory Set Filter
94
+ open scoped Classical SchwartzMap ENNReal NNReal Pointwise
95
+ open MeasureTheory Set Filter
96
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
97
+ open MeasureTheory Set Filter
98
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
99
+ open MeasureTheory Set Filter
100
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
101
+ open MeasureTheory Set Filter
102
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
103
+ open MeasureTheory Set Filter
104
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
105
+ namespace Coulomb
106
+
107
+ lemma density_memLp_fiveThirds (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (hm : Measurable ρ)
108
+ (ht : Integrable (fun x => ρ x^(5/3:ℝ))) : MemLp ρ (5/3:ℝ≥0∞) := by
109
+ apply (integrable_norm_rpow_iff hm.aestronglyMeasurable (by norm_num : (5/3:ℝ≥0∞) ≠ 0)
110
+ (ENNReal.div_ne_top (by norm_num) (by norm_num) : (5/3:ℝ≥0∞) ≠ ⊤)).mp
111
+ simpa only [ENNReal.toReal_div,ENNReal.toReal_ofNat,Real.norm_of_nonneg (hp _)] using ht
112
+
113
+ lemma compact_density_integrable (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (hm : Measurable ρ)
114
+ (ht : Integrable (fun x => ρ x^(5/3:ℝ))) (K : Set Space) (hK : IsCompact K)
115
+ (hs : ∀ x, x ∉ K → ρ x = 0) : Integrable ρ := by
116
+ let : IsFiniteMeasure (volume.restrict K) := isFiniteMeasure_restrict.mpr hK.measure_lt_top.ne
117
+ have hLp : MemLp ρ (5/3:ℝ≥0∞) (volume.restrict K) :=
118
+ (density_memLp_fiveThirds ρ hp hm ht).mono_measure Measure.restrict_le_self
119
+ have hI := hLp.integrable (by
120
+ rw [ENNReal.le_div_iff_mul_le (Or.inl (by norm_num)) (Or.inl (by norm_num))]
121
+ norm_num : (1:ℝ≥0∞) ≤ 5/3)
122
+ exact IntegrableOn.integrable_of_forall_notMem_eq_zero hI hs
123
+
124
+ noncomputable def nearCoulombFiveHalves (x : Space) : ℝ :=
125
+ (Metric.ball (0:Space) 1).indicator (fun y => coulombKernel y^(5/2:ℝ)) x
126
+
127
+ lemma nearCoulombFiveHalves_integrable : Integrable nearCoulombFiveHalves := by
128
+ apply IntegrableOn.integrable_indicator _ measurableSet_ball
129
+ apply integrableOn_ball_of_norm_le_rpow (C := 1) (α := 5/2) (by simp [Space]) (by norm_num [Space])
130
+ · filter_upwards [] with x
131
+ rw [Real.norm_of_nonneg (Real.rpow_nonneg (coulombKernel_nonneg x) _),one_mul]
132
+ change (‖x‖⁻¹)^(5/2:ℝ) ≤ ‖x‖^(-(5/2:ℝ))
133
+ rw [Real.inv_rpow (norm_nonneg x),Real.rpow_neg (norm_nonneg x)]
134
+ · exact (coulombKernel_measurable.pow_const _).aestronglyMeasurable
135
+
136
+ lemma nearCoulombFiveHalves_nonneg (x : Space) : 0 ≤ nearCoulombFiveHalves x :=
137
+ Set.indicator_nonneg (fun y _ => Real.rpow_nonneg (coulombKernel_nonneg y) _) x
138
+
139
+ lemma density_coulomb_integrand_bound (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (x y : Space) :
140
+ coulombKernel (x-y)*ρ y ≤ nearCoulombFiveHalves (x-y) + ρ y^(5/3:ℝ) + ρ y := by
141
+ by_cases h : x-y ∈ Metric.ball (0:Space) 1
142
+ · rw [nearCoulombFiveHalves,Set.indicator_of_mem h]
143
+ have HY := Real.young_inequality_of_nonneg (coulombKernel_nonneg (x-y)) (hp y)
144
+ (show (5/2:ℝ).HolderConjugate (5/3:ℝ) from ⟨by norm_num,by norm_num,by norm_num⟩)
145
+ have H1 := Real.rpow_nonneg (coulombKernel_nonneg (x-y)) (5/2:ℝ)
146
+ have H2 := Real.rpow_nonneg (hp y) (5/3:ℝ)
147
+ linarith [hp y]
148
+ · rw [nearCoulombFiveHalves,Set.indicator_of_notMem h,zero_add]
149
+ have hn : (1:ℝ) ≤ ‖x-y‖ := by simpa [Metric.mem_ball,dist_zero_right] using h
150
+ have hk : coulombKernel (x-y) ≤ 1 := by simpa [coulombKernel] using inv_anti₀ (by norm_num : (0:ℝ)<1) hn
151
+ have H := mul_le_mul_of_nonneg_right hk (hp y)
152
+ linarith [Real.rpow_nonneg (hp y) (5/3:ℝ)]
153
+
154
+ lemma density_coulomb_integrable (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (hm : Measurable ρ)
155
+ (hi : Integrable ρ) (ht : Integrable (fun x => ρ x^(5/3:ℝ))) (x : Space) :
156
+ Integrable (fun y => coulombKernel (x-y)*ρ y) := by
157
+ apply (((nearCoulombFiveHalves_integrable.comp_sub_left x).add ht).add hi).mono'
158
+ (((coulombKernel_measurable.comp (measurable_const.sub measurable_id)).mul hm).aestronglyMeasurable)
159
+ filter_upwards [] with y
160
+ change ‖coulombKernel (x-y)*ρ y‖ ≤ nearCoulombFiveHalves (x-y) + ρ y^(5/3:ℝ) + ρ y
161
+ rw [Real.norm_of_nonneg (mul_nonneg (coulombKernel_nonneg _) (hp y))]
162
+ exact density_coulomb_integrand_bound ρ hp x y
163
+
164
+ lemma density_coulomb_bound (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (hm : Measurable ρ)
165
+ (hi : Integrable ρ) (ht : Integrable (fun x => ρ x^(5/3:ℝ))) (x : Space) :
166
+ (∫ y, coulombKernel (x-y)*ρ y) ≤
167
+ (∫ y, nearCoulombFiveHalves y) + (∫ y, ρ y^(5/3:ℝ)) + ∫ y, ρ y := by
168
+ calc
169
+ _ ≤ ∫ y, nearCoulombFiveHalves (x-y) + ρ y^(5/3:ℝ) + ρ y :=
170
+ integral_mono (density_coulomb_integrable ρ hp hm hi ht x)
171
+ (((nearCoulombFiveHalves_integrable.comp_sub_left x).add ht).add hi)
172
+ (density_coulomb_integrand_bound ρ hp x)
173
+ _ = _ := by
174
+ have HA := integral_add ((nearCoulombFiveHalves_integrable.comp_sub_left x).add ht) hi
175
+ have HB := integral_add (nearCoulombFiveHalves_integrable.comp_sub_left x) ht
176
+ simp only [Pi.add_apply] at HA HB
177
+ rw [HA,HB,integral_sub_left_eq_self]
178
+
179
+ lemma density_coulomb_pair_integrable (ρ : Space → ℝ) (hp : ∀ x, 0 ≤ ρ x) (hm : Measurable ρ)
180
+ (hi : Integrable ρ) (ht : Integrable (fun x => ρ x^(5/3:ℝ))) :
181
+ Integrable (fun xy : Space × Space => coulombKernel (xy.1-xy.2)*(ρ xy.1*ρ xy.2)) := by
182
+ have hm' : Measurable (fun xy : Space × Space => coulombKernel (xy.1-xy.2)*(ρ xy.1*ρ xy.2)) :=
183
+ (coulombKernel_measurable.comp (measurable_fst.sub measurable_snd)).mul
184
+ ((hm.comp measurable_fst).mul (hm.comp measurable_snd))
185
+ apply (integrable_prod_iff hm'.aestronglyMeasurable).mpr
186
+ constructor
187
+ · filter_upwards [] with x
188
+ apply ((density_coulomb_integrable ρ hp hm hi ht x).const_mul (ρ x)).congr
189
+ filter_upwards [] with y
190
+ ring
191
+ · let C := (∫ y, nearCoulombFiveHalves y) + (∫ y, ρ y^(5/3:ℝ)) + ∫ y, ρ y
192
+ apply (hi.mul_const C).mono' hm'.aestronglyMeasurable.norm.integral_prod_right'
193
+ filter_upwards [] with x
194
+ rw [Real.norm_of_nonneg (integral_nonneg (fun y => norm_nonneg _))]
195
+ have he : (∫ y, ‖coulombKernel (x-y)*(ρ x*ρ y)‖) =
196
+ ρ x*(∫ y, coulombKernel (x-y)*ρ y) := by
197
+ rw [← integral_const_mul]
198
+ apply integral_congr_ae
199
+ filter_upwards [] with y
200
+ rw [Real.norm_of_nonneg (mul_nonneg (coulombKernel_nonneg _) (mul_nonneg (hp _) (hp _)))]
201
+ ring
202
+ rw [he]
203
+ exact mul_le_mul_of_nonneg_left (density_coulomb_bound ρ hp hm hi ht x) (hp x)
204
+ end Coulomb
205
+
206
+ open MeasureTheory Set Filter
207
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
208
+
209
+ end
210
+
211
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NewtonInterior.lean ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.TailClosure
3
+
4
+ namespace OAI
5
+
6
+ section
7
+ section
8
+ open MeasureTheory Set Filter
9
+ open scoped ENNReal NNReal BigOperators Classical Topology
10
+ noncomputable section
11
+ namespace Coulomb
12
+
13
+ lemma radial_coulomb_lintegral_inner (F : ℝ → ℝ≥0∞) (hF : Measurable F)
14
+ {R : ℝ} (hs : ∀ s, s < R → F s=0) {x : Space} (hxR : ‖x‖ ≤ R) :
15
+ (∫⁻ y : Space, ENNReal.ofReal ‖x-y‖⁻¹*F ‖y‖)=
16
+ ∫⁻ y : Space, ENNReal.ofReal ‖y‖⁻¹*F ‖y‖ := by
17
+ by_cases hx : x=0
18
+ · simp only [hx,zero_sub,norm_neg]
19
+ rw [radial_coulomb_lintegral F hF hx,
20
+ radial_space_lintegral (fun s => ENNReal.ofReal s⁻¹*F s) (by fun_prop)]
21
+ congr 1
22
+ apply setLIntegral_congr_fun measurableSet_Ioi
23
+ intro s hs0
24
+ dsimp only
25
+ by_cases hR : R ≤ s
26
+ · rw [max_eq_right (hxR.trans hR),ENNReal.ofReal_mul (sq_nonneg s),mul_assoc]
27
+ · simp only [hs s (not_le.mp hR),mul_zero]
28
+
29
+ lemma radial_coulomb_integral_inner {f : Space → ℝ} (hf : Integrable f)
30
+ (hm : Measurable f) (hf0 : ∀ y, 0 ≤ f y) {M : ℝ} (hfM : ∀ y, f y ≤ M)
31
+ (hrad : ∀ y, f y=f (EuclideanSpace.single 0 ‖y‖))
32
+ {R : ℝ} (hfs : ∀ y, ‖y‖ < R → f y=0) {x : Space} (hxR : ‖x‖ ≤ R) :
33
+ (∫ y, coulombKernel (x-y)*f y)=∫ y, coulombKernel y*f y := by
34
+ by_cases hx : x=0
35
+ · simp only [hx,zero_sub,coulombKernel,norm_neg]
36
+ let F : ℝ → ℝ≥0∞ := fun s => if 0 ≤ s then ENNReal.ofReal (f (EuclideanSpace.single 0 s)) else 0
37
+ have hmF : Measurable F := Measurable.ite measurableSet_Ici
38
+ ((hm.comp space_axis_continuous.measurable).ennreal_ofReal) measurable_const
39
+ have he (y : Space) : F ‖y‖=ENNReal.ofReal (f y) := by
40
+ simp only [F,ite_eq_left (norm_nonneg y),←hrad y]
41
+ have hs : ∀ s, s < R → F s=0 := by
42
+ intro s hs
43
+ by_cases hs0 : 0 ≤ s
44
+ · have HH := hfs (EuclideanSpace.single 0 s) (by simpa [Real.norm_eq_abs,abs_of_nonneg hs0] using hs)
45
+ simp only [F,ite_eq_left hs0,HH,ENNReal.ofReal_zero]
46
+ · simp only [F,ite_eq_right hs0]
47
+ have H := radial_coulomb_lintegral_inner F hmF hs hxR
48
+ simp_rw [he] at H
49
+ have hi := coulomb_convolution_integrable hf hm hf0 hfM (by norm_num : (0:ℝ) < 1) x
50
+ have hi0 := coulomb_convolution_integrable hf hm hf0 hfM (by norm_num : (0:ℝ) < 1) 0
51
+ simp only [zero_sub,coulombKernel,norm_neg] at hi0
52
+ change Integrable (fun y => coulombKernel y*f y) at hi0
53
+ have hp (y : Space) : 0 ≤ coulombKernel (x-y)*f y := mul_nonneg (coulombKernel_nonneg _) (hf0 _)
54
+ have hp0 (y : Space) : 0 ≤ coulombKernel y*f y := mul_nonneg (coulombKernel_nonneg _) (hf0 _)
55
+ have hI := ofReal_integral_eq_lintegral_ofReal hi (Eventually.of_forall hp)
56
+ have hI0 := ofReal_integral_eq_lintegral_ofReal hi0 (Eventually.of_forall hp0)
57
+ simp_rw [ENNReal.ofReal_mul (coulombKernel_nonneg _)] at hI hI0
58
+ change ENNReal.ofReal (∫ y, coulombKernel (x-y)*f y)=∫⁻ y, ENNReal.ofReal ‖x-y‖⁻¹*ENNReal.ofReal (f y) at hI
59
+ change ENNReal.ofReal (∫ y, coulombKernel y*f y)=∫⁻ y, ENNReal.ofReal ‖y‖⁻¹*ENNReal.ofReal (f y) at hI0
60
+ rw [←hI,←hI0] at H
61
+ have H' := congrArg ENNReal.toReal H
62
+ simpa only [ENNReal.toReal_ofReal (integral_nonneg hp),ENNReal.toReal_ofReal (integral_nonneg hp0)] using H'
63
+
64
+ end Coulomb
65
+ end
66
+
67
+ end
68
+ section
69
+ open MeasureTheory Set Filter
70
+ open scoped ENNReal NNReal BigOperators Classical Topology
71
+ noncomputable section
72
+ namespace Coulomb
73
+
74
+ def radialShell (h : ℝ) : Set Space := Metric.ball 0 (2*h) \ Metric.ball 0 h
75
+
76
+ def radialShellDensity (h : ℝ) : Space → ℝ := (radialShell h).indicator (fun _ => 1)
77
+
78
+ lemma measurableSet_radialShell (h : ℝ) : MeasurableSet (radialShell h) :=
79
+ measurableSet_ball.diff measurableSet_ball
80
+ lemma radialShellDensity_measurable (h : ℝ) : Measurable (radialShellDensity h) :=
81
+ measurable_const.indicator (measurableSet_radialShell h)
82
+ lemma radialShellDensity_nonneg (h : ℝ) (z : Space) : 0 ≤ radialShellDensity h z :=
83
+ Set.indicator_nonneg (fun _ _ => zero_le_one) z
84
+ lemma radialShellDensity_le (h : ℝ) (z : Space) : radialShellDensity h z ≤ 1 :=
85
+ Set.indicator_le_self' (fun _ _ => zero_le_one) z
86
+ lemma radialShellDensity_integrable (h : ℝ) : Integrable (radialShellDensity h) := by
87
+ apply (integrable_indicator_iff (measurableSet_radialShell h)).mpr
88
+ exact integrableOn_const (C:=(1:ℝ)) (measure_ne_top_of_subset sdiff_subset measure_ball_lt_top.ne)
89
+
90
+ lemma radialShellDensity_mass {h : ℝ} (hh : 0 < h) :
91
+ (∫ z, radialShellDensity h z)=(28*Real.pi/3)*h^3 := by
92
+ unfold radialShellDensity radialShell
93
+ rw [integral_indicator (measurableSet_ball.diff measurableSet_ball),integral_const,measureReal_restrict_apply_univ,smul_eq_mul,mul_one,
94
+ measureReal_sdiff (Metric.ball_subset_ball (by linarith)) measurableSet_ball measure_ball_lt_top.ne,
95
+ volume_real_ball_three (2*h) (by positivity),volume_real_ball_three h hh.le]
96
+ ring
97
+
98
+ lemma radialShellDensity_radial (h : ℝ) (z : Space) :
99
+ radialShellDensity h z=radialShellDensity h (EuclideanSpace.single 0 ‖z‖) := by
100
+ simp only [radialShellDensity,radialShell,Set.indicator_apply,Set.mem_sdiff,Metric.mem_ball,dist_zero_right,
101
+ PiLp.norm_single,Real.norm_eq_abs,abs_of_nonneg (norm_nonneg z)]
102
+
103
+ lemma radialShellDensity_zero_inner {h : ℝ} {z : Space} (hz : ‖z‖ < h) :
104
+ radialShellDensity h z=0 := by
105
+ apply Set.indicator_of_notMem
106
+ exact fun hmem => hmem.2 (by simpa only [Metric.mem_ball,dist_zero_right] using hz)
107
+
108
+ lemma radialShell_coulomb_integrable (h : ℝ) (x : Space) :
109
+ Integrable (fun y => coulombKernel (x-y)*radialShellDensity h y) :=
110
+ coulomb_convolution_integrable (radialShellDensity_integrable h) (radialShellDensity_measurable h)
111
+ (radialShellDensity_nonneg h) (radialShellDensity_le h) (by norm_num : (0:ℝ) < 1) x
112
+
113
+ def radialShellMoment (h : ℝ) : ℝ := ∫ y, coulombKernel y*radialShellDensity h y
114
+
115
+ lemma radialShellMoment_integrable (h : ℝ) :
116
+ Integrable (fun y => coulombKernel y*radialShellDensity h y) := by
117
+ simpa only [zero_sub,coulombKernel,norm_neg] using radialShell_coulomb_integrable h 0
118
+
119
+ lemma radialShell_coulomb_inner {h : ℝ} {x : Space} (hx : ‖x‖ ≤ h) :
120
+ (∫ y, coulombKernel (x-y)*radialShellDensity h y)=radialShellMoment h :=
121
+ radial_coulomb_integral_inner (radialShellDensity_integrable h) (radialShellDensity_measurable h)
122
+ (radialShellDensity_nonneg h) (radialShellDensity_le h) (radialShellDensity_radial h)
123
+ (fun _ hz => radialShellDensity_zero_inner hz) hx
124
+
125
+ lemma radialShellMoment_lower {h : ℝ} (hh : 0 < h) :
126
+ (∫ y, radialShellDensity h y)/(2*h) ≤ radialShellMoment h := by
127
+ rw [div_eq_mul_inv,mul_comm,←integral_const_mul]
128
+ apply integral_mono ((radialShellDensity_integrable h).const_mul _) (radialShellMoment_integrable h)
129
+ intro y
130
+ by_cases hy : y∈radialShell h
131
+ · have hn : ‖y‖ < 2*h := by simpa only [Metric.mem_ball,dist_zero_right] using hy.1
132
+ have hn0 : 0 < ‖y‖ := by
133
+ have H : h ≤ ‖y‖ := by simpa only [Metric.mem_ball,dist_zero_right,not_lt] using hy.2
134
+ exact hh.trans_le H
135
+ exact mul_le_mul_of_nonneg_right ((inv_le_inv₀ (by positivity) hn0).mpr hn.le) (radialShellDensity_nonneg h y)
136
+ · simp only [radialShellDensity,indicator_of_notMem hy,mul_zero,le_refl]
137
+
138
+ lemma radialShellMoment_pos {h : ℝ} (hh : 0 < h) : 0 < radialShellMoment h := by
139
+ have H := radialShellMoment_lower hh
140
+ rw [radialShellDensity_mass hh] at H
141
+ exact lt_of_lt_of_le (by positivity) H
142
+
143
+ lemma atomicInnerField_shell_average {J n : ℕ} (S : Nuclei J)
144
+ (hatom : ∀ i, S.position i=0) (ψ : H1Vector n) {h : ℝ} (_ : 0 < h) :
145
+ (∫ y, atomicInnerField S ψ h y*radialShellDensity h y)=
146
+ (totalCharge S-expectedPopulation ψ (Metric.ball 0 h))*radialShellMoment h := by
147
+ have hAttr : Integrable (fun y => attraction S y*radialShellDensity h y) := by
148
+ simp_rw [attraction_atomic S hatom,div_eq_mul_inv,mul_assoc]
149
+ exact (radialShellMoment_integrable h).const_mul (totalCharge S)
150
+ have hCore := restrictedCorePotential_mul_integrable ψ (A:=Metric.ball 0 h) measurableSet_ball _ (radialShellDensity_integrable h)
151
+ simp only [atomicInnerField,sub_mul]
152
+ rw [integral_sub hAttr hCore,restrictedCorePotential_fubini ψ measurableSet_ball _ (radialShellDensity_integrable h)]
153
+ have ha : (∫ y, attraction S y*radialShellDensity h y)=totalCharge S*radialShellMoment h := by
154
+ simp_rw [attraction_atomic S hatom,div_eq_mul_inv,mul_assoc]
155
+ exact integral_const_mul _ _
156
+ rw [ha]
157
+ have hc : (∑ s : Spins n, ∑ i : Fin n, ∫ x, if position x i∈Metric.ball 0 h then
158
+ (∫ y, coulombKernel (position x i-y)*radialShellDensity h y)*‖ψ.value s x‖^2 else 0)=
159
+ expectedPopulation ψ (Metric.ball 0 h)*radialShellMoment h := by
160
+ rw [expectedPopulation]
161
+ simp only [Finset.sum_mul,←integral_mul_const]
162
+ apply Finset.sum_congr rfl; intro s hs
163
+ apply Finset.sum_congr rfl; intro i hi
164
+ apply integral_congr_ae
165
+ filter_upwards [] with x
166
+ by_cases hx : position x i∈Metric.ball 0 h
167
+ · have hn : ‖position x i‖ ≤ h := (by simpa only [Metric.mem_ball,dist_zero_right] using hx : ‖position x i‖ < h).le
168
+ rw [ite_eq_left hx,integral_mul_const,radialShell_coulomb_inner hn,indicator_of_mem hx]
169
+ ring
170
+ · simp only [ite_eq_right hx,indicator_of_notMem hx,zero_mul]
171
+ rw [hc]
172
+
173
+ end Coulomb
174
+ end
175
+
176
+ end
177
+ end
178
+
179
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NewtonSubmean.lean ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Packets.CoulombKernel
3
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.FarSubmean
4
+
5
+ namespace OAI
6
+
7
+ noncomputable section
8
+
9
+ section
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal BigOperators Classical
12
+ namespace Coulomb
13
+
14
+ lemma ballCloud_coulomb_le {a M : ℝ} (ha : 0<a) (hM : 0≤M) (y x : Space) (hxy : x≠y) :
15
+ (∫ z, coulombKernel (x-z)*ballCloud y a M z) ≤ M*coulombKernel (x-y) := by
16
+ have he : (∫ z, coulombKernel (x-z)*ballCloud y a M z) =
17
+ ∫ z, coulombKernel ((x-y)-z)*uniformBall a M z := by
18
+ rw [← integral_sub_right_eq_self (fun z => coulombKernel ((x-y)-z)*uniformBall a M z) y]
19
+ apply integral_congr_ae
20
+ filter_upwards [] with z
21
+ change coulombKernel (x-z)*uniformBall a M (z-y) = _
22
+ rw [show (x-y)-(z-y)=x-z by abel]
23
+ rw [he]
24
+ have H := radial_coulomb_integral_le (uniformBall_integrable a M) (uniformBall_measurable a M)
25
+ (uniformBall_nonneg ha hM) (uniformBall_le ha hM) (uniformBall_radial a M) (sub_ne_zero.mpr hxy)
26
+ simpa only [uniformBall_mass ha,mul_comm M] using H
27
+
28
+ lemma potentialOf_ballCloud_integrable {ρ : Space → ℝ} (hi : Integrable ρ) (hm : Measurable ρ)
29
+ {a : ℝ} (ha : 0<a) (y : Space) :
30
+ Integrable (fun z => NeutralAtom.potentialOf ρ z*ballCloud y a 1 z) := by
31
+ have H := (coulomb_pair_integrable hi hm (ballCloud_integrable a 1 y) (ballCloud_measurable a 1 y)
32
+ (fun z => by
33
+ change ‖uniformBall a 1 (z-y)‖ ≤ _
34
+ rw [Real.norm_eq_abs,abs_of_nonneg (uniformBall_nonneg ha zero_le_one (z-y))]
35
+ exact uniformBall_le ha zero_le_one (z-y))).integral_prod_right
36
+ apply H.congr
37
+ filter_upwards [] with z
38
+ simp only [NeutralAtom.potentialOf,←integral_mul_const]
39
+ apply integral_congr_ae
40
+ filter_upwards [] with x
41
+ change ρ x*ballCloud y a 1 z*coulombKernel (x-z) = coulombKernel (z-x)*ρ x*ballCloud y a 1 z
42
+ rw [coulombKernel_sub_comm x z]
43
+ ring
44
+
45
+ lemma potentialOf_ballCloud_le {ρ : Space → ℝ} (hi : Integrable ρ) (hm : Measurable ρ)
46
+ (hp : ∀ x, 0≤ρ x) {a : ℝ} (ha : 0<a) (y : Space)
47
+ (hK : Integrable (fun x => coulombKernel (y-x)*ρ x)) :
48
+ (∫ z, NeutralAtom.potentialOf ρ z*ballCloud y a 1 z) ≤ NeutralAtom.potentialOf ρ y := by
49
+ have H := coulomb_pair_integrable hi hm (ballCloud_integrable a 1 y) (ballCloud_measurable a 1 y)
50
+ (fun z => by
51
+ change ‖uniformBall a 1 (z-y)‖ ≤ _
52
+ rw [Real.norm_eq_abs,abs_of_nonneg (uniformBall_nonneg ha zero_le_one (z-y))]
53
+ exact uniformBall_le ha zero_le_one (z-y))
54
+ have he : (∫ z, NeutralAtom.potentialOf ρ z*ballCloud y a 1 z) =
55
+ ∫ x, ∫ z, ρ x*ballCloud y a 1 z*coulombKernel (x-z) := by
56
+ rw [integral_integral_swap H]
57
+ apply integral_congr_ae
58
+ filter_upwards [] with z
59
+ simp only [NeutralAtom.potentialOf,←integral_mul_const]
60
+ apply integral_congr_ae
61
+ filter_upwards [] with x
62
+ change coulombKernel (z-x)*ρ x*ballCloud y a 1 z = ρ x*ballCloud y a 1 z*coulombKernel (x-z)
63
+ rw [coulombKernel_sub_comm z x]
64
+ ring
65
+ rw [he]
66
+ apply integral_mono_ae H.integral_prod_left hK
67
+ filter_upwards [volume.ae_ne y] with x hxy
68
+ have hh := mul_le_mul_of_nonneg_left (ballCloud_coulomb_le ha zero_le_one y x hxy) (hp x)
69
+ simpa only [←integral_const_mul,one_mul,coulombKernel_sub_comm y x,mul_left_comm,mul_comm,mul_assoc] using hh
70
+
71
+ lemma screenedPotential_ballCloud_submean {J k : ℕ} (S : Nuclei J) (u : H1Vector k)
72
+ {A : Set Space} (hu : SpatiallySupported u A)
73
+ {ρ : Space → ℝ} (hi : Integrable ρ) (hm : Measurable ρ) (hp : ∀ x, 0≤ρ x)
74
+ {a : ℝ} (ha : 0<a) (y : Space)
75
+ (hcore : ∀ z ∈ A, a≤‖z-y‖) (hnuc : ∀ j, a≤‖S.position j-y‖)
76
+ (hK : Integrable (fun x => coulombKernel (y-x)*ρ x)) :
77
+ coreScreenedField S u y-NeutralAtom.potentialOf ρ y ≤
78
+ ∫ z, (coreScreenedField S u z-NeutralAtom.potentialOf ρ z)*ballCloud y a 1 z := by
79
+ have hc : Integrable (fun z => coreScreenedField S u z*ballCloud y a 1 z) := by
80
+ apply ((attraction_ballCloud_integrable S ha y).sub
81
+ (coreCoulombPotential_mul_integrable u _ (ballCloud_integrable a 1 y))).congr
82
+ filter_upwards [] with z
83
+ change attraction S z*ballCloud y a 1 z-coreCoulombPotential u z*ballCloud y a 1 z = _
84
+ rw [coreScreenedField,sub_mul]
85
+ simp_rw [sub_mul]
86
+ rw [integral_sub hc (potentialOf_ballCloud_integrable hi hm ha y),
87
+ coreScreenedField_ballCloud S u hu ha zero_le_one y hcore hnuc,one_mul]
88
+ linarith [potentialOf_ballCloud_le hi hm hp ha y hK]
89
+
90
+ end Coulomb
91
+
92
+ end
93
+ open MeasureTheory Set Filter
94
+ open scoped ENNReal NNReal BigOperators Classical
95
+ namespace Coulomb
96
+
97
+ lemma closedBall_ae_ball (y : Space) (a : ℝ) :
98
+ Metric.closedBall y a =ᵐ[volume] Metric.ball y a := by
99
+ filter_upwards [(measure_eq_zero_iff_ae_notMem).mp (Measure.addHaar_sphere volume y a)] with x hx
100
+ apply propext
101
+ simp only [Metric.mem_closedBall,Metric.mem_ball,Metric.mem_sphere] at *
102
+ exact ⟨fun h => lt_of_le_of_ne h hx,le_of_lt⟩
103
+
104
+ lemma integral_ballCloud (F : Space → ��) (y : Space) (a : ℝ) :
105
+ (∫ x, F x*ballCloud y a 1 x) =
106
+ (4*Real.pi/3*a^3)⁻¹*(∫ x in Metric.closedBall y a, F x) := by
107
+ have he : (fun x => F x*ballCloud y a 1 x) =
108
+ (Metric.ball y a).indicator (fun x => F x*(4*Real.pi/3*a^3)⁻¹) := by
109
+ funext x
110
+ have hd : x-y∈Metric.ball (0:Space) a ↔ x∈Metric.ball y a := by
111
+ simp only [Metric.mem_ball,dist_eq_norm,sub_zero]
112
+ by_cases hx : x∈Metric.ball y a
113
+ · simp only [ballCloud,uniformBall,indicator_of_mem hx,indicator_of_mem (hd.mpr hx),one_div]
114
+ · simp only [ballCloud,uniformBall,indicator_of_notMem hx,indicator_of_notMem (not_congr hd |>.mpr hx),mul_zero]
115
+ rw [he,integral_indicator measurableSet_ball,integral_mul_const,
116
+ ←setIntegral_congr_set (closedBall_ae_ball y a),mul_comm]
117
+
118
+ lemma integral_closedBall_affine (F : Space → ℝ) (y : Space) {a : ℝ} (ha : 0<a) (r : ℝ) :
119
+ (∫ z in Metric.closedBall (0:Space) r, F (y+a • z)) =
120
+ (a^3)⁻¹*(∫ x in Metric.closedBall y (a*r), F x) := by
121
+ let g := (Metric.closedBall y (a*r)).indicator F
122
+ have he (z : Space) : g (y+a • z) =
123
+ (Metric.closedBall (0:Space) r).indicator (fun x => F (y+a • x)) z := by
124
+ have hz : y+a • z∈Metric.closedBall y (a*r) ↔ z∈Metric.closedBall (0:Space) r := by
125
+ simp only [Metric.mem_closedBall,dist_eq_norm,add_sub_cancel_left,norm_smul,
126
+ Real.norm_eq_abs,abs_of_pos ha,sub_zero]
127
+ exact mul_le_mul_iff_right₀ ha
128
+ by_cases h : z∈Metric.closedBall (0:Space) r
129
+ · simp only [g,indicator_of_mem h,indicator_of_mem (hz.mpr h)]
130
+ · simp only [g,indicator_of_notMem h,indicator_of_notMem (not_congr hz |>.mpr h)]
131
+ have hh := Measure.integral_comp_smul_of_nonneg volume (fun x => g (y+x)) a (hR:=ha.le)
132
+ simp only [Space,finrank_euclideanSpace_fin,smul_eq_mul] at hh
133
+ simp_rw [he] at hh
134
+ rw [integral_indicator measurableSet_closedBall,integral_add_left_eq_self] at hh
135
+ simpa only [g,integral_indicator measurableSet_closedBall] using hh
136
+
137
+ lemma volume_closedBall_three (y : Space) {r : ℝ} (hr : 0≤r) :
138
+ volume.real (Metric.closedBall y r) = 4*Real.pi/3*r^3 := by
139
+ rw [Measure.addHaar_real_closedBall_eq_addHaar_real_ball,
140
+ Measure.addHaar_real_ball_center,volume_real_ball_three r hr]
141
+
142
+ lemma submean_affine {F : Space → ℝ} (y : Space) {a : ℝ} (ha : 0<a)
143
+ (hm : F y ≤ ∫ x, F x*ballCloud y (2*a) 1 x) :
144
+ volume.real (Metric.closedBall (0:Space) 2)*(a^4*F y) ≤
145
+ ∫ z in Metric.closedBall (0:Space) 2, a^4*F (y+a • z) := by
146
+ rw [integral_ballCloud] at hm
147
+ rw [integral_const_mul,integral_closedBall_affine F y ha,volume_closedBall_three _ (by norm_num)]
148
+ have hV : 0<4*Real.pi/3*(2*a)^3 := by positivity
149
+ have hi : (4*Real.pi/3*(2*a)^3)*F y ≤ (∫ x in Metric.closedBall y (2*a), F x) := by
150
+ have hh := mul_le_mul_of_nonneg_left hm hV.le
151
+ simpa only [←mul_assoc,mul_inv_cancel₀ hV.ne',one_mul] using hh
152
+ have hh := mul_le_mul_of_nonneg_left hi (show 0≤a^4*(a^3)⁻¹ by positivity)
153
+ rw [show a*2=2*a by ring]
154
+ convert hh using 1 <;> first | rfl | field_simp [ha.ne']
155
+
156
+ end Coulomb
157
+
158
+ end
159
+
160
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/NormSqSumCosets.lean ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.PermuteJoinBlock
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ namespace Coulomb
64
+ lemma norm_sq_sum_cosets {G : Type*} [Group G] [Fintype G]
65
+ (H : Subgroup G) (f : G → ℂ)
66
+ (hc : ∀ p q, conj (f p)*f q = if p⁻¹*q ∈ H then ((‖f p‖^2 : ℝ) : ℂ) else 0) :
67
+ ‖∑ p, f p‖^2 = (Fintype.card H : ℝ)*∑ p, ‖f p‖^2 := by
68
+ apply Complex.ofReal_injective
69
+ push_cast
70
+ rw [← Complex.conj_mul', map_sum, Finset.sum_mul]
71
+ simp_rw [Finset.mul_sum, hc]
72
+ have hi (p : G) :
73
+ (∑ q : G, if p⁻¹*q ∈ H then ((‖f p‖^2 : ℝ) : ℂ) else (0:ℂ)) =
74
+ (Fintype.card H : ℂ)*(‖f p‖^2 : ℝ) := by
75
+ rw [← Equiv.sum_comp (Equiv.mulLeft p)]
76
+ change (∑ r : G, if p⁻¹*(p*r) ∈ H then ((‖f p‖^2 : ℝ) : ℂ) else 0) = _
77
+ simp only [inv_mul_cancel_left]
78
+ rw [← Finset.sum_filter]
79
+ simp [Fintype.card_subtype]
80
+ simp_rw [hi]
81
+ push_cast
82
+ rfl
83
+
84
+ lemma signed_coset_correlation {G : Type*} [Group G] [Fintype G]
85
+ (χ : G →* ℂ) (hχ : ∀ p, χ p*χ p = 1) (hχr : ∀ p, conj (χ p) = χ p)
86
+ (H : Subgroup G) (f : G → ℂ)
87
+ (hc : ∀ p h, h ∈ H → f (p*h) = χ h*f p)
88
+ (hz : ∀ p q, p⁻¹*q ∉ H → conj (f p)*f q = 0) (p q : G) :
89
+ conj (χ p*f p)*(χ q*f q) =
90
+ if p⁻¹*q ∈ H then ((‖χ p*f p‖^2 : ℝ) : ℂ) else 0 := by
91
+ by_cases h : p⁻¹*q ∈ H
92
+ · rw [ite_eq_left h]
93
+ have hq : q = p*(p⁻¹*q) := by group
94
+ have hf := hc p (p⁻¹*q) h
95
+ rw [← hq] at hf
96
+ rw [hf]
97
+ conv_lhs => arg 2; arg 1; rw [hq, map_mul]
98
+ have he : χ p * χ (p⁻¹*q) * (χ (p⁻¹*q)*f p) = χ p*f p := by
99
+ rw [mul_assoc, ← mul_assoc (χ (p⁻¹*q)), hχ, one_mul]
100
+ rw [he, Complex.conj_mul']
101
+ push_cast
102
+ rfl
103
+ · rw [ite_eq_right h, map_mul, hχr]
104
+ calc
105
+ _ = χ p*χ q*(conj (f p)*f q) := by ring
106
+ _ = 0 := by rw [hz p q h, mul_zero]
107
+
108
+ lemma norm_sq_signed_sum_cosets {G : Type*} [Group G] [Fintype G]
109
+ (χ : G →* ℂ) (hχ : ∀ p, χ p*χ p = 1) (hχr : ∀ p, conj (χ p) = χ p)
110
+ (H : Subgroup G) (f : G → ℂ)
111
+ (hc : ∀ p h, h ∈ H → f (p*h) = χ h*f p)
112
+ (hz : ∀ p q, p⁻¹*q ∉ H → conj (f p)*f q = 0) :
113
+ ‖∑ p, χ p*f p‖^2 = (Fintype.card H : ℝ)*∑ p, ‖f p‖^2 := by
114
+ rw [norm_sq_sum_cosets H (fun p => χ p*f p)
115
+ (signed_coset_correlation χ hχ hχr H f hc hz)]
116
+ congr 1
117
+ apply Finset.sum_congr rfl
118
+ intro p _
119
+ have hn : ‖χ p‖^2 = 1 := by
120
+ have H := congrArg norm (hχ p)
121
+ simpa [norm_mul, pow_two] using H
122
+ rw [norm_mul, mul_pow, hn, one_mul]
123
+ lemma permutation_mul_value {n : ℕ} (u : H1Vector n) (p q : Equiv.Perm (Fin n))
124
+ (s : Spins n) (x : Configuration n) :
125
+ (u.permutation (p*q)).value s x = ((u.permutation q).permutation p).value s x := by
126
+ simp only [permutation_value, permute_mul]
127
+ rfl
128
+ lemma permutation_mul_gradient {n : ℕ} (u : H1Vector n) (p q : Equiv.Perm (Fin n))
129
+ (s : Spins n) (a : Fin n × Fin 3) (x : Configuration n) :
130
+ (u.permutation (p*q)).gradient s a x = ((u.permutation q).permutation p).gradient s a x := by
131
+ simp only [permutation_gradient, permute_mul]
132
+ rfl
133
+
134
+ lemma permutation_value_covariance {n : ℕ} (u : H1Vector n) (h : Equiv.Perm (Fin n))
135
+ (c : ℂ) (hc : ∀ s, (u.permutation h).value s =ᵐ[volume] fun x => c*u.value s x)
136
+ (p : Equiv.Perm (Fin n)) (s : Spins n) :
137
+ (u.permutation (p*h)).value s =ᵐ[volume] fun x => c*(u.permutation p).value s x := by
138
+ have H := (permute_measurePreserving p).quasiMeasurePreserving.ae (hc (s ∘ p))
139
+ filter_upwards [H] with x hx
140
+ rw [permutation_mul_value, permutation_value, permutation_value]
141
+ exact hx
142
+
143
+ lemma permutation_gradient_covariance {n : ℕ} (u : H1Vector n) (h : Equiv.Perm (Fin n))
144
+ (c : ℂ) (hc : ∀ s, (u.permutation h).value s =ᵐ[volume] fun x => c*u.value s x)
145
+ (p : Equiv.Perm (Fin n)) (s : Spins n) (a : Fin n × Fin 3) :
146
+ (u.permutation (p*h)).gradient s a =ᵐ[volume]
147
+ fun x => c*(u.permutation p).gradient s a x := by
148
+ have hg := H1Vector.gradient_congr_ae (u.permutation h) (u.scale c) hc
149
+ (s ∘ p) (p.symm a.1,a.2)
150
+ have H := (permute_measurePreserving p).quasiMeasurePreserving.ae hg
151
+ filter_upwards [H] with x hx
152
+ rw [permutation_mul_gradient]
153
+ simpa only [permutation_gradient, H1Vector.scale] using hx
154
+
155
+ def complexSign (n : ℕ) : Equiv.Perm (Fin n) →* ℂ where
156
+ toFun := fun p => ((p.sign : ℤ) : ℂ)
157
+ map_one' := by simp
158
+ map_mul' := by intro p q; simp
159
+
160
+ lemma complexSign_sq {n : ℕ} (p : Equiv.Perm (Fin n)) : complexSign n p*complexSign n p = 1 :=
161
+ sign_complex_sq p
162
+ lemma complexSign_real {n : ℕ} (p : Equiv.Perm (Fin n)) : conj (complexSign n p) = complexSign n p := by
163
+ simp [complexSign]
164
+
165
+ lemma fullAntisymmetrize_gradient {n : ℕ} (u : H1Vector n) (s : Spins n)
166
+ (a : Fin n × Fin 3) (x : Configuration n) :
167
+ u.fullAntisymmetrize.gradient s a x =
168
+ ∑ p : Equiv.Perm (Fin n), complexSign n p*(u.permutation p).gradient s a x := rfl
169
+
170
+ lemma separated_fullAntisymmetrize_value_sq {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
171
+ (hu : Antisymmetric u) (hv : Antisymmetric v) (A B : Set Space)
172
+ (hsu : SpatiallySupported u A) (hsv : SpatiallySupported v B) (hAB : Disjoint A B)
173
+ (s : Spins (m+k)) :
174
+ ∀ᵐ x ∂volume, ‖(u.tensor v).fullAntisymmetrize.value s x‖^2 =
175
+ (Fintype.card (blockGroup m k) : ℝ)*
176
+ ∑ p : Equiv.Perm (Fin (m+k)), ‖((u.tensor v).permutation p).value s x‖^2 := by
177
+ have hc : ∀ᵐ x ∂volume, ∀ p : Equiv.Perm (Fin (m+k)), ∀ h : Equiv.Perm (Fin (m+k)),
178
+ h ∈ blockGroup m k →
179
+ ((u.tensor v).permutation (p*h)).value s x =
180
+ complexSign (m+k) h*((u.tensor v).permutation p).value s x := by
181
+ apply ae_all_iff.2
182
+ intro p
183
+ apply ae_all_iff.2
184
+ intro h
185
+ by_cases hh : h ∈ blockGroup m k
186
+ · exact (permutation_value_covariance (u.tensor v) h _
187
+ (tensor_block_covariance u v hu hv h hh) p s).mono (fun x hx _ => hx)
188
+ · exact Filter.Eventually.of_forall (fun x h => (hh h).elim)
189
+ have hz : ∀ᵐ x ∂volume, ∀ p q : Equiv.Perm (Fin (m+k)), p⁻¹*q ∉ blockGroup m k →
190
+ conj (((u.tensor v).permutation p).value s x)*((u.tensor v).permutation q).value s x = 0 := by
191
+ apply ae_all_iff.2
192
+ intro p
193
+ apply ae_all_iff.2
194
+ intro q
195
+ by_cases h : p⁻¹*q ∈ blockGroup m k
196
+ · exact Filter.Eventually.of_forall (fun x hn => (hn h).elim)
197
+ · exact (configSupported_value_orthogonal (u.tensor v) (blockRegion m k A B)
198
+ (tensor_configSupported u v A B hsu hsv) p q
199
+ (blockRegion_orbit_disjoint hAB p q h) s).mono (fun x hx _ => hx)
200
+ filter_upwards [hc,hz] with x hx hy
201
+ change ‖∑ p : Equiv.Perm (Fin (m+k)), complexSign (m+k) p*
202
+ ((u.tensor v).permutation p).value s x‖^2 = _
203
+ exact norm_sq_signed_sum_cosets (complexSign (m+k)) complexSign_sq complexSign_real
204
+ (blockGroup m k) (fun p => ((u.tensor v).permutation p).value s x) hx hy
205
+
206
+ lemma separated_fullAntisymmetrize_gradient_sq {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
207
+ (hu : Antisymmetric u) (hv : Antisymmetric v) (A B : Set Space)
208
+ (hsu : SpatiallySupported u A) (hsv : SpatiallySupported v B)
209
+ (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B)
210
+ (s : Spins (m+k)) (a : Fin (m+k) × Fin 3) :
211
+ ∀ᵐ x ∂volume, ‖(u.tensor v).fullAntisymmetrize.gradient s a x‖^2 =
212
+ (Fintype.card (blockGroup m k) : ℝ)*
213
+ ∑ p : Equiv.Perm (Fin (m+k)), ‖((u.tensor v).permutation p).gradient s a x‖^2 := by
214
+ have hc : ∀ᵐ x ∂volume, ∀ p : Equiv.Perm (Fin (m+k)), ∀ h : Equiv.Perm (Fin (m+k)),
215
+ h ∈ blockGroup m k →
216
+ ((u.tensor v).permutation (p*h)).gradient s a x =
217
+ complexSign (m+k) h*((u.tensor v).permutation p).gradient s a x := by
218
+ apply ae_all_iff.2
219
+ intro p
220
+ apply ae_all_iff.2
221
+ intro h
222
+ by_cases hh : h ∈ blockGroup m k
223
+ · exact (permutation_gradient_covariance (u.tensor v) h _
224
+ (tensor_block_covariance u v hu hv h hh) p s a).mono (fun x hx _ => hx)
225
+ · exact Filter.Eventually.of_forall (fun x h => (hh h).elim)
226
+ have hz : ∀ᵐ x ∂volume, ∀ p q : Equiv.Perm (Fin (m+k)), p⁻¹*q ∉ blockGroup m k →
227
+ conj (((u.tensor v).permutation p).gradient s a x)*((u.tensor v).permutation q).gradient s a x = 0 := by
228
+ apply ae_all_iff.2
229
+ intro p
230
+ apply ae_all_iff.2
231
+ intro q
232
+ by_cases h : p⁻¹*q ∈ blockGroup m k
233
+ · exact Filter.Eventually.of_forall (fun x hn => (hn h).elim)
234
+ · exact (configSupported_gradient_orthogonal (u.tensor v) (blockRegion m k A B)
235
+ (tensor_configSupported u v A B hsu hsv) (isClosed_blockRegion hA hB) p q
236
+ (blockRegion_orbit_disjoint hAB p q h) s a).mono (fun x hx _ => hx)
237
+ filter_upwards [hc,hz] with x hx hy
238
+ rw [fullAntisymmetrize_gradient]
239
+ exact norm_sq_signed_sum_cosets (complexSign (m+k)) complexSign_sq complexSign_real
240
+ (blockGroup m k) (fun p => ((u.tensor v).permutation p).gradient s a x) hx hy
241
+ end Coulomb
242
+
243
+ end
244
+
245
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/Occupancy.lean ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Packets.OrbitalKernel
3
+
4
+ namespace OAI
5
+
6
+ open MeasureTheory Set
7
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
8
+ open MeasureTheory Set Filter
9
+ open scoped ENNReal NNReal
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set
13
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set Filter
17
+ open scoped ENNReal NNReal BigOperators Classical Topology
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ namespace Coulomb
53
+ noncomputable def occupancy (b : Bool) : ℝ := if b then 1 else 0
54
+ noncomputable def bernoulliWeight {ι : Type*} [Fintype ι] (lam : ι → ℝ) (w : ι → Bool) : ℝ :=
55
+ ∏ i, if w i then lam i else 1-lam i
56
+ lemma bernoulliWeight_nonneg {ι : Type*} [Fintype ι] (lam : ι → ℝ)
57
+ (hl : ∀ i, 0 ≤ lam i) (hu : ∀ i, lam i ≤ 1) (w : ι → Bool) :
58
+ 0 ≤ bernoulliWeight lam w := by
59
+ apply Finset.prod_nonneg
60
+ intro i _
61
+ split_ifs
62
+ · exact hl i
63
+ · exact sub_nonneg.mpr (hu i)
64
+ lemma bernoulli_product_mean {ι : Type*} [Fintype ι] (lam : ι → ℝ) (f : ι → Bool → ℝ) :
65
+ (∑ w : ι → Bool, bernoulliWeight lam w * ∏ i, f i (w i)) =
66
+ ∏ i, ((1-lam i)*f i false+lam i*f i true) := by
67
+ simp only [bernoulliWeight,←Finset.prod_mul_distrib]
68
+ rw [←Fintype.prod_sum (fun i b => (if b then lam i else 1-lam i)*f i b)]
69
+ apply Finset.prod_congr rfl
70
+ intro i _
71
+ simp [add_comm]
72
+ lemma bernoulliWeight_sum {ι : Type*} [Fintype ι] (lam : ι → ℝ) :
73
+ ∑ w : ι → Bool, bernoulliWeight lam w = 1 := by
74
+ simpa using bernoulli_product_mean lam (fun _ _ => 1)
75
+ lemma bernoulli_forced_mean {ι : Type*} [Fintype ι] (lam : ι → ℝ) (s : Finset ι) :
76
+ (∑ w : ι → Bool, bernoulliWeight lam w * ∏ i ∈ s,occupancy (w i)) = ∏ i ∈ s,lam i := by
77
+ have he (w : ι → Bool) : (∏ i ∈ s,occupancy (w i)) = ∏ i,if i ∈ s then occupancy (w i) else 1 := by
78
+ rw [Finset.prod_ite]
79
+ simp
80
+ simp_rw [he]
81
+ rw [bernoulli_product_mean lam (fun i b => if i ∈ s then occupancy b else 1)]
82
+ have hp (i : ι) : (1-lam i)*(if i ∈ s then occupancy false else 1)+
83
+ lam i*(if i ∈ s then occupancy true else 1) = if i ∈ s then lam i else 1 := by
84
+ by_cases hs : i ∈ s <;> simp [hs,occupancy]
85
+ simp_rw [hp]
86
+ rw [Finset.prod_ite]
87
+ simp
88
+ lemma bernoulli_one_mean {ι : Type*} [Fintype ι] (lam : ι → ℝ) (i : ι) :
89
+ (∑ w : ι → Bool,bernoulliWeight lam w*occupancy (w i)) = lam i := by
90
+ simpa using bernoulli_forced_mean lam {i}
91
+ lemma bernoulli_two_mean {ι : Type*} [Fintype ι] (lam : ι → ℝ) {i j : ι} (hij : i ≠ j) :
92
+ (∑ w : ι → Bool,bernoulliWeight lam w*(occupancy (w i)*occupancy (w j))) = lam i*lam j := by
93
+ simpa [hij] using bernoulli_forced_mean lam {i,j}
94
+ lemma bernoulli_linear_mean {ι : Type*} [Fintype ι] (lam a : ι → ℝ) :
95
+ (∑ w : ι → Bool,bernoulliWeight lam w*(∑ i,occupancy (w i)*a i)) = ∑ i,lam i*a i := by
96
+ simp only [Finset.mul_sum]
97
+ rw [Finset.sum_comm]
98
+ apply Finset.sum_congr rfl
99
+ intro i _
100
+ simp only [←mul_assoc,←Finset.sum_mul,bernoulli_one_mean]
101
+ lemma bernoulli_pair_mean {ι : Type*} [Fintype ι] (lam : ι → ℝ) (d : ι → ι → ℝ)
102
+ (hd : ∀ i, d i i = 0) :
103
+ (∑ w : ι → Bool,bernoulliWeight lam w*(∑ i,∑ j,occupancy (w i)*occupancy (w j)*d i j)) =
104
+ ∑ i,∑ j,lam i*lam j*d i j := by
105
+ simp only [Finset.mul_sum]
106
+ rw [Finset.sum_comm]
107
+ apply Finset.sum_congr rfl
108
+ intro i _
109
+ rw [Finset.sum_comm]
110
+ apply Finset.sum_congr rfl
111
+ intro j _
112
+ by_cases hij : i=j
113
+ · subst j; simp [hd]
114
+ · calc
115
+ _ = (∑ w : ι → Bool,bernoulliWeight lam w*(occupancy (w i)*occupancy (w j)))*d i j := by
116
+ rw [Finset.sum_mul]
117
+ apply Finset.sum_congr rfl
118
+ intro w _
119
+ ring
120
+ _ = _ := by rw [bernoulli_two_mean lam hij]
121
+
122
+ noncomputable def occupiedIndex {ι : Type*} [Fintype ι] (w : ι → Bool) :
123
+ Fin (Fintype.card {i // w i = true}) ↪ ι :=
124
+ (Fintype.equivFin {i // w i = true}).symm.toEmbedding.trans (Function.Embedding.subtype _)
125
+
126
+ lemma sum_occupiedIndex {ι R : Type*} [Fintype ι] [AddCommMonoid R]
127
+ (w : ι → Bool) (f : ι → R) :
128
+ (∑ a, f (occupiedIndex w a)) = ∑ i, if w i then f i else 0 := by
129
+ classical
130
+ rw [show (∑ a, f (occupiedIndex w a)) = ∑ a : {i // w i = true}, f a by
131
+ exact Equiv.sum_comp (Fintype.equivFin {i // w i = true}).symm (fun a => f a)]
132
+ rw [← Finset.sum_subtype (Finset.univ.filter (fun i => w i = true)) (by simp) f,
133
+ Finset.sum_filter]
134
+
135
+ lemma sum_occupiedIndex_real {ι : Type*} [Fintype ι] (w : ι → Bool) (f : ι → ℝ) :
136
+ (∑ a, f (occupiedIndex w a)) = ∑ i, occupancy (w i) * f i := by
137
+ rw [sum_occupiedIndex]
138
+ apply Finset.sum_congr rfl
139
+ intro i _
140
+ cases w i <;> simp [occupancy]
141
+
142
+ noncomputable def slaterPairEntry {A ι : Type*} [MeasurableSpace A] (μ : Measure A)
143
+ (v : ι → A → ℂ) (W : A → A → ℝ) (i j : ι) : ℝ :=
144
+ (∫ xy : A × A, (W xy.1 xy.2 : ℂ) *
145
+ ((star (v i xy.1)*v i xy.1)*(star (v j xy.2)*v j xy.2)) ∂(μ.prod μ)).re -
146
+ (∫ xy : A × A, (W xy.1 xy.2 : ℂ) *
147
+ ((star (v i xy.1)*v j xy.1)*(star (v j xy.2)*v i xy.2)) ∂(μ.prod μ)).re
148
+
149
+ lemma slaterPairEntry_self {A ι : Type*} [MeasurableSpace A] (μ : Measure A)
150
+ (v : ι → A → ℂ) (W : A → A → ℝ) (i : ι) : slaterPairEntry μ v W i i = 0 := by
151
+ simp [slaterPairEntry]
152
+
153
+ lemma slaterWave_two_body_exact {A : Type*} [MeasurableSpace A] {μ : Measure A}
154
+ [SigmaFinite μ] {n : ℕ} (v : Fin n → A → ℂ) (W : A → A → ℝ)
155
+ (hv : ∀ i, MemLp (v i) 2 μ)
156
+ (ho : ∀ a b, (∫ x, star (v a x)*v b x ∂μ) = if a = b then (1:ℂ) else 0)
157
+ (hW : ∀ a b c d, Integrable (fun xy : A × A => (W xy.1 xy.2 : ℂ) *
158
+ ((star (v a xy.1)*v c xy.1)*(star (v b xy.2)*v d xy.2))) (μ.prod μ)) :
159
+ (∫ x : Fin n → A, (∑ i, ∑ j ∈ Finset.univ.erase i, W (x i) (x j)) *
160
+ ‖slaterWave v x‖^2 ∂(Measure.pi fun _ => μ)) = ∑ i, ∑ j, slaterPairEntry μ v W i j := by
161
+ have H := determinant_two_body_integral v (fun x y => (W x y : ℂ)) hv ho hW
162
+ simp only [complex_star_mul_self, ← Complex.ofReal_sum, ← Complex.ofReal_mul,
163
+ integral_complex_ofReal] at H
164
+ have HR := congrArg Complex.re H
165
+ simp only [Complex.ofReal_re, Complex.mul_re, Complex.natCast_re, Complex.natCast_im,
166
+ zero_mul, sub_zero, Complex.re_sum, Complex.sub_re] at HR
167
+ have hn : (0:ℝ) < n.factorial := Nat.cast_pos.mpr (Nat.factorial_pos n)
168
+ have he (x : Fin n → A) : (∑ i, ∑ j ∈ Finset.univ.erase i, W (x i) (x j)) *
169
+ ‖slaterWave v x‖^2 = (n.factorial : ℝ)⁻¹ *
170
+ ((∑ i, ∑ j ∈ Finset.univ.erase i, W (x i) (x j)) * ‖determinantWave v x‖^2) := by
171
+ simp only [slaterWave, norm_mul, mul_pow, norm_inv, Complex.norm_real, Real.norm_eq_abs,
172
+ abs_of_nonneg (Real.sqrt_nonneg _), inv_pow, Real.sq_sqrt hn.le]
173
+ ring
174
+ simp_rw [he]
175
+ rw [integral_const_mul, HR, ← mul_assoc, inv_mul_cancel₀ hn.ne', one_mul]
176
+ simp only [slaterPairEntry, complex_star_mul_self, ← Complex.ofReal_mul,
177
+ integral_complex_ofReal, Complex.ofReal_re]
178
+
179
+ lemma bernoulli_slater_pair_mean {A ι : Type*} [MeasurableSpace A] [Fintype ι]
180
+ {μ : Measure A} [SigmaFinite μ] (v : ι → A → ℂ) (W : A → A → ℝ)
181
+ (lam : ι → ℝ) (hv : ∀ i, MemLp (v i) 2 μ)
182
+ (ho : ∀ a b, (∫ x, star (v a x)*v b x ∂μ) = if a = b then (1:ℂ) else 0)
183
+ (hW : ∀ a b c d, Integrable (fun xy : A × A => (W xy.1 xy.2 : ℂ) *
184
+ ((star (v a xy.1)*v c xy.1)*(star (v b xy.2)*v d xy.2))) (μ.prod μ)) :
185
+ (∑ w : ι → Bool, bernoulliWeight lam w *
186
+ (∫ x : Fin (Fintype.card {i // w i = true}) → A,
187
+ (∑ i, ∑ j ∈ Finset.univ.erase i, W (x i) (x j)) *
188
+ ‖slaterWave (fun a => v (occupiedIndex w a)) x‖^2 ∂(Measure.pi fun _ => μ))) =
189
+ ∑ i, ∑ j, lam i * lam j * slaterPairEntry μ v W i j := by
190
+ classical
191
+ have he (w : ι → Bool) := slaterWave_two_body_exact
192
+ (fun a => v (occupiedIndex w a)) W (fun a => hv _) (fun a b => by
193
+ simp only [ho, (occupiedIndex w).injective.eq_iff])
194
+ (fun a b c d => hW _ _ _ _)
195
+ simp_rw [he]
196
+ have hs (w : ι → Bool) :
197
+ (∑ a, ∑ b, slaterPairEntry μ (fun a => v (occupiedIndex w a)) W a b) =
198
+ ∑ i, ∑ j, occupancy (w i)*occupancy (w j)*slaterPairEntry μ v W i j := by
199
+ change (∑ a, ∑ b, slaterPairEntry μ v W (occupiedIndex w a) (occupiedIndex w b)) = _
200
+ rw [sum_occupiedIndex_real w (fun i => ∑ b, slaterPairEntry μ v W i (occupiedIndex w b))]
201
+ simp_rw [sum_occupiedIndex_real, Finset.mul_sum, mul_assoc]
202
+ simp_rw [hs]
203
+ exact bernoulli_pair_mean lam _ (slaterPairEntry_self μ v W)
204
+ end Coulomb
205
+
206
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/OuterJoinConfiguration.lean ADDED
@@ -0,0 +1,546 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.RetainedFinePower
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ open MeasureTheory Filter
77
+ open scoped ENNReal NNReal FourierTransform SchwartzMap LineDeriv ComplexConjugate
78
+ open scoped LineDeriv
79
+ open MeasureTheory Set Metric
80
+ open scoped ENNReal NNReal RealInnerProductSpace
81
+ open MeasureTheory Set Metric Filter
82
+ open scoped ENNReal NNReal RealInnerProductSpace Convolution
83
+ open MeasureTheory Set Filter
84
+ open scoped ENNReal NNReal ComplexConjugate
85
+ open MeasureTheory Set Filter
86
+ open scoped ENNReal NNReal ContDiff
87
+ open MeasureTheory Set Filter
88
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal ComplexConjugate Pointwise
89
+ open MeasureTheory Set Filter
90
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
91
+ open MeasureTheory Set Filter
92
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
93
+ open MeasureTheory Set Filter
94
+ open scoped Classical SchwartzMap ENNReal NNReal Pointwise
95
+ open MeasureTheory Set Filter
96
+ open scoped Classical SchwartzMap FourierTransform ENNReal NNReal Pointwise
97
+ open MeasureTheory Set Filter
98
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
99
+ open MeasureTheory Set Filter
100
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
101
+ open MeasureTheory Set Filter
102
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
103
+ open MeasureTheory Set Filter
104
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
105
+ open MeasureTheory Set Filter
106
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
107
+ open MeasureTheory Set Filter
108
+ open scoped ENNReal NNReal Classical SchwartzMap Pointwise
109
+ open MeasureTheory Set
110
+ open scoped BigOperators ENNReal
111
+ open MeasureTheory Set
112
+ open scoped BigOperators Matrix
113
+ open MeasureTheory Set
114
+ open scoped BigOperators Matrix ENNReal
115
+ open MeasureTheory Set Filter
116
+ open scoped BigOperators ENNReal NNReal Classical
117
+ open MeasureTheory Set
118
+ open scoped BigOperators ENNReal
119
+ open MeasureTheory Set
120
+ open scoped BigOperators Matrix
121
+ open MeasureTheory Set Filter
122
+ open scoped BigOperators ENNReal NNReal Classical
123
+ open MeasureTheory Set Filter
124
+ open scoped BigOperators ENNReal NNReal Classical
125
+ open MeasureTheory Set Filter
126
+ open scoped BigOperators ENNReal NNReal Classical
127
+ namespace Coulomb
128
+
129
+ def outerJoinConfiguration (m k : ℕ) :
130
+ (Configuration m × Configuration k) ≃L[ℝ] Configuration (k+m) :=
131
+ (ContinuousLinearEquiv.prodComm ℝ (Configuration m) (Configuration k)).trans
132
+ (joinConfiguration k m)
133
+ lemma outerJoinConfiguration_apply (m k : ℕ) (x : Configuration m) (y : Configuration k) :
134
+ outerJoinConfiguration m k (x,y) = joinConfiguration k m (y,x) := rfl
135
+ lemma outerJoinConfiguration_measurePreserving (m k : ℕ) :
136
+ MeasurePreserving (outerJoinConfiguration m k).toHomeomorph.toMeasurableEquiv
137
+ (volume.prod volume) volume :=
138
+ (joinConfiguration_measurePreserving k m).comp Measure.measurePreserving_swap
139
+ lemma outerJoinConfiguration_right_single (m k : ℕ) (a : Fin k × Fin 3) :
140
+ outerJoinConfiguration m k (0, EuclideanSpace.single a 1) =
141
+ EuclideanSpace.single (Fin.castAdd m a.1,a.2) 1 := by
142
+ ext ⟨i,b⟩
143
+ refine Fin.addCases ?_ ?_ i
144
+ · intro j
145
+ rw [outerJoinConfiguration_apply, joinConfiguration_left]
146
+ simp [PiLp.single_apply, Prod.ext_iff]
147
+ · intro j
148
+ rw [outerJoinConfiguration_apply, joinConfiguration_right]
149
+ simp only [PiLp.single_apply, PiLp.zero_apply, Prod.mk.injEq]
150
+ split_ifs with h
151
+ · have := congrArg (fun z : Fin (k+m) => z.val) h.1
152
+ simp only [Fin.val_castAdd, Fin.val_natAdd] at this
153
+ omega
154
+ · rfl
155
+ abbrev outerAppend {m k : ℕ} (s : Spins m) (t : Spins k) : Spins (k+m) := Fin.append t s
156
+ noncomputable def outerAppendEquiv (m k : ℕ) : Spins m × Spins k ≃ Spins (k+m) :=
157
+ (Equiv.prodComm _ _).trans (Fin.appendEquiv k m)
158
+ noncomputable def outerPerm (m : ℕ) {k : ℕ} (p : Equiv.Perm (Fin k)) :
159
+ Equiv.Perm (Fin (k+m)) :=
160
+ finSumFinEquiv.permCongr (Equiv.sumCongr p (Equiv.refl (Fin m)))
161
+ lemma outerPerm_left (m : ℕ) {k : ℕ} (p : Equiv.Perm (Fin k)) (i : Fin k) :
162
+ outerPerm m p (Fin.castAdd m i) = Fin.castAdd m (p i) := by simp [outerPerm]
163
+ lemma outerPerm_right (m : ℕ) {k : ℕ} (p : Equiv.Perm (Fin k)) (i : Fin m) :
164
+ outerPerm m p (Fin.natAdd k i) = Fin.natAdd k i := by simp [outerPerm]
165
+ lemma outerPerm_sign (m : ℕ) {k : ℕ} (p : Equiv.Perm (Fin k)) :
166
+ (outerPerm m p).sign = p.sign := by simp [outerPerm, Equiv.Perm.sign_sumCongr]
167
+ lemma append_outerPerm {m k : ℕ} (s : Spins m) (t : Spins k) (p : Equiv.Perm (Fin k)) :
168
+ outerAppend s t ∘ outerPerm m p = outerAppend s (t ∘ p) := by
169
+ funext i
170
+ refine Fin.addCases ?_ ?_ i
171
+ · intro j; simp [outerAppend, outerPerm_left]
172
+ · intro j; simp [outerAppend, outerPerm_right]
173
+ lemma permute_outer_join {m k : ℕ} (p : Equiv.Perm (Fin k)) (x : Configuration m)
174
+ (y : Configuration k) :
175
+ permute (outerPerm m p) (outerJoinConfiguration m k (x,y)) =
176
+ outerJoinConfiguration m k (x, permute p y) := by
177
+ rw [outerJoinConfiguration_apply, outerJoinConfiguration_apply]
178
+ ext ⟨i,b⟩
179
+ refine Fin.addCases ?_ ?_ i
180
+ · intro j
181
+ change joinConfiguration k m (y,x) (outerPerm m p (Fin.castAdd m j),b) = _
182
+ rw [outerPerm_left, joinConfiguration_left, joinConfiguration_left]
183
+ rfl
184
+ · intro j
185
+ change joinConfiguration k m (y,x) (outerPerm m p (Fin.natAdd k j),b) = _
186
+ rw [outerPerm_right, joinConfiguration_right, joinConfiguration_right]
187
+ lemma H1Vector.weak_partial_outerJoin {m k : ℕ} (ψ : H1Vector (k+m))
188
+ (s : Spins (k+m)) (a : Fin k × Fin 3) :
189
+ ∀ (η : Configuration m × Configuration k → ℝ), ContDiff ℝ (⊤ : ℕ∞) η →
190
+ HasCompactSupport η →
191
+ (∫ z, ψ.value s (outerJoinConfiguration m k z) *
192
+ (fderiv ℝ η z (0, EuclideanSpace.single a 1) : ℂ) ∂(volume.prod volume)) =
193
+ -(∫ z, ψ.gradient s (Fin.castAdd m a.1, a.2) (outerJoinConfiguration m k z) *
194
+ (η z : ℂ) ∂(volume.prod volume)) := by
195
+ apply weak_directional_change (outerJoinConfiguration m k) (outerJoinConfiguration_measurePreserving m k)
196
+ (0, EuclideanSpace.single a 1)
197
+ rw [outerJoinConfiguration_right_single]
198
+ exact ψ.weak_partial s (Fin.castAdd m a.1, a.2)
199
+
200
+ lemma H1Vector.outer_slices_H1 {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
201
+ ∀ᵐ x ∂(volume : Measure (Configuration m)),
202
+ (∀ t : Spins k, MemLp (fun y => ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))) 2 volume) ∧
203
+ (∀ (t : Spins k) (a : Fin k × Fin 3),
204
+ MemLp (fun y => ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
205
+ (outerJoinConfiguration m k (x,y))) 2 volume ∧
206
+ ∀ (φ : Configuration k → ℝ), ContDiff ℝ (⊤ : ℕ∞) φ → HasCompactSupport φ →
207
+ (∫ y, ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y)) *
208
+ (fderiv ℝ φ y (EuclideanSpace.single a 1) : ℂ)) =
209
+ -(∫ y, ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
210
+ (outerJoinConfiguration m k (x,y)) * (φ y : ℂ))) := by
211
+ have hV (t : Spins k) := (ψ.value_L2 (outerAppend s t)).comp_measurePreserving
212
+ (outerJoinConfiguration_measurePreserving m k)
213
+ have hG (t : Spins k) (a : Fin k × Fin 3) :=
214
+ (ψ.partial_L2 (outerAppend s t) (Fin.castAdd m a.1,a.2)).comp_measurePreserving
215
+ (outerJoinConfiguration_measurePreserving m k)
216
+ have hval : ∀ᵐ x ∂(volume : Measure (Configuration m)),
217
+ ∀ t : Spins k, MemLp (fun y => ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))) 2 volume :=
218
+ ae_all_iff.mpr (fun t => memLp_fiber_ae
219
+ (f := fun z : Configuration m × Configuration k =>
220
+ ψ.value (outerAppend s t) (outerJoinConfiguration m k z)) (hV t))
221
+ have hgrad := fun (t : Spins k) (a : Fin k × Fin 3) =>
222
+ weak_slice (hV t) (hG t a) (EuclideanSpace.single a 1)
223
+ (ψ.weak_partial_outerJoin (outerAppend s t) a)
224
+ have hall := ae_all_iff.mpr (fun t => ae_all_iff.mpr (hgrad t))
225
+ filter_upwards [hval, hall] with x hx hall
226
+ exact ⟨hx, fun t a => (hall t a).2⟩
227
+
228
+ def H1Vector.OuterSliceRegular {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
229
+ (x : Configuration m) : Prop :=
230
+ (∀ t : Spins k, MemLp (fun y => ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))) 2 volume) ∧
231
+ (∀ (t : Spins k) (a : Fin k × Fin 3),
232
+ MemLp (fun y => ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
233
+ (outerJoinConfiguration m k (x,y))) 2 volume ∧
234
+ ∀ (φ : Configuration k → ℝ), ContDiff ℝ (⊤ : ℕ∞) φ → HasCompactSupport φ →
235
+ (∫ y, ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y)) *
236
+ (fderiv ℝ φ y (EuclideanSpace.single a 1) : ℂ)) =
237
+ -(∫ y, ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
238
+ (outerJoinConfiguration m k (x,y)) * (φ y : ℂ)))
239
+
240
+ lemma H1Vector.outerSliceRegular_ae {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
241
+ ∀ᵐ x ∂volume, ψ.OuterSliceRegular s x := ψ.outer_slices_H1 s
242
+
243
+ noncomputable def H1Vector.outerSlice {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
244
+ (x : Configuration m) : H1Vector k := by
245
+ classical
246
+ exact if h : ψ.OuterSliceRegular s x then
247
+ { value := fun t y => ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))
248
+ gradient := fun t a y => ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
249
+ (outerJoinConfiguration m k (x,y))
250
+ value_L2 := h.1
251
+ partial_L2 := fun t a => (h.2 t a).1
252
+ weak_partial := fun t a => (h.2 t a).2 }
253
+ else H1Vector.zero k
254
+
255
+ lemma H1Vector.outerSlice_value {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
256
+ {x : Configuration m} (hx : ψ.OuterSliceRegular s x) (t : Spins k) (y : Configuration k) :
257
+ (ψ.outerSlice s x).value t y = ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y)) := by
258
+ simp [H1Vector.outerSlice, hx]
259
+
260
+ lemma H1Vector.outerSlice_gradient {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
261
+ {x : Configuration m} (hx : ψ.OuterSliceRegular s x) (t : Spins k) (a : Fin k × Fin 3)
262
+ (y : Configuration k) :
263
+ (ψ.outerSlice s x).gradient t a y =
264
+ ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2) (outerJoinConfiguration m k (x,y)) := by
265
+ simp [H1Vector.outerSlice, hx]
266
+
267
+ lemma mass_outerSlice_ae {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
268
+ (fun x => mass (ψ.outerSlice s x)) =ᵐ[volume]
269
+ fun x => ∑ t : Spins k, ∫ y, ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))‖^2 := by
270
+ filter_upwards [ψ.outerSliceRegular_ae s] with x hx
271
+ simp only [mass, ψ.outerSlice_value s hx]
272
+
273
+ lemma mass_outerSlice_integrable {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
274
+ Integrable (fun x => mass (ψ.outerSlice s x)) := by
275
+ apply Integrable.congr _ (mass_outerSlice_ae ψ s).symm
276
+ apply integrable_finsetSum
277
+ intro t _
278
+ have h := ((ψ.value_L2 (outerAppend s t)).comp_measurePreserving
279
+ (outerJoinConfiguration_measurePreserving m k)).integrable_norm_pow (p := 2) (by decide)
280
+ exact h.integral_prod_left
281
+
282
+ lemma integral_mass_outerSlice {m k : ℕ} (ψ : H1Vector (k+m)) :
283
+ (∑ s : Spins m, ∫ x, mass (ψ.outerSlice s x)) = mass ψ := by
284
+ calc
285
+ _ = ∑ s : Spins m, ∑ t : Spins k, ∫ z, ‖ψ.value (outerAppend s t) z‖^2 := by
286
+ apply Finset.sum_congr rfl
287
+ intro s _
288
+ rw [integral_congr_ae (mass_outerSlice_ae ψ s), integral_finsetSum]
289
+ · apply Finset.sum_congr rfl
290
+ intro t _
291
+ have h := ((ψ.value_L2 (outerAppend s t)).comp_measurePreserving
292
+ (outerJoinConfiguration_measurePreserving m k)).integrable_norm_pow (p := 2) (by decide)
293
+ change Integrable (fun z : Configuration m × Configuration k =>
294
+ ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2) (volume.prod volume) at h
295
+ rw [← integral_prod _ h]
296
+ exact (outerJoinConfiguration_measurePreserving m k).integral_comp'
297
+ (fun z => ‖ψ.value (outerAppend s t) z‖^2)
298
+ · intro t _
299
+ exact (((ψ.value_L2 (outerAppend s t)).comp_measurePreserving
300
+ (outerJoinConfiguration_measurePreserving m k)).integrable_norm_pow
301
+ (p := 2) (by decide)).integral_prod_left
302
+ _ = mass ψ := by
303
+ rw [← Fintype.sum_prod_type (f := fun st : Spins m × Spins k =>
304
+ ∫ z, ‖ψ.value (outerAppend st.1 st.2) z‖^2)]
305
+ exact Fintype.sum_equiv (outerAppendEquiv m k) _ _ (fun _ => rfl)
306
+
307
+ lemma H1Vector.outerSlice_antisymmetric {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
308
+ (hψ : ∀ (p : Equiv.Perm (Fin k)) (t : Spins k),
309
+ ∀ᵐ z ∂volume, ψ.value (outerAppend s t ∘ outerPerm m p) (permute (outerPerm m p) z) =
310
+ (((outerPerm m p).sign : ℤ) : ℂ) * ψ.value (outerAppend s t) z) :
311
+ ∀ᵐ x ∂volume, Antisymmetric (ψ.outerSlice s x) := by
312
+ have h (p : Equiv.Perm (Fin k)) (t : Spins k) :=
313
+ Measure.ae_ae_of_ae_prod ((outerJoinConfiguration_measurePreserving m k).quasiMeasurePreserving.ae (hψ p t))
314
+ have hall := ae_all_iff.mpr (fun p => ae_all_iff.mpr (h p))
315
+ filter_upwards [ψ.outerSliceRegular_ae s, hall] with x hx hxA
316
+ intro p t
317
+ filter_upwards [hxA p t] with y hy
318
+ change ψ.value (outerAppend s t ∘ outerPerm m p)
319
+ (permute (outerPerm m p) (outerJoinConfiguration m k (x,y))) =
320
+ (((outerPerm m p).sign : ℤ) : ℂ) * ψ.value (outerAppend s t)
321
+ (outerJoinConfiguration m k (x,y)) at hy
322
+ simpa only [ψ.outerSlice_value s hx, append_outerPerm, outerPerm_sign, permute_outer_join] using hy
323
+
324
+ lemma Antisymmetric.outerSlice {m k : ℕ} {ψ : H1Vector (k+m)} (hψ : Antisymmetric ψ)
325
+ (s : Spins m) : ∀ᵐ x ∂volume, Antisymmetric (ψ.outerSlice s x) :=
326
+ ψ.outerSlice_antisymmetric s (fun p t => hψ (outerPerm m p) (outerAppend s t))
327
+
328
+ lemma kinetic_outerSlice_ae {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
329
+ (fun x => kinetic (ψ.outerSlice s x)) =ᵐ[volume]
330
+ fun x => (1/2 : ℝ) * ∑ t : Spins k, ∑ a : Fin k × Fin 3,
331
+ ∫ y, ‖ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2)
332
+ (outerJoinConfiguration m k (x,y))‖^2 := by
333
+ filter_upwards [ψ.outerSliceRegular_ae s] with x hx
334
+ simp only [kinetic, ψ.outerSlice_gradient s hx]
335
+
336
+ lemma kinetic_outerSlice_integrable {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m) :
337
+ Integrable (fun x => kinetic (ψ.outerSlice s x)) := by
338
+ apply Integrable.congr _ (kinetic_outerSlice_ae ψ s).symm
339
+ apply Integrable.const_mul
340
+ apply integrable_finsetSum
341
+ intro t _
342
+ apply integrable_finsetSum
343
+ intro a _
344
+ exact (((ψ.partial_L2 (outerAppend s t) (Fin.castAdd m a.1,a.2)).comp_measurePreserving
345
+ (outerJoinConfiguration_measurePreserving m k)).integrable_norm_pow (p := 2) (by decide)).integral_prod_left
346
+
347
+ lemma integral_kinetic_outerSlice {m k : ℕ} (ψ : H1Vector (k+m)) :
348
+ (∑ s : Spins m, ∫ x, kinetic (ψ.outerSlice s x)) =
349
+ (1/2 : ℝ) * ∑ st : Spins (k+m), ∑ a : Fin k × Fin 3,
350
+ ∫ z, ‖ψ.gradient st (Fin.castAdd m a.1,a.2) z‖^2 := by
351
+ have hs (s : Spins m) : (∫ x, kinetic (ψ.outerSlice s x)) =
352
+ (1/2 : ℝ) * ∑ t : Spins k, ∑ a : Fin k × Fin 3,
353
+ ∫ z, ‖ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2) z‖^2 := by
354
+ rw [integral_congr_ae (kinetic_outerSlice_ae ψ s), integral_const_mul]
355
+ congr 1
356
+ have hi (t : Spins k) (a : Fin k × Fin 3) :
357
+ Integrable (fun z : Configuration m × Configuration k =>
358
+ ‖ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2) (outerJoinConfiguration m k z)‖^2)
359
+ (volume.prod volume) :=
360
+ ((ψ.partial_L2 (outerAppend s t) (Fin.castAdd m a.1,a.2)).comp_measurePreserving
361
+ (outerJoinConfiguration_measurePreserving m k)).integrable_norm_pow (p := 2) (by decide)
362
+ rw [integral_finsetSum _ (fun t _ => integrable_finsetSum _ (fun a _ => (hi t a).integral_prod_left))]
363
+ apply Finset.sum_congr rfl
364
+ intro t _
365
+ rw [integral_finsetSum _ (fun a _ => (hi t a).integral_prod_left)]
366
+ apply Finset.sum_congr rfl
367
+ intro a _
368
+ rw [← integral_prod _ (hi t a)]
369
+ exact (outerJoinConfiguration_measurePreserving m k).integral_comp'
370
+ (fun z => ‖ψ.gradient (outerAppend s t) (Fin.castAdd m a.1,a.2) z‖^2)
371
+ simp_rw [hs]
372
+ rw [← Finset.mul_sum, ← Fintype.sum_prod_type (f := fun st : Spins m × Spins k =>
373
+ ∑ a : Fin k × Fin 3, ∫ z, ‖ψ.gradient (outerAppend st.1 st.2) (Fin.castAdd m a.1,a.2) z‖^2)]
374
+ congr 1
375
+ exact Fintype.sum_equiv (outerAppendEquiv m k) _ _ (fun _ => rfl)
376
+
377
+ lemma potentialForm_outerSlice_ae {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
378
+ (V : Configuration k → ℝ) :
379
+ (fun x => potentialForm V (ψ.outerSlice s x)) =ᵐ[volume]
380
+ fun x => ∑ t : Spins k, ∫ y, V y * ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k (x,y))‖^2 := by
381
+ filter_upwards [ψ.outerSliceRegular_ae s] with x hx
382
+ simp only [potentialForm, ψ.outerSlice_value s hx]
383
+
384
+ lemma potentialForm_outerSlice_integrable {m k : ℕ} (ψ : H1Vector (k+m)) (s : Spins m)
385
+ (V : Configuration k → ℝ)
386
+ (hV : ∀ t : Spins k, Integrable (fun z => V ((outerJoinConfiguration m k).symm z).2 *
387
+ ‖ψ.value (outerAppend s t) z‖^2)) :
388
+ Integrable (fun x => potentialForm V (ψ.outerSlice s x)) := by
389
+ apply Integrable.congr _ (potentialForm_outerSlice_ae ψ s V).symm
390
+ apply integrable_finsetSum
391
+ intro t _
392
+ have H := ((outerJoinConfiguration_measurePreserving m k).integrable_comp_emb
393
+ (outerJoinConfiguration m k).toHomeomorph.toMeasurableEquiv.measurableEmbedding).mpr (hV t)
394
+ have H' : Integrable (fun z : Configuration m × Configuration k =>
395
+ V z.2 * ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2) (volume.prod volume) := by
396
+ change Integrable (fun z : Configuration m × Configuration k =>
397
+ V ((outerJoinConfiguration m k).symm (outerJoinConfiguration m k z)).2 *
398
+ ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2) (volume.prod volume) at H
399
+ simpa only [ContinuousLinearEquiv.symm_apply_apply] using H
400
+ exact H'.integral_prod_left
401
+
402
+ lemma integral_potentialForm_outerSlice {m k : ℕ} (ψ : H1Vector (k+m))
403
+ (V : Configuration k → ℝ)
404
+ (hV : ∀ st : Spins (k+m), Integrable (fun z => V ((outerJoinConfiguration m k).symm z).2 *
405
+ ‖ψ.value st z‖^2)) :
406
+ (∑ s : Spins m, ∫ x, potentialForm V (ψ.outerSlice s x)) =
407
+ ∑ st : Spins (k+m), ∫ z, V ((outerJoinConfiguration m k).symm z).2 * ‖ψ.value st z‖^2 := by
408
+ have hs (s : Spins m) : (∫ x, potentialForm V (ψ.outerSlice s x)) =
409
+ ∑ t : Spins k, ∫ z, V ((outerJoinConfiguration m k).symm z).2 * ‖ψ.value (outerAppend s t) z‖^2 := by
410
+ rw [integral_congr_ae (potentialForm_outerSlice_ae ψ s V)]
411
+ have hi (t : Spins k) : Integrable (fun z : Configuration m × Configuration k =>
412
+ V z.2 * ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2) (volume.prod volume) := by
413
+ have H := ((outerJoinConfiguration_measurePreserving m k).integrable_comp_emb
414
+ (outerJoinConfiguration m k).toHomeomorph.toMeasurableEquiv.measurableEmbedding).mpr
415
+ (hV (outerAppend s t))
416
+ change Integrable (fun z : Configuration m × Configuration k =>
417
+ V ((outerJoinConfiguration m k).symm (outerJoinConfiguration m k z)).2 *
418
+ ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2) (volume.prod volume) at H
419
+ simpa only [ContinuousLinearEquiv.symm_apply_apply] using H
420
+ rw [integral_finsetSum _ (fun t _ => (hi t).integral_prod_left)]
421
+ apply Finset.sum_congr rfl
422
+ intro t _
423
+ rw [← integral_prod _ (hi t)]
424
+ have H := (outerJoinConfiguration_measurePreserving m k).integral_comp'
425
+ (fun z => V ((outerJoinConfiguration m k).symm z).2 * ‖ψ.value (outerAppend s t) z‖^2)
426
+ change (∫ z : Configuration m × Configuration k,
427
+ V ((outerJoinConfiguration m k).symm (outerJoinConfiguration m k z)).2 *
428
+ ‖ψ.value (outerAppend s t) (outerJoinConfiguration m k z)‖^2 ∂volume.prod volume) = _ at H
429
+ simpa only [ContinuousLinearEquiv.symm_apply_apply] using H
430
+ simp_rw [hs]
431
+ rw [← Fintype.sum_prod_type (f := fun st : Spins m × Spins k =>
432
+ ∫ z, V ((outerJoinConfiguration m k).symm z).2 * ‖ψ.value (outerAppend st.1 st.2) z‖^2)]
433
+ exact Fintype.sum_equiv (outerAppendEquiv m k) _ _ (fun _ => rfl)
434
+
435
+ lemma outerJoinConfiguration_symm_snd (m k : ℕ) (z : Configuration (k+m)) :
436
+ ((outerJoinConfiguration m k).symm z).2 = ((joinConfiguration k m).symm z).1 := rfl
437
+ lemma outer_finePower_integrable {m k : ℕ} {b : ℝ} (hb : 0 < b)
438
+ (r : Configuration k → Finset (Fin k)) (hr : ∀ i, MeasurableSet {x | i ∈ r x})
439
+ (ψ : H1Vector (k+m)) (st : Spins (k+m)) :
440
+ Integrable (fun z => retainedFinePower b r ((outerJoinConfiguration m k).symm z).2 *
441
+ ‖ψ.value st z‖^2) := by
442
+ have hw : Integrable (fun z => ‖ψ.value st z‖^2) :=
443
+ (ψ.value_L2 st).integrable_norm_pow (p:=2) (by decide)
444
+ apply (hw.const_mul (((k:ℝ)*(b⁻¹)^3)^(2/3:ℝ)*k)).mono'
445
+ · exact ((retainedFinePower_measurable b r hr).comp
446
+ (measurable_snd.comp (outerJoinConfiguration m k).symm.continuous.measurable)).aestronglyMeasurable.mul hw.aestronglyMeasurable
447
+ · exact Eventually.of_forall fun z => by
448
+ rw [Real.norm_of_nonneg (mul_nonneg (retainedFinePower_nonneg ..) (sq_nonneg _))]
449
+ exact mul_le_mul_of_nonneg_right (retainedFinePower_bound hb r _) (sq_nonneg _)
450
+
451
+ theorem outer_block_retained_fine_kinetic_lower {m k : ℕ} (ψ : H1Vector (k+m))
452
+ (hψ : ∀ (s : Spins m) (p : Equiv.Perm (Fin k)) (t : Spins k),
453
+ ∀ᵐ z ∂volume, ψ.value (outerAppend s t ∘ outerPerm m p) (permute (outerPerm m p) z) =
454
+ (((outerPerm m p).sign : ℤ) : ℂ) * ψ.value (outerAppend s t) z)
455
+ {b : ℝ} (hb : 0 < b) (r : Configuration k → Finset (Fin k))
456
+ (hr : ∀ i, MeasurableSet {x | i ∈ r x}) :
457
+ thomasFermiCoefficient * potentialForm
458
+ (fun z => retainedFinePower b r ((outerJoinConfiguration m k).symm z).2) ψ -
459
+ ((b⁻¹)^2 * ((Real.pi^2/2)*neumannBoundary) * (k:ℝ)^(4/3:ℝ)) * mass ψ ≤ outerKinetic (m:=k) (k:=m) ψ := by
460
+ let C := (b⁻¹)^2 * ((Real.pi^2/2)*neumannBoundary) * (k:ℝ)^(4/3:ℝ)
461
+ have hs (s : Spins m) :
462
+ thomasFermiCoefficient * (∫ x, potentialForm (retainedFinePower b r) (ψ.outerSlice s x)) -
463
+ C * (∫ x, mass (ψ.outerSlice s x)) ≤ ∫ x, kinetic (ψ.outerSlice s x) := by
464
+ rw [←integral_const_mul, ←integral_const_mul,
465
+ ←integral_sub ((potentialForm_outerSlice_integrable ψ s _ (fun t => outer_finePower_integrable hb r hr ψ (outerAppend s t))).const_mul _)
466
+ ((mass_outerSlice_integrable ψ s).const_mul C)]
467
+ apply integral_mono_ae
468
+ (((potentialForm_outerSlice_integrable ψ s _ (fun t => outer_finePower_integrable hb r hr ψ (outerAppend s t))).const_mul _).sub
469
+ ((mass_outerSlice_integrable ψ s).const_mul C)) (kinetic_outerSlice_integrable ψ s)
470
+ exact (ψ.outerSlice_antisymmetric s (hψ s)).mono fun x hx =>
471
+ retained_fine_kinetic_lower_all (ψ.outerSlice s x) hx hb r hr
472
+ have H := Finset.sum_le_sum (s:=Finset.univ) (fun s _ => hs s)
473
+ simp only [Finset.sum_sub_distrib, ←Finset.mul_sum] at H
474
+ rw [integral_potentialForm_outerSlice ψ _ (outer_finePower_integrable hb r hr ψ),
475
+ integral_mass_outerSlice, integral_kinetic_outerSlice] at H
476
+ exact H
477
+ lemma ae_outer_block_position_injective (m k : ℕ) :
478
+ ∀ᵐ z : Configuration (k+m), Function.Injective (position ((outerJoinConfiguration m k).symm z).2) := by
479
+ filter_upwards [ae_position_injective (k+m)] with z hz
480
+ intro i j hij
481
+ have h : Fin.castAdd m i = Fin.castAdd m j := hz (by simpa only [outerJoinConfiguration_symm_snd, position_split_left] using hij)
482
+ exact Fin.ext (congrArg (fun z : Fin (k+m) => z.val) h)
483
+
484
+ lemma ae_outer_fine_pair_bound {m k : ℕ} {b : ℝ} (hb : 0 < b)
485
+ (r : Configuration k → Finset (Fin k)) :
486
+ ∀ᵐ z : Configuration (k+m),
487
+ retainedFineCoulomb b r ((outerJoinConfiguration m k).symm z).2 ≤
488
+ pairPotential ((outerJoinConfiguration m k).symm z).2 + ((2*Real.pi+1)/(2*b))*k := by
489
+ filter_upwards [ae_outer_block_position_injective m k] with z hz
490
+ have h := retained_fine_pair_lower hb (r ((outerJoinConfiguration m k).symm z).2)
491
+ (position ((outerJoinConfiguration m k).symm z).2) hz
492
+ have hc : ((r ((outerJoinConfiguration m k).symm z).2).card : ℝ) ≤ k := by
493
+ exact_mod_cast (show (r ((outerJoinConfiguration m k).symm z).2).card ≤ k by simpa using Finset.card_le_univ (r ((outerJoinConfiguration m k).symm z).2))
494
+ have hC : 0 ≤ (2*Real.pi+1)/(2*b) := by positivity
495
+ have hh := mul_le_mul_of_nonneg_left hc hC
496
+ change retainedFineCoulomb b r ((outerJoinConfiguration m k).symm z).2 -
497
+ ((2*Real.pi+1)/(2*b))*(r ((outerJoinConfiguration m k).symm z).2).card ≤
498
+ pairPotential ((outerJoinConfiguration m k).symm z).2 at h
499
+ linarith
500
+
501
+ lemma outer_fineCoulomb_integrable {m k : ℕ} {b : ℝ} (hb : 0 < b)
502
+ (r : Configuration k → Finset (Fin k)) (hr : ∀ i, MeasurableSet {x | i ∈ r x})
503
+ (ψ : H1Vector (k+m)) (st : Spins (k+m)) :
504
+ Integrable (fun z => retainedFineCoulomb b r ((outerJoinConfiguration m k).symm z).2 *
505
+ ‖ψ.value st z‖^2) := by
506
+ have hw : Integrable (fun z => ‖ψ.value st z‖^2) :=
507
+ (ψ.value_L2 st).integrable_norm_pow (p:=2) (by decide)
508
+ apply ((ψ.outer_pair_integrable st).add (hw.const_mul (((2*Real.pi+1)/(2*b))*k))).mono'
509
+ · exact ((retainedFineCoulomb_measurable b r hr).comp
510
+ (measurable_snd.comp (outerJoinConfiguration m k).symm.continuous.measurable)).aestronglyMeasurable.mul hw.aestronglyMeasurable
511
+ · filter_upwards [ae_outer_fine_pair_bound (m:=m) hb r] with z hz
512
+ rw [Real.norm_of_nonneg (mul_nonneg (retainedFineCoulomb_nonneg ..) (sq_nonneg _))]
513
+ simpa only [add_mul, Pi.add_apply, outerJoinConfiguration_symm_snd] using mul_le_mul_of_nonneg_right hz (sq_nonneg ‖ψ.value st z‖)
514
+
515
+ theorem outer_block_retained_fine_pair_lower {m k : ℕ} (ψ : H1Vector (k+m))
516
+ {b : ℝ} (hb : 0 < b) (r : Configuration k → Finset (Fin k))
517
+ (hr : ∀ i, MeasurableSet {x | i ∈ r x}) :
518
+ potentialForm (fun z => retainedFineCoulomb b r ((outerJoinConfiguration m k).symm z).2) ψ -
519
+ (((2*Real.pi+1)/(2*b))*k)*mass ψ ≤
520
+ potentialForm (fun z => pairPotential ((outerJoinConfiguration m k).symm z).2) ψ :=
521
+ sub_le_iff_le_add.mpr (potentialForm_le_add_const ψ (outer_fineCoulomb_integrable hb r hr ψ)
522
+ ψ.outer_pair_integrable (ae_outer_fine_pair_bound hb r))
523
+
524
+ theorem outer_block_retained_fine_energy_lower {m k : ℕ} (ψ : H1Vector (k+m))
525
+ (hψ : ∀ (s : Spins m) (p : Equiv.Perm (Fin k)) (t : Spins k),
526
+ ∀ᵐ z ∂volume, ψ.value (outerAppend s t ∘ outerPerm m p) (permute (outerPerm m p) z) =
527
+ (((outerPerm m p).sign : ℤ) : ℂ) * ψ.value (outerAppend s t) z)
528
+ {b : ℝ} (hb : 0 < b) (r : Configuration k → Finset (Fin k))
529
+ (hr : ∀ i, MeasurableSet {x | i ∈ r x}) :
530
+ thomasFermiCoefficient * potentialForm
531
+ (fun z => retainedFinePower b r ((outerJoinConfiguration m k).symm z).2) ψ +
532
+ potentialForm (fun z => retainedFineCoulomb b r ((outerJoinConfiguration m k).symm z).2) ψ -
533
+ (((b⁻¹)^2 * ((Real.pi^2/2)*neumannBoundary) * (k:ℝ)^(4/3:ℝ)) +
534
+ ((2*Real.pi+1)/(2*b))*k)*mass ψ ≤
535
+ outerKinetic (m:=k) (k:=m) ψ + potentialForm (fun z => pairPotential ((outerJoinConfiguration m k).symm z).2) ψ := by
536
+ have h1 := outer_block_retained_fine_kinetic_lower ψ hψ hb r hr
537
+ have h2 := outer_block_retained_fine_pair_lower ψ hb r hr
538
+ linarith
539
+ end Coulomb
540
+
541
+ open MeasureTheory Set Filter
542
+ open scoped BigOperators ENNReal NNReal Classical
543
+
544
+ end
545
+
546
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PairRegroup.lean ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+
3
+ namespace OAI
4
+
5
+ section
6
+ section
7
+ open MeasureTheory Set
8
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
9
+ open MeasureTheory Set Filter
10
+ open scoped ENNReal NNReal
11
+ open MeasureTheory Set Filter
12
+ open scoped ENNReal NNReal
13
+ open MeasureTheory Set
14
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
15
+ open MeasureTheory Set
16
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
17
+ open MeasureTheory Set Filter
18
+ open scoped ENNReal NNReal BigOperators Classical Topology
19
+ open MeasureTheory Set Filter
20
+ open scoped ENNReal NNReal BigOperators Classical Topology
21
+ open MeasureTheory Set Filter
22
+ open scoped ENNReal NNReal BigOperators Classical Topology
23
+ open MeasureTheory Set Filter
24
+ open scoped ENNReal NNReal BigOperators Classical Topology
25
+ open MeasureTheory Set Filter
26
+ open scoped ENNReal NNReal BigOperators Classical Topology
27
+ open MeasureTheory Set Filter
28
+ open scoped ENNReal NNReal BigOperators Classical Topology
29
+ open MeasureTheory Set Filter
30
+ open scoped ENNReal NNReal BigOperators Classical Topology
31
+ open MeasureTheory Set Filter
32
+ open scoped ENNReal NNReal BigOperators Classical Topology
33
+ open MeasureTheory Set Filter
34
+ open scoped ENNReal NNReal BigOperators Classical Topology
35
+ open MeasureTheory Set Filter
36
+ open scoped ENNReal NNReal BigOperators Classical Topology
37
+ open MeasureTheory Set Filter
38
+ open scoped ENNReal NNReal BigOperators Classical Topology
39
+ open MeasureTheory Set Filter
40
+ open scoped ENNReal NNReal BigOperators Classical Topology
41
+ namespace Coulomb
42
+ noncomputable def pairRegroup {A B C D : Type*} [MeasurableSpace A] [MeasurableSpace B]
43
+ [MeasurableSpace C] [MeasurableSpace D] : (A × B) × (C × D) ≃ᵐ (A × C) × (B × D) where
44
+ toFun p := ((p.1.1,p.2.1),(p.1.2,p.2.2))
45
+ invFun p := ((p.1.1,p.2.1),(p.1.2,p.2.2))
46
+ left_inv _ := rfl
47
+ right_inv _ := rfl
48
+ measurable_toFun := by change Measurable (fun p : (A × B) × (C × D) => ((p.1.1,p.2.1),(p.1.2,p.2.2))); fun_prop
49
+ measurable_invFun := by change Measurable (fun p : (A × C) × (B × D) => ((p.1.1,p.2.1),(p.1.2,p.2.2))); fun_prop
50
+ lemma pairRegroup_measurePreserving {A B C D : Type*} [MeasurableSpace A] [MeasurableSpace B]
51
+ [MeasurableSpace C] [MeasurableSpace D] (μa : Measure A) (μb : Measure B)
52
+ (μc : Measure C) (μd : Measure D) [SFinite μa] [SFinite μb] [SFinite μc] [SFinite μd] :
53
+ MeasurePreserving (pairRegroup : (A×B)×(C×D) ≃ᵐ (A×C)×(B×D))
54
+ ((μa.prod μb).prod (μc.prod μd)) ((μa.prod μc).prod (μb.prod μd)) := by
55
+ have h1 := measurePreserving_prodAssoc μa μb (μc.prod μd)
56
+ have h2 := (MeasurePreserving.id μa).prod (measurePreserving_prodAssoc μb μc μd).symm
57
+ have h3 := (MeasurePreserving.id μa).prod
58
+ ((Measure.measurePreserving_swap (μ := μb) (ν := μc)).prod (MeasurePreserving.id μd))
59
+ have h4 := (MeasurePreserving.id μa).prod (measurePreserving_prodAssoc μc μb μd)
60
+ have h5 := (measurePreserving_prodAssoc μa μc (μb.prod μd)).symm
61
+ exact h5.comp (h4.comp (h3.comp (h2.comp h1)))
62
+
63
+ lemma integrable_finite_count_prod {S E F : Type*} [Fintype S] [MeasurableSpace S]
64
+ [MeasurableSingletonClass S] [MeasurableSpace E] [NormedAddCommGroup F]
65
+ [NormedSpace ℝ F] {μ : Measure E} (f : S × E → F)
66
+ (hf : ∀ s, Integrable (fun x => f (s,x)) μ) : Integrable f (Measure.count.prod μ) := by
67
+ rw [Measure.prod, Measure.count,
68
+ Measure.bind_sum _ _ (measurable_of_countable _).aemeasurable]
69
+ simp only [Measure.dirac_bind (measurable_of_countable _)]
70
+ refine integrable_sum_measure (fun spin => ?_) (hasSum_fintype _).summable
71
+ exact (measurableEmbedding_prodMk_left spin).integrable_map_iff.mpr (hf spin)
72
+
73
+ lemma integral_finite_count_prod {S E F : Type*} [Fintype S] [MeasurableSpace S]
74
+ [MeasurableSingletonClass S] [MeasurableSpace E] [NormedAddCommGroup F]
75
+ [NormedSpace ℝ F] [CompleteSpace F] {μ : Measure E} [SFinite μ] (f : S × E → F)
76
+ (hf : ∀ s, Integrable (fun x => f (s,x)) μ) :
77
+ (∫ sx, f sx ∂(Measure.count.prod μ)) = ∑ s, ∫ x, f (s,x) ∂μ := by
78
+ rw [integral_prod _ (integrable_finite_count_prod f hf), integral_count]
79
+ lemma count_prod_count {S T : Type*} [Countable S] [Countable T] [MeasurableSpace S]
80
+ [MeasurableSpace T] [MeasurableSingletonClass S] [MeasurableSingletonClass T] :
81
+ (Measure.count : Measure S).prod (Measure.count : Measure T) = Measure.count := by
82
+ apply Measure.ext_of_singleton
83
+ intro st
84
+ rw [← singleton_prod_singleton, Measure.prod_prod]
85
+ simp
86
+ end Coulomb
87
+
88
+ open MeasureTheory Set Filter
89
+ open scoped ENNReal NNReal BigOperators Classical Topology
90
+
91
+ end
92
+ end
93
+
94
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PatchNegativeMean.lean ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.CorePointMeasurable
3
+ import OAI.Analysis.CoulombRadii.Variational.WeightedNegative
4
+
5
+ namespace OAI
6
+
7
+ section
8
+ section
9
+ open MeasureTheory Set Filter
10
+ open scoped ENNReal NNReal BigOperators Classical Topology
11
+ noncomputable section
12
+ namespace Coulomb
13
+
14
+ theorem exists_patch_negative_mean_bound :
15
+ ∃ C : ℝ, 0<C ∧ ∀ {J n : ℕ} (S : Nuclei J) (T : RecordedEnsemble n)
16
+ {a b t r : ℝ} (ha : 0<a) (hb : 0<b) (hsmall : 18*b≤a)
17
+ (ht : t∈Set.Icc (5*a) (6*a)) (y : Space)
18
+ (hn : ∀ j, 20*a≤‖S.position j-y‖),
19
+ T.CoreSupported {z | t≤‖z-y‖} → 0≤r → r≤a → C*(r/a)≤1/2 →
20
+ ∀ (χ : Space → ℝ) (K M : ℝ), 0≤K → 0<M → Measurable χ →
21
+ (∀ z, 0≤χ z ∧ χ z≤K) → (∀ z, χ z≠0 → ‖z-y‖≤r) →
22
+ (∀ p s, ∀ᵐ x, mass ((T.vector p).coreSlice s x)≠0 →
23
+ M≤∫ z, retainedFineDensity b (patchRetained y t b x) (position x) z*χ z) →
24
+ (∀ p s, Integrable (fun x => mass ((T.vector p).coreSlice s x)*
25
+ max (-patchTFScreenedField S ((T.vector p).coreSlice s x).normalized ha hb ht.2 y hn y) 0)) ∧
26
+ (∑ p, sliceExpectation (T.vector p) (fun s x =>
27
+ max (-patchTFScreenedField S ((T.vector p).coreSlice s x).normalized ha hb ht.2 y hn y) 0))≤
28
+ (2*K/M)*(∑ p, sliceExpectation (T.vector p) (patchSliceTFGap S (T.vector p) ha hb ht.2 y hn))+
29
+ (2*(C*(r/a))*(a^4)⁻¹)*T.totalMass := by
30
+ obtain ⟨C,hC,H⟩ := exists_patch_negative_center_bound
31
+ refine ⟨C,hC,?_⟩
32
+ intro J n S T a b t r ha hb hsmall ht y hn hcs hr hra hθ χ K M hK hM hχm hχ hs hmass
33
+ let Y := fun p s x => max (-patchTFScreenedField S ((T.vector p).coreSlice s x).normalized ha hb ht.2 y hn y) 0
34
+ let G := fun p s x => patchSliceTFGap S (T.vector p) ha hb ht.2 y hn s x
35
+ let A := 2*K/M
36
+ let d := 2*(C*(r/a))*(a^4)⁻¹
37
+ have hcs' (p : T.index) (s : Spins (T.out p)) : ∀ᵐ x,
38
+ SpatiallySupported ((T.vector p).coreSlice s x).normalized {z | t≤‖z-y‖} :=
39
+ ((hcs p).coreSlice s).mono (fun _ hx => hx.normalized)
40
+ have hGi (p : T.index) (s : Spins (T.out p)) :
41
+ Integrable (fun x => mass ((T.vector p).coreSlice s x)*G p s x) :=
42
+ patchSliceTFGap_weight_integrable S (T.vector p) ha hb ht.2 y hn s (hcs' p s)
43
+ have hYm (p : T.index) (s : Spins (T.out p)) : AEStronglyMeasurable (Y p s) volume :=
44
+ (patchTFScreenedField_slice_aestronglyMeasurable S (T.vector p) s ha hb ht.2 y hn y).neg.sup aestronglyMeasurable_const
45
+ have hY0 (p : T.index) (s : Spins (T.out p)) : ∀ᵐ x, 0≤Y p s x :=
46
+ Eventually.of_forall (fun _ => le_max_right _ _)
47
+ have hbound (p : T.index) (s : Spins (T.out p)) : ∀ᵐ x,
48
+ mass ((T.vector p).coreSlice s x)≠0 → Y p s x≤A*G p s x+d := by
49
+ filter_upwards [hcs' p s,hmass p s] with x hx hm
50
+ intro hw
51
+ apply H S ((T.vector p).coreSlice s x).normalized ha hb hsmall ht y hx hn hr hra hθ x χ K M hK hM
52
+ (Eventually.of_forall hχ) _ hs (hm hw)
53
+ exact (retainedFineDensity_integrable hb _ _).mul_bdd hχm.aestronglyMeasurable
54
+ (Eventually.of_forall (fun z => by rw [Real.norm_of_nonneg (hχ z).1]; exact (hχ z).2))
55
+ have hYi (p : T.index) (s : Spins (T.out p)) :
56
+ Integrable (fun x => mass ((T.vector p).coreSlice s x)*Y p s x) :=
57
+ NeutralAtom.weighted_nonneg_integrable_of_le (mass_coreSlice_integrable (T.vector p) s)
58
+ (Eventually.of_forall (fun _ => mass_nonneg _)) (hYm p s) (hY0 p s) (hGi p s) (hbound p s)
59
+ refine ⟨hYi,?_⟩
60
+ have hmean (p : T.index) : sliceExpectation (T.vector p) (Y p)≤
61
+ A*sliceExpectation (T.vector p) (G p)+d*mass (T.vector p) := by
62
+ have HH := Finset.sum_le_sum (s := Finset.univ) (fun s _ =>
63
+ NeutralAtom.weighted_integral_le (mass_coreSlice_integrable (T.vector p) s)
64
+ (Eventually.of_forall (fun _ => mass_nonneg _)) (hYm p s) (hY0 p s) (hGi p s) (hbound p s))
65
+ simpa only [Finset.sum_add_distrib,←Finset.mul_sum,integral_mass_coreSlice,sliceExpectation] using HH
66
+ have HH := Finset.sum_le_sum (s := Finset.univ) (fun p _ => hmean p)
67
+ simpa only [Finset.sum_add_distrib,←Finset.mul_sum,RecordedEnsemble.totalMass,Y,G,A,d] using HH
68
+
69
+ end Coulomb
70
+ end
71
+
72
+ end
73
+ end
74
+
75
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PatchRawTransfer.lean ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.CoulombTransfer
3
+ import OAI.Analysis.CoulombRadii.Packets.FineNear
4
+
5
+ namespace OAI
6
+
7
+ section
8
+ section
9
+ open MeasureTheory Set Filter
10
+ open scoped ENNReal NNReal BigOperators Classical Topology
11
+ noncomputable section
12
+ namespace Coulomb
13
+
14
+ lemma sqrt_young (x : ℝ) (hx : 0≤x) {ε : ℝ} (hε : 0<ε) :
15
+ Real.sqrt x≤ε+x/(4*ε) := by
16
+ have h := sq_nonneg (Real.sqrt x-2*ε)
17
+ rw [sub_sq,Real.sq_sqrt hx] at h
18
+ have he : x/(4*ε)*(4*ε)=x := div_mul_cancel₀ _ (by positivity)
19
+ apply (mul_le_mul_iff_of_pos_right (show 0<4*ε by positivity)).mp
20
+ nlinarith
21
+
22
+ theorem patch_raw_field_transfer {J m k : ℕ} (S : Nuclei J) (u : H1Vector (m+k))
23
+ {a b t r : ℝ} (ha : 0<a) (hb : 0<b) (hsmall : 18*b≤a)
24
+ (ht : t∈Set.Icc (5*a) (6*a)) (y : Space)
25
+ (hn : ∀ j, 20*a≤‖S.position j-y‖) (hr : 0<r) (hra : r≤a)
26
+ (spin : Spins m) (x : Configuration m)
27
+ (hcs : SpatiallySupported (u.coreSlice spin x).normalized {z | t≤‖z-y‖})
28
+ (hxy : ∀ i,position x i≠y) :
29
+ |(coreScreenedField S (u.coreSlice spin x).normalized y-nuclearPotential (unitNucleus y) x)-
30
+ patchTFScreenedField S (u.coreSlice spin x).normalized ha hb ht.2 y hn y|≤
31
+ Real.sqrt ((5/r)*patchSliceTFGap S u ha hb ht.2 y hn spin x)+
32
+ nearPotential y (r+2*b) x+nearPotential y (2*b) x+
33
+ ((deletedLabels (patchRetained y t b) x).card:ℝ)/a+
34
+ ((tfInteriorConstant thomasFermiKineticConstant/
35
+ (thomasFermiKineticConstant*(5/3:ℝ)))^(3/2:ℝ)/a^6)*(2*Real.pi*r^2) := by
36
+ let σ := retainedFineDensity b (patchRetained y t b x) (position x)
37
+ let W := coreTFField S (u.coreSlice spin x).normalized measurableSet_ball ha
38
+ (patch_nucleus_separation S ha hb ht.2 y hn)
39
+ have hf := patch_potential_transfer S u ha hb hsmall ht y hn hr hra spin x hcs
40
+ have hn' := retainedFine_near_le hb y r (patchRetained y t b x) x hxy
41
+ have hdiff := patchFine_raw_deficit (t := t) hb ha (by linarith [ht.1]) y x hxy
42
+ have ht' := abs_sub_le (nuclearPotential (unitNucleus y) x) (NeutralAtom.potentialOf σ y)
43
+ (tfPotential (localTFMinimizer measurableSet_ball W) y)
44
+ rw [abs_of_nonneg hdiff.1] at ht'
45
+ have he : |(coreScreenedField S (u.coreSlice spin x).normalized y-nuclearPotential (unitNucleus y) x)-
46
+ patchTFScreenedField S (u.coreSlice spin x).normalized ha hb ht.2 y hn y|=
47
+ |nuclearPotential (unitNucleus y) x-tfPotential (localTFMinimizer measurableSet_ball W) y| := by
48
+ unfold patchTFScreenedField
49
+ rw [show (coreScreenedField S (u.coreSlice spin x).normalized y-nuclearPotential (unitNucleus y) x)-
50
+ (coreScreenedField S (u.coreSlice spin x).normalized y-tfPotential
51
+ (localTFMinimizer measurableSet_ball W) y)=
52
+ -(nuclearPotential (unitNucleus y) x-tfPotential (localTFMinimizer measurableSet_ball W) y) by ring,
53
+ abs_neg]
54
+ rw [he]
55
+ have heint : (∫ z in Metric.ball y r,σ z*coulombKernel (y-z))=
56
+ (∫ z in Metric.ball y r,coulombKernel (y-z)*σ z) := by
57
+ apply integral_congr_ae
58
+ exact Eventually.of_forall (fun z => mul_comm _ _)
59
+ dsimp only [σ,W] at ht' heint
60
+ dsimp only at hf
61
+ rw [heint] at hf
62
+ linarith
63
+ end Coulomb
64
+ end
65
+
66
+ end
67
+ end
68
+
69
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PermOrCompSwapOffTwo.lean ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.DeterminantWave
3
+
4
+ namespace OAI
5
+
6
+ section
7
+ section
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ namespace Coulomb
35
+
36
+ lemma perm_eq_or_comp_swap_of_eq_off_two {α : Type*} [DecidableEq α]
37
+ (p q : Equiv.Perm α) (i j : α) (_hij : i ≠ j)
38
+ (h : ∀ k, k ≠ i → k ≠ j → p k = q k) :
39
+ q = p ∨ q = p * Equiv.swap i j := by
40
+ by_cases hi : p i = q i
41
+ · left
42
+ symm
43
+ apply perm_eq_of_eq_off p q j
44
+ intro k hkj
45
+ by_cases hki : k = i
46
+ · simpa only [hki] using hi
47
+ · exact h k hki hkj
48
+ · right
49
+ have hki : q.symm (p i) ≠ i := by
50
+ intro he
51
+ apply hi
52
+ simpa only [he] using (q.apply_symm_apply (p i)).symm
53
+ have hkj : q.symm (p i) = j := by
54
+ by_contra he
55
+ have H : p (q.symm (p i)) = p i := (h _ hki he).trans (q.apply_symm_apply _)
56
+ exact hki (p.injective H)
57
+ have hji : p i = q j := by simpa only [hkj] using (q.apply_symm_apply (p i)).symm
58
+ have hE : p = q * Equiv.swap i j := by
59
+ apply perm_eq_of_eq_off p (q * Equiv.swap i j) j
60
+ intro k hkj'
61
+ by_cases hki' : k = i
62
+ · subst k
63
+ simpa only [Equiv.Perm.mul_apply, Equiv.swap_apply_left] using hji
64
+ · simpa only [Equiv.Perm.mul_apply, Equiv.swap_apply_of_ne_of_ne hki' hkj'] using h k hki' hkj'
65
+ rw [hE, mul_assoc, Equiv.swap_mul_self, mul_one]
66
+
67
+ lemma perm_mul_swap_ne {α : Type*} [DecidableEq α] (p : Equiv.Perm α)
68
+ (i j : α) (hij : i ≠ j) : p * Equiv.swap i j ≠ p := by
69
+ intro h
70
+ have H := congrArg (fun r : Equiv.Perm α => r i) h
71
+ simp only [Equiv.Perm.mul_apply, Equiv.swap_apply_left] at H
72
+ exact hij (p.injective H).symm
73
+
74
+ lemma permutation_second_minor {α : Type*} [Fintype α] [DecidableEq α]
75
+ (p q : Equiv.Perm α) (i j : α) (hij : i ≠ j) :
76
+ (∏ k ∈ (Finset.univ.erase i).erase j, if p k = q k then (1 : ℂ) else 0) =
77
+ (if q = p then 1 else 0) + (if q = p * Equiv.swap i j then 1 else 0) := by
78
+ by_cases h1 : q = p
79
+ · subst q
80
+ simp [Ne.symm (perm_mul_swap_ne p i j hij)]
81
+ by_cases h2 : q = p * Equiv.swap i j
82
+ · rw [ite_eq_right h1, ite_eq_left h2, zero_add]
83
+ apply Finset.prod_eq_one
84
+ intro k hk
85
+ obtain ⟨hkj,hki,_⟩ := Finset.mem_erase.mp hk |>.imp_right Finset.mem_erase.mp
86
+ simp only [h2, Equiv.Perm.mul_apply, Equiv.swap_apply_of_ne_of_ne hki hkj, ite_true]
87
+ · rw [ite_eq_right h1, ite_eq_right h2, zero_add]
88
+ obtain ⟨k,hki,hkj,hk⟩ : ∃ k, k ≠ i ∧ k ≠ j ∧ p k ≠ q k := by
89
+ by_contra he
90
+ have h := perm_eq_or_comp_swap_of_eq_off_two p q i j hij (fun k hki hkj => by
91
+ by_contra hk
92
+ exact he ⟨k,hki,hkj,hk⟩)
93
+ exact h.elim h1 h2
94
+ exact Finset.prod_eq_zero (Finset.mem_erase.mpr ⟨hkj,Finset.mem_erase.mpr ⟨hki,Finset.mem_univ _⟩⟩)
95
+ (ite_eq_right hk)
96
+
97
+ lemma sign_star_mul_swap {n : ℕ} (p : Equiv.Perm (Fin n)) (i j : Fin n) (hij : i ≠ j) :
98
+ star (((p.sign : ℤ) : ℂ)) * ((((p * Equiv.swap i j).sign : ℤ) : ℂ)) = -1 := by
99
+ rw [map_mul, Equiv.Perm.sign_swap hij]
100
+ simp only [Units.val_mul, Units.val_neg, Units.val_one, Int.cast_mul, Int.cast_neg,
101
+ Int.cast_one, ← mul_assoc, sign_star_mul, one_mul]
102
+
103
+ lemma pair_minor_trace {n : ℕ} (K : Fin n → Fin n → Fin n → Fin n → ℂ)
104
+ (p : Equiv.Perm (Fin n)) (i j : Fin n) (hij : i ≠ j) :
105
+ (∑ q : Equiv.Perm (Fin n), star (((p.sign : ℤ) : ℂ)) * (((q.sign : ℤ) : ℂ)) *
106
+ (K (p i) (p j) (q i) (q j) *
107
+ ∏ k ∈ (Finset.univ.erase i).erase j, if p k = q k then (1:ℂ) else 0)) =
108
+ K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i) := by
109
+ simp_rw [permutation_second_minor p _ i j hij, mul_add, Finset.sum_add_distrib]
110
+ have h1 : (∑ q : Equiv.Perm (Fin n), star (((p.sign : ℤ) : ℂ)) * (((q.sign : ℤ) : ℂ)) *
111
+ (K (p i) (p j) (q i) (q j) * (if q = p then 1 else 0))) = K (p i) (p j) (p i) (p j) := by
112
+ rw [Finset.sum_eq_single p]
113
+ · simp only [ite_true, mul_one, sign_star_mul, one_mul]
114
+ · intro q _ hq
115
+ simp only [ite_eq_right hq, mul_zero]
116
+ · simp
117
+ have h2 : (∑ q : Equiv.Perm (Fin n), star (((p.sign : ℤ) : ℂ)) * (((q.sign : ℤ) : ℂ)) *
118
+ (K (p i) (p j) (q i) (q j) * (if q = p * Equiv.swap i j then 1 else 0))) =
119
+ -K (p i) (p j) (p j) (p i) := by
120
+ rw [Finset.sum_eq_single (p * Equiv.swap i j)]
121
+ · simp only [ite_true, mul_one, sign_star_mul_swap p i j hij, neg_one_mul,
122
+ Equiv.Perm.mul_apply, Equiv.swap_apply_left, Equiv.swap_apply_right]
123
+ · intro q _ hq
124
+ simp only [ite_eq_right hq, mul_zero]
125
+ · simp
126
+ rw [h1,h2,sub_eq_add_neg]
127
+
128
+ lemma pair_trace_reindex {n : ℕ} (K : Fin n → Fin n → Fin n → Fin n → ℂ)
129
+ (p : Equiv.Perm (Fin n)) :
130
+ (∑ i, ∑ j ∈ Finset.univ.erase i,
131
+ (K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i))) =
132
+ ∑ i, ∑ j, (K i j i j - K i j j i) := by
133
+ have he (i : Fin n) : (∑ j ∈ Finset.univ.erase i,
134
+ (K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i))) =
135
+ ∑ j, (K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i)) := by
136
+ rw [Finset.sum_erase_eq_sub (Finset.mem_univ i)]
137
+ simp only [sub_self, sub_zero]
138
+ simp_rw [he]
139
+ have hi (i : Fin n) : (∑ j, (K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i))) =
140
+ ∑ j, (K (p i) j (p i) j - K (p i) j j (p i)) :=
141
+ Equiv.sum_comp p (fun j => K (p i) j (p i) j - K (p i) j j (p i))
142
+ simp_rw [hi]
143
+ exact Equiv.sum_comp p (fun i => ∑ j, (K i j i j - K i j j i))
144
+
145
+ lemma slater_two_body_trace_algebra {n : ℕ} (K : Fin n → Fin n → Fin n → Fin n → ℂ) :
146
+ (∑ p : Equiv.Perm (Fin n), ∑ q : Equiv.Perm (Fin n),
147
+ star (((p.sign : ℤ) : ℂ)) * (((q.sign : ℤ) : ℂ)) *
148
+ ∑ i, ∑ j ∈ Finset.univ.erase i,
149
+ K (p i) (p j) (q i) (q j) *
150
+ ∏ k ∈ (Finset.univ.erase i).erase j, if p k = q k then (1:ℂ) else 0) =
151
+ (n.factorial : ℂ) * ∑ i, ∑ j, (K i j i j - K i j j i) := by
152
+ have hp (p : Equiv.Perm (Fin n)) :
153
+ (∑ q : Equiv.Perm (Fin n), star (((p.sign : ℤ) : ℂ)) * (((q.sign : ℤ) : ℂ)) *
154
+ ∑ i, ∑ j ∈ Finset.univ.erase i,
155
+ K (p i) (p j) (q i) (q j) *
156
+ ∏ k ∈ (Finset.univ.erase i).erase j, if p k = q k then (1:ℂ) else 0) =
157
+ ∑ i, ∑ j, (K i j i j - K i j j i) := by
158
+ simp_rw [Finset.mul_sum]
159
+ rw [Finset.sum_comm]
160
+ calc
161
+ _ = ∑ i, ∑ j ∈ Finset.univ.erase i,
162
+ (K (p i) (p j) (p i) (p j) - K (p i) (p j) (p j) (p i)) := by
163
+ apply Finset.sum_congr rfl
164
+ intro i _
165
+ rw [Finset.sum_comm]
166
+ apply Finset.sum_congr rfl
167
+ intro j hj
168
+ exact pair_minor_trace K p i j (Finset.mem_erase.mp hj).1.symm
169
+ _ = _ := pair_trace_reindex K p
170
+ simp_rw [hp]
171
+ simp only [Finset.sum_const, Finset.card_univ, Fintype.card_perm, Fintype.card_fin,
172
+ nsmul_eq_mul]
173
+
174
+ end Coulomb
175
+
176
+ open MeasureTheory Set Filter
177
+ open scoped ENNReal NNReal BigOperators Classical Topology
178
+ namespace Coulomb
179
+
180
+ noncomputable def pairIndexEquiv {I : Type*} [DecidableEq I] (i j : I) (hij : i ≠ j) :
181
+ Fin 2 ≃ {k : I // k = i ∨ k = j} where
182
+ toFun b := if b = 0 then ⟨i, Or.inl rfl⟩ else ⟨j, Or.inr rfl⟩
183
+ invFun k := if k.1 = i then 0 else 1
184
+ left_inv b := by fin_cases b <;> simp [Ne.symm hij]
185
+ right_inv k := by
186
+ rcases k with ⟨k,hk | hk⟩ <;> subst k <;> simp [Ne.symm hij]
187
+
188
+ noncomputable def pairSelectedEquiv {I A : Type*} [DecidableEq I] [MeasurableSpace A]
189
+ (i j : I) (hij : i ≠ j) : ({k : I // k = i ∨ k = j} → A) ≃ᵐ (A × A) :=
190
+ (MeasurableEquiv.piCongrLeft (fun _ : {k : I // k = i ∨ k = j} => A)
191
+ (pairIndexEquiv i j hij)).symm.trans MeasurableEquiv.finTwoArrow
192
+
193
+ noncomputable def pairSplit {I A : Type*} [DecidableEq I] [MeasurableSpace A]
194
+ (i j : I) (hij : i ≠ j) : (I → A) ≃ᵐ (A × A) × ({k : I // ¬ (k = i ∨ k = j)} → A) :=
195
+ (MeasurableEquiv.piEquivPiSubtypeProd (fun _ : I => A) (fun k => k = i ∨ k = j)).trans
196
+ ((pairSelectedEquiv i j hij).prodCongr (MeasurableEquiv.refl _))
197
+
198
+ lemma pairSplit_first {I A : Type*} [DecidableEq I] [MeasurableSpace A]
199
+ (i j : I) (hij : i ≠ j) (x : I → A) : ((pairSplit i j hij) x).1.1 = x i := by
200
+ change x ((pairIndexEquiv i j hij) 0).1 = x i
201
+ simp [pairIndexEquiv]
202
+
203
+ lemma pairSplit_second {I A : Type*} [DecidableEq I] [MeasurableSpace A]
204
+ (i j : I) (hij : i ≠ j) (x : I → A) : ((pairSplit i j hij) x).1.2 = x j := by
205
+ change x ((pairIndexEquiv i j hij) 1).1 = x j
206
+ simp [pairIndexEquiv]
207
+
208
+ lemma pairSplit_rest {I A : Type*} [DecidableEq I] [MeasurableSpace A]
209
+ (i j : I) (hij : i ≠ j) (x : I → A) (k : {k : I // ¬ (k = i ∨ k = j)}) :
210
+ ((pairSplit i j hij) x).2 k = x k := rfl
211
+
212
+ lemma pairSplit_measurePreserving {I A : Type*} [Fintype I] [DecidableEq I] [MeasurableSpace A]
213
+ (μ : Measure A) [SigmaFinite μ] (i j : I) (hij : i ≠ j) :
214
+ MeasurePreserving (pairSplit (A := A) i j hij) (Measure.pi fun _ => μ)
215
+ ((μ.prod μ).prod (Measure.pi fun _ => μ)) := by
216
+ have hp : MeasurePreserving (pairSelectedEquiv (A := A) i j hij)
217
+ (Measure.pi fun _ => μ) (μ.prod μ) :=
218
+ (measurePreserving_finTwoArrow μ).comp
219
+ ((measurePreserving_piCongrLeft (fun _ => μ) (pairIndexEquiv i j hij)).symm)
220
+ exact (hp.prod (MeasurePreserving.id _)).comp
221
+ (measurePreserving_piEquivPiSubtypeProd (fun _ => μ) (fun k => k = i ∨ k = j))
222
+
223
+ lemma prod_erase_pair {I : Type*} [Fintype I] [DecidableEq I] (i j : I) (hij : i ≠ j)
224
+ (f : I → ℂ) :
225
+ (∏ k, f k) = (f i * f j) * ∏ k : {k : I // ¬ (k = i ∨ k = j)}, f k := by
226
+ rw [← Finset.mul_prod_erase Finset.univ f (Finset.mem_univ i),
227
+ ← Finset.mul_prod_erase (Finset.univ.erase i) f (Finset.mem_erase.mpr ⟨Ne.symm hij, Finset.mem_univ j⟩),
228
+ ← mul_assoc]
229
+ congr 1
230
+ exact Finset.prod_subtype ((Finset.univ.erase i).erase j) (fun k => by simp [and_comm]) f
231
+
232
+ lemma pair_weight_tensor_integrable {I A : Type*} [Fintype I] [DecidableEq I]
233
+ [MeasurableSpace A] {μ : Measure A} [SigmaFinite μ] (i j : I) (hij : i ≠ j)
234
+ (f : I → A → ℂ) (w : A → A → ℂ) (hf : ∀ k, Integrable (f k) μ)
235
+ (hw : Integrable (fun ab : A × A => w ab.1 ab.2 * (f i ab.1 * f j ab.2)) (μ.prod μ)) :
236
+ Integrable (fun x : I → A => w (x i) (x j) * ∏ k, f k (x k)) (Measure.pi fun _ => μ) := by
237
+ have hR : Integrable (fun x : {k : I // ¬ (k = i ∨ k = j)} → A => ∏ k : {k : I // ¬ (k = i ∨ k = j)}, f k (x k))
238
+ (Measure.pi fun _ => μ) := Integrable.fintype_prod (fun k => hf k)
239
+ have h := (pairSplit_measurePreserving μ i j hij).integrable_comp_of_integrable (hw.mul_prod hR)
240
+ convert h using 1
241
+ funext x
242
+ simp only [Function.comp_apply, pairSplit_first, pairSplit_second, pairSplit_rest,
243
+ prod_erase_pair i j hij]
244
+ ring
245
+
246
+ lemma pair_weight_tensor_integral {I A : Type*} [Fintype I] [DecidableEq I]
247
+ [MeasurableSpace A] {μ : Measure A} [SigmaFinite μ] (i j : I) (hij : i ≠ j)
248
+ (f : I → A → ℂ) (w : A → A → ℂ) :
249
+ (∫ x : I → A, w (x i) (x j) * ∏ k, f k (x k) ∂(Measure.pi fun _ => μ)) =
250
+ (∫ ab : A × A, w ab.1 ab.2 * (f i ab.1 * f j ab.2) ∂(μ.prod μ)) *
251
+ ∏ k ∈ (Finset.univ.erase i).erase j, ∫ a, f k a ∂μ := by
252
+ have he (x : I → A) : w (x i) (x j) * ∏ k, f k (x k) =
253
+ (w ((pairSplit i j hij) x).1.1 ((pairSplit i j hij) x).1.2 *
254
+ (f i ((pairSplit i j hij) x).1.1 * f j ((pairSplit i j hij) x).1.2)) *
255
+ ∏ k : {k : I // ¬ (k = i ∨ k = j)}, f k (((pairSplit i j hij) x).2 k) := by
256
+ simp only [pairSplit_first, pairSplit_second, pairSplit_rest, prod_erase_pair i j hij]
257
+ ring
258
+ simp_rw [he]
259
+ rw [(pairSplit_measurePreserving μ i j hij).integral_comp'
260
+ (fun z => (w z.1.1 z.1.2 * (f i z.1.1 * f j z.1.2)) * ∏ k : {k : I // ¬ (k = i ∨ k = j)}, f k (z.2 k)),
261
+ integral_prod_mul (fun ab : A × A => w ab.1 ab.2 * (f i ab.1 * f j ab.2))
262
+ (fun x : {k : I // ¬ (k = i ∨ k = j)} → A => ∏ k, f k.1 (x k)),
263
+ integral_fintype_prod_eq_prod]
264
+ congr 1
265
+ exact (Finset.prod_subtype ((Finset.univ.erase i).erase j) (fun k => by simp [and_comm]) (fun k => ∫ a, f k a ∂μ)).symm
266
+
267
+ end Coulomb
268
+
269
+ open MeasureTheory Set Filter
270
+ open scoped ENNReal NNReal BigOperators Classical Topology
271
+
272
+ end
273
+ end
274
+
275
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PermuteJoinBlock.lean ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FormDomain.Pullback
3
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.JoinSpins
4
+
5
+ namespace OAI
6
+
7
+ noncomputable section
8
+
9
+ open MeasureTheory Set
10
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
11
+ open MeasureTheory Set Filter
12
+ open scoped ENNReal NNReal
13
+ open MeasureTheory Set Filter
14
+ open scoped ENNReal NNReal
15
+ open MeasureTheory Set
16
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
17
+ open MeasureTheory Set
18
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
19
+ open MeasureTheory Set Filter
20
+ open scoped ENNReal NNReal BigOperators Classical Topology
21
+ open MeasureTheory Set Filter
22
+ open scoped ENNReal NNReal BigOperators Classical Topology
23
+ open MeasureTheory Set Filter
24
+ open scoped ENNReal NNReal BigOperators Classical Topology
25
+ open MeasureTheory Set Filter
26
+ open scoped ENNReal NNReal BigOperators Classical Topology
27
+ open MeasureTheory Set Filter
28
+ open scoped ENNReal NNReal BigOperators Classical Topology
29
+ open MeasureTheory Set Filter
30
+ open scoped ENNReal NNReal BigOperators Classical Topology
31
+ open MeasureTheory Set Filter
32
+ open scoped ENNReal NNReal BigOperators Classical Topology
33
+ open MeasureTheory Set Filter
34
+ open scoped ENNReal NNReal BigOperators Classical Topology
35
+ open MeasureTheory Set Filter
36
+ open scoped ENNReal NNReal BigOperators Classical Topology
37
+ open MeasureTheory Set Filter
38
+ open scoped ENNReal NNReal BigOperators Classical Topology
39
+ open MeasureTheory Set Filter
40
+ open scoped ENNReal NNReal BigOperators Classical Topology
41
+ open MeasureTheory Set Filter
42
+ open scoped ENNReal NNReal BigOperators Classical Topology
43
+ open MeasureTheory Set Filter
44
+ open scoped ENNReal NNReal BigOperators Classical Topology
45
+ open MeasureTheory Set Filter
46
+ open scoped ENNReal NNReal BigOperators Classical Topology
47
+ open MeasureTheory Set Filter
48
+ open scoped ENNReal NNReal BigOperators Classical Topology
49
+ open MeasureTheory Set Filter
50
+ open scoped ENNReal NNReal BigOperators Classical Topology
51
+ open MeasureTheory Set Filter
52
+ open scoped ENNReal NNReal BigOperators Classical Topology
53
+ open MeasureTheory Set Filter
54
+ open scoped ENNReal NNReal BigOperators Classical Topology
55
+ open MeasureTheory Set
56
+ open scoped BigOperators ENNReal ContDiff
57
+ open MeasureTheory Set Filter
58
+ open scoped ENNReal NNReal ContDiff
59
+ open MeasureTheory Set Filter
60
+ open scoped ENNReal NNReal ContDiff
61
+ open scoped Classical
62
+ namespace Coulomb
63
+ lemma permute_join_block {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k))
64
+ (x : Configuration m) (y : Configuration k) :
65
+ permute (blockHom m k (p,q)) (joinConfiguration m k (x,y)) =
66
+ joinConfiguration m k (permute p x, permute q y) := by
67
+ ext ⟨i,b⟩
68
+ refine Fin.addCases ?_ ?_ i
69
+ · intro j
70
+ change joinConfiguration m k (x,y) (blockHom m k (p,q) (Fin.castAdd k j),b) = _
71
+ rw [blockHom_left, joinConfiguration_left, joinConfiguration_left]
72
+ rfl
73
+ · intro j
74
+ change joinConfiguration m k (x,y) (blockHom m k (p,q) (Fin.natAdd m j),b) = _
75
+ rw [blockHom_right, joinConfiguration_right, joinConfiguration_right]
76
+ rfl
77
+
78
+ lemma spins_block_left {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k))
79
+ (s : Spins (m+k)) :
80
+ (s ∘ blockHom m k (p,q)) ∘ Fin.castAdd k = (s ∘ Fin.castAdd k) ∘ p := by
81
+ funext i
82
+ simp [Function.comp_def, blockHom_left]
83
+ lemma spins_block_right {m k : ℕ} (p : Equiv.Perm (Fin m)) (q : Equiv.Perm (Fin k))
84
+ (s : Spins (m+k)) :
85
+ (s ∘ blockHom m k (p,q)) ∘ Fin.natAdd m = (s ∘ Fin.natAdd m) ∘ q := by
86
+ funext i
87
+ simp [Function.comp_def, blockHom_right]
88
+
89
+ lemma tensor_block_covariance {m k : ℕ} (u : H1Vector m) (v : H1Vector k)
90
+ (hu : Antisymmetric u) (hv : Antisymmetric v)
91
+ (h : Equiv.Perm (Fin (m+k))) (hh : h ∈ blockGroup m k) (s : Spins (m+k)) :
92
+ (u.tensor v).permutation h |>.value s =ᵐ[volume]
93
+ fun x => ((h.sign : ℤ) : ℂ)*(u.tensor v).value s x := by
94
+ rcases hh with ⟨⟨p,q⟩,rfl⟩
95
+ have H1 : ∀ᵐ z : Configuration m × Configuration k ∂(volume.prod volume),
96
+ u.value ((s ∘ Fin.castAdd k) ∘ p) (permute p z.1) =
97
+ ((p.sign : ℤ) : ℂ)*u.value (s ∘ Fin.castAdd k) z.1 :=
98
+ Measure.quasiMeasurePreserving_fst.ae (hu p (s ∘ Fin.castAdd k))
99
+ have H2 : ∀ᵐ z : Configuration m × Configuration k ∂(volume.prod volume),
100
+ v.value ((s ∘ Fin.natAdd m) ∘ q) (permute q z.2) =
101
+ ((q.sign : ℤ) : ℂ)*v.value (s ∘ Fin.natAdd m) z.2 :=
102
+ Measure.quasiMeasurePreserving_snd.ae (hv q (s ∘ Fin.natAdd m))
103
+ have H1' := (joinConfiguration_symm_measurePreserving m k).quasiMeasurePreserving.ae H1
104
+ have H2' := (joinConfiguration_symm_measurePreserving m k).quasiMeasurePreserving.ae H2
105
+ filter_upwards [H1',H2'] with x hx hy
106
+ obtain ⟨⟨x,y⟩,rfl⟩ := (joinConfiguration m k).surjective x
107
+ have hez : (joinConfiguration m k).symm.toHomeomorph.toMeasurableEquiv
108
+ ((joinConfiguration m k) (x,y)) = (x,y) :=
109
+ (joinConfiguration m k).symm_apply_apply (x,y)
110
+ rw [hez] at hx hy
111
+ change u.value ((s ∘ Fin.castAdd k) ∘ p) (permute p x) =
112
+ ((p.sign : ℤ) : ℂ)*u.value (s ∘ Fin.castAdd k) x at hx
113
+ change v.value ((s ∘ Fin.natAdd m) ∘ q) (permute q y) =
114
+ ((q.sign : ℤ) : ℂ)*v.value (s ∘ Fin.natAdd m) y at hy
115
+ rw [permutation_value]
116
+ change tensorValue u v (s ∘ blockHom m k (p,q))
117
+ (permute (blockHom m k (p,q)) (joinConfiguration m k (x,y))) =
118
+ (((blockHom m k (p,q)).sign : ℤ) : ℂ)*tensorValue u v s (joinConfiguration m k (x,y))
119
+ rw [permute_join_block, tensorValue_join, tensorValue_join, spins_block_left,
120
+ spins_block_right, blockHom_sign, hx, hy]
121
+ push_cast
122
+ ring
123
+ lemma position_join_left {m k : ℕ} (x : Configuration m) (y : Configuration k) (i : Fin m) :
124
+ position (joinConfiguration m k (x,y)) (Fin.castAdd k i) = position x i := by
125
+ ext b
126
+ exact joinConfiguration_left m k x y i b
127
+ lemma position_join_right {m k : ℕ} (x : Configuration m) (y : Configuration k) (i : Fin k) :
128
+ position (joinConfiguration m k (x,y)) (Fin.natAdd m i) = position y i := by
129
+ ext b
130
+ exact joinConfiguration_right m k x y i b
131
+
132
+ lemma position_split_left {m k : ℕ} (x : Configuration (m+k)) (i : Fin m) :
133
+ position ((joinConfiguration m k).symm x).1 i = position x (Fin.castAdd k i) := by
134
+ obtain ⟨⟨y,z⟩,rfl⟩ := (joinConfiguration m k).surjective x
135
+ rw [ContinuousLinearEquiv.symm_apply_apply, position_join_left]
136
+ lemma position_split_right {m k : ℕ} (x : Configuration (m+k)) (i : Fin k) :
137
+ position ((joinConfiguration m k).symm x).2 i = position x (Fin.natAdd m i) := by
138
+ obtain ⟨⟨y,z⟩,rfl⟩ := (joinConfiguration m k).surjective x
139
+ rw [ContinuousLinearEquiv.symm_apply_apply, position_join_right]
140
+
141
+ def blockRegion (m k : ℕ) (A B : Set Space) : Set (Configuration (m+k)) :=
142
+ {x | (∀ i : Fin m, position x (Fin.castAdd k i) ∈ A) ∧
143
+ (∀ j : Fin k, position x (Fin.natAdd m j) ∈ B)}
144
+
145
+ lemma blockRegion_split {m k : ℕ} (A B : Set Space) (x : Configuration (m+k)) :
146
+ x ∈ blockRegion m k A B ↔
147
+ ((joinConfiguration m k).symm x).1 ∈ allPositions A ∧
148
+ ((joinConfiguration m k).symm x).2 ∈ allPositions B := by
149
+ simp only [blockRegion, allPositions, Set.mem_ofPred_eq, position_split_left,
150
+ position_split_right]
151
+
152
+ lemma isClosed_blockRegion {m k : ℕ} {A B : Set Space} (hA : IsClosed A) (hB : IsClosed B) :
153
+ IsClosed (blockRegion m k A B) := by
154
+ have he : blockRegion m k A B =
155
+ (⋂ i : Fin m, (fun x => position x (Fin.castAdd k i)) ⁻¹' A) ∩
156
+ (⋂ j : Fin k, (fun x => position x (Fin.natAdd m j)) ⁻¹' B) := by
157
+ ext x
158
+ simp [blockRegion]
159
+ rw [he]
160
+ exact (isClosed_iInter (fun i => hA.preimage (continuous_position _))).inter
161
+ (isClosed_iInter (fun j => hB.preimage (continuous_position _)))
162
+
163
+ lemma tensor_configSupported {m k : ℕ} (u : H1Vector m) (v : H1Vector k) (A B : Set Space)
164
+ (hu : SpatiallySupported u A) (hv : SpatiallySupported v B) :
165
+ ConfigSupported (u.tensor v) (blockRegion m k A B) := by
166
+ intro s
167
+ have H1 : ∀ᵐ z : Configuration m × Configuration k ∂(volume.prod volume),
168
+ z.1 ∉ allPositions A → u.value (s ∘ Fin.castAdd k) z.1 = 0 :=
169
+ Measure.quasiMeasurePreserving_fst.ae (hu (s ∘ Fin.castAdd k))
170
+ have H2 : ∀ᵐ z : Configuration m × Configuration k ∂(volume.prod volume),
171
+ z.2 ∉ allPositions B → v.value (s ∘ Fin.natAdd m) z.2 = 0 :=
172
+ Measure.quasiMeasurePreserving_snd.ae (hv (s ∘ Fin.natAdd m))
173
+ have H1' := (joinConfiguration_symm_measurePreserving m k).quasiMeasurePreserving.ae H1
174
+ have H2' := (joinConfiguration_symm_measurePreserving m k).quasiMeasurePreserving.ae H2
175
+ filter_upwards [H1',H2'] with x hx hy
176
+ intro hn
177
+ change u.value _ _ * v.value _ _ = 0
178
+ change ((joinConfiguration m k).symm x).1 ∉ allPositions A →
179
+ u.value (s ∘ Fin.castAdd k) ((joinConfiguration m k).symm x).1 = 0 at hx
180
+ change ((joinConfiguration m k).symm x).2 ∉ allPositions B →
181
+ v.value (s ∘ Fin.natAdd m) ((joinConfiguration m k).symm x).2 = 0 at hy
182
+ by_cases ha : ((joinConfiguration m k).symm x).1 ∈ allPositions A
183
+ · have hb : ((joinConfiguration m k).symm x).2 ∉ allPositions B :=
184
+ fun h => hn ((blockRegion_split A B x).2 ⟨ha,h⟩)
185
+ rw [hy hb, mul_zero]
186
+ · rw [hx ha, zero_mul]
187
+
188
+ lemma blockRegion_orbit_disjoint {m k : ℕ} {A B : Set Space} (hAB : Disjoint A B)
189
+ (p q : Equiv.Perm (Fin (m+k))) (hpq : p⁻¹*q ∉ blockGroup m k)
190
+ (x : Configuration (m+k)) :
191
+ ¬ (permute p x ∈ blockRegion m k A B ∧ permute q x ∈ blockRegion m k A B) := by
192
+ rcases exists_crossing_of_not_mem (p⁻¹*q) hpq with ⟨i,j,hij⟩
193
+ intro ⟨hp,hq⟩
194
+ have he : q (Fin.castAdd k i) = p (Fin.natAdd m j) := by
195
+ have H := congrArg p hij
196
+ simpa using H
197
+ have ha := hq.1 i
198
+ have hb := hp.2 j
199
+ rw [position_permute, he] at ha
200
+ rw [position_permute] at hb
201
+ exact Set.disjoint_left.1 hAB ha hb
202
+
203
+ lemma configSupported_value_orthogonal {n : ℕ} (u : H1Vector n) (R : Set (Configuration n))
204
+ (hu : ConfigSupported u R) (p q : Equiv.Perm (Fin n))
205
+ (hR : ∀ x, ¬(permute p x ��� R ∧ permute q x ∈ R)) (s : Spins n) :
206
+ ∀ᵐ x ∂volume, star ((u.permutation p).value s x)*(u.permutation q).value s x = 0 := by
207
+ have hp := (permute_measurePreserving p).quasiMeasurePreserving.ae (hu (s ∘ p))
208
+ have hq := (permute_measurePreserving q).quasiMeasurePreserving.ae (hu (s ∘ q))
209
+ filter_upwards [hp,hq] with x hx hy
210
+ rw [permutation_value, permutation_value]
211
+ by_cases hpx : permute p x ∈ R
212
+ · rw [hy (fun h => hR x ⟨hpx,h⟩), mul_zero]
213
+ · rw [hx hpx, star_zero, zero_mul]
214
+
215
+ lemma configSupported_gradient_orthogonal {n : ℕ} (u : H1Vector n) (R : Set (Configuration n))
216
+ (hu : ConfigSupported u R) (hclosed : IsClosed R) (p q : Equiv.Perm (Fin n))
217
+ (hR : ∀ x, ¬(permute p x ∈ R ∧ permute q x ∈ R)) (s : Spins n) (a : Fin n × Fin 3) :
218
+ ∀ᵐ x ∂volume, star ((u.permutation p).gradient s a x)*(u.permutation q).gradient s a x = 0 := by
219
+ have hp := (permute_measurePreserving p).quasiMeasurePreserving.ae
220
+ (hu.gradient hclosed (s ∘ p) (p.symm a.1,a.2))
221
+ have hq := (permute_measurePreserving q).quasiMeasurePreserving.ae
222
+ (hu.gradient hclosed (s ∘ q) (q.symm a.1,a.2))
223
+ filter_upwards [hp,hq] with x hx hy
224
+ rw [permutation_gradient, permutation_gradient]
225
+ by_cases hpx : permute p x ∈ R
226
+ · rw [hy (fun h => hR x ⟨hpx,h⟩), mul_zero]
227
+ · rw [hx hpx, star_zero, zero_mul]
228
+ end Coulomb
229
+
230
+ open scoped BigOperators ComplexConjugate
231
+
232
+ end
233
+
234
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PhaseRegion.lean ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FieldAnalysis.Space
3
+
4
+ namespace OAI
5
+
6
+ noncomputable section
7
+
8
+ open MeasureTheory Set
9
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
10
+ open MeasureTheory Set Filter
11
+ open scoped ENNReal NNReal
12
+ open MeasureTheory Set Filter
13
+ open scoped ENNReal NNReal
14
+ open MeasureTheory Set
15
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
16
+ open MeasureTheory Set
17
+ open scoped BigOperators ENNReal Classical NNReal ComplexConjugate
18
+ open MeasureTheory Set Filter
19
+ open scoped ENNReal NNReal BigOperators Classical Topology
20
+ open MeasureTheory Set Filter
21
+ open scoped ENNReal NNReal BigOperators Classical Topology
22
+ open MeasureTheory Set Filter
23
+ open scoped ENNReal NNReal BigOperators Classical Topology
24
+ open MeasureTheory Set Filter
25
+ open scoped ENNReal NNReal BigOperators Classical Topology
26
+ open MeasureTheory Set Filter
27
+ open scoped ENNReal NNReal BigOperators Classical Topology
28
+ open MeasureTheory Set Filter
29
+ open scoped ENNReal NNReal BigOperators Classical Topology
30
+ open MeasureTheory Set Filter
31
+ open scoped ENNReal NNReal BigOperators Classical Topology
32
+ open MeasureTheory Set Filter
33
+ open scoped ENNReal NNReal BigOperators Classical Topology
34
+ open MeasureTheory Set Filter
35
+ open scoped ENNReal NNReal BigOperators Classical Topology
36
+ open MeasureTheory Set Filter
37
+ open scoped ENNReal NNReal BigOperators Classical Topology
38
+ open MeasureTheory Set Filter
39
+ open scoped ENNReal NNReal BigOperators Classical Topology
40
+ open MeasureTheory Set Filter
41
+ open scoped ENNReal NNReal BigOperators Classical Topology
42
+ open MeasureTheory Set Filter
43
+ open scoped ENNReal NNReal BigOperators Classical Topology
44
+ open MeasureTheory Set Filter
45
+ open scoped ENNReal NNReal BigOperators Classical Topology
46
+ open MeasureTheory Set Filter
47
+ open scoped ENNReal NNReal BigOperators Classical Topology
48
+ open MeasureTheory Set Filter
49
+ open scoped ENNReal NNReal BigOperators Classical Topology
50
+ open MeasureTheory Set Filter
51
+ open scoped ENNReal NNReal BigOperators Classical Topology
52
+ open MeasureTheory Set Filter
53
+ open scoped ENNReal NNReal BigOperators Classical Topology
54
+ open MeasureTheory Set
55
+ open scoped BigOperators ENNReal ContDiff
56
+ open MeasureTheory Set Filter
57
+ open scoped ENNReal NNReal ContDiff
58
+ open MeasureTheory Set Filter
59
+ open scoped ENNReal NNReal ContDiff
60
+ open scoped Classical
61
+ open scoped BigOperators ComplexConjugate
62
+ open scoped Classical
63
+ open scoped Classical
64
+ open MeasureTheory Set Filter
65
+ open scoped Classical ENNReal NNReal ComplexConjugate
66
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
67
+ open scoped Classical ComplexConjugate
68
+ open MeasureTheory Set Filter Module Module.End TopologicalSpace Function
69
+ open scoped Classical ComplexConjugate
70
+ open MeasureTheory Set Filter
71
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
72
+ open MeasureTheory Set Filter
73
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
74
+ open MeasureTheory Set Filter
75
+ open scoped ENNReal NNReal BigOperators Classical Topology SchwartzMap FourierTransform ComplexConjugate
76
+ open MeasureTheory Filter
77
+ open scoped ENNReal NNReal FourierTransform SchwartzMap LineDeriv ComplexConjugate
78
+ open scoped LineDeriv
79
+ open MeasureTheory Set Metric
80
+ open scoped ENNReal NNReal RealInnerProductSpace
81
+ namespace Coulomb
82
+
83
+ lemma volume_real_ball_three (r : ℝ) (hr : 0 ≤ r) :
84
+ (volume : Measure Space).real (ball 0 r) = 4*Real.pi/3*r^3 := by
85
+ rw [measureReal_def, EuclideanSpace.volume_ball_fin_three, ENNReal.toReal_mul,
86
+ ENNReal.toReal_pow, ENNReal.toReal_ofReal hr, ENNReal.toReal_ofReal (by positivity)]
87
+ ring
88
+
89
+ lemma integral_ball_norm_sq_three (r : ℝ) (hr : 0 ≤ r) :
90
+ (∫ p : Space in ball 0 r, ‖p‖^2) = 4*Real.pi/5*r^5 := by
91
+ have he : (fun p : Space => (ball 0 r).indicator (fun p => ‖p‖^2) p) =
92
+ fun p : Space => (Iio r).indicator (fun t : ℝ => t^2) ‖p‖ := by
93
+ ext p
94
+ simp only [Set.indicator, mem_ball, dist_zero_right, mem_Iio]
95
+ rw [← integral_indicator measurableSet_ball, he,
96
+ integral_fun_norm_addHaar volume]
97
+ simp only [Space, finrank_euclideanSpace_fin, Nat.reduceSub,
98
+ nsmul_eq_mul, smul_eq_mul]
99
+ have hf : (fun t : ℝ => t^2 * (Iio r).indicator (fun s : ℝ => s^2) t) =
100
+ (Iio r).indicator (fun t : ℝ => t^4) := by
101
+ ext t
102
+ by_cases ht : t < r <;> simp [Set.indicator, ht]
103
+ ring
104
+ rw [hf, integral_indicator measurableSet_Iio, Measure.restrict_restrict measurableSet_Iio]
105
+ have hs : Iio r ∩ Ioi (0 : ℝ) = Ioo 0 r := by ext t; simp; tauto
106
+ rw [hs, ← integral_Ioc_eq_integral_Ioo, ← intervalIntegral.integral_of_le hr,
107
+ integral_pow, volume_real_ball_three 1 (by norm_num)]
108
+ norm_num
109
+ ring
110
+
111
+ lemma integrableOn_ball_norm_sq_three (r : ℝ) :
112
+ IntegrableOn (fun p : Space => ‖p‖^2) (ball 0 r) := by
113
+ exact (continuous_norm.pow 2).continuousOn.integrableOn_compact
114
+ (isCompact_closedBall (0 : Space) r) |>.mono_set ball_subset_closedBall
115
+
116
+ noncomputable def phaseRegion (R : Space → ℝ) : Set (Space × Space) :=
117
+ {yp | ‖yp.2‖ < R yp.1}
118
+ noncomputable def phaseMeasure (R : Space → ℝ) : Measure (Space × Space) :=
119
+ (volume.prod volume).restrict (phaseRegion R)
120
+ lemma phaseRegion_measurable {R : Space → ℝ} (hR : Measurable R) :
121
+ MeasurableSet (phaseRegion R) := by
122
+ exact measurableSet_lt measurable_snd.norm (hR.comp measurable_fst)
123
+ lemma phaseMeasure_le (R : Space → ℝ) : phaseMeasure R ≤ volume.prod volume :=
124
+ Measure.restrict_le_self
125
+
126
+ lemma phaseMeasure_lintegral {R : Space → ℝ} (hR : Measurable R)
127
+ (f : Space × Space → ℝ≥0∞) (hf : Measurable f) :
128
+ (∫⁻ yp, f yp ∂phaseMeasure R) = ∫⁻ y : Space, ∫⁻ p in ball 0 (R y), f (y,p) := by
129
+ rw [phaseMeasure, ← lintegral_indicator (phaseRegion_measurable hR),
130
+ lintegral_prod _ (hf.indicator (phaseRegion_measurable hR)).aemeasurable]
131
+ apply lintegral_congr
132
+ intro y
133
+ rw [← lintegral_indicator measurableSet_ball]
134
+ apply lintegral_congr
135
+ intro p
136
+ by_cases hnorm : ‖p‖ < R y <;> simp [phaseRegion, Set.indicator, hnorm]
137
+
138
+ lemma phaseMeasure_mass {R : Space → ℝ} (hR : Measurable R) :
139
+ phaseMeasure R univ = ∫⁻ y : Space,
140
+ ENNReal.ofReal (R y)^3 * ENNReal.ofReal (Real.pi*4/3) := by
141
+ rw [← lintegral_one, phaseMeasure_lintegral hR _ measurable_const]
142
+ simp
143
+
144
+ lemma phaseMeasure_lintegral_momentum {R : Space → ℝ} (hR : Measurable R)
145
+ (hRp : ∀ y, 0 ≤ R y) :
146
+ (∫⁻ yp, ENNReal.ofReal (‖yp.2‖^2) ∂phaseMeasure R) =
147
+ ∫⁻ y : Space, ENNReal.ofReal (4*Real.pi/5*R y^5) := by
148
+ rw [phaseMeasure_lintegral hR _ (by fun_prop)]
149
+ apply lintegral_congr
150
+ intro y
151
+ rw [← ofReal_integral_eq_lintegral_ofReal (integrableOn_ball_norm_sq_three (R y))
152
+ (Filter.Eventually.of_forall (fun p => sq_nonneg _)), integral_ball_norm_sq_three _ (hRp y)]
153
+
154
+ lemma phaseMeasure_momentum_memLp {R : Space → ℝ} (hR : Measurable R)
155
+ (hRp : ∀ y, 0 ≤ R y) (hI : Integrable (fun y => R y^5)) :
156
+ MemLp (fun yp : Space × Space => yp.2) 2 (phaseMeasure R) := by
157
+ apply (memLp_two_iff_integrable_sq_norm (by fun_prop)).mpr
158
+ refine ⟨by fun_prop, ?_⟩
159
+ rw [hasFiniteIntegral_iff_ofReal (Filter.Eventually.of_forall (fun yp => sq_nonneg _)),
160
+ phaseMeasure_lintegral_momentum hR hRp,
161
+ ← ofReal_integral_eq_lintegral_ofReal (hI.const_mul (4*Real.pi/5))
162
+ (Filter.Eventually.of_forall (fun y => mul_nonneg (by positivity) (pow_nonneg (hRp y) _)))]
163
+ exact ENNReal.ofReal_lt_top
164
+
165
+ lemma phaseMeasure_real_momentum {R : Space → ℝ} (hR : Measurable R)
166
+ (hRp : ∀ y, 0 ≤ R y) :
167
+ (∫ yp, ‖yp.2‖^2 ∂phaseMeasure R) = 4*Real.pi/5 * ∫ y : Space, R y^5 := by
168
+ rw [integral_eq_lintegral_of_nonneg_ae (Filter.Eventually.of_forall (fun yp => sq_nonneg _))
169
+ (by fun_prop), phaseMeasure_lintegral_momentum hR hRp,
170
+ ← integral_eq_lintegral_of_nonneg_ae
171
+ (Filter.Eventually.of_forall (fun y => mul_nonneg (by positivity) (pow_nonneg (hRp y) _))) (by fun_prop), integral_const_mul]
172
+
173
+ noncomputable def fermiRadius (ρ : Space → ℝ) (y : Space) : ℝ :=
174
+ (3/(8*Real.pi)*ρ y) ^ (1/3 : ℝ)
175
+ lemma fermiRadius_nonneg (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (y : Space) :
176
+ 0 ≤ fermiRadius ρ y := Real.rpow_nonneg (mul_nonneg (by positivity) (hρ y)) _
177
+ lemma fermiRadius_cube (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (y : Space) :
178
+ fermiRadius ρ y ^ 3 = 3/(8*Real.pi)*ρ y := by
179
+ rw [fermiRadius, ← Real.rpow_mul_natCast (mul_nonneg (by positivity) (hρ y))]
180
+ norm_num
181
+ lemma fermiRadius_fifth (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (y : Space) :
182
+ fermiRadius ρ y ^ 5 = (3/(8*Real.pi))^(5/3 : ℝ) * ρ y^(5/3 : ℝ) := by
183
+ rw [fermiRadius, ← Real.rpow_mul_natCast (mul_nonneg (by positivity) (hρ y)), Real.mul_rpow (by positivity) (hρ y)]
184
+ norm_num
185
+ lemma fermiRadius_measurable (ρ : Space → ℝ) (hρ : Measurable ρ) :
186
+ Measurable (fermiRadius ρ) := by
187
+ unfold fermiRadius
188
+ fun_prop
189
+ lemma fermiRadius_ball_mass (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (y : Space) :
190
+ (volume : Measure Space) (ball 0 (fermiRadius ρ y)) = ENNReal.ofReal (ρ y/2) := by
191
+ rw [EuclideanSpace.volume_ball_fin_three, ← ENNReal.ofReal_pow (fermiRadius_nonneg ρ hρ y),
192
+ ← ENNReal.ofReal_mul (pow_nonneg (fermiRadius_nonneg ρ hρ y) _), fermiRadius_cube ρ hρ y]
193
+ congr 1
194
+ field_simp
195
+ ring
196
+
197
+ lemma fermiMeasure_mass (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (hm : Measurable ρ)
198
+ (hI : Integrable ρ) :
199
+ phaseMeasure (fermiRadius ρ) univ = ENNReal.ofReal ((∫ y : Space, ρ y)/2) := by
200
+ rw [← lintegral_one, phaseMeasure_lintegral (fermiRadius_measurable ρ hm) _ measurable_const]
201
+ simp only [lintegral_one, Measure.restrict_apply_univ, fermiRadius_ball_mass ρ hρ]
202
+ rw [← ofReal_integral_eq_lintegral_ofReal (hI.div_const 2)
203
+ (Filter.Eventually.of_forall (fun y => div_nonneg (hρ y) (by norm_num))), integral_div]
204
+
205
+ lemma fermiMeasure_finite (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y) (hm : Measurable ρ)
206
+ (hI : Integrable ρ) : IsFiniteMeasure (phaseMeasure (fermiRadius ρ)) := by
207
+ constructor
208
+ rw [fermiMeasure_mass ρ hρ hm hI]
209
+ exact ENNReal.ofReal_lt_top
210
+
211
+ lemma fermiMeasure_momentum_memLp (ρ : Space → ℝ) (hρ : ∀ y, 0 ≤ ρ y)
212
+ (hm : Measurable ρ) (hI : Integrable (fun y => ρ y^(5/3 : ℝ))) :
213
+ MemLp (fun yp : Space × Space => yp.2) 2 (phaseMeasure (fermiRadius ρ)) := by
214
+ apply phaseMeasure_momentum_memLp (fermiRadius_measurable ρ hm) (fermiRadius_nonneg ρ hρ)
215
+ simp only [fermiRadius_fifth ρ hρ]
216
+ exact hI.const_mul _
217
+ end Coulomb
218
+
219
+ end
220
+
221
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PhysicalPoisson.lean ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Packets.CoulombKernel
3
+ import OAI.Analysis.CoulombRadii.Screening.CoreScreenedField
4
+
5
+ namespace OAI
6
+
7
+ section
8
+ section
9
+ open MeasureTheory Set Filter
10
+ open scoped BigOperators ENNReal NNReal Classical Topology ContDiff
11
+ noncomputable section
12
+ namespace Coulomb
13
+
14
+ lemma coreCoulombPotential_continuousOn {k : ℕ} (u : H1Vector k)
15
+ {A : Set Space} (hu : SpatiallySupported u A) {y : Space} {r t : ℝ}
16
+ (hrt : r<t) (hsep : ∀ a∈A, t ≤ ‖a-y‖) :
17
+ ContinuousOn (coreCoulombPotential u) (Metric.closedBall y r) := by
18
+ let d := t-r
19
+ have hd : 0<d := sub_pos.mpr hrt
20
+ let G : Space → ℝ := fun z => ∑ s : Spins k, ∑ i : Fin k,
21
+ ∫ x, (max d ‖position x i-z‖)⁻¹*‖u.value s x‖^2
22
+ have hG : Continuous G := by
23
+ apply continuous_finsetSum
24
+ intro s hs
25
+ apply continuous_finsetSum
26
+ intro i hi
27
+ apply MeasureTheory.continuous_of_dominated (bound := fun x => d⁻¹*‖u.value s x‖^2)
28
+ · intro z
29
+ exact (((measurable_const.max ((continuous_position i).measurable.sub measurable_const).norm).inv).aestronglyMeasurable).mul
30
+ ((u.value_L2 s).aestronglyMeasurable.norm.pow 2)
31
+ · intro z
32
+ filter_upwards [] with x
33
+ rw [Real.norm_of_nonneg (mul_nonneg (inv_nonneg.mpr (le_max_left _ _ |>.trans' hd.le)) (sq_nonneg _))]
34
+ exact mul_le_mul_of_nonneg_right (inv_anti₀ hd (le_max_left _ _)) (sq_nonneg _)
35
+ · exact ((u.value_L2 s).norm.integrable_sq).const_mul _
36
+ · filter_upwards [] with x
37
+ exact (((continuous_const.max (continuous_const.sub continuous_id).norm).inv₀
38
+ (fun z => ne_of_gt (hd.trans_le (le_max_left _ _)))).mul continuous_const)
39
+ apply hG.continuousOn.congr
40
+ intro z hz
41
+ unfold coreCoulombPotential G
42
+ apply Finset.sum_congr rfl
43
+ intro s hs
44
+ apply Finset.sum_congr rfl
45
+ intro i hi
46
+ apply integral_congr_ae
47
+ filter_upwards [hu s] with x hx
48
+ by_cases he : u.value s x=0
49
+ · simp [he]
50
+ · have ha : position x i∈A := (by_contra (fun hn => he (hx hn)) : x∈allPositions A) i
51
+ have hz' : ‖z-y‖ ≤ r := by simpa only [Metric.mem_closedBall,dist_eq_norm] using hz
52
+ have htri : ‖position x i-y‖ ≤ ‖position x i-z‖+‖z-y‖ := by
53
+ simpa only [dist_eq_norm] using dist_triangle (position x i) z y
54
+ have hdist : d ≤ ‖position x i-z‖ := by dsimp [d]; linarith [hsep _ ha]
55
+ simp only [max_eq_right hdist,coulombKernel]
56
+
57
+ lemma coreCoulombPotential_weak_harmonic {k : ℕ} (u : H1Vector k)
58
+ {A U : Set Space} (hu : SpatiallySupported u A) (hdis : Disjoint A U) :
59
+ NeutralAtom.HasWeakLaplacian (coreCoulombPotential u) U (fun _ => 0) := by
60
+ intro φ hφ hc ht
61
+ have hi : Integrable (NeutralAtom.coordinateLaplacian φ) :=
62
+ (NeutralAtom.continuous_coordinateLaplacian (hφ.of_le (by exact WithTop.coe_le_coe.mpr le_top))).integrable_of_hasCompactSupport
63
+ (NeutralAtom.hasCompactSupport_coordinateLaplacian hc)
64
+ rw [coreCoulombPotential_fubini u _ hi]
65
+ simp only [zero_mul,integral_zero]
66
+ apply Finset.sum_eq_zero
67
+ intro s hs
68
+ apply Finset.sum_eq_zero
69
+ intro i hi
70
+ apply integral_eq_zero_of_ae
71
+ filter_upwards [hu s] with x hx
72
+ by_cases he : u.value s x=0
73
+ · simp [he]
74
+ · have ha : position x i∈A := (by_contra (fun hn => he (hx hn)) : x∈allPositions A) i
75
+ have hn : position x i∉tsupport φ := fun h => Set.disjoint_left.mp hdis ha (ht h)
76
+ have HH := NeutralAtom.integral_translated_coulombKernel_laplacian hφ hc (position x i)
77
+ have heq : (∫ z, coulombKernel (position x i-z)*NeutralAtom.coordinateLaplacian φ z)=0 := by
78
+ simp_rw [coulombKernel_sub_comm (position x i)]
79
+ change (∫ z, NeutralAtom.coulombKernel (z-position x i)*NeutralAtom.coordinateLaplacian φ z)=0
80
+ rw [HH,image_eq_zero_of_notMem_tsupport hn]
81
+ ring
82
+ simp only [heq,zero_mul,Pi.zero_apply]
83
+
84
+ lemma attraction_weak_harmonic {J : ℕ} (S : Nuclei J) {U : Set Space}
85
+ (hsep : ∀ j, S.position j∉U) :
86
+ NeutralAtom.HasWeakLaplacian (attraction S) U (fun _ => 0) := by
87
+ intro φ hφ hc ht
88
+ have hL := NeutralAtom.continuous_coordinateLaplacian
89
+ (hφ.of_le (by exact WithTop.coe_le_coe.mpr le_top))
90
+ have hLc := NeutralAtom.hasCompactSupport_coordinateLaplacian hc
91
+ have hts : tsupport (NeutralAtom.coordinateLaplacian φ) ⊆ tsupport φ := by
92
+ apply closure_minimal _ (isClosed_tsupport _)
93
+ intro x hx
94
+ by_contra hn
95
+ exact hx (NeutralAtom.coordinateLaplacian_eq_zero_of_notMem_tsupport hn)
96
+ have hi (j : Fin J) : Integrable (fun x => coulombKernel (x-S.position j)*NeutralAtom.coordinateLaplacian φ x) := by
97
+ apply NeutralAtom.integrable_mul_compact_of_continuousAt _ hL hLc
98
+ intro x hx
99
+ have hn : x-S.position j≠0 := sub_ne_zero.mpr (fun he => hsep j (he ▸ ht (hts hx)))
100
+ exact ((continuous_id.sub continuous_const).norm.continuousAt).inv₀ (norm_ne_zero_iff.mpr hn)
101
+ simp only [attraction,Finset.sum_mul,mul_assoc]
102
+ rw [integral_finsetSum _ (fun j _ => (hi j).const_mul _)]
103
+ simp only [zero_mul,integral_zero]
104
+ apply Finset.sum_eq_zero
105
+ intro j hj
106
+ rw [integral_const_mul]
107
+ change S.charge j*(∫ x, NeutralAtom.coulombKernel (x-S.position j)*NeutralAtom.coordinateLaplacian φ x)=0
108
+ rw [NeutralAtom.integral_translated_coulombKernel_laplacian hφ hc,
109
+ image_eq_zero_of_notMem_tsupport (fun h => hsep j (ht h))]
110
+ ring
111
+
112
+ lemma attraction_continuousOn {J : ℕ} (S : Nuclei J) {U : Set Space}
113
+ (hsep : ∀ j, S.position j∉U) : ContinuousOn (attraction S) U := by
114
+ change ContinuousOn (fun x => ∑ j : Fin J, S.charge j * ‖x-S.position j‖⁻¹) U
115
+ apply continuousOn_finsetSum
116
+ intro j hj
117
+ refine continuousOn_const.mul ?_
118
+ refine ((continuous_id.sub continuous_const).norm.continuousOn).inv₀ ?_
119
+ intro x hx
120
+ exact norm_ne_zero_iff.mpr (sub_ne_zero.mpr (fun he => hsep j ((show x=S.position j from he) ▸ hx)))
121
+
122
+ lemma coreScreenedField_continuousOn {J k : ℕ} (S : Nuclei J) (u : H1Vector k)
123
+ {A : Set Space} (hu : SpatiallySupported u A) {y : Space} {r t : ℝ}
124
+ (hrt : r<t) (hsep : ∀ a∈A, t ≤ ‖a-y‖)
125
+ (hnuc : ∀ j, S.position j∉Metric.closedBall y r) :
126
+ ContinuousOn (coreScreenedField S u) (Metric.closedBall y r) :=
127
+ (attraction_continuousOn S hnuc).sub (coreCoulombPotential_continuousOn u hu hrt hsep)
128
+
129
+ lemma coreScreenedField_weak_harmonic {J k : ℕ} (S : Nuclei J) (u : H1Vector k)
130
+ {A U : Set Space} (hu : SpatiallySupported u A) (hdis : Disjoint A U)
131
+ (hnuc : ∀ j, S.position j∉U) :
132
+ NeutralAtom.HasWeakLaplacian (coreScreenedField S u) U (fun _ => 0) := by
133
+ intro φ hφ hc ht
134
+ have hL := NeutralAtom.continuous_coordinateLaplacian
135
+ (hφ.of_le (by exact WithTop.coe_le_coe.mpr le_top))
136
+ have hLc := NeutralAtom.hasCompactSupport_coordinateLaplacian hc
137
+ have hi : Integrable (NeutralAtom.coordinateLaplacian φ) := hL.integrable_of_hasCompactSupport hLc
138
+ have hiC := coreCoulombPotential_mul_integrable u _ hi
139
+ have hiA : Integrable (fun x => attraction S x*NeutralAtom.coordinateLaplacian φ x) := by
140
+ apply NeutralAtom.integrable_mul_compact_of_continuousAt _ hL hLc
141
+ intro x hx
142
+ have hts : tsupport (NeutralAtom.coordinateLaplacian φ) ⊆ tsupport φ := by
143
+ apply closure_minimal _ (isClosed_tsupport _)
144
+ intro x hx
145
+ by_contra hn
146
+ exact hx (NeutralAtom.coordinateLaplacian_eq_zero_of_notMem_tsupport hn)
147
+ have hx' : x∈tsupport φ := hts hx
148
+ have hs (j) : x≠S.position j := fun h => hnuc j (h ▸ ht hx')
149
+ change ContinuousAt (fun x => ∑ j : Fin J, S.charge j * ‖x-S.position j‖⁻¹) x
150
+ apply tendsto_finsetSum
151
+ intro j hj
152
+ exact continuousAt_const.mul (((continuous_id.sub continuous_const).norm.continuousAt).inv₀
153
+ (norm_ne_zero_iff.mpr (sub_ne_zero.mpr (hs j))))
154
+ simp only [coreScreenedField,sub_mul]
155
+ rw [integral_sub hiA hiC,attraction_weak_harmonic S hnuc φ hφ hc ht,
156
+ coreCoulombPotential_weak_harmonic u hu hdis φ hφ hc ht]
157
+ simp
158
+
159
+ end Coulomb
160
+ end
161
+
162
+ end
163
+ end
164
+
165
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PoissonInterior.lean ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.Localization.HarmonicInterior
3
+ import OAI.Analysis.CoulombRadii.Localization.HarmonicScale
4
+
5
+ namespace OAI
6
+
7
+ noncomputable section
8
+
9
+ section
10
+ open MeasureTheory Filter Set
11
+ open scoped Topology BigOperators ContDiff
12
+ namespace NeutralAtom
13
+ theorem poisson_interior_estimates (c : Position) {r A M : ℝ}
14
+ (hr : 0 < r) (hA : 0 ≤ A) (hM : 0 ≤ M) :
15
+ ∃ C : ℝ, 0 < C ∧ ∀ (F σ : Position → ℝ),
16
+ ContinuousOn F (Metric.ball c (3*r)) →
17
+ HasWeakLaplacian F (Metric.ball c (2*r)) (fun x => 4*Real.pi*σ x) →
18
+ Integrable σ → (∀ x, 0 ≤ σ x) →
19
+ (∀ x ∈ Metric.closedBall c (3*r), σ x ≤ A) →
20
+ (∫ x in Metric.closedBall c (2*r), ‖F x‖) ≤ M →
21
+ (∀ z ∈ Metric.closedBall c r, ‖F z‖ ≤ C) ∧
22
+ (∀ z ∈ Metric.closedBall c r, ∀ z' ∈ Metric.closedBall c r,
23
+ ‖F z-F z'‖ ≤ C*‖z-z'‖) := by
24
+ obtain ⟨HC, hHC, hest⟩ := harmonic_interior_estimates_local hr
25
+ let W := Metric.closedBall c (3*r)
26
+ let W' := Metric.closedBall c (2*r)
27
+ let V := (volume W).toReal
28
+ let V' := (volume W').toReal
29
+ let PB := A*(∫ y in Metric.ball (0 : Position) 1, coulombKernel y)+A*V
30
+ let LB := A*(∫ y in Metric.ball (0 : Position) 1, (coulombKernel y)^2)+A*V
31
+ have hPB : 0 ≤ PB := add_nonneg (mul_nonneg hA (integral_nonneg coulombKernel_nonneg))
32
+ (mul_nonneg hA ENNReal.toReal_nonneg)
33
+ have hLB : 0 ≤ LB := add_nonneg (mul_nonneg hA (integral_nonneg (fun y => sq_nonneg _)))
34
+ (mul_nonneg hA ENNReal.toReal_nonneg)
35
+ let H := M+PB*V'
36
+ have hH : 0 ≤ H := add_nonneg hM (mul_nonneg hPB ENNReal.toReal_nonneg)
37
+ let C := HC*H+PB+LB+1
38
+ have hC : 0 < C := by dsimp [C]; positivity
39
+ refine ⟨C, hC, ?_⟩
40
+ intro F σ hF hpoisson hσ hσpos hσbd hIF
41
+ let ρ := W.indicator σ
42
+ have hρ : Integrable ρ := hσ.indicator measurableSet_closedBall
43
+ have hρpos : ∀ x, 0 ≤ ρ x := fun x => Set.indicator_nonneg (fun y _ => hσpos y) x
44
+ have hρbd : ∀ x, ρ x ≤ A := by
45
+ intro x
46
+ by_cases hx : x ∈ W
47
+ · simpa only [ρ, Set.indicator_of_mem hx] using hσbd x hx
48
+ · simpa only [ρ, Set.indicator_of_notMem hx] using hA
49
+ have hmass : (∫ x, ρ x) ≤ A*V := by
50
+ rw [show ρ = W.indicator σ from rfl, integral_indicator measurableSet_closedBall]
51
+ calc
52
+ (∫ x in W, σ x) ≤ ∫ _ in W, A := integral_mono_ae hσ.integrableOn
53
+ (integrableOn_const (isCompact_closedBall c (3*r)).measure_ne_top)
54
+ ((ae_restrict_mem measurableSet_closedBall).mono (fun x hx => hσbd x hx))
55
+ _ = A*V := by simp only [integral_const, Measure.restrict_apply_univ, smul_eq_mul, V,
56
+ measureReal_def, mul_comm]
57
+ let P := potentialOf ρ
58
+ have hPcont : Continuous P := potentialOf_continuous hρ hρpos hρbd
59
+ have hPbd (x : Position) : ‖P x‖ ≤ PB := by
60
+ have hp : 0 ≤ P x := integral_nonneg (fun y => mul_nonneg (coulombKernel_nonneg _) (hρpos y))
61
+ rw [Real.norm_eq_abs, abs_of_nonneg hp]
62
+ exact (bounded_density_convolution measurable_coulombKernel coulombKernel_nonneg
63
+ (coulombKernel_integrableOn_ball 1) (fun _ => coulombKernel_le_one)
64
+ hρ hρpos hρbd x).2.trans (by dsimp only [PB]; linarith)
65
+ have hPlip (x y : Position) : ‖P x-P y‖ ≤ LB*‖x-y‖ :=
66
+ (potentialOf_lipschitz_bound hρ hρpos hρbd x y).trans
67
+ (mul_le_mul_of_nonneg_right (by dsimp only [LB]; linarith) (norm_nonneg _))
68
+ have hW' : W' ⊆ Metric.ball c (3*r) := by
69
+ intro x hx
70
+ change dist x c ≤ 2*r at hx
71
+ change dist x c < 3*r
72
+ linarith
73
+ have hball : Metric.ball c (2*r) ⊆ Metric.ball c (3*r) :=
74
+ Metric.ball_subset_ball (by linarith)
75
+ let h : Position → ℝ := fun x => F x+P x
76
+ have hhcont : ContinuousOn h (Metric.ball c (3*r)) := hF.add hPcont.continuousOn
77
+ have hharm : HasWeakLaplacian h (Metric.ball c (2*r)) (fun _ => 0) :=
78
+ local_harmonic_part Metric.isOpen_ball (hF.mono hball) hpoisson hρ hρpos hρbd (by
79
+ intro x hx
80
+ have hxW : x ∈ W := by
81
+ change dist x c ≤ 3*r
82
+ exact (hball hx).le
83
+ exact (Set.indicator_of_mem hxW σ).symm)
84
+ have hiF : IntegrableOn (fun x => ‖F x‖) W' :=
85
+ ((hF.mono hW').norm).integrableOn_compact (isCompact_closedBall c (2*r))
86
+ have hih : IntegrableOn (fun x => ‖h x‖) W' :=
87
+ ((hhcont.mono hW').norm).integrableOn_compact (isCompact_closedBall c (2*r))
88
+ have hiPB : IntegrableOn (fun _ : Position => PB) W' :=
89
+ integrableOn_const (isCompact_closedBall c (2*r)).measure_ne_top
90
+ have hIh : (∫ x in W', ‖h x‖) ≤ H := by
91
+ calc
92
+ (∫ x in W', ‖h x‖) ≤ ∫ x in W', ‖F x‖+PB := integral_mono_ae hih (hiF.add hiPB)
93
+ (Filter.Eventually.of_forall (fun x => (norm_add_le (F x) (P x)).trans
94
+ (add_le_add le_rfl (hPbd x))))
95
+ _ = (∫ x in W', ‖F x‖)+PB*V' := by
96
+ rw [integral_add hiF hiPB, integral_const]
97
+ simp only [Measure.restrict_apply_univ, smul_eq_mul, V', measureReal_def, mul_comm]
98
+ _ ≤ H := by dsimp only [H]; linarith
99
+ obtain ⟨hval, hdiff⟩ := hest c h hhcont hharm
100
+ have hCval : HC*H+PB ≤ C := by dsimp [C]; linarith
101
+ have hClip : HC*H+LB ≤ C := by dsimp [C]; linarith
102
+ constructor
103
+ · intro z hz
104
+ calc
105
+ ‖F z‖ = ‖h z-P z‖ := by dsimp [h]; rw [add_sub_cancel_right]
106
+ _ ≤ ‖h z‖+‖P z‖ := norm_sub_le _ _
107
+ _ ≤ HC*(∫ x in W', ‖h x‖)+PB := add_le_add (hval z hz) (hPbd z)
108
+ _ ≤ HC*H+PB := by linarith [mul_le_mul_of_nonneg_left hIh hHC.le]
109
+ _ ≤ C := hCval
110
+ · intro z hz z' hz'
111
+ calc
112
+ ‖F z-F z'‖ = ‖(h z-h z')-(P z-P z')‖ := by congr 1; dsimp [h]; ring
113
+ _ ≤ ‖h z-h z'‖+‖P z-P z'‖ := norm_sub_le _ _
114
+ _ ≤ HC*(∫ x in W', ‖h x‖)*‖z-z'‖+LB*‖z-z'‖ :=
115
+ add_le_add (hdiff z hz z' hz') (hPlip z z')
116
+ _ ≤ (HC*H+LB)*‖z-z'‖ := by
117
+ have hb := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hIh hHC.le)
118
+ (norm_nonneg (z-z'))
119
+ nlinarith
120
+ _ ≤ C*‖z-z'‖ := mul_le_mul_of_nonneg_right hClip (norm_nonneg _)
121
+
122
+ end NeutralAtom
123
+
124
+ end
125
+ open MeasureTheory Filter Set
126
+ open scoped Topology BigOperators ContDiff
127
+ namespace NeutralAtom
128
+
129
+ lemma HasWeakLaplacian.const_mul {F q : Position → ℝ} {U : Set Position}
130
+ (h : HasWeakLaplacian F U q) (b : ℝ) :
131
+ HasWeakLaplacian (fun x => b*F x) U (fun x => b*q x) := by
132
+ intro φ hφ hφc ht
133
+ simp_rw [mul_assoc, integral_const_mul]
134
+ rw [h φ hφ hφc ht]
135
+
136
+ theorem poisson_unit_negative_oscillation {A M : ℝ} (hA : 0≤A) (hM : 0≤M) :
137
+ ∃ C : ℝ, 0<C ∧ ∀ (F σ : Position → ℝ),
138
+ ContinuousOn F (Metric.ball 0 3) →
139
+ HasWeakLaplacian F (Metric.ball 0 2) (fun x => 4*Real.pi*σ x) →
140
+ Integrable σ → (∀ x, 0≤σ x) →
141
+ (∀ x ∈ Metric.closedBall 0 3, σ x≤A) →
142
+ (∀ x ∈ Metric.closedBall 0 2, F x≤M) →
143
+ volume.real (Metric.closedBall (0:Position) 2)*F 0 ≤
144
+ (∫ x in Metric.closedBall 0 2, F x) →
145
+ ∀ z ∈ Metric.closedBall (0:Position) 1,
146
+ ‖F z-F 0‖ ≤ C*(1+max (-F 0) 0)*‖z‖ := by
147
+ let V := volume.real (Metric.closedBall (0:Position) 2)
148
+ have hV : 0≤V := ENNReal.toReal_nonneg
149
+ obtain ⟨C,hC,H⟩ := poisson_interior_estimates (0:Position)
150
+ (r:=1) (A:=A) (M:=V*(2*M+1)) (by norm_num) hA (by positivity)
151
+ refine ⟨C,hC,?_⟩
152
+ intro F σ hF hLap hσ hp hb hFM hmean z hz
153
+ let T := 1+max (-F 0) 0
154
+ have hT : 0<T := by dsimp [T]; positivity
155
+ have hT1 : 1≤T := by dsimp [T]; linarith [le_max_right (-F 0) 0]
156
+ have h2sub : Metric.closedBall (0:Position) 2⊆Metric.ball 0 3 := by
157
+ intro x hx
158
+ change dist x 0≤2 at hx
159
+ change dist x 0<3
160
+ linarith
161
+ have hiF : IntegrableOn F (Metric.closedBall 0 2) :=
162
+ (hF.mono h2sub).integrableOn_compact (isCompact_closedBall _ _)
163
+ have hiabs := hiF.norm
164
+ have hic : IntegrableOn (fun _ : Position => 2*M) (Metric.closedBall 0 2) :=
165
+ integrableOn_const (isCompact_closedBall (0:Position) 2).measure_ne_top
166
+ have hIF : (∫ x in Metric.closedBall 0 2, ‖F x‖) ≤ V*(2*M+max (-F 0) 0) := by
167
+ calc
168
+ (∫ x in Metric.closedBall 0 2, ‖F x‖) ≤
169
+ ∫ x in Metric.closedBall 0 2, 2*M-F x := by
170
+ apply integral_mono_ae hiabs (hic.sub hiF)
171
+ filter_upwards [ae_restrict_mem measurableSet_closedBall] with x hx
172
+ change ‖F x‖ ≤ 2*M-F x
173
+ rw [Real.norm_eq_abs]
174
+ exact abs_le.mpr ⟨by linarith [hFM x hx], by linarith [hFM x hx]⟩
175
+ _ = V*(2*M)-(∫ x in Metric.closedBall 0 2, F x) := by
176
+ rw [integral_sub hic hiF,integral_const]
177
+ simp only [measureReal_restrict_apply_univ,smul_eq_mul,V]
178
+ _ ≤ V*(2*M+max (-F 0) 0) := by
179
+ change V*F 0 ≤ _ at hmean
180
+ nlinarith [mul_le_mul_of_nonneg_left (le_max_left (-F 0) 0) hV]
181
+ have hIscaled : (∫ x in Metric.closedBall 0 2, ‖T⁻¹*F x‖) ≤ V*(2*M+1) := by
182
+ simp_rw [norm_mul,Real.norm_eq_abs T⁻¹,abs_of_pos (inv_pos.mpr hT),integral_const_mul]
183
+ have hnum : V*(2*M+max (-F 0) 0) ≤ T*(V*(2*M+1)) := by
184
+ dsimp [T]
185
+ nlinarith [mul_nonneg (mul_nonneg hV hM) (le_max_right (-F 0) 0)]
186
+ calc
187
+ _ ≤ T⁻¹*(T*(V*(2*M+1))) :=
188
+ mul_le_mul_of_nonneg_left (hIF.trans hnum) (inv_nonneg.mpr hT.le)
189
+ _ = _ := by rw [←mul_assoc,inv_mul_cancel₀ hT.ne',one_mul]
190
+ have hLap' : HasWeakLaplacian (fun x => T⁻¹*F x) (Metric.ball 0 2)
191
+ (fun x => 4*Real.pi*(T⁻¹*σ x)) := by
192
+ convert hLap.const_mul T⁻¹ using 1
193
+ funext point
194
+ ring
195
+ obtain ⟨_,hdiff⟩ := H (fun x => T⁻¹*F x) (fun x => T⁻¹*σ x)
196
+ (by simpa only [mul_one] using hF.const_mul T⁻¹) (by simpa using hLap')
197
+ (hσ.const_mul _) (fun x => mul_nonneg (inv_nonneg.mpr hT.le) (hp x))
198
+ (by
199
+ intro x hx
200
+ have hh : σ x≤A := hb x (by simpa using hx)
201
+ have hinv : T⁻¹≤1 := inv_le_one_of_one_le₀ hT1
202
+ exact (mul_le_mul_of_nonneg_left hh (inv_nonneg.mpr hT.le)).trans
203
+ (by simpa using mul_le_mul_of_nonneg_right hinv hA)) (by simpa using hIscaled)
204
+ have hh := hdiff z (by simpa using hz) 0 (by simp)
205
+ simp only [←mul_sub,norm_mul,Real.norm_eq_abs T⁻¹,abs_of_pos (inv_pos.mpr hT),sub_zero] at hh
206
+ have hm := mul_le_mul_of_nonneg_left hh hT.le
207
+ simpa only [←mul_assoc,mul_inv_cancel₀ hT.ne',one_mul,mul_comm T C,T] using hm
208
+
209
+ end NeutralAtom
210
+
211
+ end
212
+
213
+ end OAI
lean/OAI/Analysis/CoulombRadii/FieldAnalysis/PositiveField.lean ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Mathlib
2
+ import OAI.Analysis.CoulombRadii.FormDomain.BallTrial
3
+ import OAI.Analysis.CoulombRadii.Packets.ScaledWindow
4
+ import OAI.Analysis.CoulombRadii.FormDomain.FieldOptimization
5
+
6
+ namespace OAI
7
+
8
+ section
9
+ section
10
+ open MeasureTheory Set Filter
11
+ open scoped BigOperators ENNReal NNReal Classical SchwartzMap Pointwise
12
+ noncomputable section
13
+ namespace Coulomb
14
+
15
+ def ballTrialCoefficient : ℝ := ballKineticCoefficient+
16
+ (1/2:ℝ)*(∑ b : Fin 3, ∫ x : Space, (fderiv ℝ unitWindow x (EuclideanSpace.single b 1))^2)+2
17
+
18
+ lemma ballTrialCoefficient_pos : 0 < ballTrialCoefficient := by
19
+ unfold ballTrialCoefficient
20
+ linarith [ballKineticCoefficient_pos,unitWindow_kinetic_nonneg]
21
+
22
+ theorem positive_field_ball_trial {J k : ℕ} (S : Nuclei J) (u : H1Vector k)
23
+ (hu : Antisymmetric u) (hmu : mass u = 1)
24
+ {a M : ℝ} (ha : 0 < a) (hM : 0 ≤ M)
25
+ (y : Space) (A : Set Space) (hA : IsClosed A) (hsu : SpatiallySupported u A)
26
+ (hcore : ∀ z ∈ A, 3*a ≤ ‖z-y‖) (hnuc : ∀ j, 3*a ≤ ‖S.position j-y‖) :
27
+ unrestrictedFormBottom S ≤ ((form S u-M*coreScreenedField S u y+
28
+ ballTrialCoefficient*(M^(5/3:ℝ)/a^2+M/a^2+M^2/a) : ℝ) : EReal) := by
29
+ have H := ballCloud_trial S u hu hmu (scaledWindow unitWindow a ha.ne')
30
+ (by rw [scaledWindow_mass unitWindow ha,unitWindow_mass])
31
+ (scaledWindow_compactSupport unitWindow unitWindow_support ha)
32
+ (scaledWindow_radial unitWindow unitWindow_radial ha)
33
+ ha hM (scaledWindow_support unitWindow unitWindow_support ha)
34
+ y A hA hsu hcore hnuc
35
+ rw [scaledWindow_kinetic unitWindow ha] at H
36
+ apply H.trans
37
+ apply EReal.coe_le_coe_iff.mpr
38
+ have hc : ballKineticCoefficient ≤ ballTrialCoefficient := by
39
+ unfold ballTrialCoefficient
40
+ linarith [unitWindow_kinetic_nonneg]
41
+ have hg : (1/2:ℝ)*(∑ b : Fin 3, ∫ x : Space,
42
+ (fderiv ℝ unitWindow x (EuclideanSpace.single b 1))^2) ≤ ballTrialCoefficient := by
43
+ unfold ballTrialCoefficient
44
+ linarith [ballKineticCoefficient_pos]
45
+ have he : (5/4:ℝ) ≤ ballTrialCoefficient := by
46
+ unfold ballTrialCoefficient
47
+ linarith [ballKineticCoefficient_pos,unitWindow_kinetic_nonneg]
48
+ have Hc := mul_le_mul_of_nonneg_right hc (show 0 ≤ M^(5/3:ℝ)/a^2 by positivity)
49
+ have Hg := mul_le_mul_of_nonneg_right hg (show 0 ≤ M/a^2 by positivity)
50
+ have He := mul_le_mul_of_nonneg_right he (show 0 ≤ M^2/a by positivity)
51
+ linear_combination Hc+Hg+He
52
+
53
+ theorem positive_field_core_gain {J k : ℕ} (S : Nuclei J) (u : H1Vector k)
54
+ (hu : Antisymmetric u) (hmu : mass u = 1)
55
+ {a m : ℝ} (ha : 0 < a) (hm : 0 ≤ m)
56
+ (ham : 1 ≤ a*m) (ham' : 1 ≤ a*m^(1/3:ℝ))
57
+ (y : Space) (A : Set Space) (hA : IsClosed A) (hsu : SpatiallySupported u A)
58
+ (hcore : ∀ z ∈ A, 3*a ≤ ‖z-y‖) (hnuc : ∀ j, 3*a ≤ ‖S.position j-y‖) :
59
+ unrestrictedFormBottom S ≤ ((form S u-a*(max (coreScreenedField S u y) 0)^2/
60
+ (16*ballTrialCoefficient)+4*ballTrialCoefficient*m^2/a : ℝ) : EReal) := by
61
+ by_cases hb : unrestrictedFormBottom S = ⊥
62
+ · simp [hb]
63
+ have ht : unrestrictedFormBottom S ≠ ⊤ := ne_top_of_le_ne_top (EReal.coe_ne_top _)
64
+ (unrestrictedFormBottom_le_trial S u hu hmu)
65
+ rw [←EReal.coe_toReal ht hb]
66
+ apply EReal.coe_le_coe_iff.mpr
67
+ apply positive_field_trial_optimization ha ballTrialCoefficient_pos hm ham ham'
68
+ intro M hM
69
+ apply EReal.coe_le_coe_iff.mp
70
+ rw [EReal.coe_toReal ht hb]
71
+ exact positive_field_ball_trial S u hu hmu ha hM y A hA hsu hcore hnuc
72
+
73
+ end Coulomb
74
+ end
75
+
76
+ end
77
+ end
78
+
79
+ end OAI