LeanMachineLearning

Learning.IsAlgEnvSeq.hasLaw_history_withDensityπŸ”—

Lemma

No docstring.

πŸ”—theorem
Learning.IsAlgEnvSeq.hasLaw_history_withDensity.{u_1, u_2, u_3, u_4} {𝓐 : Type u_1} {𝓨 : Type u_2} [MeasurableSpace 𝓐] [MeasurableSpace 𝓨] {Ξ© : Type u_3} [MeasurableSpace Ξ©] {alg : Algorithm 𝓐 𝓨} {env : Environment 𝓐 𝓨} {A : β„• β†’ Ξ© β†’ 𝓐} {Y : β„• β†’ Ξ© β†’ 𝓨} {P : MeasureTheory.Measure Ξ©} [MeasureTheory.IsFiniteMeasure P] {Ξ©β‚€ : Type u_4} [MeasurableSpace Ξ©β‚€] {algβ‚€ : Algorithm 𝓐 𝓨} {Aβ‚€ : β„• β†’ Ξ©β‚€ β†’ 𝓐} {Yβ‚€ : β„• β†’ Ξ©β‚€ β†’ 𝓨} {Pβ‚€ : MeasureTheory.Measure Ξ©β‚€} [MeasureTheory.IsProbabilityMeasure Pβ‚€] [MeasurableSpace.CountablyGenerated 𝓐] (h : IsAlgEnvSeq A Y alg env P) (hβ‚€ : IsAlgEnvSeq Aβ‚€ Yβ‚€ algβ‚€ env Pβ‚€) (hc : Algorithm.AbsolutelyContinuous alg algβ‚€) (n : β„•) : ProbabilityTheory.HasLaw (history A Y n) (MeasureTheory.Measure.withDensity (MeasureTheory.Measure.map (history Aβ‚€ Yβ‚€ n) Pβ‚€) (Algorithm.density alg algβ‚€ n)) P
Learning.IsAlgEnvSeq.hasLaw_history_withDensity.{u_1, u_2, u_3, u_4} {𝓐 : Type u_1} {𝓨 : Type u_2} [MeasurableSpace 𝓐] [MeasurableSpace 𝓨] {Ξ© : Type u_3} [MeasurableSpace Ξ©] {alg : Algorithm 𝓐 𝓨} {env : Environment 𝓐 𝓨} {A : β„• β†’ Ξ© β†’ 𝓐} {Y : β„• β†’ Ξ© β†’ 𝓨} {P : MeasureTheory.Measure Ξ©} [MeasureTheory.IsFiniteMeasure P] {Ξ©β‚€ : Type u_4} [MeasurableSpace Ξ©β‚€] {algβ‚€ : Algorithm 𝓐 𝓨} {Aβ‚€ : β„• β†’ Ξ©β‚€ β†’ 𝓐} {Yβ‚€ : β„• β†’ Ξ©β‚€ β†’ 𝓨} {Pβ‚€ : MeasureTheory.Measure Ξ©β‚€} [MeasureTheory.IsProbabilityMeasure Pβ‚€] [MeasurableSpace.CountablyGenerated 𝓐] (h : IsAlgEnvSeq A Y alg env P) (hβ‚€ : IsAlgEnvSeq Aβ‚€ Yβ‚€ algβ‚€ env Pβ‚€) (hc : Algorithm.AbsolutelyContinuous alg algβ‚€) (n : β„•) : ProbabilityTheory.HasLaw (history A Y n) (MeasureTheory.Measure.withDensity (MeasureTheory.Measure.map (history Aβ‚€ Yβ‚€ n) Pβ‚€) (Algorithm.density alg algβ‚€ n)) P

Code

lemma hasLaw_history_withDensity (h : IsAlgEnvSeq A Y alg env P)
    (hβ‚€ : IsAlgEnvSeq Aβ‚€ Yβ‚€ algβ‚€ env Pβ‚€) (hc : alg β‰ͺₐ algβ‚€) (n : β„•) : HasLaw (history A Y n)
      ((Pβ‚€.map (history Aβ‚€ Yβ‚€ n)).withDensity (alg.density algβ‚€ n)) P where
  aemeasurable
Proof
(h.measurable_history n).aemeasurable
  map_eq := by
    induction n with
    | zero =>
      rw [h.hasLaw_history_zero.map_eq, hβ‚€.hasLaw_history_zero.map_eq, h.hasLaw_step_zero.map_eq,
        hβ‚€.hasLaw_step_zero.map_eq]
      rw [← Measure.withDensity_rnDeriv_eq _ _ hc.p0,
        Measure.compProd_withDensity_left (by fun_prop)]
      exact map_equiv_withDensity (by fun_prop)
    | succ n ih =>
      let ρ h' (ar : 𝓐 Γ— 𝓨) := Kernel.rnDeriv (alg.policy n) (algβ‚€.policy n) h' ar.1
      have hs : stepKernel alg env n = (stepKernel algβ‚€ env n).withDensity ρ := by
        rw [stepKernel, ← Kernel.withDensity_rnDeriv_eq' (hc.policy n)]
        exact Kernel.compProd_withDensity_left (Kernel.measurable_rnDeriv _ _)
      have : IsMarkovKernel ((stepKernel algβ‚€ env n).withDensity ρ) := by
        rw [← hs]
        infer_instance
      simp_rw [history_succ]
      rw [← Measure.map_map (by fun_prop), ← Measure.map_map (by fun_prop)]
      rotate_left
      Β· exact (hβ‚€.measurable_history n).prodMk (hβ‚€.measurable_step (n + 1))
      Β· exact (h.measurable_history n).prodMk (h.measurable_step (n + 1))
      rw [(h.hasCondDistrib_step n).map_eq, (hβ‚€.hasCondDistrib_step n).map_eq, ih, hs,
        Measure.compProd_withDensity_withDensity (by fun_prop) (by fun_prop)]
      exact map_equiv_withDensity (by fun_prop)

Actions: Source Β· Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 4th recorded change.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file Β· open it in the Lean web editor.

Dependency graph

Audit surface: 7 project declarations, 91 external constants

βœ“ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.