import Mathlib import OAI.Analysis.HardSphere.Allocation.PhysicalLifted import OAI.Analysis.HardSphere.Bridges.RouteAuxiliary namespace OAI section noncomputable section open MeasureTheory ProbabilityTheory Set open scoped ENNReal NNReal namespace HardSphere.Groups open Wiener Bridge Sampling Comparison GaussianPacking PathCutoff CellOrbital variable {J : Type*} [Fintype J] [DecidableEq J] omit [Fintype J] [DecidableEq J] in lemma physicalOn_probability {N K M G : ℕ} {L : Length} (hL : L.val=(K:ℝ)) (g : Fin G) (m : ℕ) (t r R C S : ℝ) (u : Time) (particle : J→Fin N) (v : Fin 3→Fin K) (d : PhysicalDatum N K M G L) (hp : ∀j,IsProbabilityMeasure (datumIndividualReference hL g m r R C S t u (particle j) d)) (i : Option J) : IsProbabilityMeasure (physicalSlotOn hL g m t r R C S u particle v d i) := by have : IsProbabilityMeasure (physicalSlotReference hL g m t r R C S u particle v i d) := by cases i with | none => exact inferInstanceAs (IsProbabilityMeasure (cellPathReference v)) | some i => exact hp i exact physicalSlotOn_probability hL g m t r R C S u particle v d i omit [Fintype J] in theorem physical_auxiliary_exists {N K M G n : ℕ} {L : Length} (hL : L.val=(K:ℝ)) (g : Fin G) (m : ℕ) (t r R C S : ℝ) (ht : 0 exact (hi rfl).elim | some i => rfl have hs : none∈s := by exact Finset.mem_map.mpr ⟨Fin.last (n+1),Finset.mem_univ _,routeEmbedding_last labels⟩ have h := ambient_two_primary_laws (X:=X) σ s (routePermutation_fixed labels) r (fun j ↦ projectPoint L (anchorPoint (datumHome hL d (particle j)))) (fun j ↦ physicalSlotAllowed hL g m r R C S u particle d (some j)) some (fun _ f ↦ f) (fun _ ↦ measurable_id) none (fun _ ↦ Option.some_ne_none _) hs μ ν heq κ η hr z w () have hρ : (fun i:s ↦ Kernel.const Unit ((μ i).compProd (κ i)))= (fun i:s ↦ Kernel.const Unit (physicalSelectedOn hL g m t r R C S u particle labels v steps d i)) := by funext i rw [he i] dsimp only at h simp only [hρ] at h exact h end HardSphere.Groups end end end OAI