Add lean source and binary files (part 119)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- lean/OAI/Probability/Ballisticity/Estimates/InputMarginal.leanAdded+51
- lean/OAI/Probability/Ballisticity/Estimates/IntegerMedian.leanAdded+435
- lean/OAI/Probability/Ballisticity/Estimates/InteriorPairMeasureExt.leanAdded+89
- lean/OAI/Probability/Ballisticity/Estimates/JointMeshPhase.leanAdded+156
- lean/OAI/Probability/Ballisticity/Estimates/JointPastMoments.leanAdded+149
- lean/OAI/Probability/Ballisticity/Estimates/JointPastRestart.leanAdded+187
- lean/OAI/Probability/Ballisticity/Estimates/LateMoment.leanAdded+145
- lean/OAI/Probability/Ballisticity/Estimates/LayerPairTruthEventMono.leanAdded+435
- lean/OAI/Probability/Ballisticity/Estimates/ListPrefixSum.leanAdded+46
- lean/OAI/Probability/Ballisticity/Estimates/LocalRadiusOrder.leanAdded+154
- lean/OAI/Probability/Ballisticity/Estimates/LocalStoppedSplice.leanAdded+321
- lean/OAI/Probability/Ballisticity/Estimates/LowerClip.leanAdded+434
- lean/OAI/Probability/Ballisticity/Estimates/MarkedObservables.leanAdded+186
- lean/OAI/Probability/Ballisticity/Estimates/MartingaleExponentialSubmartingale.leanAdded+429
- lean/OAI/Probability/Ballisticity/Estimates/MaxTailDecomposition.leanAdded+166
- lean/OAI/Probability/Ballisticity/Estimates/MeasurableCountableSample.leanAdded+245
- lean/OAI/Probability/Ballisticity/Estimates/MeasureAdd.leanAdded+423
- lean/OAI/Probability/Ballisticity/Estimates/MedianAeConst.leanAdded+289
- lean/OAI/Probability/Ballisticity/Estimates/MixtureSmallMassProbability.leanAdded+351
- lean/OAI/Probability/Ballisticity/Estimates/MomentRescaling.leanAdded+160
- lean/OAI/Probability/Ballisticity/Estimates/NaturalTailIntegrable.leanAdded+88
- lean/OAI/Probability/Ballisticity/Estimates/NoDropApproxError.leanAdded+272
- lean/OAI/Probability/Ballisticity/Estimates/NonCollapsedSums.leanAdded+159
- lean/OAI/Probability/Ballisticity/Estimates/NormalLinearPast.leanAdded+229
- lean/OAI/Probability/Ballisticity/Estimates/NormalizedRestrictionContact.leanAdded+201
- lean/OAI/Probability/Ballisticity/Estimates/NormalizedSharedRestrict.leanAdded+196
- lean/OAI/Probability/Ballisticity/Estimates/ObservedBudget.leanAdded+234
- lean/OAI/Probability/Ballisticity/Estimates/ObservedCharges.leanAdded+277
- lean/OAI/Probability/Ballisticity/Estimates/ObservedDrift.leanAdded+185
- lean/OAI/Probability/Ballisticity/Estimates/ObservedPotential.leanAdded+158
- lean/OAI/Probability/Ballisticity/Estimates/ObserverAlmostSure.leanAdded+170
- lean/OAI/Probability/Ballisticity/Estimates/OccupationAlgebra.leanAdded+114
- lean/OAI/Probability/Ballisticity/Estimates/OccupationLimit.leanAdded+246
- lean/OAI/Probability/Ballisticity/Estimates/OccupationParameters.leanAdded+132
- lean/OAI/Probability/Ballisticity/Estimates/OccupationSampling.leanAdded+221
- lean/OAI/Probability/Ballisticity/Estimates/OperationalLengthMarks.leanAdded+176
- lean/OAI/Probability/Ballisticity/Estimates/OperationalMarkBounds.leanAdded+150
- lean/OAI/Probability/Ballisticity/Estimates/OrderedTimes.leanAdded+425
- lean/OAI/Probability/Ballisticity/Estimates/OutwardCanonical.leanAdded+122
- lean/OAI/Probability/Ballisticity/Estimates/OutwardCapL1.leanAdded+133
- lean/OAI/Probability/Ballisticity/Estimates/OutwardCapLocality.leanAdded+81
- lean/OAI/Probability/Ballisticity/Estimates/OwnMarginalOccupation.leanAdded+98
- lean/OAI/Probability/Ballisticity/Estimates/PairPrefix.leanAdded+490
- lean/OAI/Probability/Ballisticity/Estimates/PairUpwardRetention.leanAdded+96
- lean/OAI/Probability/Ballisticity/Estimates/PairWeakUniqueness.leanAdded+53
- lean/OAI/Probability/Ballisticity/Estimates/PastPhaseExtension.leanAdded+153
- lean/OAI/Probability/Ballisticity/Estimates/PolicyGoodMass.leanAdded+145
- lean/OAI/Probability/Ballisticity/Estimates/PrefixVariation.leanAdded+313
- lean/OAI/Probability/Ballisticity/Estimates/PrefixVariationNonneg.leanAdded+331
- lean/OAI/Probability/Ballisticity/Estimates/ProbabilityLowerTransfer.leanAdded+49
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051import Mathlibimport OAI.Probability.Ballisticity.Estimates.LocalStoppedSpliceimport OAI.Probability.Ballisticity.Entropy.AnchorEntropy
namespace OAI
section
open MeasureTheory ProbabilityTheoryopen scoped ENNReal Classicalnamespace DirectionalTransience
noncomputable def currentInput {d : ℕ} (e : Direction d) (i : ℤ) (m : ℕ) (X : EpisodeInput e) : (Environment d × (ℕ → HorizontalSpace e)) × LocalUpperField e := ((X.1.1,fun a => X.1.2 (i,a)),X.2 (i,m))
lemma currentInput_measurable {d : ℕ} (e : Direction d) (i : ℤ) (m : ℕ) : Measurable (currentInput e i m) := by exact ((measurable_fst.comp measurable_fst).prodMk (Measurable.of_eval fun a => (measurable_pi_apply (i,a)).comp (measurable_snd.comp measurable_fst))).prodMk ((measurable_pi_apply (i,m)).comp measurable_snd)
theorem episodeInputLaw_current {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (i : ℤ) (m : ℕ) : (episodeInputLaw e ν Q t ht).map (currentInput e i m) = (Q.compProd (currentAnchorKernel e (fun ω => t ω i) (ht i))).prod (Measure.infinitePi (fun _ : ℕ × HorizontalSpace e => ν)) := by let f : EpisodeAnchors e → ℕ → HorizontalSpace e := fun U a => U (i,a) have hf : Measurable f := Measurable.of_eval fun a => measurable_pi_apply (i,a) have hK : (globalEpisodeAnchors e t ht).map f = currentAnchorKernel e (fun ω => t ω i) (ht i) := by ext ω : 1 rw [Kernel.map_apply _ hf] exact globalEpisodeAnchors_current e t ht ω i have hπ : (episodeAuxiliaryLaw e ν).map (fun V => V (i,m)) = Measure.infinitePi (fun _ : ℕ × HorizontalSpace e => ν) := by exact Measure.infinitePi_map_eval _ (i,m) change ((Q.compProd (globalEpisodeAnchors e t ht)).prod (episodeAuxiliaryLaw e ν)).map (Prod.map (Prod.map id f) (fun V => V (i,m))) = _ rw [← Measure.map_prod_map _ _ (measurable_id.prodMap hf) (measurable_pi_apply (i,m)), ← Measure.compProd_map hf,hK,hπ]
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435import Mathlibimport OAI.Probability.Ballisticity.Estimates.RecordIndexTime
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
noncomputable def integerMedian (μ : Measure ℤ) [IsProbabilityMeasure μ] : ℤ := (exists_integer_median μ).choose
lemma integerMedian_spec (μ : Measure ℤ) [IsProbabilityMeasure μ] : (1/2 : ℝ≥0∞) ≤ μ (Set.Iic (integerMedian μ)) ∧ (1/2 : ℝ≥0∞) ≤ μ (Set.Ici (integerMedian μ)) := (exists_integer_median μ).choose_spec
lemma median_family_symmetrization {Ω ι : Type*} [MeasurableSpace Ω] [Countable ι] (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hf : ∀ i, Measurable (f i)) (b : ι → ℝ) (hb : ∀ i, (1/2 : ℝ≥0∞) ≤ μ {x | f i x ≤ b i} ∧ (1/2 : ℝ≥0∞) ≤ μ {x | b i ≤ f i x}) (s : Set ι) (z : ℝ) : (1/2 : ℝ≥0∞) * μ {x | ∃ i ∈ s, z < |f i x-b i|} ≤ μ.prod μ {P | ∃ i ∈ s, z < |f i P.1-f i P.2|} := by classical let A : Set Ω := {x | ∃ i ∈ s, z < |f i x-b i|} let E : Set (Ω × Ω) := {P | ∃ i ∈ s, z < |f i P.1-f i P.2|} have hA : MeasurableSet A := by simp only [A,Set.ofPred_exists,Set.ofPred_and] exact MeasurableSet.iUnion fun i => (MeasurableSet.const _).inter (measurableSet_lt measurable_const ((hf i).sub_const (b i)).abs) have hE : MeasurableSet E := by simp only [E,Set.ofPred_exists,Set.ofPred_and] exact MeasurableSet.iUnion fun i => (MeasurableSet.const _).inter (measurableSet_lt measurable_const (((hf i).comp measurable_fst).sub ((hf i).comp measurable_snd)).abs) change (1/2 : ℝ≥0∞) * μ A ≤ μ.prod μ E rw [Measure.prod_apply hE] calc _ = ∫⁻ x, A.indicator (fun _ => (1/2 : ℝ≥0∞)) x ∂μ := by rw [lintegral_indicator hA,lintegral_const,Measure.restrict_apply_univ] _ ≤ _ := by apply lintegral_mono intro x by_cases hx : x ∈ A · rw [Set.indicator_of_mem hx] obtain ⟨i,hi,hlarge⟩ := hx rcases (lt_abs.mp hlarge) with hright | hleft · apply (hb i).1.trans (measure_mono ?_) intro y hy change f i y ≤ b i at hy refine ⟨i,hi,?_⟩ exact lt_of_lt_of_le (by linarith : z < f i x-f i y) (le_abs_self _) · apply (hb i).2.trans (measure_mono ?_) intro y hy change b i ≤ f i y at hy refine ⟨i,hi,?_⟩ exact lt_of_lt_of_le (by linarith : z < -(f i x-f i y)) (neg_le_abs _) · rw [Set.indicator_of_notMem hx] exact bot_le
def signedIntegerCoordinate {d : ℕ} (e : Direction d) (x : Lattice d) : ℤ := if e.2 then x e.1 else -x e.1
lemma signedIntegerCoordinate_cast {d : ℕ} (e : Direction d) (x : Lattice d) : (signedIntegerCoordinate e x : ℝ) = signedCoordinate e x := by simp only [signedIntegerCoordinate,signedCoordinate] split <;> simp
noncomputable def recordMedian {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) (e : Direction d) (r : ℕ) : ℤ := by let : IsProbabilityMeasure (conditionedLaw ν ℓ) := conditionedLaw_probability ν ℓ hp let f : Path d → ℤ := fun X => signedIntegerCoordinate e (recordIndexPosition ℓ r X) have hf : Measurable f := (measurable_of_countable (signedIntegerCoordinate e)).comp (measurable_recordIndexPosition ℓ r) let : IsProbabilityMeasure ((conditionedLaw ν ℓ).map f) := (Measure.isProbabilityMeasure_map_iff hf.aemeasurable).mpr inferInstance exact integerMedian ((conditionedLaw ν ℓ).map f)
lemma recordMedian_spec {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) (e : Direction d) (r : ℕ) : (1/2 : ℝ≥0∞) ≤ conditionedLaw ν ℓ {X | signedCoordinate e (recordIndexPosition ℓ r X) ≤ (recordMedian ν ℓ hp e r : ℝ)} ∧ (1/2 : ℝ≥0∞) ≤ conditionedLaw ν ℓ {X | (recordMedian ν ℓ hp e r : ℝ) ≤ signedCoordinate e (recordIndexPosition ℓ r X)} := by let : IsProbabilityMeasure (conditionedLaw ν ℓ) := conditionedLaw_probability ν ℓ hp let f : Path d → ℤ := fun X => signedIntegerCoordinate e (recordIndexPosition ℓ r X) have hf : Measurable f := (measurable_of_countable (signedIntegerCoordinate e)).comp (measurable_recordIndexPosition ℓ r) let : IsProbabilityMeasure ((conditionedLaw ν ℓ).map f) := (Measure.isProbabilityMeasure_map_iff hf.aemeasurable).mpr inferInstance have h := integerMedian_spec ((conditionedLaw ν ℓ).map f) rw [Measure.map_apply hf measurableSet_Iic,Measure.map_apply hf measurableSet_Ici] at h have he (X : Path d) : signedCoordinate e (recordIndexPosition ℓ r X) = (f X : ℝ) := (signedIntegerCoordinate_cast e _).symm simp only [he,Int.cast_le] at ⊢ exact h
lemma conditioned_firstHit_median_maximum {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (hstep : ∀ x e, height (x+step e) ≤ height x+1) (e : Direction d) (H : ℕ) (z : ℝ) : (annealedLaw ν (NoDrop ℓ 0))^2 * (1/2 : ℝ≥0∞) * conditionedLaw ν ℓ {X | ∃ r, 0 < r ∧ r ≤ H ∧ z < |signedCoordinate e (recordIndexPosition ℓ r X) - (recordMedian ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) e r : ℝ)|} ≤ independentConditionedPairLaw ν ℓ {P | z < partialSumMax (fun n => commonIncrementProcess ℓ e n P) H} := by have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) let : IsProbabilityMeasure (conditionedLaw ν ℓ) := conditionedLaw_probability ν ℓ hp have hs := median_family_symmetrization (conditionedLaw ν ℓ) (fun r X => signedCoordinate e (recordIndexPosition ℓ r X)) (fun r => (measurable_of_countable (signedCoordinate e)).comp (measurable_recordIndexPosition ℓ r)) (fun r => (recordMedian ν ℓ hp e r : ℝ)) (recordMedian_spec ν ℓ hp e) {r | 0 < r ∧ r ≤ H} z simp only [Set.mem_ofPred_eq,and_assoc] at hs rw [mul_assoc] exact (mul_le_mul_right hs _).trans (independent_firstHit_pair_maximum ν ℓ htrans height hproj hstep e H z)
def IsGaussianSequence {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (S : Ω → ℝ) (r : ℕ → ℝ) : Prop := Tendsto r atTop atTop ∧ ∀ a : ℝ, 0 < a → Tendsto (fun i => fluctuationScale μ S (r i) * μ.real {x | a*r i < |S x|}) atTop (𝓝 0)
lemma one_sub_cos_sinc (x : ℝ) : 1-Real.cos x = x^2/2*(Real.sinc (x/2))^2 := by by_cases hx : x = 0 · simp [hx] · rw [Real.sinc_of_ne_zero (div_ne_zero hx (by norm_num))] have hc := Real.cos_two_mul (x/2) have hs := Real.sin_sq_add_cos_sq (x/2) have he : 2*(x/2) = x := by ring rw [he] at hc field_simp nlinarith
lemma cosine_quadratic_local (t : ℝ) {ε : ℝ} (hε : 0 < ε) : ∃ δ : ℝ, 0 < δ ∧ δ ≤ 1 ∧ ∀ y : ℝ, |y| ≤ δ → |(1-Real.cos (t*y)) - (t^2/2)*y^2| ≤ ε*y^2 := by let c : ℝ → ℝ := fun y => t^2/2*((Real.sinc (t*y/2))^2-1) have hc : Continuous c := by fun_prop have hc0 : c 0 = 0 := by simp [c] obtain ⟨δ,hδ,hd⟩ := (Metric.continuousAt_iff.mp hc.continuousAt) ε hε refine ⟨min (δ/2) 1,lt_min (by positivity) zero_lt_one,min_le_right ..,?_⟩ intro y hy have hyd : dist y 0 < δ := by rw [Real.dist_eq,sub_zero] exact lt_of_le_of_lt (hy.trans (min_le_left ..)) (by linarith) have hcy : |c y| < ε := by simpa [Real.dist_eq,hc0] using hd hyd have he : (1-Real.cos (t*y)) - (t^2/2)*y^2 = c y*y^2 := by rw [one_sub_cos_sinc] dsimp [c] ring rw [he,abs_mul,abs_of_nonneg (sq_nonneg y)] exact mul_le_mul_of_nonneg_right hcy.le (sq_nonneg y)
lemma truncatedVariance_div {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (S : Ω → ℝ) {r : ℝ} (hr : 0 < r) : truncatedVariance μ (fun x => S x/r) 1 = truncatedVariance μ S r / r^2 := by unfold truncatedVariance rw [← integral_div] apply integral_congr_ae filter_upwards [] with x rw [one_pow,div_pow,← min_div_div_right (le_of_lt (sq_pos_of_pos hr)),div_self (pow_ne_zero 2 (ne_of_gt hr))]
lemma gaussian_quadratic_integral {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {x | S x ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence μ S r) (g : ℝ → ℝ) (hg : Measurable g) (c C : ℝ) (hC : ∀ y, |g y| ≤ C) (hc : ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ δ ≤ 1 ∧ ∀ y, |y| ≤ δ → |g y-c*y^2| ≤ ε*y^2) : Tendsto (fun i => fluctuationScale μ S (r i) * ∫ x, g (S x/r i) ∂μ) atTop (𝓝 c) := by have hC0 : 0 ≤ C := (abs_nonneg (g 0)).trans (hC 0) have hIg (i : ℕ) : Integrable (fun x => g (S x/r i)) μ := (integrable_const C).mono' ((hg.comp (hS.div_const _)).aestronglyMeasurable) (Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hC (S x/r i)) apply Metric.tendsto_nhds.mpr intro ε hε obtain ⟨δ,hδ,hδ1,hlocal⟩ := hc (ε/2) (by positivity) have htail : Tendsto (fun i => (C+|c|) * (fluctuationScale μ S (r i) * μ.real {x | δ*r i < |S x|})) atTop (𝓝 0) := by simpa using (hr.2 δ hδ).const_mul (C+|c|) have ht := (tendsto_order.mp htail).2 (ε/2) (by positivity) filter_upwards [hr.1.eventually (eventually_gt_atTop (0:ℝ)),ht] with i hri hti let Y : Ω → ℝ := fun x => S x/r i let A : Set Ω := {x | δ*r i < |S x|} have hA : MeasurableSet A := measurableSet_lt measurable_const hS.abs have hY : Measurable Y := hS.div_const _ have hmt : Integrable (fun x => min ((Y x)^2) 1) μ := by simpa using integrable_truncated_square μ Y hY 1 have hE : ∀ x, |g (Y x)-c*min ((Y x)^2) 1| ≤ (ε/2)*min ((Y x)^2) 1 + A.indicator (fun _ => C+|c|) x := by intro x by_cases hx : x ∈ A · rw [Set.indicator_of_mem hx] have hm0 : 0 ≤ min ((Y x)^2) 1 := le_min (sq_nonneg _) zero_le_one have hm1 : min ((Y x)^2) 1 ≤ 1 := min_le_right .. have hb := (abs_sub (g (Y x)) (c*min ((Y x)^2) 1)).trans (add_le_add (hC (Y x)) (le_of_eq (abs_mul c _))) rw [abs_of_nonneg hm0] at hb nlinarith [abs_nonneg c] · rw [Set.indicator_of_notMem hx,add_zero] have hxy : |Y x| ≤ δ := by rw [show Y x = S x/r i from rfl,abs_div,abs_of_pos hri,div_le_iff₀ hri] exact le_of_not_gt hx have hx1 : (Y x)^2 ≤ 1 := by nlinarith [sq_abs (Y x),abs_nonneg (Y x)] rw [min_eq_left hx1] exact hlocal _ hxy have hInt : |(∫ x, g (Y x) ∂μ)-c*truncatedVariance μ Y 1| ≤ ε/2*truncatedVariance μ Y 1 + (C+|c|)*μ.real A := by simp only [truncatedVariance,one_pow] rw [← integral_const_mul,← integral_sub (hIg i) (hmt.const_mul c)] calc _ ≤ ∫ x, |g (Y x)-c*min ((Y x)^2) 1| ∂μ := abs_integral_le_integral_abs _ ≤ ∫ x, (ε/2)*min ((Y x)^2) 1 + A.indicator (fun _ => C+|c|) x ∂μ := integral_mono ((hIg i).sub (hmt.const_mul c)).abs ((hmt.const_mul (ε/2)).add ((integrable_const (C+|c|)).indicator hA)) hE _ = _ := by rw [integral_add (hmt.const_mul (ε/2)) ((integrable_const (C+|c|)).indicator hA), integral_const_mul,integral_indicator hA,integral_const] simp [smul_eq_mul,mul_comm,Measure.real] have hmpos := truncatedVariance_pos μ S hS hne hri have hnpos : 0 < fluctuationScale μ S (r i) := div_pos (sq_pos_of_pos hri) hmpos have hnorm : fluctuationScale μ S (r i)*truncatedVariance μ Y 1 = 1 := by rw [show Y = (fun x => S x/r i) from rfl,truncatedVariance_div μ S hri,fluctuationScale] field_simp have hbound := mul_le_mul_of_nonneg_left hInt hnpos.le rw [Real.dist_eq] have hrew : fluctuationScale μ S (r i)*( (∫ x, g (Y x) ∂μ)-c*truncatedVariance μ Y 1) = fluctuationScale μ S (r i)*(∫ x, g (Y x) ∂μ)-c := by rw [mul_sub] congr 1 calc _ = c*(fluctuationScale μ S (r i)*truncatedVariance μ Y 1) := by ring _ = c := by rw [hnorm,mul_one] have hab : |fluctuationScale μ S (r i)*( (∫ x, g (Y x) ∂μ)-c*truncatedVariance μ Y 1)| = fluctuationScale μ S (r i)*|(∫ x, g (Y x) ∂μ)-c*truncatedVariance μ Y 1| := by rw [abs_mul,abs_of_pos hnpos] rw [← hab,hrew] at hbound have hrw : fluctuationScale μ S (r i) * (ε/2*truncatedVariance μ Y 1 + (C+|c|)*μ.real A) = ε/2+(C+|c|)*(fluctuationScale μ S (r i)*μ.real A) := by calc _ = ε/2*(fluctuationScale μ S (r i)*truncatedVariance μ Y 1) + (C+|c|)*(fluctuationScale μ S (r i)*μ.real A) := by ring _ = _ := by rw [hnorm,mul_one] rw [hrw] at hbound exact hbound.trans_lt (by linarith)
lemma gaussian_cosine_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {x | S x ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence μ S r) (t : ℝ) : Tendsto (fun i => fluctuationScale μ S (r i) * ∫ x, 1-Real.cos (t*(S x/r i)) ∂μ) atTop (𝓝 (t^2/2)) := by apply gaussian_quadratic_integral μ S hS hne r hr (fun y => 1-Real.cos (t*y)) (by fun_prop) (t^2/2) 2 · intro y rw [abs_of_nonneg (sub_nonneg.mpr (Real.cos_le_one _))] linarith [Real.neg_one_le_cos (t*y)] · exact fun ε hε => cosine_quadratic_local t hε
lemma symmetric_sine_integral {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (S : Ω → ℝ) (hsym : IdentDistrib S (fun x => -S x) μ μ) (t : ℝ) : (∫ x, Real.sin (t*S x) ∂μ) = 0 := by have he := (hsym.comp (u := fun y : ℝ => Real.sin (t*y)) (by fun_prop)).integral_eq simp only [Function.comp_def,mul_neg,Real.sin_neg,integral_neg] at he linarith
lemma symmetric_charFun_cosine {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hsym : IdentDistrib S (fun x => -S x) μ μ) (t : ℝ) : charFun (μ.map S) t = ((∫ x, Real.cos (t*S x) ∂μ : ℝ) : ℂ) := by have hI : Integrable (fun x => Complex.exp ((t*S x : ℝ)*Complex.I)) μ := by apply (integrable_const (1:ℝ)).mono' (by fun_prop) exact Eventually.of_forall fun x => (Complex.norm_exp_ofReal_mul_I (t*S x)).le rw [charFun_apply_real,integral_map hS.aemeasurable (by fun_prop)] simp only [← Complex.ofReal_mul] apply Complex.ext · simpa only [RCLike.re_to_complex, Complex.exp_ofReal_mul_I, Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.ofReal_im, Complex.I_re, Complex.I_im, mul_zero, zero_mul, sub_zero, add_zero] using (integral_re hI).symm · have he := (integral_im hI).symm simpa only [RCLike.im_to_complex, Complex.exp_ofReal_mul_I, Complex.add_im, Complex.ofReal_im, Complex.mul_im, Complex.ofReal_re, Complex.I_re, Complex.I_im, mul_zero, mul_one, zero_mul, add_zero, zero_add, symmetric_sine_integral μ S hsym t] using he
lemma gaussian_cosine_drift {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {x | S x ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence μ S r) (t : ℝ) : Tendsto (fun i => fluctuationScale μ S (r i) * ((∫ x, Real.cos (t*(S x/r i)) ∂μ)-1)) atTop (𝓝 (-(t^2/2))) := by have hcos (i : ℕ) : Integrable (fun x => Real.cos (t*(S x/r i))) μ := (integrable_const (1:ℝ)).mono' (by fun_prop) (Eventually.of_forall fun _ => by simpa only [Real.norm_eq_abs] using Real.abs_cos_le_one _) convert (gaussian_cosine_limit μ S hS hne r hr t).neg using 1 ext i rw [integral_sub (integrable_const 1) (hcos i),integral_const] simp only [probReal_univ,one_smul] ring
lemma tendsto_pow_variable_of_drift {a : ℕ → ℝ} {k : ℕ → ℕ} {c : ℝ} (ha : Tendsto a atTop (𝓝 1)) (hd : Tendsto (fun i => (k i : ℝ)*(a i-1)) atTop (𝓝 c)) : Tendsto (fun i => (a i)^(k i)) atTop (𝓝 (Real.exp c)) := by have hds : Tendsto (fun i => dslope Real.log 1 (a i)) atTop (𝓝 1) := by have h := (continuousAt_dslope_same.mpr (Real.differentiableAt_log one_ne_zero)).tendsto.comp ha simpa [Real.deriv_log,Function.comp_def] using h have hlog : Tendsto (fun i => (k i : ℝ)*Real.log (a i)) atTop (𝓝 c) := by convert hd.mul hds using 1 · ext i have he := sub_smul_dslope Real.log 1 (a i) simp only [smul_eq_mul,Real.log_one,sub_zero] at he rw [mul_assoc,he] · simp apply (Real.continuous_exp.tendsto c |>.comp hlog).congr' filter_upwards [(tendsto_order.mp ha).1 0 zero_lt_one] with i hi dsimp only [Function.comp_def] rw [Real.exp_nat_mul,Real.exp_log hi]
lemma gaussian_cosine_power_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hI : Integrable S μ) (hne : 0 < μ {x | S x ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence μ S r) {τ : ℝ} (hτ : 0 ≤ τ) (t : ℝ) : Tendsto (fun i => (∫ x, Real.cos (t*(S x/r i)) ∂μ)^(⌊τ*fluctuationScale μ S (r i)⌋₊)) atTop (𝓝 (Real.exp (-(τ*t^2/2)))) := by have hn : Tendsto (fun i => fluctuationScale μ S (r i)) atTop atTop := (fluctuationScale_tendsto μ S hS hI hne).comp hr.1 have hd := gaussian_cosine_drift μ S hS hne r hr t have hzero : Tendsto (fun i => (∫ x, Real.cos (t*(S x/r i)) ∂μ)-1) atTop (𝓝 0) := by have hz := hd.mul (tendsto_inv_atTop_zero.comp hn) simp only [mul_zero] at hz apply hz.congr' filter_upwards [hn.eventually (eventually_gt_atTop (0:ℝ))] with i hi dsimp only [Function.comp_def] field_simp have ha : Tendsto (fun i => ∫ x, Real.cos (t*(S x/r i)) ∂μ) atTop (𝓝 1) := by simpa using hzero.add_const 1 have hk := (tendsto_nat_floor_mul_div_atTop hτ).comp hn have hdk : Tendsto (fun i => (⌊τ*fluctuationScale μ S (r i)⌋₊ : ℝ)* ((∫ x, Real.cos (t*(S x/r i)) ∂μ)-1)) atTop (𝓝 (-(τ*t^2/2))) := by have hc := hk.mul hd have he : τ * (-(t^2/2)) = -(τ*t^2/2) := by ring rw [he] at hc apply hc.congr' filter_upwards [hn.eventually (eventually_gt_atTop (0:ℝ))] with i hi dsimp only [Function.comp_def] field_simp exact tendsto_pow_variable_of_drift ha hdk
lemma gaussian_charFun_power_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hI : Integrable S μ) (hne : 0 < μ {x | S x ≠ 0}) (hsym : IdentDistrib S (fun x => -S x) μ μ) (r : ℕ → ℝ) (hr : IsGaussianSequence μ S r) {τ : ℝ} (hτ : 0 ≤ τ) (t : ℝ) : Tendsto (fun i => (charFun (μ.map S) (t/r i))^(⌊τ*fluctuationScale μ S (r i)⌋₊)) atTop (𝓝 (Complex.exp (-(τ*t^2/2 : ℝ)))) := by convert (gaussian_cosine_power_limit μ S hS hI hne r hr hτ t).ofReal using 1 · ext i rw [symmetric_charFun_cosine μ S hS hsym] rw [← Complex.ofReal_pow] congr 2 apply integral_congr_ae filter_upwards [] with x congr 1 ring · simp
lemma charFun_div_partialSum {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : ℕ → Ω → ℝ) (hind : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ) (n : ℕ) (r t : ℝ) : charFun (μ.map (fun ω => realPartialSum (fun k => X k ω) n / r)) t = (charFun (μ.map (X 0)) (t/r)) ^ n := by have hm i := (hident i).aemeasurable_fst simp only [realPartialSum,div_eq_inv_mul] rw [charFun_map_mul_comp, (hind.restrict _).charFun_map_fun_finsetSum_eq_prod (fun _ _ => hm _)] · simp [fun i => (hident i).map_eq] · exact Finset.aemeasurable_fun_sum _ fun _ _ => hm _
theorem gaussian_iid_marginal_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ k, Measurable (X k)) (hind : iIndepFun X μ) (hident : ∀ k, IdentDistrib (X k) (X 0) μ μ) (hI : Integrable (X 0) μ) (hne : 0 < μ {x | X 0 x ≠ 0}) (hsym : IdentDistrib (X 0) (fun x => -X 0 x) μ μ) (r : ℕ → ℝ) (hr : IsGaussianSequence μ (X 0) r) (τ : ℝ≥0) : TendstoInDistribution (fun i ω => realPartialSum (fun k => X k ω) (⌊(τ:ℝ)*fluctuationScale μ (X 0) (r i)⌋₊) / r i) atTop id (fun _ => μ) (gaussianReal 0 τ) where forall_aemeasurable i := (Finset.aemeasurable_fun_sum _ fun k _ => (hX k).aemeasurable).div_const _ tendsto := by refine ProbabilityMeasure.tendsto_iff_tendsto_charFun.2 fun t => ?_ change Tendsto (fun i => charFun (μ.map (fun ω => realPartialSum (fun k => X k ω) (⌊(τ:ℝ)*fluctuationScale μ (X 0) (r i)⌋₊) / r i)) t) atTop (𝓝 (charFun ((gaussianReal 0 τ).map id) t)) simp only [Measure.map_id, charFun_div_partialSum μ X hind hident, charFun_gaussianReal, Complex.ofReal_zero, mul_zero, zero_mul, zero_sub] convert gaussian_charFun_power_limit μ (X 0) (hX 0) hI hne hsym r hr τ.coe_nonneg t using 1 norm_cast
theorem independent_common_gaussian_marginal {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (hstep : ∀ x e, height (x+step e) ≤ height x+1) (e : Direction d) (hne : 0 < independentConditionedPairLaw ν ℓ {P | commonIncrementProcess ℓ e 0 P ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ e 0) r) (τ : ℝ≥0) : letI : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) TendstoInDistribution (fun i P => realPartialSum (fun k => commonIncrementProcess ℓ e k P) (⌊(τ:ℝ)*fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ e 0) (r i)⌋₊) / r i) atTop id (fun _ => independentConditionedPairLaw ν ℓ) (gaussianReal 0 τ) := by let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) exact gaussian_iid_marginal_limit _ _ (measurable_commonIncrementProcess ℓ e) (commonIncrements_independent ν ℓ htrans height hproj hstep e) (commonIncrements_identDistrib ν ℓ htrans height hproj hstep e) (independent_commonWordIncrement_integrable ν hue ℓ hℓ htrans height hproj hstep e) hne (independent_commonWordIncrement_symmetric ν ℓ htrans e) r hr τ
end DirectionalTransienceendend
end OAI1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889import Mathlibimport OAI.Probability.Ballisticity.Estimates.ProductNormalJointPast
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
noncomputable def shrinkTime (n : ℕ) (t : unitInterval) : unitInterval := ⟨((n:ℝ)+1)/((n:ℝ)+2)*(t:ℝ),by have hn : 0 ≤ ((n:ℝ)+1)/((n:ℝ)+2) := by positivity have hle : ((n:ℝ)+1)/((n:ℝ)+2) ≤ 1 := (div_le_one (by positivity)).mpr (by linarith) exact ⟨mul_nonneg hn t.property.1,(mul_le_mul_of_nonneg_left t.property.2 hn).trans (by simpa using hle)⟩⟩
lemma shrinkTime_lt_one (n : ℕ) (t : unitInterval) : (shrinkTime n t:ℝ) < 1 := by have hn : 0 ≤ ((n:ℝ)+1)/((n:ℝ)+2) := by positivity have hlt : ((n:ℝ)+1)/((n:ℝ)+2) < 1 := (div_lt_one (by positivity)).mpr (by linarith) exact (mul_le_mul_of_nonneg_left t.property.2 hn).trans_lt (by simpa using hlt)
lemma shrinkTime_tendsto (t : unitInterval) : Tendsto (fun n => shrinkTime n t) atTop (𝓝 t) := by have hh : Tendsto (fun n : ℕ => (1:ℝ)/((n:ℝ)+2)) atTop (𝓝 0) := tendsto_const_nhds.div_atTop (tendsto_atTop_add_const_right atTop 2 tendsto_natCast_atTop_atTop) apply tendsto_subtype_rng.mpr have hc := ((tendsto_const_nhds (x := (1:ℝ))).sub hh).mul_const (t:ℝ) simp only [sub_zero,one_mul] at hc convert hc using 1 funext n change ((n:ℝ)+1)/((n:ℝ)+2)*(t:ℝ)=(1-1/((n:ℝ)+2))*(t:ℝ) field_simp ring
lemma interior_pair_measure_ext (μ ν : Measure RealPathPair) [IsFiniteMeasure μ] [IsFiniteMeasure ν] (h : ∀ I : Finset unitInterval, (∀ t ∈ I,(t:ℝ) < 1) → μ.map (pairRestricted I)=ν.map (pairRestricted I)) : μ=ν := by let e := TopologicalSpace.denseSeq unitInterval let f := fun j : ℕ × ℕ => shrinkTime j.2 (e j.1) let E := fun P : RealPathPair => fun j : ℕ × ℕ => (P.1 (f j),P.2 (f j)) have hE : Continuous E := by fun_prop have hEinj : Function.Injective E := by intro P Q hPQ have hcoord (n : ℕ) : (P.1 (e n),P.2 (e n))=(Q.1 (e n),Q.2 (e n)) := by have hp : Tendsto (fun m => (P.1 (shrinkTime m (e n)),P.2 (shrinkTime m (e n)))) atTop (𝓝 (P.1 (e n),P.2 (e n))) := ((P.1.continuous.prodMk P.2.continuous).tendsto (e n)).comp (shrinkTime_tendsto (e n)) have hq : Tendsto (fun m => (Q.1 (shrinkTime m (e n)),Q.2 (shrinkTime m (e n)))) atTop (𝓝 (Q.1 (e n),Q.2 (e n))) := ((Q.1.continuous.prodMk Q.2.continuous).tendsto (e n)).comp (shrinkTime_tendsto (e n)) apply tendsto_nhds_unique hp apply hq.congr intro m exact (congrFun hPQ (n,m)).symm apply Prod.ext · apply ContinuousMap.coe_injective exact (TopologicalSpace.denseRange_denseSeq unitInterval).equalizer P.1.continuous Q.1.continuous (funext fun n => congrArg Prod.fst (hcoord n)) · apply ContinuousMap.coe_injective exact (TopologicalSpace.denseRange_denseSeq unitInterval).equalizer P.2.continuous Q.2.continuous (funext fun n => congrArg Prod.snd (hcoord n)) apply hE.measurableEmbedding hEinj |>.map_injective let P := fun J : Finset (ℕ × ℕ) => (μ.map E).map J.restrict have : ∀ J, IsFiniteMeasure (P J) := fun _ => inferInstance apply IsProjectiveLimit.unique (P := P) (fun _ => rfl) intro J let I := J.image f let g := fun z : I → ℝ × ℝ => fun j : J => z ⟨f j,Finset.mem_image_of_mem f j.property⟩ have hg : Measurable g := by fun_prop have hm : Measurable (J.restrict : ((ℕ × ℕ) → ℝ × ℝ) → (J → ℝ × ℝ)) := by fun_prop change (ν.map E).map J.restrict=(μ.map E).map J.restrict rw [Measure.map_map hm hE.measurable,Measure.map_map hm hE.measurable] have he : J.restrict ∘ E=g ∘ pairRestricted I := rfl rw [he,← Measure.map_map hg (pairRestricted I).continuous.measurable, ← Measure.map_map hg (pairRestricted I).continuous.measurable,h I] intro t ht obtain ⟨j,hj,rfl⟩ := Finset.mem_image.mp ht exact shrinkTime_lt_one j.2 (e j.1)
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156import Mathlibimport OAI.Probability.Ballisticity.Estimates.PastPhaseExtensionimport OAI.Probability.Ballisticity.Crossings.CutoffTimeAverages
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
lemma normalJointPast_mesh_phase_bound {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) {A K : ℝ} (hK : 0 ≤ K) (hcross : SeparatedCrossBound μ A K) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) {ρ : ℝ} (hρ : 0 < ρ) {n : ℕ} (hn : 0 < n) (hnlarge : ((c:ℝ)*(a^2+b^2)/2)*(((t:ℝ)-s)/n) ≤ 1) : ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- (1-((((c:ℝ)*(a^2+b^2)/2)*(((t:ℝ)-s)/n):ℝ):ℂ))^n* (∫ P, F (pairPastCoordinates v P) ∂μ)‖ ≤ ‖F‖*(2*|a*b| *K*(n:ℝ)*Real.exp (-A*ρ^2/(((t:ℝ)-s)/n))+ jointTaylorCoeff a b*(n:ℝ)*(Real.sqrt ((c:ℝ)*(((t:ℝ)-s)/n)))^3+ 2*|a*b| *(c:ℝ)*(∑ j ∈ Finset.range n, ((t:ℝ)-s)/n* cutoffMeanExtension μ ρ (realMesh s t n j))) := by let δ := ((t:ℝ)-s)/n let r : ℂ := 1-((((c:ℝ)*(a^2+b^2)/2)*δ:ℝ):ℂ) let z : ℕ → ℂ := fun j => ∫ P, F (pairPastCoordinates v P)* charPhase (pairLinearIncrement a b s (unitMesh s t n j) P) ∂μ let D := 2*|a*b| *K*Real.exp (-A*ρ^2/δ)+jointTaylorCoeff a b*(Real.sqrt ((c:ℝ)*δ))^3 let C := 2*|a*b| *(c:ℝ) let e : ℕ → ℝ := fun j => ‖F‖*(D+C*δ*cutoffMeanExtension μ ρ (realMesh s t n j)) have hz0 : z 0=∫ P, F (pairPastCoordinates v P) ∂μ := by dsimp [z] rw [unitMesh_zero] simp only [pairLinearIncrement,pairPathIncrement,ContinuousMap.coe_mk,Bool.false_eq_true, ↓reduceIte,sub_self,mul_zero,add_zero,charPhase,Complex.ofReal_zero,zero_mul,Complex.exp_zero,mul_one] have hzn : z n=∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ := by simp only [z,unitMesh_last s t hn] have hδ : 0 ≤ δ := div_nonneg (sub_nonneg.mpr (show (s:ℝ) ≤ t from hst.le)) (Nat.cast_nonneg n) have hc : 0 ≤ (c:ℝ)*(a^2+b^2)/2 := by positivity have hr : ‖r‖ ≤ 1 := realEulerCoefficient_norm hc hδ hnlarge have he : ∀ j < n, ‖z (j+1)-r*z j‖ ≤ e j := by intro j hj have hju := unitMesh_between s t hst.le hn hj.le have hjv := unitMesh_between s t hst.le hn (Nat.succ_le_of_lt hj) have hh := normalJointPast_cumulative_phase_step μ c h hK hcross v s (unitMesh s t n j) (unitMesh s t n (j+1)) hv hju.1 (unitMesh_step_lt s t hst hn hj) (lt_of_le_of_lt hjv.2 ht) F a b hρ rw [unitMesh_sub s t hst.le hn hj] at hh have hcoef : 1-((((c:ℝ)*δ*(a^2+b^2)/2):ℝ):ℂ)=r := by dsimp [r] congr 1 ring_nf change ‖z (j+1)-(1-((((c:ℝ)*δ*(a^2+b^2)/2):ℝ):ℂ))*z j‖ ≤ _ at hh rw [hcoef] at hh have hcut : (∫ P : RealPathPair, nearDiagonalCutoff ρ (P.1 (unitMesh s t n j)-P.2 (unitMesh s t n j)) ∂μ)= cutoffMeanExtension μ ρ (realMesh s t n j) := rfl rw [hcut] at hh convert hh using 1 have hh := contraction_recurrence_error z r e n hr he rw [hz0,hzn] at hh calc _ ≤ ∑ j ∈ Finset.range n, e j := hh _ = _ := by simp only [e,mul_add,Finset.sum_add_distrib,← Finset.mul_sum,Finset.sum_const, Finset.card_range,nsmul_eq_mul] dsimp [D,C,δ] ring
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
lemma complexEuler_tendsto (lam L : ℝ) : Tendsto (fun n : ℕ => (1-((lam*(L/n):ℝ):ℂ))^n) atTop (𝓝 (Complex.exp ((-lam*L:ℝ):ℂ))) := by convert Complex.tendsto_one_add_div_pow_exp (((-lam*L:ℝ):ℂ)) using 1 funext n congr 1 push_cast ring
lemma normalJointPast_phase_bound {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) {A K : ℝ} (hA : 0 < A) (hK : 0 ≤ K) (hcross : SeparatedCrossBound μ A K) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) {ρ : ℝ} (hρ : 0 < ρ) : ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- Complex.exp ((-((c:ℝ)*(a^2+b^2)/2)*((t:ℝ)-s):ℝ):ℂ)* (∫ P, F (pairPastCoordinates v P) ∂μ)‖ ≤ ‖F‖*(2*|a*b| *(c:ℝ)*(∫ u in (s:ℝ)..t, cutoffMeanExtension μ ρ u)) := by let lam := (c:ℝ)*(a^2+b^2)/2 let L := (t:ℝ)-s have hL : 0 < L := sub_pos.mpr hst have hEu := complexEuler_tendsto lam L have hleft := ((tendsto_const_nhds.sub (hEu.mul_const (∫ P, F (pairPastCoordinates v P) ∂μ))).norm : Tendsto (fun n : ℕ => ‖(∫ P, F (pairPastCoordinates v P)* charPhase (pairLinearIncrement a b s t P) ∂μ)- (1-((lam*(L/n):ℝ):ℂ))^n*(∫ P, F (pairPastCoordinates v P) ∂μ)‖) atTop (𝓝 ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- Complex.exp ((-lam*L:ℝ):ℂ)*(∫ P, F (pairPastCoordinates v P) ∂μ)‖)) have hex := (scaled_exp_tendsto_zero (mul_pos hA (sq_pos_of_pos hρ)) hL).const_mul (2*|a*b| *K) have hcu := (scaled_sqrt_cube_tendsto_zero c.coe_nonneg hL.le).const_mul (jointTaylorCoeff a b) have hri := (cutoff_riemann_tendsto μ ρ hst).const_mul (2*|a*b| *(c:ℝ)) have hr := ((hex.add hcu).add hri).const_mul ‖F‖ simp only [mul_zero,zero_add] at hr have hnlarge : ∀ᶠ n : ℕ in atTop, lam*(L/n) ≤ 1 := by have hh : Tendsto (fun n : ℕ => lam*(L/n)) atTop (𝓝 0) := by simpa using (tendsto_const_nhds.div_atTop tendsto_natCast_atTop_atTop : Tendsto (fun n : ℕ => L/(n:ℝ)) atTop (𝓝 0)).const_mul lam exact (hh.eventually_lt_const zero_lt_one).mono (fun n hn => hn.le) apply le_of_tendsto_of_tendsto hleft hr filter_upwards [eventually_gt_atTop 0,hnlarge] with n hn hnl have hh := normalJointPast_mesh_phase_bound μ c h hK hcross v s t hv hst ht F a b hρ hn hnl simpa only [lam,L,neg_mul,mul_assoc] using hh
lemma normalJointPast_joint_characteristic {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) {A K : ℝ} (hA : 0 < A) (hK : 0 ≤ K) (hcross : SeparatedCrossBound μ A K) (hz : (μ.prod volume) {z : RealPathPair × unitInterval | z.1.1 z.2-z.1.2 z.2=0}=0) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : (∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)= Complex.exp ((-((c:ℝ)*(a^2+b^2)/2)*((t:ℝ)-s):ℝ):ℂ)* (∫ P, F (pairPastCoordinates v P) ∂μ) := by apply sub_eq_zero.mp apply norm_eq_zero.mp apply le_antisymm _ (norm_nonneg _) have hh := ((diagonal_zero_subinterval_cutoff_tendsto μ hz s t hst.le).const_mul (2*|a*b| *(c:ℝ))).const_mul ‖F‖ simp only [mul_zero] at hh apply ge_of_tendsto hh filter_upwards [] with n exact normalJointPast_phase_bound μ c h hA hK hcross v s t hv hst ht F a b (by positivity : 0 < 1/((n:ℝ)+1))
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149import Mathlibimport OAI.Probability.Ballisticity.Estimates.ConditionalLawTests
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
noncomputable def pairPastCoordinates {q : ℕ} (v : Fin q → unitInterval) : C(RealPathPair,Fin q → ℝ × ℝ) := ⟨fun P z => (P.1 (v z),P.2 (v z)),by fun_prop⟩
noncomputable def pairPathIncrement (b : Bool) (s t : unitInterval) : C(RealPathPair,ℝ) := ⟨fun P => if b then P.2 t-P.2 s else P.1 t-P.1 s,by cases b <;> simp <;> fun_prop⟩
lemma jointPastIncrementMap_eq {q : ℕ} (b : Bool) (P : RealPathPair) (v : Fin q → unitInterval) (s t : unitInterval) : jointPastIncrementMap b (P,(v,s,t))=(pairPastCoordinates v P,pairPathIncrement b s t P) := rfl
def NormalJointPast (μ : Measure RealPathPair) (c : ℝ≥0) : Prop := ∀ (q : ℕ) (v : Fin q → unitInterval) (s t : unitInterval), (∀ z, v z ≤ s) → s < t → (t:ℝ) < 1 → ∀ b : Bool, μ.map (fun P => (pairPastCoordinates v P,pairPathIncrement b s t P)) = (μ.map (pairPastCoordinates v)).prod (gaussianReal 0 (c*Real.toNNReal ((t:ℝ)-s)))
lemma normal_past_of_uc_tests (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : ∀ (q : ℕ) (v : Fin q → unitInterval) (s t : unitInterval), (∀ z, v z ≤ s) → s < t → (t:ℝ) < 1 → ∀ (b : Bool) (F : (Fin q → ℝ × ℝ) →ᵇ ℝ) (G : ℝ →ᵇ ℝ), UniformContinuous G → (∫ P, jointPastProductTest F G (∫ z, G z ∂gaussianReal 0 (c*Real.toNNReal ((t:ℝ)-s))) (jointPastIncrementMap b (P,(v,s,t))) ∂μ)=0) : NormalJointPast μ c := by intro q v s t hv hst ht b apply product_law_of_uc_decorrelation μ _ (pairPastCoordinates v) (pairPathIncrement b s t) (pairPastCoordinates v).continuous.measurable (pairPathIncrement b s t).continuous.measurable intro F G hG exact h q v s t hv hst ht b F G hG
lemma product_law_integral_mul {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E] {K : Type*} [RCLike K] (μ : Measure Ω) [IsFiniteMeasure μ] (γ : Measure ℝ) [SFinite γ] (Z : Ω → E) (X : Ω → ℝ) (hZ : Measurable Z) (hX : Measurable X) (hlaw : μ.map (fun ω => (Z ω,X ω))=(μ.map Z).prod γ) (F : E → K) (G : ℝ → K) (hF : Measurable F) (hG : Measurable G) : (∫ ω, F (Z ω)*G (X ω) ∂μ)=(∫ ω, F (Z ω) ∂μ)*(∫ z, G z ∂γ) := by have hi := integral_map (μ := μ) (hZ.prodMk hX).aemeasurable ((hF.comp measurable_fst).mul (hG.comp measurable_snd)).aestronglyMeasurable change (∫ z : E × ℝ, F z.1*G z.2 ∂μ.map (fun ω => (Z ω,X ω)))= (∫ ω, F (Z ω)*G (X ω) ∂μ) at hi rw [← hi,hlaw,integral_prod_mul,integral_map hZ.aemeasurable hF.aestronglyMeasurable]
lemma product_law_integrable_mul {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E] {K : Type*} [RCLike K] (μ : Measure Ω) [IsFiniteMeasure μ] (γ : Measure ℝ) [SFinite γ] (Z : Ω → E) (X : Ω → ℝ) (hZ : Measurable Z) (hX : Measurable X) (hlaw : μ.map (fun ω => (Z ω,X ω))=(μ.map Z).prod γ) (F : E → K) (G : ℝ → K) (hF : Measurable F) (hG : Measurable G) (hIF : Integrable F (μ.map Z)) (hIG : Integrable G γ) : Integrable (fun ω => F (Z ω)*G (X ω)) μ := by have hi : Integrable (fun z : E × ℝ => F z.1*G z.2) ((μ.map Z).prod γ) := hIF.mul_prod hIG rw [← hlaw] at hi exact (integrable_map_measure ((hF.comp measurable_fst).mul (hG.comp measurable_snd)).aestronglyMeasurable (hZ.prodMk hX).aemeasurable).mp hi
lemma normalJointPast_moment {q k : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) (F : (Fin q → ℝ × ℝ) →ᵇ ℝ) : (∫ P, F (pairPastCoordinates v P)*(pairPathIncrement b s t P)^k ∂μ)= (∫ P, F (pairPastCoordinates v P) ∂μ)*(∫ z : ℝ, z^k ∂gaussianReal 0 (c*Real.toNNReal ((t:ℝ)-s))) := by exact product_law_integral_mul μ _ _ _ (pairPastCoordinates v).continuous.measurable (pairPathIncrement b s t).continuous.measurable (h q v s t hv hst ht b) F (fun z => z^k) F.continuous.measurable (by fun_prop)
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
lemma gaussianReal_second_moment (v : ℝ≥0) : (∫ z : ℝ, z^2 ∂gaussianReal 0 v) = v := by have h := variance_fun_id_gaussianReal (μ := 0) (v := v) rw [variance_eq_integral measurable_id'.aemeasurable] at h simpa using h
lemma normalJointPast_hasLaw {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) : HasLaw (pairPathIncrement b s t) (gaussianReal 0 (c*Real.toNNReal ((t:ℝ)-s))) μ := by have hp := h q v s t hv hst ht b have he := congrArg (fun ξ : Measure ((Fin q → ℝ × ℝ) × ℝ) => ξ.map Prod.snd) hp rw [Measure.map_map measurable_snd ((pairPastCoordinates v).continuous.measurable.prodMk (pairPathIncrement b s t).continuous.measurable)] at he refine ⟨(pairPathIncrement b s t).continuous.measurable.aemeasurable,?_⟩ simpa [Measure.map_apply (pairPastCoordinates v).continuous.measurable,Function.comp_def] using he
lemma normalJointPast_integrable_abs_pow (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (s t : unitInterval) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) (k : ℕ) : Integrable (fun P => |pairPathIncrement b s t P|^k) μ := by have hl := normalJointPast_hasLaw μ c h (fun _ : Fin 0 => s) s t (by simp) hst ht b have hi := gaussian_absolute_moment_integrable (c*Real.toNNReal ((t:ℝ)-s)) k rw [← hl.map_eq] at hi exact (integrable_map_measure (by fun_prop : Measurable (fun z : ℝ => |z|^k)).aestronglyMeasurable hl.aemeasurable).mp hi
lemma normalJointPast_absolute_third_moment (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (s t : unitInterval) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) : (∫ P, |pairPathIncrement b s t P|^3 ∂μ)= (Real.sqrt ((c:ℝ)*((t:ℝ)-s)))^3*normalThirdMoment := by have hl := normalJointPast_hasLaw μ c h (fun _ : Fin 0 => s) s t (by simp) hst ht b have hi := hl.integral_comp (by fun_prop : Measurable (fun z : ℝ => |z|^3)).aestronglyMeasurable change (∫ P, |pairPathIncrement b s t P|^3 ∂μ) = _ at hi rw [hi,gaussian_absolute_third_moment] rw [NNReal.coe_mul,Real.toNNReal_of_nonneg (sub_nonneg.mpr (show (s:ℝ) ≤ t from hst.le))] rfl
lemma normalJointPast_mean {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) (F : (Fin q → ℝ × ℝ) →ᵇ ℝ) : (∫ P, F (pairPastCoordinates v P)*pairPathIncrement b s t P ∂μ)=0 := by simpa using normalJointPast_moment (k := 1) μ c h v s t hv hst ht b F
lemma normalJointPast_second {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (b : Bool) (F : (Fin q → ℝ × ℝ) →ᵇ ℝ) : (∫ P, F (pairPastCoordinates v P)*(pairPathIncrement b s t P)^2 ∂μ)= (∫ P, F (pairPastCoordinates v P) ∂μ)*((c:ℝ)*((t:ℝ)-s)) := by rw [normalJointPast_moment μ c h v s t hv hst ht b F,gaussianReal_second_moment, NNReal.coe_mul,Real.toNNReal_of_nonneg (sub_nonneg.mpr (show (s:ℝ) ≤ t from hst.le))] rfl
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187import Mathlibimport OAI.Probability.Ballisticity.Estimates.CommonBoundaryRestart
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
def BoundaryData (d : ℕ) := Σ q : ℕ × ℕ, (((i : Finset.Iic q.1) → Lattice d) × ((i : Finset.Iic q.2) → Lattice d))
instance {d : ℕ} : Countable (BoundaryData d) := by unfold BoundaryData; infer_instanceinstance {d : ℕ} : MeasurableSpace (BoundaryData d) := ⊤instance {d : ℕ} : DiscreteMeasurableSpace (BoundaryData d) := ⟨fun _ => trivial⟩
noncomputable def boundaryData {d : ℕ} (ℓ : Vector d) (H : ℝ) (P : Path d × Path d) : BoundaryData d := ⟨boundaryTimes ℓ H P, pairPrefix (boundaryTimes ℓ H P).1 (boundaryTimes ℓ H P).2 P⟩
lemma boundaryData_fiber {d : ℕ} (ℓ : Vector d) (H : ℝ) (F : BoundaryData d) : boundaryData ℓ H ⁻¹' {F} = (boundaryTimes ℓ H ⁻¹' {F.1}) ∩ (pairPrefix F.1.1 F.1.2 ⁻¹' {F.2}) := by ext P simp only [Set.mem_preimage,Set.mem_singleton_iff,Set.mem_inter_iff] constructor · intro he have ht : boundaryTimes ℓ H P = F.1 := congrArg Sigma.fst he refine ⟨ht,?_⟩ cases F with | mk q f => dsimp only at ht ⊢ unfold boundaryData at he cases ht exact Sigma.mk.inj_iff.mp he |>.2 |> eq_of_heq · rintro ⟨ht,hf⟩ cases F with | mk q f => dsimp only at ht hf ⊢ unfold boundaryData cases ht exact congrArg (Sigma.mk _) hf
lemma measurable_boundaryData {d : ℕ} (ℓ : Vector d) (H : ℝ) : Measurable (boundaryData ℓ H) := by apply measurable_to_countable' intro F rw [boundaryData_fiber] exact ((measurable_boundaryTimes ℓ H) (measurableSet_singleton _)).inter ((measurable_pairPrefix _ _) (measurableSet_singleton _))
noncomputable def boundarySuffix {d : ℕ} (ℓ : Vector d) (H : ℝ) (P : Path d × Path d) : Path d × Path d := commonPairSuffix (boundaryTimes ℓ H P).1 (boundaryTimes ℓ H P).2 P
lemma measurable_boundarySuffix {d : ℕ} (ℓ : Vector d) (H : ℝ) : Measurable (boundarySuffix ℓ H) := by have hm : Measurable (fun Z : (Path d × Path d) × (ℕ × ℕ) => commonPairSuffix Z.2.1 Z.2.2 Z.1) := measurable_from_prod_countable_left fun q => measurable_commonPairSuffix q.1 q.2 exact hm.comp (measurable_id.prodMk (measurable_boundaryTimes ℓ H))
lemma boundaryData_times {d : ℕ} (ℓ : Vector d) (H : ℝ) (P : Path d × Path d) (F : BoundaryData d) (hF : boundaryData ℓ H P = F) : boundaryTimes ℓ H P = F.1 := congrArg Sigma.fst hF
lemma boundaryAtom_fiber_ae {d : ℕ} (μ : Measure (Path d × Path d)) (ℓ : Vector d) (H : ℝ) (x y : Lattice d) (hD : ∀ᵐ P ∂μ, P.1 ∈ NoDrop ℓ x ∧ P.2 ∈ NoDrop ℓ y) (hS : ∀ᵐ P ∂μ, BoundaryAt ℓ H P (boundaryTimes ℓ H P).1 (boundaryTimes ℓ H P).2) (F : BoundaryData d) : (boundaryData ℓ H ⁻¹' {F}) =ᵐ[μ] boundaryAtom ℓ H x y (extendPrefix F.1.1 F.2.1) (extendPrefix F.1.2 F.2.2) F.1.1 F.1.2 := by filter_upwards [hD,hS] with P hDP hSP rw [boundaryData_fiber,pairPrefix_fiber] apply propext change (boundaryTimes ℓ H P = F.1 ∧ _) ↔ _ constructor · rintro ⟨ht,hpre⟩ refine ⟨hpre,hDP,?_⟩ change BoundaryAt ℓ H P F.1.1 F.1.2 simpa only [ht] using hSP · rintro ⟨hpre,hno,hB⟩ exact ⟨boundaryTimes_eq ℓ H P hB,hpre⟩
lemma shared_boundaryData_map {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ z, dot (realPosition z) ℓ = (height z : ℝ)) (hstep : ∀ z e, height (z+step e) ≤ height z+1) (x y : Lattice d) (hxy : height x = height y) (H : ℕ) (hH : 0 < H) (F : BoundaryData d) : ((sharedConditionedPairLaw ν ℓ x y).restrict (boundaryData ℓ ((height x+H : ℤ) : ℝ) ⁻¹' {F})).map (boundarySuffix ℓ ((height x+H : ℤ) : ℝ)) = sharedConditionedPairLaw ν ℓ x y (boundaryData ℓ ((height x+H : ℤ) : ℝ) ⁻¹' {F}) • sharedConditionedPairLaw ν ℓ (extendPrefix F.1.1 F.2.1 F.1.1) (extendPrefix F.1.2 F.2.2 F.1.2) := by let μ := sharedConditionedPairLaw ν ℓ x y let h : ℝ := ((height x+H : ℤ) : ℝ) have hae := boundaryAtom_fiber_ae μ ℓ h x y (sharedConditionedPairLaw_noDrop ν ℓ x y) (shared_boundaryTimes_spec ν hue ℓ hℓ htrans height hproj hstep x y hxy H hH) F have hmap : (μ.restrict (boundaryData ℓ h ⁻¹' {F})).map (boundarySuffix ℓ h) = (μ.restrict (boundaryData ℓ h ⁻¹' {F})).map (commonPairSuffix F.1.1 F.1.2) := by apply Measure.map_congr filter_upwards [ae_restrict_mem ((measurable_boundaryData ℓ h) (measurableSet_singleton F))] with P hP have ht := boundaryData_times ℓ h P F hP simp only [boundarySuffix,ht] change (μ.restrict (boundaryData ℓ h ⁻¹' {F})).map _ = _ rw [hmap,Measure.restrict_congr_set hae,measure_congr hae] exact shared_boundaryAtom_map ν hue ℓ hℓ htrans h x y _ _ _ _
lemma lintegral_partition_countable {Ω I : Type*} [MeasurableSpace Ω] [MeasurableSpace I] [Countable I] [MeasurableSingletonClass I] (μ : Measure Ω) (D : Ω → I) (hD : Measurable D) (f : Ω → ℝ≥0∞) : (∫⁻ a, f a ∂μ) = ∑' i, ∫⁻ a in D ⁻¹' {i}, f a ∂μ := by have hu : (⋃ i, D ⁻¹' {i}) = Set.univ := by ext a; simp have hd : Pairwise (fun i j : I => Disjoint (D ⁻¹' {i}) (D ⁻¹' {j})) := by intro i j hij apply Set.disjoint_left.mpr intro a hi hj exact hij (hi.symm.trans hj) have hh := lintegral_iUnion (μ := μ) (fun i => hD (measurableSet_singleton i)) hd f simpa only [hu,Measure.restrict_univ] using hh
lemma lintegral_countable_restart {Ω I S : Type*} [MeasurableSpace Ω] [MeasurableSpace I] [MeasurableSpace S] [Countable I] [MeasurableSingletonClass I] (μ : Measure Ω) (D : Ω → I) (Y : Ω → S) (κ : I → Measure S) (hD : Measurable D) (hY : Measurable Y) (hrestart : ∀ i, (μ.restrict (D ⁻¹' {i})).map Y = μ (D ⁻¹' {i}) • κ i) (f : I → ℝ≥0∞) (g : S → ℝ≥0∞) (hg : Measurable g) : (∫⁻ a, f (D a) * g (Y a) ∂μ) = ∫⁻ a, f (D a) * (∫⁻ z, g z ∂κ (D a)) ∂μ := by rw [lintegral_partition_countable μ D hD,lintegral_partition_countable μ D hD] apply tsum_congr intro i have ha : ∀ᵐ a ∂μ.restrict (D ⁻¹' {i}), D a = i := ae_restrict_mem (hD (measurableSet_singleton i)) calc (∫⁻ a in D ⁻¹' {i}, f (D a) * g (Y a) ∂μ) = ∫⁻ a in D ⁻¹' {i}, f i * g (Y a) ∂μ := lintegral_congr_ae (ha.mono fun a ha => by dsimp only; rw [ha]) _ = f i * ∫⁻ a in D ⁻¹' {i}, g (Y a) ∂μ := lintegral_const_mul _ (hg.comp hY) _ = f i * ∫⁻ z, g z ∂(μ.restrict (D ⁻¹' {i})).map Y := by rw [lintegral_map hg hY] _ = f i * (μ (D ⁻¹' {i}) * ∫⁻ z, g z ∂κ i) := by rw [hrestart i,lintegral_smul_measure,smul_eq_mul] _ = ∫⁻ a in D ⁻¹' {i}, f i * (∫⁻ z, g z ∂κ i) ∂μ := by rw [lintegral_const,Measure.restrict_apply MeasurableSet.univ,Set.univ_inter] ac_rfl _ = ∫⁻ a in D ⁻¹' {i}, f (D a) * (∫⁻ z, g z ∂κ (D a)) ∂μ := lintegral_congr_ae (ha.mono fun a ha => by dsimp only; rw [ha])
theorem shared_jointPast_restart {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ z, dot (realPosition z) ℓ = (height z : ℝ)) (hstep : ∀ z e, height (z+step e) ≤ height z+1) (x y : Lattice d) (hxy : height x = height y) (H : ℕ) (hH : 0 < H) (f : BoundaryData d → ℝ≥0∞) (g : (Path d × Path d) → ℝ≥0∞) (hg : Measurable g) : (∫⁻ P, f (boundaryData ℓ ((height x+H : ℤ) : ℝ) P) * g (boundarySuffix ℓ ((height x+H : ℤ) : ℝ) P) ∂sharedConditionedPairLaw ν ℓ x y) = ∫⁻ P, f (boundaryData ℓ ((height x+H : ℤ) : ℝ) P) * (∫⁻ Q, g Q ∂sharedConditionedPairLaw ν ℓ (extendPrefix (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).1.1 (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).2.1 (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).1.1) (extendPrefix (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).1.2 (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).2.2 (boundaryData ℓ ((height x+H : ℤ) : ℝ) P).1.2)) ∂sharedConditionedPairLaw ν ℓ x y := by exact lintegral_countable_restart _ _ _ _ (measurable_boundaryData ℓ _) (measurable_boundarySuffix ℓ _) (shared_boundaryData_map ν hue ℓ hℓ htrans height hproj hstep x y hxy H hH) f g hg
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145import Mathlibimport OAI.Probability.Ballisticity.Estimates.BudgetLossimport OAI.Probability.Ballisticity.Estimates.CappedLoss
namespace OAI
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma measurable_relativeBudgetMass_fixed {d k : ℕ} (e f : Direction d) (base G : ℝ) (H : ℕ) (b : ℝ) (π : BudgetProfile (k:=k) e f base G) : Measurable (fun ω => relativeBudgetMass e f H b π.val ω) := by have hm : @Measurable _ _ (rowSigma Set.univ) _ (fun ω => relativeBudgetMass e f H b π.val ω) := (budgetProfileMass_joint_rows e f base G H b Set.univ (fun _ _ _ => Set.subset_univ _)).comp (measurable_const.prodMk measurable_id) exact hm.mono (rowSigma_le _) le_rfl
lemma relativeBudgetMass_bounds {d k : ℕ} (e f : Direction d) (H : ℕ) (b : ℝ) (π : Measure (Fin k → Lattice d)) [IsProbabilityMeasure π] (ω : Environment d) : 0≤relativeBudgetMass e f H b π ω ∧ relativeBudgetMass e f H b π ω≤1 := by rw [← relativeBudgetMassENN_toReal] exact ⟨ENNReal.toReal_nonneg,by have := ENNReal.toReal_mono (by norm_num : (1:ℝ≥0∞)≠∞) (relativeBudgetMassENN_le_one e f H b π ω) simpa using this⟩
lemma relativeBudgetMass_lt_exp {d k : ℕ} (e f : Direction d) (H : ℕ) (b x : ℝ) (π : Measure (Fin k → Lattice d)) [IsProbabilityMeasure π] (ω : Environment d) : relativeBudgetMass e f H b π ω<Real.exp (-x) ↔ relativeBudgetMassENN e f H b π ω<ENNReal.ofReal (Real.exp (-x)) := by rw [← relativeBudgetMassENN_toReal] simpa only [ENNReal.toReal_ofReal (Real.exp_pos (-x)).le] using (ENNReal.toReal_lt_toReal (ne_top_of_le_ne_top (by norm_num) (relativeBudgetMassENN_le_one e f H b π ω)) (ENNReal.ofReal_ne_top (r := Real.exp (-x))))
theorem actual_late_step_moment {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1≠f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (θ : ℝ) (hθ : 0<θ) : ∃ lam Cmg : ℝ, 0<lam ∧ lam≤1 ∧ 0<Cmg ∧ ∀ (k : ℕ), 2≤k → ∀ a : ℝ, 1≤a → ∀ D : ℕ → ℝ, (∀ L, 0≤D L) → ∃ l₀ : ℕ, ∀ Bstar : ℝ, 0<Bstar → ∃ Gzero : ℕ, ∀ l≥l₀, a*(l+1)≤Bstar → ∀ (H : ℕ) (base G b : ℝ), 0<b → b≤G/2 → (Gzero:ℝ)≤G-b → (∀ L : ℕ, 1≤L → (H:ℝ)/fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (b/(2*L)) ≤ D L*Real.exp (-θ*l)) → ∀ π : BudgetProfile (k:=k) e f base G, (∫ ω, Real.exp ((lam/4)*cappedLogLoss (a*(l+1)) (relativeBudgetMass e f H b π.val ω)) ∂environmentLaw ν) ≤Real.exp (Cmg*k) ∧ (environmentLaw ν).real {ω | relativeBudgetMassENN e f H b π.val ω< ENNReal.ofReal (Real.exp (-(a*(l+1))))}≤Real.exp (-lam*(a*(l+1))/2) := by obtain ⟨κ,lam,C,hκ,hrows,hlam,hlam1,hC,hloss⟩ := rapid_loss_probability ν hue e f hef htrans have hκ0 : 0<(κ:ℝ) := hκ have hκ1 : (κ:ℝ)≤1 := by obtain ⟨p,hp⟩ := hrows.exists exact_mod_cast (hp e).trans (row_entry_le_one p e) let K := Real.log (1/(κ:ℝ)) have hK : 0≤K := Real.log_nonneg ((one_le_div hκ0).mpr hκ1) obtain ⟨C₀,hC₀,harith⟩ := late_step_tail_arithmetic lam C θ K hlam hC.le hθ hK refine ⟨lam,C₀+1,hlam,hlam1,by positivity,?_⟩ intro k hk a ha D hD have hk1 : 1≤k := by omega have hk1r : (1:ℝ)≤k := by exact_mod_cast hk1 let D' := fun L => C*k*D L have hD' : ∀ L, 0≤D' L := fun L => mul_nonneg (mul_nonneg hC.le (Nat.cast_nonneg k)) (hD L) obtain ⟨l₀,hl₀⟩ := harith k hk1 a ha D' hD' refine ⟨l₀,fun Bstar hB => ?_⟩ obtain ⟨Gzero,hGzero⟩ := hloss Bstar hB k hk1 refine ⟨Gzero,?_⟩ intro l hl hcap H base G b hb hhalf hG hratio π let T := fun x => (environmentLaw ν).real {ω | relativeBudgetMassENN e f H b π.val ω<ENNReal.ofReal (Real.exp (-x))} have hT : ∀ x, T x≤1 := fun x => by exact measureReal_le_one have htail (L : ℕ) (hL : 1≤L) (x : ℝ) (hx : (k:ℝ)*L*K≤x) (hxa : x≤a*(l+1)) : T x≤(Real.exp (C*k-lam*x/L)+D' L*Real.exp (x/L-θ*l))^L := by apply (hGzero L H base G b x hL hb hhalf hG hx (hxa.trans hcap) π).trans have hn := fluctuationScale_nonneg (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (b/(2*L)) apply pow_le_pow_left₀ (by positivity) apply add_le_add_right calc C*k*Real.exp (x/L)*H/fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (b/(2*L)) = (C*k*Real.exp (x/L))*((H:ℝ)/fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (b/(2*L))) := by ring _ ≤ (C*k*Real.exp (x/L))*(D L*Real.exp (-θ*l)) := mul_le_mul_of_nonneg_left (hratio L hL) (by positivity) _ = D' L*Real.exp (x/L-θ*l) := by dsimp [D']; rw [sub_eq_add_neg,Real.exp_add]; ring_nf obtain ⟨hsmall,hlarge⟩ := hl₀ l hl T hT htail refine ⟨?_,hlarge⟩ let q := fun ω => relativeBudgetMass e f H b π.val ω let X := fun ω => cappedLogLoss (a*(l+1)) (q ω) have hq : Measurable q := measurable_relativeBudgetMass_fixed e f base G H b π have hqa : ∀ ω, 0≤q ω ∧ q ω≤1 := relativeBudgetMass_bounds e f H b π.val have hcap0 : 0≤a*(l+1) := mul_nonneg (by linarith only [ha]) (by positivity) have hX : Measurable X := measurable_cappedLogLoss _ q hq have hX0 : ∀ ω, 0≤X ω := fun ω => (cappedLogLoss_bounds hcap0 (hqa ω).1 (hqa ω).2).1 have hXa : ∀ ω, X ω≤a*(l+1) := fun ω => (cappedLogLoss_bounds hcap0 (hqa ω).1 (hqa ω).2).2 have hbound (x : ℝ) (hx : 0≤x) : environmentLaw ν {ω | x<X ω}≤ ENNReal.ofReal (Real.exp (C₀*k)*Real.exp (-2*(lam/4)*x)) := by by_cases hxc : x<a*(l+1) · have he : {ω | x<X ω}={ω | relativeBudgetMassENN e f H b π.val ω<ENNReal.ofReal (Real.exp (-x))} := by ext ω change x<cappedLogLoss _ (q ω) ↔ _ rw [lt_cappedLogLoss_iff (hqa ω).1 hx,and_iff_right hxc] exact relativeBudgetMass_lt_exp e f H b x π.val ω rw [he] apply (ENNReal.le_ofReal_iff_toReal_le (measure_ne_top _ _) (by positivity)).mpr apply (hsmall x hx hxc.le).trans rw [← Real.exp_add] apply Real.exp_le_exp.mpr ring_nf exact le_rfl · have he : {ω | x<X ω}=∅ := Set.eq_empty_iff_forall_notMem.mpr (fun ω hω => (not_lt_of_ge ((hXa ω).trans (not_lt.mp hxc))) hω) rw [he,measure_empty] exact bot_le have hm := exp_moment_of_tail (environmentLaw ν) X hX hX0 (a*(l+1)) hXa (lam/4) (Real.exp (C₀*k)) (by positivity) (Real.exp_pos _).le hbound apply hm.trans calc 1+Real.exp (C₀*k) ≤ 2*Real.exp (C₀*k) := by have hh := Real.one_le_exp_iff.mpr (mul_nonneg hC₀.le (Nat.cast_nonneg k)) linarith only [hh] _ ≤ Real.exp ((C₀+1)*k) := by have he : (2:ℝ)≤Real.exp (k:ℝ) := by have hh := Real.add_one_le_exp (k:ℝ) linarith only [hh,hk1r] calc _ ≤ Real.exp (k:ℝ)*Real.exp (C₀*k) := mul_le_mul_of_nonneg_right he (Real.exp_pos _).le _ = _ := by rw [← Real.exp_add]; congr 1; ring
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435import Mathlibimport OAI.Probability.Ballisticity.Estimates.SharedEndpointOverlapRightimport OAI.Probability.Ballisticity.Crossings.FirstLayerHitConcat
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma layerPairTruthEvent_mono {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) {E F : Set (Lattice d × Lattice d)} (hEF : E ⊆ F) : layerPairTruthEvent ℓ height x y H E ⊆ layerPairTruthEvent ℓ height x y H F := by intro P hP obtain ⟨nm,hP⟩ := Set.mem_iUnion.mp hP exact Set.mem_iUnion.mpr ⟨nm,⟨⟨⟨hP.1.1.1,hEF hP.1.1.2⟩,hP.1.2⟩,hP.2⟩⟩
lemma shared_raw_layer_truth_lower {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (height : Lattice d → ℤ) (hproj : ∀ z, dot (realPosition z) ℓ = (height z : ℝ)) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) (c : ℝ≥0∞) (hc : ∀ u v, c ≤ sharedNoDropMass ν ℓ u v) : c*sharedPairLaw ν x y (layerPairEvent ℓ height x y H E) ≤ sharedPairLaw ν x y (layerPairTruthEvent ℓ height x y H E) := by apply shared_layer_restart_lower ν ℓ height hproj x y H E (fun u v => NoDrop ℓ u ×ˢ NoDrop ℓ v) (fun u v => (measurableSet_noDrop ℓ u).prod (measurableSet_noDrop ℓ v)) (fun _ _ => Set.Subset.rfl) c · intro u v _ _ _ simpa only [sharedNoDropMass_eq] using hc u v · intro nm P hP hQ exact Set.mem_iUnion.mpr ⟨nm,hP,hQ⟩
lemma shared_layer_gap_iterate {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (height : Lattice d → ℤ) (hproj : ∀ z, dot (realPosition z) ℓ = (height z : ℝ)) (coord : Lattice d → ℝ) (H : ℤ) (hH : 0 < H) (a : ℝ) (q c : ℝ≥0∞) (hc : ∀ u v, c ≤ sharedNoDropMass ν ℓ u v) (hone : ∀ x y, height x=height y → q ≤ sharedPairLaw ν x y (layerPairEvent ℓ height x y (height x+H) {uv | |coord x-coord y|+a < |coord uv.1-coord uv.2|})) : ∀ N : ℕ, 0 < N → ∀ x y, height x=height y → c*q^N ≤ sharedPairLaw ν x y (layerPairTruthEvent ℓ height x y (height x+(N:ℤ)*H) {uv | |coord x-coord y|+(N:ℝ)*a < |coord uv.1-coord uv.2|}) := by intro N induction N with | zero => intro h; omega | succ N ih => intro hN x y hxy by_cases hN0 : N=0 · subst N simpa only [Nat.zero_add,Nat.cast_one,one_mul,pow_one] using (mul_le_mul_right (hone x y hxy) c).trans (shared_raw_layer_truth_lower ν ℓ height hproj x y (height x+H) _ c hc) · have hn : 0 < N := by omega let E := {uv : Lattice d × Lattice d | |coord x-coord y|+a < |coord uv.1-coord uv.2|} let F := {uv : Lattice d × Lattice d | |coord x-coord y|+((N+1:ℕ):ℝ)*a < |coord uv.1-coord uv.2|} let B := fun u v => layerPairTruthEvent ℓ height u v (height u+(N:ℤ)*H) {uv | |coord u-coord v|+(N:ℝ)*a < |coord uv.1-coord uv.2|} have hstep : (c*q^N)*sharedPairLaw ν x y (layerPairEvent ℓ height x y (height x+H) E) ≤ sharedPairLaw ν x y (layerPairTruthEvent ℓ height x y (height x+((N+1:ℕ):ℤ)*H) F) := by apply shared_layer_restart_lower ν ℓ height hproj x y (height x+H) E B (fun _ _ => measurableSet_layerPairTruthEvent _ _ _ _ _ _) (fun _ _ => layerPairTruthEvent_subset_noDrop _ _ _ _ _ _) (c*q^N) · intro u v hu hv _ exact ih hn u v (hu.trans hv.symm) · intro nm P hP hQ have hu : height (P.1 (nm.1+1))=height x+H := hP.1.1.1.1 have hK : height (P.1 (nm.1+1))+(N:ℤ)*H = height x+((N+1:ℕ):ℤ)*H := by rw [hu,Nat.cast_add,Nat.cast_one] ring have hHK : height x+H < height x+((N+1:ℕ):ℤ)*H := by have hnz : (0:ℤ) < N := by exact_mod_cast hn rw [Nat.cast_add,Nat.cast_one] nlinarith change commonPairSuffix (nm.1+1) (nm.2+1) P ∈ layerPairTruthEvent ℓ height _ _ _ _ at hQ rw [hK] at hQ have hQ' := layerPairPrefix_truth_concat ℓ height x y hHK E _ nm P hP hQ apply layerPairTruthEvent_mono ℓ height x y _ _ hQ' intro uv huv change |coord x-coord y|+((N+1:ℕ):ℝ)*a < |coord uv.1-coord uv.2| have hp : |coord x-coord y|+a < |coord (P.1 (nm.1+1))-coord (P.2 (nm.2+1))| := hP.1.2 change |coord (P.1 (nm.1+1))-coord (P.2 (nm.2+1))|+(N:ℝ)*a < |coord uv.1-coord uv.2| at huv rw [Nat.cast_add,Nat.cast_one] nlinarith have hh := (mul_le_mul_right (hone x y hxy) (c*q^N)).trans hstep simpa only [pow_succ,mul_assoc,F] using hh
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma shared_conditioned_event_ge_raw {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (x y : Lattice d) (A : Set (Path d × Path d)) (hA : MeasurableSet A) (hAD : A ⊆ NoDrop ℓ x ×ˢ NoDrop ℓ y) : sharedPairLaw ν x y A ≤ sharedConditionedPairLaw ν ℓ x y A := by have hle : sharedNoDropMass ν ℓ x y ≤ 1 := by rw [sharedNoDropMass_eq] exact prob_le_one have hi : 1 ≤ (sharedNoDropMass ν ℓ x y)⁻¹ := by simpa using ENNReal.inv_le_inv.mpr hle rw [sharedConditionedPairLaw,Measure.smul_apply,Measure.restrict_apply hA, Set.inter_eq_left.mpr hAD] exact le_mul_of_one_le_left' hi
theorem bad_radius_lower_cutoff_escape {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) {l ε : ℝ} (hl : 0 < l) (hl1 : l ≤ 1) (hε : 0 < ε) (hbad : ∀ᶠ i in atTop, ε ≤ fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i)* (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*r i < |commonIncrementProcess (realPosition (step e)) f 0 P|}) : ∃ C q : ℝ, 0 < C ∧ 0 < q ∧ ∀ᶠ i in atTop, ∃ K : ℕ, 0 < K ∧ (K:ℝ) ≤ C*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (4*r i) ∧ ∀ x y : Lattice d, signedHeight e x=signedHeight e y → q ≤ (sharedConditionedPairLaw ν (realPosition (step e)) x y).real (layerPairTruthEvent (realPosition (step e)) (signedHeight e) x y (signedHeight e x+K) {uv | 8*r i ≤ |signedCoordinate f uv.1-signedCoordinate f uv.2|}) := by let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let S := commonIncrementProcess ℓ f 0 have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ hp have hne := independent_commonWordIncrement_nonzero ν hue e f hef htrans obtain ⟨t,q₀,ht,hq₀,hblock⟩ := bad_radius_raw_gap_growth ν hue e f hef htrans r hr hl hl1 hε hbad obtain ⟨c,hc,htruth⟩ := sharedNoDropMass_uniform_positive ν hue ℓ (signed_direction_unit e) htrans have hc1 : c ≤ 1 := (htruth 0 0).trans (sharedNoDropMass_le_one ν ℓ 0 0) have hcfin : c ≠ ∞ := ne_top_of_le_ne_top (by norm_num) hc1 obtain ⟨N,hN⟩ := exists_nat_gt (128/l) have hNpos : 0 < N := by have hpos : (0:ℝ) < N := (by positivity : (0:ℝ) < 128/l).trans hN exact_mod_cast hpos have hNl : 128 < (N:ℝ)*l := (div_lt_iff₀ hl).mp hN let Q : ℝ≥0∞ := c*(ENNReal.ofReal q₀)^N have hQ : 0 < Q := ENNReal.mul_pos hc.ne' (pow_ne_zero _ (ENNReal.ofReal_pos.mpr hq₀).ne') have hQfin : Q ≠ ∞ := ENNReal.mul_ne_top hcfin (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) refine ⟨(N:ℝ)*t,Q.toReal,mul_pos (by exact_mod_cast hNpos) ht, ENNReal.toReal_pos hQ.ne' hQfin,?_⟩ filter_upwards [hblock,hr.eventually (eventually_gt_atTop 0)] with i hi hri let H := ⌊t*fluctuationScale μ S (r i)⌋₊ change 0 < H ∧ _ at hi refine ⟨N*H,Nat.mul_pos hNpos hi.1,?_,?_⟩ · have hHle : (H:ℝ) ≤ t*fluctuationScale μ S (r i) := Nat.floor_le (mul_nonneg ht.le (fluctuationScale_nonneg μ S (r i))) have hmono := fluctuationScale_mono μ S (measurable_commonIncrementProcess ℓ f 0) hne hri (show r i ≤ 4*r i by linarith) change ((N*H:ℕ):ℝ) ≤ (N:ℝ)*t*fluctuationScale μ S (4*r i) rw [Nat.cast_mul,mul_assoc] exact mul_le_mul_of_nonneg_left (hHle.trans (mul_le_mul_of_nonneg_left hmono ht.le)) (Nat.cast_nonneg _) · intro x y hxy let : IsProbabilityMeasure (sharedConditionedPairLaw ν ℓ x y) := sharedConditionedPairLaw_probability ν ℓ x y (ne_of_gt (hc.trans_le (htruth x y))) have hone : ∀ u v : Lattice d, signedHeight e u=signedHeight e v → ENNReal.ofReal q₀ ≤ sharedPairLaw ν u v (layerPairEvent ℓ (signedHeight e) u v (signedHeight e u+H) {uv | |signedCoordinate f u-signedCoordinate f v|+l*r i/16 < |signedCoordinate f uv.1-signedCoordinate f uv.2|}) := by intro u v huv exact (ENNReal.ofReal_le_iff_le_toReal (measure_ne_top _ _)).mpr (hi.2 u v huv) have hg := shared_layer_gap_iterate ν ℓ (signedHeight e) (signedHeight_projection e) (fun z => signedCoordinate f z) H (by exact_mod_cast hi.1) (l*r i/16) (ENNReal.ofReal q₀) c htruth hone N hNpos x y hxy have hsub : layerPairTruthEvent ℓ (signedHeight e) x y (signedHeight e x+(N:ℤ)*(H:ℤ)) {uv | |signedCoordinate f x-signedCoordinate f y|+(N:ℝ)*(l*r i/16) < |signedCoordinate f uv.1-signedCoordinate f uv.2|} ⊆ layerPairTruthEvent ℓ (signedHeight e) x y (signedHeight e x+(N*H:ℕ)) {uv | 8*r i ≤ |signedCoordinate f uv.1-signedCoordinate f uv.2|} := by rw [Nat.cast_mul] apply layerPairTruthEvent_mono intro uv huv change 8*r i ≤ |signedCoordinate f uv.1-signedCoordinate f uv.2| change |signedCoordinate f x-signedCoordinate f y|+(N:ℝ)*(l*r i/16) < |signedCoordinate f uv.1-signedCoordinate f uv.2| at huv have hh : 8*r i < (N:ℝ)*(l*r i/16) := by nlinarith linarith [abs_nonneg (signedCoordinate f x-signedCoordinate f y)] have hraw := hg.trans (measure_mono hsub) have hcond := hraw.trans (shared_conditioned_event_ge_raw ν ℓ x y _ (measurableSet_layerPairTruthEvent _ _ _ _ _ _) (layerPairTruthEvent_subset_noDrop _ _ _ _ _ _)) exact ENNReal.toReal_mono (measure_ne_top _ _) hcond
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI12345678910111213141516171819202122232425262728293031323334353637383940414243444546import Mathlibimport OAI.Probability.Ballisticity.Estimates.IidListProcess
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma realPartialSum_list {G : Type*} (F : G → ℝ) (c : ℝ) (w : List G) {k : ℕ} (hk : k ≤ w.length) : realPartialSum (fun j => if h : j < w.length then F (w.get ⟨j,h⟩)-c else 0) k = ((w.take k).map F).sum-(k:ℝ)*c := by induction k with | zero => simp [realPartialSum] | succ k ih => rw [realPartialSum_succ,ih (by omega)] have hkl : k < w.length := by omega rw [dite_eq_left hkl] rw [List.take_add_one,List.getElem?_eq_getElem hkl] simp only [List.get_eq_getElem,Option.toList_some,List.map_append,List.sum_append,List.map_singleton,List.sum_singleton,Nat.cast_add,Nat.cast_one] ring
lemma signedCoordinate_list_sum {d : ℕ} (f : Direction d) (w : List (Lattice d)) : (w.map (signedCoordinate f)).sum=signedCoordinate f w.sum := by induction w with | nil => simp [signedCoordinate] | cons u w ih => simp only [List.map_cons,List.sum_cons,signedCoordinate_add,ih]
lemma listCenteredMax_prefix {d : ℕ} (f : Direction d) (c : ℝ) (w : List (Lattice d)) {k : ℕ} (hk : k ≤ w.length) : |signedCoordinate f (w.take k).sum-(k:ℝ)*c| ≤ listCenteredMax (signedCoordinate f) c w := by rw [← signedCoordinate_list_sum] rw [← realPartialSum_list _ c w hk] exact (abs_partialSum_le_max _ k).trans (partialSumMax_mono _ hk)
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154import Mathlibimport OAI.Probability.Ballisticity.Stationary.EpisodeRandomStart
namespace OAI
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransience
lemma fluctuationRadius_order_above {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hI : Integrable S μ) (hne : 0<μ {x | S x≠0}) {s t : ℝ} (hs : fluctuationScale μ S 1<s) (hst : s≤t) : fluctuationRadius μ S s ≤ fluctuationRadius μ S t := by by_cases he : s=t · simp only [he,le_refl] have hst' : s<t := lt_of_le_of_ne hst he have hss := (fluctuationRadius_spec μ S hS hI hne zero_lt_one hs).2 have htt := (fluctuationRadius_spec μ S hS hI hne zero_lt_one (hs.trans hst')).2 by_contra hh have hh := fluctuationScale_mono μ S hS hne (fluctuationRadius_pos μ S t) (not_le.mp hh).le rw [htt,hss] at hh exact (not_le_of_gt hst') hh
lemma fluctuationRadius_stage_order {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hI : Integrable S μ) (hne : 0<μ {x | S x≠0}) (f b : ℝ) (hf : 0≤f) (hb : 0≤b) : ∃ R : ℝ, 1≤R ∧ ∀ sfloor, R≤ sfloor → StageRadiusOrder (fluctuationRadius μ S) f b sfloor := by let B := max 1 (fluctuationScale μ S 1+1) let R := max 1 (B/Real.exp (-f*b)) refine ⟨R,le_max_left _ _,?_⟩ intro sfloor hfloor s hs have hexp : Real.exp (-f*b)≤1 := Real.exp_le_one_iff.mpr (by nlinarith) have hs0 : 0≤ s := le_trans (by norm_num : (0:ℝ)≤1) ((le_max_left 1 _).trans (hfloor.trans hs)) have hsB : B ≤ s*Real.exp (-f*b) := (div_le_iff₀ (Real.exp_pos _)).mp ((le_max_right 1 _).trans (hfloor.trans hs)) apply fluctuationRadius_order_above μ S hS hI hne · exact lt_of_lt_of_le (by dsimp only [B]; linarith [le_max_right (1:ℝ) (fluctuationScale μ S 1+1)]) hsB · simpa only [mul_one] using mul_le_mul_of_nonneg_left hexp hs0
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransience
noncomputable def episodeScaleRadius {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) : ℝ → ℝ := fluctuationRadius (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0)
structure OperationalConstants {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) (D : ℝ) where fexp : ℝ g : ℝ χ : ℝ K : ℝ b : ℝ sfloor : ℝ k : ℕ κ : ℝ≥0 hk : 2 ≤ k hκ0 : 0 < κ hκ1 : κ ≤ 1 rows : ∀ᵐ ω ∂environmentLaw ν, ∀ y u, κ ≤ (ω y).1 u hf : 0 < fexp hg : 0 < g hgap : g < χ hK : 0 < K hb : 0 < b hs : 1 ≤ sfloor hbκ : -Real.log κ ≤ b coeff : 1/g+(1+fexp/g)*D/K ≤ (1/2:ℝ)/32 small : (1+fexp/g)*Real.exp (-(K*b))/(K*b) ≤ 1/2 order : StageRadiusOrder (episodeScaleRadius ν e f) fexp b sfloor height : ∀ s, sfloor ≤ s → s*Real.exp (g*b) ≤ (episodeStageH χ b s:ℝ) stages : ∀ s, sfloor ≤ s → ∀ a : ℝ, ∀ π : BudgetProfile (k:=k) e f a (episodeScaleRadius ν e f s), environmentLaw ν (stageBadEvent e f (episodeStageH χ b s) (episodeScaleRadius ν e f (s*Real.exp (-fexp*b))) (episodeScaleRadius ν e f (s*Real.exp (g*b))) π.val (ENNReal.ofReal (Real.exp (-((k:ℝ)*b))))) ≤ ENNReal.ofReal (Real.exp (-2*(K*b)))
lemma operational_constants_exist {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (D : ℝ) (hD : 0≤D) : Nonempty (OperationalConstants ν e f D) := by obtain ⟨κ,hκ0,hκae⟩ := environment_uniform_elliptic ν hue have hκ1 : κ≤1 := by obtain ⟨ω,hω⟩ := hκae.exists exact (hω 0 e).trans (row_entry_le_one (ω 0) e) obtain ⟨fexp,g,χ,K,hf,hg,hgap,hK,hgsmall,hKsmall,k,hk,hparams⟩ := operational_stage_parameters ν hue e f hef htrans D hD have hc : 0≤1+fexp/g := by positivity have hlarge := eventually_ge_atTop (max (-Real.log κ) (2*(1+fexp/g)/K)) obtain ⟨b,hbparam,hblarge⟩ := (hparams.and hlarge).exists obtain ⟨hb,oldfloor,holdfloor,hheight,hstages⟩ := hbparam have hbκ : -Real.log κ≤b := (le_max_left _ _).trans hblarge have hcoeff : 1/g+(1+fexp/g)*D/K ≤ (1/2:ℝ)/32 := by linarith have hsmall : (1+fexp/g)*Real.exp (-(K*b))/(K*b)≤1/2 := by have hden : 0<K*b := mul_pos hK hb have he : Real.exp (-(K*b))≤1 := Real.exp_le_one_iff.mpr (neg_nonpos.mpr hden.le) have hb2 : 2*(1+fexp/g)≤b*K := (div_le_iff₀ hK).mp ((le_max_right _ _).trans hblarge) apply (div_le_iff₀ hden).mpr have hh := mul_le_mul_of_nonneg_left he hc nlinarith let μ := independentConditionedPairLaw ν (realPosition (step e)) let S := commonIncrementProcess (realPosition (step e)) f 0 let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν _ (ne_of_gt (noDrop_positive_of_directionallyTransient ν _ htrans)) have hS : Measurable S := measurable_commonIncrementProcess _ _ _ have hI : Integrable S μ := independent_commonWordIncrement_integrable ν hue _ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f have hne : 0<μ {x | S x≠0} := independent_commonWordIncrement_nonzero ν hue e f hef htrans obtain ⟨R,hR,horder⟩ := fluctuationRadius_stage_order μ S hS hI hne fexp b hf.le hb.le let sfloor := max oldfloor R have hsf : oldfloor≤ sfloor := le_max_left _ _ refine ⟨{ fexp := fexp g := g χ := χ K := K b := b sfloor := sfloor k := k κ := κ hk := hk hκ0 := hκ0 hκ1 := hκ1 rows := hκae hf := hf hg := hg hgap := hgap hK := hK hb := hb hs := holdfloor.trans hsf hbκ := hbκ coeff := hcoeff small := hsmall order := horder sfloor (le_max_right _ _) height := ?_ stages := ?_ }⟩ · intro s hs exact (hheight s (hsf.trans hs)).2 · intro s hs a π simpa only [mul_assoc,episodeScaleRadius] using hstages s (hsf.trans hs) a π
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321import Mathlibimport OAI.Probability.Ballisticity.Entropy.StoppedWindowEntropy
namespace OAI
section
open MeasureTheory ProbabilityTheory InformationTheoryopen scoped ENNReal Classicalnamespace DirectionalTransience
lemma prod_dependent_map_const {A B C : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace C] (μ : Measure A) [IsFiniteMeasure μ] (ν : Measure B) [IsFiniteMeasure ν] (ρ : Measure C) [IsFiniteMeasure ρ] (f : A → B → C) (hf : Measurable (fun p : A × B => f p.1 p.2)) (h : ∀ a, ν.map (f a) = ρ) : (μ.prod ν).map (fun p => (p.1, f p.1 p.2)) = μ.prod ρ := by apply Measure.ext_prod intro s t hs ht rw [Measure.map_apply (measurable_fst.prodMk hf) (hs.prod ht), Measure.prod_apply ((hs.prod ht).preimage (measurable_fst.prodMk hf)), Measure.prod_prod] have inner (a : A) : ν (Prod.mk a ⁻¹' ((fun p : A × B => (p.1,f p.1 p.2)) ⁻¹' (s ×ˢ t))) = s.indicator (fun _ => ρ t) a := by by_cases ha : a ∈ s · rw [Set.indicator_of_mem ha] have he : Prod.mk a ⁻¹' ((fun p : A × B => (p.1,f p.1 p.2)) ⁻¹' (s ×ˢ t)) = f a ⁻¹' t := by ext b; simp [ha] have hfa : Measurable (f a) := hf.comp measurable_prodMk_left rw [he, ← Measure.map_apply hfa ht, h a] · have he : Prod.mk a ⁻¹' ((fun p : A × B => (p.1,f p.1 p.2)) ⁻¹' (s ×ˢ t)) = ∅ := by ext b; simp [ha] simp [he,ha] simp_rw [inner] rw [lintegral_indicator hs, lintegral_const] simp [mul_comm]
abbrev LocalUpperField {d : ℕ} (e : Direction d) := (ℕ × HorizontalSpace e) → Row d
noncomputable def localStoppedField {d : ℕ} (e : Direction d) (τ σ : Environment d → ℕ) (p : Environment d × LocalUpperField e) : LocalUpperField e := fun q => if q.1 < σ p.1 - τ p.1 then p.1 (horizontalLift e (τ p.1 + q.1) q.2) else p.2 q
lemma localStoppedField_measurable {d : ℕ} (e : Direction d) (τ σ : Environment d → ℕ) (hτ : Measurable τ) (hσ : Measurable σ) : Measurable (localStoppedField e τ σ) := by apply Measurable.of_eval intro q apply Measurable.ite (measurableSet_lt measurable_const ((hσ.comp measurable_fst).sub (hτ.comp measurable_fst))) · have hx : Measurable (fun p : Environment d × LocalUpperField e => horizontalLift e (τ p.1 + q.1) q.2) := (measurable_of_countable (fun n : ℕ => horizontalLift e (n + q.1) q.2)).comp (hτ.comp measurable_fst) exact measurable_current_row.comp (measurable_fst.prodMk hx) · exact (measurable_pi_apply q).comp measurable_snd
lemma localStoppedField_full_graft {d : ℕ} (e : Direction d) (τ σ : Environment d → ℕ) (hτσ : ∀ ω, τ ω ≤ σ ω) (ω η : Environment d) : localStoppedField e τ σ (ω, upperField e (τ ω) η) = upperField e (τ ω) (stoppedRowGraft (fun n => BelowHeight (realPosition (step e)) n) σ ω η) := by funext q have hn : horizontalLift e (τ ω + q.1) q.2 ∈ BelowHeight (realPosition (step e)) (σ ω) ↔ q.1 < σ ω - τ ω := by simp only [BelowHeight, Set.mem_ofPred_eq, signedHeight_projection, signedHeight_horizontalLift] have hle := hτσ ω norm_cast omega change (if q.1 < σ ω - τ ω then _ else _) = (if horizontalLift e (τ ω + q.1) q.2 ∈ BelowHeight (realPosition (step e)) (σ ω) then _ else _) simp only [hn, upperField]
theorem localStoppedField_law {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (τ σ : Environment d → ℕ) (hτσ : ∀ ω, τ ω ≤ σ ω) (hτ : ∀ n : ℕ, MeasurableSet[rowSigma (BelowHeight (realPosition (step e)) n)] {ω | τ ω=n}) (hσ : ∀ n : ℕ, MeasurableSet[rowSigma (BelowHeight (realPosition (step e)) n)] {ω | σ ω=n}) (filler : Environment d) : (Q.prod (Measure.infinitePi (fun _ : ℕ × HorizontalSpace e => ν))).map (fun p => (stoppedObservation (fun n => BelowHeight (realPosition (step e)) n) τ filler p.1, localStoppedField e τ σ p)) = stoppedWindowLaw e ν Q τ σ filler := by let S : ℕ → Set (Lattice d) := fun n => BelowHeight (realPosition (step e)) n have hτm := measurable_of_stop_events S τ hτ have hσm := measurable_of_stop_events S σ hσ have hf : Measurable (fun p : Environment d × Environment d => upperField e (τ p.1) p.2) := (upperField_joint_measurable e).comp (measurable_snd.prodMk (hτm.comp measurable_fst)) have hh := prod_dependent_map_const Q (environmentLaw ν) (Measure.infinitePi (fun _ : ℕ × HorizontalSpace e => ν)) (fun ω η => upperField e (τ ω) η) hf (fun ω => upperField_map e ν (τ ω)) have hF : Measurable (fun p : Environment d × LocalUpperField e => (stoppedObservation (fun n => BelowHeight (realPosition (step e)) n) τ filler p.1, localStoppedField e τ σ p)) := ((stoppedObservation_measurable S τ hτ filler).comp measurable_fst).prodMk (localStoppedField_measurable e τ σ hτm hσm) rw [← hh, Measure.map_map hF (measurable_fst.prodMk hf)] unfold stoppedWindowLaw congr 1 funext p exact Prod.ext rfl (localStoppedField_full_graft e τ σ hτσ p.1 p.2)
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory TopologicalSpaceopen scoped ENNReal Topologynamespace DirectionalTransience.ReferenceClasses
variable {H : Type*} [AddCommGroup H]
abbrev Offsets (H : Type*) := (ℕ × ℕ) → OnePoint H
structure Consistent (O : Offsets H) : Prop where self : ∀ a, O (a,a) = (0 : H) symm : ∀ (a b : ℕ) (z : H), O (a,b) = (z : OnePoint H) → O (b,a) = ((-z : H) : OnePoint H) add : ∀ (a b c : ℕ) (z w : H), O (a,b) = (z : OnePoint H) → O (b,c) = (w : OnePoint H) → O (a,c) = ((z+w : H) : OnePoint H)
abbrev Data (H : Type*) [AddCommGroup H] := {O : Offsets H // Consistent O}
def related (O : Data H) (a b : ℕ) : Prop := ∃ z : H, O.1 (a,b) = (z : OnePoint H)
lemma related_self (O : Data H) (a : ℕ) : related O a a := ⟨0,O.2.self a⟩lemma related_symm {O : Data H} {a b : ℕ} (h : related O a b) : related O b a := by obtain ⟨z,hz⟩ := h exact ⟨-z,O.2.symm a b z hz⟩lemma related_trans {O : Data H} {a b c : ℕ} (hab : related O a b) (hbc : related O b c) : related O a c := by obtain ⟨z,hz⟩ := hab obtain ⟨w,hw⟩ := hbc exact ⟨z+w,O.2.add a b c z w hz hw⟩
noncomputable def representative (O : Data H) (a : ℕ) : ℕ := @Nat.find (fun b => related O b a) (Classical.decPred _) ⟨a, related_self O a⟩
lemma representative_related (O : Data H) (a : ℕ) : related O (representative O a) a := by classical exact Nat.find_spec (p := fun b => related O b a) ⟨a,related_self O a⟩
lemma representative_le {O : Data H} {a b : ℕ} (h : related O b a) : representative O a ≤ b := by classical exact Nat.find_min' (p := fun b => related O b a) ⟨a,related_self O a⟩ h
lemma representative_eq_iff (O : Data H) (a b : ℕ) : representative O a = representative O b ↔ related O a b := by constructor · intro h exact related_trans (related_symm (representative_related O a)) (h ▸ representative_related O b) · intro hab exact le_antisymm (representative_le (related_trans (representative_related O b) (related_symm hab))) (representative_le (related_trans (representative_related O a) hab))
noncomputable def displacement (O : Data H) (a : ℕ) : H := Classical.choose (representative_related O a)
lemma displacement_spec (O : Data H) (a : ℕ) : O.1 (representative O a,a) = (↑(displacement O a) : OnePoint H) := Classical.choose_spec (representative_related O a)
lemma offset_eq (O : Data H) {a b : ℕ} {z : H} (h : O.1 (a,b) = (z : OnePoint H)) : displacement O b = displacement O a + z := by have hr := (representative_eq_iff O a b).mpr ⟨z,h⟩ have hh := O.2.add (representative O a) a b (displacement O a) z (displacement_spec O a) h rw [hr, displacement_spec] at hh exact OnePoint.coe_injective hh
noncomputable def inputSite (O : Data H) (p : ℕ × ℕ × H) : ℕ × ℕ × H := (representative O p.1,p.2.1,displacement O p.1+p.2.2)
lemma inputSite_eq_iff (O : Data H) (a b l l' : ℕ) (z z' : H) : inputSite O (a,l,z) = inputSite O (b,l',z') ↔ l = l' ∧ O.1 (a,b) = ((z-z' : H) : OnePoint H) := by constructor · intro h have hr : representative O a = representative O b := congrArg Prod.fst h have hl : l = l' := congrArg (fun p : ℕ × ℕ × H => p.2.1) h have hx : displacement O a+z = displacement O b+z' := congrArg (fun p : ℕ × ℕ × H => p.2.2) h obtain ⟨u,hu⟩ := (representative_eq_iff O a b).mp hr have hd := offset_eq O hu have hu' : u = z-z' := (eq_sub_iff_add_eq).mpr (by apply add_left_cancel (a := displacement O a) simpa only [hd,add_assoc] using hx.symm) exact ⟨hl,by simpa only [hu'] using hu⟩ · rintro ⟨rfl,h⟩ have hr := (representative_eq_iff O a b).mpr ⟨z-z',h⟩ have hd := offset_eq O h dsimp only [inputSite] apply Prod.ext hr change (l,displacement O a+z) = (l,displacement O b+z') congr 1 rw [hd] abel
section Measurablevariable [Countable H] [TopologicalSpace H] [DiscreteTopology H] [MeasurableSpace H] [BorelSpace H] [MeasurableSpace (OnePoint H)] [BorelSpace (OnePoint H)]
omit [Countable H] [TopologicalSpace H] [DiscreteTopology H] [MeasurableSpace H] [BorelSpace H] [BorelSpace (OnePoint H)] inlemma measurable_offset (a b : ℕ) : Measurable (fun O : Data H => O.1 (a,b)) := (measurable_pi_apply (a,b)).comp measurable_subtype_coe
omit [MeasurableSpace H] [BorelSpace H] inlemma measurable_related (a b : ℕ) : MeasurableSet {O : Data H | related O a b} := by simp only [related,Set.ofPred_exists] exact MeasurableSet.iUnion fun z => (measurable_offset a b) (measurableSet_singleton _)
omit [MeasurableSpace H] [BorelSpace H] inlemma measurable_representative (a : ℕ) : Measurable (fun O : Data H => representative O a) := by classical exact measurable_find (p := fun O b => related O b a) (fun O => ⟨a,related_self O a⟩) (fun b => measurable_related b a)
omit [BorelSpace H] inlemma measurable_displacement (a : ℕ) : Measurable (fun O : Data H => displacement O a) := by apply measurable_to_countable' intro z have hm : Measurable (fun O : Data H => O.1 (representative O a,a)) := by have h : Measurable (fun p : Data H × ℕ => p.1.1 (p.2,a)) := measurable_from_prod_countable_left fun b => measurable_offset b a exact h.comp (measurable_id.prodMk (measurable_representative a)) have heq : {O : Data H | displacement O a = z} = {O | O.1 (representative O a,a) = (z : OnePoint H)} := by ext O simp only [Set.mem_ofPred_eq,displacement_spec,OnePoint.coe_eq_coe] change MeasurableSet {O : Data H | displacement O a = z} rw [heq] exact hm (measurableSet_singleton _)
lemma measurable_inputSite (p : ℕ × ℕ × H) : Measurable (fun O : Data H => inputSite O p) := by exact (measurable_representative p.1).prodMk (measurable_const.prodMk ((measurable_displacement p.1).add measurable_const))
variable {R : Type*} [MeasurableSpace R]
abbrev Site (H : Type*) := ℕ × ℕ × Habbrev UpperField (H R : Type*) := (ℕ × H) → Rabbrev AllFields (H R : Type*) := Site H → R
noncomputable def fields (O : Data H) (ξ : AllFields H R) : AllFields H R := fun p => ξ (inputSite O p)
lemma measurable_fields : Measurable (fun p : Data H × AllFields H R => fields p.1 p.2) := by apply Measurable.of_eval intro p have hm : Measurable (fun u : AllFields H R × Site H => u.1 u.2) := measurable_from_prod_countable_left fun q => measurable_pi_apply q exact hm.comp (measurable_snd.prodMk ((measurable_inputSite p).comp measurable_fst))
noncomputable def reference (ν : Measure R) [IsProbabilityMeasure ν] : Kernel (Data H) (AllFields H R) := ((Kernel.id : Kernel (Data H) (Data H)).prod (Kernel.const (Data H) (Measure.infinitePi (fun _ : Site H => ν)))).map (fun p => fields p.1 p.2)
instance reference_markov (ν : Measure R) [IsProbabilityMeasure ν] : IsMarkovKernel (reference (H := H) ν) := by unfold reference exact Kernel.IsMarkovKernel.map _ measurable_fields
lemma reference_apply (ν : Measure R) [IsProbabilityMeasure ν] (O : Data H) : reference ν O = (Measure.infinitePi (fun _ : Site H => ν)).map (fields O) := by rw [reference,Kernel.map_apply _ measurable_fields,Kernel.prod_apply,Kernel.id_apply, Kernel.const_apply,Measure.dirac_prod,Measure.map_map measurable_fields measurable_prodMk_left] rfl
omit [Countable H] [TopologicalSpace H] [DiscreteTopology H] [MeasurableSpace H] [BorelSpace H] [MeasurableSpace (OnePoint H)] [BorelSpace (OnePoint H)] inlemma inputSite_injective_at_label (O : Data H) (a : ℕ) : Function.Injective (fun p : ℕ × H => inputSite O (a,p)) := by rintro ⟨l,z⟩ ⟨l',z'⟩ h have hh := (inputSite_eq_iff O a a l l' z z').mp h rw [O.2.self,OnePoint.coe_eq_coe] at hh exact Prod.ext hh.1 (sub_eq_zero.mp hh.2.symm)
lemma reference_single_field (ν : Measure R) [IsProbabilityMeasure ν] (O : Data H) (a : ℕ) : (reference ν O).map (fun φ => fun p : ℕ × H => φ (a,p)) = Measure.infinitePi (fun _ : ℕ × H => ν) := by have hm : Measurable (fields O : AllFields H R → _) := Measurable.of_eval fun _ => measurable_pi_apply _ rw [reference_apply,Measure.map_map (by fun_prop) hm] exact Measure.map_infinitePi_infinitePi_of_inj (inputSite_injective_at_label O a)
omit [Countable H] [TopologicalSpace H] [DiscreteTopology H] [MeasurableSpace H] [BorelSpace H] [MeasurableSpace (OnePoint H)] [BorelSpace (OnePoint H)] inlemma inputSite_injective_distinct_classes {I : Type*} (O : Data H) (a : I → ℕ) (ha : ∀ i j, i ≠ j → ¬ related O (a i) (a j)) : Function.Injective (fun p : I × (ℕ × H) => inputSite O (a p.1,p.2)) := by rintro ⟨i,l,z⟩ ⟨j,l',z'⟩ h have hh := (inputSite_eq_iff O (a i) (a j) l l' z z').mp h have hij : i = j := by by_contra he exact ha i j he ⟨z-z',hh.2⟩ subst j exact Prod.ext rfl (inputSite_injective_at_label O (a i) h)
lemma reference_distinct_classes {I : Type*} (ν : Measure R) [IsProbabilityMeasure ν] (O : Data H) (a : I → ℕ) (ha : ∀ i j, i ≠ j → ¬ related O (a i) (a j)) : (reference ν O).map (fun φ => fun p : I × (ℕ × H) => φ (a p.1,p.2)) = Measure.infinitePi (fun _ : I × (ℕ × H) => ν) := by have hm : Measurable (fields O : AllFields H R → _) := Measurable.of_eval fun _ => measurable_pi_apply _ rw [reference_apply,Measure.map_map (by fun_prop) hm] exact Measure.map_infinitePi_infinitePi_of_inj (inputSite_injective_distinct_classes O a ha)
end Measurableend DirectionalTransience.ReferenceClasses
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434import Mathlibimport OAI.Probability.Ballisticity.Estimates.FirstBelow
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma inverse_moment_of_geometric_tail {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) (hf : Measurable f) (hp : ∀ᵐ x ∂μ, 0 < f x ∧ f x ≠ ∞) {δ : ℝ≥0} (hδ : 0 < δ) (hδ1 : δ < 1) {ρ : ℝ≥0∞} (hρ : ρ < 1) (htail : ∀ j : ℕ, μ {x | f x < ((δ ^ (j + 1) : ℝ≥0) : ℝ≥0∞)} ≤ ρ ^ j) : ∃ lam : ℝ, 0 < lam ∧ (∫⁻ x, f x ^ (-lam) ∂μ) < ∞ := by obtain ⟨lam, hlam, hr⟩ := exists_inverse_geometric_ratio hδ hρ let c : ℝ≥0∞ := ((δ ^ (-lam) : ℝ≥0) : ℝ≥0∞) let E := fun j : ℕ => {x | f x < ((δ ^ (j + 1) : ℝ≥0) : ℝ≥0∞)} have hE (j : ℕ) : MeasurableSet (E j) := measurableSet_lt hf measurable_const have hbound : ∀ᵐ x ∂μ, f x ^ (-lam) ≤ c + ∑' j : ℕ, (E j).indicator (fun _ => c ^ (j + 2)) x := by filter_upwards [hp] with x hx have hh := inverse_power_le_series hδ hδ1 hlam (ENNReal.toNNReal_pos hx.1.ne' hx.2) rw [ENNReal.coe_rpow_of_ne_zero (ENNReal.toNNReal_pos hx.1.ne' hx.2).ne', ENNReal.coe_toNNReal hx.2] at hh convert hh using 1 congr 1 apply tsum_congr intro j simp only [Set.indicator, E, Set.mem_ofPred_eq, Set.mem_Iio] have heq : (f x).toNNReal < δ ^ (j + 1) ↔ f x < ((δ ^ (j + 1) : ℝ≥0) : ℝ≥0∞) := by rw [← ENNReal.coe_lt_coe, ENNReal.coe_toNNReal hx.2] simp only [heq, c] have hi : (∫⁻ x, f x ^ (-lam) ∂μ) ≤ c + ∑' j : ℕ, c ^ (j + 2) * ρ ^ j := by apply (lintegral_mono_ae hbound).trans rw [lintegral_add_left measurable_const, lintegral_const, measure_univ, mul_one, lintegral_tsum (fun j => (measurable_const.indicator (hE j)).aemeasurable)] refine add_le_add le_rfl ?_ apply ENNReal.tsum_le_tsum intro j rw [lintegral_indicator (hE j), lintegral_const, Measure.restrict_apply_univ] exact mul_le_mul' le_rfl (htail j) have heq : (∑' j : ℕ, c ^ (j + 2) * ρ ^ j) = c ^ 2 * (1 - c * ρ)⁻¹ := by simp_rw [pow_add, mul_right_comm (c ^ _) (c ^ 2), ← mul_pow] rw [ENNReal.tsum_mul_right, ENNReal.tsum_geometric, mul_comm] refine ⟨lam, hlam, lt_of_le_of_lt hi ?_⟩ rw [heq] apply ENNReal.add_lt_top.mpr constructor · exact ENNReal.coe_lt_top · apply ENNReal.mul_lt_top (by simp [c]) exact ENNReal.inv_lt_top.mpr (tsub_pos_iff_lt.mpr (by simpa [mul_comm] using hr))
lemma exists_positive_step {d : ℕ} (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) : ∃ e : Direction d, 0 < dot (realPosition (step e)) ℓ := by have hn : ∃ i, ℓ i ≠ 0 := by by_contra h push Not at h have hz : dot ℓ ℓ = 0 := by simp [dot, h] linarith obtain ⟨i, hi⟩ := hn rcases lt_or_gt_of_ne hi with hi | hi · refine ⟨(i, false), ?_⟩ simpa [dot, realPosition, step] using neg_pos.mpr hi · refine ⟨(i, true), ?_⟩ simpa [dot, realPosition, step] using hi
lemma quenched_noDrop_positive_of_directionallyTransient {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) : ∀ᵐ ω ∂environmentLaw ν, ∀ x, 0 < noDropQuenched ℓ x ω := by obtain ⟨e, he⟩ := exists_positive_step ℓ hℓ exact noDropQuenched_positive_ae ν hue ℓ e he (noDrop_positive_of_directionallyTransient ν ℓ htrans)
lemma noDrop_inverse_moment {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) : ∃ lam : ℝ, 0 < lam ∧ (∫⁻ ω, noDropQuenched ℓ 0 ω ^ (-lam) ∂environmentLaw ν) < ∞ := by obtain ⟨e, he⟩ := exists_positive_step ℓ hℓ obtain ⟨δ, ρ, hδ, hδ1, hρ, htail⟩ := noDrop_geometric_tail ν hue ℓ e he htrans apply inverse_moment_of_geometric_tail (environmentLaw ν) (noDropQuenched ℓ 0) (measurable_noDropQuenched ℓ 0) _ hδ hδ1 hρ htail filter_upwards [quenched_noDrop_positive_of_directionallyTransient ν hue ℓ hℓ htrans] with ω hω exact ⟨hω 0, measure_ne_top _ _⟩
lemma integer_quantile (μ : Measure ℤ) [IsFiniteMeasure μ] {t : ℝ≥0∞} (ht : 0 < t) (htμ : t < μ Set.univ) : ∃ j : ℤ, t ≤ μ (Set.Iic j) ∧ μ (Set.Iio j) < t := by have hbot : Tendsto (fun j : ℤ => μ (Set.Iic j)) atBot (𝓝 0) := by have hi : (⋂ j : ℤ, Set.Iic j) = ∅ := by ext z simp only [Set.mem_iInter, Set.mem_Iic, Set.mem_empty_iff_false, iff_false] push Not exact ⟨z - 1, by omega⟩ have h := tendsto_measure_iInter_atBot (μ := μ) (s := fun j : ℤ => Set.Iic j) (fun _ => (measurableSet_Iic).nullMeasurableSet) (fun _ _ hab => Set.Iic_subset_Iic.mpr hab) ⟨0, measure_ne_top μ _⟩ simpa only [hi, measure_empty, Function.comp_def] using h obtain ⟨b, hb⟩ := (hbot.eventually_lt_const ht).exists obtain ⟨k, hk⟩ := ((tendsto_measure_Iic_atTop μ).eventually_const_lt htμ).exists obtain ⟨j, hj, hleast⟩ := Int.exists_least_of_bdd (P := fun j => t ≤ μ (Set.Iic j)) ⟨b, fun z hz => by by_contra hzb have hzμ : μ (Set.Iic z) ≤ μ (Set.Iic b) := measure_mono (Set.Iic_subset_Iic.mpr (by omega)) exact (not_lt_of_ge (hz.trans hzμ)) hb⟩ ⟨k, hk.le⟩ refine ⟨j, hj, ?_⟩ have hi : Set.Iio j = Set.Iic (j - 1) := by ext z simp only [Set.mem_Iio, Set.mem_Iic] omega rw [hi] apply lt_of_not_ge intro h have := hleast (j - 1) h omega
lemma order_mass_cut (μ ν : Measure ℤ) [IsFiniteMeasure μ] [IsFiniteMeasure ν] (hμ : μ Set.univ ≤ 1) (hν : ν Set.univ ≤ 1) (R : ℤ) : let Q := (μ.prod ν) {p : ℤ × ℤ | p.1 + R ≤ p.2} ∃ j : ℤ, Q / 2 ≤ μ (Set.Iic j) ∧ Q / 2 ≤ ν (Set.Ici (j + R)) := by dsimp only let Q := (μ.prod ν) {p : ℤ × ℤ | p.1 + R ≤ p.2} change ∃ j : ℤ, Q / 2 ≤ μ (Set.Iic j) ∧ Q / 2 ≤ ν (Set.Ici (j + R)) by_cases hQ : Q = 0 · exact ⟨0, by simp [hQ], by simp [hQ]⟩ have hQμ : Q ≤ μ Set.univ := by calc Q ≤ (μ.prod ν) (Set.univ ×ˢ Set.univ) := measure_mono (by simp) _ = μ Set.univ * ν Set.univ := Measure.prod_prod _ _ _ ≤ μ Set.univ := mul_le_of_le_one_right zero_le hν have hQt : Q ≠ ∞ := ne_top_of_le_ne_top (measure_ne_top μ _) hQμ obtain ⟨j, hj, hjprev⟩ := integer_quantile μ (ENNReal.half_pos hQ) ((ENNReal.half_lt_self hQ hQt).trans_le hQμ) refine ⟨j, hj, ?_⟩ by_contra hnot have hjright : ν (Set.Ici (j + R)) < Q / 2 := lt_of_not_ge hnot have hsub : {p : ℤ × ℤ | p.1 + R ≤ p.2} ⊆ (Set.Iio j ×ˢ Set.univ) ∪ (Set.univ ×ˢ Set.Ici (j + R)) := by intro p hp by_cases h : p.1 < j · exact Or.inl ⟨h, Set.mem_univ _⟩ · refine Or.inr ⟨Set.mem_univ _, ?_⟩ change p.1 + R ≤ p.2 at hp change j + R ≤ p.2 omega have bound : Q < Q := calc Q ≤ (μ.prod ν) ((Set.Iio j ×ˢ Set.univ) ∪ (Set.univ ×ˢ Set.Ici (j + R))) := measure_mono hsub _ ≤ (μ.prod ν) (Set.Iio j ×ˢ Set.univ) + (μ.prod ν) (Set.univ ×ˢ Set.Ici (j + R)) := measure_union_le _ _ _ = μ (Set.Iio j) * ν Set.univ + μ Set.univ * ν (Set.Ici (j + R)) := by rw [Measure.prod_prod, Measure.prod_prod] _ ≤ μ (Set.Iio j) + ν (Set.Ici (j + R)) := add_le_add (mul_le_of_le_one_right zero_le hν) (mul_le_of_le_one_left zero_le hμ) _ < Q / 2 + Q / 2 := ENNReal.add_lt_add hjprev hjright _ = Q := ENNReal.add_halves Q exact (lt_irrefl Q) bound
def lowerClip (n : ℕ) (x : ℝ) : ℝ := max x (-(n : ℝ))
lemma lowerClip_tendsto (x : ℝ) : Tendsto (fun n => lowerClip n x) atTop (𝓝 x) := by obtain ⟨N, hN⟩ := exists_nat_ge (-x) have heq : (fun n => lowerClip n x) =ᶠ[atTop] (fun _ => x) := by filter_upwards [eventually_ge_atTop N] with n hn have hcast : (N : ℝ) ≤ n := by exact_mod_cast hn exact max_eq_left (by linarith) exact (tendsto_congr' heq).mpr tendsto_const_nhds
lemma lowerClip_sub_bound (n : ℕ) (x y g : ℝ) (hg : g ≤ y - x) : |min g (lowerClip n y - lowerClip n x)| ≤ |g| := by have hd : min g 0 ≤ lowerClip n y - lowerClip n x := by rcases le_total x (-(n : ℝ)) with hx | hx · rw [lowerClip, lowerClip, max_eq_right hx] have := le_max_right y (-(n : ℝ)) have := min_le_right g 0 linarith · rw [lowerClip, lowerClip, max_eq_left hx] have := le_max_left y (-(n : ℝ)) have := min_le_left g 0 linarith apply abs_le.mpr constructor · apply le_min · exact neg_abs_le g · exact (le_min (neg_abs_le g) (by simp)).trans hd · exact (min_le_left _ _).trans (le_abs_self g)
lemma integral_le_zero_of_identDistrib_lower_bound {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsFiniteMeasure μ] {X Y G : α → ℝ} (hXY : IdentDistrib X Y μ μ) (hX : ∀ᵐ a ∂μ, X a ≤ 0) (hY : ∀ᵐ a ∂μ, Y a ≤ 0) (hG : Integrable G μ) (hlower : ∀ᵐ a ∂μ, G a ≤ Y a - X a) : ∫ a, G a ∂μ ≤ 0 := by let D : ℕ → α → ℝ := fun n a => lowerClip n (Y a) - lowerClip n (X a) let F : ℕ → α → ℝ := fun n a => min (G a) (D n a) have hclipmeas (n : ℕ) : Measurable (lowerClip n) := measurable_id.max measurable_const have hclipint (Z : α → ℝ) (hZm : AEMeasurable Z μ) (hZ : ∀ᵐ a ∂μ, Z a ≤ 0) (n : ℕ) : Integrable (fun a => lowerClip n (Z a)) μ := by apply Integrable.of_bound ((hclipmeas n).comp_aemeasurable hZm).aestronglyMeasurable n filter_upwards [hZ] with a ha rw [Real.norm_eq_abs] apply abs_le.mpr constructor · exact le_max_right _ _ · show max (Z a) (-(n : ℝ)) ≤ (n : ℝ) exact max_le (ha.trans (Nat.cast_nonneg n)) (by linarith [Nat.cast_nonneg (α := ℝ) n]) have hDX (n : ℕ) := hclipint X hXY.aemeasurable_fst hX n have hDY (n : ℕ) := hclipint Y hXY.aemeasurable_snd hY n have hDint (n : ℕ) : Integrable (D n) μ := (hDY n).sub (hDX n) have hFm (n : ℕ) : AEStronglyMeasurable (F n) μ := (hG.aemeasurable.min (hDint n).aemeasurable).aestronglyMeasurable have hFbound (n : ℕ) : ∀ᵐ a ∂μ, ‖F n a‖ ≤ |G a| := by filter_upwards [hlower] with a ha exact lowerClip_sub_bound n (X a) (Y a) (G a) ha have hFint (n : ℕ) : Integrable (F n) μ := hG.abs.mono' (hFm n) (hFbound n) have hDzero (n : ℕ) : ∫ a, D n a ∂μ = 0 := by rw [show D n = (fun a => lowerClip n (Y a) - lowerClip n (X a)) from rfl, integral_sub (hDY n) (hDX n)] have hid := (hXY.comp (hclipmeas n)).integral_eq change (∫ a, lowerClip n (X a) ∂μ) = (∫ a, lowerClip n (Y a) ∂μ) at hid rw [hid, sub_self] have hFnonpos (n : ℕ) : ∫ a, F n a ∂μ ≤ 0 := by rw [← hDzero n] exact integral_mono_ae (hFint n) (hDint n) (Eventually.of_forall fun a => min_le_right _ _) have hlim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (G a)) := by filter_upwards [hlower] with a ha have hDlim := (lowerClip_tendsto (Y a)).sub (lowerClip_tendsto (X a)) simpa only [min_eq_left ha] using (tendsto_const_nhds (x := G a)).min hDlim exact le_of_tendsto (tendsto_integral_of_dominated_convergence (fun a => |G a|) hFm hG.abs hFbound hlim) (Eventually.of_forall hFnonpos)
def prefixMax (z : ℕ → ℝ) : ℕ → ℝ | 0 => 0 | n + 1 => max (prefixMax z n) (z n)
lemma prefixMax_nonneg (z : ℕ → ℝ) (n : ℕ) : 0 ≤ prefixMax z n := by induction n with | zero => rfl | succ n ih => exact ih.trans (le_max_left _ _)
lemma prefixMax_le_truncation (z : ℕ → ℝ) {T : ℝ} (hT : 0 ≤ T) (n : ℕ) : prefixMax z n ≤ T + ∑ j ∈ Finset.range n, max (z j - T) 0 := by induction n with | zero => simpa [prefixMax] using hT | succ n ih => rw [prefixMax, Finset.sum_range_succ] apply max_le · linarith [le_max_right (z n - T) 0] · have hsum : 0 ≤ ∑ j ∈ Finset.range n, max (z j - T) 0 := Finset.sum_nonneg fun j _ => le_max_right _ _ linarith [le_max_left (z n - T) 0]
lemma integrable_prefixMax {α : Type*} [MeasurableSpace α] (μ : Measure α) {Z : ℕ → α → ℝ} (hZ : ∀ j, Integrable (Z j) μ) (n : ℕ) : Integrable (fun a => prefixMax (fun j => Z j a) n) μ := by induction n with | zero => exact integrable_zero α ℝ μ | succ n ih => exact ih.sup (hZ n)
lemma integral_prefixMax_le {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] {Z : ℕ → α → ℝ} (hZ : Integrable (Z 0) μ) (hid : ∀ j, IdentDistrib (Z j) (Z 0) μ μ) {T : ℝ} (hT : 0 ≤ T) (n : ℕ) : (∫ a, prefixMax (fun j => Z j a) n ∂μ) ≤ T + n * ∫ a, max (Z 0 a - T) 0 ∂μ := by have hint (j : ℕ) : Integrable (Z j) μ := (hid j).integrable_iff.mpr hZ have htail (j : ℕ) : Integrable (fun a => max (Z j a - T) 0) μ := ((hint j).sub (integrable_const _)).sup (integrable_const _) calc (∫ a, prefixMax (fun j => Z j a) n ∂μ) ≤ ∫ a, T + ∑ j ∈ Finset.range n, max (Z j a - T) 0 ∂μ := by apply integral_mono (integrable_prefixMax μ hint n) ((integrable_const T).add (integrable_finsetSum _ fun j _ => htail j)) intro a exact prefixMax_le_truncation _ hT _ _ = T + ∑ j ∈ Finset.range n, ∫ a, max (Z j a - T) 0 ∂μ := by rw [integral_add (integrable_const T) (integrable_finsetSum _ fun j _ => htail j), integral_const, integral_finsetSum _ fun j _ => htail j] simp _ = T + n * ∫ a, max (Z 0 a - T) 0 ∂μ := by congr 1 have heq (j : ℕ) : (∫ a, max (Z j a - T) 0 ∂μ) = ∫ a, max (Z 0 a - T) 0 ∂μ := ((hid j).comp ((measurable_id.sub_const T).max measurable_const)).integral_eq simp_rw [heq] simp
lemma integral_prefixMax_div_tendsto_zero {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] {Z : ℕ → α → ℝ} (hZ : Integrable (Z 0) μ) (hid : ∀ j, IdentDistrib (Z j) (Z 0) μ μ) : Tendsto (fun n : ℕ => (∫ a, prefixMax (fun j => Z j a) n ∂μ) / n) atTop (𝓝 0) := by have htail : Tendsto (fun T : ℕ => ∫ a, max (Z 0 a - T) 0 ∂μ) atTop (𝓝 0) := by have hbound (T : ℕ) : ∀ᵐ a ∂μ, ‖max (Z 0 a - T) 0‖ ≤ |Z 0 a| := by apply Eventually.of_forall intro a rw [Real.norm_eq_abs, abs_of_nonneg (le_max_right _ _)] apply max_le · linarith [le_abs_self (Z 0 a), Nat.cast_nonneg (α := ℝ) T] · exact abs_nonneg _ have hlim : ∀ᵐ a ∂μ, Tendsto (fun T : ℕ => max (Z 0 a - T) 0) atTop (𝓝 0) := by apply Eventually.of_forall intro a obtain ⟨N, hN⟩ := exists_nat_ge (Z 0 a) apply tendsto_const_nhds.congr' filter_upwards [eventually_ge_atTop N] with n hn have hcast : (N : ℝ) ≤ n := by exact_mod_cast hn exact (max_eq_right (by linarith)).symm simpa only [integral_zero] using tendsto_integral_of_dominated_convergence (fun a => |Z 0 a|) (fun T => (hZ.aemeasurable.sub_const T |>.max aemeasurable_const).aestronglyMeasurable) hZ.abs hbound hlim have hnonneg (n : ℕ) : 0 ≤ (∫ a, prefixMax (fun j => Z j a) n ∂μ) / n := div_nonneg (integral_nonneg fun a => prefixMax_nonneg _ _) (Nat.cast_nonneg _) apply tendsto_order.mpr constructor · intro a ha exact Eventually.of_forall fun n => ha.trans_le (hnonneg n) · intro ε hε obtain ⟨T, hT⟩ := (htail.eventually (gt_mem_nhds (half_pos hε))).exists have hdiv : Tendsto (fun n : ℕ => (T : ℝ) / n) atTop (𝓝 0) := tendsto_natCast_atTop_atTop.const_div_atTop _ filter_upwards [hdiv.eventually (gt_mem_nhds (half_pos hε)), eventually_ge_atTop 1] with n hn hn1 have hnpos : 0 < (n : ℝ) := by exact_mod_cast hn1 have hbd := div_le_div_of_nonneg_right (integral_prefixMax_le μ hZ hid (Nat.cast_nonneg T) n) hnpos.le rw [add_div, mul_div_cancel_left₀ _ hnpos.ne'] at hbd linarith
lemma le_prefixMax (z : ℕ → ℝ) {j n : ℕ} (hj : j < n) : z j ≤ prefixMax z n := by induction n with | zero => omega | succ n ih => rcases lt_or_eq_of_le (Nat.le_of_lt_succ hj) with h | rfl · exact (ih h).trans (le_max_left _ _) · exact le_max_right _ _
lemma log_sum_le_log_add_prefixMax (h : ℕ → ℝ) (hh : ∀ j, 0 ≤ h j) {n : ℕ} (hn : 0 < n) : Real.log (1 + ∑ j ∈ Finset.range n, h j) ≤ Real.log n + prefixMax (fun j => Real.log (1 + h j)) n := by let M := prefixMax (fun j => Real.log (1 + h j)) n have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hsum : 0 ≤ ∑ j ∈ Finset.range n, h j := Finset.sum_nonneg fun j _ => hh j apply (Real.log_le_iff_le_exp (by linarith)).mpr rw [Real.exp_add, Real.exp_log hnR] have hterm : ∀ j ∈ Finset.range n, 1 + h j ≤ Real.exp M := by intro j hj exact (Real.log_le_iff_le_exp (by linarith [hh j])).mp (le_prefixMax (fun j => Real.log (1 + h j)) (Finset.mem_range.mp hj)) have hbd := Finset.sum_le_sum hterm simp only [Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one] at hbd have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn linarith
lemma integral_log_sum_div_tendsto_zero {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] {h : ℕ → α → ℝ} (hh : ∀ᵐ a ∂μ, ∀ j, 0 ≤ h j a) (hid : ∀ j, IdentDistrib (h j) (h 0) μ μ) (hint : Integrable (fun a => Real.log (1 + h 0 a)) μ) : Tendsto (fun n : ℕ => (∫ a, Real.log (1 + ∑ j ∈ Finset.range n, h j a) ∂μ) / n) atTop (𝓝 0) := by let Z : ℕ → α → ℝ := fun j a => Real.log (1 + h j a) have hZid (j : ℕ) : IdentDistrib (Z j) (Z 0) μ μ := (hid j).comp (Real.measurable_log.comp (measurable_const.add measurable_id)) have hZint (j : ℕ) : Integrable (Z j) μ := (hZid j).integrable_iff.mpr hint have hnonneg (n : ℕ) : 0 ≤ (∫ a, Real.log (1 + ∑ j ∈ Finset.range n, h j a) ∂μ) / n := by apply div_nonneg _ (Nat.cast_nonneg _) apply integral_nonneg_of_ae filter_upwards [hh] with a ha apply Real.log_nonneg have := Finset.sum_nonneg (s := Finset.range n) (fun j _ => ha j) linarith have hupper : ∀ᶠ n : ℕ in atTop, (∫ a, Real.log (1 + ∑ j ∈ Finset.range n, h j a) ∂μ) / n ≤ Real.log n / n + (∫ a, prefixMax (fun j => Z j a) n ∂μ) / n := by filter_upwards [eventually_ge_atTop 1] with n hn have hn0 : 0 < n := by omega have hm : AEStronglyMeasurable (fun a => Real.log (1 + ∑ j ∈ Finset.range n, h j a)) μ := (Real.measurable_log.comp_aemeasurable (aemeasurable_const.add (Finset.aemeasurable_fun_sum _ fun j _ => (hid j).aemeasurable_fst))).aestronglyMeasurable have hbd : ∀ᵐ a ∂μ, Real.log (1 + ∑ j ∈ Finset.range n, h j a) ≤ Real.log n + prefixMax (fun j => Z j a) n := by filter_upwards [hh] with a ha exact log_sum_le_log_add_prefixMax _ ha hn0 have hubint : Integrable (fun a => Real.log n + prefixMax (fun j => Z j a) n) μ := (integrable_const _).add (integrable_prefixMax μ hZint n) have hsint : Integrable (fun a => Real.log (1 + ∑ j ∈ Finset.range n, h j a)) μ := by apply hubint.mono' hm filter_upwards [hh, hbd] with a ha hb rw [Real.norm_eq_abs, abs_of_nonneg (Real.log_nonneg (by have := Finset.sum_nonneg (s := Finset.range n) (fun j _ => ha j) linarith))] exact hb have hbint := integral_mono_ae hsint hubint hbd rw [integral_add (integrable_const _) (integrable_prefixMax μ hZint n)] at hbint simp only [integral_const] at hbint simp at hbint have hd := div_le_div_of_nonneg_right hbint (Nat.cast_nonneg n) simpa only [add_div] using hd apply squeeze_zero' (Eventually.of_forall hnonneg) hupper have hlog : Tendsto (fun n : ℕ => Real.log n / (n : ℝ)) atTop (𝓝 0) := by simpa only [pow_one, one_mul, add_zero, Function.comp_def] using (Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero).comp (tendsto_natCast_atTop_atTop (R := ℝ)) simpa using hlog.add (integral_prefixMax_div_tendsto_zero μ hint hZid)
end DirectionalTransienceendend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186import Mathlibimport OAI.Probability.Ballisticity.Stationary.StationaryProfileimport OAI.Probability.Ballisticity.Stationary.ArrayMarkedIterateimport OAI.Probability.Ballisticity.Estimates.ProfileMeasureUpdateimport OAI.Probability.Ballisticity.Entropy.EntropyDensity
namespace OAI
section
open MeasureTheory ProbabilityTheory InformationTheoryopen scoped ENNReal NNReal Classicalnamespace DirectionalTransience
noncomputable def arrayNatHeight {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) : ℕ := (Y.1 0).1.toNatlemma arrayNatHeight_measurable {d : ℕ} (e : Direction d) : Measurable (arrayNatHeight e) := (measurable_of_countable ENat.toNat).comp (by fun_prop)lemma arrayNatHeight_positive {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) (h0 : 0<(Y.1 0).1) (ht : (Y.1 0).1<⊤) : 1≤arrayNatHeight e Y := by have he := ENat.natCast_toNat ht.ne rw [←he] at h0 exact_mod_cast h0
lemma markedArrayLaw_integrable {d : ℕ} (e : Direction d) (μ : Measure (ActualEpisodeArray e)) [IsProbabilityMeasure μ] (E : Set (ActualEpisodeArray e)) (hE : μ E≠0) (F : ActualEpisodeArray e → ℝ) (hF : Measurable F) (hFi : Integrable F μ) : Integrable (fun p : MarkedArray e => F p.1) (markedArrayLaw e μ E) := by have hi : Integrable F μ[|E] := hFi.integrableOn.smul_measure (ENNReal.inv_ne_top.mpr hE) apply (integrable_map_measure hF.aestronglyMeasurable measurable_fst.aemeasurable).mp change Integrable F (markedArrayLaw e μ E).fst rwa [markedArrayLaw_fst]
namespace StationaryArrayLawvariable {d : ℕ} {ν : Measure (Row d)} [IsProbabilityMeasure ν] {e : Direction d}
lemma marked_proper_entropy (L : StationaryArrayLaw ν e) (G : ArrayGrowthSector e (L.law : Measure (ActualEpisodeArray e))) (w₀ : ProperProfile e) (n : ℕ) : let μ := markedArrayLaw e (L.law : Measure (ActualEpisodeArray e)) G.event let data := fun p => properData e w₀ (markedData e p) klDiv (μ.map (fun p => (data p,markedUpper e n p))) ((μ.map data).prod (Measure.infinitePi (fun _ : ℕ×HorizontalSpace e => ν)))≠∞ := by let μ := markedArrayLaw e (L.law : Measure (ActualEpisodeArray e)) G.event have := markedArrayLaw_probability e (L.law : Measure (ActualEpisodeArray e)) G.event G.positive_event.ne' let U := Measure.infinitePi (fun _ : ℕ×HorizontalSpace e => ν) have hk := L.marked_upper_entropy G n dsimp only at hk ⊢ rw [Measure.fst_map_prodMk (markedData_measurable e) (markedUpper_measurable e n)] at hk have h := klDiv_map_le (μ.map (fun p => (markedData e p,markedUpper e n p))) ((μ.map (markedData e)).prod U) ((properData_measurable e w₀).prodMap measurable_id) have hprod := Measure.map_prod_map (μ.map (markedData e)) U (properData_measurable e w₀) measurable_id rw [Measure.map_id] at hprod rw [←hprod,Measure.map_map (properData_measurable e w₀) (markedData_measurable e), Measure.map_map ((properData_measurable e w₀).prodMap measurable_id) ((markedData_measurable e).prodMk (markedUpper_measurable e n))] at h exact ne_top_of_le_ne_top hk h
lemma marked_full_entropy (L : StationaryArrayLaw ν e) (G : ArrayGrowthSector e (L.law : Measure (ActualEpisodeArray e))) (w₀ : ProperProfile e) (n : ℕ) : let μ := markedArrayLaw e (L.law : Measure (ActualEpisodeArray e)) G.event let data := fun p : MarkedArray e × Environment d => properData e w₀ (markedData e p.1) let field := fun p : MarkedArray e × Environment d => fillUpper e (markedUpper e n p.1,p.2) ∃ g : ProperProfile e × Environment d → ℝ, Measurable g ∧ (∀ z,0≤g z) ∧ Integrable g (((μ.prod (environmentLaw ν)).map data).prod (environmentLaw ν)) ∧ (∫ z, g z ∂((μ.prod (environmentLaw ν)).map data).prod (environmentLaw ν))=1 ∧ Integrable (fun z => TailDecorrelation.entropyPlus (g z)) (((μ.prod (environmentLaw ν)).map data).prod (environmentLaw ν)) ∧ (μ.prod (environmentLaw ν)).map (fun p => (data p,field p))= (((μ.prod (environmentLaw ν)).map data).prod (environmentLaw ν)).withDensity (fun z => ENNReal.ofReal (g z)) := by let μ := markedArrayLaw e (L.law : Measure (ActualEpisodeArray e)) G.event have := markedArrayLaw_probability e (L.law : Measure (ActualEpisodeArray e)) G.event G.positive_event.ne' let data := fun p : MarkedArray e => properData e w₀ (markedData e p) have hd : Measurable data := (properData_measurable e w₀).comp (markedData_measurable e) have hf : Measurable (fun p : MarkedArray e × Environment d => fillUpper e (markedUpper e n p.1,p.2)) := (fillUpper_measurable e).comp (((markedUpper_measurable e n).comp measurable_fst).prodMk measurable_snd) have hkl := fillUpper_finite_entropy e ν μ data hd (markedUpper e n) (markedUpper_measurable e n) (L.marked_proper_entropy G w₀ n) have hdata : (μ.prod (environmentLaw ν)).map (fun p => data p.1)=μ.map data := by rw [show (fun p : MarkedArray e × Environment d => data p.1)=data ∘ Prod.fst from rfl, ←Measure.map_map hd measurable_fst,Measure.map_fst_prod,measure_univ,one_smul] have : IsProbabilityMeasure ((μ.prod (environmentLaw ν)).map (fun p => (data p.1,fillUpper e (markedUpper e n p.1,p.2)))) := (Measure.isProbabilityMeasure_map_iff ((hd.comp measurable_fst).prodMk hf).aemeasurable).mpr inferInstance have : IsProbabilityMeasure (μ.map data) := (Measure.isProbabilityMeasure_map_iff hd.aemeasurable).mpr inferInstance have h := Entropy.density_of_finite_kl _ _ hkl dsimp only [μ,data] at hdata h ⊢ simpa only [hdata] using h
end StationaryArrayLawend DirectionalTransience
end
section
open MeasureTheory ProbabilityTheoryopen scoped ENNReal NNReal Classical BigOperatorsnamespace DirectionalTransience
lemma arrayProfileMeasure_translation {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) (hp : ArrayProfilesConsistent e Y) (j : ℤ) (p q : StationaryCompact.Label) (v : HorizontalSpace e) (hv : Y.2.1 (p,q)=(v:OnePoint (HorizontalSpace e))) : (arrayProfileMeasure e j q Y).map (fun x => x+v)=arrayProfileMeasure e j p Y := by apply Measure.ext_of_singleton intro x rw [Measure.map_apply (measurable_of_countable _) (measurableSet_singleton _)] have he : (fun y : HorizontalSpace e => y+v) ⁻¹' {x}={x-v} := by ext y simp only [Set.mem_preimage,Set.mem_singleton_iff] exact eq_sub_iff_add_eq.symm rw [he,arrayProfileMeasure_atom,arrayProfileMeasure_atom] unfold arrayProfileMass rw [←hp.1 j p q v (x-v) hv] congr 2 abel_nf
lemma arrayProfileMeasure_iterate {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) (n a : ℕ) : arrayProfileMeasure e 0 (0,a) (StationaryCompact.shift^[n] Y)= arrayProfileMeasure e n (n,a) Y := by apply Measure.ext_of_singleton intro z simp only [arrayProfileMeasure_atom,arrayProfileMass,arrayProfile_iterate,zero_add]
lemma arrayHeight_sum {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) (hf : ∀ j, (Y.1 j).1<⊤) (n : ℕ) : arrayWindowHeight e 0 n Y=(∑ i∈Finset.range n, arrayNatHeight e (StationaryCompact.shift^[i] Y):ℕ) := by simp only [arrayWindowHeight,Nat.cast_sum,arrayNatHeight,arrayMark_iterate,zero_add] apply Finset.sum_congr rfl intro j _ exact (ENat.natCast_toNat (hf j).ne).symm
lemma exp_sum_discount {d : ℕ} (e : Direction d) (Y : ActualEpisodeArray e) (hf : ∀ j, (Y.1 j).2.2≠⊤) (n : ℕ) : ENNReal.ofReal (Real.exp (∑ i∈Finset.range n, arrayRealCost e (StationaryCompact.shift^[i] Y))) * expNeg (arrayWindowCost e 0 n Y)=1 := by have hc : arrayWindowCost e 0 n Y≠⊤ := ENNReal.sum_ne_top.mpr fun j _ => hf _ rw [←ENNReal.ofReal_toReal (expNeg_ne_top _),expNeg_toReal_of_ne_top _ hc, arrayWindowCost_toReal e Y hf,←ENNReal.ofReal_mul (Real.exp_nonneg _),←Real.exp_add] simp
lemma markedCoordinateProfile_eq {d : ℕ} (e : Direction d) (f : Fin d) (w₀ : ProperProfile e) (p : MarkedArray e) (hp : IsProperProfile e (markedProfile e (markedData e p))) : coordinateProfile e f (properProfileKernel e) (properData e w₀ (markedData e p))= (arrayProfileMeasure e 0 (0,p.2) p.1).map (fun x => x.1 f) := by rw [coordinateProfile_apply,properData_kernel_eq e w₀ p hp, Measure.map_map (measurable_of_countable _) (measurable_of_countable _)] rfl
lemma markedProfile_update {d : ℕ} (e : Direction d) (f : Fin d) (hef : e.1≠f) (w₀ : ProperProfile e) (p : MarkedArray e) (ω : Environment d) (n : ℕ) (hp : ArrayProfilesConsistent e p.1) (hc : ArrayContinuation e p.1) (hh : ∀ j, (p.1.1 j).1<⊤) (hcost : ∀ j, (p.1.1 j).2.2≠⊤) (hrel : ArrayRelated e p.1 (0,p.2) (n,((markedShift e)^[n] p).2)) (h0 : IsProperProfile e (markedProfile e (markedData e p))) (hn : IsProperProfile e (markedProfile e (markedData e ((markedShift e)^[n] p)))) : ENNReal.ofReal (Real.exp (∑ i∈Finset.range n, arrayRealCost e (((markedShift e)^[i] p).1))) • (horizontalCoordinateKernel e f (∑ i∈Finset.range n, arrayNatHeight e (((markedShift e)^[i] p).1)) (fillUpper e (markedUpper e n p,ω)) ∘ₘ properProfileKernel e (properData e w₀ (markedData e p))) ≤ (coordinateProfile e f (properProfileKernel e) (properData e w₀ (markedData e ((markedShift e)^[n] p)))).map (fun x => x+(markedDisplacement e n p).val f) := by simp only [markedShift_iterate_fst] rw [properData_kernel_eq e w₀ p h0,horizontalProfileImage_fill e f hef] have hu := arrayProfile_measure_update e 0 n p.2 _ p.1 hc (arrayHeight_sum e p.1 hh n) have hu' := smul_le_smul_left (ENNReal.ofReal (Real.exp (∑ i∈Finset.range n, arrayRealCost e (StationaryCompact.shift^[i] p.1)))) hu rw [smul_smul,exp_sum_discount e p.1 hcost n,one_smul] at hu' have hu'' := Measure.map_mono hu' (measurable_of_countable (fun x : HorizontalSpace e => x.1 f)) rw [Measure.map_smul _ (measurable_of_countable _).aemeasurable] at hu'' change _≤(arrayProfileMeasure e (0+n) (0,p.2) p.1).map (fun x => x.1 f) at hu'' simp only [zero_add] at hu'' refine hu''.trans_eq ?_ rw [markedCoordinateProfile_eq e f w₀ _ hn,markedShift_iterate_fst,arrayProfileMeasure_iterate] rw [←arrayProfileMeasure_translation e p.1 hp n (0,p.2) (n,((markedShift e)^[n] p).2) (markedDisplacement e n p) (markedDisplacement_spec e n p hrel)] rw [Measure.map_map (measurable_of_countable _) (measurable_of_countable _), Measure.map_map (measurable_of_countable _) (measurable_of_countable _)] rfl
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429import Mathlibimport OAI.Probability.Ballisticity.Model
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma martingale_exponential_submartingale {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (F : Filtration ℕ ‹MeasurableSpace Ω›) (X : ℕ → Ω → ℝ) (hX : Martingale X F μ) (hi : ∀ n, Integrable (fun ω => Real.exp (X n ω)) μ) : Submartingale (fun n ω => Real.exp (X n ω)) F μ := by refine ⟨fun n => Real.continuous_exp.comp_stronglyMeasurable (hX.stronglyMeasurable n), ?_, hi⟩ intro i j hij have h := ConvexOn.map_condExp_le_univ (F.le i) convexOn_exp Real.continuous_exp.lowerSemicontinuous (hX.integrable j) (hi j) filter_upwards [h,hX.condExp_ae_eq hij] with ω hω he simpa only [Function.comp_def,he] using hω
lemma martingale_exponential_maximal {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (F : Filtration ℕ ‹MeasurableSpace Ω›) (X : ℕ → Ω → ℝ) (hX : Martingale X F μ) (hi : ∀ n, Integrable (fun ω => Real.exp (X n ω)) μ) (n : ℕ) (a : ℝ) : μ.real {ω | ∃ k≤n, a≤X k ω} ≤ Real.exp (-a)*(∫ ω, Real.exp (X n ω) ∂μ) := by let Y := fun n ω => Real.exp (X n ω) have hY : Submartingale Y F μ := martingale_exponential_submartingale μ F X hX hi let ε : ℝ≥0 := ⟨Real.exp a,(Real.exp_pos a).le⟩ have h := maximal_ineq hY (fun _ _ => (Real.exp_pos _).le) (ε:=ε) n have hset : {ω | (ε:ℝ) ≤ (Finset.range (n+1)).sup' Finset.nonempty_range_add_one (fun k => Y k ω)} = {ω | ∃ k≤n, a≤X k ω} := by ext ω simp only [Set.mem_ofPred_eq,Finset.le_sup'_iff,Finset.mem_range,Nat.lt_succ_iff] exact exists_congr fun k => and_congr_right fun _ => Real.exp_le_exp rw [hset] at h have hr := ENNReal.toReal_mono ENNReal.ofReal_ne_top h simp only [ENNReal.toReal_mul,ENNReal.coe_toReal] at hr rw [ENNReal.toReal_ofReal (show 0 ≤ ∫ ω in {ω | ∃ k≤n, a≤X k ω}, Y n ω ∂μ from integral_nonneg (fun ω => (Real.exp_pos (X n ω)).le))] at hr change Real.exp a * μ.real {ω | ∃ k≤n, a≤X k ω} ≤ ∫ ω in {ω | ∃ k≤n, a≤X k ω}, Real.exp (X n ω) ∂μ at hr have hb := hr.trans (setIntegral_le_integral (hi n) (Eventually.of_forall fun _ => (Real.exp_pos _).le)) have hb' : μ.real {ω | ∃ k≤n, a≤X k ω} ≤ (∫ ω,Real.exp (X n ω) ∂μ)/Real.exp a := (le_div_iff₀ (Real.exp_pos a)).2 (by simpa only [mul_comm] using hb) simpa only [div_eq_mul_inv,← Real.exp_neg,mul_comm] using hb'
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma gaussian_martingale_maximal {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (F : Filtration ℕ ‹MeasurableSpace Ω›) (X : ℕ → Ω → ℝ) (hX : Martingale X F μ) (v : ℕ → ℝ≥0) (hLaw : ∀ n, μ.map (X n) = gaussianReal 0 (v n)) (n : ℕ) (hv : 0 < (v n:ℝ)) (a : ℝ) (ha : 0<a) : μ.real {ω | ∃ k≤n, a≤X k ω} ≤ Real.exp (-a^2/(2*v n)) := by let c := a/(v n:ℝ) have hc : 0<c := div_pos ha hv have hXm (j : ℕ) : Measurable (X j) := (hX.stronglyMeasurable j).measurable.mono (F.le j) le_rfl have hi (j : ℕ) : Integrable (fun ω => Real.exp (c*X j ω)) μ := by have hh : Integrable (fun z : ℝ => Real.exp (c*z)) (μ.map (X j)) := by rw [hLaw j] exact integrable_exp_mul_gaussianReal c exact (integrable_map_measure (by fun_prop) (hXm j).aemeasurable).mp hh have hh := martingale_exponential_maximal μ F (c • X) (hX.smul c) hi n (c*a) have hs : {ω | ∃ k≤n, c*a ≤ (c • X) k ω} = {ω | ∃ k≤n, a≤X k ω} := by ext ω simp only [Set.mem_ofPred_eq,Pi.smul_apply,smul_eq_mul,mul_le_mul_iff_right₀ hc] rw [hs] at hh have he : (∫ ω, Real.exp ((c • X) n ω) ∂μ) = Real.exp ((v n:ℝ)*c^2/2) := by simpa only [mgf,Pi.smul_apply,smul_eq_mul,zero_mul,zero_add] using mgf_gaussianReal ⟨(hXm n).aemeasurable, hLaw n⟩ c rw [he,← Real.exp_add] at hh convert hh using 1 congr 1 dsimp [c] field_simp ring
lemma gaussian_martingale_abs_maximal {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (F : Filtration ℕ ‹MeasurableSpace Ω›) (X : ℕ → Ω → ℝ) (hX : Martingale X F μ) (v : ℕ → ℝ≥0) (hLaw : ∀ n, μ.map (X n) = gaussianReal 0 (v n)) (n : ℕ) (hv : 0 < (v n:ℝ)) (a : ℝ) (ha : 0<a) : μ.real {ω | ∃ k≤n, a≤|X k ω|} ≤ 2*Real.exp (-a^2/(2*v n)) := by have hneg (j : ℕ) : μ.map ((-X) j) = gaussianReal 0 (v j) := by have hm : AEMeasurable (X j) μ := ((hX.stronglyMeasurable j).measurable.mono (F.le j) le_rfl).aemeasurable simpa only [neg_zero,Pi.neg_apply] using (gaussianReal_neg (show HasLaw (X j) (gaussianReal 0 (v j)) μ from ⟨hm,hLaw j⟩)).map_eq have hp := gaussian_martingale_maximal μ F X hX v hLaw n hv a ha have hn := gaussian_martingale_maximal μ F (-X) hX.neg v hneg n hv a ha have hs : {ω | ∃ k≤n, a≤|X k ω|} = {ω | ∃ k≤n, a≤X k ω} ∪ {ω | ∃ k≤n, a≤(-X) k ω} := by ext ω simp only [Set.mem_ofPred_eq,Set.mem_union,le_abs,Pi.neg_apply] aesop rw [hs] exact (measureReal_union_le _ _).trans (by simpa only [two_mul] using add_le_add hp hn)
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma independent_centered_sum_martingale {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hXm : ∀ n, Measurable (X n)) (hi : ∀ n, Integrable (X n) μ) (hind : iIndepFun X μ) (hmean : ∀ n, ∫ ω, X n ω ∂μ = 0) : Martingale (fun n ω => ∑ j ∈ Finset.range (n+1), X j ω) (Filtration.natural X (fun n => (hXm n).stronglyMeasurable)) μ := by let F := Filtration.natural X (fun n => (hXm n).stronglyMeasurable) have hA : StronglyAdapted F X := Filtration.stronglyAdapted_natural _ have hsum (n : ℕ) : StronglyMeasurable[F n] (fun ω => ∑ j ∈ Finset.range (n+1), X j ω) := by have he : (fun ω => ∑ j ∈ Finset.range (n+1), X j ω) = ∑ j ∈ Finset.range (n+1), X j := by funext ω; simp rw [he] exact Finset.stronglyMeasurable_sum (Finset.range (n+1)) (fun j hj => (hA j).mono (F.mono (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)))) have hsi (n : ℕ) : Integrable (fun ω => ∑ j ∈ Finset.range (n+1), X j ω) μ := integrable_finsetSum _ (fun j _ => hi j) apply martingale_nat hsum hsi intro n have he : (fun ω => ∑ j ∈ Finset.range (n+1+1), X j ω) = (fun ω => ∑ j ∈ Finset.range (n+1), X j ω) + X (n+1) := by funext ω simp only [Finset.sum_range_succ,Pi.add_apply] rw [he] have hh := condExp_add (hsi n) (hi (n+1)) (F n) have hx := hind.condExp_natural_ae_eq_of_lt (fun n => (hXm n).stronglyMeasurable) (Nat.lt_succ_self n) have hs := condExp_of_stronglyMeasurable (F.le n) (hsum n) (hsi n) filter_upwards [hh,hx] with ω hω hxω rw [hω,hs] simpa only [Pi.add_apply,hmean,add_zero] using (congrArg (fun z => (∑ j ∈ Finset.range (n+1), X j ω)+z) hxω).symm
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166import Mathlibimport OAI.Probability.Ballisticity.Estimates.SmallScaleGaussianMass
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma partialSumMax_add_le (X Y : ℕ → ℝ) (n : ℕ) : partialSumMax (fun k => X k+Y k) n ≤ partialSumMax X n+partialSumMax Y n := by induction n with | zero => simp [partialSumMax] | succ n ih => apply max_le · exact ih.trans (add_le_add (partialSumMax_mono X (Nat.le_succ n)) (partialSumMax_mono Y (Nat.le_succ n))) · rw [show realPartialSum (fun k => X k+Y k) (n+1) = realPartialSum X (n+1)+realPartialSum Y (n+1) from by simp [realPartialSum,Finset.sum_add_distrib]] exact (abs_add_le _ _).trans (add_le_add (abs_partialSum_le_max X _) (abs_partialSum_le_max Y _))
lemma square_tail_le_fourth_add {M U V a : ℝ} (hM0 : 0 ≤ M) (hU0 : 0 ≤ U) (hV0 : 0 ≤ V) (ha : 0 < a) (hM : M ≤ U+V) : (if a < M then M^2 else 0) ≤ (16/a^2)*U^4+4*V^2 := by have ha2 : 0 < a^2 := sq_pos_of_pos ha have hnon : 0 ≤ (16/a^2)*U^4 := mul_nonneg (by positivity) (pow_nonneg hU0 _) by_cases ham : a < M · rw [ite_eq_left ham] by_cases hau : a/2 < U · have hs : a^2 ≤ 4*U^2 := by nlinarith have hp := mul_le_mul_of_nonneg_right hs (sq_nonneg U) have hu : 4*U^2 ≤ (16/a^2)*U^4 := by rw [show (16/a^2)*U^4 = (16*U^4)/a^2 by ring] apply (le_div_iff₀ ha2).mpr nlinarith [hp] have hm2 : M^2 ≤ 2*U^2+2*V^2 := by nlinarith [sq_nonneg (U-V),pow_le_pow_left₀ hM0 hM 2] nlinarith [sq_nonneg U,sq_nonneg V] · have hUV : U ≤ V := by linarith [le_of_not_gt hau] have hm2 : M^2 ≤ 4*V^2 := by nlinarith [pow_le_pow_left₀ hM0 hM 2,sq_nonneg (V-U)] linarith · rw [ite_eq_right ham] exact add_nonneg hnon (mul_nonneg (by norm_num) (pow_nonneg hV0 2))
lemma capped_max_tail_decomposition (X : ℕ → ℝ) (n : ℕ) {z R a : ℝ} (hz : 0 ≤ z) (hzR : z ≤ R) (ha : 0 < a) : (if a < partialSumMax X n then min ((partialSumMax X n)^2) (R^2) else 0) ≤ (16/a^2)*(partialSumMax (fun k => symmetricTruncate z (X k)) n)^4+ 4*(partialSumMax (fun k => bandTruncate z R (X k)) n)^2+ ∑ k ∈ Finset.range n, truncatedTailCost R (X k) := by have hcost0 : 0 ≤ ∑ k ∈ Finset.range n, truncatedTailCost R (X k) := Finset.sum_nonneg (fun k _ => truncatedTailCost_nonneg _ _) have hfirst0 : 0 ≤ (16/a^2)*(partialSumMax (fun k => symmetricTruncate z (X k)) n)^4 := by positivity have hsecond0 : 0 ≤ 4*(partialSumMax (fun k => bandTruncate z R (X k)) n)^2 := by positivity by_cases hbig : ∃ k < n, R < |X k| · obtain ⟨k,hkn,hk⟩ := hbig have hcost : R^2 ≤ ∑ j ∈ Finset.range n, truncatedTailCost R (X j) := by have hh := Finset.single_le_sum (f := fun j => truncatedTailCost R (X j)) (fun j _ => truncatedTailCost_nonneg _ _) (Finset.mem_range.mpr hkn) simpa only [truncatedTailCost,ite_eq_left hk] using hh split_ifs · exact (min_le_right _ _).trans (by linarith) · exact (pow_nonneg (hz.trans hzR) 2).trans (hcost.trans (le_add_of_nonneg_left (add_nonneg hfirst0 hsecond0))) · have hc (k) (hk : k < n) : X k = symmetricTruncate z (X k)+bandTruncate z R (X k) := by have hR : |X k| ≤ R := le_of_not_gt (fun hh => hbig ⟨k,hk,hh⟩) simp only [bandTruncate,symmetricTruncate,ite_eq_left hR] ring have heq := partialSumMax_congr n hc have hM : partialSumMax X n ≤ partialSumMax (fun k => symmetricTruncate z (X k)) n+ partialSumMax (fun k => bandTruncate z R (X k)) n := by rw [heq] exact partialSumMax_add_le _ _ n have hh := square_tail_le_fourth_add (partialSumMax_nonneg X n) (partialSumMax_nonneg _ _) (partialSumMax_nonneg _ _) ha hM have hcap : (if a < partialSumMax X n then min ((partialSumMax X n)^2) (R^2) else 0) ≤ (if a < partialSumMax X n then (partialSumMax X n)^2 else 0) := by split_ifs <;> first | exact min_le_left _ _ | rfl exact hcap.trans (hh.trans (le_add_of_nonneg_right hcost0))
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma integrable_truncatedTailCost_comp {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (R : ℝ) : Integrable (fun x => truncatedTailCost R (S x)) μ := by apply integrable_of_abs_bound μ _ ((measurable_truncatedTailCost R).comp hS) (R^2) intro x change |truncatedTailCost R (S x)| ≤ R^2 unfold truncatedTailCost split_ifs <;> simp [abs_of_nonneg (sq_nonneg R),sq_nonneg R]
lemma integral_iid_max_tail_le {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ k, Measurable (X k)) (hind : iIndepFun X μ) (hident : ∀ k, IdentDistrib (X k) (X 0) μ μ) (hsym : IdentDistrib (X 0) (fun ω => -X 0 ω) μ μ) {z R a : ℝ} (hz : 0 ≤ z) (hzR : z ≤ R) (ha : 0 < a) (n : ℕ) : (∫ ω, (if a < partialSumMax (fun k => X k ω) n then min ((partialSumMax (fun k => X k ω) n)^2) (R^2) else 0) ∂μ) ≤ (16/a^2)*(32*(n:ℝ)*z^2*truncatedVariance μ (X 0) z+ 96*(n:ℝ)^2*(truncatedVariance μ (X 0) z)^2)+ 16*(n:ℝ)*(truncatedVariance μ (X 0) R-truncatedVariance μ (X 0) z+ z^2*μ.real {ω | z < |X 0 ω|}) := by let Y := fun k ω => symmetricTruncate z (X k ω) let B := fun k ω => bandTruncate z R (X k ω) have hY (k) : Measurable (Y k) := (measurable_symmetricTruncate z).comp (hX k) have hB (k) : Measurable (B k) := (measurable_bandTruncate z R).comp (hX k) have hBb (k) (ω) : |B k ω| ≤ R := bandTruncate_bound hz hzR _ have hYi : Integrable (fun ω => (partialSumMax (fun k => Y k ω) n)^4) μ := integrable_partialSumMax_pow μ Y hY hz (fun k ω => symmetricTruncate_bound hz _) n 4 have hBi : Integrable (fun ω => (partialSumMax (fun k => B k ω) n)^2) μ := integrable_partialSumMax_pow μ B hB (hz.trans hzR) hBb n 2 have hTi (k) := integrable_truncatedTailCost_comp μ (X k) (hX k) R have hM : Measurable (fun ω => partialSumMax (fun k => X k ω) n) := measurable_partialSumMax X hX n have hLeft : Integrable (fun ω => if a < partialSumMax (fun k => X k ω) n then min ((partialSumMax (fun k => X k ω) n)^2) (R^2) else 0) μ := by apply integrable_of_abs_bound μ _ (Measurable.ite (measurableSet_lt measurable_const hM) ((hM.pow_const 2).min measurable_const) measurable_const) (R^2) intro ω split_ifs · rw [abs_of_nonneg (le_min (sq_nonneg _) (sq_nonneg R))] exact min_le_right _ _ · simpa using sq_nonneg R have hDom := integral_mono hLeft (((hYi.const_mul (16/a^2)).add (hBi.const_mul 4)).add (integrable_finsetSum (Finset.range n) (fun k _ => hTi k))) (fun ω => capped_max_tail_decomposition (fun k => X k ω) n hz hzR ha) have hAdd₁ := integral_add ((hYi.const_mul (16/a^2)).add (hBi.const_mul 4)) (integrable_finsetSum (Finset.range n) (fun k _ => hTi k)) have hAdd₂ := integral_add (hYi.const_mul (16/a^2)) (hBi.const_mul 4) simp only [Pi.add_apply] at hDom hAdd₁ hAdd₂ rw [hAdd₁,hAdd₂,integral_const_mul,integral_const_mul, integral_finsetSum _ (fun k _ => hTi k)] at hDom have hYbound := integral_iid_truncated_max_fourth_le μ X hX hind hident hsym hz le_rfl n have hBind : iIndepFun B μ := hind.comp (fun _ => bandTruncate z R) (fun _ => measurable_bandTruncate z R) have hBid (k) : IdentDistrib (B k) (B 0) μ μ := (hident k).comp (measurable_bandTruncate z R) have hBm0 : ∫ ω, B 0 ω ∂μ = 0 := integral_bandTruncate_zero μ (X 0) z R hsym have hBmean (k) : ∫ ω, B k ω ∂μ = 0 := (hBid k).integral_eq.trans hBm0 have hBbound := integral_partialSumMax_square_le_sum μ B hB hBind hBmean (hz.trans hzR) hBb n have hBeq (k) : (∫ ω, (B k ω)^2 ∂μ) = ∫ ω, (B 0 ω)^2 ∂μ := ((hBid k).comp (measurable_id.pow_const 2)).integral_eq simp only [hBeq,Finset.sum_const,Finset.card_range,nsmul_eq_mul] at hBbound have hTeq (k) : (∫ ω, truncatedTailCost R (X k ω) ∂μ) = R^2*μ.real {ω | R < |X 0 ω|} := ((hident k).comp (measurable_truncatedTailCost R)).integral_eq.trans (integral_truncatedTailCost μ (X 0) (hX 0) R) simp only [hTeq,Finset.sum_const,Finset.card_range,nsmul_eq_mul] at hDom have heq := integral_bandTruncate_cost μ (X 0) (hX 0) hz hzR have htail0 : 0 ≤ R^2*μ.real {ω | R < |X 0 ω|} := mul_nonneg (sq_nonneg _) (measureReal_nonneg) have hproduct := mul_le_mul_of_nonneg_left hYbound (show 0 ≤ 16/a^2 by positivity) change (∫ ω, (B 0 ω)^2 ∂μ)+R^2*μ.real {ω | R < |X 0 ω|} = _ at heq rw [← heq] nlinarith [mul_nonneg (show 0 ≤ (n:ℝ) by positivity) htail0]
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245import Mathlibimport OAI.Probability.Ballisticity.Estimates.OutwardCapL1import OAI.Probability.Ballisticity.Entropy.EntropyDecorrelation
namespace OAI
sectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topology BigOperatorsopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topologynamespace TailDecorrelation
section SampledSites
variable {D I A J : Type*} [MeasurableSpace D] [MeasurableSpace A] [Encodable I]variable [MeasurableSpace J] [Countable J] [MeasurableSingletonClass J]variable (δ : Measure D) (ν : Measure A) [IsProbabilityMeasure δ] [IsProbabilityMeasure ν]
omit [Encodable I] inlemma measurable_countable_sample {Z : J → (I → A) → ℝ} (hZ : ∀ j, Measurable (Z j)) {j : D → J} (hj : Measurable j) : Measurable (fun x : D × (I → A) => Z (j x.1) x.2) := by have hm : Measurable (Function.uncurry Z) := measurable_from_prod_countable_right hZ exact hm.comp ((hj.comp measurable_fst).prodMk measurable_snd)
omit [Encodable I] inlemma sampled_exponential_integrable {Z : J → (I → A) → ℝ} {s Q : ℝ} (hZ : ∀ j, Measurable (Z j)) (he : ∀ j, Integrable (fun ω => Real.exp (s * Z j ω)) (Measure.infinitePi (fun _ : I => ν))) (heQ : ∀ j, (∫ ω, Real.exp (s * Z j ω) ∂Measure.infinitePi (fun _ : I => ν)) ≤ Q) {j : D → J} (hj : Measurable j) : Integrable (fun x : D × (I → A) => Real.exp (s * Z (j x.1) x.2)) (δ.prod (Measure.infinitePi (fun _ : I => ν))) ∧ (∫ x : D × (I → A), Real.exp (s * Z (j x.1) x.2) ∂δ.prod (Measure.infinitePi (fun _ : I => ν))) ≤ Q := by let P := Measure.infinitePi (fun _ : I => ν) let F : D × (I → A) → ℝ := fun x => Real.exp (s * Z (j x.1) x.2) have hF : Measurable F := Real.measurable_exp.comp (measurable_const.mul (measurable_countable_sample hZ hj)) have hFm : Measurable (fun d => ∫ ω, F (d, ω) ∂P) := hF.stronglyMeasurable.integral_prod_right.measurable have hFi : Integrable (fun d => ∫ ω, F (d, ω) ∂P) δ := integrable_bounded_nonneg hFm (fun d => integral_nonneg fun ω => (Real.exp_pos _).le) (fun d => heQ (j d)) have hi : Integrable F (δ.prod P) := by apply (integrable_prod_iff hF.aestronglyMeasurable).mpr refine ⟨Eventually.of_forall (fun d => he (j d)), ?_⟩ simpa only [F, Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] using hFi refine ⟨hi, ?_⟩ change (∫ x, F x ∂δ.prod P) ≤ Q rw [integral_prod _ hi] calc (∫ d, ∫ ω, F (d, ω) ∂P ∂δ) ≤ (∫ _ : D, Q ∂δ) := integral_mono hFi (integrable_const Q) (fun d => heQ (j d)) _ = Q := by simp
omit [Encodable I] [IsProbabilityMeasure δ] [IsProbabilityMeasure ν] inlemma sampled_locality {Z : J → (I → A) → ℝ} (N : ℕ → J → Set I) (j : ℕ → D → J) (hj : ∀ r, Measurable (j r)) (hloc : ∀ K η : ℝ, 0 < K → 0 < η → ∃ n : ℕ, ∃ F : J → (I → A) → ℝ, (∀ a, @Measurable _ _ (rows (N n a)) _ (F a)) ∧ (∀ a ω, 0 ≤ F a ω ∧ F a ω ≤ K) ∧ (∀ a, (∫ ω, |min K (Z a ω) - F a ω| ∂Measure.infinitePi (fun _ : I => ν)) ≤ η)) (hescape : ∀ n (S : Set I), S.Finite → ∀ᵐ d ∂δ, ∀ᶠ r in atTop, Disjoint S (N n (j r d))) : ∀ K > 0, EscapingLocalApproximation δ ν (fun r x => min K (Z (j r x.1) x.2)) K := by intro K hK η hη obtain ⟨n, F, hFm, hFb, hFerr⟩ := hloc K η hK hη refine ⟨fun r x => F (j r x.1) x.2, fun r d => N n (j r d), ?_, ?_, ?_, ?_, ?_⟩ · intro r exact measurable_countable_sample (fun a => (hFm a).mono (rows_le _) le_rfl) (hj r) · exact fun r x => hFb _ _ · exact fun r d => hFm _ · exact fun r d => hFerr (j r d) · exact fun S hS => hescape n S hS
lemma sampled_entropy_decorrelation {f : D × (I → A) → ℝ} {Z : J → (I → A) → ℝ} {c Q C : ℝ} (hc : 0 < c) (hC : 0 ≤ C) (hf : Measurable f) (hf0 : ∀ x, 0 ≤ f x) (hfi : Integrable f (δ.prod (Measure.infinitePi (fun _ : I => ν)))) (hf1 : (∫ x, f x ∂δ.prod (Measure.infinitePi (fun _ : I => ν))) = 1) (hH : Integrable (fun x => entropyPlus (f x)) (δ.prod (Measure.infinitePi (fun _ : I => ν)))) (hZ : ∀ a, Measurable (Z a)) (hZ0 : ∀ a ω, 0 ≤ Z a ω) (he : ∀ a, Integrable (fun ω => Real.exp ((2 * c) * Z a ω)) (Measure.infinitePi (fun _ : I => ν))) (heQ : ∀ a, (∫ ω, Real.exp ((2 * c) * Z a ω) ∂Measure.infinitePi (fun _ : I => ν)) ≤ Q) (hZi : ∀ a, Integrable (Z a) (Measure.infinitePi (fun _ : I => ν))) (hZC : ∀ a, (∫ ω, Z a ω ∂Measure.infinitePi (fun _ : I => ν)) ≤ C) (N : ℕ → J → Set I) (j : ℕ → D → J) (hj : ∀ r, Measurable (j r)) (hloc : ∀ K η : ℝ, 0 < K → 0 < η → ∃ n : ℕ, ∃ F : J → (I → A) → ℝ, (∀ a, @Measurable _ _ (rows (N n a)) _ (F a)) ∧ (∀ a ω, 0 ≤ F a ω ∧ F a ω ≤ K) ∧ (∀ a, (∫ ω, |min K (Z a ω) - F a ω| ∂Measure.infinitePi (fun _ : I => ν)) ≤ η)) (hescape : ∀ n (S : Set I), S.Finite → ∀ᵐ d ∂δ, ∀ᶠ r in atTop, Disjoint S (N n (j r d))) : ∀ ε > 0, ∀ᶠ r in atTop, (∫ x : D × (I → A), f x * Z (j r x.1) x.2 ∂δ.prod (Measure.infinitePi (fun _ : I => ν))) ≤ C + ε := by exact entropy_decorrelation δ ν hc hC hf hf0 hfi hf1 hH (fun r => measurable_countable_sample hZ (hj r)) (fun r x => hZ0 _ _) (fun r => (sampled_exponential_integrable δ ν hZ he heQ (hj r)).1) (fun r => (sampled_exponential_integrable δ ν hZ he heQ (hj r)).2) (fun r d => hZi (j r d)) (fun r d => hZC (j r d)) (sampled_locality δ ν N j hj hloc hescape)
end SampledSites
lemma limsup_le_of_nonneg_eventual {a : ℕ → ℝ} {C : ℝ} (h0 : ∀ r, 0 ≤ a r) (h : ∀ ε > 0, ∀ᶠ r in atTop, a r ≤ C + ε) : Filter.limsup a atTop ≤ C := by apply (Filter.limsup_le_iff' (isCoboundedUnder_le_of_le atTop h0) (isBoundedUnder_of_eventually_le (h 1 zero_lt_one))).mpr intro y hy simpa only [add_sub_cancel] using h (y - C) (sub_pos.mpr hy)
end TailDecorrelation
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topologynamespace DirectionalTransience
lemma analytic_rows_eq {d : ℕ} (S : Set (Lattice d)) : TailDecorrelation.rows (A := Row d) S = rowSigma S := TailDecorrelation.rows_eq_iSup_two S
lemma pair_neighborhoods_escape {d : ℕ} (e : Direction d) (a : ℝ) (k : Fin d) (x : ℕ → Lattice d × Lattice d) (hx : Tendsto (fun r => (x r).1 k) atTop atBot) (hy : Tendsto (fun r => (x r).2 k) atTop atTop) (N : ℕ) (S : Set (Lattice d)) (hS : S.Finite) : ∀ᶠ r in atTop, Disjoint S (upperPairNeighborhood e a (x r) N) := by have hz : ∀ z ∈ S, ∀ᶠ r in atTop, z ∉ LatticeBall (x r).1 N ∪ LatticeBall (x r).2 N := by intro z _ filter_upwards [(tendsto_atBot.mp hx) (z k - (N : ℤ) - 1), (tendsto_atTop.mp hy) (z k + (N : ℤ) + 1)] with r hrx hry intro hz rcases hz with hz | hz · have hh := (abs_le.mp (hz k)).2 omega · have hh := (abs_le.mp (hz k)).1 omega filter_upwards [hS.eventually_all.mpr hz] with r hr exact Set.disjoint_left.mpr fun z hz hz' => hr z hz hz'.1
lemma integrable_and_mean_le_of_exp {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) {Z : Ω → ℝ} {c B : ℝ} (hc : 0 < c) (hZ : Measurable Z) (hZ0 : ∀ ω, 0 ≤ Z ω) (hi : Integrable (fun ω => Real.exp (c * Z ω)) μ) (hB : (∫ ω, Real.exp (c * Z ω) ∂μ) ≤ B) : Integrable Z μ ∧ (∫ ω, Z ω ∂μ) ≤ B / c := by have hb : ∀ ω, Z ω ≤ Real.exp (c * Z ω) / c := by intro ω apply (le_div_iff₀ hc).mpr have h := Real.add_one_le_exp (c * Z ω) nlinarith have hz : Integrable Z μ := (hi.div_const c).mono' hZ.aestronglyMeasurable (Eventually.of_forall (fun ω => by rw [Real.norm_eq_abs, abs_of_nonneg (hZ0 ω)] exact hb ω)) refine ⟨hz, ?_⟩ calc (∫ ω, Z ω ∂μ) ≤ (∫ ω, Real.exp (c * Z ω) / c ∂μ) := integral_mono hz (hi.div_const c) hb _ = (∫ ω, Real.exp (c * Z ω) ∂μ) / c := integral_div _ _ _ ≤ B / c := div_le_div_of_nonneg_right hB hc.le
end DirectionalTransience
namespace DirectionalTransience
theorem actual_sampled_tail_decorrelation {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) : ∃ A M : ℝ, 0 < A ∧ 0 ≤ M ∧ ∀ (D : Type) [MeasurableSpace D] (δ : Measure D) [IsProbabilityMeasure δ] (g : D × Environment d → ℝ), Measurable g → (∀ x, 0 ≤ g x) → Integrable g (δ.prod (environmentLaw ν)) → (∫ x, g x ∂δ.prod (environmentLaw ν)) = 1 → Integrable (fun x => TailDecorrelation.entropyPlus (g x)) (δ.prod (environmentLaw ν)) → ∀ (x : ℕ → D → {p : Lattice d × Lattice d // p ∈ PairAtHeight (realPosition (step e)) 0}), (∀ r, Measurable (x r)) → (∀ᵐ z ∂δ, Tendsto (fun r => (x r z).1.1 f.1) atTop atBot ∧ Tendsto (fun r => (x r z).1.2 f.1) atTop atTop) → Filter.limsup (fun r => ∫ z, g z * outwardCanonicalExcess e f A (x r z.1).1 z.2 ∂δ.prod (environmentLaw ν)) atTop ≤ M := by classical obtain ⟨A,c,B,hA,hc,hB,hbound,hloc⟩ := actual_outward_order ν hue e f hef htrans let J := {p : Lattice d × Lattice d // p ∈ PairAtHeight (realPosition (step e)) 0} let Z : J → Environment d → ℝ := fun p => outwardCanonicalExcess e f A p.1 have hZm : ∀ p : J, Measurable (Z p) := fun p => ((hbound 0 p.1 p.2).2.1).mono (rowSigma_le _) le_rfl have hZ0 : ∀ p : J, ∀ ω, 0 ≤ Z p ω := fun p => (hbound 0 p.1 p.2).1 have he : ∀ p : J, Integrable (fun ω => Real.exp (c * Z p ω)) (environmentLaw ν) := fun p => (hbound 0 p.1 p.2).2.2.1 have heB : ∀ p : J, (∫ ω, Real.exp (c * Z p ω) ∂environmentLaw ν) ≤ B := fun p => (hbound 0 p.1 p.2).2.2.2.1 have hZi : ∀ p : J, Integrable (Z p) (environmentLaw ν) := fun p => (integrable_and_mean_le_of_exp (environmentLaw ν) hc (hZm p) (hZ0 p) (he p) (heB p)).1 have hZB : ∀ p : J, (∫ ω, Z p ω ∂environmentLaw ν) ≤ B / c := fun p => (integrable_and_mean_le_of_exp (environmentLaw ν) hc (hZm p) (hZ0 p) (he p) (heB p)).2 refine ⟨A,B/c,hA,div_nonneg hB.le hc.le,?_⟩ intro D mD δ hδ g hgm hg0 hgi hg1 hgH x hxm hxe have hcap : ∀ K η : ℝ, 0 < K → 0 < η → ∃ N : ℕ, ∃ F : J → Environment d → ℝ, (∀ p, @Measurable _ _ (TailDecorrelation.rows (upperPairNeighborhood e 0 p.1 N)) _ (F p)) ∧ (∀ p ω, 0 ≤ F p ω ∧ F p ω ≤ K) ∧ (∀ p, (∫ ω, |min K (Z p ω) - F p ω| ∂environmentLaw ν) ≤ η) := by intro K η hK hη obtain ⟨N,hN⟩ := outward_cap_locality_L1 ν e f A hloc hK hη have hh : ∀ p : J, ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e 0 p.1 N)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ K) ∧ (∫ ω, |min (Z p ω) K - F ω| ∂environmentLaw ν) < η := fun p => hN 0 p.1 p.2 choose F hFm hFb hFe using hh refine ⟨N,F,?_,hFb,?_⟩ · intro p rw [analytic_rows_eq] exact hFm p · intro p simpa only [min_comm] using (hFe p).le have hesc : ∀ N (S : Set (Lattice d)), S.Finite → ∀ᵐ z ∂δ, ∀ᶠ r in atTop, Disjoint S (upperPairNeighborhood e 0 (x r z).1 N) := by intro N S hS filter_upwards [hxe] with z hz exact pair_neighborhoods_escape e 0 f.1 (fun r => (x r z).1) hz.1 hz.2 N S hS have he' : ∀ p : J, Integrable (fun ω => Real.exp ((2*(c/2)) * Z p ω)) (environmentLaw ν) := by simpa only [mul_div_cancel₀ _ (by norm_num : (2:ℝ) ≠ 0)] using he have heB' : ∀ p : J, (∫ ω, Real.exp ((2*(c/2)) * Z p ω) ∂environmentLaw ν) ≤ B := by simpa only [show 2*(c/2) = c by ring] using heB apply TailDecorrelation.limsup_le_of_nonneg_eventual · exact fun r => integral_nonneg fun z => mul_nonneg (hg0 z) (hZ0 _ _) · exact TailDecorrelation.sampled_entropy_decorrelation δ ν (by linarith) (div_nonneg hB.le hc.le) hgm hg0 hgi hg1 hgH hZm hZ0 he' heB' hZi hZB (fun N p => upperPairNeighborhood e 0 p.1 N) x hxm hcap hesc
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423import Mathlibimport OAI.Probability.Ballisticity.Estimates.CommonOffsetimport OAI.Probability.Ballisticity.Geometry.SumWindowDifference
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma inMeasure_add_zero {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (F G : ℕ → Ω → ℝ) (hF : TendstoInMeasure μ F atTop 0) (hG : TendstoInMeasure μ G atTop 0) : TendstoInMeasure μ (fun i ω => F i ω+G i ω) atTop 0 := by apply tendstoInMeasure_iff_measureReal_norm.2 intro ε hε have hf := tendstoInMeasure_iff_measureReal_norm.mp hF (ε/2) (by positivity) have hg := tendstoInMeasure_iff_measureReal_norm.mp hG (ε/2) (by positivity) simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] at hf hg ⊢ apply squeeze_zero (fun i => measureReal_nonneg) _ (by simpa only [add_zero] using hf.add hg) intro i apply (measureReal_mono (μ := μ) _).trans (measureReal_union_le _ _) intro ω hω change ε ≤ |F i ω+G i ω| at hω change ε/2 ≤ |F i ω| ∨ ε/2 ≤ |G i ω| by_contra! hn have hh := abs_add_le (F i ω) (G i ω) linarith
lemma common_count_fixed_error {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (hstep : ∀ x e, height (x+step e) ≤ height x+1) (n : ℕ → ℝ) (hn : Tendsto n atTop atTop) (H : ℕ → ℕ) {T : ℝ} (hT : 0 ≤ T) (hH : ∀ᶠ i in atTop, (H i:ℝ) ≤ T*n i) : TendstoInMeasure (independentConditionedPairLaw ν ℓ) (fun i P => ((renewalCount (fun j => commonWidthProcess ℓ j P) (H i) : ℝ)- ⌊(H i:ℝ)/commonMeanWidth ν ℓ⌋₊)/n i) atTop 0 := by let μ := independentConditionedPairLaw ν ℓ let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) have hc : 0 < commonMeanWidth ν ℓ := zero_lt_one.trans_le (commonMeanWidth_ge_one ν ℓ htrans height hproj hstep) apply tendstoInMeasure_iff_measureReal_norm.2 intro ε hε simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] have ht := common_boundary_count_uniform ν ℓ htrans height hproj hstep n hn hT (show 0 < ε/2 by positivity) have ht' := (ENNReal.tendsto_toReal (by simp : (0:ℝ≥0∞) ≠ ⊤)).comp ht simp only [ENNReal.toReal_zero] at ht' apply squeeze_zero' (Eventually.of_forall fun _ => measureReal_nonneg) _ ht' filter_upwards [hH,hn.eventually (eventually_gt_atTop (2/ε))] with i hHi hni have hn0 : 0 < n i := (div_pos (by norm_num) hε).trans hni apply ENNReal.toReal_mono (measure_ne_top _ _) (measure_mono _) intro P hP change ε ≤ |((renewalCount (fun j => commonWidthProcess ℓ j P) (H i) : ℝ)- ⌊(H i:ℝ)/commonMeanWidth ν ℓ⌋₊)/n i| at hP refine ⟨H i,hHi,?_⟩ have hf := Nat.floor_le (div_nonneg (Nat.cast_nonneg (H i)) hc.le) have hf' := Nat.lt_floor_add_one ((H i:ℝ)/commonMeanWidth ν ℓ) let C : ℝ := renewalCount (fun j => commonWidthProcess ℓ j P) (H i) let c := commonMeanWidth ν ℓ have he : (C-⌊(H i:ℝ)/c⌋₊)/n i = (C/n i-(H i:ℝ)/(c*n i))+(((H i:ℝ)/c)-⌊(H i:ℝ)/c⌋₊)/n i := by ring have hb : |(((H i:ℝ)/c)-⌊(H i:ℝ)/c⌋₊)/n i| < ε/2 := by rw [abs_div,abs_of_pos hn0,abs_of_nonneg (sub_nonneg.mpr hf),div_lt_iff₀ hn0] have hh : 2 < n i*ε := (div_lt_iff₀ hε).mp hni nlinarith change ε ≤ |(C-⌊(H i:ℝ)/c⌋₊)/n i| at hP rw [he] at hP have hh := abs_add_le (C/n i-(H i:ℝ)/(c*n i)) ((((H i:ℝ)/c)-⌊(H i:ℝ)/c⌋₊)/n i) change ε/2 < |C/n i-(H i:ℝ)/(c*n i)| linarith
theorem transverse_firstHit_fixed_sum_error {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) (H : ℕ → ℕ) {T : ℝ} (hT : 0 ≤ T) (hH : ∀ᶠ i in atTop, (H i:ℝ) ≤ T*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i)) : TendstoInMeasure (independentConditionedPairLaw ν (realPosition (step e))) (fun i P => (firstHitPairGap (realPosition (step e)) f (H i) P- realPartialSum (fun j => commonIncrementProcess (realPosition (step e)) f j P) ⌊(H i:ℝ)/commonMeanWidth ν (realPosition (step e))⌋₊)/r i) atTop 0 := by let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let X := commonIncrementProcess ℓ f let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) have hI := independent_commonWordIncrement_integrable ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f have hne := independent_commonWordIncrement_nonzero ν hue e f hef htrans have hn := (fluctuationScale_tendsto μ (X 0) (measurable_commonIncrementProcess ℓ f 0) hI hne).comp hr have hc := common_count_fixed_error ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) _ hn H hT hH have hs := iid_random_clock_error μ X (measurable_commonIncrementProcess ℓ f) (commonIncrements_independent ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (commonIncrements_identDistrib ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (independent_commonWordIncrement_symmetric ν ℓ htrans f) hI hne r hr _ _ hc have hd := independent_firstHit_decoration_small ν ℓ f htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) r hr H have hh := inMeasure_add_zero μ _ _ hd hs apply hh.congr_left intro i apply Eventually.of_forall intro P dsimp only [X] ring
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology
namespace DirectionalTransience
lemma fluctuation_tail_bound {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {ω | S ω ≠ 0}) {r l : ℝ} (hr : 0 < r) (hl : 0 < l) (hl1 : l ≤ 1) : fluctuationScale μ S r*μ.real {ω | l*r < |S ω|} ≤ 1/l^2 := by let A := {ω | l*r < |S ω|} have hA : MeasurableSet A := measurableSet_lt measurable_const hS.abs have hb : (l*r)^2*μ.real A ≤ truncatedVariance μ S r := by have hh := integral_mono ((integrable_const ((l*r)^2)).indicator hA) (integrable_truncated_square μ S hS r) (fun ω => ?_) · simpa only [truncatedVariance,integral_indicator hA,integral_const,Measure.real,Measure.restrict_apply_univ,smul_eq_mul,mul_comm] using hh · by_cases hω : ω ∈ A · rw [Set.indicator_of_mem hω] change l*r < |S ω| at hω apply le_min · nlinarith [sq_abs (S ω),abs_nonneg (S ω),mul_pos hl hr] · exact pow_le_pow_left₀ (mul_nonneg hl.le hr.le) (by nlinarith) 2 · rw [Set.indicator_of_notMem hω] exact le_min (sq_nonneg _) (sq_nonneg _) have hm := truncatedVariance_pos μ S hS hne hr rw [fluctuationScale,div_mul_eq_mul_div,div_le_div_iff₀ hm (sq_pos_of_pos hl)] nlinarith [hb]
lemma double_floor_count_bounds {n t c : ℝ} (hn : 0 < n) (ht : 0 < t) (hc : 0 < c) (hlarge : 2*(c+1)/t ≤ n) : t/(2*c)*n ≤ (⌊(⌊t*n⌋₊:ℝ)/c⌋₊:ℝ) ∧ (⌊(⌊t*n⌋₊:ℝ)/c⌋₊:ℝ) ≤ t/c*n := by have hH := Nat.floor_le (mul_nonneg ht.le hn.le) have hH' := Nat.lt_floor_add_one (t*n) have hK := Nat.floor_le (div_nonneg (Nat.cast_nonneg ⌊t*n⌋₊) hc.le) have hK' := Nat.lt_floor_add_one ((⌊t*n⌋₊:ℝ)/c) have hnt : 2*(c+1) ≤ n*t := (div_le_iff₀ ht).mp hlarge constructor · rw [div_mul_eq_mul_div] apply (div_le_iff₀ (mul_pos (by norm_num : (0:ℝ)<2) hc)).mpr have hKc : (⌊t*n⌋₊:ℝ) < ((⌊(⌊t*n⌋₊:ℝ)/c⌋₊:ℝ)+1)*c := (div_lt_iff₀ hc).mp hK' nlinarith · have hKc := (le_div_iff₀ hc).mp hK rw [div_mul_eq_mul_div] exact (le_div_iff₀ hc).mpr (by nlinarith)
theorem transverse_bad_radius_spread {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) {l ε t : ℝ} (hl : 0 < l) (hl1 : l ≤ 1) (hε : 0 < ε) (ht : 0 < t) (htsmall : t ≤ commonMeanWidth ν (realPosition (step e))*l^2/4) (hbad : ∀ᶠ i in atTop, ε ≤ fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i)* (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*r i < |commonIncrementProcess (realPosition (step e)) f 0 P|}) : ∀ᶠ i in atTop, t*ε/(16*commonMeanWidth ν (realPosition (step e))) ≤ (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*r i/4 < |firstHitPairGap (realPosition (step e)) f ⌊t*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i)⌋₊ P|} := by let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let X := commonIncrementProcess ℓ f let n := fun i => fluctuationScale μ (X 0) (r i) let c := commonMeanWidth ν ℓ let H := fun i => ⌊t*n i⌋₊ let K := fun i => ⌊(H i:ℝ)/c⌋₊ let p := fun i => μ.real {P | l*r i < |X 0 P|} let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) have hc : 0 < c := zero_lt_one.trans_le (commonMeanWidth_ge_one ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e)) have hI := independent_commonWordIncrement_integrable ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f have hne := independent_commonWordIncrement_nonzero ν hue e f hef htrans have hn := (fluctuationScale_tendsto μ (X 0) (measurable_commonIncrementProcess ℓ f 0) hI hne).comp hr have hH : ∀ᶠ i in atTop, (H i:ℝ) ≤ t*n i := by filter_upwards [hr.eventually (eventually_gt_atTop (0:ℝ))] with i hri exact Nat.floor_le (mul_nonneg ht.le (fluctuationScale_nonneg μ (X 0) (r i))) have herr := transverse_firstHit_fixed_sum_error ν hue e f hef htrans r hr H ht.le hH have herror := tendstoInMeasure_iff_measureReal_norm.mp herr (l/2) (by positivity) simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] at herror have hconst : 0 < t*ε/(16*c) := by positivity filter_upwards [hr.eventually (eventually_gt_atTop (0:ℝ)),hbad, hn.eventually (eventually_ge_atTop (2*(c+1)/t)), herror.eventually (gt_mem_nhds hconst)] with i hri hbi hni hei have hn0 : 0 < n i := div_pos (sq_pos_of_pos hri) (truncatedVariance_pos μ (X 0) (measurable_commonIncrementProcess ℓ f 0) hne hri) have hnp : n i*p i ≤ 1/l^2 := fluctuation_tail_bound μ (X 0) (measurable_commonIncrementProcess ℓ f 0) hne hri hl hl1 have hk := double_floor_count_bounds hn0 ht hc hni change t/(2*c)*n i ≤ (K i:ℝ) ∧ (K i:ℝ) ≤ t/c*n i at hk have hp : 0 ≤ p i := measureReal_nonneg have hqlo : t*ε/(2*c) ≤ (K i:ℝ)*p i := by have hh1 := mul_le_mul_of_nonneg_right hk.1 hp have hh2 := mul_le_mul_of_nonneg_left hbi (le_of_lt (div_pos ht (by positivity : 0 < 2*c))) calc t*ε/(2*c) = t/(2*c)*ε := by ring _ ≤ t/(2*c)*(n i*p i) := hh2 _ = (t/(2*c)*n i)*p i := by ring _ ≤ _ := hh1 have hqhi : (K i:ℝ)*p i ≤ 1/4 := by have hh1 := mul_le_mul_of_nonneg_right hk.2 hp have hh2 := mul_le_mul_of_nonneg_left hnp (le_of_lt (div_pos ht hc)) have hh3 : t/c*(1/l^2) ≤ 1/4 := by rw [div_mul_div_comm,mul_one,div_le_iff₀ (mul_pos hc (sq_pos_of_pos hl))] change t ≤ _ nlinarith [htsmall] calc (K i:ℝ)*p i ≤ (t/c*n i)*p i := hh1 _ = t/c*(n i*p i) := by ring _ ≤ t/c*(1/l^2) := hh2 _ ≤ _ := hh3 have hs := iid_symmetric_sum_spread μ X (measurable_commonIncrementProcess ℓ f) (commonIncrements_independent ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (commonIncrements_identDistrib ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (independent_commonWordIncrement_symmetric ν ℓ htrans f) (l*r i) (K i) have hslow : t*ε/(8*c) ≤ μ.real {P | l*r i < |realPartialSum (fun j => X j P) (K i)|} := by change (1/2:ℝ)*(K i*p i)-(K i*p i)^2/2 ≤ μ.real {P | l*r i < |realPartialSum (fun j => X j P) (K i)|} at hs have hq0 : 0 ≤ (K i:ℝ)*p i := mul_nonneg (Nat.cast_nonneg _) hp have heq : t*ε/(8*c) = (t*ε/(2*c))/4 := by ring rw [heq] nlinarith [mul_nonneg hq0 (sub_nonneg.mpr hqhi)] let A := {P | l*r i/4 < |firstHitPairGap ℓ f (H i) P|} let E := {P | l/2 ≤ |(firstHitPairGap ℓ f (H i) P-realPartialSum (fun j => X j P) (K i))/r i|} have hsub : {P | l*r i < |realPartialSum (fun j => X j P) (K i)|} ⊆ A ∪ E := by intro P hP change l*r i < |realPartialSum (fun j => X j P) (K i)| at hP by_cases ha : P ∈ A · exact Or.inl ha · apply Or.inr change l/2 ≤ |(firstHitPairGap ℓ f (H i) P-realPartialSum (fun j => X j P) (K i))/r i| change ¬l*r i/4 < |firstHitPairGap ℓ f (H i) P| at ha rw [abs_div,abs_of_pos hri,le_div_iff₀ hri] have hh := abs_sub_le (realPartialSum (fun j => X j P) (K i)) (firstHitPairGap ℓ f (H i) P) 0 simp only [sub_zero,abs_sub_comm] at hh nlinarith have hh := hslow.trans ((measureReal_mono (μ := μ) hsub).trans (measureReal_union_le _ _)) change μ.real E < t*ε/(16*c) at hei change t*ε/(16*c) ≤ μ.real A have heq : t*ε/(8*c) = 2*(t*ε/(16*c)) := by ring rw [heq] at hh linarith
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289import Mathlibimport OAI.Probability.Ballisticity.Walk.TransverseFirstHitSinglePathLimitimport OAI.Probability.Ballisticity.Geometry.CenteredHeightAdditiveUniform
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransiencelemma median_eq_of_ae_const {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (F : Ω → ℝ) {c b : ℝ} (hF : ∀ᵐ x ∂μ, F x = c) (hl : (1/2 : ℝ≥0∞) ≤ μ {x | F x ≤ b}) (hr : (1/2 : ℝ≥0∞) ≤ μ {x | b ≤ F x}) : b = c := by apply le_antisymm · by_contra! hh have hz : μ {x | b ≤ F x} = 0 := by apply measure_eq_zero_iff_ae_notMem.mpr filter_upwards [hF] with x hx simpa only [Set.mem_ofPred_eq,hx,not_le] using hh rw [hz] at hr norm_num at hr · by_contra! hh have hz : μ {x | F x ≤ b} = 0 := by apply measure_eq_zero_iff_ae_notMem.mpr filter_upwards [hF] with x hx simpa only [Set.mem_ofPred_eq,hx,not_le] using hh rw [hz] at hl norm_num at hl
lemma recordMedian_zero {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) (f : Direction d) : recordMedian ν ℓ hp f 0 = 0 := by have hx := (conditionedLaw_absolutelyContinuous ν ℓ).ae_le (annealed_initial ν) have h0 : ∀ᵐ X ∂conditionedLaw ν ℓ, signedCoordinate f (recordIndexPosition ℓ 0 X) = 0 := by filter_upwards [hx] with X hX simp [recordIndexPosition,recordIndexTime_zero,hX,signedCoordinate] have he := median_eq_of_ae_const _ _ h0 (recordMedian_spec ν ℓ hp f 0).1 (recordMedian_spec ν ℓ hp f 0).2 exact_mod_cast he
theorem recordMedian_additive_uniform {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : IsGaussianSequence (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r) (T : ℝ) {ε : ℝ} (hε : 0 < ε) : let hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν (realPosition (step e)) htrans) ∀ᶠ i in atTop, ∀ k j : ℕ, ((k+j:ℕ):ℝ) ≤ T*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i) → |((recordMedian ν (realPosition (step e)) hp f (k+j):ℝ)- recordMedian ν (realPosition (step e)) hp f k-recordMedian ν (realPosition (step e)) hp f j)/r i| < ε := by let ℓ := realPosition (step e) have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) let μ := conditionedLaw ν ℓ let : IsProbabilityMeasure μ := conditionedLaw_probability ν ℓ hp let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := independentConditionedPairLaw_probability ν ℓ hp let F := fun h X => signedCoordinate f (recordIndexPosition ℓ h X) have hF (h : ℕ) : Measurable (F h) := (measurable_of_countable (signedCoordinate f)).comp (measurable_recordIndexPosition ℓ h) let b := fun h => (recordMedian ν ℓ hp f h:ℝ) let n := fun i => fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ f 0) (r i) have hi := independent_commonWordIncrement_integrable ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f have hne := independent_commonWordIncrement_nonzero ν hue e f hef htrans have hn : Tendsto n atTop atTop := (fluctuationScale_tendsto _ _ (measurable_commonIncrementProcess ℓ f 0) hi hne).comp hr.1 have hc := commonMeanWidth_ge_one ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) apply centered_height_additive_uniform μ F hF b (by simp [b,recordMedian_zero]) r n hn (1/(2*commonMeanWidth ν ℓ)) (by positivity) _ (annealedLaw ν (NoDrop ℓ 0)).toReal (ENNReal.toReal_pos hp (measure_ne_top _ _)) _ T hε · intro S hS obtain ⟨W,hW,hWf⟩ := transverse_firstHit_single_path_limit ν hue e f hef htrans r hr hS.le refine ⟨W,hW,?_⟩ intro I simpa only [div_eq_mul_inv,one_mul] using hWf I · intro k j hk hj have hh := Measure.map_mono (conditioned_record_convolution_domination ν ℓ htrans hk hj) (measurable_of_countable (signedCoordinate f)) have hsum : Measurable (fun P : Path d × Path d => recordIndexPosition ℓ k P.1+recordIndexPosition ℓ j P.2) := ((measurable_recordIndexPosition ℓ k).comp measurable_fst).add ((measurable_recordIndexPosition ℓ j).comp measurable_snd) rw [Measure.map_smul _ (measurable_of_countable (signedCoordinate f)).aemeasurable, Measure.map_map (measurable_of_countable _) hsum, Measure.map_map (measurable_of_countable _) (measurable_recordIndexPosition ℓ (k+j))] at hh simpa only [ENNReal.ofReal_toReal (measure_ne_top _ _),Function.comp_def,signedCoordinate_add,independentConditionedPairLaw,μ,F] using hh
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma approximate_additive_linear_on_interval (b : ℕ → ℝ) (hb0 : b 0 = 0) {N : ℕ} (hN : 0 < N) {E : ℝ} (hE : 0 ≤ E) (ha : ∀ i j : ℕ, i+j ≤ 2*N → |b (i+j)-b i-b j| ≤ E) : ∀ j ≤ N, |b j-(j:ℝ)*b N/N| ≤ 2*E := by let D := fun j : ℕ => b j-(j:ℝ)*b N/N have hNreal : (N:ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega) have hDz : D 0 = 0 := by simp [D,hb0] have hDN : D N = 0 := by simp [D,mul_div_cancel_left₀ _ hNreal] obtain ⟨k,hk,hmax⟩ := (Finset.range (N+1)).exists_max_image (fun j => |D j|) ⟨0,by simp⟩ have hkN : k ≤ N := by simpa using hk have hmax' (j : ℕ) (hj : j ≤ N) : |D j| ≤ |D k| := hmax j (by simpa using hj) have hkbound : |D k| ≤ 2*E := by by_cases hkeq : k = N · simpa only [hkeq,hDN,abs_zero] using mul_nonneg (by norm_num : (0:ℝ) ≤ 2) hE have hklt : k < N := lt_of_le_of_ne hkN hkeq by_cases h2 : k+k ≤ N · have he : |D (k+k)-2*D k| ≤ E := by convert ha k k (by omega) using 1 congr 1 simp only [D,Nat.cast_add] ring have ht := abs_sub (2*D k) (D (k+k)-2*D k) have he' := abs_add_le (D (k+k)) (-(D (k+k)-2*D k)) have heq : D (k+k)+ -(D (k+k)-2*D k) = 2*D k := by ring rw [heq,abs_neg] at he' have hn := hmax' (k+k) h2 rw [abs_mul,show |(2:ℝ)| = 2 by norm_num] at he' linarith · let l := k+k-N have hl : l ≤ N := by dsimp [l]; omega have hsum : N+l = k+k := by dsimp [l]; omega have hcast : (N:ℝ)+(l:ℝ) = (k:ℝ)+(k:ℝ) := by exact_mod_cast hsum have he1 := ha k k (by omega) have he2 := ha N l (by omega) rw [hsum] at he2 have he : |D l-2*D k| ≤ 2*E := by have heq : D l-2*D k = (b (k+k)-b k-b k)-(b (k+k)-b N-b l) := by dsimp [D] rw [show (l:ℝ) = (k:ℝ)+(k:ℝ)-N by linarith] field_simp ring rw [heq] exact le_trans (abs_sub _ _) (by linarith) have he' := abs_add_le (D l) (-(D l-2*D k)) have heq : D l+ -(D l-2*D k) = 2*D k := by ring rw [heq,abs_neg,abs_mul,show |(2:ℝ)| = 2 by norm_num] at he' have hn := hmax' l hl linarith intro j hj exact (hmax' j hj).trans hkbound
lemma approximate_additive_common_slope (b : ℕ → ℝ) (hb0 : b 0 = 0) {M N : ℕ} (hN : 0 < N) (hNM : N ≤ M) {E : ℝ} (hE : 0 ≤ E) (ha : ∀ i j : ℕ, i+j ≤ 2*M → |b (i+j)-b i-b j| ≤ E) {j : ℕ} (hj : j ≤ M) : |b j-(j:ℝ)*b N/N| ≤ 2*E*(1+(j:ℝ)/N) := by have hb := approximate_additive_linear_on_interval b hb0 (lt_of_lt_of_le hN hNM) hE ha have hNr : (N:ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega) have he : b j-(j:ℝ)*b N/N = (b j-(j:ℝ)*b M/M) + ((j:ℝ)/N)*((N:ℝ)*b M/M-b N) := by field_simp; ring rw [he] calc _ ≤ |b j-(j:ℝ)*b M/M|+|((j:ℝ)/N)*((N:ℝ)*b M/M-b N)| := abs_add_le _ _ _ = |b j-(j:ℝ)*b M/M|+((j:ℝ)/N)*|b N-(N:ℝ)*b M/M| := by rw [abs_mul,abs_of_nonneg (show 0 ≤ (j:ℝ)/(N:ℝ) from div_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)), show |(N:ℝ)*b M/M-b N| = |b N-(N:ℝ)*b M/M| from abs_sub_comm _ _] _ ≤ 2*E+((j:ℝ)/N)*(2*E) := by gcongr; exact hb j hj; exact hb N hNM _ = _ := by ring
theorem height_center_linearization (b : ℕ → ℝ) (hb0 : b 0 = 0) (r n : ℕ → ℝ) (hn : Tendsto n atTop atTop) (ha : ∀ T : ℝ, ∀ ε > 0, ∀ᶠ i in atTop, ∀ k j : ℕ, ((k+j:ℕ):ℝ) ≤ T*n i → |(b (k+j)-b k-b j)/r i| < ε) (T : ℝ) {ε : ℝ} (hε : 0 < ε) : ∀ᶠ i in atTop, ∀ h : ℕ, (h:ℝ) ≤ T*n i → |(b h-(h:ℝ)*(b ⌊n i⌋₊/⌊n i⌋₊))/r i| < ε := by let S := max T 1 have hS : 1 ≤ S := le_max_right _ _ let δ := ε/(8*(S+1)) have hδ : 0 < δ := div_pos hε (by positivity) filter_upwards [ha (2*S) δ hδ,hn.eventually (eventually_ge_atTop (1:ℝ))] with i hi hni let N := ⌊n i⌋₊ let M := ⌊S*n i⌋₊ have hN : 0 < N := Nat.lt_of_lt_of_le (by omega : 0 < 1) (Nat.le_floor (by exact_mod_cast hni)) have hNM : N ≤ M := Nat.floor_mono (by nlinarith : n i ≤ S*n i) have hSn : 0 ≤ S*n i := by positivity have hM : (M:ℝ) ≤ S*n i := Nat.floor_le hSn have hNl : n i < (N:ℝ)+1 := Nat.lt_floor_add_one _ have hNr : 0 < (N:ℝ) := Nat.cast_pos.mpr hN have hN1 : (1:ℝ) ≤ N := by exact_mod_cast hN have hn2 : n i ≤ 2*(N:ℝ) := by linarith let B := fun h => b h/r i have hB0 : B 0 = 0 := by simp [B,hb0] have hBa (k j : ℕ) (hkj : k+j ≤ 2*M) : |B (k+j)-B k-B j| ≤ δ := by have hbnd : ((k+j:ℕ):ℝ) ≤ (2*S)*n i := by have hkk : ((k+j:ℕ):ℝ) ≤ 2*(M:ℝ) := by exact_mod_cast hkj nlinarith simpa only [B,← sub_div] using (hi k j hbnd).le intro h hh have hhS : (h:ℝ) ≤ S*n i := hh.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (by positivity)) have hhM : h ≤ M := Nat.le_floor hhS have hhN : (h:ℝ)/(N:ℝ) ≤ 2*S := (div_le_iff₀ hNr).mpr (by nlinarith) have hb := approximate_additive_common_slope B hB0 hN hNM hδ.le hBa hhM have he : (b h-(h:ℝ)*(b N/N))/r i = B h-(h:ℝ)*B N/N := by dsimp [B]; ring change |(b h-(h:ℝ)*(b N/N))/r i| < ε rw [he] apply lt_of_le_of_lt hb calc _ ≤ 2*δ*(1+2*S) := by gcongr _ < ε := by dsimp [δ] have hden : 0 < 8*(S+1) := by positivity rw [show 2*(ε/(8*(S+1)))*(1+2*S) = (2*ε*(1+2*S))/(8*(S+1)) by ring] apply (div_lt_iff₀ hden).mpr nlinarith
lemma height_center_slope_small (b : ℕ → ℝ) (r n : ℕ → ℝ) (hr : Tendsto r atTop atTop) (hn : Tendsto n atTop atTop) (hl : ∀ ε > 0, ∀ᶠ i in atTop, ∀ h : ℕ, (h:ℝ) ≤ n i → |(b h-(h:ℝ)*(b ⌊n i⌋₊/⌊n i⌋₊))/r i| < ε) : Tendsto (fun i => (b ⌊n i⌋₊/⌊n i⌋₊)/r i) atTop (𝓝 0) := by have he : Tendsto (fun i => (b 1-b ⌊n i⌋₊/⌊n i⌋₊)/r i) atTop (𝓝 0) := by apply Metric.tendsto_nhds.mpr intro ε hε filter_upwards [hl ε hε,hn.eventually (eventually_ge_atTop (1:ℝ))] with i hi hni simpa only [Real.dist_eq,sub_zero,Nat.cast_one,one_mul] using hi 1 (by simpa using hni) have hh := (hr.const_div_atTop (b 1)).sub he simpa only [zero_sub,neg_zero,sub_div,sub_sub_cancel] using hh
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351import Mathlibimport OAI.Probability.Ballisticity.Geometry.RawMedianTubeSingleSite
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma mixture_small_mass_probability {Ω I : Type*} [MeasurableSpace Ω] [MeasurableSpace I] (μ : Measure Ω) (π : Measure I) [IsProbabilityMeasure μ] [IsProbabilityMeasure π] (F : Ω → I → ℝ) (hF : Measurable (Function.uncurry F)) (hF0 : ∀ ω x, 0 ≤ F ω x) (hF1 : ∀ ω x, F ω x ≤ 1) {δ α : ℝ} (hδ : 0 < δ) (hbad : ∀ x, μ.real {ω | F ω x < 2*δ} ≤ α) : μ.real {ω | (∫ x, F ω x ∂π) < δ} ≤ 2*α := by have hFw (ω : Ω) : Measurable (F ω) := hF.comp (measurable_const.prodMk measurable_id) have hFx (x : I) : Measurable (fun ω => F ω x) := hF.comp (measurable_id.prodMk measurable_const) have hBw (ω : Ω) : MeasurableSet {x | F ω x < 2*δ} := measurableSet_lt (hFw ω) measurable_const have hBx (x : I) : MeasurableSet {ω | F ω x < 2*δ} := measurableSet_lt (hFx x) measurable_const let B : Set (Ω × I) := {z | F z.1 z.2 < 2*δ} have hB : MeasurableSet B := hF measurableSet_Iio let G : Ω × I → ℝ := B.indicator (fun _ => 1) have hG : Measurable G := measurable_const.indicator hB have hG0 (z : Ω × I) : 0 ≤ G z := by by_cases h : z ∈ B <;> simp [G,h] have hG1 (z : Ω × I) : ‖G z‖ ≤ 1 := by by_cases h : z ∈ B <;> simp [G,h] have hGi : Integrable G (μ.prod π) := (integrable_const (1:ℝ)).mono' hG.aestronglyMeasurable (ae_of_all _ hG1) let T : Ω → ℝ := fun ω => ∫ x, G (ω,x) ∂π have hT (ω : Ω) : T ω = π.real {x | F ω x < 2*δ} := by change (∫ x, ({x | F ω x < 2*δ}).indicator (fun _ => (1:ℝ)) x ∂π) = _ rw [integral_indicator (hBw ω)] simp have hswap : (∫ ω, T ω ∂μ) = ∫ x, μ.real {ω | F ω x < 2*δ} ∂π := by rw [show (∫ ω, T ω ∂μ) = ∫ ω, ∫ x, G (ω,x) ∂π ∂μ from rfl, integral_integral_swap (f := fun ω x => G (ω,x)) hGi] apply integral_congr_ae exact ae_of_all _ fun x => by change (∫ ω, ({ω | F ω x < 2*δ}).indicator (fun _ => (1:ℝ)) ω ∂μ) = _ rw [integral_indicator (hBx x)] simp have hmean : (∫ ω, T ω ∂μ) ≤ α := by rw [hswap] have hh := integral_mono_ae hGi.integral_prod_right (integrable_const α) (ae_of_all π fun x => by change (∫ ω, G (ω,x) ∂μ) ≤ α have he : (∫ ω, G (ω,x) ∂μ) = μ.real {ω | F ω x < 2*δ} := by change (∫ ω, ({ω | F ω x < 2*δ}).indicator (fun _ => (1:ℝ)) ω ∂μ) = _ rw [integral_indicator (hBx x)] simp rw [he]; exact hbad x) have he (x : I) : (∫ ω, G (ω,x) ∂μ) = μ.real {ω | F ω x < 2*δ} := by change (∫ ω, ({ω | F ω x < 2*δ}).indicator (fun _ => (1:ℝ)) ω ∂μ) = _ rw [integral_indicator (hBx x)] simp simpa only [he, integral_const, probReal_univ, one_smul] using hh have hinter (ω : Ω) : Integrable (F ω) π := (integrable_const (1:ℝ)).mono' (hF.comp (measurable_const.prodMk measurable_id)).aestronglyMeasurable (ae_of_all _ fun x => by rw [Real.norm_eq_abs,abs_of_nonneg (hF0 ω x)]; exact hF1 ω x) have hsub : {ω | (∫ x, F ω x ∂π) < δ} ⊆ {ω | (1:ℝ)/2 ≤ T ω} := by intro ω hsmall have hh := mul_meas_ge_le_integral_of_nonneg (ae_of_all π (hF0 ω)) (hinter ω) (2*δ) have he : {x | 2*δ ≤ F ω x} = {x | F ω x < 2*δ}ᶜ := by ext x; simp rw [he,measureReal_compl (hBw ω), probReal_univ,← hT ω] at hh change (1:ℝ)/2 ≤ T ω change (∫ x, F ω x ∂π) < δ at hsmall nlinarith have hmark := mul_meas_ge_le_integral_of_nonneg (ae_of_all μ fun ω => integral_nonneg fun x => hG0 (ω,x)) hGi.integral_prod_left (1/2) have hm := ENNReal.toReal_mono (measure_ne_top _ _) (measure_mono (μ := μ) hsub) change μ.real {ω | (∫ x, F ω x ∂π) < δ} ≤ μ.real {ω | (1:ℝ)/2 ≤ T ω} at hm change (1/2)*μ.real {ω | (1:ℝ)/2 ≤ T ω} ≤ ∫ ω, T ω ∂μ at hmark linarith
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
noncomputable def relativeGoodMass {d : ℕ} (ℓ : Vector d) (A : Set (Path d)) (ω : Environment d) (x : Lattice d) : ℝ := (quenchedKernel (ω,x)).real (((fun X : Path d => fun n => X n-x) ⁻¹' Aᶜ) ∩ NoDrop ℓ x)
lemma relativeGoodMass_translation {d : ℕ} (ℓ : Vector d) (A : Set (Path d)) (hA : MeasurableSet A) (ω : Environment d) (x : Lattice d) : relativeGoodMass ℓ A ω x = (quenchedKernel ((fun y => ω (x+y)),0)).real (Aᶜ ∩ NoDrop ℓ 0) := by have hm : Measurable (fun X : Path d => fun n => X n-x) := by fun_prop have he : ((fun X : Path d => fun n => X n-x) ⁻¹' Aᶜ) ∩ NoDrop ℓ x = (fun X : Path d => fun n => X n-x) ⁻¹' (Aᶜ ∩ NoDrop ℓ 0) := by rw [Set.preimage_inter,noDrop_translation,add_zero] have hmap : (quenchedKernel (ω,x)).map (fun X : Path d => fun n => X n-x) = quenchedKernel ((fun y => ω (x+y)),0) := by simpa only [add_zero] using quenched_translation ω x 0 rw [relativeGoodMass,Measure.real,he,← Measure.map_apply hm (hA.compl.inter (measurableSet_noDrop ℓ 0)),hmap] rfl
lemma measurable_relativeGoodMass {d : ℕ} (ℓ : Vector d) (A : Set (Path d)) (hA : MeasurableSet A) : Measurable (Function.uncurry (relativeGoodMass ℓ A)) := by apply measurable_from_prod_countable_left intro x have hm : Measurable (fun X : Path d => fun n => X n-x) := by fun_prop have hs : MeasurableSet (((fun X : Path d => fun n => X n-x) ⁻¹' Aᶜ) ∩ NoDrop ℓ x) := (hA.compl.preimage hm).inter (measurableSet_noDrop ℓ x) exact ((Kernel.measurable_coe quenchedKernel hs).comp (measurable_id.prodMk measurable_const)).ennreal_toReal
lemma relativeGoodMass_bad_probability_translation {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (A : Set (Path d)) (hA : MeasurableSet A) (x : Lattice d) (c : ℝ) : (environmentLaw ν).real {ω | relativeGoodMass ℓ A ω x < c} = (environmentLaw ν).real {ω | (quenchedKernel (ω,0)).real (Aᶜ ∩ NoDrop ℓ 0) < c} := by let F := fun ω : Environment d => (quenchedKernel (ω,0)).real (Aᶜ ∩ NoDrop ℓ 0) have hF : Measurable F := ((Kernel.measurable_coe quenchedKernel (hA.compl.inter (measurableSet_noDrop ℓ 0))).comp (measurable_id.prodMk measurable_const)).ennreal_toReal have he := congrArg (fun μ : Measure (Environment d) => μ {ω | F ω < c}) (environment_translation ν x) rw [Measure.map_apply (by fun_prop) (measurableSet_lt hF measurable_const)] at he apply congrArg ENNReal.toReal change environmentLaw ν {ω | relativeGoodMass ℓ A ω x < c} = environmentLaw ν {ω | F ω < c} convert he using 1 congr 1 ext ω exact Iff.of_eq (congrArg (fun y : ℝ => y < c) (relativeGoodMass_translation ℓ A hA ω x))
theorem raw_median_tube_single_threat {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) {w : ℝ} (hw : 0 < w) (hw1 : w ≤ 10) : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 0 < t → ∃ δ : ℝ, 0 < δ ∧ δ < 1/4 ∧ ∃ R : ℝ, 0 < R ∧ ∀ r : ℝ, R ≤ r → ∀ H : ℕ, (H:ℝ) ≤ t*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r → ∀ π : Measure (Lattice d), IsProbabilityMeasure π → let ℓ := realPosition (step e) let hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) let A := MedianTubeFailure ℓ f (fun j => (recordMedian ν ℓ hp f j:ℝ)) H (w*r) (environmentLaw ν).real {ω | (∫ x, relativeGoodMass ℓ A ω x ∂π) < δ} ≤ C*t := by obtain ⟨C,hC,hCbound⟩ := raw_median_tube_single_site ν hue e f hef htrans hw hw1 refine ⟨2*C,by positivity,?_⟩ intro t ht obtain ⟨δ,hδ,hδ1,R,hR,hbound⟩ := hCbound t ht refine ⟨δ,hδ,hδ1,R,hR,?_⟩ intro r hr H hH π hπ let := hπ let ℓ := realPosition (step e) have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) let A := MedianTubeFailure ℓ f (fun j => (recordMedian ν ℓ hp f j:ℝ)) H (w*r) have hA : MeasurableSet A := measurableSet_medianTubeFailure ℓ f _ H _ have hh := mixture_small_mass_probability (environmentLaw ν) π (relativeGoodMass ℓ A) (measurable_relativeGoodMass ℓ A hA) (fun _ _ => measureReal_nonneg) (fun _ _ => measureReal_le_one) hδ (fun x => (relativeGoodMass_bad_probability_translation ν ℓ A hA x (2*δ)).le.trans (hbound r hr H hH)) change (environmentLaw ν).real {ω | (∫ x, relativeGoodMass ℓ A ω x ∂π) < δ} ≤ 2*C*t nlinarith
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160import Mathlibimport OAI.Probability.Ballisticity.Estimates.CurvePolicyAverageMoment
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topologynamespace DirectionalTransience
noncomputable def cappedMoment {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) (L : ℝ) : ℝ := ∫ x, (min (X x) L)^2 ∂μnoncomputable def cappedTailMoment {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) (A L : ℝ) : ℝ := ∫ x, (if A < X x then (min (X x) L)^2 else 0) ∂μ
lemma min_rescale {L : ℝ} (hL : 0 < L) (x : ℝ) : min x L = L*min (x/L) 1 := by rw [← div_self (ne_of_gt hL),min_div_div_right hL.le] field_simp
lemma cappedMoment_scale {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) {L : ℝ} (hL : 0 < L) : cappedMoment μ X L = L^2*cappedMoment μ (fun x => X x/L) 1 := by unfold cappedMoment rw [← integral_const_mul] congr 1 funext x rw [min_rescale hL] ring
lemma cappedTailMoment_scale {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) (A : ℝ) {L : ℝ} (hL : 0 < L) : cappedTailMoment μ X A L = L^2*cappedTailMoment μ (fun x => X x/L) (A/L) 1 := by unfold cappedTailMoment rw [← integral_const_mul] congr 1 funext x simp only [div_lt_div_iff_of_pos_right hL] split_ifs · rw [min_rescale hL]; ring · ring
lemma cappedMoment_unit_bounds {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : Ω → ℝ) (hX : Measurable X) (hX0 : ∀ x, 0 ≤ X x) : 0 ≤ cappedMoment μ X 1 ∧ cappedMoment μ X 1 ≤ 1 := by have hb (x) : 0 ≤ (min (X x) 1)^2 ∧ (min (X x) 1)^2 ≤ 1 := by have h0 := le_min (hX0 x) zero_le_one have h1 := min_le_right (X x) 1 constructor <;> nlinarith have hi : Integrable (fun x => (min (X x) 1)^2) μ := (integrable_const (1:ℝ)).mono' ((hX.min measurable_const).pow_const 2).aestronglyMeasurable (Eventually.of_forall (fun x => by simpa only [Real.norm_eq_abs,abs_of_nonneg (hb x).1] using (hb x).2)) constructor · exact integral_nonneg (fun x => (hb x).1) · calc _ ≤ ∫ x, (1:ℝ) ∂μ := integral_mono hi (integrable_const _) (fun x => (hb x).2) _ = 1 := by simp
lemma cappedTailMoment_unit_bounds {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : Ω → ℝ) (hX : Measurable X) (hX0 : ∀ x, 0 ≤ X x) (A : ℝ) : 0 ≤ cappedTailMoment μ X A 1 ∧ cappedTailMoment μ X A 1 ≤ 1 := by let f := fun x => if A < X x then (min (X x) 1)^2 else 0 have hb (x) : 0 ≤ f x ∧ f x ≤ 1 := by have h0 := le_min (hX0 x) zero_le_one have h1 := min_le_right (X x) 1 dsimp [f] split_ifs <;> constructor <;> nlinarith have hm : Measurable f := Measurable.ite (measurableSet_lt measurable_const hX) ((hX.min measurable_const).pow_const 2) measurable_const have hi : Integrable f μ := (integrable_const (1:ℝ)).mono' hm.aestronglyMeasurable (Eventually.of_forall (fun x => by simpa only [Real.norm_eq_abs,abs_of_nonneg (hb x).1] using (hb x).2)) constructor · exact integral_nonneg (fun x => (hb x).1) · calc _ ≤ ∫ x, (1:ℝ) ∂μ := integral_mono hi (integrable_const _) (fun x => (hb x).2) _ = 1 := by simp
lemma limsup_cappedMoment_scale {Ω : Type*} [MeasurableSpace Ω] (μ : ℕ → Measure Ω) [∀ n, IsProbabilityMeasure (μ n)] (X : ℕ → Ω → ℝ) (hX : ∀ n, Measurable (X n)) (hX0 : ∀ n x, 0 ≤ X n x) {L : ℝ} (hL : 0 < L) : limsup (fun n => cappedMoment (μ n) (X n) L) atTop = L^2*limsup (fun n => cappedMoment (μ n) (fun x => X n x/L) 1) atTop := by simp only [cappedMoment_scale _ _ hL] apply limsup_nonneg_const_mul _ (sq_nonneg L) (fun n => (cappedMoment_unit_bounds (μ n) _ ((hX n).div_const L) (fun x => div_nonneg (hX0 n x) hL.le)).1) (fun n => (cappedMoment_unit_bounds (μ n) _ ((hX n).div_const L) (fun x => div_nonneg (hX0 n x) hL.le)).2)
lemma limsup_cappedTailMoment_scale {Ω : Type*} [MeasurableSpace Ω] (μ : ℕ → Measure Ω) [∀ n, IsProbabilityMeasure (μ n)] (X : ℕ → Ω → ℝ) (hX : ∀ n, Measurable (X n)) (hX0 : ∀ n x, 0 ≤ X n x) (A : ℝ) {L : ℝ} (hL : 0 < L) : limsup (fun n => cappedTailMoment (μ n) (X n) A L) atTop = L^2*limsup (fun n => cappedTailMoment (μ n) (fun x => X n x/L) (A/L) 1) atTop := by simp only [cappedTailMoment_scale _ _ _ hL] apply limsup_nonneg_const_mul _ (sq_nonneg L) (fun n => (cappedTailMoment_unit_bounds (μ n) _ ((hX n).div_const L) (fun x => div_nonneg (hX0 n x) hL.le) _).1) (fun n => (cappedTailMoment_unit_bounds (μ n) _ ((hX n).div_const L) (fun x => div_nonneg (hX0 n x) hL.le) _).2)
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topology Classicalnamespace DirectionalTransiencelemma cappedMoment_bounds {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : Ω → ℝ) (hX : Measurable X) (hX0 : ∀ x, 0 ≤ X x) {B : ℝ} (hB : 0 < B) : 0 ≤ cappedMoment μ X B ∧ cappedMoment μ X B ≤ B^2 := by rw [cappedMoment_scale μ X hB] have hh := cappedMoment_unit_bounds μ (fun x => X x/B) (hX.div_const B) (fun x => div_nonneg (hX0 x) hB.le) constructor · exact mul_nonneg (sq_nonneg B) hh.1 · simpa only [mul_one] using mul_le_mul_of_nonneg_left hh.2 (sq_nonneg B)
lemma cappedMoment_descaled {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) {r B : ℝ} (hr : 0 < r) : (∫ x, (min (X x) (B*r))^2 ∂μ)=r^2*cappedMoment μ (fun x => X x/r) B := by rw [cappedMoment,←integral_const_mul] congr 1 funext x have hh : min (X x) (B*r) = r*min (X x/r) B := by rw [mul_min_of_nonneg _ _ hr.le,mul_div_cancel₀ _ hr.ne',mul_comm r B] rw [hh] ringlemma cappedTailMoment_descaled {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → ℝ) {r A B : ℝ} (hr : 0 < r) : (∫ x, (if A*r < X x then (min (X x) (B*r))^2 else 0) ∂μ)= r^2*cappedTailMoment μ (fun x => X x/r) A B := by rw [cappedTailMoment,←integral_const_mul] congr 1 funext x simp only [lt_div_iff₀ hr] split_ifs · have hh : min (X x) (B*r) = r*min (X x/r) B := by rw [mul_min_of_nonneg _ _ hr.le,mul_div_cancel₀ _ hr.ne',mul_comm r B] rw [hh] ring · ringlemma cappedTailMoment_bounds {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : Ω → ℝ) (hX : Measurable X) (hX0 : ∀ x, 0 ≤ X x) (A : ℝ) {B : ℝ} (hB : 0 < B) : 0 ≤ cappedTailMoment μ X A B ∧ cappedTailMoment μ X A B ≤ B^2 := by rw [cappedTailMoment_scale μ X A hB] have hh := cappedTailMoment_unit_bounds μ (fun x => X x/B) (hX.div_const B) (fun x => div_nonneg (hX0 x) hB.le) (A/B) constructor · exact mul_nonneg (sq_nonneg B) hh.1 · simpa only [mul_one] using mul_le_mul_of_nonneg_left hh.2 (sq_nonneg B)end DirectionalTransience
end
end
end OAI12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788import Mathlibimport OAI.Probability.Ballisticity.Estimates.RapidDecay
namespace OAI
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topology BigOperatorsnamespace DirectionalTransience
lemma natural_integrable_of_coarse_tail {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℕ) (hf : Measurable f) (T : ℕ → ℕ) (hT : ∀ k, ∃ n, k ≤ T n) (hs : Summable (fun n => (T (n+1):ℝ)*μ.real {x | T n < f x})) : Integrable (fun x => (f x:ℝ)) μ := by let F : ℕ → Ω → ℝ≥0∞ := fun n => {x | T n < f x}.indicator (fun _ => (T (n+1):ℝ≥0∞)) have hE (n : ℕ) : MeasurableSet {x | T n < f x} := measurableSet_lt measurable_const hf have hF (n : ℕ) : Measurable (F n) := measurable_const.indicator (hE n) have hpoint (x : Ω) : (f x:ℝ≥0∞) ≤ (T 0:ℝ≥0∞)+∑' n,F n x := by by_cases hh : f x ≤ T 0 · exact (by exact_mod_cast hh : (f x:ℝ≥0∞) ≤ T 0).trans (le_add_right le_rfl) · have hex := hT (f x) have hb := Nat.find_spec hex cases hk : Nat.find hex with | zero => exact (hh (hk ▸ hb)).elim | succ n => have hlo : T n < f x := Nat.lt_of_not_ge (Nat.find_min hex (by omega : n < Nat.find hex)) have hterm : F n x=(T (n+1):ℝ≥0∞) := Set.indicator_of_mem (show x ∈ {x | T n < f x} from hlo) _ calc _ ≤ (T (n+1):ℝ≥0∞) := by exact_mod_cast (show f x ≤ T (n+1) by simpa only [hk] using hb) _ = F n x := hterm.symm _ ≤ ∑' i,F i x := ENNReal.le_tsum (f := fun index => F index x) n _ ≤ _ := le_add_left le_rfl have hIf (n : ℕ) : (∫⁻ x,F n x ∂μ) = (T (n+1):ℝ≥0∞)*μ {x | T n < f x} := by dsimp only [F] rw [lintegral_indicator (hE n),lintegral_const,Measure.restrict_apply_univ] have hfinite : (∑' n,(T (n+1):ℝ≥0∞)*μ {x | T n < f x}) < ⊤ := by have he (n : ℕ) : (T (n+1):ℝ≥0∞)*μ {x | T n < f x} = ENNReal.ofReal ((T (n+1):ℝ)*μ.real {x | T n < f x}) := by rw [ENNReal.ofReal_mul (Nat.cast_nonneg _),ENNReal.ofReal_natCast,measureReal_def, ENNReal.ofReal_toReal (measure_ne_top _ _)] simp_rw [he] rw [← ENNReal.ofReal_tsum_of_nonneg (fun n => mul_nonneg (Nat.cast_nonneg _) measureReal_nonneg) hs] exact ENNReal.ofReal_lt_top refine ⟨((measurable_of_countable (fun n : ℕ => (n:ℝ))).comp hf).aestronglyMeasurable, (hasFiniteIntegral_iff_ofReal (Eventually.of_forall (fun x => Nat.cast_nonneg (f x)))).mpr ?_⟩ calc (∫⁻ x,ENNReal.ofReal (f x:ℝ) ∂μ) ≤ ∫⁻ x,(T 0:ℝ≥0∞)+∑' n,F n x ∂μ := lintegral_mono (fun x => by simpa only [ENNReal.ofReal_natCast] using hpoint x) _ = (T 0:ℝ≥0∞)+∑' n,(T (n+1):ℝ≥0∞)*μ {x | T n < f x} := by rw [lintegral_add_left measurable_const,lintegral_const,measure_univ,mul_one, lintegral_tsum (fun n => (hF n).aemeasurable)] simp_rw [hIf] _ < ⊤ := ENNReal.add_lt_top.mpr ⟨ENNReal.natCast_lt_top _,hfinite⟩
lemma natural_integrable_of_polynomial_rapid_tail {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℕ) (hf : Measurable f) (A q : ℕ) (hA : 0 < A) (hq : 0 < q) (ht : RapidDecay (fun n => μ.real {x | A*(n+1)^q < f x})) : Integrable (fun x => (f x:ℝ)) μ := by apply natural_integrable_of_coarse_tail μ f hf (fun n => A*(n+1)^q) · intro k refine ⟨k,?_⟩ have hpow : k+1 ≤ (k+1)^q := by obtain ⟨q,rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hq) rw [pow_succ] have hp : 1 ≤ (k+1)^q := Nat.one_le_pow _ _ (by omega) nlinarith nlinarith · have hs := (ht q).mul_left ((A:ℝ)*2^q) apply hs.of_norm_bounded intro n rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (Nat.cast_nonneg _) measureReal_nonneg)] have hbound : (A*(n+1+1)^q:ℕ) ≤ (A:ℝ)*2^q*(n+1:ℝ)^q := by push_cast calc _ ≤ (A:ℝ)*(2*(n+1:ℝ))^q := mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) (by linarith [Nat.cast_nonneg (α := ℝ) n]) _) (Nat.cast_nonneg _) _ = _ := by rw [mul_pow,mul_assoc] simpa only [mul_assoc] using mul_le_mul_of_nonneg_right hbound (show 0 ≤ μ.real {x | A*(n+1)^q < f x} from measureReal_nonneg)
end DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272import Mathlibimport OAI.Probability.Ballisticity.Geometry.SignedHeightimport OAI.Probability.Ballisticity.Estimates.WeightedConditioned
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma noDropFinite_lower_rows {d : ℕ} (e : Direction d) (y : Lattice d) (hy : signedHeight e y = 0) (J : ℕ) : @Measurable _ _ (rowSigma {z | dot (realPosition z) (realPosition (step e)) ≤ (J:ℝ)}) _ (noDropFinite (realPosition (step e)) y J) := by apply (noDropFinite_measurable_ball _ y J).mono (rowSigma_mono ?_) le_rfl intro z hz change dot (realPosition z) (realPosition (step e)) ≤ (J:ℝ) rw [signedHeight_projection] have hh := abs_le.mp (hz e.1) have hc : signedHeight e z ≤ (J:ℤ) := by simp only [signedHeight] at hy ⊢ cases he : e.2 <;> simp only [he,Bool.false_eq_true,ite_false,ite_true] at hy ⊢ <;> omega exact_mod_cast hc
noncomputable def noDropApproxError {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (J : ℕ) : ℝ≥0∞ := ∫⁻ ω, noDropFinite ℓ 0 J ω-noDropQuenched ℓ 0 ω ∂environmentLaw ν
lemma noDropApproxError_translation {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (y : Lattice d) (J : ℕ) : (∫⁻ ω, noDropFinite ℓ y J ω-noDropQuenched ℓ y ω ∂environmentLaw ν) = noDropApproxError ν ℓ J := by simp_rw [noDropFinite_translation ℓ _ y J,noDropQuenched_translation ℓ _ y] have hh := lintegral_map ((noDropFinite_measurable ℓ 0 J).sub (measurable_noDropQuenched ℓ 0)) (show Measurable (fun ω : Environment d => fun a => ω (y+a)) by fun_prop) (μ := environmentLaw ν) rw [environment_translation] at hh exact hh.symm
lemma noDropApproxError_le_one {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (J : ℕ) : noDropApproxError ν ℓ J ≤ 1 := by calc _ ≤ ∫⁻ _ω, (1 : ℝ≥0∞) ∂environmentLaw ν := lintegral_mono (fun _ => tsub_le_self.trans prob_le_one) _ = 1 := by simp
lemma noDropApproxError_tendsto {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) : Tendsto (noDropApproxError ν ℓ) atTop (𝓝 0) := by have h := tendsto_lintegral_of_dominated_convergence (μ := environmentLaw ν) (f := fun _ => (0 : ℝ≥0∞)) (fun _ => (1 : ℝ≥0∞)) (fun J => (noDropFinite_measurable ℓ 0 J).sub (measurable_noDropQuenched ℓ 0)) (fun _ => ae_of_all _ (fun _ => tsub_le_self.trans prob_le_one)) (by simp) (ae_of_all _ (fun ω => ?_)) · change Tendsto (fun J => ∫⁻ ω, noDropFinite ℓ 0 J ω-noDropQuenched ℓ 0 ω ∂environmentLaw ν) atTop (𝓝 0) simpa only [lintegral_zero,Pi.sub_apply] using h · have ht := ENNReal.Tendsto.sub (noDropFinite_tendsto ℓ 0 ω) (tendsto_const_nhds : Tendsto (fun _ : ℕ => noDropQuenched ℓ 0 ω) atTop (𝓝 (noDropQuenched ℓ 0 ω))) (Or.inl (measure_ne_top _ _)) simpa only [Pi.sub_apply,tsub_self] using ht
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma normalizedMeasure_upper_le {Ω : Type*} [MeasurableSpace Ω] (μ η : Measure Ω) (hμη : μ ≤ η) (δ c : ℝ≥0∞) (hc : c ≤ μ Set.univ) (A : Set Ω) (hA : η A ≤ μ A+δ) : normalizedMeasure η A ≤ normalizedMeasure μ A+c⁻¹*δ := by change (η Set.univ)⁻¹*η A ≤ (μ Set.univ)⁻¹*μ A+c⁻¹*δ calc _ ≤ (μ Set.univ)⁻¹*η A := mul_le_mul_left (ENNReal.inv_le_inv.mpr (hμη Set.univ)) _ _ ≤ (μ Set.univ)⁻¹*(μ A+δ) := mul_le_mul_right hA _ _ = (μ Set.univ)⁻¹*μ A+(μ Set.univ)⁻¹*δ := mul_add _ _ _ _ ≤ (μ Set.univ)⁻¹*μ A+c⁻¹*δ := add_le_add le_rfl (mul_le_mul_left (ENNReal.inv_le_inv.mpr hc) δ)
lemma levyProkhorov_normalized_map_le {Ω E : Type*} [MeasurableSpace Ω] [MetricSpace E] [MeasurableSpace E] [BorelSpace E] (μ η : Measure Ω) [IsFiniteMeasure μ] [IsFiniteMeasure η] (hμη : μ ≤ η) (δ c : ℝ≥0∞) (hc : 0 < c) (hδ : δ ≠ ⊤) (hcmass : c ≤ μ Set.univ) (hbound : ∀ A, MeasurableSet A → η A ≤ μ A+δ) (F : Ω → E) (hF : Measurable F) : levyProkhorovDist ((normalizedMeasure η).map F) ((normalizedMeasure μ).map F) ≤ (c⁻¹*δ).toReal := by let : IsProbabilityMeasure (normalizedMeasure μ) := normalizedMeasure_probability μ (ne_of_gt (hc.trans_le hcmass)) let : IsProbabilityMeasure (normalizedMeasure η) := normalizedMeasure_probability η (ne_of_gt (hc.trans_le (hcmass.trans (hμη Set.univ)))) let : IsProbabilityMeasure ((normalizedMeasure μ).map F) := inferInstance let : IsProbabilityMeasure ((normalizedMeasure η).map F) := inferInstance apply levyProkhorovDist_le_of_forall_le _ _ ENNReal.toReal_nonneg intro ε B hε hB rw [Measure.map_apply hF hB] have hb := normalizedMeasure_upper_le μ η hμη δ c hcmass (F ⁻¹' B) (hbound _ (hB.preimage hF)) have he : c⁻¹*δ ≤ ENNReal.ofReal ε := by rw [← ENNReal.ofReal_toReal (ENNReal.mul_ne_top (ENNReal.inv_ne_top.mpr hc.ne') hδ)] exact ENNReal.ofReal_le_ofReal hε.le have hBsub : (normalizedMeasure μ) (F ⁻¹' B) ≤ ((normalizedMeasure μ).map F) (Metric.thickening ε B) := by rw [Measure.map_apply hF Metric.isOpen_thickening.measurableSet] exact measure_mono (Set.preimage_mono (Metric.self_subset_thickening (ENNReal.toReal_nonneg.trans_lt hε) B)) exact hb.trans (add_le_add hBsub he)
lemma weak_limit_of_uniform_approximation {E : Type*} [MetricSpace E] [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E] (μ : ℕ → ProbabilityMeasure E) (η : ℕ → ℕ → ProbabilityMeasure E) (W : ProbabilityMeasure E) (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0)) (hlim : ∀ J, Tendsto (η J) atTop (𝓝 W)) (hclose : ∀ J i, levyProkhorovDist (μ i : Measure E) (η J i : Measure E) ≤ δ J) : Tendsto μ atTop (𝓝 W) := by have hW : Tendsto (fun i => LevyProkhorov.ofMeasure (μ i)) atTop (𝓝 (LevyProkhorov.ofMeasure W)) := by apply Metric.tendsto_nhds.2 intro ε hε obtain ⟨J,hJ⟩ := (hδ.eventually_lt_const (half_pos hε)).exists have hη := LevyProkhorov.continuous_ofMeasure_probabilityMeasure.tendsto W |>.comp (hlim J) filter_upwards [(Metric.tendsto_nhds.mp hη) (ε/2) (half_pos hε)] with i hi exact (dist_triangle _ (LevyProkhorov.ofMeasure (η J i)) _).trans_lt (by have hc := hclose J i dsimp only [Function.comp_apply] at hi change dist (LevyProkhorov.ofMeasure (μ i)) (LevyProkhorov.ofMeasure (η J i)) ≤ δ J at hc linarith) exact LevyProkhorov.continuous_toMeasure_probabilityMeasure.tendsto (LevyProkhorov.ofMeasure W) |>.comp hW
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma weightedConditioned_apply {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (g : Environment d → ℝ≥0∞) (hg : Measurable g) (A : Set (Path d)) (hA : MeasurableSet A) : weightedConditioned ν ℓ g A = (annealedLaw ν (NoDrop ℓ 0))⁻¹ * ∫⁻ ω, g ω * quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0) ∂environmentLaw ν := by rw [weightedConditioned,Measure.smul_apply,Measure.restrict_apply hA, weightedAnnealed_apply ν g hg _ (hA.inter (measurableSet_noDrop ℓ 0))] rfl
lemma weightedConditioned_mono {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (g h : Environment d → ℝ≥0∞) (hg : Measurable g) (hh : Measurable h) (hgh : ∀ ω, g ω ≤ h ω) : weightedConditioned ν ℓ g ≤ weightedConditioned ν ℓ h := by apply Measure.le_iff.mpr intro A hA rw [weightedConditioned_apply ν ℓ g hg A hA,weightedConditioned_apply ν ℓ h hh A hA] exact mul_le_mul_right (lintegral_mono (fun ω => mul_le_mul_left (hgh ω) _)) _
lemma weightedConditioned_approx {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (g h : Environment d → ℝ≥0∞) (hg : Measurable g) (hh : Measurable h) (hgh : ∀ ω, g ω ≤ h ω) (A : Set (Path d)) (hA : MeasurableSet A) : weightedConditioned ν ℓ h A ≤ weightedConditioned ν ℓ g A+ (annealedLaw ν (NoDrop ℓ 0))⁻¹ * ∫⁻ ω, h ω-g ω ∂environmentLaw ν := by rw [weightedConditioned_apply ν ℓ g hg A hA,weightedConditioned_apply ν ℓ h hh A hA,← mul_add] apply mul_le_mul_right have hQ : Measurable (fun ω : Environment d => quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0)) := (Kernel.measurable_coe _ (hA.inter (measurableSet_noDrop ℓ 0))).comp (measurable_id.prodMk measurable_const) rw [← lintegral_add_left (show Measurable (fun ω => g ω * quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0)) from hg.mul hQ) (fun ω => h ω-g ω)] apply lintegral_mono intro ω calc _ = (g ω+(h ω-g ω))*quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0) := by rw [add_tsub_cancel_of_le (hgh ω)] _ = g ω*quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0)+ (h ω-g ω)*quenchedKernel (ω,0) (A ∩ NoDrop ℓ 0) := add_mul _ _ _ _ ≤ _ := add_le_add le_rfl (mul_le_of_le_one_right' prob_le_one)
lemma weightedConditioned_noDrop_mass {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (y : Lattice d) : weightedConditioned ν ℓ (noDropQuenched ℓ y) Set.univ = (annealedLaw ν (NoDrop ℓ 0))⁻¹ * sharedNoDropMass ν ℓ 0 y := by rw [weightedConditioned_apply ν ℓ _ (measurable_noDropQuenched ℓ y) _ MeasurableSet.univ] simp only [Set.univ_inter,sharedNoDropMass,noDropQuenched] congr 1 apply lintegral_congr intro ω exact mul_comm _ _
lemma weightedConditioned_noDrop_approx {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (y : Lattice d) (J : ℕ) (A : Set (Path d)) (hA : MeasurableSet A) : weightedConditioned ν ℓ (noDropFinite ℓ y J) A ≤ weightedConditioned ν ℓ (noDropQuenched ℓ y) A+ (annealedLaw ν (NoDrop ℓ 0))⁻¹ * noDropApproxError ν ℓ J := by simpa only [noDropApproxError_translation ν ℓ y J] using weightedConditioned_approx ν ℓ _ _ (measurable_noDropQuenched ℓ y) (noDropFinite_measurable ℓ y J) (fun ω => noDropQuenched_le_finite ℓ y ω J) A hA
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159import Mathlibimport OAI.Probability.Ballisticity.Estimates.SymmetricPrefixTail
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransiencelemma iid_fluctuation_not_collapse {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ j, Measurable (X j)) (hind : iIndepFun X μ) (hid : ∀ j, IdentDistrib (X j) (X 0) μ μ) (hsym : IdentDistrib (X 0) (fun ω => -X 0 ω) μ μ) (hI : Integrable (X 0) μ) (hne : 0 < μ {ω | X 0 ω ≠ 0}) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) (k : ℕ → ℕ) {τ : ℝ} (hτ : 0 < τ) (hk : Tendsto (fun i => (k i:ℝ)/fluctuationScale μ (X 0) (r i)) atTop (𝓝 τ)) (hcollapse : TendstoInMeasure μ (fun i ω => realPartialSum (fun j => X j ω) (k i)/r i) atTop 0) : False := by have hg := gaussian_sequence_of_collapsed_sums μ X hX hind hid hsym hI hne r hr k hτ hk (fun a ha => ?_) · have hcf := gaussian_charFun_power_limit_count μ (X 0) (hX 0) hI hne hsym r hg k hk 1 have hd := hcollapse.tendstoInDistribution (fun i => by unfold realPartialSum; fun_prop) have hc := ProbabilityMeasure.tendsto_iff_tendsto_charFun.1 hd.tendsto 1 change Tendsto (fun i => charFun (μ.map (fun ω => realPartialSum (fun j => X j ω) (k i)/r i)) 1) atTop (𝓝 (charFun (μ.map (fun _ : Ω => (0:ℝ))) 1)) at hc simp only [charFun_div_partialSum μ X hind hid,Measure.map_const,measure_univ,one_smul, charFun_dirac,inner_zero_left,Complex.ofReal_zero,zero_mul,Complex.exp_zero] at hc have he := tendsto_nhds_unique hcf hc have he' := congrArg Complex.re he simp only [one_pow,mul_one,←Complex.ofReal_neg,←Complex.ofReal_exp,Complex.ofReal_re,Complex.one_re] at he' have hh : Real.exp (-(τ/2)) < 1 := Real.exp_lt_one_iff.mpr (by linarith) exact hh.ne he' · have hc := tendstoInMeasure_iff_measureReal_norm.mp hcollapse a ha simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] at hc apply squeeze_zero' (Eventually.of_forall fun _ => measureReal_nonneg) _ hc filter_upwards [hr.eventually (eventually_gt_atTop (0:ℝ))] with i hi refine measureReal_mono ?_ (measure_ne_top _ _) intro ω hω change a*r i < |realPartialSum (fun j => X j ω) (k i)| at hω change a ≤ |realPartialSum (fun j => X j ω) (k i)/r i| rw [abs_div,abs_of_pos hi,le_div_iff₀ hi] exact hω.leend DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransiencelemma double_floor_ratio (n : ℕ → ℝ) (hn : Tendsto n atTop atTop) {c : ℝ} (hc : 0 < c) : Tendsto (fun i => (⌊(⌊n i⌋₊:ℝ)/c⌋₊:ℝ)/n i) atTop (𝓝 (1/c)) := by have hH : Tendsto (fun i => (⌊n i⌋₊:ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp (tendsto_nat_floor_atTop.comp hn) have hin : Tendsto (fun i => (⌊n i⌋₊:ℝ)/n i) atTop (𝓝 1) := by simpa only [one_mul,Function.comp_def] using (tendsto_nat_floor_mul_div_atTop (show (0:ℝ)≤1 by norm_num)).comp hn have hout : Tendsto (fun i => (⌊(⌊n i⌋₊:ℝ)/c⌋₊:ℝ)/(⌊n i⌋₊:ℝ)) atTop (𝓝 (1/c)) := by simpa only [Function.comp_def,one_div,one_mul,mul_comm c⁻¹,div_eq_mul_inv] using (tendsto_nat_floor_mul_div_atTop (show 0 ≤ 1/c by positivity)).comp hH have hh := hout.mul hin simp only [mul_one] at hh apply hh.congr' filter_upwards [hH.eventually (eventually_gt_atTop (0:ℝ))] with i hi exact div_mul_div_cancel₀ (ne_of_gt hi)lemma inMeasure_sub_zero {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (F G : ℕ → Ω → ℝ) (hF : TendstoInMeasure μ F atTop 0) (hG : TendstoInMeasure μ G atTop 0) : TendstoInMeasure μ (fun i ω => F i ω-G i ω) atTop 0 := by apply tendstoInMeasure_iff_measureReal_norm.2 intro ε hε have hf := tendstoInMeasure_iff_measureReal_norm.mp hF (ε/2) (by positivity) have hg := tendstoInMeasure_iff_measureReal_norm.mp hG (ε/2) (by positivity) simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] at hf hg ⊢ apply squeeze_zero (fun i => measureReal_nonneg) _ (by simpa only [add_zero] using hf.add hg) intro i apply (measureReal_mono (μ := μ) _).trans (measureReal_union_le _ _) intro ω hω change ε ≤ |F i ω-G i ω| at hω change ε/2 ≤ |F i ω| ∨ ε/2 ≤ |G i ω| by_contra! hn have hh := norm_sub_le (F i ω) (G i ω) simp only [Real.norm_eq_abs] at hh linarithend DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filter Setopen scoped ENNReal NNReal Topologynamespace DirectionalTransience
noncomputable def dyadicCut (j : ℕ) : ℝ := (1/2)^jlemma dyadicCut_pos (j : ℕ) : 0 < dyadicCut j := pow_pos (by norm_num) _lemma dyadicCut_le_one (j : ℕ) : dyadicCut j ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num)lemma dyadicCut_antitone : Antitone dyadicCut := by intro i j hij exact pow_le_pow_of_le_one (by norm_num) (by norm_num) hijlemma dyadicCut_tendsto : Tendsto dyadicCut atTop (𝓝 0) := by exact tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num)
lemma variance_ratio_unit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {x | S x ≠ 0}) {r a : ℝ} (hr : 0 < r) (ha : 0 ≤ a) (ha1 : a ≤ 1) : truncatedVariance μ S (a*r)/truncatedVariance μ S r ∈ Icc (0:ℝ) 1 := by have hp := truncatedVariance_pos μ S hS hne hr constructor · exact div_nonneg (truncatedVariance_nonneg _ _ _) hp.le · rw [div_le_one hp] apply truncatedVariance_mono μ S hS (mul_nonneg ha hr.le) nlinarith
lemma exists_dyadic_variance_profile {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (S : Ω → ℝ) (hS : Measurable S) (hne : 0 < μ {x | S x ≠ 0}) (r : ℕ → ℝ) (hr : ∀ n, 0 < r n) : ∃ (ns : ℕ → ℕ) (F : ℕ → ℝ) (F₀ : ℝ), StrictMono ns ∧ (∀ j, Tendsto (fun n => truncatedVariance μ S (dyadicCut j*r (ns n))/truncatedVariance μ S (r (ns n))) atTop (𝓝 (F j))) ∧ (∀ j, F j ∈ Icc (0:ℝ) 1) ∧ F 0 = 1 ∧ Antitone F ∧ F₀ ∈ Icc (0:ℝ) 1 ∧ Tendsto F atTop (𝓝 F₀) ∧ (∀ j, F₀ ≤ F j) := by let R : ℕ → ℕ → Icc (0:ℝ) 1 := fun n j => ⟨truncatedVariance μ S (dyadicCut j*r n)/truncatedVariance μ S (r n), variance_ratio_unit μ S hS hne (hr n) (dyadicCut_pos j).le (dyadicCut_le_one j)⟩ obtain ⟨f,ns,hns,hlim⟩ := CompactSpace.tendsto_subseq R let F := fun j => (f j:ℝ) have hF (j) : Tendsto (fun n => truncatedVariance μ S (dyadicCut j*r (ns n))/truncatedVariance μ S (r (ns n))) atTop (𝓝 (F j)) := continuous_subtype_val.continuousAt.tendsto.comp ((tendsto_pi_nhds.mp hlim) j) have hbounds (j) : F j ∈ Icc (0:ℝ) 1 := (f j).property have hFone : F 0 = 1 := by have heq : (fun n => truncatedVariance μ S (dyadicCut 0*r (ns n))/truncatedVariance μ S (r (ns n))) = fun _ => (1:ℝ) := by funext n simp only [dyadicCut,pow_zero,one_mul] exact div_self (ne_of_gt (truncatedVariance_pos μ S hS hne (hr (ns n)))) exact tendsto_nhds_unique (heq ▸ hF 0) tendsto_const_nhds have hanti : Antitone F := by intro i j hij apply le_of_tendsto_of_tendsto (hF j) (hF i) exact Eventually.of_forall fun n => div_le_div_of_nonneg_right (truncatedVariance_mono μ S hS (mul_nonneg (dyadicCut_pos j).le (hr (ns n)).le) (mul_le_mul_of_nonneg_right (dyadicCut_antitone hij) (hr (ns n)).le)) (truncatedVariance_nonneg μ S _) have hb : BddBelow (range F) := ⟨0,fun x ⟨j,hj⟩ => hj ▸ (hbounds j).1⟩ have hlimF : Tendsto F atTop (𝓝 (⨅ j, F j)) := tendsto_atTop_ciInf hanti hb have hinf0 : 0 ≤ ⨅ j, F j := le_ciInf (fun j => (hbounds j).1) have hinfj (j) : (⨅ i, F i) ≤ F j := ciInf_le hb j exact ⟨ns,F,⨅ j, F j,hns,hF,hbounds,hFone,hanti,⟨hinf0,(hinfj 0).trans (hbounds 0).2⟩,hlimF,hinfj⟩
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229import Mathlibimport OAI.Probability.Ballisticity.Estimates.CharacteristicTaylor
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
noncomputable def pairLinearIncrement (a b : ℝ) (s t : unitInterval) : C(RealPathPair,ℝ) := ⟨fun P => a*pairPathIncrement false s t P+b*pairPathIncrement true s t P,by fun_prop⟩
lemma normalJointPast_linear_mean_integrable {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : Integrable (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)) μ := by have hx := normalJointPast_complex_weighted_moment_integrable (k := 1) μ c h v s t hst ht false F have hy := normalJointPast_complex_weighted_moment_integrable (k := 1) μ c h v s t hst ht true F simp only [pow_one] at hx hy have hid : (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ))= (fun P => (a:ℂ)*(F (pairPastCoordinates v P)*(pairPathIncrement false s t P:ℂ))+ (b:ℂ)*(F (pairPastCoordinates v P)*(pairPathIncrement true s t P:ℂ))) := by funext P simp only [pairLinearIncrement,ContinuousMap.coe_mk,Complex.ofReal_add,Complex.ofReal_mul] ring rw [hid] exact (hx.const_mul (a:ℂ)).add (hy.const_mul (b:ℂ))
lemma normalJointPast_linear_mean {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : (∫ P, F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ) ∂μ)=0 := by have hx := normalJointPast_complex_weighted_moment_integrable (k := 1) μ c h v s t hst ht false F have hy := normalJointPast_complex_weighted_moment_integrable (k := 1) μ c h v s t hst ht true F simp only [pow_one] at hx hy have hid : (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ))= (fun P => (a:ℂ)*(F (pairPastCoordinates v P)*(pairPathIncrement false s t P:ℂ))+ (b:ℂ)*(F (pairPastCoordinates v P)*(pairPathIncrement true s t P:ℂ))) := by funext P simp only [pairLinearIncrement,ContinuousMap.coe_mk,Complex.ofReal_add,Complex.ofReal_mul] ring rw [hid,integral_add (hx.const_mul _) (hy.const_mul _),integral_const_mul,integral_const_mul, normalJointPast_complex_mean μ c h v s t hv hst ht false, normalJointPast_complex_mean μ c h v s t hv hst ht true] simp
lemma normalJointPast_linear_second_integrable {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : Integrable (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2) μ := by have hx := normalJointPast_complex_weighted_moment_integrable (k := 2) μ c h v s t hst ht false F have hy := normalJointPast_complex_weighted_moment_integrable (k := 2) μ c h v s t hst ht true F have hxy := normalJointPast_complex_cross_integrable μ c h v s t hst ht F have hid : (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2)= (fun P => (a:ℂ)^2*(F (pairPastCoordinates v P)*(pairPathIncrement false s t P:ℂ)^2)+ (b:ℂ)^2*(F (pairPastCoordinates v P)*(pairPathIncrement true s t P:ℂ)^2)+ 2*(a:ℂ)*b*(F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ))) := by funext P simp only [pairLinearIncrement,ContinuousMap.coe_mk,Complex.ofReal_add,Complex.ofReal_mul] ring rw [hid] exact ((hx.const_mul ((a:ℂ)^2)).add (hy.const_mul ((b:ℂ)^2))).add (hxy.const_mul (2*(a:ℂ)*b))
lemma normalJointPast_linear_second {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : (∫ P, F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2 ∂μ)= (((c:ℝ)*((t:ℝ)-s)*(a^2+b^2):ℝ):ℂ)*(∫ P, F (pairPastCoordinates v P) ∂μ)+ 2*(a:ℂ)*b*(∫ P, F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ) ∂μ) := by have hx := normalJointPast_complex_weighted_moment_integrable (k := 2) μ c h v s t hst ht false F have hy := normalJointPast_complex_weighted_moment_integrable (k := 2) μ c h v s t hst ht true F have hxy := normalJointPast_complex_cross_integrable μ c h v s t hst ht F have hid : (fun P => F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2)= (fun P => (a:ℂ)^2*(F (pairPastCoordinates v P)*(pairPathIncrement false s t P:ℂ)^2)+ (b:ℂ)^2*(F (pairPastCoordinates v P)*(pairPathIncrement true s t P:ℂ)^2)+ 2*(a:ℂ)*b*(F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ))) := by funext P simp only [pairLinearIncrement,ContinuousMap.coe_mk,Complex.ofReal_add,Complex.ofReal_mul] ring have hadd := integral_add ((hx.const_mul ((a:ℂ)^2)).add (hy.const_mul ((b:ℂ)^2))) (hxy.const_mul (2*(a:ℂ)*b)) simp only [Pi.add_apply] at hadd rw [hid,hadd, integral_add (hx.const_mul ((a:ℂ)^2)) (hy.const_mul ((b:ℂ)^2)),integral_const_mul,integral_const_mul,integral_const_mul, normalJointPast_complex_second μ c h v s t hv hst ht false, normalJointPast_complex_second μ c h v s t hv hst ht true] push_cast ring
lemma normalJointPast_linear_absolute_third_bound (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (s t : unitInterval) (hst : s < t) (ht : (t:ℝ) < 1) (a b : ℝ) : Integrable (fun P => |pairLinearIncrement a b s t P|^3) μ ∧ (∫ P, |pairLinearIncrement a b s t P|^3 ∂μ) ≤ 8*(|a|+|b|)^3*(Real.sqrt ((c:ℝ)*((t:ℝ)-s)))^3*normalThirdMoment := by have hx := normalJointPast_integrable_abs_pow μ c h s t hst ht false 3 have hy := normalJointPast_integrable_abs_pow μ c h s t hst ht true 3 have hi := (hx.add hy).const_mul (4*(|a|+|b|)^3) have hb : ∀ P, |pairLinearIncrement a b s t P|^3 ≤ 4*(|a|+|b|)^3*(|pairPathIncrement false s t P|^3+|pairPathIncrement true s t P|^3) := by intro P exact abs_linear_cube_bound a b _ _ have hI : Integrable (fun P => |pairLinearIncrement a b s t P|^3) μ := hi.mono (by fun_prop) (by filter_upwards [] with P change ‖|(pairLinearIncrement a b s t) P|^3‖ ≤ ‖4*(|a|+|b|)^3*(|pairPathIncrement false s t P|^3+|pairPathIncrement true s t P|^3)‖ simp only [norm_pow,Real.norm_eq_abs,abs_abs] exact (hb P).trans (le_abs_self _)) refine ⟨hI,?_⟩ calc _ ≤ ∫ P, 4*(|a|+|b|)^3*(|pairPathIncrement false s t P|^3+|pairPathIncrement true s t P|^3) ∂μ := integral_mono hI hi hb _ = _ := by rw [integral_const_mul,integral_add hx hy, normalJointPast_absolute_third_moment μ c h s t hst ht false, normalJointPast_absolute_third_moment μ c h s t hst ht true] ring
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
lemma pairPastTest_integrable {q : ℕ} (μ : Measure RealPathPair) [IsFiniteMeasure μ] (v : Fin q → unitInterval) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) : Integrable (fun P => F (pairPastCoordinates v P)) μ := by apply Integrable.of_bound (by fun_prop) ‖F‖ filter_upwards [] with P exact F.norm_coe_le_norm _
lemma pairPastPhase_integrable {q : ℕ} (μ : Measure RealPathPair) [IsFiniteMeasure μ] (v : Fin q → unitInterval) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) (s t : unitInterval) : Integrable (fun P => F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P)) μ := by apply Integrable.of_bound (by unfold charPhase; fun_prop) ‖F‖ filter_upwards [] with P rw [norm_mul,charPhase_norm,mul_one] exact F.norm_coe_le_norm _
lemma normalJointPast_integral_quadratic {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : (∫ P, F (pairPastCoordinates v P)*(1+(pairLinearIncrement a b s t P:ℂ)*Complex.I- (pairLinearIncrement a b s t P:ℂ)^2/2) ∂μ)= (1-(((c:ℝ)*((t:ℝ)-s)*(a^2+b^2)/2:ℝ):ℂ))*(∫ P, F (pairPastCoordinates v P) ∂μ)- (a:ℂ)*b*(∫ P, F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ) ∂μ) := by have h0 := pairPastTest_integrable μ v F have h1 := normalJointPast_linear_mean_integrable μ c h v s t hst ht F a b have h2 := normalJointPast_linear_second_integrable μ c h v s t hst ht F a b have hid : (fun P => F (pairPastCoordinates v P)*(1+(pairLinearIncrement a b s t P:ℂ)*Complex.I- (pairLinearIncrement a b s t P:ℂ)^2/2))= (fun P => F (pairPastCoordinates v P)+ Complex.I*(F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ))- (1/2:ℂ)*(F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2)) := by funext P; ring have hadd := integral_sub (h0.add (h1.const_mul Complex.I)) (h2.const_mul (1/2:ℂ)) simp only [Pi.add_apply] at hadd rw [hid,hadd,integral_add h0 (h1.const_mul Complex.I),integral_const_mul,integral_const_mul, normalJointPast_linear_mean μ c h v s t hv hst ht F a b, normalJointPast_linear_second μ c h v s t hv hst ht F a b] push_cast ring
lemma normalJointPast_taylor_error {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- ((1-(((c:ℝ)*((t:ℝ)-s)*(a^2+b^2)/2:ℝ):ℂ))*(∫ P, F (pairPastCoordinates v P) ∂μ)- (a:ℂ)*b*(∫ P, F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ) ∂μ))‖ ≤ 8*charTaylorConstant*‖F‖*(|a|+|b|)^3* (Real.sqrt ((c:ℝ)*((t:ℝ)-s)))^3*normalThirdMoment := by have h0 := pairPastTest_integrable μ v F have h1 := normalJointPast_linear_mean_integrable μ c h v s t hst ht F a b have h2 := normalJointPast_linear_second_integrable μ c h v s t hst ht F a b have hchar := pairPastPhase_integrable μ v F a b s t have hQ : Integrable (fun P => F (pairPastCoordinates v P)*(1+(pairLinearIncrement a b s t P:ℂ)*Complex.I- (pairLinearIncrement a b s t P:ℂ)^2/2)) μ := by have hid : (fun P => F (pairPastCoordinates v P)*(1+(pairLinearIncrement a b s t P:ℂ)*Complex.I- (pairLinearIncrement a b s t P:ℂ)^2/2))= (fun P => F (pairPastCoordinates v P)+ Complex.I*(F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ))- (1/2:ℂ)*(F (pairPastCoordinates v P)*(pairLinearIncrement a b s t P:ℂ)^2)) := by funext P; ring rw [hid] exact (h0.add (h1.const_mul Complex.I)).sub (h2.const_mul (1/2:ℂ)) rw [← normalJointPast_integral_quadratic μ c h v s t hv hst ht F a b,← integral_sub hchar hQ] have h3 := normalJointPast_linear_absolute_third_bound μ c h s t hst ht a b have hb : ∀ P, ‖F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P)- F (pairPastCoordinates v P)*(1+(pairLinearIncrement a b s t P:ℂ)*Complex.I- (pairLinearIncrement a b s t P:ℂ)^2/2)‖ ≤ ‖F‖*charTaylorConstant*|pairLinearIncrement a b s t P|^3 := by intro P rw [← mul_sub,norm_mul] exact (mul_le_mul (F.norm_coe_le_norm _) (charPhase_quadratic_error _) (norm_nonneg _) (norm_nonneg F)).trans_eq (by ring) calc _ ≤ ∫ P, ‖F‖*charTaylorConstant*|pairLinearIncrement a b s t P|^3 ∂μ := norm_integral_le_of_norm_le (h3.1.const_mul _) (ae_of_all _ hb) _ = ‖F‖*charTaylorConstant*(∫ P, |pairLinearIncrement a b s t P|^3 ∂μ) := integral_const_mul _ _ _ ≤ _ := by have hh := mul_le_mul_of_nonneg_left h3.2 (mul_nonneg (norm_nonneg F) charTaylorConstant_nonneg) nlinarith only [hh]
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201import Mathlibimport OAI.Probability.Ballisticity.Geometry.HeightSlab
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma normalized_restriction_contact_le {Ω : Type*} [MeasurableSpace Ω] (μ η : Measure Ω) [IsFiniteMeasure μ] [IsFiniteMeasure η] (D C A R : Set Ω) (hC : MeasurableSet C) (hA : MeasurableSet A) (hAR : A ⊆ R) (c γ δ : ℝ≥0∞) (hc : 0 < c) (hcD : c ≤ μ D) (hη : η D ≤ μ D+γ) (hδ : η (R \ D) ≤ δ) (he : μ (A \ C) = η (A \ C)) : normalizedMeasure (μ.restrict D) A ≤ normalizedMeasure (η.restrict D) A + normalizedMeasure (μ.restrict D) C + c⁻¹*(γ+δ) := by have ha : μ D ≠ 0 := ne_of_gt (hc.trans_le hcD) have hfin : μ D ≠ ⊤ := measure_ne_top _ _ have hmass : ∀ (ξ : Measure Ω), ξ.restrict D Set.univ = ξ D := by intro ξ rw [Measure.restrict_apply MeasurableSet.univ,Set.univ_inter] have hraw : μ (A ∩ D) ≤ μ (C ∩ D) + η (A ∩ D) + δ := by calc _ ≤ μ (C ∩ D)+μ (A \ C) := by apply (measure_mono (s := A ∩ D) (t := (C ∩ D) ∪ (A \ C)) ?_).trans (measure_union_le _ _) intro z hz by_cases hzC : z ∈ C · exact Or.inl ⟨hzC,hz.2⟩ · exact Or.inr ⟨hz.1,hzC⟩ _ = μ (C ∩ D)+η (A \ C) := by rw [he] _ ≤ μ (C ∩ D)+(η (A ∩ D)+δ) := by apply add_le_add le_rfl calc _ ≤ η ((A ∩ D) ∪ (R \ D)) := by apply measure_mono intro z hz by_cases hzD : z ∈ D · exact Or.inl ⟨hz.1,hzD⟩ · exact Or.inr ⟨hAR hz.1,hzD⟩ _ ≤ η (A ∩ D)+η (R \ D) := measure_union_le _ _ _ ≤ _ := add_le_add le_rfl hδ _ = _ := (add_assoc _ _ _).symm have hηA : (η.restrict D) A ≤ (μ D+γ)* normalizedMeasure (η.restrict D) A := by by_cases hz : η D = 0 · have hzero : η (A ∩ D) = 0 := measure_mono_null Set.inter_subset_right hz rw [Measure.restrict_apply hA,hzero] exact zero_le · have heq : (η.restrict D) A = η D * normalizedMeasure (η.restrict D) A := by change _ = η D*((η.restrict D Set.univ)⁻¹*(η.restrict D) A) rw [hmass,← mul_assoc,ENNReal.mul_inv_cancel hz (measure_ne_top _ _),one_mul] rw [heq] exact mul_le_mul_left hη _ have hprob : normalizedMeasure (η.restrict D) A ≤ 1 := by by_cases hz : η D = 0 · change (η.restrict D Set.univ)⁻¹*(η.restrict D) A ≤ 1 rw [hmass,Measure.restrict_apply hA,measure_mono_null Set.inter_subset_right hz] simp · let := normalizedMeasure_probability (η.restrict D) (by rw [hmass]; exact hz) exact prob_le_one have hmid : μ (A ∩ D) ≤ μ D * (normalizedMeasure (η.restrict D) A + normalizedMeasure (μ.restrict D) C) + (γ+δ) := by calc _ ≤ μ (C ∩ D) + (μ D+γ)*normalizedMeasure (η.restrict D) A + δ := hraw.trans (add_le_add (add_le_add le_rfl (by simpa only [Measure.restrict_apply hA] using hηA)) le_rfl) _ ≤ μ (C ∩ D) + (μ D*normalizedMeasure (η.restrict D) A+γ) + δ := by rw [add_mul] exact add_le_add (add_le_add le_rfl (add_le_add le_rfl (by simpa only [mul_one] using mul_le_mul_right hprob γ))) le_rfl _ = _ := by have hCeq : μ D * normalizedMeasure (μ.restrict D) C = μ (C ∩ D) := by change μ D*((μ.restrict D Set.univ)⁻¹*(μ.restrict D) C) = _ rw [hmass,← mul_assoc,ENNReal.mul_inv_cancel ha hfin,one_mul,Measure.restrict_apply hC] rw [mul_add,hCeq] ac_rfl change (μ.restrict D Set.univ)⁻¹*(μ.restrict D) A ≤ _ rw [hmass,Measure.restrict_apply hA] calc _ ≤ (μ D)⁻¹*(μ D*(normalizedMeasure (η.restrict D) A+normalizedMeasure (μ.restrict D) C)+(γ+δ)) := mul_le_mul_right hmid _ _ = normalizedMeasure (η.restrict D) A + normalizedMeasure (μ.restrict D) C + (μ D)⁻¹*(γ+δ) := by rw [mul_add,← mul_assoc,ENNReal.inv_mul_cancel ha hfin,one_mul] _ ≤ _ := add_le_add le_rfl (mul_le_mul_left (ENNReal.inv_le_inv.mpr hcD) _)
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196import Mathlibimport OAI.Probability.Ballisticity.Estimates.SharedConditionedPairLawFstimport OAI.Probability.Ballisticity.Crossings.HitWordimport OAI.Probability.Ballisticity.Estimates.NormalizedRestrictionContactimport OAI.Probability.Ballisticity.Crossings.CrossTranslation
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma normalized_shared_restrict {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (x y : Lattice d) : normalizedMeasure ((sharedPairLaw ν x y).restrict (NoDrop ℓ x ×ˢ NoDrop ℓ y)) = sharedConditionedPairLaw ν ℓ x y := by unfold normalizedMeasure sharedConditionedPairLaw rw [Measure.restrict_apply MeasurableSet.univ,Set.univ_inter,← sharedNoDropMass_eq]
lemma normalized_independent_restrict {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (x y : Lattice d) : normalizedMeasure (((annealedFrom ν x).prod (annealedFrom ν y)).restrict (NoDrop ℓ x ×ˢ NoDrop ℓ y)) = (conditionedFrom ν ℓ x).prod (conditionedFrom ν ℓ y) := by unfold normalizedMeasure conditionedFrom rw [Measure.restrict_apply MeasurableSet.univ,Set.univ_inter,Measure.prod_prod, annealedFrom_noDrop,annealedFrom_noDrop,Measure.prod_smul_left,Measure.prod_smul_right, smul_smul,Measure.prod_restrict,ENNReal.mul_inv] · exact Or.inr (measure_ne_top _ _) · exact Or.inl (measure_ne_top _ _)
lemma hitWordsEvent_subset_hit {d : ℕ} (x y : Lattice d) (S T : Set (Lattice d)) (E : Set (HitWord x S T × HitWord y S T)) : hitWordsEvent x y S T E ⊆ Hit S T ×ˢ Hit S T := by intro P hP obtain ⟨w,hw⟩ := Set.mem_iUnion.mp hP obtain ⟨_,hcy⟩ := Set.mem_iUnion.mp hw exact ⟨Set.mem_iUnion.mpr ⟨w.1.val.length,hitWord_prefix x S T w.1 hcy.1⟩, Set.mem_iUnion.mpr ⟨w.2.val.length,hitWord_prefix y S T w.2 hcy.2⟩⟩
theorem conditioned_prefix_comparison {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) (x y : Lattice d) (hxy : dot (realPosition x) ℓ = dot (realPosition y) ℓ) (H : ℝ) (E : Set (HitWord x (Strip ℓ x H) (Upper ℓ x H) × HitWord y (Strip ℓ x H) (Upper ℓ x H))) : sharedConditionedPairLaw ν ℓ x y (hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E) ≤ ((conditionedFrom ν ℓ x).prod (conditionedFrom ν ℓ y)) (hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E) + sharedConditionedPairLaw ν ℓ x y (PrefixContact (Strip ℓ x H)) + (sharedNoDropMass ν ℓ x y)⁻¹ * ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ x y + 2*annealedLaw ν (Cross ℓ 0 H \ NoDrop ℓ 0)) := by have hs : Strip ℓ x H = Strip ℓ y H := by unfold Strip; rw [hxy] have ht : Upper ℓ x H = Upper ℓ y H := by unfold Upper; rw [hxy] have hsub : hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E ⊆ Cross ℓ x H ×ˢ Cross ℓ y H := by intro P hP have hh := hitWordsEvent_subset_hit x y _ _ E hP rw [cross_eq_hit,cross_eq_hit] exact ⟨hh.1,by simpa only [hs,ht] using hh.2⟩ have hmass : ((annealedFrom ν x).prod (annealedFrom ν y)) (NoDrop ℓ x ×ˢ NoDrop ℓ y) = (annealedLaw ν (NoDrop ℓ 0))^2 := by rw [Measure.prod_prod,annealedFrom_noDrop,annealedFrom_noDrop,pow_two] have hh := normalized_restriction_contact_le (sharedPairLaw ν x y) ((annealedFrom ν x).prod (annealedFrom ν y)) (NoDrop ℓ x ×ˢ NoDrop ℓ y) (PrefixContact (Strip ℓ x H)) (hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E) (Cross ℓ x H ×ˢ Cross ℓ y H) (measurableSet_prefixContact _) (measurableSet_hitWordsEvent _ _ _ _ _) hsub (sharedNoDropMass ν ℓ x y) ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ x y) (2*annealedLaw ν (Cross ℓ 0 H \ NoDrop ℓ 0)) (sharedNoDropMass_pos ν hue ℓ hℓ htrans x y) (le_of_eq (sharedNoDropMass_eq ν ℓ x y)) (by rw [hmass,← sharedNoDropMass_eq]; exact le_add_tsub) (independent_cross_noDrop_error_bound ν ℓ x y H) (raw_prefix_off_contact_equal ν x y _ _ (disjoint_strip_upper ℓ x H) E) simpa only [normalized_shared_restrict,normalized_independent_restrict] using hh
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234import Mathlibimport OAI.Probability.Ballisticity.Estimates.ObservedCharges
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
theorem observedAdvance_total_charge {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) {b R s c q L : ℝ} (hb : 0≤b) (hR : b≤R) (hc : 0≤c) (hq : 0≤q) (K : ℕ) (hK : 0<K) (k : ℝ → ℕ) (hk : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → b<pairGap f i → pairGap f i<R → 0<k (pairGap f i)) (hdrift : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → observedStateGain f b R c q i+observedStatePotential f b R i ≤ ∫ P, observedStatePotential f b R (pairOrigin (commonCutObserver (realPosition (step e)) (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) P)) ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) (hmean : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → (∫⁻ P, observedCharge e f b R s K k P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) ≤ ENNReal.ofReal L*ENNReal.ofReal (observedStateGain f b R c q i)) (i : Lattice d × Lattice d) (hi : signedHeight e i.1=signedHeight e i.2) : let next := commonCutObserver (realPosition (step e)) (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) (∫⁻ P, ⨆ N, observerRewardSum next (observedCharge e f b R s K k) N P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) ≤ ENNReal.ofReal L*ENNReal.ofReal ((2*R)^((3:ℝ)/2)-observedStatePotential f b R i) := by let ℓ := realPosition (step e) let μ := fun j : Lattice d × Lattice d => sharedConditionedPairLaw ν ℓ j.1 j.2 let active := fun j => pairGap f j<R let B := observedAdvanceRule e f b K k let next := commonCutObserver ℓ active B let K' := observedAdvanceBound f b K k let reward := fun P : Path d × Path d => ENNReal.ofReal (observedStateGain f b R c q (pairOrigin P)) let bound := fun P => ENNReal.ofReal L*reward P let : ∀ j, IsProbabilityMeasure (μ j) := fun j => sharedConditionedPairLaw_probability ν ℓ j.1 j.2 (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans j.1 j.2)) have hK' : ∀ j : Lattice d × Lattice d, signedHeight e j.1=signedHeight e j.2 → active j → 0<K' j := by intro j hj ha by_cases hu : pairGap f j≤b · simpa only [K',observedAdvanceBound,ite_eq_left hu] using hK · simpa only [K',observedAdvanceBound,ite_eq_right hu] using hk j hj (lt_of_not_ge hu) ha have hB : ∀ j, active j → ∀ z w, signedHeight e j.1+K' j≤ signedHeight e z → B j (z,w) := by intro j _ z w hz exact observedAdvanceRule_height e f b K k j z w hz have hreward : Measurable reward := ((measurable_of_countable (observedStateGain f b R c q)).comp measurable_pairOrigin).ennreal_ofReal have hbound : Measurable bound := measurable_const.mul hreward have hm : ∀ j, signedHeight e j.1=signedHeight e j.2 → (∫⁻ P, observedCharge e f b R s K k P ∂μ j) ≤ ∫⁻ P, bound P ∂μ j := by intro j hj have he : bound =ᵐ[μ j] (fun _ => ENNReal.ofReal L*ENNReal.ofReal (observedStateGain f b R c q j)) := by filter_upwards [pairOrigin_ae ν ℓ htrans j.1 j.2] with P hP simp only [bound,reward,hP] rw [lintegral_congr_ae he] simpa using hmean j hj have hc' := restart_reward_comparison_total μ pairOrigin next (fun j => signedHeight e j.1=signedHeight e j.2) (observedCharge e f b R s K k) bound (measurable_commonCutObserver ℓ active B) (measurable_observedCharge e f b R s K k) hbound (fun j hj g hg => commonCutObserver_restart ν hue e htrans active B K' hK' hB j hj g hg) (fun j hj => commonCutObserver_sameHeight ν hue e htrans active B K' hK' hB j hj) hm i hi calc (∫⁻ P, ⨆ N, observerRewardSum next (observedCharge e f b R s K k) N P ∂μ i) ≤ ∫⁻ P, ⨆ N, observerRewardSum next bound N P ∂μ i := hc' _ = ENNReal.ofReal L*(∫⁻ P, ⨆ N, observerRewardSum next reward N P ∂μ i) := by simp only [bound,observerRewardSum_mul,← ENNReal.mul_iSup] exact lintegral_const_mul' _ _ (ENNReal.ofReal_ne_top) _ ≤ ENNReal.ofReal L*ENNReal.ofReal ((2*R)^((3:ℝ)/2)-observedStatePotential f b R i) := mul_le_mul_right (observedAdvance_total_gain ν hue e f htrans hb hR hc hq K hK k hk hdrift i hi) _
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
def SmallCommonLayer {d : ℕ} (e f : Direction d) (s : ℝ) (H : ℤ) : Set (Path d × Path d) := {P | ∃ n m, P.1 ∈ FirstLayerHit (signedHeight e) H n ∧ P.2 ∈ FirstLayerHit (signedHeight e) H m ∧ P.1 ∈ FutureNoDrop (realPosition (step e)) n ∧ P.2 ∈ FutureNoDrop (realPosition (step e)) m ∧ |signedCoordinate f (P.1 n-P.2 m)| ≤ s}
lemma measurableSet_smallCommonLayer {d : ℕ} (e f : Direction d) (s : ℝ) (H : ℤ) : MeasurableSet (SmallCommonLayer e f s H) := by unfold SmallCommonLayer simp only [Set.ofPred_exists,Set.ofPred_and] apply MeasurableSet.iUnion intro n apply MeasurableSet.iUnion intro m refine ((measurableSet_firstLayerHit _ _ _).preimage measurable_fst).inter ?_ refine ((measurableSet_firstLayerHit _ _ _).preimage measurable_snd).inter ?_ refine ((measurableSet_futureNoDrop _ _).preimage measurable_fst).inter ?_ refine ((measurableSet_futureNoDrop _ _).preimage measurable_snd).inter ?_ apply measurableSet_le _ measurable_const exact ((measurable_of_countable (signedCoordinate f)).comp (((measurable_pi_apply n).comp measurable_fst).sub ((measurable_pi_apply m).comp measurable_snd))).abs
lemma firstLayerHit_suffix_iff_of_record {d : ℕ} (e : Direction d) (X : Path d) {n k : ℕ} {H : ℤ} (hr : StrictRecord (realPosition (step e)) X n) (hH : signedHeight e (X n) ≤ H) : (fun j => X (n+j)) ∈ FirstLayerHit (signedHeight e) H k ↔ X ∈ FirstLayerHit (signedHeight e) H (n+k) := by constructor · rintro ⟨he,hpre⟩ refine ⟨he,?_⟩ intro j hj by_cases hjn : j < n · have h := hr j hjn rw [signedHeight_projection,signedHeight_projection] at h have h' : signedHeight e (X j) < signedHeight e (X n) := by exact_mod_cast h exact h'.trans_le hH · have h := hpre (j-n) (by omega) simpa only [Nat.add_sub_cancel' (Nat.le_of_not_gt hjn)] using h · rintro ⟨he,hpre⟩ refine ⟨he,fun j hj => hpre (n+j) (by omega)⟩
lemma firstLayerHit_time_ge_record {d : ℕ} (e : Direction d) (X : Path d) {n k : ℕ} {H : ℤ} (hr : StrictRecord (realPosition (step e)) X n) (hH : signedHeight e (X n) ≤ H) (hk : X ∈ FirstLayerHit (signedHeight e) H k) : n ≤ k := by by_contra hh have h := hr k (Nat.lt_of_not_ge hh) rw [signedHeight_projection,signedHeight_projection,hk.1] at h have : H < signedHeight e (X n) := by exact_mod_cast h omega
lemma futureNoDrop_suffix_iff {d : ℕ} (ℓ : Vector d) (X : Path d) (n k : ℕ) : (fun j => X (n+j)) ∈ FutureNoDrop ℓ k ↔ X ∈ FutureNoDrop ℓ (n+k) := by simp only [FutureNoDrop,Set.mem_ofPred_eq,Nat.add_assoc]
lemma smallCommonLayer_suffix_iff {d : ℕ} (e f : Direction d) (s : ℝ) (P : Path d × Path d) {n m : ℕ} (hc : CommonTrueRecord (realPosition (step e)) P n m) {H : ℤ} (hH : signedHeight e (P.1 n) ≤ H) : commonPairSuffix n m P ∈ SmallCommonLayer e f s H ↔ P ∈ SmallCommonLayer e f s H := by have he : signedHeight e (P.1 n)=signedHeight e (P.2 m) := by have hh := hc.2.2 rw [signedHeight_projection,signedHeight_projection] at hh exact_mod_cast hh have hH' : signedHeight e (P.2 m) ≤ H := by rwa [← he] constructor · rintro ⟨j,k,hj,hk,hD,hE,hgap⟩ refine ⟨n+j,m+k,(firstLayerHit_suffix_iff_of_record e P.1 hc.1.1 hH).mp hj, (firstLayerHit_suffix_iff_of_record e P.2 hc.2.1.1 hH').mp hk, (futureNoDrop_suffix_iff _ _ n j).mp hD,(futureNoDrop_suffix_iff _ _ m k).mp hE,hgap⟩ · rintro ⟨j,k,hj,hk,hD,hE,hgap⟩ have hnj := firstLayerHit_time_ge_record e P.1 hc.1.1 hH hj have hmk := firstLayerHit_time_ge_record e P.2 hc.2.1.1 hH' hk have hj' : P.1 ∈ FirstLayerHit (signedHeight e) H (n+(j-n)) := by simpa only [Nat.add_sub_cancel' hnj] using hj have hk' : P.2 ∈ FirstLayerHit (signedHeight e) H (m+(k-m)) := by simpa only [Nat.add_sub_cancel' hmk] using hk refine ⟨j-n,k-m,(firstLayerHit_suffix_iff_of_record e P.1 hc.1.1 hH).mpr hj', (firstLayerHit_suffix_iff_of_record e P.2 hc.2.1.1 hH').mpr hk',?_,?_,?_⟩ · apply (futureNoDrop_suffix_iff _ _ n (j-n)).mpr simpa only [Nat.add_sub_cancel' hnj] using hD · apply (futureNoDrop_suffix_iff _ _ m (k-m)).mpr simpa only [Nat.add_sub_cancel' hmk] using hE · simpa only [commonPairSuffix,Nat.add_sub_cancel' hnj,Nat.add_sub_cancel' hmk] using hgap
lemma firstLayerHit_recordIndexPosition_all {d : ℕ} (e : Direction d) (x : Lattice d) (X : Path d) (hx : X 0=x) (hD : X ∈ NoDrop (realPosition (step e)) x) (hnn : ∀ n, ∃ f, X (n+1)=X n+step f) {H n : ℕ} (hn : X ∈ FirstLayerHit (signedHeight e) (signedHeight e x+H) n) : recordIndexPosition (realPosition (step e)) H (fun j => X j-x)=X n-x := by by_cases hH : H=0 · subst H have hn0 : n=0 := by by_contra hh have h := hn.2 0 (Nat.pos_of_ne_zero hh) rw [hx] at h simp only [Nat.cast_zero,add_zero,lt_self_iff_false] at h subst n rw [recordIndexPosition,recordIndexTime_zero] · exact firstLayerHit_recordIndexPosition_translated e x X hx hD hnn (Nat.pos_of_ne_zero hH) hn
lemma physicalFirstHitGap_at_common {d : ℕ} (e f : Direction d) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (hD : P.1 ∈ NoDrop (realPosition (step e)) (P.1 0)) (hE : P.2 ∈ NoDrop (realPosition (step e)) (P.2 0)) (hnn : ∀ n, ∃ g, P.1 (n+1)=P.1 n+step g) (hmm : ∀ n, ∃ g, P.2 (n+1)=P.2 n+step g) {H n m : ℕ} (hn : P.1 ∈ FirstLayerHit (signedHeight e) (signedHeight e (P.1 0)+H) n) (hm : P.2 ∈ FirstLayerHit (signedHeight e) (signedHeight e (P.1 0)+H) m) : physicalFirstHitGap (realPosition (step e)) f (P.1 0) (P.2 0) H P = signedCoordinate f (P.1 n-P.2 m) := by have h1 := firstLayerHit_recordIndexPosition_all e (P.1 0) P.1 rfl hD hnn hn have h2 := firstLayerHit_recordIndexPosition_all e (P.2 0) P.2 rfl hE hmm (by rwa [← hxy]) simp only [physicalFirstHitGap,firstHitPairGap,h1,h2,signedCoordinate_sub] ring
lemma smallCommonLayer_iff_physical {d : ℕ} (e f : Direction d) (s : ℝ) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (hD : P.1 ∈ NoDrop (realPosition (step e)) (P.1 0)) (hE : P.2 ∈ NoDrop (realPosition (step e)) (P.2 0)) (hnn : ∀ n, ∃ g, P.1 (n+1)=P.1 n+step g) (hmm : ∀ n, ∃ g, P.2 (n+1)=P.2 n+step g) (H : ℕ) : P ∈ SmallCommonLayer e f s (signedHeight e (P.1 0)+H) ↔ P ∈ CommonLayer (realPosition (step e)) (signedHeight e) (signedHeight e (P.1 0)+H) ∧ |physicalFirstHitGap (realPosition (step e)) f (P.1 0) (P.2 0) H P| ≤ s := by constructor · rintro ⟨n,m,hn,hm,hF,hG,hgap⟩ exact ⟨⟨n,m,hn,hm,hF,hG⟩,by rw [physicalFirstHitGap_at_common e f P hxy hD hE hnn hmm hn hm]; exact hgap⟩ · rintro ⟨⟨n,m,hn,hm,hF,hG⟩,hgap⟩ exact ⟨n,m,hn,hm,hF,hG,by rw [← physicalFirstHitGap_at_common e f P hxy hD hE hnn hmm hn hm]; exact hgap⟩
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277import Mathlibimport OAI.Probability.Ballisticity.Estimates.ObservedDrift
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
def observerShrinkEvent {d : ℕ} (e f : Direction d) (k : ℝ → ℕ) (i : Lattice d × Lattice d) : Set (Path d × Path d) := {P | ∃ h ≤ k (pairGap f i), |physicalFirstHitGap (realPosition (step e)) f i.1 i.2 h P| ≤ pairGap f i/2}
lemma measurableSet_observerShrinkEvent {d : ℕ} (e f : Direction d) (k : ℝ → ℕ) (i : Lattice d × Lattice d) : MeasurableSet (observerShrinkEvent e f k i) := by unfold observerShrinkEvent simp only [Set.ofPred_exists,Set.ofPred_and] apply MeasurableSet.iUnion intro h exact (MeasurableSet.const _).inter (measurableSet_le (measurable_physicalFirstHitGap _ _ _ _ h |>.abs) measurable_const)
noncomputable def observedCharge {d : ℕ} (e f : Direction d) (b R s : ℝ) (K : ℕ) (k : ℝ → ℕ) (P : Path d × Path d) : ℝ≥0∞ := let i := pairOrigin P if pairGap f i<R then if pairGap f i≤2*s then observedAdvanceBound f b K k i else (observerShrinkEvent e f k i).indicator (fun _ => (k (pairGap f i) : ℝ≥0∞)) P else 0
lemma measurable_observedCharge {d : ℕ} (e f : Direction d) (b R s : ℝ) (K : ℕ) (k : ℝ → ℕ) : Measurable (observedCharge e f b R s K k) := by have h : Measurable (fun Z : (Path d × Path d) × (Lattice d × Lattice d) => if pairGap f Z.2<R then if pairGap f Z.2≤2*s then (observedAdvanceBound f b K k Z.2 : ℝ≥0∞) else (observerShrinkEvent e f k Z.2).indicator (fun _ => (k (pairGap f Z.2):ℝ≥0∞)) Z.1 else 0) := by apply measurable_from_prod_countable_left intro i dsimp only by_cases ha : pairGap f i<R · simp only [ite_eq_left ha] by_cases hn : pairGap f i≤2*s · simp only [ite_eq_left hn]; exact measurable_const · simp only [ite_eq_right hn] exact measurable_const.indicator (measurableSet_observerShrinkEvent e f k i) · simp only [ite_eq_right ha]; exact measurable_const let g : (Path d × Path d) → (Path d × Path d) × (Lattice d × Lattice d) := fun P => (P,pairOrigin P) have hg : Measurable g := measurable_id.prodMk measurable_pairOrigin have hh := h.comp hg unfold observedCharge simpa only [Function.comp_def,g] using hh
lemma observedCharge_mean {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) (b R s : ℝ) (K : ℕ) (k : ℝ → ℕ) (i : Lattice d × Lattice d) : (∫⁻ P, observedCharge e f b R s K k P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) = if pairGap f i<R then if pairGap f i≤2*s then (observedAdvanceBound f b K k i : ℝ≥0∞) else (k (pairGap f i):ℝ≥0∞)*sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2 (observerShrinkEvent e f k i) else 0 := by let ℓ := realPosition (step e) let μ := sharedConditionedPairLaw ν ℓ i.1 i.2 let : IsProbabilityMeasure μ := sharedConditionedPairLaw_probability ν ℓ i.1 i.2 (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans i.1 i.2)) have he : (observedCharge e f b R s K k) =ᵐ[μ] (fun P => if pairGap f i<R then if pairGap f i≤2*s then (observedAdvanceBound f b K k i : ℝ≥0∞) else (observerShrinkEvent e f k i).indicator (fun _ => (k (pairGap f i):ℝ≥0∞)) P else 0) := by filter_upwards [pairOrigin_ae ν ℓ htrans i.1 i.2] with P hP simp only [observedCharge,hP] rw [lintegral_congr_ae he] split_ifs · simp · exact lintegral_indicator_const (measurableSet_observerShrinkEvent e f k i) _ · simp
lemma observedCharge_mean_le {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) {b R s c q L δ : ℝ} (hL : 0≤L) (hbs : b≤2*s) (K : ℕ) (k : ℝ → ℕ) (i : Lattice d × Lattice d) (hlower : (K:ℝ)≤L*(q*((2*b)^((3:ℝ)/2)-b^((3:ℝ)/2)))) (hnear : b<pairGap f i → pairGap f i≤2*s → pairGap f i<R → (k (pairGap f i):ℝ)≤L*(c*(pairGap f i)^((3:ℝ)/2))) (hfar : 2*s<pairGap f i → pairGap f i<R → (k (pairGap f i):ℝ)*δ≤L*(c*(pairGap f i)^((3:ℝ)/2))) (hshrink : 2*s<pairGap f i → pairGap f i<R → (sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2).real (observerShrinkEvent e f k i)≤δ) : (∫⁻ P, observedCharge e f b R s K k P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) ≤ ENNReal.ofReal L*ENNReal.ofReal (observedStateGain f b R c q i) := by rw [observedCharge_mean ν hue e f htrans] by_cases ha : pairGap f i<R · simp only [ite_eq_left ha,observedStateGain] by_cases hn : pairGap f i≤2*s · simp only [ite_eq_left hn] by_cases hb : pairGap f i≤b · simp only [observedAdvanceBound,ite_eq_left hb] rw [← ENNReal.ofReal_mul hL,← ENNReal.ofReal_natCast] exact ENNReal.ofReal_le_ofReal hlower · simp only [observedAdvanceBound,ite_eq_right hb] rw [← ENNReal.ofReal_mul hL,← ENNReal.ofReal_natCast] exact ENNReal.ofReal_le_ofReal (hnear (lt_of_not_ge hb) hn ha) · have hb : ¬pairGap f i≤b := fun h => hn (h.trans hbs) simp only [ite_eq_right hn,ite_eq_right hb] rw [← ENNReal.ofReal_mul hL] let μ := sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2 have : IsProbabilityMeasure μ := sharedConditionedPairLaw_probability ν _ i.1 i.2 (ne_of_gt (sharedNoDropMass_pos ν hue _ (signed_direction_unit e) htrans i.1 i.2)) rw [← ofReal_measureReal (μ := μ),← ENNReal.ofReal_natCast, ← ENNReal.ofReal_mul (Nat.cast_nonneg _)] apply ENNReal.ofReal_le_ofReal exact (mul_le_mul_of_nonneg_left (hshrink (lt_of_not_ge hn) ha) (Nat.cast_nonneg _)).trans (hfar (lt_of_not_ge hn) ha) · simp only [ite_eq_right ha,observedStateGain,ENNReal.ofReal_zero,mul_zero,le_refl]
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
lemma commonLayer_before_selected_bound {d : ℕ} (e : Direction d) (B : Lattice d × Lattice d → Prop) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (K : ℕ) (hK : 0 < K) (hB : ∀ z w, signedHeight e (P.1 0)+K ≤ signedHeight e z → B (z,w)) {n m h : ℕ} (hcut : selectedBoundaryAt (realPosition (step e)) B P n m) (hh : signedHeight e (P.1 0)+h < signedHeight e (P.1 n)) (hC : P ∈ CommonLayer (realPosition (step e)) (signedHeight e) (signedHeight e (P.1 0)+h)) : h < K := by by_contra hnot have hKh : K ≤ h := Nat.le_of_not_gt hnot obtain ⟨j,k,hj,hk,hD,hE⟩ := hC have hposj : 0 < j := by by_contra hn have hj0 : j=0 := by omega have hjH := hj.1 rw [hj0] at hjH omega have hposk : 0 < k := by by_contra hn have hk0 : k=0 := by omega have hkH := hk.1 rw [hk0] at hkH omega have hheq : signedHeight e (P.1 n)=signedHeight e (P.2 m) := by have he := hcut.2.2.1.2.2 rw [signedHeight_projection,signedHeight_projection] at he exact_mod_cast he have hjn : j < n := by by_contra h have hnle : n ≤ j := Nat.le_of_not_gt h rcases eq_or_lt_of_le hnle with he | hl · have hjH := hj.1 rw [← he] at hjH omega · have hnH := hj.2 n hl omega have hkm : k < m := by by_contra h have hmle : m ≤ k := Nat.le_of_not_gt h rcases eq_or_lt_of_le hmle with he | hl · have hkH := hk.1 rw [← he] at hkH omega · have hmH := hk.2 m hl omega apply hcut.2.2.2.2 j k hposj hjn hposk hkm · apply hB rw [hj.1] exact add_le_add_right (by exact_mod_cast hKh) _ · refine ⟨⟨firstLayerHit_record _ _ (signedHeight_projection e) _ j P.1 hj,hD⟩, ⟨firstLayerHit_record _ _ (signedHeight_projection e) _ k P.2 hk,hE⟩,?_⟩ rw [signedHeight_projection,signedHeight_projection,hj.1,hk.1]
noncomputable def allocatedSmallCuts {d : ℕ} (e f : Direction d) (s : ℝ) (P : Path d × Path d) (n : ℕ) : Finset ℕ := (Finset.range (signedHeight e (P.1 n)-signedHeight e (P.1 0)).toNat).filter fun h => P ∈ CommonLayer (realPosition (step e)) (signedHeight e) (signedHeight e (P.1 0)+h) ∧ |physicalFirstHitGap (realPosition (step e)) f (P.1 0) (P.2 0) h P| ≤ s
lemma allocatedSmallCuts_card_le {d : ℕ} (e f : Direction d) (s : ℝ) (B : Lattice d × Lattice d → Prop) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (K : ℕ) (hK : 0 < K) (hB : ∀ z w, signedHeight e (P.1 0)+K ≤ signedHeight e z → B (z,w)) {n m : ℕ} (hcut : selectedBoundaryAt (realPosition (step e)) B P n m) : (allocatedSmallCuts e f s P n).card ≤ K := by have hsub : allocatedSmallCuts e f s P n ⊆ Finset.range K := by intro h hh obtain ⟨hh,hC,hgap⟩ := Finset.mem_filter.mp hh apply Finset.mem_range.mpr apply commonLayer_before_selected_bound e B P hxy K hK hB hcut _ hC have hh' := Finset.mem_range.mp hh omega exact (Finset.card_le_card hsub).trans_eq (Finset.card_range K)
lemma allocatedSmallCuts_nonempty_shrink {d : ℕ} (e f : Direction d) (b s : ℝ) (K : ℕ) (k : ℝ → ℕ) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (hbs : b ≤ 2*s) (hfar : 2*s < pairGap f (pairOrigin P)) (hk : 0 < k (pairGap f (pairOrigin P))) {n m : ℕ} (hcut : selectedBoundaryAt (realPosition (step e)) (observedAdvanceRule e f b K k (pairOrigin P)) P n m) (hex : (allocatedSmallCuts e f s P n).Nonempty) : P ∈ observerShrinkEvent e f k (pairOrigin P) := by obtain ⟨h,hh⟩ := hex obtain ⟨hh,hC,hgap⟩ := Finset.mem_filter.mp hh have hupper : ¬pairGap f (pairOrigin P) ≤ b := fun h => not_lt_of_ge (h.trans hbs) hfar have hKn : observedAdvanceBound f b K k (pairOrigin P)=k (pairGap f (pairOrigin P)) := ite_eq_right hupper have hlt := commonLayer_before_selected_bound e (observedAdvanceRule e f b K k (pairOrigin P)) P hxy (observedAdvanceBound f b K k (pairOrigin P)) (by rwa [hKn]) (observedAdvanceRule_height e f b K k (pairOrigin P)) hcut (by have hh' := Finset.mem_range.mp hh; omega) hC refine ⟨h,?_,?_⟩ · rw [hKn] at hlt exact hlt.le · exact hgap.trans (by linarith)
lemma allocatedSmallCuts_le_charge {d : ℕ} (e f : Direction d) {b R s : ℝ} (hbs : b ≤ 2*s) (K : ℕ) (k : ℝ → ℕ) (P : Path d × Path d) (hxy : signedHeight e (P.1 0)=signedHeight e (P.2 0)) (ha : pairGap f (pairOrigin P) < R) (hK : 0 < observedAdvanceBound f b K k (pairOrigin P)) {n m : ℕ} (hcut : selectedBoundaryAt (realPosition (step e)) (observedAdvanceRule e f b K k (pairOrigin P)) P n m) : ((allocatedSmallCuts e f s P n).card : ℝ≥0∞) ≤ observedCharge e f b R s K k P := by have hcard := allocatedSmallCuts_card_le e f s (observedAdvanceRule e f b K k (pairOrigin P)) P hxy (observedAdvanceBound f b K k (pairOrigin P)) hK (observedAdvanceRule_height e f b K k (pairOrigin P)) hcut simp only [observedCharge,ite_eq_left ha] by_cases hn : pairGap f (pairOrigin P) ≤ 2*s · simp only [ite_eq_left hn] exact_mod_cast hcard · simp only [ite_eq_right hn] have hb : ¬pairGap f (pairOrigin P) ≤ b := fun h => hn (h.trans hbs) have hKn : observedAdvanceBound f b K k (pairOrigin P)=k (pairGap f (pairOrigin P)) := ite_eq_right hb by_cases hex : (allocatedSmallCuts e f s P n).Nonempty · have hs := allocatedSmallCuts_nonempty_shrink e f b s K k P hxy hbs (lt_of_not_ge hn) (by rwa [← hKn]) hcut hex rw [Set.indicator_of_mem hs] rw [hKn] at hcard exact_mod_cast hcard · rw [Finset.not_nonempty_iff_eq_empty.mp hex,Finset.card_empty] simp only [Nat.cast_zero] exact zero_le
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185import Mathlibimport OAI.Probability.Ballisticity.Crossings.LowerObservedCutimport OAI.Probability.Ballisticity.Estimates.RestartLyapunovimport OAI.Probability.Ballisticity.Crossings.CommonCutObserver
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
def pairGap {d : ℕ} (f : Direction d) (i : Lattice d × Lattice d) : ℝ := |signedCoordinate f (i.1-i.2)|
noncomputable def observedAdvanceRule {d : ℕ} (e f : Direction d) (b : ℝ) (K : ℕ) (k : ℝ → ℕ) (i uv : Lattice d × Lattice d) : Prop := if pairGap f i ≤ b then lowerCutCriterion e f (signedHeight e i.1) b K uv else ((signedHeight e i.1+k (pairGap f i) : ℤ) : ℝ) ≤ dot (realPosition uv.1) (realPosition (step e))
noncomputable def observedAdvanceBound {d : ℕ} (f : Direction d) (b : ℝ) (K : ℕ) (k : ℝ → ℕ) (i : Lattice d × Lattice d) : ℕ := if pairGap f i ≤ b then K else k (pairGap f i)
lemma observedAdvanceRule_height {d : ℕ} (e f : Direction d) (b : ℝ) (K : ℕ) (k : ℝ → ℕ) (i : Lattice d × Lattice d) (z w : Lattice d) (hz : signedHeight e i.1+observedAdvanceBound f b K k i ≤ signedHeight e z) : observedAdvanceRule e f b K k i (z,w) := by by_cases hu : pairGap f i≤b · simpa only [observedAdvanceRule,ite_eq_left hu] using lowerCutCriterion_height e f (signedHeight e i.1) b K z w (by simpa only [observedAdvanceBound,ite_eq_left hu] using hz) · simp only [observedAdvanceRule,ite_eq_right hu,signedHeight_projection] exact_mod_cast (show signedHeight e i.1+(k (pairGap f i):ℤ) ≤ signedHeight e z from by simpa only [observedAdvanceBound,ite_eq_right hu] using hz)
noncomputable def observedStatePotential {d : ℕ} (f : Direction d) (b R : ℝ) (i : Lattice d × Lattice d) : ℝ := observedPotential b R (signedCoordinate f (i.1-i.2))
noncomputable def observedStateGain {d : ℕ} (f : Direction d) (b R c q : ℝ) (i : Lattice d × Lattice d) : ℝ := if pairGap f i<R then if pairGap f i≤b then q*((2*b)^((3:ℝ)/2)-b^((3:ℝ)/2)) else c*(pairGap f i)^((3:ℝ)/2) else 0
lemma observedStatePotential_upper {d : ℕ} (f : Direction d) (i : Lattice d × Lattice d) {b R : ℝ} (hb : b≤pairGap f i) (hR : pairGap f i≤R) : observedStatePotential f b R i=(pairGap f i)^((3:ℝ)/2) := by have hi := observedPotential_upper_start hb (abs_nonneg _) hR simpa only [observedStatePotential,observedPotential,pairGap,abs_abs] using hi
lemma observedStateGain_nonneg {d : ℕ} (f : Direction d) {b R c q : ℝ} (hb : 0≤b) (hc : 0≤c) (hq : 0≤q) (i : Lattice d × Lattice d) : 0≤observedStateGain f b R c q i := by unfold observedStateGain split_ifs · exact mul_nonneg hq (sub_nonneg.mpr (Real.rpow_le_rpow hb (by linarith) (by norm_num))) · exact mul_nonneg hc (Real.rpow_nonneg (abs_nonneg _) _) · exact le_rfl
lemma commonCutObserver_potential {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (active : Lattice d × Lattice d → Prop) (B : (Lattice d × Lattice d) → (Lattice d × Lattice d) → Prop) (i : Lattice d × Lattice d) (ha : active i) (φ : Lattice d × Lattice d → ℝ) : (∫ P, φ (pairOrigin (commonCutObserver ℓ active B P)) ∂sharedConditionedPairLaw ν ℓ i.1 i.2) = ∫ P, φ (selectedBoundaryData ℓ (B i) P).endpoints ∂sharedConditionedPairLaw ν ℓ i.1 i.2 := by apply integral_congr_ae filter_upwards [pairOrigin_ae ν ℓ htrans i.1 i.2] with P hP simp only [commonCutObserver,hP,ite_eq_left ha,pairOrigin_selectedBoundarySuffix]
lemma observedAdvance_drift {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) {b R c q : ℝ} (hb : 0≤b) (hR : b≤R) (K : ℕ) (hK : 0<K) (k : ℝ → ℕ) (hupper : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → b<pairGap f i → pairGap f i<R → (pairGap f i)^((3:ℝ)/2)+c*(pairGap f i)^((3:ℝ)/2) ≤ ∫ P, observedStatePotential f b R (boundaryData (realPosition (step e)) ((signedHeight e i.1+k (pairGap f i):ℤ):ℝ) P).endpoints ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) (hlower : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → pairGap f i≤b → q≤(sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2).real (layerPairTruthEvent (realPosition (step e)) (signedHeight e) i.1 i.2 (signedHeight e i.1+K) {uv | 2*b≤|signedCoordinate f uv.1-signedCoordinate f uv.2|})) (i : Lattice d × Lattice d) (hi : signedHeight e i.1=signedHeight e i.2) : observedStateGain f b R c q i+observedStatePotential f b R i ≤ ∫ P, observedStatePotential f b R (pairOrigin (commonCutObserver (realPosition (step e)) (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) P)) ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2 := by let ℓ := realPosition (step e) by_cases ha : pairGap f i<R · rw [commonCutObserver_potential ν ℓ htrans (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) i ha] by_cases hu : pairGap f i≤b · have hd := shared_lower_selected_potential_drift ν hue e f htrans i.1 i.2 hi hb hR K hK (hlower i hi hu) have hp : observedStatePotential f b R i=b^((3:ℝ)/2) := observedPotential_lower_start hb hu hR have hRule : observedAdvanceRule e f b K k i = lowerCutCriterion e f (signedHeight e i.1) b K := by funext uv simp only [observedAdvanceRule,ite_eq_left hu] rw [hRule,hp] simp only [observedStateGain,ite_eq_left ha,ite_eq_left hu] simpa only [observedStatePotential,add_comm] using hd · have hd := hupper i hi (lt_of_not_ge hu) ha have hp := observedStatePotential_upper f i (le_of_lt (lt_of_not_ge hu)) ha.le have hRule : observedAdvanceRule e f b K k i = (fun uv => ((signedHeight e i.1+k (pairGap f i):ℤ):ℝ) ≤ dot (realPosition uv.1) ℓ) := by funext uv simp only [observedAdvanceRule,ite_eq_right hu,ℓ] rw [hRule,selectedBoundaryData_height,hp] simpa only [observedStateGain,ite_eq_left ha,ite_eq_right hu,add_comm] using hd · have : IsProbabilityMeasure (sharedConditionedPairLaw ν ℓ i.1 i.2) := sharedConditionedPairLaw_probability ν ℓ i.1 i.2 (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans i.1 i.2)) have he : (fun P => observedStatePotential f b R (pairOrigin (commonCutObserver ℓ (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) P))) =ᵐ[sharedConditionedPairLaw ν ℓ i.1 i.2] (fun _ => observedStatePotential f b R i) := by filter_upwards [pairOrigin_ae ν ℓ htrans i.1 i.2] with P hP simp only [commonCutObserver,hP,ite_eq_right ha] rw [integral_congr_ae he,integral_const] simp only [observedStateGain,ite_eq_right ha,zero_add,probReal_univ,smul_eq_mul,one_mul,le_refl]
theorem observedAdvance_total_gain {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) {b R c q : ℝ} (hb : 0≤b) (hR : b≤R) (hc : 0≤c) (hq : 0≤q) (K : ℕ) (hK : 0<K) (k : ℝ → ℕ) (hk : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → b<pairGap f i → pairGap f i<R → 0<k (pairGap f i)) (hdrift : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → observedStateGain f b R c q i+observedStatePotential f b R i ≤ ∫ P, observedStatePotential f b R (pairOrigin (commonCutObserver (realPosition (step e)) (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) P)) ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) (i : Lattice d × Lattice d) (hi : signedHeight e i.1=signedHeight e i.2) : let next := commonCutObserver (realPosition (step e)) (fun j => pairGap f j<R) (observedAdvanceRule e f b K k) (∫⁻ P, ⨆ N, observerRewardSum next (fun Q => ENNReal.ofReal (observedStateGain f b R c q (pairOrigin Q))) N P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2) ≤ ENNReal.ofReal ((2*R)^((3:ℝ)/2)-observedStatePotential f b R i) := by let ℓ := realPosition (step e) let μ := fun j : Lattice d × Lattice d => sharedConditionedPairLaw ν ℓ j.1 j.2 let active := fun j => pairGap f j<R let B := observedAdvanceRule e f b K k let next := commonCutObserver ℓ active B let K' := observedAdvanceBound f b K k let : ∀ j, IsProbabilityMeasure (μ j) := fun j => sharedConditionedPairLaw_probability ν ℓ j.1 j.2 (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans j.1 j.2)) have hK' : ∀ j : Lattice d × Lattice d, signedHeight e j.1=signedHeight e j.2 → active j → 0<K' j := by intro j hj ha by_cases hu : pairGap f j≤b · simpa only [K',observedAdvanceBound,ite_eq_left hu] using hK · simpa only [K',observedAdvanceBound,ite_eq_right hu] using hk j hj (lt_of_not_ge hu) ha have hB : ∀ j, active j → ∀ z w, signedHeight e j.1+K' j≤ signedHeight e z → B j (z,w) := by intro j _ z w hz exact observedAdvanceRule_height e f b K k j z w hz apply restart_bounded_potential_total μ pairOrigin next (fun j => signedHeight e j.1=signedHeight e j.2) (observedStatePotential f b R) (observedStateGain f b R c q) ((2*R)^((3:ℝ)/2)) measurable_pairOrigin (measurable_commonCutObserver ℓ active B) (fun j _ => pairOrigin_ae ν ℓ htrans j.1 j.2) (fun j hj g hg => commonCutObserver_restart ν hue e htrans active B K' hK' hB j hj g hg) (fun j hj => commonCutObserver_sameHeight ν hue e htrans active B K' hK' hB j hj) (fun j => ⟨observedPotential_nonneg' _ _ _ (hb.trans hR),observedPotential_le _ _ _⟩) (observedStateGain_nonneg f hb hc hq) hdrift i hi
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158import Mathlibimport OAI.Probability.Ballisticity.Estimates.SmallTimeExponentialErrorimport OAI.Probability.Ballisticity.Estimates.SelectedBoundaryRestartimport OAI.Probability.Ballisticity.Crossings.BoundaryFirstHits
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
noncomputable def observedPotential (b R z : ℝ) : ℝ := min ((max |z| b)^((3:ℝ)/2)) ((2*R)^((3:ℝ)/2))
lemma observedPotential_nonneg' (b R z : ℝ) (hR : 0 ≤ R) : 0 ≤ observedPotential b R z := by exact le_min (Real.rpow_nonneg ((abs_nonneg _).trans (le_max_left _ _)) _) (Real.rpow_nonneg (by positivity) _)
lemma observedPotential_le (b R z : ℝ) : observedPotential b R z ≤ (2*R)^((3:ℝ)/2) := min_le_right _ _
lemma measurable_observedPotential (b R : ℝ) : Measurable (observedPotential b R) := by unfold observedPotential fun_prop
lemma integrable_observedPotential {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (b R : ℝ) (hR : 0 ≤ R) : Integrable (fun ω => observedPotential b R (g ω)) μ := by apply Integrable.of_bound ((measurable_observedPotential b R).comp hg).aestronglyMeasurable ((2*R)^((3:ℝ)/2)) exact Eventually.of_forall fun ω => by change ‖observedPotential b R (g ω)‖ ≤ _ rw [Real.norm_eq_abs,abs_of_nonneg (observedPotential_nonneg' b R (g ω) hR)] exact observedPotential_le _ _ _
lemma observedPotential_upper_start {b R u : ℝ} (hb : b ≤ u) (hu : 0 ≤ u) (hR : u ≤ R) : observedPotential b R u = u^((3:ℝ)/2) := by unfold observedPotential rw [abs_of_nonneg hu,max_eq_left hb,min_eq_left] apply Real.rpow_le_rpow hu _ (by norm_num) linarith
lemma observedPotential_lower_start {b R z : ℝ} (hb : 0 ≤ b) (hz : |z| ≤ b) (hR : b ≤ R) : observedPotential b R z = b^((3:ℝ)/2) := by unfold observedPotential rw [max_eq_right hz,min_eq_left] apply Real.rpow_le_rpow hb _ (by norm_num) linarith
lemma observedPotential_scaled_clip {b R u z : ℝ} (hu : 0 < u) (hR : u ≤ R) : u^((3:ℝ)/2)*min (|z/u|^((3:ℝ)/2)) ((2:ℝ)^((3:ℝ)/2)) ≤ observedPotential b R z := by have hp : 0 ≤ u^((3:ℝ)/2) := Real.rpow_nonneg hu.le _ rw [mul_min_of_nonneg _ _ hp] apply min_le_min · rw [abs_div,abs_of_pos hu,Real.div_rpow (abs_nonneg _) hu.le] have hn := ne_of_gt (Real.rpow_pos_of_pos hu ((3:ℝ)/2)) rw [mul_div_cancel₀ _ hn] exact Real.rpow_le_rpow (abs_nonneg _) (le_max_left _ _) (by norm_num) · rw [← Real.mul_rpow hu.le (by norm_num)] apply Real.rpow_le_rpow (by positivity) _ (by norm_num) linarith
lemma observedPotential_lower_gain {b R z : ℝ} (hb : 0 ≤ b) (hR : b ≤ R) (hz : 2*b ≤ |z|) : (2*b)^((3:ℝ)/2) ≤ observedPotential b R z := by apply le_min · exact Real.rpow_le_rpow (by positivity) (hz.trans (le_max_left _ _)) (by norm_num) · exact Real.rpow_le_rpow (by positivity) (by linarith) (by norm_num)
lemma observedPotential_above_floor {b R z : ℝ} (hb : 0 ≤ b) (hR : b ≤ R) : b^((3:ℝ)/2) ≤ observedPotential b R z := by apply le_min · exact Real.rpow_le_rpow hb (le_max_right _ _) (by norm_num) · exact Real.rpow_le_rpow hb (by linarith) (by norm_num)
lemma boundaryData_endpoints {d : ℕ} (ℓ : Vector d) (H : ℝ) (P : Path d × Path d) : (boundaryData ℓ H P).endpoints = (P.1 (boundaryTimes ℓ H P).1,P.2 (boundaryTimes ℓ H P).2) := by simp [boundaryData,BoundaryData.endpoints,pairPrefix,extendPrefix_apply]
lemma selectedBoundaryData_endpoints {d : ℕ} (ℓ : Vector d) (B : Lattice d × Lattice d → Prop) (P : Path d × Path d) : (selectedBoundaryData ℓ B P).endpoints = (P.1 (selectedBoundaryTimes ℓ B P).1,P.2 (selectedBoundaryTimes ℓ B P).2) := by simp [selectedBoundaryData,BoundaryData.endpoints,pairPrefix,extendPrefix_apply]
theorem shared_boundary_potential_drift {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) {t : ℝ} (ht : 0<t) (htmax : t≤1/1000000) : let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let n := fluctuationScale μ (commonIncrementProcess ℓ f 0) ∃ l ε R₀ : ℝ, 0<l ∧ l<1 ∧ 0<ε ∧ 0<R₀ ∧ ∀ u, R₀≤u → n u*μ.real {P | l*u < |commonIncrementProcess ℓ f 0 P|}≤ε → ∀ x y, signedHeight e x=signedHeight e y → |signedCoordinate f (x-y)|=u → ∀ b R, b≤u → u≤R → let H := ⌊t*n u⌋₊ 0<H ∧ u^((3:ℝ)/2)+t/(128*commonMeanWidth ν ℓ)*u^((3:ℝ)/2) ≤ ∫ P, observedPotential b R (signedCoordinate f ((boundaryData ℓ ((signedHeight e x+H:ℤ):ℝ) P).endpoints.1- (boundaryData ℓ ((signedHeight e x+H:ℤ):ℝ) P).endpoints.2)) ∂sharedConditionedPairLaw ν ℓ x y := by dsimp only let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let n := fluctuationScale μ (commonIncrementProcess ℓ f 0) obtain ⟨l,ε,R₀,hl,hl1,hε,hR₀,hdrift⟩ := shared_uniform_good_clipped_drift ν hue e f hef htrans ht htmax refine ⟨l,ε,R₀,hl,hl1,hε,hR₀,?_⟩ intro u hu hgood x y hxy hgap b R hb hR obtain ⟨hH,hd⟩ := hdrift u hu hgood x y hxy hgap let H := ⌊t*n u⌋₊ have hHpos : 0<H := hH refine ⟨hHpos,?_⟩ have hupos : 0<u := hR₀.trans_le hu let Q := sharedConditionedPairLaw ν ℓ x y let : IsProbabilityMeasure Q := sharedConditionedPairLaw_probability ν ℓ x y (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans x y)) let Z := fun P : Path d × Path d => physicalFirstHitGap ℓ f x y (H+commonOffset ℓ (signedHeight e) (signedHeight e x+H) P) P have hZ : Measurable Z := measurable_physicalFirstHitGap_random ℓ f x y (fun P => H+commonOffset ℓ (signedHeight e) (signedHeight e x+H) P) (measurable_const.add (measurable_commonOffset _ _ _)) have hcl : Integrable (fun P => min (|Z P/u|^((3:ℝ)/2)) ((2:ℝ)^((3:ℝ)/2))) Q := by apply Integrable.of_bound (by fun_prop (disch := norm_num)) ((2:ℝ)^((3:ℝ)/2)) exact Eventually.of_forall fun P => by rw [Real.norm_eq_abs,abs_of_nonneg (le_min (Real.rpow_nonneg (abs_nonneg _) _) (by positivity))] exact min_le_right _ _ have hbound := integral_mono_ae (hcl.const_mul (u^((3:ℝ)/2))) (integrable_observedPotential Q Z hZ b R (hupos.le.trans hR)) (Eventually.of_forall fun P => observedPotential_scaled_clip hupos hR (z := Z P) (b := b)) rw [integral_const_mul] at hbound have hidentity : (fun P => observedPotential b R (signedCoordinate f ((boundaryData ℓ ((signedHeight e x+H:ℤ):ℝ) P).endpoints.1- (boundaryData ℓ ((signedHeight e x+H:ℤ):ℝ) P).endpoints.2))) =ᵐ[Q] (fun P => observedPotential b R (Z P)) := by filter_upwards [sharedConditioned_regularPath ν ℓ htrans x y, shared_common_boundary_exists ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) x y hxy H] with P hP hC rw [boundaryData_endpoints,boundaryTimes_firstHit_identity e f x y hxy H hHpos P hP.1 hP.2 hC] rw [integral_congr_ae hidentity] have hmult := mul_le_mul_of_nonneg_left hd (Real.rpow_nonneg hupos.le ((3:ℝ)/2)) change u^((3:ℝ)/2)*(1+t/(128*commonMeanWidth ν ℓ)) ≤ _ at hmult nlinarith [hmult.trans hbound]
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170import Mathlibimport OAI.Probability.Ballisticity.Crossings.CommonCutCounting
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
lemma restart_preserves_ae {Ω I : Type*} [MeasurableSpace Ω] (μ : I → Measure Ω) (state : Ω → I) (next : Ω → Ω) (good : I → Prop) (hn : Measurable next) (hrestart : ∀ i, good i → ∀ g : Ω → ℝ≥0∞, Measurable g → (∫⁻ ω, g (next ω) ∂μ i) = ∫⁻ ω, (∫⁻ η, g η ∂μ (state (next ω))) ∂μ i) (hgood : ∀ i, good i → ∀ᵐ ω ∂μ i, good (state (next ω))) (A : Set Ω) (hA : MeasurableSet A) (hprob : ∀ i, good i → ∀ᵐ ω ∂μ i, ω ∈ A) (i : I) (hi : good i) : ∀ᵐ ω ∂μ i, next ω ∈ A := by apply (ae_map_iff hn.aemeasurable hA).mp change ∀ᵐ y ∂(μ i).map next, y ∈ A rw [ae_iff] change (μ i).map next Aᶜ=0 rw [← lintegral_indicator_one hA.compl] change (∫⁻ a, Aᶜ.indicator (fun _ => (1:ℝ≥0∞)) a ∂(μ i).map next)=0 rw [lintegral_map (measurable_const.indicator hA.compl) hn, hrestart i hi _ (measurable_const.indicator hA.compl)] apply (lintegral_congr_ae ?_).trans lintegral_zero filter_upwards [hgood i hi] with ω hω rw [lintegral_indicator_const hA.compl,one_mul] exact ae_iff.mp (hprob _ hω)
lemma restart_iteration_ae {Ω I : Type*} [MeasurableSpace Ω] (μ : I → Measure Ω) (state : Ω → I) (next : Ω → Ω) (good : I → Prop) (hn : Measurable next) (hrestart : ∀ i, good i → ∀ g : Ω → ℝ≥0∞, Measurable g → (∫⁻ ω, g (next ω) ∂μ i) = ∫⁻ ω, (∫⁻ η, g η ∂μ (state (next ω))) ∂μ i) (hgood : ∀ i, good i → ∀ᵐ ω ∂μ i, good (state (next ω))) (A : Set Ω) (hA : MeasurableSet A) (hprob : ∀ i, good i → ∀ᵐ ω ∂μ i, ω ∈ A) (N : ℕ) (i : I) (hi : good i) : ∀ᵐ ω ∂μ i, next^[N] ω ∈ A := by induction N generalizing i with | zero => exact hprob i hi | succ N ih => simpa only [Function.iterate_succ_apply, Set.mem_preimage] using restart_preserves_ae μ state next good hn hrestart hgood ((next^[N]) ⁻¹' A) (hA.preimage (hn.iterate N)) ih i hi
lemma measurableSet_countable_chosen {Ω I : Type*} [MeasurableSpace Ω] [MeasurableSpace I] [Countable I] [MeasurableSingletonClass I] (state : Ω → I) (hs : Measurable state) (A : I → Set Ω) (hA : ∀ i, MeasurableSet (A i)) : MeasurableSet {ω | ω ∈ A (state ω)} := by have he : {ω | ω ∈ A (state ω)} = ⋃ i, state ⁻¹' {i} ∩ A i := by ext ω simp only [Set.mem_iUnion,Set.mem_inter_iff,Set.mem_preimage,Set.mem_singleton_iff,Set.mem_ofPred_eq] constructor · intro h; exact ⟨state ω,rfl,h⟩ · rintro ⟨i,hi,h⟩; rwa [hi] rw [he] exact MeasurableSet.iUnion fun i => ((measurableSet_singleton i).preimage hs).inter (hA i)
lemma measurableSet_validObservation {d : ℕ} (e f : Direction d) (b R : ℝ) (K : ℕ) (k : ℝ → ℕ) : MeasurableSet {P | ValidObservation e f b R K k P} := by let ℓ := realPosition (step e) have hND : MeasurableSet {X : Path d | X ∈ NoDrop ℓ (X 0)} := by simpa only [NoDrop,FutureNoDrop,Set.mem_ofPred_eq,Nat.zero_add] using (measurableSet_futureNoDrop ℓ 0) have hNN : MeasurableSet {X : Path d | ∀ n, ∃ g, X (n+1)=X n+step g} := by simp only [Set.ofPred_forall,Set.ofPred_exists] exact MeasurableSet.iInter fun n => MeasurableSet.iUnion fun g => measurableSet_eq_fun (measurable_pi_apply _) ((measurable_pi_apply _).add_const _) have hsex : MeasurableSet {P : Path d × Path d | ∃ n m, selectedBoundaryAt ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P n m} := by apply measurableSet_countable_chosen pairOrigin measurable_pairOrigin (fun i => {P | ∃ n m, selectedBoundaryAt ℓ (observedAdvanceRule e f b K k i) P n m}) intro i simp only [Set.ofPred_exists] exact MeasurableSet.iUnion fun n => MeasurableSet.iUnion fun m => selectedMeasurableSet_boundaryAt ℓ (observedAdvanceRule e f b K k i) n m have hss : MeasurableSet {P : Path d × Path d | selectedBoundaryAt ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P).1 (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P).2} := by convert hsex using 1 ext P constructor · intro h; exact ⟨_,_,h⟩ · exact selectedBoundaryTimes_spec ℓ _ P have hact : MeasurableSet {P : Path d × Path d | pairGap f (pairOrigin P) < R} := measurableSet_lt ((measurable_of_countable (pairGap f)).comp measurable_pairOrigin) measurable_const have hlast : MeasurableSet {P : Path d × Path d | pairGap f (pairOrigin P) < R → selectedBoundaryAt ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P).1 (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k (pairOrigin P)) P).2} := by convert hact.compl.union hss using 1 ext P change (_ → _) ↔ (¬_ ∨ _) exact imp_iff_not_or exact (measurableSet_eq_fun ((measurable_of_countable (signedHeight e)).comp ((measurable_pi_apply 0).comp measurable_fst)) ((measurable_of_countable (signedHeight e)).comp ((measurable_pi_apply 0).comp measurable_snd))).inter ((hND.preimage measurable_fst).inter ((hND.preimage measurable_snd).inter ((hNN.preimage measurable_fst).inter ((hNN.preimage measurable_snd).inter hlast))))
lemma validObservation_ae {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) (b R : ℝ) (K : ℕ) (k : ℝ → ℕ) (hK : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → pairGap f i < R → 0 < observedAdvanceBound f b K k i) (i : Lattice d × Lattice d) (hi : signedHeight e i.1=signedHeight e i.2) : ∀ᵐ P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2, ValidObservation e f b R K k P := by let ℓ := realPosition (step e) have hp : ∀ᵐ P ∂sharedConditionedPairLaw ν ℓ i.1 i.2, pairGap f i < R → selectedBoundaryAt ℓ (observedAdvanceRule e f b K k i) P (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k i) P).1 (selectedBoundaryTimes ℓ (observedAdvanceRule e f b K k i) P).2 := by by_cases ha : pairGap f i < R · exact (shared_selectedBoundaryTimes_spec ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) i.1 i.2 hi _ (hK i hi ha) _ (observedAdvanceRule_height e f b K k i)).mono fun P hP _ => hP · exact Eventually.of_forall fun _ h => (ha h).elim filter_upwards [sharedConditioned_regularPath ν ℓ htrans i.1 i.2,hp] with P hP hsel have ho : pairOrigin P=i := Prod.ext hP.1.1.1 hP.2.1.1 refine ⟨by simpa only [hP.1.1.1,hP.2.1.1] using hi, by simpa only [hP.1.1.1] using hP.1.2, by simpa only [hP.2.1.1] using hP.2.2,hP.1.1.2.1,hP.2.1.2.1,?_⟩ simpa only [ho] using hsel
theorem validObservation_iterates_ae {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (htrans : DirectionallyTransient ν (realPosition (step e))) (b R : ℝ) (K : ℕ) (k : ℝ → ℕ) (hK : ∀ i : Lattice d × Lattice d, signedHeight e i.1=signedHeight e i.2 → pairGap f i < R → 0 < observedAdvanceBound f b K k i) (i : Lattice d × Lattice d) (hi : signedHeight e i.1=signedHeight e i.2) : ∀ᵐ P ∂sharedConditionedPairLaw ν (realPosition (step e)) i.1 i.2, ∀ N, ValidObservation e f b R K k ((commonCutObserver (realPosition (step e)) (fun j => pairGap f j < R) (observedAdvanceRule e f b K k))^[N] P) := by let ℓ := realPosition (step e) let μ := fun j : Lattice d × Lattice d => sharedConditionedPairLaw ν ℓ j.1 j.2 let active := fun j => pairGap f j < R let B := observedAdvanceRule e f b K k let next := commonCutObserver ℓ active B let K' := observedAdvanceBound f b K k have hB : ∀ j, active j → ∀ z w, signedHeight e j.1+K' j ≤ signedHeight e z → B j (z,w) := fun j _ => observedAdvanceRule_height e f b K k j apply ae_all_iff.mpr intro N exact restart_iteration_ae μ pairOrigin next (fun j => signedHeight e j.1=signedHeight e j.2) (measurable_commonCutObserver ℓ active B) (fun j hj g hg => commonCutObserver_restart ν hue e htrans active B K' hK hB j hj g hg) (fun j hj => commonCutObserver_sameHeight ν hue e htrans active B K' hK hB j hj) {P | ValidObservation e f b R K k P} (measurableSet_validObservation e f b R K k) (validObservation_ae ν hue e f htrans b R K k hK) N i hi
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114import Mathlibimport OAI.Probability.Ballisticity.Model
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
lemma occupation_scale_factor {nᵤ nᵣ D u r a : ℝ} (hu : 0 < u) (hr : 0 < r) (hD : 0 ≤ D) (hn : 0 ≤ nᵣ) (hua : u ≤ a*r) (hcomp : nᵤ ≤ D*nᵣ*(u/r)^((7:ℝ)/4)) : nᵤ ≤ (D*nᵣ/r^((3:ℝ)/2))*a^((1:ℝ)/4)*u^((3:ℝ)/2) := by have he : (u/r)^((7:ℝ)/4) = (u/r)^((3:ℝ)/2)*(u/r)^((1:ℝ)/4) := by rw [← Real.rpow_add (div_pos hu hr)] norm_num have hrat : u/r ≤ a := (div_le_iff₀ hr).mpr hua have hm := Real.rpow_le_rpow (div_nonneg hu.le hr.le) hrat (by norm_num : (0:ℝ) ≤ 1/4) calc nᵤ ≤ D*nᵣ*((u/r)^((3:ℝ)/2)*(u/r)^((1:ℝ)/4)) := by simpa only [he] using hcomp _ ≤ D*nᵣ*((u/r)^((3:ℝ)/2)*a^((1:ℝ)/4)) := by gcongr _ = _ := by rw [Real.div_rpow hu.le hr.le]; ring
lemma three_halves_double_factor {b : ℝ} (hb : 0 ≤ b) : (2*b)^((3:ℝ)/2)-b^((3:ℝ)/2) = ((2:ℝ)^((3:ℝ)/2)-1)*b^((3:ℝ)/2) := by rw [Real.mul_rpow (by norm_num) hb] ring
lemma three_halves_double_pos : 0 < (2:ℝ)^((3:ℝ)/2)-1 := by have h := Real.one_lt_rpow (by norm_num : (1:ℝ) < 2) (by norm_num : (0:ℝ) < 3/2) linarith
noncomputable def occupationCoefficient (J C q M b r ρ A δ : ℝ) : ℝ := C*J*(b/r)^((1:ℝ)/4)/(q*((2:ℝ)^((3:ℝ)/2)-1)) + M*J*(2*ρ)^((1:ℝ)/4) + M*J*A^((1:ℝ)/4)*δ
lemma occupationCoefficient_nonneg {J C q M b r ρ A δ : ℝ} (hJ : 0 ≤ J) (hC : 0 ≤ C) (hq : 0 < q) (hM : 0 ≤ M) (hb : 0 ≤ b) (hr : 0 ≤ r) (hρ : 0 ≤ ρ) (hA : 0 ≤ A) (hδ : 0 ≤ δ) : 0 ≤ occupationCoefficient J C q M b r ρ A δ := by unfold occupationCoefficient have hp := three_halves_double_pos positivity
lemma occupationCoefficient_lower {J C q M b r ρ A δ z : ℝ} (hJ : 0 ≤ J) (hC : 0 ≤ C) (hq : 0 < q) (hM : 0 ≤ M) (hb : 0 ≤ b) (hr : 0 ≤ r) (hρ : 0 ≤ ρ) (hA : 0 ≤ A) (hδ : 0 ≤ δ) (hz : z ≤ C*J*(b/r)^((1:ℝ)/4)*b^((3:ℝ)/2)) : z ≤ occupationCoefficient J C q M b r ρ A δ* (q*((2*b)^((3:ℝ)/2)-b^((3:ℝ)/2))) := by have hden : 0 < q*((2:ℝ)^((3:ℝ)/2)-1) := mul_pos hq three_halves_double_pos have hrest : 0 ≤ M*J*(2*ρ)^((1:ℝ)/4)+M*J*A^((1:ℝ)/4)*δ := by positivity have hp : 0 ≤ b^((3:ℝ)/2) := Real.rpow_nonneg hb _ rw [three_halves_double_factor hb] apply hz.trans have hcoefficient : C*J*(b/r)^((1:ℝ)/4)/(q*((2:ℝ)^((3:ℝ)/2)-1)) ≤ occupationCoefficient J C q M b r ρ A δ := by unfold occupationCoefficient linarith have hm := mul_le_mul hcoefficient (le_refl (q*((2:ℝ)^((3:ℝ)/2)-1)*b^((3:ℝ)/2))) (mul_nonneg hden.le hp) (occupationCoefficient_nonneg hJ hC hq hM hb hr hρ hA hδ) rw [← mul_assoc, div_mul_cancel₀ _ hden.ne'] at hm simpa only [mul_assoc] using hm
lemma occupationCoefficient_upper {J C q M b r ρ A δ t u v : ℝ} (hJ : 0 ≤ J) (hC : 0 ≤ C) (hq : 0 < q) (hM : 0 < M) (hb : 0 ≤ b) (hr : 0 ≤ r) (hρ : 0 ≤ ρ) (hA : 0 ≤ A) (hδ : 0 ≤ δ) (ht : 0 ≤ t) (hu : 0 ≤ u) (hv : v ≤ t*J*(2*ρ)^((1:ℝ)/4)*u^((3:ℝ)/2)) : v ≤ occupationCoefficient J C q M b r ρ A δ*(t/M*u^((3:ℝ)/2)) := by have hfirst : 0 ≤ C*J*(b/r)^((1:ℝ)/4)/(q*((2:ℝ)^((3:ℝ)/2)-1)) := by have hp := three_halves_double_pos positivity have hlast : 0 ≤ M*J*A^((1:ℝ)/4)*δ := by positivity have hcoef : M*J*(2*ρ)^((1:ℝ)/4) ≤ occupationCoefficient J C q M b r ρ A δ := by unfold occupationCoefficient linarith have hm := mul_le_mul hcoef (le_refl (t/M*u^((3:ℝ)/2))) (by positivity) (occupationCoefficient_nonneg hJ hC hq hM.le hb hr hρ hA hδ) apply hv.trans convert hm using 1 field_simp
lemma occupationCoefficient_far {J C q M b r ρ A δ t u v : ℝ} (hJ : 0 ≤ J) (hC : 0 ≤ C) (hq : 0 < q) (hM : 0 < M) (hb : 0 ≤ b) (hr : 0 ≤ r) (hρ : 0 ≤ ρ) (hA : 0 ≤ A) (hδ : 0 ≤ δ) (ht : 0 ≤ t) (hu : 0 ≤ u) (hv : v ≤ t*J*A^((1:ℝ)/4)*u^((3:ℝ)/2)*δ) : v ≤ occupationCoefficient J C q M b r ρ A δ*(t/M*u^((3:ℝ)/2)) := by have hfirst : 0 ≤ C*J*(b/r)^((1:ℝ)/4)/(q*((2:ℝ)^((3:ℝ)/2)-1)) := by have hp := three_halves_double_pos positivity have hnear : 0 ≤ M*J*(2*ρ)^((1:ℝ)/4) := by positivity have hcoef : M*J*A^((1:ℝ)/4)*δ ≤ occupationCoefficient J C q M b r ρ A δ := by unfold occupationCoefficient linarith have hm := mul_le_mul hcoef (le_refl (t/M*u^((3:ℝ)/2))) (by positivity) (occupationCoefficient_nonneg hJ hC hq hM.le hb hr hρ hA hδ) apply hv.trans convert hm using 1 field_simp
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246import Mathlibimport OAI.Probability.Ballisticity.Crossings.OccupationCutoffsimport OAI.Probability.Ballisticity.Crossings.PhysicalExitimport OAI.Probability.Ballisticity.Estimates.AllLayerOccupation
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
noncomputable def firstHitOccupationMean {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) (x y : Lattice d) (s : ℝ) (H : ℕ) : ℝ := ∑ j ∈ Finset.range H, (sharedConditionedPairLaw ν (realPosition (step e)) x y).real {P | |physicalFirstHitGap (realPosition (step e)) f x y j P| ≤ s}
lemma firstHitOccupationMean_nonneg {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) (x y : Lattice d) (s : ℝ) (H : ℕ) : 0 ≤ firstHitOccupationMean ν e f x y s H := Finset.sum_nonneg fun _ _ => measureReal_nonneg
theorem occupation_fixed_parameters {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : IsGaussianSequence (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r) (x : ℕ → Lattice d) {T A t ρ : ℝ} (hT : 0 < T) (hA : 1 ≤ A) (ht : 0 < t) (htmax : t ≤ 1/1000000) (hρ : 0 < ρ) {c : ℝ≥0∞} (hc : 0 < c) (hcu : ∀ u v, c ≤ sharedNoDropMass ν (realPosition (step e)) u v) {η : ℝ} (hη : 0 < η) : let ℓ := realPosition (step e) let m := commonMeanWidth ν ℓ let n := fun i => fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ f 0) (r i) ∀ᶠ i in atTop, firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (⌊T*n i⌋₊+1)/n i ≤ (occupationMacroConstant A*((128*m)*(2*ρ)^((1:ℝ)/4)+ (128*m)*A^((1:ℝ)/4)*(8*Real.exp (-m/(16*t))))+ T*(8*Real.exp (-m*A^2/(4*T))))/c.toReal+η := by dsimp only let ℓ := realPosition (step e) let m := commonMeanWidth ν ℓ let M := 128*m let n := fun i => fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ f 0) (r i) let H := fun i => ⌊T*n i⌋₊+1 let δ := 8*Real.exp (-m/(16*t)) let a := 8*Real.exp (-m*A^2/(4*T)) let μ := fun i => sharedConditionedPairLaw ν ℓ (x i) (x i) let : ∀ i, IsProbabilityMeasure (μ i) := fun i => sharedConditionedPairLaw_probability ν ℓ (x i) (x i) (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans (x i) (x i))) have hcfin : c ≠ ⊤ := ne_top_of_le_ne_top (show sharedNoDropMass ν ℓ 0 0 ≠ ⊤ from ne_top_of_le_ne_top (by simp) (show sharedNoDropMass ν ℓ 0 0 ≤ 1 from sharedNoDropMass_le_one ν ℓ 0 0)) (hcu 0 0) have hcr : 0 < c.toReal := ENNReal.toReal_pos hc.ne' hcfin obtain ⟨D⟩ := exists_occupationData ν hue e f hef htrans ht htmax obtain ⟨b,K,hb,hb0,hgood,hK⟩ := occupation_cutoff_escape ν hue e f hef htrans D A r hr have hm : 0 < m := zero_lt_one.trans_le (commonMeanWidth_ge_one ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e)) have hM : 0 < M := by dsimp [M]; positivity have ha : 0 < a := by dsimp [a]; positivity have hδ : 0 ≤ δ := by dsimp [δ]; positivity have hA0 : 0 < A := zero_lt_one.trans_le hA let C := D.C/(D.q*((2:ℝ)^((3:ℝ)/2)-1)) let L := occupationMacroConstant A*(M*(2*ρ)^((1:ℝ)/4)+M*A^((1:ℝ)/4)*δ)+T*a let B := fun i => 1/n i + (occupationMacroConstant A*(C*(b i/r i)^((1:ℝ)/4)+ M*(2*ρ)^((1:ℝ)/4)+M*A^((1:ℝ)/4)*δ)+(T+1/n i)*a)/c.toReal have hnInf := recordFluctuationScale_tendsto ν hue e f hef htrans r hr.1 have hinv : Tendsto (fun i => 1/n i) atTop (𝓝 0) := by convert tendsto_inv_atTop_zero.comp hnInf using 1 simp only [Function.comp_def,n,ℓ,one_div] have hpow : Tendsto (fun i => (b i/r i)^((1:ℝ)/4)) atTop (𝓝 0) := by simpa only [Real.zero_rpow (by norm_num : (1:ℝ)/4 ≠ 0)] using hb0.rpow_const (Or.inr (by norm_num : (0:ℝ) ≤ 1/4)) have hB : Tendsto B atTop (𝓝 (L/c.toReal)) := by have hh : Tendsto B atTop (𝓝 (0+(occupationMacroConstant A*(C*0+M*(2*ρ)^((1:ℝ)/4)+ M*A^((1:ℝ)/4)*δ)+(T+0)*a)/c.toReal)) := hinv.add (((tendsto_const_nhds.mul (((tendsto_const_nhds.mul hpow).add tendsto_const_nhds).add tendsto_const_nhds)).add (((tendsto_const_nhds.add hinv).mul tendsto_const_nhds))).div_const c.toReal) simpa only [mul_zero,zero_add,add_zero] using hh have hless := hB.eventually_lt_const (show L/c.toReal < L/c.toReal+η by linarith) have hexit := shared_physical_exit_gaussian ν hue e f hef htrans r hr x hT hA0 filter_upwards [hless,hexit,hr.1.eventually_gt_atTop 0, hb0.eventually_lt_const (by norm_num : (0:ℝ)<1), hb0.eventually_lt_const (mul_pos (by norm_num : (0:ℝ)<2) hρ)] with i hBi hei hri hbri hbs have hni : 0 < n i := recordFluctuationScale_pos ν hue e f hef htrans hri have hbpos : 0 < b i := D.u₀_pos.trans_le (hb i) have hbr : b i ≤ r i := by exact (div_lt_one hri).mp hbri |>.le have hbs' : b i ≤ 2*(ρ*r i) := by have hh := (div_lt_iff₀ hri).mp hbs nlinarith let J := max ((2:ℝ)^((7:ℝ)/4)) (A^2)*n i/(r i)^((3:ℝ)/2) let V := occupationCoefficient J D.C D.q M (b i) (r i) ρ A δ*(2*(A*r i))^((3:ℝ)/2) have hJ : 0 ≤ J := div_nonneg (mul_nonneg ((sq_nonneg A).trans (le_max_right _ _)) hni.le) (Real.rpow_nonneg hri.le _) have hV : 0 ≤ V := mul_nonneg (occupationCoefficient_nonneg hJ D.C_pos.le D.q_pos hM.le hbpos.le hri.le hρ.le hA0.le hδ) (Real.rpow_nonneg (by positivity) _) have hfinite := occupation_finite_bound ν hue e f hef htrans ht D (hb i) hbr hρ.le hA hbs' (hgood i) (K i) (hK i).1 (hK i).2.1 (hK i).2.2 (H i) (x i,x i) rfl dsimp only at hfinite rw [smallCommonCount_lintegral ν e f htrans (x i) (x i) (ρ*r i) (H i)] at hfinite have hreal := real_sum_le_of_ennreal_count (μ := μ i) (fun j => SmallCommonLayer e f (ρ*r i) (signedHeight e (x i)+j)) (H i) V (PhysicalGapExit e f (A*r i) (H i) (x i,x i)) hV hfinite have hall := all_layers_occupation_le ν hue e f htrans (x i) (x i) rfl (ρ*r i) (H i) c hcu rw [smallCommonCount_lintegral ν e f htrans (x i) (x i) (ρ*r i) (H i)] at hall have hallr := real_all_layer_bound (μ := μ i) _ _ (H i) hcfin hall have htotal : c.toReal*firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (H i) ≤ c.toReal+V+(H i:ℝ)*a := by have hh := mul_le_mul_of_nonneg_left hei (Nat.cast_nonneg (H i)) dsimp only [firstHitOccupationMean] linarith have hH : (H i:ℝ)/n i ≤ T+1/n i := by have hh := Nat.floor_le (mul_nonneg hT.le hni.le) dsimp only [H] rw [Nat.cast_add,Nat.cast_one] apply (div_le_iff₀ hni).mpr field_simp nlinarith have hnorm := occupation_coefficient_normalization hri hni hA0.le D.C D.q M (b i) ρ δ have hbound : firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (H i)/n i ≤ B i := by have hh := (div_le_div_iff_of_pos_right hni).mpr htotal have he : (c.toReal+V+(H i:ℝ)*a)/n i=c.toReal/n i+V/n i+((H i:ℝ)/n i)*a := by ring rw [he] at hh have hu := mul_le_mul_of_nonneg_right hH ha.le have hVN : V/n i=occupationMacroConstant A*(C*(b i/r i)^((1:ℝ)/4)+ M*(2*ρ)^((1:ℝ)/4)+M*A^((1:ℝ)/4)*δ) := by simpa only [V,J,C,div_eq_mul_inv,mul_assoc,mul_comm,mul_left_comm] using hnorm rw [hVN] at hh dsimp only [B] have hh' := hh.trans (add_le_add_right hu _) have heq : c.toReal * (firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (H i)/n i) = c.toReal * firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (H i)/n i := by ring have hdiv : c.toReal * ((occupationMacroConstant A * (C*(b i/r i)^((1:ℝ)/4)+M*(2*ρ)^((1:ℝ)/4)+M*A^((1:ℝ)/4)*δ)+(T+1/n i)*a)/c.toReal) = occupationMacroConstant A * (C*(b i/r i)^((1:ℝ)/4)+M*(2*ρ)^((1:ℝ)/4)+M*A^((1:ℝ)/4)*δ)+(T+1/n i)*a := mul_div_cancel₀ _ hcr.ne' have hcdiv : c.toReal/n i = c.toReal*(1/n i) := by ring nlinarith only [hh',heq,hdiv,hcdiv,hcr] exact hbound.trans hBi.le
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
lemma occupation_parameter_choice {m T c ε : ℝ} (hm : 0 < m) (hT : 0 < T) (hc : 0 < c) (hε : 0 < ε) : ∃ A t ρ : ℝ, 1 ≤ A ∧ 0 < t ∧ t ≤ 1/1000000 ∧ 0 < ρ ∧ (occupationMacroConstant A*((128*m)*(2*ρ)^((1:ℝ)/4)+ (128*m)*A^((1:ℝ)/4)*(8*Real.exp (-m/(16*t))))+ T*(8*Real.exp (-m*A^2/(4*T))))/c < ε := by have hcoef : 0 < m/(4*T) := by positivity have hexp : Tendsto (fun A : ℝ => Real.exp (-m*A^2/(4*T))) atTop (𝓝 0) := by have hh := Real.tendsto_exp_atBot.comp (tendsto_neg_atTop_atBot.comp ((tendsto_pow_atTop (by norm_num : (2:ℕ) ≠ 0)).const_mul_atTop hcoef)) convert hh using 1 funext A simp only [Function.comp_apply] congr 1 ring have hex : ∀ᶠ A : ℝ in atTop, T*(8*Real.exp (-m*A^2/(4*T))) < ε*c/3 := by have hh : Tendsto (fun A : ℝ => T*(8*Real.exp (-m*A^2/(4*T)))) atTop (𝓝 0) := by simpa only [mul_zero] using hexp.const_mul 8 |>.const_mul T exact hh.eventually_lt_const (by positivity) obtain ⟨A,hA,ha⟩ := ((eventually_ge_atTop (1:ℝ)).and hex).exists let K := occupationMacroConstant A let M := 128*m have htlim : Tendsto (fun z : ℝ => K*(M*A^((1:ℝ)/4)*(8*Real.exp (-m*z/16)))) atTop (𝓝 0) := by have he : Tendsto (fun z : ℝ => Real.exp (-m*z/16)) atTop (𝓝 0) := by have hh := Real.tendsto_exp_atBot.comp (tendsto_neg_atTop_atBot.comp (tendsto_id.const_mul_atTop (by positivity : 0 < m/16))) convert hh using 1 funext z simp only [Function.comp_apply,id_eq] congr 1 ring simpa only [mul_zero] using (he.const_mul 8).const_mul (M*A^((1:ℝ)/4)) |>.const_mul K obtain ⟨z,hz,hzsmall⟩ := ((eventually_ge_atTop (1000000:ℝ)).and (htlim.eventually_lt_const (show 0 < ε*c/3 by positivity))).exists have hzpos : 0 < z := lt_of_lt_of_le (by norm_num) hz let t := 1/z have ht : 0 < t := one_div_pos.mpr hzpos have htmax : t ≤ 1/1000000 := one_div_le_one_div_of_le (by norm_num) hz have htterm : K*(M*A^((1:ℝ)/4)*(8*Real.exp (-m/(16*t)))) < ε*c/3 := by have heq : -m/(16*t) = -m*z/16 := by dsimp [t] field_simp rw [heq] exact hzsmall have hrpow : Tendsto (fun z : ℝ => (2*(1/z))^((1:ℝ)/4)) atTop (𝓝 0) := by have hi : Tendsto (fun z : ℝ => 2*(1/z)) atTop (𝓝 0) := by simpa only [one_div,mul_zero] using (tendsto_inv_atTop_zero (𝕜 := ℝ)).const_mul 2 simpa only [Real.zero_rpow (by norm_num : (1:ℝ)/4 ≠ 0)] using hi.rpow_const (Or.inr (by norm_num : (0:ℝ) ≤ 1/4)) have hrholim : Tendsto (fun z : ℝ => K*(M*(2*(1/z))^((1:ℝ)/4))) atTop (𝓝 0) := by simpa only [mul_zero] using (hrpow.const_mul M).const_mul K obtain ⟨w,hw,hwsmall⟩ := ((eventually_gt_atTop (0:ℝ)).and (hrholim.eventually_lt_const (show 0 < ε*c/3 by positivity))).exists refine ⟨A,t,1/w,hA,ht,htmax,one_div_pos.mpr hw,?_⟩ apply (div_lt_iff₀ hc).mpr dsimp only [K,M] at htterm hwsmall linarith
theorem shared_first_hit_occupation_vanishes {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : IsGaussianSequence (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r) (x : ℕ → Lattice d) {T ε : ℝ} (hT : 0 < T) (hε : 0 < ε) : ∃ ρ : ℝ, 0 < ρ ∧ let n := fun i => fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i) ∀ᶠ i in atTop, firstHitOccupationMean ν e f (x i) (x i) (ρ*r i) (⌊T*n i⌋₊+1)/n i ≤ ε := by let ℓ := realPosition (step e) let m := commonMeanWidth ν ℓ have hm : 0 < m := zero_lt_one.trans_le (commonMeanWidth_ge_one ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e)) obtain ⟨c,hc,hcu⟩ := sharedNoDropMass_uniform_positive ν hue ℓ (signed_direction_unit e) htrans have hcfin : c ≠ ⊤ := ne_top_of_le_ne_top (show sharedNoDropMass ν ℓ 0 0 ≠ ⊤ from ne_top_of_le_ne_top (by simp) (show sharedNoDropMass ν ℓ 0 0 ≤ 1 from sharedNoDropMass_le_one ν ℓ 0 0)) (hcu 0 0) have hcr : 0 < c.toReal := ENNReal.toReal_pos hc.ne' hcfin obtain ⟨A,t,ρ,hA,ht,htmax,hρ,hsmall⟩ := occupation_parameter_choice hm hT hcr (show 0 < ε/2 by positivity) refine ⟨ρ,hρ,?_⟩ have hb := occupation_fixed_parameters ν hue e f hef htrans r hr x hT hA ht htmax hρ hc hcu (show 0 < ε/2 by positivity) filter_upwards [hb] with i hi exact hi.trans (by linarith)
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132import Mathlibimport OAI.Probability.Ballisticity.Crossings.FixedLowerCutoffEscapeimport OAI.Probability.Ballisticity.Estimates.SharedShrinkingimport OAI.Probability.Ballisticity.Crossings.UniformLowerCutoffimport OAI.Probability.Ballisticity.Estimates.ObservedPotential
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience
structure OccupationData {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) (t : ℝ) where l : ℝ ε : ℝ u₀ : ℝ C : ℝ q : ℝ l_pos : 0 < l l_le_one : l ≤ 1 ε_pos : 0 < ε u₀_pos : 0 < u₀ C_pos : 0 < C q_pos : 0 < q doubling : (2:ℝ)^((7:ℝ)/4) ≤ 4/(1+4*ε) upper : ∀ u : ℝ, u₀ ≤ u → fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) u* (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*u < |commonIncrementProcess (realPosition (step e)) f 0 P|} ≤ ε → ∀ x y : Lattice d, signedHeight e x=signedHeight e y → |signedCoordinate f (x-y)|=u → ∀ b R : ℝ, b ≤ u → u ≤ R → let H := ⌊t*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) u⌋₊ 0 < H ∧ u^((3:ℝ)/2)+t/(128*commonMeanWidth ν (realPosition (step e)))*u^((3:ℝ)/2) ≤ ∫ P, observedPotential b R (signedCoordinate f ((boundaryData (realPosition (step e)) ((signedHeight e x+H:ℤ):ℝ) P).endpoints.1- (boundaryData (realPosition (step e)) ((signedHeight e x+H:ℤ):ℝ) P).endpoints.2)) ∂sharedConditionedPairLaw ν (realPosition (step e)) x y shrink : ∀ u : ℝ, u₀ ≤ u → fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) u* (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*u < |commonIncrementProcess (realPosition (step e)) f 0 P|} ≤ ε → ∀ x y : Lattice d, signedHeight e x=signedHeight e y → |signedCoordinate f (x-y)|=u → (sharedConditionedPairLaw ν (realPosition (step e)) x y).real {P | ∃ h ≤ ⌊t*fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) u⌋₊, |physicalFirstHitGap (realPosition (step e)) f x y h P| ≤ u/2} ≤ 8*Real.exp (-commonMeanWidth ν (realPosition (step e))/(16*t)) escape : ∀ b : ℝ, (b=u₀ ∨ ∃ D : ℝ, u₀ ≤ D ∧ ε ≤ fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) D* (independentConditionedPairLaw ν (realPosition (step e))).real {P | l*D < |commonIncrementProcess (realPosition (step e)) f 0 P|} ∧ b=4*D) → LowerEscape ν e f b C q
lemma exists_occupationData {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) {t : ℝ} (ht : 0 < t) (htmax : t ≤ 1/1000000) : Nonempty (OccupationData ν e f t) := by let ℓ := realPosition (step e) let μ := independentConditionedPairLaw ν ℓ let S := commonIncrementProcess ℓ f 0 let n := fluctuationScale μ S let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) obtain ⟨l₁,ε₁,R₁,hl₁,hl₁one,hε₁,hR₁,hup⟩ := shared_boundary_potential_drift ν hue e f hef htrans ht htmax obtain ⟨l₂,ε₂,R₂,hl₂,hl₂one,hε₂,hR₂,hshr⟩ := shared_uniform_good_shrinking ν hue e f hef htrans ht have hpow : (2:ℝ)^((7:ℝ)/4) < 4 := by have h := Real.rpow_lt_rpow_of_exponent_lt (by norm_num : (1:ℝ) < 2) (by norm_num : (7:ℝ)/4 < 2) norm_num [Real.rpow_two] at h ⊢ exact h let ε₀ := (4-(2:ℝ)^((7:ℝ)/4))/16 have hε₀ : 0 < ε₀ := by dsimp [ε₀]; positivity let l := min l₁ l₂ let ε := min ε₁ (min ε₂ ε₀) have hl : 0 < l := lt_min hl₁ hl₂ have hl1 : l ≤ 1 := (min_le_left _ _).trans hl₁one.le have hε : 0 < ε := lt_min hε₁ (lt_min hε₂ hε₀) have hε₁' : ε ≤ ε₁ := min_le_left _ _ have hε₂' : ε ≤ ε₂ := (min_le_right _ _).trans (min_le_left _ _) obtain ⟨Cb,qb,D₀,hCb,hqb,hD₀,hbad⟩ := bad_radius_lower_escape_uniform ν hue e f hef htrans hl hl1 hε let u₀ := max (max R₁ R₂) D₀ have hu₀ : 0 < u₀ := hD₀.trans_le (le_max_right _ _) have hR₁' : R₁ ≤ u₀ := (le_max_left _ _).trans (le_max_left _ _) have hR₂' : R₂ ≤ u₀ := (le_max_right _ _).trans (le_max_left _ _) obtain ⟨Cf,qf,hCf,hqf,hfixed⟩ := fixed_lower_cutoff_escape ν hue e f hef htrans hu₀ refine ⟨{ l := l, ε := ε, u₀ := u₀, C := max Cb Cf, q := min qb qf, l_pos := hl, l_le_one := hl1, ε_pos := hε, u₀_pos := hu₀, C_pos := hCb.trans_le (le_max_left _ _), q_pos := lt_min hqb hqf, doubling := ?_, upper := ?_, shrink := ?_, escape := ?_ }⟩ · apply (le_div_iff₀ (by positivity : (0:ℝ) < 1+4*ε)).mpr have heps : ε ≤ ε₀ := (min_le_right _ _).trans (min_le_right _ _) have hp : 0 ≤ (2:ℝ)^((7:ℝ)/4) := Real.rpow_nonneg (by norm_num) _ have hh := mul_le_mul_of_nonneg_left heps hp dsimp [ε₀] at hh nlinarith [sq_nonneg ((2:ℝ)^((7:ℝ)/4)-4)] · intro u hu hg x y hxy hgap b R hb hR apply hup u (hR₁'.trans hu) _ x y hxy hgap b R hb hR have ht' : μ.real {P | l₁*u < |S P|} ≤ μ.real {P | l*u < |S P|} := by apply measureReal_mono _ (measure_ne_top μ _) intro P hP exact lt_of_le_of_lt (mul_le_mul_of_nonneg_right (min_le_left _ _) (hu₀.le.trans hu)) hP exact (mul_le_mul_of_nonneg_left ht' (fluctuationScale_nonneg μ S u)).trans (hg.trans hε₁') · intro u hu hg x y hxy hgap apply hshr u (hR₂'.trans hu) _ x y hxy hgap have ht' : μ.real {P | l₂*u < |S P|} ≤ μ.real {P | l*u < |S P|} := by apply measureReal_mono _ (measure_ne_top μ _) intro P hP exact lt_of_le_of_lt (mul_le_mul_of_nonneg_right (min_le_right _ _) (hu₀.le.trans hu)) hP exact (mul_le_mul_of_nonneg_left ht' (fluctuationScale_nonneg μ S u)).trans (hg.trans hε₂') · intro b hb rcases hb with rfl | ⟨D,hD,hg,rfl⟩ · exact LowerEscape.mono hfixed (le_max_right _ _) (min_le_right _ _) · exact (hbad D ((le_max_right _ _).trans hD) hg).mono (le_max_left _ _) (min_le_left _ _)
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221import Mathlibimport OAI.Probability.Ballisticity.Stationary.StationaryCompactimport OAI.Probability.Ballisticity.Estimates.SamplingLimitimport OAI.Probability.Ballisticity.Estimates.SamplingLaw
namespace OAI
section
open MeasureTheory ProbabilityTheory Filter TopologicalSpaceopen scoped ENNReal NNReal BigOperators Classicalnamespace DirectionalTransience
noncomputable def actualOccupationRaw {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (N : ℕ) (M : Environment d → ℕ) : Measure (ActualEpisodeArray e) := StationaryCompact.episodeOccupationRaw N (episodeInputLaw e ν Q t ht) (actualArrayMap e t J) (fun X => M X.1.1) StationaryCompact.shift
instance actualOccupationRaw_finite {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (N : ℕ) (M : Environment d → ℕ) : IsFiniteMeasure (actualOccupationRaw e ν Q t J ht N M) := by unfold actualOccupationRaw infer_instance
lemma actualOccupationRaw_integral {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (F : C(ActualEpisodeArray e,ℝ)) : (∫ Y, F Y ∂actualOccupationRaw e ν Q t J ht N M)= ∑ i∈Finset.range N, ∫ X, F (StationaryCompact.shift^[i] (actualArrayMap e t J X)) ∂episodeInputLaw e ν (Q.restrict {ω | i<M ω}) t ht := by unfold actualOccupationRaw StationaryCompact.episodeOccupationRaw rw [integral_finsetSum_measure (fun i _ => F.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] apply Finset.sum_congr rfl intro i _ have hm : Measurable (fun X : EpisodeInput e => StationaryCompact.shift^[i] (actualArrayMap e t J X)) := (StationaryCompact.shift_continuous.measurable.iterate i).comp (actualArrayMap_measurable e t J ht hJ) rw [integral_map hm.aemeasurable F.continuous.aestronglyMeasurable] have hr : (episodeInputLaw e ν Q t ht).restrict {X | i<M X.1.1}= episodeInputLaw e ν (Q.restrict {ω | i<M ω}) t ht := episodeInputLaw_restrict e ν Q t ht {ω | i<M ω} (measurableSet_lt measurable_const hM) change (∫ X, F (StationaryCompact.shift^[i] (actualArrayMap e t J X)) ∂(episodeInputLaw e ν Q t ht).restrict {X | i<M X.1.1})=_ rw [hr]
lemma episodeInputLaw_real_univ {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) : (episodeInputLaw e ν Q t ht).real Set.univ=Q.real Set.univ := by simp [Measure.real,episodeInputLaw,Measure.prod_apply,Measure.compProd_apply, measure_univ]
lemma actualOccupationRaw_mass {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) : (actualOccupationRaw e ν Q t J ht N M).real Set.univ= ∑ i∈Finset.range N, (Q.restrict {ω | i<M ω}).real Set.univ := by have h := actualOccupationRaw_integral e ν Q t J ht hJ N M hM (1 : C(ActualEpisodeArray e,ℝ)) simpa only [ContinuousMap.one_apply,integral_const,smul_eq_mul,mul_one, episodeInputLaw_real_univ] using h
lemma actualOccupationRaw_sampling_sq {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (p : ℤ×ℕ) (j : ℤ) (z : HorizontalSpace e) (n : ℕ) (hn : 0<n) : (∫ Y, (arraySamplingError e p j z n Y)^2 ∂actualOccupationRaw e ν Q t J ht N M)≤ (actualOccupationRaw e ν Q t J ht N M).real Set.univ*(n:ℝ)⁻¹ := by let F : C(ActualEpisodeArray e,ℝ) := ⟨fun Y => (arraySamplingError e p j z n Y)^2,by fun_prop⟩ change (∫ Y, F Y ∂actualOccupationRaw e ν Q t J ht N M)≤_ rw [actualOccupationRaw_integral e ν Q t J ht hJ N M hM F, actualOccupationRaw_mass e ν Q t J ht hJ N M hM,Finset.sum_mul] apply Finset.sum_le_sum intro i _ simp only [F,ContinuousMap.coe_mk,arraySamplingError_iterate] exact actual_array_sampling_sq_law e ν (Q.restrict {ω | i<M ω}) t J ht hJ _ _ z n hn
lemma actualOccupationRaw_sampling_test {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (p q : ℤ×ℕ) (hpq : p≠q) (z : HorizontalSpace e) (g : C(ℝ,ℝ)) : (∫ Y, g (arrayProfileTest e q.1 p z Y)* (arrayOffsetTest e p q z Y-arrayProfileTest e q.1 p z Y) ∂actualOccupationRaw e ν Q t J ht N M)=0 := by let F : C(ActualEpisodeArray e,ℝ) := ⟨fun Y => g (arrayProfileTest e q.1 p z Y)* (arrayOffsetTest e p q z Y-arrayProfileTest e q.1 p z Y), (g.continuous.comp (arrayProfileTest e q.1 p z).continuous).mul ((arrayOffsetTest e p q z).continuous.sub (arrayProfileTest e q.1 p z).continuous)⟩ change (∫ Y, F Y ∂actualOccupationRaw e ν Q t J ht N M)=_ rw [actualOccupationRaw_integral e ν Q t J ht hJ N M hM F] apply Finset.sum_eq_zero intro i _ simp only [F,ContinuousMap.coe_mk,arrayProfileTest_iterate,arrayOffsetTest_iterate] have hneq : (p.1+(i:ℤ),p.2)≠(q.1+(i:ℤ),q.2) := by intro he apply hpq apply Prod.ext · exact add_right_cancel (congrArg Prod.fst he) · have hh := congrArg (fun r : ℤ×ℕ => r.2) he exact hh exact actual_array_sampling_test_law e ν (Q.restrict {ω | i<M ω}) t J ht hJ (p.1+(i:ℤ),p.2) (q.1+(i:ℤ),q.2) hneq z g
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filter TopologicalSpaceopen scoped ENNReal NNReal BigOperators Classical Topologynamespace DirectionalTransience
noncomputable def actualOccupation {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (N : ℕ) (M : Environment d → ℕ) : ProbabilityMeasure (ActualEpisodeArray e) := by haveI : Nonempty (Row d) := nonempty_of_isProbabilityMeasure ν exact FiniteMeasure.normalize (⟨actualOccupationRaw e ν Q t J ht N M,inferInstance⟩ : FiniteMeasure (ActualEpisodeArray e))
lemma actualOccupation_integral {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (N : ℕ) (M : Environment d → ℕ) (hpos : 0<(actualOccupationRaw e ν Q t J ht N M).real Set.univ) (F : ActualEpisodeArray e → ℝ) : (∫ Y, F Y ∂(actualOccupation e ν Q t J ht N M : Measure (ActualEpisodeArray e)))= ((actualOccupationRaw e ν Q t J ht N M).real Set.univ)⁻¹ * ∫ Y, F Y ∂actualOccupationRaw e ν Q t J ht N M := by have : Nonempty (Row d) := nonempty_of_isProbabilityMeasure ν let ρ : FiniteMeasure (ActualEpisodeArray e) := ⟨actualOccupationRaw e ν Q t J ht N M,inferInstance⟩ have hn : ρ≠0 := by intro hz have hh : (actualOccupationRaw e ν Q t J ht N M).real Set.univ=0 := by change (ρ : Measure (ActualEpisodeArray e)).real Set.univ=0 rw [hz] simp linarith change (∫ Y, F Y ∂(ρ.normalize : Measure (ActualEpisodeArray e)))=_ rw [←ρ.average_eq_integral_normalize hn,average,integral_smul_measure] simp only [ENNReal.toReal_inv,smul_eq_mul] rfl
lemma actualOccupation_sampling_sq {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (hpos : 0<(actualOccupationRaw e ν Q t J ht N M).real Set.univ) (p : ℤ×ℕ) (j : ℤ) (z : HorizontalSpace e) (n : ℕ) (hn : 0<n) : (∫ Y, (arraySamplingError e p j z n Y)^2 ∂(actualOccupation e ν Q t J ht N M : Measure (ActualEpisodeArray e)))≤(n:ℝ)⁻¹ := by rw [actualOccupation_integral e ν Q t J ht N M hpos] have hb := actualOccupationRaw_sampling_sq e ν Q t J ht hJ N M hM p j z n hn exact (mul_le_mul_of_nonneg_left hb (inv_nonneg.mpr hpos.le)).trans_eq (by rw [←mul_assoc,inv_mul_cancel₀ hpos.ne',one_mul])
lemma actualOccupation_sampling_test {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (hpos : 0<(actualOccupationRaw e ν Q t J ht N M).real Set.univ) (p q : ℤ×ℕ) (hpq : p≠q) (z : HorizontalSpace e) (g : C(ℝ,ℝ)) : (∫ Y, g (arrayProfileTest e q.1 p z Y)* (arrayOffsetTest e p q z Y-arrayProfileTest e q.1 p z Y) ∂(actualOccupation e ν Q t J ht N M : Measure (ActualEpisodeArray e)))=0 := by rw [actualOccupation_integral e ν Q t J ht N M hpos, actualOccupationRaw_sampling_test e ν Q t J ht hJ N M hM p q hpq z g,mul_zero]
section WeakLimitvariable {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : ℕ → Measure (Environment d)) [∀ r, IsFiniteMeasure (Q r)] (t J : ℕ → Environment d → ℤ → ℕ) (ht : ∀ r i, Measurable fun ω => t r ω i) (hJ : ∀ r i, Measurable fun ω => J r ω i) (N : ℕ → ℕ) (M : ℕ → Environment d → ℕ) (hM : ∀ r, Measurable (M r)) (hpos : ∀ r, 0<(actualOccupationRaw e ν (Q r) (t r) (J r) (ht r) (N r) (M r)).real Set.univ) (L : ProbabilityMeasure (ActualEpisodeArray e)) (hlim : Tendsto (fun r => actualOccupation e ν (Q r) (t r) (J r) (ht r) (N r) (M r)) atTop (𝓝 L))
include hJ hM hpos hlim
theorem actualOccupation_limit_sampling (p : ℤ×ℕ) (j : ℤ) (z : HorizontalSpace e) : ∀ᵐ Y ∂(L : Measure (ActualEpisodeArray e)), Tendsto (fun n => arraySamplingError e p j z (2^n) Y) atTop (𝓝 0) := by apply Sampling.ae_sampling_of_weak_limit _ L hlim (fun n => arraySamplingError e p j z (2^n)) (fun n => ((2:ℕ)^n:ℝ)⁻¹) · simpa only [Nat.cast_pow,Nat.cast_ofNat,inv_pow] using summable_geometric_of_norm_lt_one (x:=((2:ℝ)⁻¹)) (by norm_num) · intro r n simpa only [Nat.cast_pow,Nat.cast_ofNat] using actualOccupation_sampling_sq e ν (Q r) (t r) (J r) (ht r) (hJ r) (N r) (M r) (hM r) (hpos r) p j z (2^n) (pow_pos (by norm_num) n)
theorem actualOccupation_limit_zero (p q : ℤ×ℕ) (hpq : p≠q) (z : HorizontalSpace e) : ∀ᵐ Y ∂(L : Measure (ActualEpisodeArray e)), arrayProfileTest e q.1 p z Y=0 → arrayOffsetTest e p q z Y=0 := by apply Sampling.ae_zero_of_sampling_tests (arrayProfileTest e q.1 p z) (arrayOffsetTest e p q z) (arrayProfileTest e q.1 p z).continuous.measurable (arrayOffsetTest e p q z).continuous.measurable (arrayProfileTest_mem e q.1 p z) (arrayOffsetTest_mem e p q z) apply Sampling.sampling_tests_weak_limit _ L hlim intro r g exact actualOccupation_sampling_test e ν (Q r) (t r) (J r) (ht r) (hJ r) (N r) (M r) (hM r) (hpos r) p q hpq z g
end WeakLimitend DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176import Mathlibimport OAI.Probability.Ballisticity.Estimates.BadStageMomentimport OAI.Probability.Ballisticity.Estimates.RawDropBoundsimport OAI.Probability.Ballisticity.Stationary.EpisodeLogLength
namespace OAI
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransience
noncomputable def logLengthMark {d : ℕ} (e : Direction d) : C(ActualEpisodeArray e,ℝ≥0∞) := ⟨fun Y => (ENNReal.log (1+(Y.1 0).1.toENNReal)).toENNReal, EReal.continuous_toENNReal.comp (ENNReal.continuous_log.comp (continuous_const.add (ENat.continuous_toENNReal.comp (by fun_prop))))⟩
noncomputable def logLengthCut {d : ℕ} (e : Direction d) (B : ℝ≥0) : C(ActualEpisodeArray e,ℝ) := (cutENNReal B).comp (logLengthMark e)
lemma raw_actual_test_mono {d : ℕ} (e : Direction d) (ν : Measure (Row d)) [IsProbabilityMeasure ν] (Q : Measure (Environment d)) [IsFiniteMeasure Q] (t J : Environment d → ℤ → ℕ) (ht : ∀ i, Measurable fun ω => t ω i) (hJ : ∀ i, Measurable fun ω => J ω i) (N : ℕ) (M : Environment d → ℕ) (hM : Measurable M) (F G : C(ActualEpisodeArray e,ℝ)) (hFG : ∀ i X, F (StationaryCompact.shift^[i] (actualArrayMap e t J X)) ≤ G (StationaryCompact.shift^[i] (actualArrayMap e t J X))) : (∫ Y, F Y ∂actualOccupationRaw e ν Q t J ht N M) ≤ ∫ Y, G Y ∂actualOccupationRaw e ν Q t J ht N M := by rw [actualOccupationRaw_integral e ν Q t J ht hJ N M hM F, actualOccupationRaw_integral e ν Q t J ht hJ N M hM G] apply Finset.sum_le_sum intro i _ have hm : Measurable (fun X => StationaryCompact.shift^[i] (actualArrayMap e t J X)) := (StationaryCompact.shift_continuous.measurable.iterate i).comp (actualArrayMap_measurable e t J ht hJ) apply integral_mono ((F.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)).comp_measurable hm) ((G.continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)).comp_measurable hm) exact hFG i
namespace OperationalConstantsvariable {d : ℕ} {ν : Measure (Row d)} {e f : Direction d} {D : ℝ}
noncomputable def lengthCost (C : OperationalConstants ν e f D) : ℝ := Real.log 2+Real.log (1+C.sfloor*Real.exp (C.χ*C.b))+1+C.g*C.b
lemma lengthCost_nonneg (C : OperationalConstants ν e f D) : 0≤C.lengthCost := by have hs : 0≤C.sfloor := le_trans (by norm_num) C.hs have hl := Real.log_nonneg (show 1≤1+C.sfloor*Real.exp (C.χ*C.b) by linarith [mul_nonneg hs (Real.exp_pos (C.χ*C.b)).le]) have ht := Real.log_nonneg (by norm_num : (1:ℝ)≤2) have hg := mul_nonneg C.hg.le C.hb.le unfold lengthCost linarith
lemma actual_lengthMark (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (X : EpisodeInput e) : ((StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)).1 0).1 = ((episodeBoundary (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N X.1.1 (i+1)- episodeBoundary (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N X.1.1 i:ℕ):ℕ∞) := by rw [arrayMark_iterate] simp only [zero_add,actualArrayMap,paddedTimes,EpisodeChainLedger.arrayTime,Int.toNat_natCast, show (i:ℤ)+1=((i+1:ℕ):ℤ) by omega]
lemma logLengthCut_actual_le (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (B : ℝ≥0) (X : EpisodeInput e) : logLengthCut e B (StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)) ≤ C.lengthCost*(1+(C.stagesAt hef N X.1.1 i:ℝ)) := by let T := episodeBoundary (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N X.1.1 have hlog : 0≤Real.log (1+(T (i+1)-T i:ℕ)) := Real.log_nonneg (by exact le_add_of_nonneg_right (Nat.cast_nonneg _)) change (min (ENNReal.log (1+((StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)).1 0).1.toENNReal)).toENNReal (B:ℝ≥0∞)).toReal ≤ _ rw [C.actual_lengthMark] change (min (ENNReal.log (1+(T (i+1)-T i:ℕ))).toENNReal (B:ℝ≥0∞)).toReal ≤ _ have he : (ENNReal.log (1+(T (i+1)-T i:ℕ))).toENNReal = ENNReal.ofReal (Real.log (1+(T (i+1)-T i:ℕ))) := by generalize T (i+1)-T i = n rw [ENNReal.log_pos_real (by positivity) (by finiteness), EReal.real_coe_toENNReal, ENNReal.toReal_add ENNReal.one_ne_top (ENNReal.natCast_ne_top n)] simp rw [he,ENNReal.toReal_min ENNReal.ofReal_ne_top ENNReal.coe_ne_top, ENNReal.toReal_ofReal hlog] apply (min_le_left _ _).trans by_cases ha : T i<N · have hh := episode_log_length_bound (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N (T i) X.1.1 C.hf.le C.hg.le C.hb.le (lt_of_lt_of_le zero_lt_one C.hs) simpa only [T,episodeBoundary,ite_eq_left ha,lengthCost,stagesAt,EpisodeChainLedger.stepMark,episodeStageCount] using hh · have heq : T (i+1)=T i := by simp only [T,episodeBoundary,ite_eq_right ha] rw [heq,Nat.sub_self,Nat.cast_zero,add_zero,Real.log_one] exact mul_nonneg C.lengthCost_nonneg (by positivity)
end OperationalConstantsend DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransiencenamespace OperationalConstantsvariable {d : ℕ} {ν : Measure (Row d)} [IsProbabilityMeasure ν] {e f : Direction d} {D : ℝ}
lemma bad_logLengthCut_bound (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (hD : 0≤D) (N : ℕ) (hN : C.sfloor ≤ (N:ℝ)) (hlarge : 32*C.b ≤ (1/2:ℝ)*Real.log (N:ℝ)) (hmass : (N:ℝ)^(-D) ≤ (environmentLaw ν).real (badCrossingEvent e N (1/2))) (B : ℝ≥0) : (∫ Y, logLengthCut e B Y ∂(C.occupation hef N ((environmentLaw ν)[|badCrossingEvent e N (1/2)]) : Measure (ActualEpisodeArray e))) ≤ C.lengthCost*(1+C.injectionCost/(6*C.b)) := by let Q := (environmentLaw ν)[|badCrossingEvent e N (1/2)] let μ : ProbabilityMeasure (ActualEpisodeArray e) := C.occupation hef N Q let G : C(ActualEpisodeArray e,ℝ) := (ContinuousMap.const _ C.lengthCost)*(1+stageMarkCut e (N:ℝ≥0) 0) have hh := raw_actual_test_mono e ν Q (C.paddedTimes hef N) (C.paddedStages hef N) (C.paddedTimes_measurable hef N) (C.paddedStages_measurable hef N) N (C.activeCount hef N) (C.activeCount_measurable hef N) (logLengthCut e B) G (fun i X => by change _ ≤ C.lengthCost*(1+stageMarkCut e (N:ℝ≥0) 0 (StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X))) rw [C.stageMarkCut_actual hef N i] have hj : (C.stagesAt hef N X.1.1 i:ℝ)≤(N:ℝ) := by exact_mod_cast EpisodeChainLedger.stepMark_le (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N X.1.1 i rw [show ((N:ℝ≥0):ℝ)=(N:ℝ) by simp,min_eq_left hj] exact C.logLengthCut_actual_le hef N i B X) have hm : (∫ Y, logLengthCut e B Y ∂(μ : Measure (ActualEpisodeArray e)))≤ ∫ Y, G Y ∂(μ : Measure (ActualEpisodeArray e)) := by change (∫ Y, logLengthCut e B Y ∂(actualOccupation e ν Q (C.paddedTimes hef N) (C.paddedStages hef N) (C.paddedTimes_measurable hef N) N (C.activeCount hef N):Measure _)) ≤ ∫ Y, G Y ∂(actualOccupation e ν Q (C.paddedTimes hef N) (C.paddedStages hef N) (C.paddedTimes_measurable hef N) N (C.activeCount hef N):Measure _) rw [actualOccupation_integral e ν Q _ _ _ _ _ (C.bad_raw_mass_pos hef N hN hmass), actualOccupation_integral e ν Q _ _ _ _ _ (C.bad_raw_mass_pos hef N hN hmass)] exact mul_le_mul_of_nonneg_left hh (inv_nonneg.mpr ENNReal.toReal_nonneg) apply hm.trans change (∫ Y, C.lengthCost*(1+stageMarkCut e (N:ℝ≥0) 0 Y) ∂(μ:Measure _))≤_ rw [integral_const_mul,integral_add (integrable_const _) ((stageMarkCut e (N:ℝ≥0) 0).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)), integral_const,probReal_univ,one_smul] exact mul_le_mul_of_nonneg_left (add_le_add_right (C.bad_stageMark_bound hef hD N hN hlarge hmass (N:ℝ≥0)) 1) C.lengthCost_nonneg
lemma bad_limit_length_moment (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (hD : 0≤D) (Ns : ℕ → ℕ) (hN : ∀ n, C.sfloor ≤ (Ns n:ℝ)) (hlarge : ∀ n, 32*C.b ≤ (1/2:ℝ)*Real.log (Ns n:ℝ)) (hmass : ∀ n, (Ns n:ℝ)^(-D) ≤ (environmentLaw ν).real (badCrossingEvent e (Ns n) (1/2))) (ρ : ProbabilityMeasure (ActualEpisodeArray e)) (hlim : Tendsto (fun n => C.occupation hef (Ns n) ((environmentLaw ν)[|badCrossingEvent e (Ns n) (1/2)])) atTop (𝓝 ρ)) : (∀ᵐ Y ∂(ρ : Measure (ActualEpisodeArray e)), (Y.1 0).1<⊤) ∧ Integrable (fun Y => (logLengthMark e Y).toReal) (ρ : Measure (ActualEpisodeArray e)) := by have hh := mark_lintegral_bound_of_weak_limit _ ρ hlim (logLengthMark e) (C.lengthCost*(1+C.injectionCost/(6*C.b))) (fun n B => C.bad_logLengthCut_bound hef hD (Ns n) (hN n) (hlarge n) (hmass n) B) have hf := mark_integrable_of_lintegral_bound (ρ : Measure (ActualEpisodeArray e)) (logLengthMark e) (logLengthMark e).continuous.measurable _ hh refine ⟨hf.1.mono (fun Y h => ?_),hf.2⟩ by_contra hn have he : (Y.1 0).1=⊤ := top_le_iff.mp (le_of_not_gt hn) have ht : logLengthMark e Y=∞ := by simp [logLengthMark,he] rw [ht] at h exact (lt_irrefl _ h)
end OperationalConstantsend DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150import Mathlibimport OAI.Probability.Ballisticity.Estimates.BadOccupationLimitimport OAI.Probability.Ballisticity.Stationary.ArrayMarkTests
namespace OAI
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransiencenamespace OperationalConstantsvariable {d : ℕ} {ν : Measure (Row d)} {e f : Direction d} {D : ℝ}
lemma stagesAt_measurable (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) : Measurable (fun ω => C.stagesAt hef N ω i) := EpisodeChainLedger.stepMark_measurable (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N i
lemma stagesAt_integrable (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (Q : Measure (Environment d)) [IsFiniteMeasure Q] : Integrable (fun ω => (C.stagesAt hef N ω i:ℝ)) Q := by apply Integrable.of_bound (((measurable_of_countable (fun n:ℕ => (n:ℝ))).comp (C.stagesAt_measurable hef N i)).aestronglyMeasurable) N filter_upwards [] with ω rw [Real.norm_eq_abs,abs_of_nonneg (Nat.cast_nonneg _)] change (C.stagesAt hef N ω i:ℝ) ≤ (N:ℝ) apply Nat.cast_le.mpr exact EpisodeChainLedger.stepMark_le (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N ω i
lemma actual_stageMark (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (X : EpisodeInput e) : ((StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)).1 0).2.1 = (C.stagesAt hef N X.1.1 i:ℕ∞) := by rw [arrayMark_iterate] simp only [zero_add,actualArrayMap,paddedStages,EpisodeChainLedger.arrayStages, Int.natCast_nonneg,not_lt.mpr,ite_false,Int.toNat_natCast,stagesAt]
lemma stageMarkCut_actual (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (B : ℝ≥0) (X : EpisodeInput e) : stageMarkCut e B 0 (StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)) = min (C.stagesAt hef N X.1.1 i:ℝ) B := by change (min (((StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)).1 0).2.1).toENNReal (B:ℝ≥0∞)).toReal = _ rw [C.actual_stageMark] simp only [ENat.toENNReal_coe] rw [ENNReal.toReal_min (ENNReal.natCast_ne_top _) ENNReal.coe_ne_top] simp
variable [IsProbabilityMeasure ν]
lemma raw_stageMark_bound (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N : ℕ) (Q : Measure (Environment d)) [IsFiniteMeasure Q] (B : ℝ≥0) : (∫ Y, stageMarkCut e B 0 Y ∂actualOccupationRaw e ν Q (C.paddedTimes hef N) (C.paddedStages hef N) (C.paddedTimes_measurable hef N) N (C.activeCount hef N)) ≤ ∫ ω, (EpisodeChainLedger.steps (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N ω N:ℝ) ∂Q := by rw [actualOccupationRaw_env_test e ν Q (C.paddedTimes hef N) (C.paddedStages hef N) (C.paddedTimes_measurable hef N) (C.paddedStages_measurable hef N) N (C.activeCount hef N) (C.activeCount_measurable hef N) (stageMarkCut e B 0) (fun i ω => min (C.stagesAt hef N ω i:ℝ) B) (fun i => (((measurable_of_countable (fun n:ℕ => (n:ℝ))).comp (C.stagesAt_measurable hef N i)).min measurable_const)) (fun i X => C.stageMarkCut_actual hef N i B X)] have hsum : (∫ ω, (EpisodeChainLedger.steps (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N ω N:ℝ) ∂Q) = ∑ i∈Finset.range N, ∫ ω, (C.stagesAt hef N ω i:ℝ) ∂Q := by rw [←integral_finsetSum (Finset.range N) (fun i _ => C.stagesAt_integrable hef N i Q)] apply integral_congr_ae filter_upwards [] with ω dsimp only [stagesAt] exact_mod_cast (EpisodeChainLedger.stepMark_sum (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N ω N).symm rw [hsum] apply Finset.sum_le_sum intro i _ apply (integral_mono ((C.stagesAt_integrable hef N i Q).inf (integrable_const _)).integrableOn (C.stagesAt_integrable hef N i Q).integrableOn (fun _ => min_le_left _ _)).trans exact setIntegral_le_integral (C.stagesAt_integrable hef N i Q) (Filter.Eventually.of_forall (fun _ => Nat.cast_nonneg _))
end OperationalConstantsend DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Classical Topologynamespace DirectionalTransiencenamespace OperationalConstantsvariable {d : ℕ} {ν : Measure (Row d)} {e f : Direction d} {D : ℝ}
lemma dropAt_measurable (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) : Measurable (fun ω => C.dropAt hef N ω i) := EpisodeChainLedger.dropMark_measurable (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N i
lemma dropAt_bounds (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (ω : Environment d) (hω : ∀ y u, C.κ ≤ (ω y).1 u) : 0 ≤ C.dropAt hef N ω i ∧ C.dropAt hef N ω i ≤ C.injectionCost+2*C.b*C.stagesAt hef N ω i := by have hh := EpisodeChainLedger.dropMark_bounds_local (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N C.order C.hf.le C.hb.le (lt_of_lt_of_le zero_lt_one C.hs) C.height_pos C.κ C.hκ0 C.hκ1 (lt_of_lt_of_le (by norm_num) C.hk) C.hbκ ω hω i refine ⟨hh.1,hh.2.trans ?_⟩ change C.injectionCost*(if _ then 1 else 0)+_ ≤ _ split <;> simp only [mul_one,mul_zero,zero_add] · rfl · change 2*C.b*(C.stagesAt hef N ω i:ℝ) ≤ C.injectionCost+2*C.b*C.stagesAt hef N ω i linarith [C.cost_nonneg]
lemma dropAt_integrable (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (Q : Measure (Environment d)) [IsFiniteMeasure Q] (hQ : ∀ᵐ ω ∂Q, ∀ y u, C.κ ≤ (ω y).1 u) : Integrable (fun ω => C.dropAt hef N ω i) Q := EpisodeChainLedger.dropMark_integrable_local (k:=C.k) e f hef (episodeScaleRadius ν e f) C.fexp C.g C.χ C.b C.sfloor C.radius_nonneg N C.order C.hf.le C.hb.le (lt_of_lt_of_le zero_lt_one C.hs) C.height_pos C.κ C.hκ0 C.hκ1 (lt_of_lt_of_le (by norm_num) C.hk) C.hbκ Q hQ i
lemma actual_dropMark (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (X : EpisodeInput e) : ((StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)).1 0).2.2 = ENNReal.ofReal (C.dropAt hef N X.1.1 i) := by rw [arrayMark_iterate] simp only [zero_add,actualArrayMap,episodeCost,paddedTimes,EpisodeChainLedger.arrayTime, Int.toNat_natCast,show (i:ℤ)+1=((i+1:ℕ):ℤ) by omega,dropAt, EpisodeChainLedger.dropMark]
lemma dropCut_actual (C : OperationalConstants ν e f D) (hef : e.1≠f.1) (N i : ℕ) (B : ℝ≥0) (X : EpisodeInput e) : dropMarkCut e B 0 (StationaryCompact.shift^[i] (actualArrayMap e (C.paddedTimes hef N) (C.paddedStages hef N) X)) = cutENNReal B (ENNReal.ofReal (C.dropAt hef N X.1.1 i)) := by exact congrArg (cutENNReal B) (C.actual_dropMark hef N i X)
lemma cut_ofReal_eq_min (B : ℝ≥0) (x : ℝ) (hx : 0≤x) : cutENNReal B (ENNReal.ofReal x)=min x B := by change (min (ENNReal.ofReal x) (B:ℝ≥0∞)).toReal=_ rw [ENNReal.toReal_min ENNReal.ofReal_ne_top ENNReal.coe_ne_top,ENNReal.toReal_ofReal hx] rfl
end OperationalConstantsend DirectionalTransience
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425import Mathlibimport OAI.Probability.Ballisticity.Walk.PathCompact
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma gaussian_block_count_limit {a b : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) (n : ℕ → ℝ) (hn : Tendsto n atTop atTop) : Tendsto (fun i => ((⌊b*n i⌋₊-⌊a*n i⌋₊:ℕ):ℝ)/n i) atTop (𝓝 (b-a)) := by have he : (fun i => ((⌊b*n i⌋₊-⌊a*n i⌋₊:ℕ):ℝ)/n i) =ᶠ[atTop] fun i => (⌊b*n i⌋₊:ℝ)/n i-(⌊a*n i⌋₊:ℝ)/n i := by filter_upwards [hn.eventually (eventually_ge_atTop (0:ℝ))] with i hi rw [Nat.cast_sub (Nat.floor_mono (mul_le_mul_of_nonneg_right hab hi)),sub_div] apply Tendsto.congr' he.symm exact ((tendsto_nat_floor_mul_div_atTop (ha.trans hab)).comp hn).sub ((tendsto_nat_floor_mul_div_atTop ha).comp hn)
lemma tendstoInMeasure_sub_zero {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (F G : ℕ → Ω → ℝ) (hF : TendstoInMeasure μ F atTop 0) (hG : TendstoInMeasure μ G atTop 0) : TendstoInMeasure μ (F-G) atTop 0 := by apply tendstoInMeasure_iff_measureReal_norm.2 intro ε hε have hf := (tendstoInMeasure_iff_measureReal_norm.1 hF) (ε/2) (by positivity) have hg := (tendstoInMeasure_iff_measureReal_norm.1 hG) (ε/2) (by positivity) simp only [Pi.zero_apply,sub_zero,Real.norm_eq_abs] at hf hg ⊢ have hs n : {ω | ε ≤ |(F-G) n ω|} ⊆ {ω | ε/2 ≤ |F n ω|} ∪ {ω | ε/2 ≤ |G n ω|} := by intro ω hω by_contra! hc simp only [Set.mem_union,Set.mem_ofPred_eq,not_or,not_le] at hc have ht := abs_sub (F n ω) (G n ω) change ε ≤ |F n ω-G n ω| at hω exact (not_lt_of_ge hω) (ht.trans_lt (by linarith)) have hb n := (measureReal_mono (μ := μ) (hs n) (measure_ne_top _ _)).trans (measureReal_union_le (μ := μ) _ _) exact squeeze_zero (fun _ => measureReal_nonneg) hb (by simpa using hf.add hg)
lemma fluctuationScale_nonneg {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (S : Ω → ℝ) (r : ℝ) : 0 ≤ fluctuationScale μ S r := by apply div_nonneg (sq_nonneg _) exact integral_nonneg (fun x => le_min (sq_nonneg _) (sq_nonneg _))
lemma disjoint_blocks_injective {ι : Type*} (a b : ι → ℕ) (hdisj : ∀ j k, j ≠ k → b j ≤ a k ∨ b k ≤ a j) : Function.Injective (fun p : (j : ι) × Fin (b j-a j) => a p.1+p.2.1) := by rintro ⟨j,l⟩ ⟨k,m⟩ he have hj : l.1 < b j-a j := l.2 have hk : m.1 < b k-a k := m.2 by_cases hjk : j = k · subst k have hlm : l = m := Fin.ext (by simpa using he) subst m rfl · rcases hdisj j k hjk with h|h <;> simp only at he <;> omega
lemma realPartialSum_sub_eq_block (x : ℕ → ℝ) {a b : ℕ} (hab : a ≤ b) : realPartialSum x b-realPartialSum x a = ∑ l : Fin (b-a), x (a+l) := by have h := realPartialSum_add x a (b-a) rw [Nat.add_sub_of_le hab] at h rw [Fin.sum_univ_eq_sum_range (f := fun l => x (a+l))] change _ = realPartialSum (fun l => x (a+l)) (b-a) linarith
theorem gaussian_polygon_increment_limit {Ω ι : Type*} [MeasurableSpace Ω] [Fintype ι] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ k, Measurable (X k)) (hind : iIndepFun X μ) (hident : ∀ k, IdentDistrib (X k) (X 0) μ μ) (hI : Integrable (X 0) μ) (hne : 0 < μ {x | X 0 x ≠ 0}) (hsym : IdentDistrib (X 0) (fun x => -X 0 x) μ μ) (r : ℕ → ℝ) (hr : IsGaussianSequence μ (X 0) r) {T : ℝ} (hT : 0 ≤ T) (a b : ι → unitInterval) (hab : ∀ j, a j ≤ b j) (hdisj : ∀ j k, j ≠ k → b j ≤ a k ∨ b k ≤ a j) : TendstoInDistribution (fun i ω (j : ι) => scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T (b j)- scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T (a j)) atTop id (fun _ => μ) (Measure.pi (fun j : ι => gaussianReal 0 (Real.toNNReal (T*((b j : ℝ)-a j))))) := by let n := fun i => fluctuationScale μ (X 0) (r i) have hn := (fluctuationScale_tendsto μ (X 0) (hX 0) hI hne).comp hr.1 have hn0 i : 0 ≤ n i := fluctuationScale_nonneg _ _ _ let A := fun i j => ⌊(T*a j)*n i⌋₊ let B := fun i j => ⌊(T*b j)*n i⌋₊ have hAB i j : A i j ≤ B i j := Nat.floor_mono (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (hab j) hT) (hn0 i)) have hd i j k (hjk : j ≠ k) : B i j ≤ A i k ∨ B i k ≤ A i j := by rcases hdisj j k hjk with h|h · exact Or.inl (Nat.floor_mono (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left h hT) (hn0 i))) · exact Or.inr (Nat.floor_mono (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left h hT) (hn0 i))) let τ : ι → ℝ≥0 := fun j => Real.toNNReal (T*((b j : ℝ)-a j)) have hc j : Tendsto (fun i => ((B i j-A i j:ℕ):ℝ)/n i) atTop (𝓝 (τ j : ℝ)) := by have h := gaussian_block_count_limit (mul_nonneg hT (a j).2.1) (mul_le_mul_of_nonneg_left (hab j) hT) n hn dsimp only [τ] rw [Real.coe_toNNReal _ (mul_nonneg hT (sub_nonneg.mpr (hab j)))] simpa only [A,B,mul_sub] using h have hb := gaussian_iid_finite_block_limit μ X hX hind hident hI hne hsym r hr (fun i j => B i j-A i j) (fun i j l => A i j+l) (fun i => disjoint_blocks_injective (A i) (B i) (hd i)) τ hc have hb' := hb.continuous_comp (g := (WithLp.ofLp : EuclideanSpace ℝ ι → (ι → ℝ))) (by fun_prop) let Z := fun i ω j => (∑ l : Fin (B i j-A i j), X (A i j+l) ω)/r i have hZ : TendstoInDistribution Z atTop id (fun _ => μ) (Measure.pi (fun j => gaussianReal 0 (τ j))) := by convert hb' using 1 <;> rfl let Y := fun i ω j => scaledPolygon (fun k => X k ω) (r i) (n i) T (b j)- scaledPolygon (fun k => X k ω) (r i) (n i) T (a j) apply tendstoInDistribution_of_tendstoInMeasure_sub Y id hZ · apply tendstoInMeasure_pi intro j have ha := polygon_eval_error_tendstoInMeasure μ X (hX 0) hident r n hr.1 (Eventually.of_forall hn0) hT (a j) have hb := polygon_eval_error_tendstoInMeasure μ X (hX 0) hident r n hr.1 (Eventually.of_forall hn0) hT (b j) have he := tendstoInMeasure_sub_zero μ _ _ hb ha convert he using 1 ext i ω change Y i ω j-Z i ω j = _ dsimp [Y,Z] rw [← realPartialSum_sub_eq_block (fun k => X k ω) (hAB i j)] dsimp [A,B] ring · intro i apply Measurable.aemeasurable apply Measurable.of_eval intro j exact ((continuous_eval_const _).measurable.comp (measurable_scaledPolygon X hX _ _ _)).sub ((continuous_eval_const _).measurable.comp (measurable_scaledPolygon X hX _ _ _))
noncomputable def orderedTimes (I : Finset unitInterval) (i : Fin (I.card+1)) : unitInterval := if h : i = 0 then 0 else I.orderEmbOfFin rfl (i.pred h)
lemma orderedTimes_monotone (I : Finset unitInterval) : Monotone (orderedTimes I) := by intro i j hij obtain rfl | hi := eq_or_ne i 0 · simp [orderedTimes] have hj : j ≠ 0 := by intro hj; subst j; exact hi (le_antisymm hij (Fin.zero_le _)) rw [orderedTimes,dite_eq_right hi,orderedTimes,dite_eq_right hj] exact OrderEmbedding.monotone _ (by simpa)
lemma orderedTimes_succ (I : Finset unitInterval) (i : Fin I.card) : orderedTimes I i.succ = I.orderEmbOfFin rfl i := by simp [orderedTimes]
noncomputable def incrementCumsum (I : Finset unitInterval) : (Fin I.card → ℝ) →L[ℝ] (I → ℝ) := { toFun x i := ∑ j ≤ (I.orderIsoOfFin rfl).symm i, x j map_add' x y := by ext; simp [Finset.sum_add_distrib] map_smul' m x := by ext; simp [Finset.mul_sum] cont := by fun_prop }
lemma incrementCumsum_eval (I : Finset unitInterval) (f : unitInterval → ℝ) (hf : f 0 = 0) : I.restrict f = incrementCumsum I (fun j => f (orderedTimes I j.succ)-f (orderedTimes I j.castSucc)) := by ext t simp only [Finset.restrict,incrementCumsum,ContinuousLinearMap.coe_mk',LinearMap.coe_mk,AddHom.coe_mk] rw [Fin.sum_Iic_sub _ (fun j => f (orderedTimes I j))] simp [orderedTimes,hf,Finset.orderEmbOfFin]
noncomputable def gaussianPathFiniteLaw (T : ℝ) (I : Finset unitInterval) : Measure (I → ℝ) := (Measure.pi (fun j : Fin I.card => gaussianReal 0 (Real.toNNReal (T*((orderedTimes I j.succ : ℝ)-orderedTimes I j.castSucc))))).map (incrementCumsum I)
instance gaussianPathFiniteLaw_probability (T : ℝ) (I : Finset unitInterval) : IsProbabilityMeasure (gaussianPathFiniteLaw T I) := by unfold gaussianPathFiniteLaw infer_instance
lemma ordered_adjacent_disjoint {m : ℕ} (t : Fin (m+1) → unitInterval) (ht : Monotone t) : ∀ j k : Fin m, j ≠ k → t j.succ ≤ t k.castSucc ∨ t k.succ ≤ t j.castSucc := by intro j k hjk rcases lt_or_gt_of_ne hjk with h|h · exact Or.inl (ht (by exact_mod_cast h)) · exact Or.inr (ht (by exact_mod_cast h))
theorem gaussian_polygon_finite_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ k, Measurable (X k)) (hind : iIndepFun X μ) (hident : ∀ k, IdentDistrib (X k) (X 0) μ μ) (hI : Integrable (X 0) μ) (hne : 0 < μ {x | X 0 x ≠ 0}) (hsym : IdentDistrib (X 0) (fun x => -X 0 x) μ μ) (r : ℕ → ℝ) (hr : IsGaussianSequence μ (X 0) r) {T : ℝ} (hT : 0 ≤ T) (I : Finset unitInterval) : TendstoInDistribution (fun i ω => I.restrict (scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T)) atTop id (fun _ => μ) (gaussianPathFiniteLaw T I) := by let Y := fun i ω => scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T let t := orderedTimes I have ht : Monotone t := orderedTimes_monotone I have hi := gaussian_polygon_increment_limit μ X hX hind hident hI hne hsym r hr hT (fun j : Fin I.card => t j.castSucc) (fun j => t j.succ) (fun j => ht (Fin.castSucc_le_succ j)) (ordered_adjacent_disjoint t ht) have hc := hi.continuous_comp (incrementCumsum I).continuous have hl i : (fun ω => I.restrict ((Y i ω) ·)) =ᵐ[μ] (incrementCumsum I) ∘ (fun ω j => Y i ω (t j.succ)-Y i ω (t j.castSucc)) := by filter_upwards [] with ω exact incrementCumsum_eval I (Y i ω) (scaledPolygon_zero _ _ _ _) have hc' := hc.congr (fun i => (hl i).symm) Filter.EventuallyEq.rfl refine ⟨hc'.forall_aemeasurable,measurable_id.aemeasurable,?_⟩ convert hc'.tendsto using 1 simp only [gaussianPathFiniteLaw,Function.comp_def,id_eq,Measure.map_id] rfl
lemma continuous_path_restrict (I : Finset unitInterval) : Continuous (fun f : C(unitInterval,ℝ) => I.restrict f) := by apply continuous_pi intro j exact continuous_eval_const _
lemma continuous_path_measure_ext (μ ν : Measure C(unitInterval,ℝ)) [IsFiniteMeasure μ] [IsFiniteMeasure ν] (h : ∀ I : Finset unitInterval, μ.map (fun f : C(unitInterval,ℝ) => I.restrict f) = ν.map (fun f : C(unitInterval,ℝ) => I.restrict f)) : μ = ν := by classical let e := TopologicalSpace.denseSeq unitInterval let E := fun f : C(unitInterval,ℝ) => fun n => f (e n) have hE : Continuous E := continuous_pi (fun n => continuous_eval_const _) have hEinj : Function.Injective E := by intro f g hfg apply ContinuousMap.coe_injective exact TopologicalSpace.denseRange_denseSeq unitInterval |>.equalizer f.continuous g.continuous hfg apply hE.measurableEmbedding hEinj |>.map_injective let P := fun J : Finset ℕ => (μ.map E).map J.restrict have : ∀ J, IsFiniteMeasure (P J) := fun _ => inferInstance apply IsProjectiveLimit.unique (P := P) (fun _ => rfl) intro J let I := J.image e let g := fun f : I → ℝ => fun j : J => f ⟨e j,Finset.mem_image_of_mem e j.2⟩ have hg : Measurable g := by fun_prop have hm : Measurable (J.restrict : (ℕ → ℝ) → (J → ℝ)) := by fun_prop change (ν.map E).map J.restrict = (μ.map E).map J.restrict rw [Measure.map_map hm hE.measurable,Measure.map_map hm hE.measurable] have he : J.restrict ∘ E = g ∘ (fun f : C(unitInterval,ℝ) => I.restrict f) := rfl rw [he,← Measure.map_map hg (continuous_path_restrict I).measurable, ← Measure.map_map hg (continuous_path_restrict I).measurable,h I]
theorem exists_path_limit_of_tight_finite_limit (μ : ℕ → ProbabilityMeasure C(unitInterval,ℝ)) (P : (I : Finset unitInterval) → ProbabilityMeasure (I → ℝ)) (ht : IsTightMeasureSet (Set.range (fun n => (μ n : Measure C(unitInterval,ℝ))))) (hf : ∀ I, Tendsto (fun n => (μ n).map (fun path : C(unitInterval,ℝ) => I.restrict path)) atTop (𝓝 (P I))) : ∃ W : ProbabilityMeasure C(unitInterval,ℝ), Tendsto μ atTop (𝓝 W) ∧ ∀ I, W.map (fun path : C(unitInterval,ℝ) => I.restrict path) = P I := by have hc : IsCompact (closure (Set.range μ)) := isCompact_closure_of_isTightMeasureSet (by convert ht using 1 ext x simp) have hmem n : μ n ∈ closure (Set.range μ) := subset_closure (Set.mem_range_self n) obtain ⟨W,_,s,hs,hw⟩ := hc.tendsto_subseq hmem have hid : ∀ (n : ℕ → ℕ) (hn : Tendsto n atTop atTop) (V : ProbabilityMeasure C(unitInterval,ℝ)), Tendsto (μ ∘ n) atTop (𝓝 V) → ∀ I, V.map (fun path : C(unitInterval,ℝ) => I.restrict path) = P I := by intro n hn V hv I exact tendsto_nhds_unique ((ProbabilityMeasure.continuous_map (continuous_path_restrict I)).tendsto V |>.comp hv) ((hf I).comp hn) have hW := hid s hs.tendsto_atTop W hw refine ⟨W,?_,hW⟩ apply Filter.tendsto_of_subseq_tendsto intro n hn obtain ⟨V,_,s,hs,hv⟩ := hc.tendsto_subseq (fun j => hmem (n j)) have hV := hid (n ∘ s) (hn.comp hs.tendsto_atTop) V hv have he : V = W := by have : IsProbabilityMeasure (V : Measure C(unitInterval,ℝ)) := V.prop have : IsProbabilityMeasure (W : Measure C(unitInterval,ℝ)) := W.prop apply Subtype.ext apply continuous_path_measure_ext (V : Measure C(unitInterval,ℝ)) (W : Measure C(unitInterval,ℝ)) intro I exact congrArg (fun Q : ProbabilityMeasure (I → ℝ) => (Q : Measure (I → ℝ))) ((hV I).trans (hW I).symm) subst V exact ⟨s,hv⟩
theorem gaussian_iid_path_limit {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (X : ℕ → Ω → ℝ) (hX : ∀ k, Measurable (X k)) (hind : iIndepFun X μ) (hident : ∀ k, IdentDistrib (X k) (X 0) μ μ) (hsym : IdentDistrib (X 0) (fun ω => -X 0 ω) μ μ) (hI : Integrable (X 0) μ) (hne : 0 < μ {ω | X 0 ω ≠ 0}) (r : ℕ → ℝ) (hr : IsGaussianSequence μ (X 0) r) {T : ℝ} (hT : 0 ≤ T) : ∃ W : ProbabilityMeasure C(unitInterval,ℝ), TendstoInDistribution (fun i ω => scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T) atTop id (fun _ => μ) W ∧ ∀ I : Finset unitInterval, (W : Measure C(unitInterval,ℝ)).map (fun f : C(unitInterval,ℝ) => I.restrict f) = gaussianPathFiniteLaw T I := by let Y := fun i ω => scaledPolygon (fun k => X k ω) (r i) (fluctuationScale μ (X 0) (r i)) T have hY : ∀ i, Measurable (Y i) := fun _ => measurable_scaledPolygon X hX _ _ _ let M : ℕ → ProbabilityMeasure C(unitInterval,ℝ) := fun i => ⟨μ.map (Y i),inferInstance⟩ let P : (I : Finset unitInterval) → ProbabilityMeasure (I → ℝ) := fun I => ⟨gaussianPathFiniteLaw T I,inferInstance⟩ have ht : IsTightMeasureSet (Set.range (fun i => (M i : Measure C(unitInterval,ℝ)))) := gaussian_iid_path_tight μ X hX hind hident hsym hI hne r hr hT have hf : ∀ I, Tendsto (fun i => (M i).map (fun path : C(unitInterval,ℝ) => I.restrict path)) atTop (𝓝 (P I)) := by intro I have h := (gaussian_polygon_finite_limit μ X hX hind hident hI hne hsym r hr hT I).tendsto have he : (fun i => (M i).map (fun path : C(unitInterval,ℝ) => I.restrict path)) = (fun i => (⟨μ.map (fun ω => I.restrict (Y i ω)), inferInstance⟩ : ProbabilityMeasure (I → ℝ))) := by funext i apply Subtype.ext exact Measure.map_map (continuous_path_restrict I).measurable (hY i) rw [he] simpa only [Measure.map_id] using h obtain ⟨W,hw,hf⟩ := exists_path_limit_of_tight_finite_limit M P ht hf refine ⟨W,⟨fun i => (hY i).aemeasurable,measurable_id.aemeasurable,?_⟩,?_⟩ · convert hw using 1 apply congrArg apply Subtype.ext exact Measure.map_id · intro I exact congrArg (fun Q : ProbabilityMeasure (I → ℝ) => (Q : Measure (I → ℝ))) (hf I)
theorem transverse_common_gaussian_path_limit {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hr : IsGaussianSequence (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r) {T : ℝ} (hT : 0 ≤ T) : letI : IsProbabilityMeasure (independentConditionedPairLaw ν (realPosition (step e))) := independentConditionedPairLaw_probability ν _ (ne_of_gt (noDrop_positive_of_directionallyTransient ν _ htrans)) ∃ W : ProbabilityMeasure C(unitInterval,ℝ), TendstoInDistribution (fun i P => scaledPolygon (fun k => commonIncrementProcess (realPosition (step e)) f k P) (r i) (fluctuationScale (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) (r i)) T) atTop id (fun _ => independentConditionedPairLaw ν (realPosition (step e))) W ∧ ∀ I : Finset unitInterval, (W : Measure C(unitInterval,ℝ)).map (fun g : C(unitInterval,ℝ) => I.restrict g) = gaussianPathFiniteLaw T I := by let ℓ := realPosition (step e) let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := independentConditionedPairLaw_probability ν ℓ (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) exact gaussian_iid_path_limit _ _ (measurable_commonIncrementProcess ℓ f) (commonIncrements_independent ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (commonIncrements_identDistrib ν ℓ htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (independent_commonWordIncrement_symmetric ν ℓ htrans f) (independent_commonWordIncrement_integrable ν hue ℓ (signed_direction_unit e) htrans (signedHeight e) (signedHeight_projection e) (signedHeight_step_le e) f) (independent_commonWordIncrement_nonzero ν hue e f hef htrans) r hr hT
noncomputable def renewalSum (L : ℕ → ℕ) (n : ℕ) : ℕ := ∑ k ∈ Finset.range n, L k
lemma renewalSum_zero (L : ℕ → ℕ) : renewalSum L 0 = 0 := by simp [renewalSum]lemma renewalSum_succ (L : ℕ → ℕ) (n : ℕ) : renewalSum L (n+1) = renewalSum L n+L n := by simp [renewalSum,Finset.sum_range_succ]lemma renewalSum_ge (L : ℕ → ℕ) (hL : ∀ k, 0 < L k) (n : ℕ) : n ≤ renewalSum L n := by induction n with | zero => exact Nat.zero_le _ | succ n ih => rw [renewalSum_succ]; have := hL n; omegalemma renewalSum_strictMono (L : ℕ → ℕ) (hL : ∀ k, 0 < L k) : StrictMono (renewalSum L) := by apply strictMono_nat_of_lt_succ intro n rw [renewalSum_succ] exact Nat.lt_add_of_pos_right (hL n)
open scoped Classical innoncomputable def renewalCount (L : ℕ → ℕ) (h : ℕ) : ℕ := Nat.findGreatest (fun k => renewalSum L k ≤ h) hlemma renewalCount_le (L : ℕ → ℕ) (h : ℕ) : renewalCount L h ≤ h := Nat.findGreatest_le _lemma renewalCount_lower (L : ℕ → ℕ) (h : ℕ) : renewalSum L (renewalCount L h) ≤ h := by classical exact Nat.findGreatest_spec (P := fun k => renewalSum L k ≤ h) (Nat.zero_le h) (by rw [renewalSum_zero]; exact Nat.zero_le _)lemma renewalCount_upper (L : ℕ → ℕ) (hL : ∀ k, 0 < L k) (h : ℕ) : h < renewalSum L (renewalCount L h+1) := by classical by_cases hk : renewalCount L h+1 ≤ h · exact Nat.lt_of_not_ge (Nat.findGreatest_is_greatest (P := fun k => renewalSum L k ≤ h) (Nat.lt_succ_self _) hk) · exact (Nat.lt_of_not_ge hk).trans_le (renewalSum_ge L hL _)lemma renewalCount_zero (L : ℕ → ℕ) : renewalCount L 0 = 0 := by simp [renewalCount]lemma renewalCount_monotone (L : ℕ → ℕ) : Monotone (renewalCount L) := by intro a b hab exact Nat.findGreatest_mono (fun _ h => h.trans hab) hab
lemma linear_error_uniform (f : ℕ → ℝ) (c : ℝ) (hf : Tendsto (fun k : ℕ => f k/k) atTop (𝓝 c)) {T ε : ℝ} (hT : 0 ≤ T) (hε : 0 < ε) : ∀ᶠ a : ℝ in atTop, ∀ k : ℕ, (k : ℝ) ≤ T*a → |f k-c*k| ≤ ε*a := by have hδ : 0 < ε/(T+1) := div_pos hε (by linarith) obtain ⟨K,hK⟩ := (Metric.tendsto_atTop.1 hf) (ε/(T+1)) hδ let C := ∑ k ∈ Finset.range (K+1), |f k-c*k| filter_upwards [eventually_ge_atTop (max 0 (C/ε))] with a ha k hk have ha0 : 0 ≤ a := (le_max_left _ _).trans ha by_cases hkK : k ≤ K · have h1 : |f k-c*k| ≤ C := Finset.single_le_sum (fun j _ => abs_nonneg (f j-c*j)) (Finset.mem_range.2 (Nat.lt_succ_of_le hkK)) exact h1.trans (by simpa [mul_comm] using (div_le_iff₀ hε).1 ((le_max_right _ _).trans ha)) · have hkpos : 0 < (k : ℝ) := by exact_mod_cast (show 0 < k by omega) have he : f k/(k : ℝ)-c = (f k-c*k)/k := by field_simp have hbound := hK k (by omega) rw [Real.dist_eq,he,abs_div,abs_of_pos hkpos] at hbound have hh := (div_lt_iff₀ hkpos).1 hbound have h2 : (ε/(T+1))*(k : ℝ) ≤ ε*a := by calc _ ≤ (ε/(T+1))*(T*a) := mul_le_mul_of_nonneg_left hk hδ.le _ ≤ ε*a := by have hd : T/(T+1) ≤ 1 := (div_le_one (by linarith)).2 (by linarith) calc _ = (ε*a)*(T/(T+1)) := by ring _ ≤ ε*a := mul_le_of_le_one_right (mul_nonneg hε.le ha0) hd exact hh.le.trans h2
end DirectionalTransienceendend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122import Mathlibimport OAI.Probability.Ballisticity.Walk.OutwardCanonicalRows
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filter Functionopen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
theorem actual_outward_canonical_bound {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) : ∃ A c B : ℝ, 0 < A ∧ 0 < c ∧ 0 < B ∧ ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → let Z := outwardCanonicalExcess e f A x (∀ ω, 0 ≤ Z ω) ∧ @Measurable _ _ (rowSigma {y | a ≤ dot (realPosition y) (realPosition (step e))}) _ Z ∧ Integrable (fun ω => Real.exp (c*Z ω)) (environmentLaw ν) ∧ (∫ ω, Real.exp (c*Z ω) ∂environmentLaw ν) ≤ B ∧ (∀ᵐ ω ∂environmentLaw ν, ∀ t : ℕ, 0 < outwardKernelMass e f (t+1) x ω ∧ -Real.log (outwardKernelMass e f (t+1) x ω) ≤ 2*A*Real.log ((t:ℝ)+2)+Z ω) := by obtain ⟨A,D,B,hA,hD,hB,hdata⟩ := actual_outward_log_bound ν hue e f hef htrans refine ⟨A,D⁻¹,Real.exp 1*B,hA,inv_pos.mpr hD,mul_pos (Real.exp_pos _) hB,?_⟩ intro a x hx obtain ⟨W,hW,hW0,hWi,hWB,hbound⟩ := hdata a x hx let Z := outwardCanonicalExcess e f A x have hZm : Measurable Z := measurable_outwardCanonicalExcess e f A x have hZbound : ∀ᵐ ω ∂environmentLaw ν, Z ω ≤ D*(W ω+1) ∧ ∀ n, -Real.log (outwardKernelMass e f (n+1) x ω) ≤ 2*A*Real.log ((n:ℝ)+2)+Z ω := by filter_upwards [hbound] with ω hω exact canonicalLogExcess_bounds hA.le hD.le (hW0 ω) _ ω (fun n => (hω n).2) have hdom : Integrable (fun ω => Real.exp 1*Real.exp (W ω)) (environmentLaw ν) := hWi.const_mul _ have hexp : ∀ᵐ ω ∂environmentLaw ν, Real.exp (D⁻¹*Z ω) ≤ Real.exp 1*Real.exp (W ω) := by filter_upwards [hZbound] with ω hω rw [←Real.exp_add] apply Real.exp_le_exp.mpr have hh := mul_le_mul_of_nonneg_left hω.1 (inv_nonneg.mpr hD.le) rw [←mul_assoc,inv_mul_cancel₀ hD.ne',one_mul] at hh linarith have hZi : Integrable (fun ω => Real.exp (D⁻¹*Z ω)) (environmentLaw ν) := hdom.mono_nonneg (hZm.const_mul _ |>.exp |>.aestronglyMeasurable) (Eventually.of_forall (fun ω => (Real.exp_pos _).le)) hexp refine ⟨fun ω => canonicalLogExcess_nonneg _ _ ω,outwardCanonicalExcess_upper_rows e f A a x hx,hZi,?_,?_⟩ · calc _ ≤ ∫ ω, Real.exp 1*Real.exp (W ω) ∂environmentLaw ν := integral_mono_ae hZi hdom hexp _ = Real.exp 1*(∫ ω, Real.exp (W ω) ∂environmentLaw ν) := integral_const_mul _ _ _ ≤ Real.exp 1*B := mul_le_mul_of_nonneg_left hWB (Real.exp_pos _).le · filter_upwards [hbound,hZbound] with ω hω hZω exact fun n => ⟨(hω n).1,hZω.2 n⟩end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filter Functionopen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
noncomputable def truncatedEndpointLaw {d : ℕ} (e : Direction d) (H N : ℕ) (ω : Environment d) (x : Lattice d) : Measure (Lattice d) := ((quenchedKernel (ω,x)).restrict (HitThrough (Strip (realPosition (step e)) x H) (Upper (realPosition (step e)) x H) N)).map (prefixEndpoint (realPosition (step e)) x H)
instance truncatedEndpointLaw_finite {d : ℕ} (e : Direction d) (H N : ℕ) (ω : Environment d) (x : Lattice d) : IsFiniteMeasure (truncatedEndpointLaw e H N ω x) := by unfold truncatedEndpointLaw infer_instance
lemma truncatedEndpointLaw_le {d : ℕ} (e : Direction d) {H : ℕ} (hH : 0 < H) (N : ℕ) (ω : Environment d) (x : Lattice d) : truncatedEndpointLaw e H N ω x ≤ hitKernel (Strip (realPosition (step e)) x H) (Upper (realPosition (step e)) x H) (ω,x) := by rw [hitKernel_eq_map_prefixEndpoint e x hH] exact Measure.map_mono (Measure.restrict_mono (hitThrough_subset_hit _ _ _) le_rfl) (measurable_prefixEndpoint _ _ _)
lemma truncatedEndpointLaw_apply {d : ℕ} (e : Direction d) {H : ℕ} (hH : 0 < H) (N : ℕ) (ω : Environment d) (x : Lattice d) (A : Set (Lattice d)) : truncatedEndpointLaw e H N ω x A = quenchedKernel (ω,x) (HitThrough (Strip (realPosition (step e)) x H) (Upper (realPosition (step e)) x H ∩ A) N) := by rw [truncatedEndpointLaw,Measure.map_apply (measurable_prefixEndpoint _ _ _) (Set.to_countable _).measurableSet, Measure.restrict_apply ((measurable_prefixEndpoint _ _ _) (Set.to_countable _).measurableSet)] apply measure_congr filter_upwards [quenched_initial_ae (ω,x),quenched_nearest_neighbor (ω,x)] with X h0 hnn apply propext constructor · rintro ⟨hA,hhit⟩ obtain ⟨n,hn,hdet⟩ := Set.mem_iUnion₂.mp hhit change prefixEndpoint (realPosition (step e)) x H X ∈ A at hA dsimp [prefixEndpoint] at hA rw [coordinate_hitAt_record e x X h0 hnn hH hdet] at hA exact Set.mem_iUnion₂.mpr ⟨n,hn,⟨hdet.1,by simpa only [add_sub_cancel] using hA⟩,hdet.2⟩ · intro hhit obtain ⟨n,hn,hdet⟩ := Set.mem_iUnion₂.mp hhit have hh : X ∈ HitAt (Strip (realPosition (step e)) x H) (Upper (realPosition (step e)) x H) n := ⟨hdet.1.1,hdet.2⟩ refine ⟨?_,Set.mem_iUnion₂.mpr ⟨n,hn,hh⟩⟩ change prefixEndpoint (realPosition (step e)) x H X ∈ A dsimp [prefixEndpoint] rw [coordinate_hitAt_record e x X h0 hnn hH hh] simpa only [add_sub_cancel] using hdet.1.2
lemma truncatedEndpointLaw_locality {d : ℕ} (e : Direction d) {H : ℕ} (hH : 0 < H) (N : ℕ) (ω η : Environment d) (x : Lattice d) (he : Set.EqOn ω η (LatticeBall x N)) : truncatedEndpointLaw e H N ω x = truncatedEndpointLaw e H N η x := by apply Measure.ext intro A hA rw [truncatedEndpointLaw_apply e hH,truncatedEndpointLaw_apply e hH] exact quenched_hitThrough_locality ω η x _ _ N heend DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133import Mathlibimport OAI.Probability.Ballisticity.Entropy.OutwardOrder
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filter Functionopen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma bounded_probability_error_integral {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (h : Ω → ℝ) (hm : Measurable h) {C ε : ℝ} (hε : 0 ≤ ε) (hb : ∀ ω, 0 ≤ h ω ∧ h ω ≤ C) : (∫ ω, h ω ∂μ) ≤ ε+C*μ.real {ω | ε < h ω} := by let E := {ω | ε < h ω} have hE : MeasurableSet E := measurableSet_lt measurable_const hm have hg : Integrable (fun ω => ε+E.indicator (fun _ => C) ω) μ := (integrable_const _).add ((integrable_const _).indicator hE) have hh : ∀ ω, h ω ≤ ε+E.indicator (fun _ => C) ω := by intro ω by_cases he : ω ∈ E · rw [Set.indicator_of_mem he] exact (hb ω).2.trans (by linarith) · rw [Set.indicator_of_notMem he,add_zero] exact le_of_not_gt he have hi : Integrable h μ := hg.mono_nonneg hm.aestronglyMeasurable (Eventually.of_forall fun ω => (hb ω).1) (Eventually.of_forall hh) have hle := integral_mono_ae hi hg (Eventually.of_forall hh) rw [integral_add (integrable_const _) ((integrable_const _).indicator hE), integral_const,integral_indicator_const _ hE] at hle simpa only [probReal_univ,smul_eq_mul,one_mul,mul_one,mul_comm] using hle
lemma outward_cap_locality_L1 {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (e f : Direction d) (A : ℝ) (hloc : ∀ C ε δ : ℝ, 0 < C → 0 < ε → 0 < δ → ∃ R : ℕ, ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e a x R)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ C) ∧ (environmentLaw ν).real {ω | ε < |min (outwardCanonicalExcess e f A x ω) C-F ω|} < δ) {C ε : ℝ} (hC : 0 < C) (hε : 0 < ε) : ∃ R : ℕ, ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e a x R)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ C) ∧ (∫ ω, |min (outwardCanonicalExcess e f A x ω) C-F ω| ∂environmentLaw ν) < ε := by obtain ⟨R,hR⟩ := hloc C (ε/2) (ε/(2*C)) hC (by positivity) (by positivity) refine ⟨R,?_⟩ intro a x hx obtain ⟨F,hFm,hFb,hFerr⟩ := hR a x hx refine ⟨F,hFm,hFb,?_⟩ have hFa : Measurable F := hFm.mono (rowSigma_le _) le_rfl have hh := bounded_probability_error_integral (environmentLaw ν) (fun ω => |min (outwardCanonicalExcess e f A x ω) C-F ω|) (((measurable_outwardCanonicalExcess e f A x).min measurable_const).sub hFa).abs (show 0 ≤ ε/2 by positivity) (C:=C) (fun ω => by refine ⟨abs_nonneg _,abs_le.mpr ⟨?_,?_⟩⟩ · have hz : 0 ≤ min (outwardCanonicalExcess e f A x ω) C := le_min (canonicalLogExcess_nonneg _ _ ω) hC.le linarith [(hFb ω).2] · linarith [min_le_right (outwardCanonicalExcess e f A x ω) C,(hFb ω).1]) have hmul := mul_lt_mul_of_pos_left hFerr hC have heq : C*(ε/(2*C)) = ε/2 := by field_simp rw [heq] at hmul linarith
theorem actual_outward_cap_L1_locality {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) : ∃ A : ℝ, 0 < A ∧ ∀ C ε : ℝ, 0 < C → 0 < ε → ∃ R : ℕ, ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e a x R)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ C) ∧ (∫ ω, |min (outwardCanonicalExcess e f A x ω) C-F ω| ∂environmentLaw ν) < ε := by obtain ⟨A,c,B,hA,hc,hB,hbound,hloc⟩ := actual_outward_order ν hue e f hef htrans exact ⟨A,hA,fun C ε hC hε => outward_cap_locality_L1 ν e f A hloc hC hε⟩end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filter Functionopen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma outward_order_countable_event {d : ℕ} (ν : Measure (Row d)) (e f : Direction d) (A : ℝ) (hbound : ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∀ᵐ ω ∂environmentLaw ν, ∀ t : ℕ, 0 < outwardKernelMass e f (t+1) x ω ∧ -Real.log (outwardKernelMass e f (t+1) x ω) ≤ 2*A*Real.log ((t:ℝ)+2)+outwardCanonicalExcess e f A x ω) : ∀ᵐ ω ∂environmentLaw ν, ∀ x : Lattice d × Lattice d, dot (realPosition x.1) (realPosition (step e)) = dot (realPosition x.2) (realPosition (step e)) → ∀ t : ℕ, 0 < outwardKernelMass e f (t+1) x ω ∧ -Real.log (outwardKernelMass e f (t+1) x ω) ≤ 2*A*Real.log ((t:ℝ)+2)+outwardCanonicalExcess e f A x ω := by apply ae_all_iff.mpr intro x by_cases hx : dot (realPosition x.1) (realPosition (step e)) = dot (realPosition x.2) (realPosition (step e)) · filter_upwards [hbound (dot (realPosition x.1) (realPosition (step e))) x ⟨rfl,hx.symm⟩] with ω hω exact fun _ => hω · exact Eventually.of_forall fun _ h => (hx h).elim
theorem actual_outward_all_pairs {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) : ∃ A : ℝ, 0 < A ∧ (∀ᵐ ω ∂environmentLaw ν, ∀ x : Lattice d × Lattice d, dot (realPosition x.1) (realPosition (step e)) = dot (realPosition x.2) (realPosition (step e)) → ∀ t : ℕ, 0 < outwardKernelMass e f (t+1) x ω ∧ -Real.log (outwardKernelMass e f (t+1) x ω) ≤ 2*A*Real.log ((t:ℝ)+2)+outwardCanonicalExcess e f A x ω) := by obtain ⟨A,c,B,hA,hc,hB,hbound,hloc⟩ := actual_outward_order ν hue e f hef htrans exact ⟨A,hA,outward_order_countable_event ν e f A (fun a x hx => (hbound a x hx).2.2.2.2)⟩end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081import Mathlibimport OAI.Probability.Ballisticity.Crossings.CanonicalHeightCutoffimport OAI.Probability.Ballisticity.Walk.FiniteOutwardRowApproximation
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filter Functionopen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma outward_canonical_cap_locality_of_log_bound {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) {A D B : ℝ} (hA : 0 < A) (hD : 0 < D) (hB : 0 < B) (hdata : ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ W : Environment d → ℝ, Measurable W ∧ (∀ ω, 0 ≤ W ω) ∧ Integrable (fun ω => Real.exp (W ω)) (environmentLaw ν) ∧ (∫ ω, Real.exp (W ω) ∂environmentLaw ν) ≤ B ∧ (∀ᵐ ω ∂environmentLaw ν, ∀ t : ℕ, 0 < outwardKernelMass e f (t+1) x ω ∧ -Real.log (outwardKernelMass e f (t+1) x ω) ≤ A*Real.log ((t:ℝ)+2)+D*(W ω+1))) : ∀ C ε δ : ℝ, 0 < C → 0 < ε → 0 < δ → ∃ R : ℕ, ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e a x R)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ C) ∧ (environmentLaw ν).real {ω | ε < |min (outwardCanonicalExcess e f A x ω) C-F ω|} < δ := by obtain ⟨κ,hκ,hκae⟩ := environment_uniform_elliptic ν hue intro C ε δ hC hε hδ let M := Real.log (B/δ+1) have harg : 0 < B/δ+1 := by positivity have heM : Real.exp M = B/δ+1 := Real.exp_log harg have hprob : B/Real.exp M < δ := by apply (div_lt_iff₀ (Real.exp_pos M)).mpr rw [heM,mul_add,mul_one,mul_div_cancel₀ B hδ.ne'] linarith obtain ⟨N,hN⟩ := exists_log_height_cutoff (D:=D) (M:=M) hA obtain ⟨R,hR⟩ := finite_outward_upper_row_approximation hκ e f A N hε hC.le refine ⟨R,?_⟩ intro a x hx obtain ⟨F,hF,hFb,hFerr⟩ := hR a x hx refine ⟨F,hF,hFb,?_⟩ obtain ⟨W,hW,hW0,hWi,hWB,hbound⟩ := hdata a x hx have hcut := canonical_height_cutoff_probability (environmentLaw ν) hA.le hD.le (fun n => outwardKernelMass e f (n+1) x) W hWi hWB (hbound.mono fun ω hω n => (hω n).2) N hN have hs : ∀ᵐ ω ∂environmentLaw ν, (ε < |min (outwardCanonicalExcess e f A x ω) C-F ω|) → canonicalLogExcess A (fun n => outwardKernelMass e f (n+1) x) ω ≠ finiteLogExcess A (fun n => outwardKernelMass e f (n+1) x) N ω := by filter_upwards [hκae] with ω hω herr heq have hh := hFerr ω hω change ε < |min (canonicalLogExcess A (fun n => outwardKernelMass e f (n+1) x) ω) C-F ω| at herr rw [heq] at herr exact (not_lt_of_ge hh) herr have hm := ENNReal.toReal_mono (measure_ne_top _ _) (measure_mono_ae hs) exact (hm.trans hcut).trans_lt hprob
theorem actual_outward_canonical_cap_locality {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) : ∃ A : ℝ, 0 < A ∧ ∀ C ε δ : ℝ, 0 < C → 0 < ε → 0 < δ → ∃ R : ℕ, ∀ (a : ℝ) (x : Lattice d × Lattice d), x ∈ PairAtHeight (realPosition (step e)) a → ∃ F : Environment d → ℝ, @Measurable _ _ (rowSigma (upperPairNeighborhood e a x R)) _ F ∧ (∀ ω, 0 ≤ F ω ∧ F ω ≤ C) ∧ (environmentLaw ν).real {ω | ε < |min (outwardCanonicalExcess e f A x ω) C-F ω|} < δ := by obtain ⟨A,D,B,hA,hD,hB,hdata⟩ := actual_outward_log_bound ν hue e f hef htrans exact ⟨A,hA,outward_canonical_cap_locality_of_log_bound ν hue e f hA hD hB hdata⟩end DirectionalTransience
end
end
end OAI1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798import Mathlibimport OAI.Probability.Ballisticity.Entropy.OccupationEntropy
namespace OAI
section
open MeasureTheory ProbabilityTheory InformationTheoryopen scoped ENNReal Classical BigOperatorsnamespace DirectionalTransience.Entropyvariable {Z F I : Type*} [MeasurableSpace Z] [MeasurableSpace F]
lemma fst_restrict_preimage (μ : Measure (Z × F)) (A : Set Z) (hA : MeasurableSet A) : (μ.restrict (Prod.fst ⁻¹' A)).fst = μ.fst.restrict A := (Measure.restrict_map measurable_fst hA).symm
lemma fresh_restrict (ζ : Measure Z) [SFinite ζ] (π : Measure F) [SFinite π] (A : Set Z) : (ζ.prod π).restrict (Prod.fst ⁻¹' A) = (ζ.restrict A).prod π := by have he : (Prod.fst ⁻¹' A : Set (Z × F)) = A ×ˢ Set.univ := by ext p; simp rw [he,← Measure.prod_restrict,Measure.restrict_univ]
lemma fresh_activeSum (s : Finset I) (μ : I → Measure (Z × F)) [∀ i, IsFiniteMeasure (μ i)] (π : Measure F) [IsProbabilityMeasure π] (A : I → Set Z) (hA : ∀ i ∈ s, MeasurableSet (A i)) : activeSum s (fun i => (μ i).fst.prod π) (fun i => Prod.fst ⁻¹' A i) = (activeSum s μ (fun i => Prod.fst ⁻¹' A i)).fst.prod π := by induction s using Finset.induction_on with | empty => simp [activeSum,Measure.fst] | @insert a s ha ih => have hAa := hA a (Finset.mem_insert_self a s) have hAs : ∀ i ∈ s, MeasurableSet (A i) := fun i hi => hA i (Finset.mem_insert_of_mem hi) simp only [activeSum,Finset.sum_insert ha] at ih ⊢ rw [Measure.fst_add,Measure.add_prod,fst_restrict_preimage _ _ hAa,fresh_restrict] rw [ih hAs]
lemma fresh_activeMass (μ : Measure (Z × F)) (π : Measure F) [IsProbabilityMeasure π] (A : Set Z) (hA : MeasurableSet A) : μ (Prod.fst ⁻¹' A) = (μ.fst.prod π) (Prod.fst ⁻¹' A) := by rw [← Measure.fst_apply hA, ← Measure.fst_apply hA,Measure.fst_prod]
lemma normalize_fst_prod [Nonempty (Z × F)] (μ : FiniteMeasure (Z × F)) (π : Measure F) [IsProbabilityMeasure π] (hμ : μ ≠ 0) : let ν : FiniteMeasure (Z × F) := ⟨(μ : Measure (Z × F)).fst.prod π,inferInstance⟩ (ν.normalize : Measure (Z × F)) = (μ.normalize : Measure (Z × F)).fst.prod π := by let ν : FiniteMeasure (Z × F) := ⟨(μ : Measure (Z × F)).fst.prod π,inferInstance⟩ change (ν.normalize : Measure (Z × F)) = (μ.normalize : Measure (Z × F)).fst.prod π have hm : ν.mass = μ.mass := by change ((μ : Measure (Z × F)).fst.prod π Set.univ).toNNReal = _ rw [← Set.univ_prod_univ,Measure.prod_prod,measure_univ (μ:=π),mul_one,Measure.fst_univ] rfl have hν : ν ≠ 0 := by rw [← FiniteMeasure.mass_nonzero_iff,hm] exact μ.mass_nonzero_iff.mpr hμ rw [ν.toMeasure_normalize_eq_of_nonzero hν,μ.toMeasure_normalize_eq_of_nonzero hμ,hm] change μ.mass⁻¹ • ((μ : Measure (Z × F)).fst.prod π) = ((μ.mass⁻¹ • (μ : Measure (Z × F))).map Prod.fst).prod π rw [Measure.map_smul _ measurable_fst.aemeasurable,Measure.prod_smul_left] rfl
theorem own_normalized_activeSum_kl_le [Nonempty (Z × F)] (s : Finset I) (μ : I → Measure (Z × F)) [∀ i, IsProbabilityMeasure (μ i)] (π : Measure F) [IsProbabilityMeasure π] (A : I → Set Z) (hA : ∀ i ∈ s, MeasurableSet (A i)) (hkl : ∀ i ∈ s, klDiv (μ i) ((μ i).fst.prod π) ≠ ∞) (hpos : 0 < (activeSum s μ (fun i => Prod.fst ⁻¹' A i)).real Set.univ) : let μs : FiniteMeasure (Z × F) := ⟨activeSum s μ (fun i => Prod.fst ⁻¹' A i),inferInstance⟩ klDiv (μs.normalize : Measure (Z × F)) ((μs.normalize : Measure (Z × F)).fst.prod π) ≤ ENNReal.ofReal ((∑ i ∈ s, (klDiv (μ i) ((μ i).fst.prod π)).toReal) / (activeSum s μ (fun i => Prod.fst ⁻¹' A i)).real Set.univ) := by let μs : FiniteMeasure (Z × F) := ⟨activeSum s μ (fun i => Prod.fst ⁻¹' A i),inferInstance⟩ have hμ : μs ≠ 0 := by intro h have hz : (activeSum s μ (fun i => Prod.fst ⁻¹' A i)).real Set.univ = 0 := by change (μs : Measure (Z × F)).real Set.univ = 0 rw [h]; simp linarith have h := normalized_activeSum_kl_le s μ (fun i => (μ i).fst.prod π) hkl (fun i => Prod.fst ⁻¹' A i) (fun i hi => (hA i hi).preimage measurable_fst) (fun i hi => fresh_activeMass (μ i) π (A i) (hA i hi)) hpos let νs : FiniteMeasure (Z × F) := ⟨activeSum s (fun i => (μ i).fst.prod π) (fun i => Prod.fst ⁻¹' A i),inferInstance⟩ let νs' : FiniteMeasure (Z × F) := ⟨(μs : Measure (Z × F)).fst.prod π,inferInstance⟩ have heq : νs = νs' := by apply Subtype.ext exact fresh_activeSum s μ π A hA change klDiv (μs.normalize : Measure (Z × F)) (νs.normalize : Measure (Z × F)) ≤ _ at h rw [heq] at h have hnorm : (νs'.normalize : Measure (Z × F)) = (μs.normalize : Measure (Z × F)).fst.prod π := normalize_fst_prod μs π hμ rw [hnorm] at h exact h
end DirectionalTransience.Entropy
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490import Mathlibimport OAI.Probability.Ballisticity.Estimates.CommonTrueRecord
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma ae_of_pair_prefix_probability_lower {d : ℕ} (μ : Measure (Path d × Path d)) [IsFiniteMeasure μ] (E : Set (Path d × Path d)) (hE : MeasurableSet E) (p : ℝ≥0∞) (hp : 0 < p) (hpt : p ≠ ∞) (h : ∀ (n : ℕ) (f g : Path d), p * μ (pathCylinder f n ×ˢ pathCylinder g n) ≤ μ (E ∩ (pathCylinder f n ×ˢ pathCylinder g n))) : ∀ᵐ P ∂μ, P ∈ E := by let e := MeasurableEquiv.arrowProdEquivProdArrow (Lattice d) (Lattice d) ℕ let η := μ.map e.symm have he : MeasurableSet (e ⁻¹' E) := hE.preimage e.measurable have hh := ae_of_frestrict_probability_lower η (e ⁻¹' E) he p hp hpt have hf (n : ℕ) (F : (i : Finset.Iic n) → (Lattice d × Lattice d)) : e.symm ⁻¹' (Preorder.frestrictLe n ⁻¹' {F}) = pathCylinder (extendPrefix n (fun j => (F j).1)) n ×ˢ pathCylinder (extendPrefix n (fun j => (F j).2)) n := by ext P change (Preorder.frestrictLe n (e.symm P) = F) ↔ _ constructor · intro hF constructor <;> intro j hj · have hv := congrArg (fun G => (G ⟨j, Finset.mem_Iic.mpr hj⟩).1) hF simpa [e, MeasurableEquiv.arrowProdEquivProdArrow, Equiv.arrowProdEquivProdArrow, Preorder.frestrictLe, extendPrefix_apply n _ j hj] using hv · have hv := congrArg (fun G => (G ⟨j, Finset.mem_Iic.mpr hj⟩).2) hF simpa [e, MeasurableEquiv.arrowProdEquivProdArrow, Equiv.arrowProdEquivProdArrow, Preorder.frestrictLe, extendPrefix_apply n _ j hj] using hv · rintro ⟨h1,h2⟩ funext j apply Prod.ext · simpa [e, MeasurableEquiv.arrowProdEquivProdArrow, Equiv.arrowProdEquivProdArrow, Preorder.frestrictLe, extendPrefix_apply _ _ _ (Finset.mem_Iic.mp j.2)] using h1 j (Finset.mem_Iic.mp j.2) · simpa [e, MeasurableEquiv.arrowProdEquivProdArrow, Equiv.arrowProdEquivProdArrow, Preorder.frestrictLe, extendPrefix_apply _ _ _ (Finset.mem_Iic.mp j.2)] using h2 j (Finset.mem_Iic.mp j.2) have hη : ∀ᵐ Z ∂η, Z ∈ e ⁻¹' E := hh (fun n F => by rw [Measure.map_apply e.symm.measurable ((Preorder.measurable_frestrictLe n) (measurableSet_singleton F)), Measure.map_apply e.symm.measurable (he.inter ((Preorder.measurable_frestrictLe n) (measurableSet_singleton F))), Set.preimage_inter, hf] simpa only [Set.preimage_preimage, e.apply_symm_apply, Set.preimage_id'] using h n (extendPrefix n (fun j => (F j).1)) (extendPrefix n (fun j => (F j).2))) change ∀ᵐ Z ∂μ.map e.symm, Z ∈ e ⁻¹' E at hη have hμ := (ae_map_iff e.symm.measurable.aemeasurable he).mp hη simpa only [Set.mem_preimage, e.apply_symm_apply] using hμ
lemma shared_pair_record_cylinder_noDrop {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (x y : Lattice d) (f g : Path d) (n m : ℕ) (hn : 0 < n) (hm : 0 < m) (hrf : StrictRecord ℓ f n) (hrg : StrictRecord ℓ g m) (he : dot (realPosition (f n)) ℓ = dot (realPosition (g m)) ℓ) : sharedPairLaw ν x y (((fun X : Path d => fun j => X (n+j)) ⁻¹' NoDrop ℓ (f n) ∩ pathCylinder f n) ×ˢ ((fun X : Path d => fun j => X (m+j)) ⁻¹' NoDrop ℓ (g m) ∩ pathCylinder g m)) = sharedPairLaw ν x y (pathCylinder f n ×ˢ pathCylinder g m) * sharedNoDropMass ν ℓ (f n) (g m) := by have hAf := ((measurableSet_noDrop ℓ (f n)).preimage (show Measurable (fun X : Path d => fun j => X (n+j)) by fun_prop)).inter (measurableSet_pathCylinder f n) have hAg := ((measurableSet_noDrop ℓ (g m)).preimage (show Measurable (fun X : Path d => fun j => X (m+j)) by fun_prop)).inter (measurableSet_pathCylinder g m) rw [sharedPairLaw_rectangle ν x y _ _ hAf hAg, sharedPairLaw_rectangle ν x y _ _ (measurableSet_pathCylinder f n) (measurableSet_pathCylinder g m)] by_cases hf : f 0 = x · by_cases hg : g 0 = y · let S : Set (Lattice d) := {z | (∃ j < n, z = f j) ∨ (∃ j < m, z = g j)} let T := {z : Lattice d | dot (realPosition (f n)) ℓ ≤ dot (realPosition z) ℓ} have hdis : Disjoint S T := by apply Set.disjoint_left.mpr rintro z (⟨j,hj,rfl⟩ | ⟨j,hj,rfl⟩) hz · exact (not_le_of_gt (hrf j hj)) hz · have hlt := hrg j hj rw [← he] at hlt exact (not_le_of_gt hlt) hz have hfm : @Measurable _ _ (rowSigma S) _ (fun ω : Environment d => quenchedKernel (ω,x) (pathCylinder f n)) := by apply measurable_of_row_locality _ ((Kernel.measurable_coe _ (measurableSet_pathCylinder f n)).comp (measurable_id.prodMk measurable_const)) S x (Or.inl ⟨0,hn,hf.symm⟩) intro ω η hωη exact pathCylinder_weight_locality S ω η hωη x f n (fun j hj => Or.inl ⟨j,hj,rfl⟩) have hgm : @Measurable _ _ (rowSigma S) _ (fun ω : Environment d => quenchedKernel (ω,y) (pathCylinder g m)) := by apply measurable_of_row_locality _ ((Kernel.measurable_coe _ (measurableSet_pathCylinder g m)).comp (measurable_id.prodMk measurable_const)) S y (Or.inr ⟨0,hm,hg.symm⟩) intro ω η hωη exact pathCylinder_weight_locality S ω η hωη y g m (fun j hj => Or.inr ⟨j,hj,rfl⟩) have hnfm : @Measurable _ _ (rowSigma T) _ (noDropQuenched ℓ (f n)) := measurable_noDropQuenched_rows ℓ (f n) have hngm : @Measurable _ _ (rowSigma T) _ (noDropQuenched ℓ (g m)) := by change @Measurable _ _ (rowSigma {z | dot (realPosition (f n)) ℓ ≤ dot (realPosition z) ℓ}) _ _ rw [he] exact measurable_noDropQuenched_rows ℓ (g m) simp_rw [quenched_prefix_future _ _ _ hf n (measurableSet_noDrop ℓ (f n)), quenched_prefix_future _ _ _ hg m (measurableSet_noDrop ℓ (g m)), mul_mul_mul_comm] have hind := lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace (rowSigma_le S) (rowSigma_le T) (environment_indep_rows ν hdis) (hfm.mul hgm) (hnfm.mul hngm) simp only [Pi.mul_apply] at hind exact hind · have hz ω : quenchedKernel (ω,y) ((fun X : Path d => fun j => X (m+j)) ⁻¹' NoDrop ℓ (g m) ∩ pathCylinder g m) = 0 := measure_mono_null Set.inter_subset_right (quenched_pathCylinder_zero ω y g hg m) simp only [hz, quenched_pathCylinder_zero _ _ _ hg m, mul_zero, lintegral_zero, zero_mul] · have hz ω : quenchedKernel (ω,x) ((fun X : Path d => fun j => X (n+j)) ⁻¹' NoDrop ℓ (f n) ∩ pathCylinder f n) = 0 := measure_mono_null Set.inter_subset_right (quenched_pathCylinder_zero ω x f hf n) simp only [hz, quenched_pathCylinder_zero _ _ _ hf n, zero_mul, lintegral_zero]
def pairPrefix {d : ℕ} (n m : ℕ) (P : Path d × Path d) : ((i : Finset.Iic n) → Lattice d) × ((i : Finset.Iic m) → Lattice d) := (Preorder.frestrictLe n P.1, Preorder.frestrictLe m P.2)
lemma measurable_pairPrefix {d : ℕ} (n m : ℕ) : Measurable (pairPrefix (d := d) n m) := ((Preorder.measurable_frestrictLe n).comp measurable_fst).prodMk ((Preorder.measurable_frestrictLe m).comp measurable_snd)
lemma pairPrefix_fiber {d : ℕ} (n m : ℕ) (F : ((i : Finset.Iic n) → Lattice d) × ((i : Finset.Iic m) → Lattice d)) : pairPrefix n m ⁻¹' {F} = pathCylinder (extendPrefix n F.1) n ×ˢ pathCylinder (extendPrefix m F.2) m := by rw [← restrict_prefix_fiber, ← restrict_prefix_fiber] ext P simp only [Set.mem_preimage,Set.mem_singleton_iff,Set.mem_prod,pairPrefix,Prod.ext_iff]
lemma measure_partition_pairprefix {d : ℕ} (μ : Measure (Path d × Path d)) (A : Set (Path d × Path d)) (n m : ℕ) : μ A = ∑' F : (((i : Finset.Iic n) → Lattice d) × ((i : Finset.Iic m) → Lattice d)), μ (A ∩ (pathCylinder (extendPrefix n F.1) n ×ˢ pathCylinder (extendPrefix m F.2) m)) := by have h := tsum_measure_preimage_singleton (μ := μ.restrict A) (s := Set.univ) (Set.to_countable _) (f := pairPrefix (d := d) n m) (fun F _ => (measurable_pairPrefix n m) (measurableSet_singleton F)) simp only [Set.preimage_univ, Measure.restrict_apply MeasurableSet.univ, Set.univ_inter] at h rw [tsum_subtype Set.univ (fun F => (μ.restrict A) (pairPrefix n m ⁻¹' {F})), Set.indicator_univ] at h rw [← h] apply tsum_congr intro F rw [Measure.restrict_apply ((measurable_pairPrefix n m) (measurableSet_singleton F)), pairPrefix_fiber, Set.inter_comm]
def PairPrefixDetermined {d : ℕ} (n m : ℕ) (A : Set (Path d × Path d)) : Prop := ∀ P Q, (∀ j ≤ n, P.1 j = Q.1 j) → (∀ k ≤ m, P.2 k = Q.2 k) → (P ∈ A ↔ Q ∈ A)
lemma shared_pair_record_event_noDrop_lower {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (x y : Lattice d) (c : ℝ≥0∞) (hc : ∀ u v, c ≤ sharedNoDropMass ν ℓ u v) (n m : ℕ) (hn : 0 < n) (hm : 0 < m) (A : Set (Path d × Path d)) (hA : PairPrefixDetermined n m A) (hr : ∀ P ∈ A, StrictRecord ℓ P.1 n ∧ StrictRecord ℓ P.2 m ∧ dot (realPosition (P.1 n)) ℓ = dot (realPosition (P.2 m)) ℓ) : c * sharedPairLaw ν x y A ≤ sharedPairLaw ν x y (A ∩ (FutureNoDrop ℓ n ×ˢ FutureNoDrop ℓ m)) := by classical rw [measure_partition_pairprefix (sharedPairLaw ν x y) A n m, measure_partition_pairprefix (sharedPairLaw ν x y) (A ∩ _) n m, ← ENNReal.tsum_mul_left] apply ENNReal.tsum_le_tsum intro F let P : Path d × Path d := (extendPrefix n F.1,extendPrefix m F.2) let C := pathCylinder P.1 n ×ˢ pathCylinder P.2 m by_cases hP : P ∈ A · have hAc : A ∩ C = C := Set.inter_eq_right.mpr fun Q hQ => (hA Q P hQ.1 hQ.2).mpr hP have he : (A ∩ (FutureNoDrop ℓ n ×ˢ FutureNoDrop ℓ m)) ∩ C = (((fun X : Path d => fun j => X (n+j)) ⁻¹' NoDrop ℓ (P.1 n) ∩ pathCylinder P.1 n) ×ˢ ((fun X : Path d => fun j => X (m+j)) ⁻¹' NoDrop ℓ (P.2 m) ∩ pathCylinder P.2 m)) := by ext Q constructor · rintro ⟨⟨_,h1,h2⟩,hc1,hc2⟩ refine ⟨⟨?_,hc1⟩,⟨?_,hc2⟩⟩ · intro j; rw [← hc1 n le_rfl]; exact h1 j · intro j; rw [← hc2 m le_rfl]; exact h2 j · rintro ⟨⟨h1,hc1⟩,⟨h2,hc2⟩⟩ refine ⟨⟨(hA Q P hc1 hc2).mpr hP,?_,?_⟩,hc1,hc2⟩ · intro j; rw [hc1 n le_rfl]; exact h1 j · intro j; rw [hc2 m le_rfl]; exact h2 j change c * sharedPairLaw ν x y (A ∩ C) ≤ sharedPairLaw ν x y ((A ∩ _) ∩ C) rw [hAc,he,shared_pair_record_cylinder_noDrop ν ℓ x y P.1 P.2 n m hn hm (hr P hP).1 (hr P hP).2.1 (hr P hP).2.2] simpa only [mul_comm] using mul_le_mul_right (hc (P.1 n) (P.2 m)) (sharedPairLaw ν x y C) · have hAc : A ∩ C = ∅ := by apply Set.eq_empty_iff_forall_notMem.mpr rintro Q ⟨hQ,hqc1,hqc2⟩ exact hP ((hA Q P hqc1 hqc2).mp hQ) change c * sharedPairLaw ν x y (A ∩ C) ≤ _ rw [hAc,measure_empty,mul_zero] exact zero_le
lemma annealedFrom_ae_of_quenched {d : ℕ} (ν : Measure (Row d)) (x : Lattice d) (A : Set (Path d)) (hA : MeasurableSet A) (h : ∀ᵐ ω ∂environmentLaw ν, ∀ᵐ X ∂quenchedKernel (ω,x), X ∈ A) : ∀ᵐ X ∂annealedFrom ν x, X ∈ A := by rw [ae_iff] change annealedFrom ν x Aᶜ = 0 rw [annealedFrom_apply ν x Aᶜ hA.compl] apply lintegral_eq_zero_of_ae_eq_zero filter_upwards [h] with ω hω exact ae_iff.mp hω
lemma sharedPairLaw_fst {d : ℕ} (ν : Measure (Row d)) (x y : Lattice d) : (sharedPairLaw ν x y).map Prod.fst = annealedFrom ν x := by apply Measure.ext intro A hA rw [Measure.map_apply measurable_fst hA] have he : Prod.fst ⁻¹' A = A ×ˢ (Set.univ : Set (Path d)) := by ext P; simp rw [he,sharedPairLaw_rectangle ν x y A Set.univ hA MeasurableSet.univ, annealedFrom_apply ν x A hA] simp only [measure_univ,mul_one]
lemma sharedPairLaw_snd {d : ℕ} (ν : Measure (Row d)) (x y : Lattice d) : (sharedPairLaw ν x y).map Prod.snd = annealedFrom ν y := by apply Measure.ext intro A hA rw [Measure.map_apply measurable_snd hA] have he : Prod.snd ⁻¹' A = (Set.univ : Set (Path d)) ×ˢ A := by ext P; simp rw [he,sharedPairLaw_rectangle ν x y Set.univ A MeasurableSet.univ hA, annealedFrom_apply ν y A hA] simp only [measure_univ,one_mul]
lemma shared_pair_ae {d : ℕ} (ν : Measure (Row d)) (x y : Lattice d) (A B : Set (Path d)) (hA : MeasurableSet A) (hB : MeasurableSet B) (ha : ∀ᵐ X ∂annealedFrom ν x, X ∈ A) (hb : ∀ᵐ Y ∂annealedFrom ν y, Y ∈ B) : ∀ᵐ P ∂sharedPairLaw ν x y, P.1 ∈ A ∧ P.2 ∈ B := by rw [← sharedPairLaw_fst ν x y] at ha rw [← sharedPairLaw_snd ν x y] at hb exact ((ae_map_iff measurable_fst.aemeasurable hA).mp ha).and ((ae_map_iff measurable_snd.aemeasurable hB).mp hb)
def FirstLayerHit {d : ℕ} (h : Lattice d → ℤ) (H : ℤ) (n : ℕ) : Set (Path d) := {X | h (X n) = H ∧ ∀ j < n, h (X j) < H}
lemma measurableSet_firstLayerHit {d : ℕ} (h : Lattice d → ℤ) (H : ℤ) (n : ℕ) : MeasurableSet (FirstLayerHit h H n) := by simp only [FirstLayerHit,Set.ofPred_and,Set.ofPred_forall] exact (measurableSet_eq_fun ((measurable_of_countable h).comp (measurable_pi_apply n)) measurable_const).inter (MeasurableSet.iInter fun j => MeasurableSet.iInter fun _ => measurableSet_lt ((measurable_of_countable h).comp (measurable_pi_apply j)) measurable_const)
lemma firstLayerHit_prefix {d : ℕ} (h : Lattice d → ℤ) (H : ℤ) (n : ℕ) : PrefixDetermined n (FirstLayerHit h H n) := by intro X Y hXY simp only [FirstLayerHit,Set.mem_ofPred_eq,hXY n le_rfl] apply and_congr Iff.rfl exact forall_congr' fun j => forall_congr' fun hj => by rw [hXY j hj.le]
lemma firstLayerHit_disjoint {d : ℕ} (h : Lattice d → ℤ) (H : ℤ) : Pairwise (fun n m => Disjoint (FirstLayerHit h H n) (FirstLayerHit h H m)) := by intro n m hnm apply Set.disjoint_left.mpr intro X hn hm rcases lt_or_gt_of_ne hnm with hnlt | hmlt · have hi := hm.2 n hnlt rw [hn.1] at hi exact (lt_irrefl _) hi · have hi := hn.2 m hmlt rw [hm.1] at hi exact (lt_irrefl _) hi
lemma firstLayerHit_record {d : ℕ} (ℓ : Vector d) (h : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (h x : ℝ)) (H : ℤ) (n : ℕ) (X : Path d) (hX : X ∈ FirstLayerHit h H n) : StrictRecord ℓ X n := by intro j hj rw [hproj,hproj,hX.1] exact_mod_cast hX.2 j hj
lemma firstLayerHit_exists {d : ℕ} (h : Lattice d → ℤ) (hstep : ∀ x e, h (x+step e) ≤ h x+1) (X : Path d) (hnn : ∀ n, ∃ e, X (n+1) = X n+step e) (ht : Tendsto (fun n => (h (X n) : ℝ)) atTop atTop) (H : ℤ) (h0 : h (X 0) < H) : ∃ n, X ∈ FirstLayerHit h H n := by classical have hge : ∀ᶠ n : ℕ in atTop, (H : ℝ) ≤ (h (X n) : ℝ) := ht.eventually (eventually_ge_atTop _) obtain ⟨k,hk⟩ := hge.exists have he : ∃ n, H ≤ h (X n) := ⟨k, by exact_mod_cast hk⟩ let n := Nat.find he have hn : H ≤ h (X n) := Nat.find_spec he have hb : ∀ j < n, h (X j) < H := fun j hj => lt_of_not_ge (Nat.find_min he hj) have hn0 : 0 < n := by by_contra hh have hz : n = 0 := by omega rw [hz] at hn omega obtain ⟨e,he⟩ := hnn (n-1) have hprev := hb (n-1) (by omega) have hinc := hstep (X (n-1)) e rw [← he,show n-1+1 = n by omega] at hinc exact ⟨n,by omega,hb⟩
lemma firstLayerHit_after_prefix {d : ℕ} (h : Lattice d → ℤ) (H : ℤ) (X : Path d) (N : ℕ) (hp : ∀ j ≤ N, h (X j) < H) {n : ℕ} (hn : X ∈ FirstLayerHit h H n) : N < n := by by_contra hh have hl := hp n (by omega) rw [hn.1] at hl exact (lt_irrefl _) hl
lemma shared_pair_layer_hits {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (hstep : ∀ x e, height (x+step e) ≤ height x+1) (x y : Lattice d) (H : ℤ) (hx : height x < H) (hy : height y < H) : ∀ᵐ P ∂sharedPairLaw ν x y, (∃ n, P.1 ∈ FirstLayerHit height H n) ∧ (∃ m, P.2 ∈ FirstLayerHit height H m) := by let A := {X : Path d | ∃ n, X ∈ FirstLayerHit height H n} have hA : MeasurableSet A := by simp only [A,Set.ofPred_exists] exact MeasurableSet.iUnion (measurableSet_firstLayerHit height H) apply shared_pair_ae ν x y A A hA hA all_goals apply annealedFrom_ae_of_quenched ν _ A hA filter_upwards [quenched_directionallyTransient_ae ν ℓ htrans] with ω hω · filter_upwards [hω x,quenched_initial_ae (ω,x),quenched_nearest_neighbor (ω,x)] with X ht h0 hnn exact firstLayerHit_exists height hstep X hnn (by simpa only [TransientPaths,Set.mem_ofPred_eq,hproj] using ht) H (by simpa only [h0] using hx) · filter_upwards [hω y,quenched_initial_ae (ω,y),quenched_nearest_neighbor (ω,y)] with Y ht h0 hnn exact firstLayerHit_exists height hstep Y hnn (by simpa only [TransientPaths,Set.mem_ofPred_eq,hproj] using ht) H (by simpa only [h0] using hy)
def CommonTrueAbove {d : ℕ} (ℓ : Vector d) (K : ℤ) : Set (Path d × Path d) := {P | ∃ n m, (K : ℝ) < dot (realPosition (P.1 n)) ℓ ∧ CommonTrueRecord ℓ P n m}
lemma measurableSet_commonTrueAbove {d : ℕ} (ℓ : Vector d) (K : ℤ) : MeasurableSet (CommonTrueAbove ℓ K) := by simp only [CommonTrueAbove,Set.ofPred_exists,Set.ofPred_and] apply MeasurableSet.iUnion intro n apply MeasurableSet.iUnion intro m exact (measurableSet_lt measurable_const ((measurable_of_countable (fun z : Lattice d => dot (realPosition z) ℓ)).comp ((measurable_pi_apply n).comp measurable_fst))).inter (measurableSet_commonTrueRecord ℓ n m)
lemma finite_pair_prefix_height_bound {d : ℕ} (height : Lattice d → ℤ) (f g : Path d) (N : ℕ) (K : ℤ) (x y : Lattice d) : ∃ H : ℤ, K < H ∧ height x < H ∧ height y < H ∧ ∀ j ≤ N, height (f j) < H ∧ height (g j) < H := by induction N with | zero => let H := max K (max (height x) (max (height y) (max (height (f 0)) (height (g 0)))))+1 refine ⟨H,?_,?_,?_,?_⟩ · dsimp [H]; omega · dsimp [H]; omega · dsimp [H]; omega · intro j hj have : j = 0 := by omega subst j dsimp [H]; omega | succ N ih => obtain ⟨B,hK,hx,hy,hB⟩ := ih let H := max B (max (height (f (N+1))) (height (g (N+1))))+1 have hBH : B < H := by dsimp [H]; omega refine ⟨H,hK.trans hBH,hx.trans hBH,hy.trans hBH,?_⟩ intro j hj by_cases hjN : j ≤ N · exact ⟨(hB j hjN).1.trans hBH,(hB j hjN).2.trans hBH⟩ · have : j = N+1 := by omega subst j dsimp [H]; omega
lemma pairPrefixDetermined_inter {d : ℕ} {n m : ℕ} {A B : Set (Path d × Path d)} (hA : PairPrefixDetermined n m A) (hB : PairPrefixDetermined n m B) : PairPrefixDetermined n m (A ∩ B) := by intro P Q hf hg exact and_congr (hA P Q hf hg) (hB P Q hf hg)
lemma pairPrefixDetermined_product {d : ℕ} {n m : ℕ} {A B : Set (Path d)} (hA : PrefixDetermined n A) (hB : PrefixDetermined m B) : PairPrefixDetermined n m (A ×ˢ B) := by intro P Q hf hg exact and_congr (hA P.1 Q.1 hf) (hB P.2 Q.2 hg)
lemma prefixDetermined_cylinder_of_le {d : ℕ} (f : Path d) {N n : ℕ} (hN : N ≤ n) : PrefixDetermined n (pathCylinder f N) := by intro X Y hXY constructor · intro hX j hj exact (hXY j (hj.trans hN)).symm.trans (hX j hj) · intro hY j hj exact (hXY j (hj.trans hN)).trans (hY j hj)
lemma firstLayerHit_pair_disjoint {d : ℕ} (height : Lattice d → ℤ) (H : ℤ) : Pairwise (fun q r : ℕ × ℕ => Disjoint (FirstLayerHit height H q.1 ×ˢ FirstLayerHit height H q.2) (FirstLayerHit height H r.1 ×ˢ FirstLayerHit height H r.2)) := by intro q r hqr apply Set.disjoint_left.mpr rintro P ⟨h1,h2⟩ ⟨h3,h4⟩ by_cases hq : q.1 = r.1 · have hq2 : q.2 ≠ r.2 := fun hq2 => hqr (Prod.ext hq hq2) exact Set.disjoint_left.mp (firstLayerHit_disjoint height H hq2) h2 h4 · exact Set.disjoint_left.mp (firstLayerHit_disjoint height H hq) h1 h3
lemma shared_pair_common_true_after_prefix {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (hstep : ∀ x e, height (x+step e) ≤ height x+1) (x y : Lattice d) (c : ℝ≥0∞) (hc : ∀ u v, c ≤ sharedNoDropMass ν ℓ u v) (K : ℤ) (N : ℕ) (f g : Path d) : c * sharedPairLaw ν x y (pathCylinder f N ×ˢ pathCylinder g N) ≤ sharedPairLaw ν x y (CommonTrueAbove ℓ K ∩ (pathCylinder f N ×ˢ pathCylinder g N)) := by classical let μ := sharedPairLaw ν x y let C := pathCylinder f N ×ˢ pathCylinder g N obtain ⟨H,hKH,hx,hy,hH⟩ := finite_pair_prefix_height_bound height f g N K x y let A (q : ℕ × ℕ) := C ∩ (FirstLayerHit height H q.1 ×ˢ FirstLayerHit height H q.2) let B (q : ℕ × ℕ) := A q ∩ (FutureNoDrop ℓ q.1 ×ˢ FutureNoDrop ℓ q.2) have hdisA : Pairwise (fun q r => Disjoint (A q) (A r)) := fun q r hqr => (firstLayerHit_pair_disjoint height H hqr).mono Set.inter_subset_right Set.inter_subset_right have hdisB : Pairwise (fun q r => Disjoint (B q) (B r)) := fun q r hqr => (hdisA hqr).mono Set.inter_subset_left Set.inter_subset_left have hmA (q : ℕ × ℕ) : MeasurableSet (A q) := ((measurableSet_pathCylinder f N).prod (measurableSet_pathCylinder g N)).inter ((measurableSet_firstLayerHit height H q.1).prod (measurableSet_firstLayerHit height H q.2)) have hmB (q : ℕ × ℕ) : MeasurableSet (B q) := (hmA q).inter ((measurableSet_futureNoDrop ℓ q.1).prod (measurableSet_futureNoDrop ℓ q.2)) have hcover : μ C = ∑' q, μ (A q) := by rw [← measure_iUnion hdisA hmA] apply measure_congr filter_upwards [shared_pair_layer_hits ν ℓ htrans height hproj hstep x y H hx hy] with P hP apply propext change P ∈ C ↔ P ∈ ⋃ q, A q simp only [Set.mem_iUnion] constructor · intro hC obtain ⟨n,hn⟩ := hP.1 obtain ⟨m,hm⟩ := hP.2 exact ⟨(n,m),hC,hn,hm⟩ · rintro ⟨q,hq⟩ exact hq.1 have hindices (q : ℕ × ℕ) (P : Path d × Path d) (hP : P ∈ A q) : N < q.1 ∧ N < q.2 := by constructor · apply firstLayerHit_after_prefix height H P.1 N _ hP.2.1 intro j hj rw [hP.1.1 j hj] exact (hH j hj).1 · apply firstLayerHit_after_prefix height H P.2 N _ hP.2.2 intro j hj rw [hP.1.2 j hj] exact (hH j hj).2 have hlower (q : ℕ × ℕ) : c * μ (A q) ≤ μ (B q) := by by_cases hne : (A q).Nonempty · obtain ⟨P,hP⟩ := hne have hi := hindices q P hP apply shared_pair_record_event_noDrop_lower ν ℓ x y c hc q.1 q.2 (lt_of_le_of_lt (Nat.zero_le _) hi.1) (lt_of_le_of_lt (Nat.zero_le _) hi.2) · exact pairPrefixDetermined_inter (pairPrefixDetermined_product (prefixDetermined_cylinder_of_le f hi.1.le) (prefixDetermined_cylinder_of_le g hi.2.le)) (pairPrefixDetermined_product (firstLayerHit_prefix height H q.1) (firstLayerHit_prefix height H q.2)) · intro Q hQ refine ⟨firstLayerHit_record ℓ height hproj H q.1 Q.1 hQ.2.1, firstLayerHit_record ℓ height hproj H q.2 Q.2 hQ.2.2,?_⟩ rw [hproj,hproj,hQ.2.1.1,hQ.2.2.1] · have hz : A q = ∅ := Set.not_nonempty_iff_eq_empty.mp hne rw [hz,measure_empty,mul_zero] exact zero_le have hsub : (⋃ q, B q) ⊆ CommonTrueAbove ℓ K ∩ C := by intro P hP obtain ⟨q,hq⟩ := Set.mem_iUnion.mp hP refine ⟨⟨q.1,q.2,?_,?_⟩,hq.1.1⟩ · rw [hproj,hq.1.2.1.1] exact_mod_cast hKH · refine ⟨?_,?_,?_⟩ · exact ⟨firstLayerHit_record ℓ height hproj H q.1 P.1 hq.1.2.1,hq.2.1⟩ · exact ⟨firstLayerHit_record ℓ height hproj H q.2 P.2 hq.1.2.2,hq.2.2⟩ · rw [hproj,hproj,hq.1.2.1.1,hq.1.2.2.1] calc c * μ C = ∑' q, c * μ (A q) := by rw [hcover,ENNReal.tsum_mul_left] _ ≤ ∑' q, μ (B q) := ENNReal.tsum_le_tsum hlower _ = μ (⋃ q, B q) := (measure_iUnion hdisB hmB).symm _ ≤ μ (CommonTrueAbove ℓ K ∩ C) := measure_mono hsub
end DirectionalTransienceendend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596import Mathlibimport OAI.Probability.Ballisticity.Estimates.RawPairRetentionimport OAI.Probability.Ballisticity.Crossings.FirstHitUpward
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
def pairUp {d : ℕ} (e : Direction d) (x : Lattice d × Lattice d) : Lattice d × Lattice d := (x.1+step e,x.2+step e)
lemma rawPairEndpointLaw_upward {d : ℕ} (e : Direction d) (H : ℕ) (ω : Environment d) (x : Lattice d × Lattice d) {κ : ℝ≥0} (hκ : ∀ y, κ ≤ (ω y).1 e) : (κ : ℝ≥0∞)^2 • (rawPairEndpointLaw (realPosition (step e)) H ω x).map (pairUp e) ≤ rawPairEndpointLaw (realPosition (step e)) (H+1) ω x := by let ℓ := realPosition (step e) have hfinite (y : Lattice d) (h : ℕ) : IsFiniteMeasure (hitKernel (Strip ℓ y h) (Upper ℓ y h) (ω,y)) := ⟨lt_of_le_of_lt (hitKernel_total_le_one (disjoint_strip_upper _ _ _) _) ENNReal.one_lt_top⟩ let := hfinite x.1 H let := hfinite x.2 H let := hfinite x.1 (H+1) let := hfinite x.2 (H+1) have hp := Measure.prod_mono (coordinate_hitKernel_upward_retention e x.1 H ω hκ) (coordinate_hitKernel_upward_retention e x.2 H ω hκ) rw [Measure.prod_smul_left,Measure.prod_smul_right,smul_smul,←pow_two, Measure.map_prod_map _ _ (measurable_of_countable _) (measurable_of_countable _)] at hp unfold pairUp simpa only [rawPairEndpointLaw,Prod.map_def,Nat.cast_add,Nat.cast_one] using hp
lemma rawPairMixture_upward {d : ℕ} (e : Direction d) (H : ℕ) (ω : Environment d) (π : Measure (Lattice d × Lattice d)) {κ : ℝ≥0} (hκ : ∀ y, κ ≤ (ω y).1 e) : (κ : ℝ≥0∞)^2 • (rawPairMixture (realPosition (step e)) H π ω).map (pairUp e) ≤ rawPairMixture (realPosition (step e)) (H+1) π ω := by intro U have hU := (Set.to_countable U).measurableSet have hm : Measurable (pairUp e) := measurable_of_countable _ rw [Measure.smul_apply,smul_eq_mul,Measure.map_apply hm hU,rawPairMixture_apply, ←lintegral_const_mul _ (measurable_of_countable _),rawPairMixture_apply] apply lintegral_mono intro x have hh := rawPairEndpointLaw_upward e H ω x hκ U rwa [Measure.smul_apply,smul_eq_mul,Measure.map_apply hm hU] at hh
lemma pairUp_preserves_gap {d : ℕ} (e f : Direction d) (x : Lattice d × Lattice d) : signedCoordinate f ((pairUp e x).2-(pairUp e x).1) = signedCoordinate f (x.2-x.1) := by dsimp [pairUp] congr 1 abel
noncomputable def upwardRetainedLaw {d : ℕ} (e f : Direction d) (H : ℕ) (z : ℝ) (π : Measure (Lattice d × Lattice d)) (ω : Environment d) (κ : ℝ≥0) : Measure (Lattice d × Lattice d) := (κ : ℝ≥0∞)^2 • (retainedPairLaw (realPosition (step e)) f H z π ω).map (pairUp e)
lemma upwardRetainedLaw_le {d : ℕ} (e f : Direction d) (H : ℕ) (z : ℝ) (π : Measure (Lattice d × Lattice d)) (ω : Environment d) {κ : ℝ≥0} (hκ : ∀ y, κ ≤ (ω y).1 e) : upwardRetainedLaw e f H z π ω κ ≤ rawPairMixture (realPosition (step e)) (H+1) π ω := by apply le_trans _ (rawPairMixture_upward e H ω π hκ) intro U have hU := (Set.to_countable U).measurableSet simp only [upwardRetainedLaw,Measure.smul_apply,smul_eq_mul, Measure.map_apply (measurable_of_countable _) hU] exact mul_le_mul_right (retainedPairLaw_le _ _ _ _ _ _ _) _
lemma upwardRetainedLaw_mass {d : ℕ} (e f : Direction d) (H : ℕ) (z : ℝ) (π : Measure (Lattice d × Lattice d)) (ω : Environment d) (κ : ℝ≥0) : upwardRetainedLaw e f H z π ω κ Set.univ = (κ : ℝ≥0∞)^2 * pairKernelMass (realPosition (step e)) f H z π ω := by simp only [upwardRetainedLaw,Measure.smul_apply,smul_eq_mul, Measure.map_apply (measurable_of_countable _) MeasurableSet.univ, Set.preimage_univ,retainedPairLaw_mass]
lemma upwardRetainedLaw_support {d : ℕ} (e f : Direction d) (H : ℕ) (z : ℝ) (π : Measure (Lattice d × Lattice d)) (ω : Environment d) (κ : ℝ≥0) : ∀ᵐ y ∂upwardRetainedLaw e f H z π ω κ, z ≤ signedCoordinate f (y.2-y.1) := by unfold upwardRetainedLaw apply Measure.ae_smul_measure rw [ae_map_iff (measurable_of_countable _).aemeasurable (measurableSet_le measurable_const (measurable_of_countable _))] simpa only [pairUp_preserves_gap] using retainedPairLaw_support (realPosition (step e)) f H z π ωend DirectionalTransience
end
end
end OAI1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253import Mathlibimport OAI.Probability.Ballisticity.Estimates.GridLinear
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologynamespace DirectionalTransience
lemma weak_limit_of_tight_identification {E : Type*} [MetricSpace E] [CompleteSpace E] [SecondCountableTopology E] [MeasurableSpace E] [BorelSpace E] (μ : ℕ → ProbabilityMeasure E) (W : ProbabilityMeasure E) (ht : IsTightMeasureSet (Set.range (fun i => (μ i : Measure E)))) (hid : ∀ (j : ℕ → ℕ), Tendsto j atTop atTop → ∀ V : ProbabilityMeasure E, Tendsto (μ ∘ j) atTop (𝓝 V) → V=W) : Tendsto μ atTop (𝓝 W) := by have hc : IsCompact (closure (Set.range μ)) := isCompact_closure_of_isTightMeasureSet (by convert ht using 1 ext x simp) apply Filter.tendsto_of_subseq_tendsto intro j hj obtain ⟨V,hV,k,hk,hlim⟩ := hc.tendsto_subseq (fun n => subset_closure (Set.mem_range_self (j n))) have he := hid (j ∘ k) (hj.comp hk.tendsto_atTop) V hlim exact ⟨k,he ▸ hlim⟩
lemma pair_weak_tight {E F : Type*} [MetricSpace E] [CompleteSpace E] [SecondCountableTopology E] [MeasurableSpace E] [BorelSpace E] [MetricSpace F] [CompleteSpace F] [SecondCountableTopology F] [MeasurableSpace F] [BorelSpace F] (μ : ℕ → ProbabilityMeasure (E × F)) (W : ProbabilityMeasure E) (V : ProbabilityMeasure F) (hf : Tendsto (fun i => (μ i).map Prod.fst) atTop (𝓝 W)) (hg : Tendsto (fun i => (μ i).map Prod.snd) atTop (𝓝 V)) : IsTightMeasureSet (Set.range (fun i => (μ i : Measure (E × F)))) := by apply IsTightMeasureSet.prodMk · convert weak_sequence_tight hf using 1 ext M simp only [Set.mem_image,Set.mem_range,exists_exists_eq_and,Measure.fst] rfl · convert weak_sequence_tight hg using 1 ext M simp only [Set.mem_image,Set.mem_range,exists_exists_eq_and,Measure.snd] rfl
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153import Mathlibimport OAI.Probability.Ballisticity.Estimates.NormalLinearPast
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
lemma charPhase_continuous : Continuous charPhase := by unfold charPhase; fun_prop
noncomputable def phaseAugmentedTimes {q : ℕ} (v : Fin q → unitInterval) (s u : unitInterval) : Fin (q+2) → unitInterval := Fin.cons u (Fin.cons s v)
noncomputable def phaseAugmentedTest {q : ℕ} (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : (Fin (q+2) → ℝ × ℝ) →ᵇ ℂ := BoundedContinuousFunction.mkOfBound ⟨fun z => F (fun i => z i.succ.succ)* charPhase (a*((z 0).1-(z 1).1)+b*((z 0).2-(z 1).2)),by apply Continuous.mul (F.continuous.comp (by fun_prop)) exact charPhase_continuous.comp (by fun_prop)⟩ (2*‖F‖) (by intro x y calc _ ≤ ‖F (fun i => x i.succ.succ)*charPhase (a*((x 0).1-(x 1).1)+b*((x 0).2-(x 1).2))‖+ ‖F (fun i => y i.succ.succ)*charPhase (a*((y 0).1-(y 1).1)+b*((y 0).2-(y 1).2))‖ := by rw [dist_eq_norm]; exact norm_sub_le _ _ _ ≤ _ := by rw [norm_mul,norm_mul,charPhase_norm,charPhase_norm,mul_one,mul_one] nlinarith only [F.norm_coe_le_norm (fun i => x i.succ.succ),F.norm_coe_le_norm (fun i => y i.succ.succ)])
lemma phaseAugmentedTest_norm {q : ℕ} (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) : ‖phaseAugmentedTest F a b‖ ≤ ‖F‖ := by apply (BoundedContinuousFunction.norm_le (norm_nonneg F)).mpr intro z change ‖F (fun i => z i.succ.succ)*charPhase _‖ ≤ ‖F‖ rw [norm_mul,charPhase_norm,mul_one] exact F.norm_coe_le_norm _
lemma phaseAugmentedTest_eval {q : ℕ} (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) (v : Fin q → unitInterval) (s u : unitInterval) (P : RealPathPair) : phaseAugmentedTest F a b (pairPastCoordinates (phaseAugmentedTimes v s u) P)= F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s u P) := by simp [phaseAugmentedTest,phaseAugmentedTimes,pairPastCoordinates,pairLinearIncrement, pairPathIncrement,Fin.cons_zero,Fin.cons_succ]
lemma phaseAugmentedTimes_le {q : ℕ} (v : Fin q → unitInterval) (s u : unitInterval) (hv : ∀ z,v z ≤ s) (hsu : s ≤ u) : ∀ z,phaseAugmentedTimes v s u z ≤ u := by intro z refine Fin.cases ?_ (fun z => ?_) z · exact le_rfl · refine Fin.cases ?_ (fun z => ?_) z · exact hsu · exact (hv z).trans hsu
lemma pairLinearIncrement_add (a b : ℝ) (s u t : unitInterval) (P : RealPathPair) : pairLinearIncrement a b s u P+pairLinearIncrement a b u t P=pairLinearIncrement a b s t P := by simp only [pairLinearIncrement,pairPathIncrement,ContinuousMap.coe_mk,Bool.false_eq_true, ↓reduceIte] ring
lemma phaseAugmentedTest_mul {q : ℕ} (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) (v : Fin q → unitInterval) (s u t : unitInterval) (P : RealPathPair) : phaseAugmentedTest F a b (pairPastCoordinates (phaseAugmentedTimes v s u) P)* charPhase (pairLinearIncrement a b u t P)= F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) := by rw [phaseAugmentedTest_eval,mul_assoc,← charPhase_add,pairLinearIncrement_add]
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology BoundedContinuousFunctionnamespace DirectionalTransience
noncomputable def jointTaylorCoeff (a b : ℝ) : ℝ := 8*charTaylorConstant*(|a|+|b|)^3*normalThirdMoment+8*|a*b| *normalThirdMoment
lemma jointTaylorCoeff_nonneg (a b : ℝ) : 0 ≤ jointTaylorCoeff a b := by have hT := charTaylorConstant_nonneg have hM := normalThirdMoment_nonneg unfold jointTaylorCoeff positivity
lemma normalJointPast_phase_step {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) {A K : ℝ} (hK : 0 ≤ K) (hcross : SeparatedCrossBound μ A K) (v : Fin q → unitInterval) (s t : unitInterval) (hv : ∀ z, v z ≤ s) (hst : s < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) {ρ : ℝ} (hρ : 0 < ρ) : ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- (1-(((c:ℝ)*((t:ℝ)-s)*(a^2+b^2)/2:ℝ):ℂ))*(∫ P, F (pairPastCoordinates v P) ∂μ)‖ ≤ ‖F‖*(2*|a*b| *K*Real.exp (-A*ρ^2/((t:ℝ)-s))+ jointTaylorCoeff a b*(Real.sqrt ((c:ℝ)*((t:ℝ)-s)))^3+ 2*|a*b| *(c:ℝ)*((t:ℝ)-s)*(∫ P, nearDiagonalCutoff ρ (P.1 s-P.2 s) ∂μ)) := by have htay := normalJointPast_taylor_error μ c h v s t hv hst ht F a b have hcr := normalJointPast_complex_cross_bound μ c h hK hcross v s t hv hst ht F hρ let Z := ∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ let W := (1-(((c:ℝ)*((t:ℝ)-s)*(a^2+b^2)/2:ℝ):ℂ))*(∫ P, F (pairPastCoordinates v P) ∂μ) let Q := ∫ P, F (pairPastCoordinates v P)* ((pairPathIncrement false s t P*pairPathIncrement true s t P:ℝ):ℂ) ∂μ have hid : Z-W=(Z-(W-(a:ℂ)*b*Q))-(a:ℂ)*b*Q := by ring change ‖Z-W‖ ≤ _ rw [hid] have hn := norm_sub_le (Z-(W-(a:ℂ)*b*Q)) ((a:ℂ)*b*Q) have hm : ‖(a:ℂ)*b*Q‖=|a*b| *‖Q‖ := by simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs,abs_mul] rw [hm] at hn have hcr' := mul_le_mul_of_nonneg_left hcr (abs_nonneg (a*b)) change ‖Z-(W-(a:ℂ)*b*Q)‖ ≤ _ at htay change |a*b| *‖Q‖ ≤ _ at hcr' unfold jointTaylorCoeff nlinarith only [hn,htay,hcr']
lemma normalJointPast_cumulative_phase_step {q : ℕ} (μ : Measure RealPathPair) [IsProbabilityMeasure μ] (c : ℝ≥0) (h : NormalJointPast μ c) {A K : ℝ} (hK : 0 ≤ K) (hcross : SeparatedCrossBound μ A K) (v : Fin q → unitInterval) (s u t : unitInterval) (hv : ∀ z, v z ≤ s) (hsu : s ≤ u) (hut : u < t) (ht : (t:ℝ) < 1) (F : (Fin q → ℝ × ℝ) →ᵇ ℂ) (a b : ℝ) {ρ : ℝ} (hρ : 0 < ρ) : ‖(∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s t P) ∂μ)- (1-(((c:ℝ)*((t:ℝ)-u)*(a^2+b^2)/2:ℝ):ℂ))* (∫ P, F (pairPastCoordinates v P)*charPhase (pairLinearIncrement a b s u P) ∂μ)‖ ≤ ‖F‖*(2*|a*b| *K*Real.exp (-A*ρ^2/((t:ℝ)-u))+ jointTaylorCoeff a b*(Real.sqrt ((c:ℝ)*((t:ℝ)-u)))^3+ 2*|a*b| *(c:ℝ)*((t:ℝ)-u)*(∫ P, nearDiagonalCutoff ρ (P.1 u-P.2 u) ∂μ)) := by have hh := normalJointPast_phase_step μ c h hK hcross (phaseAugmentedTimes v s u) u t (phaseAugmentedTimes_le v s u hv hsu) hut ht (phaseAugmentedTest F a b) a b hρ simp only [phaseAugmentedTest_eval,mul_assoc,← charPhase_add,pairLinearIncrement_add] at hh have hpos : 0 ≤ 2*|a*b| *K*Real.exp (-A*ρ^2/((t:ℝ)-u))+ jointTaylorCoeff a b*(Real.sqrt ((c:ℝ)*((t:ℝ)-u)))^3+ 2*|a*b| *(c:ℝ)*((t:ℝ)-u)*(∫ P : RealPathPair, nearDiagonalCutoff ρ (P.1 u-P.2 u) ∂μ) := by have hM := jointTaylorCoeff_nonneg a b have hd : 0 ≤ (t:ℝ)-u := sub_nonneg.mpr (show (u:ℝ) ≤ t from hut.le) have hi : 0 ≤ ∫ P : RealPathPair, nearDiagonalCutoff ρ (P.1 u-P.2 u) ∂μ := integral_nonneg (fun P => (nearDiagonalCutoff_unit ρ _).1) positivity simpa only [mul_assoc] using hh.trans (by simpa only [mul_assoc] using mul_le_mul_of_nonneg_right (phaseAugmentedTest_norm F a b) hpos)
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145import Mathlibimport OAI.Probability.Ballisticity.Estimates.CurvePolicyPMF
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma measurable_pmf_dependent_event {Ω G : Type*} [MeasurableSpace Ω] [MeasurableSpace G] [MeasurableSingletonClass G] [Countable G] (p : Ω → PMF G) (hp : ∀ w, Measurable (fun ω => p ω w)) (S : Ω → Set G) (hS : ∀ w, MeasurableSet {ω | w ∈ S ω}) : Measurable (fun ω => (p ω).toMeasure (S ω)) := by simp only [PMF.toMeasure_apply _ (Set.to_countable _ |>.measurableSet)] apply Measurable.tsum intro w change Measurable (fun ω => Set.indicator {ω | w ∈ S ω} (fun ω => p ω w) ω) exact (hp w).indicator (hS w)
lemma finitePolicy_length_mass {Ω G : Type*} [Add G] [MeasurableSpace (List G)] [MeasurableSingletonClass (List G)] [Countable G] (Q : ℕ → Ω → G → PMF G) (ω : Ω) (i : ℕ) (x : G) (n : ℕ) : ∀ᵐ w ∂(finitePolicyPMF Q ω i x n).toMeasure, w.length=n := by rw [ae_iff,PMF.toMeasure_apply _ (Set.to_countable _ |>.measurableSet)] apply ENNReal.tsum_eq_zero.mpr intro w simp only [Set.indicator_apply,Set.mem_ofPred_eq] split_ifs with h · rfl · exact finitePolicyPMF_length Q ω i x n w h
lemma probability_three_cover {G : Type*} [MeasurableSpace G] (μ : Measure G) [IsProbabilityMeasure μ] (A B C : Set G) (hc : ∀ᵐ w ∂μ, w ∈ A ∨ w ∈ B ∨ w ∈ C) : 1 ≤ μ A + (μ B+μ C) := by calc 1 = μ Set.univ := (measure_univ).symm _ ≤ μ (A ∪ (B ∪ C)) := measure_mono_ae (hc.mono (fun w hw _ => hw)) _ ≤ μ A + μ (B ∪ C) := measure_union_le _ _ _ ≤ μ A + (μ B+μ C) := add_le_add_right (measure_union_le _ _) _
lemma ennreal_half_good {a b : ℝ≥0∞} (hab : 1 ≤ a+b) (hb : b < (1:ℝ≥0∞)/2) : (1:ℝ≥0∞)/2 ≤ a := by by_contra h have ha : a < (1:ℝ≥0∞)/2 := lt_of_not_ge h have ht : a+b < (1:ℝ≥0∞)/2 + (1:ℝ≥0∞)/2 := ENNReal.add_lt_add ha hb rw [ENNReal.add_halves] at ht exact (not_lt_of_ge hab) ht
lemma policy_good_mass {Ω G : Type*} [AddMonoid G] [MeasurableSpace (List G)] [MeasurableSingletonClass (List G)] [Countable G] (Q : ℕ → Ω → G → PMF G) (ω : Ω) (i : ℕ) (x : G) (n : ℕ) (Good : G → Prop) (M : List G → ℝ) (r : ℝ) (hcost : (finitePolicyPMF Q ω i x n).toMeasure {w | ¬policySafe Good x w} + (finitePolicyPMF Q ω i x n).toMeasure {w | r ≤ M w} < (1:ℝ≥0∞)/2) : (1:ℝ≥0∞)/2 ≤ (finitePolicyPMF Q ω i x n).toMeasure {w | w.length=n ∧ policySafe Good x w ∧ M w ≤ r} := by apply ennreal_half_good (probability_three_cover _ _ _ _ ?_) hcost filter_upwards [finitePolicy_length_mass Q ω i x n] with w hw by_cases hgood : policySafe Good x w · by_cases hm : M w ≤ r · exact Or.inl ⟨hw,hgood,hm⟩ · exact Or.inr (Or.inr (le_of_lt (lt_of_not_ge hm))) · exact Or.inr (Or.inl hgood)
lemma low_mass_probability {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (cost mass : Ω → ℝ≥0∞) (hc : AEMeasurable cost μ) (c : ℝ≥0∞) (hgood : ∀ ω, cost ω < (1:ℝ≥0∞)/2 → c ≤ mass ω) : μ {ω | mass ω < c} ≤ 2*(∫⁻ ω, cost ω ∂μ) := by have hs : {ω | mass ω < c} ⊆ {ω | (1:ℝ≥0∞)/2 ≤ cost ω} := by intro ω hw by_contra h exact (not_lt_of_ge (hgood ω (lt_of_not_ge h))) hw calc μ {ω | mass ω < c} ≤ μ {ω | (1:ℝ≥0∞)/2 ≤ cost ω} := measure_mono hs _ ≤ (∫⁻ ω, cost ω ∂μ)/((1:ℝ≥0∞)/2) := meas_ge_le_lintegral_div hc (by norm_num) (by norm_num) _ = 2*(∫⁻ ω, cost ω ∂μ) := by simp [div_eq_mul_inv,mul_comm]
end DirectionalTransience
end
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransiencelocal instance CurvePolicyMeasurableMs {d : ℕ} : MeasurableSpace (List (Lattice d)) := ⊤local instance CurvePolicyMeasurableSingleton {d : ℕ} : MeasurableSingletonClass (List (Lattice d)) := ⟨fun _ => trivial⟩
lemma policySafe_measurable {Ω G : Type*} [MeasurableSpace Ω] [Add G] (Good : Ω → G → Prop) (hG : ∀ x, MeasurableSet {ω | Good ω x}) (x : G) (w : List G) : MeasurableSet {ω | policySafe (Good ω) x w} := by induction w generalizing x with | nil => exact MeasurableSet.univ | cons u w ih => exact (hG x).inter (ih (x+u))
lemma curvePolicy_atom_measurable {d : ℕ} (e f : Direction d) (b : ℕ → ℝ) (B : ℝ) {H : ℕ} (hH : 0 < H) (E : Set (Lattice d)) {δ α : ℝ≥0∞} (hδ : 0 < δ) (hα : 0 < α) (dummy : Lattice d) (i : ℕ) (x : Lattice d) (n : ℕ) (w : List (Lattice d)) : Measurable (fun ω => finitePolicyPMF (fun _ ω x => curvePolicyPMF (realPosition (step e)) f x b B H E hδ hα dummy ω) ω i x n w) := by apply finitePolicyPMF_measurable_atom intro _ x u exact (Measure.measurable_coe (measurableSet_singleton u)).comp ((curvePolicy_rows (realPosition (step e)) f x b B hH E δ α dummy).mono (rowSigma_le _) le_rfl)
lemma curvePolicy_failure_measurable {d : ℕ} (e f : Direction d) (b : ℕ → ℝ) (B : ℝ) {H : ℕ} (hH : 0 < H) (E : Set (Lattice d)) {δ α : ℝ≥0∞} (hδ : 0 < δ) (hα : 0 < α) (dummy : Lattice d) (i : ℕ) (x : Lattice d) (n : ℕ) : Measurable (fun ω => (finitePolicyPMF (fun _ ω x => curvePolicyPMF (realPosition (step e)) f x b B H E hδ hα dummy ω) ω i x n).toMeasure {w | ¬policySafe (fun y => δ ≤ curveIncrement (realPosition (step e)) f y b B H ω Set.univ) x w}) := by apply measurable_pmf_dependent_event _ (curvePolicy_atom_measurable e f b B hH E hδ hα dummy i x n) intro w apply MeasurableSet.compl apply policySafe_measurable intro y apply measurableSet_le measurable_const exact (Measure.measurable_coe MeasurableSet.univ).comp ((curveIncrement_rows (realPosition (step e)) f y b B hH).mono (rowSigma_le _) le_rfl)
lemma curvePolicy_fixed_event_measurable {d : ℕ} (e f : Direction d) (b : ℕ → ℝ) (B : ℝ) {H : ℕ} (hH : 0 < H) (E : Set (Lattice d)) {δ α : ℝ≥0∞} (hδ : 0 < δ) (hα : 0 < α) (dummy : Lattice d) (i : ℕ) (x : Lattice d) (n : ℕ) (S : Set (List (Lattice d))) : Measurable (fun ω => (finitePolicyPMF (fun _ ω x => curvePolicyPMF (realPosition (step e)) f x b B H E hδ hα dummy ω) ω i x n).toMeasure S) := measurable_pmf_dependent_event _ (curvePolicy_atom_measurable e f b B hH E hδ hα dummy i x n) (fun _ => S) (fun w => MeasurableSet.const (w ∈ S))
end DirectionalTransience
end
end
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313import Mathlibimport OAI.Probability.Ballisticity.Estimates.NormalizedSharedRestrictimport OAI.Probability.Ballisticity.Walk.RegularPath
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma regularPath_cross {d : ℕ} (ℓ : Vector d) (x : Lattice d) (H : ℝ) {X : Path d} (hX : X ∈ RegularPath ℓ x) (hD : X ∈ NoDrop ℓ x) : X ∈ Cross ℓ x H := by obtain ⟨n,hn⟩ := (hX.2.2.eventually_ge_atTop (dot (realPosition x) ℓ+H)).exists exact ⟨n,hn,fun j _ => hD j⟩
lemma hitWordsEvent_compl_on {d : ℕ} (x y : Lattice d) (S T : Set (Lattice d)) (hST : Disjoint S T) (E : Set (HitWord x S T × HitWord y S T)) {Z : Path d × Path d} (hZ : Z ∈ hitWordsEvent x y S T Set.univ) : Z ∈ hitWordsEvent x y S T Eᶜ ↔ Z ∉ hitWordsEvent x y S T E := by obtain ⟨w,hw⟩ := Set.mem_iUnion.mp hZ obtain ⟨_,hw⟩ := Set.mem_iUnion.mp hw have hu (v : HitWord x S T × HitWord y S T) (hv : Z ∈ wordCylinder x v.1.val ×ˢ wordCylinder y v.2.val) : v = w := by by_contra h exact Set.disjoint_left.mp (hitWords_pair_cylinders_disjoint x y S T hST h) hv hw constructor · intro hc he obtain ⟨v,hv⟩ := Set.mem_iUnion.mp hc obtain ⟨hv,hcy⟩ := Set.mem_iUnion.mp hv obtain ⟨u,hu'⟩ := Set.mem_iUnion.mp he obtain ⟨hu',hcy'⟩ := Set.mem_iUnion.mp hu' rw [hu v hcy] at hv rw [hu u hcy'] at hu' exact hv hu' · intro hn refine Set.mem_iUnion.mpr ⟨w,Set.mem_iUnion.mpr ⟨?_,hw⟩⟩ exact fun h => hn (Set.mem_iUnion.mpr ⟨w,Set.mem_iUnion.mpr ⟨h,hw⟩⟩)
lemma regularPath_hitWords_cover {d : ℕ} (ℓ : Vector d) (x y : Lattice d) (hxy : dot (realPosition x) ℓ = dot (realPosition y) ℓ) (H : ℝ) {Z : Path d × Path d} (hZ : (Z.1 ∈ RegularPath ℓ x ∧ Z.1 ∈ NoDrop ℓ x) ∧ (Z.2 ∈ RegularPath ℓ y ∧ Z.2 ∈ NoDrop ℓ y)) : Z ∈ hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) Set.univ := by have hx := regularPath_cross ℓ x H hZ.1.1 hZ.1.2 have hy := regularPath_cross ℓ y H hZ.2.1 hZ.2.2 rw [cross_eq_hit] at hx hy have hs : Strip ℓ y H = Strip ℓ x H := by unfold Strip; rw [hxy] have ht : Upper ℓ y H = Upper ℓ x H := by unfold Upper; rw [hxy] rw [hs,ht] at hy obtain ⟨u,hu⟩ := (hitWord_cover x _ _ Z.1 hZ.1.1.1 hZ.1.1.2.1).mp hx obtain ⟨v,hv⟩ := (hitWord_cover y _ _ Z.2 hZ.2.1.1 hZ.2.1.2.1).mp hy exact Set.mem_iUnion.mpr ⟨(u,v),Set.mem_iUnion.mpr ⟨Set.mem_univ _,hu,hv⟩⟩
lemma prefix_event_real_compl {d : ℕ} (μ : Measure (Path d × Path d)) [IsProbabilityMeasure μ] (x y : Lattice d) (S T : Set (Lattice d)) (hST : Disjoint S T) (hcover : ∀ᵐ Z ∂μ, Z ∈ hitWordsEvent x y S T Set.univ) (E : Set (HitWord x S T × HitWord y S T)) : μ.real (hitWordsEvent x y S T Eᶜ) = 1-μ.real (hitWordsEvent x y S T E) := by have he : μ (hitWordsEvent x y S T Eᶜ) = μ (hitWordsEvent x y S T E)ᶜ := by apply measure_congr filter_upwards [hcover] with Z hZ exact propext (hitWordsEvent_compl_on x y S T hST E hZ) change (μ _).toReal = _ rw [he] simpa only [Measure.real,measure_univ,ENNReal.toReal_one] using (measureReal_compl (μ := μ) (measurableSet_hitWordsEvent x y S T E))
noncomputable def prefixVariation {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (x y : Lattice d) (H : ℝ) : ℝ := sSup (Set.range fun E : Set (HitWord x (Strip ℓ x H) (Upper ℓ x H) × HitWord y (Strip ℓ x H) (Upper ℓ x H)) => |(sharedConditionedPairLaw ν ℓ x y).real (hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E)- ((conditionedFrom ν ℓ x).prod (conditionedFrom ν ℓ y)).real (hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) E)|)
lemma prefixVariation_bound {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : dot ℓ ℓ = 1) (htrans : DirectionallyTransient ν ℓ) (x y : Lattice d) (hxy : dot (realPosition x) ℓ = dot (realPosition y) ℓ) (H : ℝ) : prefixVariation ν ℓ x y H ≤ (sharedConditionedPairLaw ν ℓ x y).real (PrefixContact (Strip ℓ x H)) + ((sharedNoDropMass ν ℓ x y)⁻¹ * ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ x y + 2*annealedLaw ν (Cross ℓ 0 H \ NoDrop ℓ 0))).toReal := by let μ := sharedConditionedPairLaw ν ℓ x y let η := (conditionedFrom ν ℓ x).prod (conditionedFrom ν ℓ y) have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) have hp₂ := ne_of_gt (sharedNoDropMass_pos ν hue ℓ hℓ htrans x y) let : IsProbabilityMeasure μ := sharedConditionedPairLaw_probability ν ℓ x y hp₂ let : IsProbabilityMeasure (conditionedFrom ν ℓ x) := conditionedFrom_probability ν ℓ x hp let : IsProbabilityMeasure (conditionedFrom ν ℓ y) := conditionedFrom_probability ν ℓ y hp have hc₁ : ∀ᵐ Z ∂μ, Z ∈ hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) Set.univ := (sharedConditioned_regularPath ν ℓ htrans x y).mono fun _ h => regularPath_hitWords_cover ℓ x y hxy H h have hc₂ : ∀ᵐ Z ∂η, Z ∈ hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) Set.univ := by have hmeas : MeasurableSet {Z : Path d × Path d | (Z.1 ∈ RegularPath ℓ x ∧ Z.1 ∈ NoDrop ℓ x) ∧ (Z.2 ∈ RegularPath ℓ y ∧ Z.2 ∈ NoDrop ℓ y)} := ((measurableSet_regularPath ℓ x).inter (measurableSet_noDrop ℓ x)).prod ((measurableSet_regularPath ℓ y).inter (measurableSet_noDrop ℓ y)) have hr := (Measure.ae_prod_iff_ae_ae hmeas).mpr (show ∀ᵐ X ∂conditionedFrom ν ℓ x, ∀ᵐ Y ∂conditionedFrom ν ℓ y, (X ∈ RegularPath ℓ x ∧ X ∈ NoDrop ℓ x) ∧ (Y ∈ RegularPath ℓ y ∧ Y ∈ NoDrop ℓ y) from (conditionedFrom_regularPath ν ℓ htrans x).mono fun X hX => (conditionedFrom_regularPath ν ℓ htrans y).mono fun Y hY => ⟨hX,hY⟩) exact hr.mono fun _ h => regularPath_hitWords_cover ℓ x y hxy H h let δ := (sharedNoDropMass ν ℓ x y)⁻¹ * ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ x y + 2*annealedLaw ν (Cross ℓ 0 H \ NoDrop ℓ 0)) have hδ : δ ≠ ∞ := by apply ENNReal.mul_ne_top (ENNReal.inv_ne_top.mpr hp₂) finiteness let F := hitWordsEvent x y (Strip ℓ x H) (Upper ℓ x H) have hb E : μ.real (F E) ≤ η.real (F E)+μ.real (PrefixContact (Strip ℓ x H))+δ.toReal := by have hh := conditioned_prefix_comparison ν hue ℓ hℓ htrans x y hxy H E have hh' := ENNReal.toReal_mono (show η (F E)+μ (PrefixContact (Strip ℓ x H))+δ ≠ ∞ by finiteness) hh simpa only [Measure.real,ENNReal.toReal_add (measure_ne_top _ _) (measure_ne_top _ _), ENNReal.toReal_add (by finiteness : η (F E)+μ (PrefixContact (Strip ℓ x H)) ≠ ∞) hδ] using hh' apply csSup_le (Set.range_nonempty _) rintro _ ⟨E,rfl⟩ have hb₁ := hb E have hb₂ := hb Eᶜ rw [prefix_event_real_compl μ x y _ _ (disjoint_strip_upper ℓ x H) hc₁, prefix_event_real_compl η x y _ _ (disjoint_strip_upper ℓ x H) hc₂] at hb₂ exact abs_sub_le_iff.mpr ⟨by linarith,by linarith⟩
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma sharedNoDropMass_tendsto_gap {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (f : Direction d) (x y : ℕ → Lattice d) (hgap : Tendsto (fun i => |signedCoordinate f (y i-x i)|) atTop atTop) : Tendsto (fun i => (sharedNoDropMass ν ℓ (x i) (y i)).toReal) atTop (𝓝 ((annealedLaw ν (NoDrop ℓ 0)).toReal^2)) := by apply Metric.tendsto_nhds.mpr intro ε hε obtain ⟨N,hN⟩ := sharedNoDropMass_mixing ν ℓ hε filter_upwards [hgap.eventually_gt_atTop (2*(N:ℝ))] with i hi rw [Real.dist_eq] apply hN apply latticeBall_disjoint_of_coordinate_gap f.1 have he : |signedCoordinate f (y i-x i)| = (|(x i) f.1-(y i) f.1| : ℝ) := by simp only [signedCoordinate,Pi.sub_apply,apply_ite abs,abs_neg,ite_self,Int.cast_sub] exact abs_sub_comm _ _ rw [he] at hi exact_mod_cast hi
lemma prefix_error_tendsto_zero {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) (f : Direction d) (x y : ℕ → Lattice d) (H : ℕ → ℕ) (hH : Tendsto H atTop atTop) (hgap : Tendsto (fun i => |signedCoordinate f (y i-x i)|) atTop atTop) : Tendsto (fun i => ((sharedNoDropMass ν ℓ (x i) (y i))⁻¹ * ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ (x i) (y i) + 2*annealedLaw ν (Cross ℓ 0 (H i) \ NoDrop ℓ 0))).toReal) atTop (𝓝 0) := by let p := annealedLaw ν (NoDrop ℓ 0) let q := fun i => sharedNoDropMass ν ℓ (x i) (y i) have hp : p ≠ 0 := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) have hpfin : p^2 ≠ ∞ := by finiteness have hqfin (i : ℕ) : q i ≠ ∞ := ne_of_lt ((sharedNoDropMass_le_one ν ℓ (x i) (y i)).trans_lt (by simp)) have hq : Tendsto q atTop (𝓝 (p^2)) := (ENNReal.tendsto_toReal_iff hqfin hpfin).mp (by simpa only [ENNReal.toReal_pow] using sharedNoDropMass_tendsto_gap ν ℓ f x y hgap) have hdiff : Tendsto (fun i => p^2-q i) atTop (𝓝 0) := by simpa only [tsub_self,Function.comp_def] using (ENNReal.tendsto_sub (Or.inl hpfin)).comp (tendsto_const_nhds.prodMk_nhds hq) have herr : Tendsto (fun i => 2*annealedLaw ν (Cross ℓ 0 (H i) \ NoDrop ℓ 0)) atTop (𝓝 0) := by simpa only [mul_zero,Function.comp_def] using ENNReal.Tendsto.const_mul ((cross_error_tendsto_zero ν ℓ).comp hH) (Or.inr (by norm_num : (2:ℝ≥0∞) ≠ ∞)) have hinv : Tendsto (fun i => (q i)⁻¹) atTop (𝓝 (p^2)⁻¹) := tendsto_inv_iff.mpr hq have hsum := hdiff.add herr rw [zero_add] at hsum have hprod := ENNReal.Tendsto.mul hinv (Or.inr ENNReal.zero_ne_top) hsum (Or.inr (ENNReal.inv_ne_top.mpr (pow_ne_zero _ hp))) rw [mul_zero] at hprod simpa only [ENNReal.toReal_zero,Function.comp_def] using (ENNReal.tendsto_toReal ENNReal.zero_ne_top).comp hprod
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331import Mathlibimport OAI.Probability.Ballisticity.Geometry.CoordinateLanesDisjointimport OAI.Probability.Ballisticity.Estimates.PrefixVariation
namespace OAI
sectionsectionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topologyopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Pointwise Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical BoundedContinuousFunctionopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalopen MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
lemma prefixVariation_nonneg {d : ℕ} (ν : Measure (Row d)) (ℓ : Vector d) (x y : Lattice d) (H : ℝ) : 0 ≤ prefixVariation ν ℓ x y H := by apply Real.sSup_nonneg rintro _ ⟨E,rfl⟩ exact abs_nonneg _
theorem off_diagonal_comparison {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (hue : UniformElliptic ν) (e f : Direction d) (hef : e.1 ≠ f.1) (htrans : DirectionallyTransient ν (realPosition (step e))) (r : ℕ → ℝ) (hrpos : ∀ i, 0 < r i) (hr : IsGaussianSequence (independentConditionedPairLaw ν (realPosition (step e))) (commonIncrementProcess (realPosition (step e)) f 0) r) (x y : ℕ → Lattice d) (hxy : ∀ i, signedHeight e (x i) = signedHeight e (y i)) {a t : ℝ} (ha : 0 < a) (ht : 0 < t) (hsep : ∀ i, a*r i ≤ |signedCoordinate f (y i-x i)|) : let ℓ := realPosition (step e) let n := fun i => fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ f 0) (r i) limsup (fun i => prefixVariation ν ℓ (x i) (y i) (⌊t*n i⌋₊ : ℝ)) atTop ≤ 8*Real.exp (-commonMeanWidth ν ℓ*a^2/(9*t)) := by let ℓ := realPosition (step e) let n := fun i => fluctuationScale (independentConditionedPairLaw ν ℓ) (commonIncrementProcess ℓ f 0) (r i) let H := fun i => ⌊t*n i⌋₊ let v := fun i => prefixVariation ν ℓ (x i) (y i) (H i) let μ := fun i => sharedConditionedPairLaw ν ℓ (x i) (y i) let : ∀ i, IsProbabilityMeasure (μ i) := fun i => sharedConditionedPairLaw_probability ν ℓ (x i) (y i) (ne_of_gt (sharedNoDropMass_pos ν hue ℓ (signed_direction_unit e) htrans (x i) (y i))) let c := fun i => (μ i).real (PrefixContact (Strip ℓ (x i) (H i))) let δ := fun i => ((sharedNoDropMass ν ℓ (x i) (y i))⁻¹ * ((annealedLaw ν (NoDrop ℓ 0))^2-sharedNoDropMass ν ℓ (x i) (y i) + 2*annealedLaw ν (Cross ℓ 0 (H i) \ NoDrop ℓ 0))).toReal let R := 8*Real.exp (-commonMeanWidth ν ℓ*a^2/(9*t)) have hgap : Tendsto (fun i => |signedCoordinate f (y i-x i)|) atTop atTop := tendsto_atTop_mono hsep (hr.1.const_mul_atTop ha) have hn := recordFluctuationScale_tendsto ν hue e f hef htrans r hr.1 have hH : Tendsto H atTop atTop := tendsto_nat_floor_atTop.comp (hn.const_mul_atTop ht) have hδ : Tendsto δ atTop (𝓝 0) := prefix_error_tendsto_zero ν ℓ htrans f x y H hH hgap have hb (i : ℕ) : v i ≤ c i+δ i := prefixVariation_bound ν hue ℓ (signed_direction_unit e) htrans (x i) (y i) (by simp only [ℓ,signedHeight_projection,hxy i]) (H i) have hc : limsup c atTop ≤ R := shared_contact_limsup ν hue e f hef htrans r hrpos hr x y hxy ha ht hsep have hcb : IsBoundedUnder (· ≤ ·) atTop c := by refine ⟨1, ?_⟩ change ∀ᶠ i in atTop, c i ≤ 1 exact Eventually.of_forall fun i => measureReal_le_one have hvb : IsBoundedUnder (· ≤ ·) atTop v := by refine ⟨2, ?_⟩ change ∀ᶠ i in atTop, v i ≤ 2 filter_upwards [hδ.eventually_lt_const (by norm_num : (0:ℝ)<1)] with i hi have hh : c i ≤ 1 := measureReal_le_one linarith [hb i] have hvc : IsCoboundedUnder (· ≤ ·) atTop v := (show IsBoundedUnder (· ≥ ·) atTop v from ⟨0, (show ∀ᶠ i in atTop, 0 ≤ v i from Eventually.of_forall fun i => prefixVariation_nonneg ν ℓ (x i) (y i) (H i))⟩).isCoboundedUnder_le apply (limsup_le_iff hvc hvb).mpr intro b hb' have hc' := eventually_lt_of_limsup_lt (hc.trans_lt (show R < R+(b-R)/3 by linarith)) hcb have hδ' := hδ.eventually_lt_const (show (0:ℝ)<(b-R)/3 by linarith) filter_upwards [hc',hδ'] with i hi hi' linarith [hb i]
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classicalnamespace DirectionalTransience
def layerPairPrefix {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) (nm : ℕ × ℕ) : Set (Path d × Path d) := (FirstLayerHit height H (nm.1+1) ×ˢ FirstLayerHit height H (nm.2+1)) ∩ {P | (P.1 (nm.1+1),P.2 (nm.2+1)) ∈ E} ∩ (StayUntil {z | dot (realPosition x) ℓ ≤ dot (realPosition z) ℓ} (nm.1+1) ×ˢ StayUntil {z | dot (realPosition y) ℓ ≤ dot (realPosition z) ℓ} (nm.2+1))
def layerPairEvent {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) : Set (Path d × Path d) := ⋃ nm, layerPairPrefix ℓ height x y H E nm
def layerPairTruthEvent {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) : Set (Path d × Path d) := ⋃ nm, layerPairPrefix ℓ height x y H E nm ∩ (FutureNoDrop ℓ (nm.1+1) ×ˢ FutureNoDrop ℓ (nm.2+1))
lemma measurableSet_layerPairPrefix {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) (nm : ℕ × ℕ) : MeasurableSet (layerPairPrefix ℓ height x y H E nm) := by apply MeasurableSet.inter · exact ((measurableSet_firstLayerHit height H (nm.1+1)).prod (measurableSet_firstLayerHit height H (nm.2+1))).inter (by apply E.to_countable.measurableSet.preimage; fun_prop) · exact (measurableSet_stayUntil _ _).prod (measurableSet_stayUntil _ _)
lemma layerPairPrefix_determined {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) (nm : ℕ × ℕ) : PairPrefixDetermined (nm.1+1) (nm.2+1) (layerPairPrefix ℓ height x y H E nm) := by intro P Q h1 h2 have he1 := firstLayerHit_prefix height H (nm.1+1) P.1 Q.1 h1 have he2 := firstLayerHit_prefix height H (nm.2+1) P.2 Q.2 h2 have hs1 : P.1 ∈ StayUntil {z | dot (realPosition x) ℓ ≤ dot (realPosition z) ℓ} (nm.1+1) ↔ Q.1 ∈ StayUntil {z | dot (realPosition x) ℓ ≤ dot (realPosition z) ℓ} (nm.1+1) := by exact forall_congr' fun j => forall_congr' fun hj => by rw [h1 j hj] have hs2 : P.2 ∈ StayUntil {z | dot (realPosition y) ℓ ≤ dot (realPosition z) ℓ} (nm.2+1) ↔ Q.2 ∈ StayUntil {z | dot (realPosition y) ℓ ≤ dot (realPosition z) ℓ} (nm.2+1) := by exact forall_congr' fun j => forall_congr' fun hj => by rw [h2 j hj] change ((_ ∧ _) ∧ _) ∧ (_ ∧ _) ↔ ((_ ∧ _) ∧ _) ∧ (_ ∧ _) simp only [Set.mem_ofPred_eq] rw [he1,he2,hs1,hs2,h1 _ le_rfl,h2 _ le_rfl]
lemma layerPairPrefix_disjoint {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) : Pairwise (fun n m => Disjoint (layerPairPrefix ℓ height x y H E n) (layerPairPrefix ℓ height x y H E m)) := by intro n m hnm apply Set.disjoint_left.mpr intro P hn hm by_cases he : n.1 = m.1 · have hf : n.2+1 ≠ m.2+1 := by intro h; apply hnm; exact Prod.ext he (by omega) exact Set.disjoint_left.mp (firstLayerHit_disjoint height H hf) hn.1.1.2 hm.1.1.2 · have hf : n.1+1 ≠ m.1+1 := by omega exact Set.disjoint_left.mp (firstLayerHit_disjoint height H hf) hn.1.1.1 hm.1.1.1
lemma layerPairTruthEvent_subset_noDrop {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) : layerPairTruthEvent ℓ height x y H E ⊆ NoDrop ℓ x ×ˢ NoDrop ℓ y := by intro P hP obtain ⟨nm,hP⟩ := Set.mem_iUnion.mp hP have aux (n : ℕ) (z : Lattice d) (X : Path d) (hs : X ∈ StayUntil {w | dot (realPosition z) ℓ ≤ dot (realPosition w) ℓ} n) (ht : X ∈ FutureNoDrop ℓ n) : X ∈ NoDrop ℓ z := by intro j by_cases hj : j ≤ n · exact hs j hj · have hh := ht (j-n) rw [Nat.add_sub_of_le (by omega : n ≤ j)] at hh exact (hs n le_rfl).trans hh exact ⟨aux _ _ _ hP.1.2.1 hP.2.1,aux _ _ _ hP.1.2.2 hP.2.2⟩
theorem shared_layer_truth_domination {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] (ℓ : Vector d) (height : Lattice d → ℤ) (hproj : ∀ z, dot (realPosition z) ℓ = (height z : ℝ)) (x y : Lattice d) (H : ℤ) (E : Set (Lattice d × Lattice d)) (c : ℝ≥0∞) (hc : ∀ u v, c ≤ sharedNoDropMass ν ℓ u v) : c * sharedConditionedPairLaw ν ℓ x y (layerPairEvent ℓ height x y H E) ≤ sharedConditionedPairLaw ν ℓ x y (layerPairTruthEvent ℓ height x y H E) := by let A := layerPairPrefix ℓ height x y H E let B := fun nm : ℕ × ℕ => A nm ∩ (FutureNoDrop ℓ (nm.1+1) ×ˢ FutureNoDrop ℓ (nm.2+1)) have hAm nm : MeasurableSet (A nm) := measurableSet_layerPairPrefix ℓ height x y H E nm have hBm nm : MeasurableSet (B nm) := (hAm nm).inter ((measurableSet_futureNoDrop ℓ _).prod (measurableSet_futureNoDrop ℓ _)) have hdisA := layerPairPrefix_disjoint ℓ height x y H E have hdisB : Pairwise (fun nm mn => Disjoint (B nm) (B mn)) := by intro nm mn hne exact (hdisA hne).mono Set.inter_subset_left Set.inter_subset_left have hraw : c * sharedPairLaw ν x y (⋃ nm, A nm) ≤ sharedPairLaw ν x y (⋃ nm, B nm) := by rw [measure_iUnion hdisA hAm,measure_iUnion hdisB hBm,← ENNReal.tsum_mul_left] apply ENNReal.tsum_le_tsum intro nm apply shared_pair_record_event_noDrop_lower ν ℓ x y c hc _ _ (by omega) (by omega) (A nm) (layerPairPrefix_determined ℓ height x y H E nm) intro P hP exact ⟨firstLayerHit_record ℓ height hproj H _ _ hP.1.1.1, firstLayerHit_record ℓ height hproj H _ _ hP.1.1.2, by rw [hproj,hproj,hP.1.1.1.1,hP.1.1.2.1]⟩ unfold sharedConditionedPairLaw change c * ((sharedNoDropMass ν ℓ x y)⁻¹ • (sharedPairLaw ν x y).restrict (NoDrop ℓ x ×ˢ NoDrop ℓ y)) (⋃ nm, A nm) ≤ ((sharedNoDropMass ν ℓ x y)⁻¹ • (sharedPairLaw ν x y).restrict (NoDrop ℓ x ×ˢ NoDrop ℓ y)) (⋃ nm, B nm) have hsub : (⋃ nm, B nm) ⊆ NoDrop ℓ x ×ˢ NoDrop ℓ y := layerPairTruthEvent_subset_noDrop ℓ height x y H E rw [Measure.smul_apply,Measure.smul_apply, Measure.restrict_apply (MeasurableSet.iUnion hAm), Measure.restrict_apply (MeasurableSet.iUnion hBm), Set.inter_eq_left.mpr hsub] simp only [smul_eq_mul] calc c * ((sharedNoDropMass ν ℓ x y)⁻¹ * sharedPairLaw ν x y ((⋃ nm, A nm) ∩ (NoDrop ℓ x ×ˢ NoDrop ℓ y))) ≤ c * ((sharedNoDropMass ν ℓ x y)⁻¹ * sharedPairLaw ν x y (⋃ nm, A nm)) := by gcongr exact Set.inter_subset_left _ = (sharedNoDropMass ν ℓ x y)⁻¹ * (c * sharedPairLaw ν x y (⋃ nm, A nm)) := by ring _ ≤ _ := by gcongr
end DirectionalTransience
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal BigOperators Topology Classical
endend
end OAI12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849import Mathlibimport OAI.Probability.Ballisticity.Model
namespace OAI
section
section
open MeasureTheory ProbabilityTheory Filteropen scoped ENNReal NNReal Topologynamespace DirectionalTransience
lemma probability_lower_transfer {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] (p q cost : ℕ → Ω → ℝ) (c : ℝ) (hc : 0 < c) (hp : Tendsto (fun i => μ.real {x | p i x < c}) atTop (𝓝 0)) (hcost : TendstoInMeasure μ cost atTop (fun _ => 0)) (hb : ∀ i, ∀ᵐ x ∂μ, |p i x-q i x| ≤ cost i x) : Tendsto (fun i => μ.real {x | q i x < c/2}) atTop (𝓝 0) := by have hh := (tendstoInMeasure_iff_measureReal_norm.mp hcost) (c/2) (half_pos hc) simp only [sub_zero] at hh have hlim : Tendsto (fun i => μ.real {x | p i x < c}+μ.real {x | c/2 ≤ ‖cost i x‖}) atTop (𝓝 0) := by simpa only [add_zero] using hp.add hh apply tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hlim (fun _ => measureReal_nonneg) intro i apply le_trans _ (measureReal_union_le {x | p i x < c} {x | c/2 ≤ ‖cost i x‖}) apply ENNReal.toReal_mono (measure_ne_top _ _) apply measure_mono_ae filter_upwards [hb i] with x hx intro hqx change q i x < c/2 at hqx change p i x < c ∨ c/2 ≤ ‖cost i x‖ by_cases hpx : p i x < c · exact Or.inl hpx · right have hp' : c ≤ p i x := le_of_not_gt hpx have h' : p i x-q i x ≤ cost i x := (le_abs_self _).trans hx have h'' : cost i x ≤ ‖cost i x‖ := by simpa only [Real.norm_eq_abs] using le_abs_self (cost i x) linarith
end DirectionalTransience
end
end
end OAIlean/OAI/Probability/Ballisticity/Estimates/InputMarginal.leanAdded+51
lean/OAI/Probability/Ballisticity/Estimates/IntegerMedian.leanAdded+435
lean/OAI/Probability/Ballisticity/Estimates/InteriorPairMeasureExt.leanAdded+89
lean/OAI/Probability/Ballisticity/Estimates/JointMeshPhase.leanAdded+156
lean/OAI/Probability/Ballisticity/Estimates/JointPastMoments.leanAdded+149
lean/OAI/Probability/Ballisticity/Estimates/JointPastRestart.leanAdded+187
lean/OAI/Probability/Ballisticity/Estimates/LateMoment.leanAdded+145
lean/OAI/Probability/Ballisticity/Estimates/LayerPairTruthEventMono.leanAdded+435
lean/OAI/Probability/Ballisticity/Estimates/ListPrefixSum.leanAdded+46
lean/OAI/Probability/Ballisticity/Estimates/LocalRadiusOrder.leanAdded+154
lean/OAI/Probability/Ballisticity/Estimates/LocalStoppedSplice.leanAdded+321
lean/OAI/Probability/Ballisticity/Estimates/LowerClip.leanAdded+434
lean/OAI/Probability/Ballisticity/Estimates/MarkedObservables.leanAdded+186
lean/OAI/Probability/Ballisticity/Estimates/MartingaleExponentialSubmartingale.leanAdded+429
lean/OAI/Probability/Ballisticity/Estimates/MaxTailDecomposition.leanAdded+166
lean/OAI/Probability/Ballisticity/Estimates/MeasurableCountableSample.leanAdded+245
lean/OAI/Probability/Ballisticity/Estimates/MeasureAdd.leanAdded+423
lean/OAI/Probability/Ballisticity/Estimates/MedianAeConst.leanAdded+289
lean/OAI/Probability/Ballisticity/Estimates/MixtureSmallMassProbability.leanAdded+351
lean/OAI/Probability/Ballisticity/Estimates/MomentRescaling.leanAdded+160
lean/OAI/Probability/Ballisticity/Estimates/NaturalTailIntegrable.leanAdded+88
lean/OAI/Probability/Ballisticity/Estimates/NoDropApproxError.leanAdded+272
lean/OAI/Probability/Ballisticity/Estimates/NonCollapsedSums.leanAdded+159
lean/OAI/Probability/Ballisticity/Estimates/NormalLinearPast.leanAdded+229
lean/OAI/Probability/Ballisticity/Estimates/NormalizedRestrictionContact.leanAdded+201
lean/OAI/Probability/Ballisticity/Estimates/NormalizedSharedRestrict.leanAdded+196
lean/OAI/Probability/Ballisticity/Estimates/ObservedBudget.leanAdded+234
lean/OAI/Probability/Ballisticity/Estimates/ObservedCharges.leanAdded+277
lean/OAI/Probability/Ballisticity/Estimates/ObservedDrift.leanAdded+185
lean/OAI/Probability/Ballisticity/Estimates/ObservedPotential.leanAdded+158
lean/OAI/Probability/Ballisticity/Estimates/ObserverAlmostSure.leanAdded+170
lean/OAI/Probability/Ballisticity/Estimates/OccupationAlgebra.leanAdded+114
lean/OAI/Probability/Ballisticity/Estimates/OccupationLimit.leanAdded+246
lean/OAI/Probability/Ballisticity/Estimates/OccupationParameters.leanAdded+132
lean/OAI/Probability/Ballisticity/Estimates/OccupationSampling.leanAdded+221
lean/OAI/Probability/Ballisticity/Estimates/OperationalLengthMarks.leanAdded+176
lean/OAI/Probability/Ballisticity/Estimates/OperationalMarkBounds.leanAdded+150
lean/OAI/Probability/Ballisticity/Estimates/OrderedTimes.leanAdded+425
lean/OAI/Probability/Ballisticity/Estimates/OutwardCanonical.leanAdded+122
lean/OAI/Probability/Ballisticity/Estimates/OutwardCapL1.leanAdded+133
lean/OAI/Probability/Ballisticity/Estimates/OutwardCapLocality.leanAdded+81
lean/OAI/Probability/Ballisticity/Estimates/OwnMarginalOccupation.leanAdded+98
lean/OAI/Probability/Ballisticity/Estimates/PairPrefix.leanAdded+490
lean/OAI/Probability/Ballisticity/Estimates/PairUpwardRetention.leanAdded+96
lean/OAI/Probability/Ballisticity/Estimates/PairWeakUniqueness.leanAdded+53
lean/OAI/Probability/Ballisticity/Estimates/PastPhaseExtension.leanAdded+153
lean/OAI/Probability/Ballisticity/Estimates/PolicyGoodMass.leanAdded+145
lean/OAI/Probability/Ballisticity/Estimates/PrefixVariation.leanAdded+313
lean/OAI/Probability/Ballisticity/Estimates/PrefixVariationNonneg.leanAdded+331
lean/OAI/Probability/Ballisticity/Estimates/ProbabilityLowerTransfer.leanAdded+49