roseking's picture
Add lean source and binary files (part 18)
67aee1d verified
Raw History Blame Contribute Delete
3.72 kB
17
lemma uncurveBridge_preserving (N : ℕ) :
    MeasurePreserving (MeasurableEquiv.curry (Fin N) (Fin 3) C(Time,ℝ)).symm
      (Measure.pi fun _ : Fin N ↦ Bridge.law) (coordinateBridge N) := by
proof · 2 lines
  refine ⟨(MeasurableEquiv.curry _ _ _).symm.measurable,?_⟩
  simpa only [Measure.infinitePi_eq_pi,Bridge.law,coordinateBridge] using Measure.infinitePi_map_curry_symm (fun _ : Fin N ↦ fun _ : Fin 3 ↦ bridgeLaw)
23
instance bridgeEndpointBase_finite (N : ℕ) (L : Length) : IsFiniteMeasure (bridgeEndpointBase N L) := by
body · 2 lines
  unfold bridgeEndpointBase
  infer_instance
27
def labelBridgePath (N : ℕ) (L : Length) (t : ℝ) (p : BridgeEndpoints N L×(Fin N→Bridge.Noise)) : ConfigurationPath N L :=
body · 1 line
  endpointBridgePath N L t (p.1,fun j ↦ p.2 j.1 j.2)
29
lemma labelBridgePath_preserving (N : ℕ) (L : Length) (t : ℝ) :
    MeasurePreserving (labelBridgePath N L t) ((bridgeEndpointBase N L).prod (Measure.pi fun _ : Fin N ↦ Bridge.law)) (freePathLaw N L t) :=
proof · 1 line
  (endpointBridgePath_preserving N L t).comp ((MeasurePreserving.id (bridgeEndpointBase N L)).prod (uncurveBridge_preserving N))
32
lemma labelBridgePath_measurable (N : ℕ) (L : Length) (t : ℝ) : Measurable (labelBridgePath N L t) :=
proof · 1 line
  (labelBridgePath_preserving N L t).measurable
35
instance endpointWeightedBase_sfinite {N : ℕ} {L : Length} (u : Jet N L) (t : ℝ) : SFinite (endpointWeightedBase u t) := by
body · 2 lines
  unfold endpointWeightedBase bridgeEndpointBase
  infer_instance
39
def labelInteraction (N : ℕ) (L : Length) (a t : ℝ) : Set (BridgeEndpoints N L×(Fin N→Bridge.Noise)) :=
body · 1 line
  labelBridgePath N L t ⁻¹' staysAllowed N L a
41
lemma labelInteraction_measurable (N : ℕ) (L : Length) (a t : ℝ) : MeasurableSet (labelInteraction N L a t) :=
proof · 1 line
  (staysAllowed_open N L a).measurableSet.preimage (labelBridgePath_measurable N L t)
44
lemma genuine_ground_label_bridge {N : ℕ} {L : Length} (u : Jet N L) (a t : ℝ) :
    (((endpointWeightedBase u t).prod (Measure.pi fun _ : Fin N ↦ Bridge.law)).restrict (labelInteraction N L a t)).map (labelBridgePath N L t)=
      groundPathLaw N L a t u := by
proof · 5 lines
  have h := ((MeasurePreserving.id (endpointWeightedBase u t)).prod (uncurveBridge_preserving N)).restrict_preimage
    (endpointInteraction_measurable N L a t)
  have he := congrArg (fun μ : Measure (BridgeEndpoints N L×CoordinatePaths N) ↦ μ.map (endpointBridgePath N L t)) h.map_eq
  rw [Measure.map_map (endpointBridgePath_continuous N L t).measurable h.measurable] at he
  exact he.trans (genuine_ground_bridge u a t)
53
lemma genuine_ground_exposed {N : ℕ} {L : Length} (u : Jet N L) (a t : ℝ)
    (p : Fin N→Prop) [DecidablePred p] :
    ((exposedLaw (endpointWeightedBase u t) (fun _ : Fin N ↦ Bridge.law) p (labelInteraction N L a t)).compProd
      (fiberNormalize (Kernel.const _ (Measure.pi fun _ : {i // p i} ↦ Bridge.law)) (blockEvent p (labelInteraction N L a t)))).map
      (labelBridgePath N L t ∘ blockGlue p)=groundPathLaw N L a t u := by
proof · 5 lines
  let : SFinite (exposedLaw (endpointWeightedBase u t) (fun _ : Fin N ↦ Bridge.law) p (labelInteraction N L a t)) := by
    unfold exposedLaw
    infer_instance
  rw [←Measure.map_map (labelBridgePath_measurable N L t) (blockGlue_measurable p),exposed_block_reconstruct _ _ _ (labelInteraction_measurable N L a t)]
  exact genuine_ground_label_bridge u a t