import Mathlib import OAI.Analysis.HardSphere.Cutoffs.PathDiameter import OAI.Analysis.HardSphere.Bridges.SegmentSimplify namespace OAI noncomputable section open MeasureTheory Set Filter ProbabilityTheory open scoped ENNReal NNReal Topology BigOperators namespace HardSphere.Bridge open Wiener GaussianPacking def combinedSegmentHit (t : ℝ) (y : Point) (B : Set Point) (s w : Time) (c : C(Time,Point)) (r C : ℝ) : Set (Point×Noise) := if (s:ℝ)≤1/2 then jointSegmentHit t y s w c r C else Prod.swap ⁻¹' uniformSegmentHit t y s w c r B lemma combined_segment_sum_bound {m : ℕ} (y : Fin m→Point) (s w : Time) (c : C(Time,Point)) {t r C A ε : ℝ} (ht : 0 ring_nf def meshHitUnion {n : ℕ} (I : Finset (Fin n)) (t : ℝ) (y : Point) (B : Set Point) (c : Fin n→C(Time,Point)) (r C : ℝ) : Set (Point×Noise) := ⋃j∈I,combinedSegmentHit t y B (meshTime j 0) (meshRemainder j) (c j) r C lemma mesh_hit_sum {m n : ℕ} (y : Fin m→Point) (I : Finset (Fin n)) (c : Fin n→C(Time,Point)) (A : Fin n→ℝ) {t r C ε : ℝ} (ht : 0