import Mathlib import OAI.Analysis.HardSphere.Kernels.ExposedPhysicalPair namespace OAI section section noncomputable section open MeasureTheory ProbabilityTheory Set open scoped ENNReal NNReal Topology namespace HardSphere.Bridge open Wiener GaussianPacking Comparison variable {E : Type*} [MeasurableSpace E] lemma leg_all_continuous (t : ℝ) : Continuous (fun p : (Point×Point)×Noise ↦ leg t p.1.1 p.1.2 p.2) := by apply ContinuousMap.continuous_of_continuous_uncurry change Continuous (fun p : ((Point×Point)×Noise)×Time ↦ fun j ↦ mean p.1.1.1 p.1.1.2 p.2 j+Real.sqrt (2*t)*p.1.2 j p.2) unfold mean fun_prop def exposedBridgeKernel (t : ℝ) : Kernel (Point×Point) C(Time,Point) := ((Kernel.deterministic id measurable_id).prod (Kernel.const (Point×Point) law)).map (fun p ↦ leg t p.1.1 p.1.2 p.2) instance exposedBridgeKernel_markov (t : ℝ) : IsMarkovKernel (exposedBridgeKernel t) := by unfold exposedBridgeKernel exact Kernel.IsMarkovKernel.map _ (leg_all_continuous t).measurable lemma exposedBridgeKernel_apply (t : ℝ) (y z : Point) : exposedBridgeKernel t (y,z)=law.map (leg t y z) := by rw [exposedBridgeKernel,Kernel.map_apply _ (leg_all_continuous t).measurable, Kernel.prod_apply,Kernel.deterministic_apply,Kernel.const_apply,Measure.dirac_prod, Measure.map_map (leg_all_continuous t).measurable (measurable_const.prodMk measurable_id : Measurable (Prod.mk (id (y,z))))] rfl def parameterBridgeKernel (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) : Kernel E C(Time,Point) := (exposedBridgeKernel t).comap (fun e ↦ (y e,z e)) (hy.prodMk hz) instance parameterBridgeKernel_markov (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) : IsMarkovKernel (parameterBridgeKernel t y z hy hz) := inferInstanceAs (IsMarkovKernel ((exposedBridgeKernel t).comap _ _)) lemma parameterBridgeKernel_apply (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) (e : E) : parameterBridgeKernel t y z hy hz e=law.map (leg t (y e) (z e)) := exposedBridgeKernel_apply _ _ _ def parameterIndividualReference (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) (S : Set (E×C(Time,Point))) (hS : MeasurableSet S) : Kernel E C(Time,Point) := parameterSuccessKernel (parameterBridgeKernel (2*t) y z hy hz) S hS instance parameterIndividualReference_finite (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) (S : Set (E×C(Time,Point))) (hS : MeasurableSet S) : IsFiniteKernel (parameterIndividualReference t y z hy hz S hS) := inferInstanceAs (IsFiniteKernel (parameterSuccessKernel _ _ _)) lemma parameterIndividualReference_apply (t : ℝ) (y z : E→Point) (hy : Measurable y) (hz : Measurable z) (S : Set (E×C(Time,Point))) (hS : MeasurableSet S) (e : E) : parameterIndividualReference t y z hy hz S hS e=individualReference t (y e) (z e) (Prod.mk e ⁻¹' S) := by rw [parameterIndividualReference,parameterSuccessKernel_apply,parameterBridgeKernel_apply] rfl end HardSphere.Bridge end end section noncomputable section open MeasureTheory ProbabilityTheory Set open scoped ENNReal NNReal Topology namespace HardSphere.Bridge open Wiener GaussianPacking Comparison variable {E : Type*} [MeasurableSpace E] [MeasurableSpace.CountableOrCountablyGenerated E C(Time,Point)] lemma exposed_physical_auxiliary (Q : Kernel E Point) [IsFiniteKernel Q] {t C : ℝ} (ht : 0