cfahlgren1/math / lean /OAI /Analysis /CoulombRadii /RandomFields /PhysicalBandEvent.lean
cfahlgren1's picture
download
raw
10.5 kB
import Mathlib
import OAI.Analysis.CoulombRadii.Packets.BandOscillation
import OAI.Analysis.CoulombRadii.RandomFields.PosteriorCount
import OAI.Analysis.CoulombRadii.Packets.PacketBandGeometry
import OAI.Analysis.CoulombRadii.RandomFields.PosteriorSpatialCap
import OAI.Analysis.CoulombRadii.Packets.NormalizedBandModulus
namespace OAI
section
open MeasureTheory Set Filter
open scoped ENNReal NNReal BigOperators Classical SchwartzMap
noncomputable section
namespace NeutralAtom
theorem physical_posterior_band_event (g : 𝓒(Position,ℝ))
(hg : βˆ€ z,1 < β€–zβ€– β†’ g z=0) :
βˆƒ B D : ℝ,0 ≀ B ∧ 0 ≀ D ∧
βˆ€ {n J : β„•} (Ξ½ : Measure (Configuration n)) [IsProbabilityMeasure Ξ½],
βˆ€ {c rβ‚€ s r L : ℝ},0 < c β†’ 0 < rβ‚€ β†’ 0 < s β†’ 0 < r β†’ 1 ≀ L β†’ rβ‚€ ≀ r β†’ r ≀ s β†’
c*(1+packetExponent)*s^packetExponent ≀ 1/4 β†’ c*s^packetExponent ≀ 1/100 β†’
βˆ€ (rads : Fin J β†’ ℝ),(βˆ€ k,0 ≀ rads k) β†’ βˆ€ {j : β„•} (k : Fin J),j ≀ k.val β†’
Real.sqrt 3*(rads k)^(101/100:ℝ) ≀ r/12 β†’
βˆƒ G : Set (ObservationSample n J),
(MeasurableSet G ∧ MeasurableSet[observationSigma rads j] G) ∧
(observationLaw J Ξ½) Gᢜ=0 ∧ βˆ€ sample∈G,
let ΞΌ := conditionalPacketDensity (observationLaw J Ξ½) Prod.fst (tailObservation rads j)
g c rβ‚€ s (tailObservation rads j sample)
let m := rawCount {x : Position | r/4 ≀ β€–xβ€– ∧ β€–xβ€– ≀ 12*L*r} (observedOrdered rads k sample)
let Ο„ := c*(r/3)*(r/3)^packetExponent
(βˆ€ y : Position,r/2 ≀ β€–yβ€– β†’ β€–yβ€– ≀ 8*L*r β†’ ΞΌ y ≀ (B/Ο„^3)*m) ∧
(βˆ€ y z : Position,r/2 ≀ β€–yβ€– β†’ β€–yβ€– ≀ 8*L*r β†’ r/2 ≀ β€–zβ€– β†’ β€–zβ€– ≀ 8*L*r β†’
|ΞΌ y-ΞΌ z| ≀ (D/Ο„^4)*β€–y-zβ€–*m) := by
obtain ⟨B,D,hB,hD,hbound,hlip⟩ := schwartz_square_bounded_lipschitz g
refine ⟨B,D,hB,hD,?_⟩
intro n J Ξ½ hΞ½ c rβ‚€ s r L hc hrβ‚€ hs hr hL hrrβ‚€ hrs hscale hwidth rads hrads j k hk hnoise
let S := {x : Position | r/3 ≀ β€–xβ€– ∧ β€–xβ€– ≀ 10*L*r}
let T := {x : Position | r/2 ≀ β€–xβ€– ∧ β€–xβ€– ≀ 8*L*r}
let O := {x : Position | r/4 ≀ β€–xβ€– ∧ β€–xβ€– ≀ 12*L*r}
have hS : MeasurableSet S := (measurableSet_le measurable_const measurable_norm).inter
(measurableSet_le measurable_norm measurable_const)
have hO : MeasurableSet O := (measurableSet_le measurable_const measurable_norm).inter
(measurableSet_le measurable_norm measurable_const)
have hgs : HasCompactSupport (g : Position β†’ ℝ) := HasCompactSupport.intro
(isCompact_closedBall (0:Position) 1) (fun z hz => hg z
(by simpa only [Metric.mem_closedBall,dist_zero_right,not_le] using hz))
have hpost := posterior_count_le_observed Ξ½ rads hrads k hk hS hO
(fun x hx y hxy => packet_band_observation_support hr hL hnoise hx hxy)
let obs := tailObservation (n:=n) rads j
let P := observationLaw J Ξ½
let C := fun datum : Fin J β†’ UnorderedArray n =>
∫ x,rawCount S x βˆ‚ProbabilityTheory.condDistrib Prod.fst obs P datum
let M := fun datum : Fin J β†’ UnorderedArray n =>
unorderedSum (O.indicator (fun _ => (1:ℝ))) (datum k)
have hC : Measurable C := ((measurable_rawCount hS).stronglyMeasurable.integral_kernel
(ΞΊ:=ProbabilityTheory.condDistrib Prod.fst obs P)).measurable
have hM : Measurable M := (measurable_unorderedSum
(measurable_const.indicator hO)).comp (measurable_pi_apply k)
let G := obs ⁻¹' {datum | C datum ≀ M datum}
have hM_eq (sample : ObservationSample n J) : M (obs sample)=
rawCount O (observedOrdered rads k sample) := by
exact unorderedSum_tailObservation rads k hk _ sample
have hG : MeasurableSet G := (measurableSet_le hC hM).preimage (measurable_tailObservation rads j)
have hGt : MeasurableSet[observationSigma rads j] G :=
⟨{datum | C datum ≀ M datum},measurableSet_le hC hM,rfl⟩
have hGae : βˆ€α΅ sample βˆ‚P,sample∈G := by
filter_upwards [hpost] with sample hh
change C (obs sample) ≀ M (obs sample)
rw [hM_eq]
exact hh
refine ⟨G,⟨hG,hGt⟩,by exact ae_iff.mp hGae,?_⟩
intro sample hsamp
have hh : C (obs sample) ≀ rawCount O (observedOrdered rads k sample) := by
have hh : C (obs sample) ≀ M (obs sample) := hsamp
rwa [hM_eq] at hh
let Ξ½' := ProbabilityTheory.condDistrib Prod.fst (tailObservation rads j) (observationLaw J Ξ½)
(tailObservation rads j sample)
have hΟ„ : 0 < c*(r/3)*(r/3)^packetExponent := by positivity
have H := mixture_packet_band_bounds Ξ½' g.continuous hgs hB hD hbound hlip hc hrβ‚€ hs hΟ„ hS
(T:=T) (fun y hy x hx => packet_band_center_support hg hc hrβ‚€ hs hr hL hrrβ‚€ hscale hwidth hy.1 hy.2 hx)
(fun x hx => packet_band_width_lower hc hrβ‚€ hs hr hrs hx.1)
dsimp only
constructor
Β· intro y hy0 hy1
exact (H.1 y ⟨hy0,hy1⟩).trans (mul_le_mul_of_nonneg_left hh (by positivity))
Β· intro y z hy0 hy1 hz0 hz1
exact (H.2 y ⟨hy0,hy1⟩ z ⟨hz0,hz1⟩).trans (mul_le_mul_of_nonneg_left hh (by positivity))
end NeutralAtom
end
end
section
open MeasureTheory Set Filter
open scoped ENNReal NNReal BigOperators Classical
noncomputable section
namespace NeutralAtom
lemma posterior_mesh_modulus {Ξ© Data : Type*} [MeasurableSpace Ξ©] [MeasurableSpace Data]
{n : β„•} (P : Measure Ξ©) [IsFiniteMeasure P]
(raw : Ξ© β†’ Configuration n) (obs : Ξ© β†’ Data) (g : Position β†’ ℝ)
{c rβ‚€ s : ℝ} (hc : 0 < c) (hrβ‚€ : 0 < rβ‚€) (hs : 0 < s)
(datum : Data) (Z : ℝ) {r L Ο„ B D K C : ℝ}
(hr : 0 < r) (hL : 1 ≀ L) (hΟ„ : 0 < Ο„) (hΟ„r : Ο„ ≀ r)
(hrsmall : r ≀ 1/16) (hB : 0 ≀ B) (hD : 0 ≀ D) (hK : 0 ≀ K) (hC : 0 ≀ C)
(hden : βˆ€ y,r/2 ≀ β€–yβ€– β†’ β€–yβ€– ≀ 8*L*r β†’
conditionalPacketDensity P raw obs g c rβ‚€ s datum y ≀ (B/Ο„^3)*(K/r^3))
(hlip : βˆ€ y z,r/2 ≀ β€–yβ€– β†’ β€–yβ€– ≀ 8*L*r β†’ r/2 ≀ β€–zβ€– β†’ β€–zβ€– ≀ 8*L*r β†’
|conditionalPacketDensity P raw obs g c rβ‚€ s datum z-
conditionalPacketDensity P raw obs g c rβ‚€ s datum y| ≀ (D/Ο„^4)*β€–z-yβ€–*(K/r^3))
(hcap : βˆ€ y,3*r/4 ≀ β€–yβ€– β†’ β€–yβ€– ≀ 6*L*r β†’
β€–yβ€–^4*(Z*coulombKernel y-potentialOf (conditionalPacketDensity P raw obs g c rβ‚€ s datum) y) ≀ physicalSpatialCap)
(hosc : βˆ€ y z,r ≀ β€–yβ€– β†’ β€–yβ€– ≀ 4*L*r β†’ β€–z-yβ€– ≀ r/16 β†’
let F := fun x => Z*coulombKernel x-potentialOf (conditionalPacketDensity P raw obs g c rβ‚€ s datum) x
β€–F z-F yβ€– ≀ C*(β€–z-yβ€–/r)*((r/Ο„)^3/r^4+max (-F y) 0))
{y z : Position} (hy0 : r ≀ β€–yβ€–) (hy1 : β€–yβ€– ≀ 4*L*r)
(hz0 : r ≀ β€–zβ€–) (hz1 : β€–zβ€– ≀ 4*L*r) (hdist : β€–z-yβ€– ≀ r^2) :
let ρ := conditionalPacketDensity P raw obs g c rβ‚€ s datum
let U := fun x => β€–xβ€–^4*(Z*coulombKernel x-potentialOf ρ x)
|β€–zβ€–^6*ρ z-β€–yβ€–^6*ρ y| ≀
((4*L)^6*(D*K)+6*(4*L)^5*(B*K))*(r*(r/Ο„)^4) ∧
|U z-U y| ≀ (((4*L)^4*C+4*(4*L)^3*max physicalSpatialCap 1)*r)*
((r/Ο„)^3+max (-U y) 0) := by
let ρ := conditionalPacketDensity P raw obs g c rβ‚€ s datum
let F := fun x => Z*coulombKernel x-potentialOf ρ x
have hLr : 0 ≀ L*r := mul_nonneg (by linarith) hr.le
have hylo : r/2 ≀ β€–yβ€– := by linarith
have hyhi : β€–yβ€– ≀ 8*L*r := by nlinarith
have hzlo : r/2 ≀ β€–zβ€– := by linarith
have hzhi : β€–zβ€– ≀ 8*L*r := by nlinarith
dsimp only
constructor
Β· exact mesh_normalized_density_bound hr hL hΟ„ hΟ„r hB hD hK hy0 hy1 hz0 hz1 hdist
(conditionalPacketDensity_nonneg P raw obs g hc hrβ‚€ hs datum y)
(hden y hylo hyhi) (hlip y z hylo hyhi hzlo hzhi)
Β· have hd : β€–z-yβ€– ≀ r/16 := hdist.trans (by nlinarith)
have HH := normalized_field_difference (F:=F) (lam:=(r/Ο„)^3) hr hL hC physicalSpatialCap_pos.le
(one_le_powβ‚€ ((le_div_iffβ‚€ hΟ„).mpr (by simpa using hΟ„r))) hy0 hy1 hz0 hz1
(hcap y (by linarith) (by nlinarith)) (by simpa only [Real.norm_eq_abs] using hosc y z hy0 hy1 hd)
apply HH.trans
have hratio : β€–z-yβ€–/r ≀ r := (div_le_iffβ‚€ hr).mpr (by nlinarith)
gcongr
end NeutralAtom
end
end
section
open MeasureTheory Set Filter
open scoped ENNReal NNReal BigOperators Classical
noncomputable section
namespace NeutralAtom
lemma measurable_tailObservation_for_sigma {n J : β„•} (r : Fin J β†’ ℝ) (j : β„•) :
Measurable[observationSigma r j] (tailObservation (n:=n) r j) :=
measurable_iff_comap_le.mpr le_rfl
lemma measurable_observed_count_tail {n J : β„•} (r : Fin J β†’ ℝ) {j : β„•} (k : Fin J)
(hk : j ≀ k.val) {S : Set Position} (hS : MeasurableSet S) :
Measurable[observationSigma r j]
(fun z : ObservationSample n J => rawCount S (observedOrdered r k z)) := by
have HM : Measurable (fun datum : Fin J β†’ UnorderedArray n =>
unorderedSum (S.indicator (fun _ => (1:ℝ))) (datum k)) :=
(measurable_unorderedSum (measurable_const.indicator hS)).comp (measurable_pi_apply k)
have H := HM.comp (measurable_tailObservation_for_sigma r j)
convert H using 1
funext z
exact (unorderedSum_tailObservation r k hk _ z).symm
lemma measurable_normalized_posterior_density_tail {n J : β„•}
(P : Measure (ObservationSample n J)) [IsFiniteMeasure P]
(r : Fin J β†’ ℝ) (j : β„•) {g : Position β†’ ℝ} (hg : Continuous g)
{c rβ‚€ s : ℝ} (hc : 0 < c) (hrβ‚€ : 0 < rβ‚€) (hs : 0 < s) (y : Position) :
Measurable[observationSigma r j] (fun z => β€–yβ€–^6*
conditionalPacketDensity P Prod.fst (tailObservation r j) g c rβ‚€ s (tailObservation r j z) y) :=
measurable_const.mul ((measurable_conditionalPacketDensity_data P Prod.fst
(tailObservation r j) hg hc hrβ‚€ hs y).comp (measurable_tailObservation_for_sigma r j))
lemma measurable_normalized_posterior_field_tail {n J : β„•}
(P : Measure (ObservationSample n J)) [IsFiniteMeasure P]
(r : Fin J β†’ ℝ) (j : β„•) {g : Position β†’ ℝ} (hg : Continuous g)
(hgs : HasCompactSupport g) (hm : (∫ z,g z^2)=1)
{c rβ‚€ s : ℝ} (hc : 0 < c) (hrβ‚€ : 0 < rβ‚€) (hs : 0 < s) (Z : ℝ) (y : Position) :
Measurable[observationSigma r j] (fun z => β€–yβ€–^4*(Z*coulombKernel y-potentialOf
(conditionalPacketDensity P Prod.fst (tailObservation r j) g c rβ‚€ s (tailObservation r j z)) y)) :=
measurable_const.mul (measurable_const.sub
((measurable_conditionalPacketPotential_data P Prod.fst (tailObservation r j) hg hgs hm hc hrβ‚€ hs y).comp
(measurable_tailObservation_for_sigma r j)))
end NeutralAtom
end
end
end OAI

Xet Storage Details

Size:
10.5 kB
Β·
Xet hash:
17735afe8002cf69429dfe816d3f3f193bb435f8f78c5d3f73f0dcbf29f4d18b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.