cfahlgren1/math / lean /OAI /Probability /FirstPassage /SpatialModulus.lean
cfahlgren1's picture
download
raw
3.49 kB
import OAI.Probability.FirstPassage.CoordinateTails
import Mathlib.MeasureTheory.OuterMeasure.BorelCantelli
import Mathlib.Data.Int.Interval
namespace OAI
namespace PlanarFPP
open MeasureTheory ProbabilityTheory Finset Filter Set
open scoped ENNReal Topology
noncomputable def latticeBox (n : ℕ) : Finset Vertex :=
(Finset.Icc (-(n : ℤ)) n) ×ˢ (Finset.Icc (-(n : ℤ)) n)
theorem latticeBox_card (n : ℕ) : (latticeBox n).card = (2*n+1)^2 := by
have hi : (Finset.Icc (-(n : ℤ)) n).card = 2*n+1 := by
rw [Int.card_Icc]
omega
simp [latticeBox, hi, pow_two]
variable {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω} {τ : Edge → Ω → ℝ}
def badConnections (τ : Edge → Ω → ℝ) (ε : ℝ) (n : ℕ) : Set Ω :=
⋃ pq ∈ (latticeBox n) ×ˢ (latticeBox n),
{ω | 4 * (latticeDistance pq.1 pq.2 : ℝ) + ε * n ≤
pathCost (fun e => τ e ω) pq.1 (coordinatePath pq.1 pq.2)}
theorem badConnections_probability (h : ExponentialEnvironment P τ) (ε : ℝ) (n : ℕ) :
P.real (badConnections τ ε n) ≤
(2*(n : ℝ)+1)^4 * (2 * Real.exp (-ε * n / 4)) := by
let _ := h.probability
refine (measureReal_biUnion_finset_le _ _).trans ?_
calc
_ ≤ ∑ _pq ∈ (latticeBox n) ×ˢ (latticeBox n),
2 * Real.exp (-(ε * n) / 4) :=
sum_le_sum (fun pq _ => costly_coordinatePath_probability_real h pq.1 pq.2 (ε*n))
_ = _ := by simp [latticeBox_card]; ring
theorem summable_box_connection_bound {ε : ℝ} (hε : 0 < ε) :
Summable (fun n : ℕ => (2*(n : ℝ)+1)^4 * (2 * Real.exp (-ε*n/4))) := by
have hs (k : ℕ) := Real.summable_pow_mul_exp_neg_nat_mul k
(show 0 < ε/4 by linarith)
have ht := (((((hs 4).mul_left 32).add ((hs 3).mul_left 64)).add
((hs 2).mul_left 48)).add ((hs 1).mul_left 16)).add ((hs 0).mul_left 2)
apply ht.congr
intro n
simp only [pow_one, pow_zero]
have he : -(ε/4)*(n : ℝ) = -ε*n/4 := by ring
rw [he]
ring
theorem ae_eventually_coordinate_connections (h : ExponentialEnvironment P τ)
{ε : ℝ} (hε : 0 < ε) :
∀ᵐ ω ∂P, ∀ᶠ n : ℕ in atTop, ∀ p ∈ latticeBox n, ∀ q ∈ latticeBox n,
pathCost (fun e => τ e ω) p (coordinatePath p q) <
4 * (latticeDistance p q : ℝ) + ε * n := by
let _ := h.probability
have hs : Summable (fun n => P.real (badConnections τ ε n)) :=
(summable_box_connection_bound hε).of_nonneg_of_le
(fun _ => measureReal_nonneg) (badConnections_probability h ε)
have ht : (∑' n, P (badConnections τ ε n)) ≠ ⊤ := by
simpa only [measureReal_def, ENNReal.ofReal_toReal (measure_ne_top _ _)] using
hs.tsum_ofReal_ne_top
filter_upwards [ae_eventually_notMem ht] with ω hω
filter_upwards [hω] with n hn
intro p hp q hq
by_contra hc
apply hn
exact mem_iUnion₂.mpr ⟨(p,q), mem_product.mpr ⟨hp,hq⟩, le_of_not_gt hc⟩
theorem ae_eventually_passageTime_connections (h : ExponentialEnvironment P τ)
{ε : ℝ} (hε : 0 < ε) :
∀ᵐ ω ∂P, ∀ᶠ n : ℕ in atTop, ∀ p ∈ latticeBox n, ∀ q ∈ latticeBox n,
passageTime (fun e => τ e ω) p q <
4 * (latticeDistance p q : ℝ) + ε * n := by
filter_upwards [h.ae_positive, ae_eventually_coordinate_connections h hε] with ω hp hc
filter_upwards [hc] with n hn
intro p hp' q hq'
exact (passageTime_le_cost _ (fun e => (hp e).le) p q
(coordinatePath p q) (coordinatePath_endpoint p q)).trans_lt (hn p hp' q hq')
end PlanarFPP
end OAI

Xet Storage Details

Size:
3.49 kB
·
Xet hash:
d543e6bd2a0d837ef6ab0bdb75a5d0b5f7c4aa092c7200bfb2e003b6ecb46972

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