import Mathlib import OAI.Analysis.HardSphere.Kernels.ParameterSuccess import OAI.Analysis.HardSphere.Kernels.TrialObserved import OAI.Analysis.HardSphere.Bridges.BridgeReference import OAI.Analysis.HardSphere.Kernels.KernelDensity namespace OAI section section noncomputable section open MeasureTheory ProbabilityTheory Set open scoped ENNReal NNReal Topology namespace HardSphere.Bridge open Wiener GaussianPacking Comparison def targetUniform (A : Set Point) : Measure Point := (volume A)⁻¹ • volume.restrict A lemma targetUniform_probability {A : Set Point} (hA0 : volume A≠0) (hAfinite : volume A≠⊤) : IsProbabilityMeasure (targetUniform A) := by constructor simp only [targetUniform,Measure.smul_apply,Measure.restrict_apply_univ,smul_eq_mul] exact ENNReal.inv_mul_cancel hA0 hAfinite def midpointLower (t C : ℝ) : ℝ≥0∞ := ENNReal.ofReal (densityLower ((2*t)⁻¹) C) lemma midpointLower_pos {t : ℝ} (ht : 0