File size: 9,641 Bytes
159357f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
import Mathlib
import OAI.Analysis.CoulombIonization.RadialBounds.LocalHistoryWeightsBarrier

namespace OAI

noncomputable section

namespace CoulombAtom

open MeasureTheory Filter
open scoped Topology BigOperators ContDiff
section Work_LocalFieldBootstrap_barrier_scope

open Set Metric

lemma localHistory_field_bound {E₀ E : CoreObservationEnsemble} {y₀ : Space} {a Z lam : ℝ}
    {ha : 0 < a} (hsep : 12*a ≤ ‖y₀‖) (hm : E₀.mass = 1) (hZ : 0 ≤ Z) (hlam : 0 < lam)
    {n : ℕ} (hE : CoreLocalHistory E₀ y₀ a ha n E) (y : Space)
    (hy : y ∈ closedBall y₀ (localHistoryReach a n)) :
    E.fieldMoment Z lam y ≤ 2*packetFieldConstant^2*((1/a^4+1/a)^2+max (E₀.excess Z lam) 0/a+
      256*localHistoryCostScale a (E₀.countMoment y₀ (8*a)) (localFieldEnvelope E₀ y₀ a ha Z lam)/a)*
        ((n:ℝ)+2)^16 := by
  let u := localHistoryRadius a n
  have hu := localHistoryRadius_pos ha n
  let hr : 0 ≤ 2*u := by dsimp [u]; positivity
  let p := coreFirstRadialCut y hr hu
  let hp := coreFirstRadialCut_partition y hr hu
  have hn := CoreLocalHistory.center_nuclear_separation (ha := ha) hsep y hy
  have hu' := localHistoryRadius_le ha n
  have hv (x : Space) (hx : x ∈ ball y (2*u)) : (p 0).value x = 0 :=
    coreFirstRadialCut_core_zero y hr hu x (by simpa only [radialPatchCore,mem_ofPred_eq,not_le,mem_ball,dist_eq_norm] using hx)
  have hd (x : Space) (hx : x ∈ ball y (2*u)) (d : Fin 3) : lineDeriv ℝ (p 0).value x (spaceDirections d) = 0 :=
    coreFirstRadialCut_core_deriv_zero y hr hu x (by simpa only [radialPatchCore,mem_ofPred_eq,not_le,mem_ball,dist_eq_norm] using hx) d
  have hf := E.fieldMoment_le_observe_excess p hp y hu (by linarith) hv hd hZ hlam
  rw [hE.mass,hm,mul_one] at hf
  have he := localHistory_excess_bound hsep hm hZ hlam.le (CoreLocalHistory.observe hE y hy)
  have hc := localHistoryCostScale_nonneg a (E₀.countMoment y₀ (8*a))
    (localFieldEnvelope_nonneg E₀ y₀ ha hsep hm hZ hlam.le)
  have he' : (E.observe p hp).excess Z lam ≤ max (E₀.excess Z lam) 0+
      localHistoryCostScale a (E₀.countMoment y₀ (8*a)) (localFieldEnvelope E₀ y₀ a ha Z lam)*
        ((n:ℝ)+1)*((n:ℝ)+3)^8 := by
    simpa only [Nat.cast_add,Nat.cast_one,add_assoc,show (1:ℝ)+2 = 3 by norm_num] using
      he.trans (add_le_add (le_max_left (E₀.excess Z lam) 0) le_rfl)
  have hediv := (div_le_div_of_nonneg_right he' hu.le).trans
    (localHistoryRadius_energy ha (le_max_right _ _) hc n)
  have hall := mul_le_mul_of_nonneg_left (add_le_add (localHistoryRadius_packet ha n) hediv)
    (by positivity : 0 ≤ 2*packetFieldConstant^2)
  apply hf.trans
  convert hall using 1
  ring

lemma localFieldEnvelope_quadratic (E₀ : CoreObservationEnsemble) (y₀ : Space) {a Z lam : ℝ}
    (ha : 0 < a) (hsep : 12*a ≤ ‖y₀‖) (hm : E₀.mass = 1) (hZ : 0 ≤ Z) (hlam : 0 < lam) :
    (localFieldEnvelope E₀ y₀ a ha Z lam)^2 ≤
      2*packetFieldConstant^2*((1/a^4+1/a)^2+max (E₀.excess Z lam) 0/a+
        256*localizationIMSConstant*Real.sqrt (E₀.countMoment y₀ (8*a))/a^3)+
      (4096*packetFieldConstant^2*Real.sqrt (E₀.countMoment y₀ (8*a))/a)*
        localFieldEnvelope E₀ y₀ a ha Z lam := by
  let H := localFieldEnvelope E₀ y₀ a ha Z lam
  let C := localHistoryCostScale a (E₀.countMoment y₀ (8*a)) H
  let G := 2*packetFieldConstant^2*((1/a^4+1/a)^2+max (E₀.excess Z lam) 0/a+256*C/a)
  have hH : 0 ≤ H := localFieldEnvelope_nonneg E₀ y₀ ha hsep hm hZ hlam.le
  have hC : 0 ≤ C := localHistoryCostScale_nonneg _ _ hH
  have hG : 0 ≤ G := by dsimp [G]; positivity
  have hb (t : ℝ) (ht : t ∈ localHistoryFieldValues E₀ y₀ a ha Z lam) : t ≤ Real.sqrt G := by
    obtain ⟨n,E,hE,y,hy,rfl⟩ := ht
    have hh := localHistory_field_bound hsep hm hZ hlam hE y hy
    have hsq : (Real.sqrt (E.fieldMoment Z lam y)/((n:ℝ)+2)^8)^2 ≤ G := by
      rw [div_pow,Real.sq_sqrt (E.fieldMoment_nonneg Z lam y),←pow_mul]
      apply (div_le_iff₀ (by positivity)).2
      exact hh
    exact (Real.le_sqrt (by positivity) hG).2 hsq
  have hu : H ≤ Real.sqrt G := csSup_le (localHistoryFieldValues_nonempty E₀ y₀ ha Z lam) hb
  have hs := pow_le_pow_left₀ hH hu 2
  rw [Real.sq_sqrt hG] at hs
  convert hs using 1
  dsimp [G,C,H,localHistoryCostScale]
  field_simp [ha.ne']
  ring

theorem ensemble_local_field_estimate (E₀ : CoreObservationEnsemble) (y₀ : Space) {a Z lam : ℝ}
    (ha : 0 < a) (hsep : 12*a ≤ ‖y₀‖) (hm : E₀.mass = 1) (hZ : 0 ≤ Z) (hlam : 0 < lam) :
    E₀.fieldMoment Z lam y₀ ≤ 65536*(
      4*packetFieldConstant^2*((1/a^4+1/a)^2+max (E₀.excess Z lam) 0/a+
        256*localizationIMSConstant*Real.sqrt (E₀.countMoment y₀ (8*a))/a^3)+
      (4096*packetFieldConstant^2*Real.sqrt (E₀.countMoment y₀ (8*a))/a)^2) := by
  let H := localFieldEnvelope E₀ y₀ a ha Z lam
  let A := 2*packetFieldConstant^2*((1/a^4+1/a)^2+max (E₀.excess Z lam) 0/a+
        256*localizationIMSConstant*Real.sqrt (E₀.countMoment y₀ (8*a))/a^3)
  let D := 4096*packetFieldConstant^2*Real.sqrt (E₀.countMoment y₀ (8*a))/a
  have hs : H^2 ≤ A+D*H := localFieldEnvelope_quadratic E₀ y₀ ha hsep hm hZ hlam
  have hs' : H^2 ≤ 2*A+D^2 := by nlinarith [sq_nonneg (H-D)]
  have hh := localFieldEnvelope_bound hsep hm hZ hlam.le (CoreLocalHistory.initial (E₀ := E₀) (y₀ := y₀) (a := a) (ha := ha)) y₀
    (by simp [localHistoryReach])
  norm_num at hh
  have hsq := pow_le_pow_left₀ (Real.sqrt_nonneg _) hh 2
  rw [Real.sq_sqrt (E₀.fieldMoment_nonneg Z lam y₀)] at hsq
  have hfinal := hsq.trans (show (localFieldEnvelope E₀ y₀ a ha Z lam*256)^2 ≤ 65536*(2*A+D^2) by nlinarith [hs'])
  convert hfinal using 1
  dsimp [A,D]
  ring

end Work_LocalFieldBootstrap_barrier_scope

def localFieldScale (a D B : ℝ) : ℝ :=
  (1/a^4+1/a)^2+1/a^4+D/a+B/a^2

def localFieldUniversalConstant : ℝ := 65536*(4*packetFieldConstant^2+
  512*packetFieldConstant^2*localizationIMSConstant+(4096*packetFieldConstant^2)^2)

lemma localFieldUniversalConstant_pos : 0 < localFieldUniversalConstant := by
  have := packetFieldConstant_pos
  have := localizationIMSConstant_nonneg
  unfold localFieldUniversalConstant
  positivity

lemma localFieldScale_nonneg {a D B : ℝ} (ha : 0 < a) (hD : 0 ≤ D) (hB : 0 ≤ B) :
    0 ≤ localFieldScale a D B := by unfold localFieldScale; positivity

lemma sqrt_count_reciprocal_young {a B : ℝ} (_ha : 0 < a) (hB : 0 ≤ B) :
    2*Real.sqrt B/a^3 ≤ 1/a^4+B/a^2 := by
  have he : (Real.sqrt B/a)^2 = B/a^2 := by rw [div_pow,Real.sq_sqrt hB]
  have hp : (1/a^2)^2 = (1:ℝ)/a^4 := by ring
  calc
    2*Real.sqrt B/a^3 = 2*(Real.sqrt B/a)*(1/a^2) := by ring
    _ ≤ (Real.sqrt B/a)^2+(1/a^2)^2 := by nlinarith [sq_nonneg (Real.sqrt B/a-1/a^2)]
    _ = _ := by rw [he,hp]; ring

lemma localFieldScale_mono {a D D' B B' : ℝ} (ha : 0 < a) (hD : D ≤ D') (hB : B ≤ B') :
    localFieldScale a D B ≤ localFieldScale a D' B' := by
  unfold localFieldScale
  exact add_le_add (add_le_add le_rfl (div_le_div_of_nonneg_right hD ha.le))
    (div_le_div_of_nonneg_right hB (sq_nonneg a))

lemma field_explicit_bound_le_scale {a D B : ℝ} (ha : 0 < a) (hD : 0 ≤ D) (hB : 0 ≤ B) :
    65536*(4*packetFieldConstant^2*((1/a^4+1/a)^2+D/a+
        256*localizationIMSConstant*Real.sqrt B/a^3)+
      (4096*packetFieldConstant^2*Real.sqrt B/a)^2) ≤
        localFieldUniversalConstant*localFieldScale a D B := by
  let S := localFieldScale a D B
  have hP : 0 ≤ 1/a^4 := by positivity
  have hB' : 0 ≤ B/a^2 := by positivity
  have hD' : 0 ≤ D/a := by positivity
  have hX : 0 ≤ (1/a^4+1/a)^2 := sq_nonneg _
  have hS1 : (1/a^4+1/a)^2+D/a ≤ S := by dsimp [S,localFieldScale]; linarith
  have hS2 : 1/a^4+B/a^2 ≤ S := by dsimp [S,localFieldScale]; linarith
  have hS3 : B/a^2 ≤ S := by dsimp [S,localFieldScale]; linarith
  have hK := localizationIMSConstant_nonneg
  have hy := mul_le_mul_of_nonneg_left (sqrt_count_reciprocal_young ha hB)
    (show 0 ≤ 512*packetFieldConstant^2*localizationIMSConstant by positivity)
  have hterm : (4096*packetFieldConstant^2*Real.sqrt B/a)^2 =
      (4096*packetFieldConstant^2)^2*(B/a^2) := by
    rw [div_pow,mul_pow,Real.sq_sqrt hB]
    ring
  rw [hterm]
  have h1 := mul_le_mul_of_nonneg_left hS1 (show 0 ≤ 4*packetFieldConstant^2 by positivity)
  have h2 := mul_le_mul_of_nonneg_left hS2 (show 0 ≤ 512*packetFieldConstant^2*localizationIMSConstant by positivity)
  have h3 := mul_le_mul_of_nonneg_left hS3 (sq_nonneg (4096*packetFieldConstant^2))
  change _ ≤ 65536*(4*packetFieldConstant^2+
    512*packetFieldConstant^2*localizationIMSConstant+(4096*packetFieldConstant^2)^2)*S
  calc
    _ = 65536*(4*packetFieldConstant^2*((1/a^4+1/a)^2+D/a)+
      512*packetFieldConstant^2*localizationIMSConstant*(2*Real.sqrt B/a^3)+
      (4096*packetFieldConstant^2)^2*(B/a^2)) := by ring
    _ ≤ 65536*(4*packetFieldConstant^2*S+
      512*packetFieldConstant^2*localizationIMSConstant*S+(4096*packetFieldConstant^2)^2*S) :=
        mul_le_mul_of_nonneg_left (add_le_add (add_le_add h1 (hy.trans h2)) h3) (by norm_num)
    _ = _ := by ring

theorem ensemble_local_field_scale (E : CoreObservationEnsemble) (y : Space) {a Z lam : ℝ}
    (ha : 0 < a) (hsep : 12*a ≤ ‖y‖) (hm : E.mass = 1) (hZ : 0 ≤ Z) (hlam : 0 < lam) :
    E.fieldMoment Z lam y ≤ localFieldUniversalConstant*
      localFieldScale a (max (E.excess Z lam) 0) (E.countMoment y (8*a)) :=
  (ensemble_local_field_estimate E y ha hsep hm hZ hlam).trans
    (field_explicit_bound_le_scale ha (le_max_right _ _) (E.countMoment_nonneg y (8*a)))

end CoulombAtom

end

end OAI