LeanMachineLearning

Learning.IsAlgEnvSeq.isBayesAlgEnvSeq๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Learning.IsAlgEnvSeq.isBayesAlgEnvSeq.{u_1, u_2, u_3, u_4} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} {ฮฉ : Type u_4} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [MeasurableSpace ฮฉ] {Q : MeasureTheory.Measure ๐“”} [MeasureTheory.IsProbabilityMeasure Q] {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} [ProbabilityTheory.IsMarkovKernel ฮบ] {alg : Algorithm ๐“ ๐“จ} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“” ร— ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (h : IsAlgEnvSeq A Y (Algorithm.prodLeft ๐“” alg) (bayesStationaryEnv Q ฮบ) P) : IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ => Prod.fst (Y 0 ฯ‰)) A (fun n ฯ‰ => Prod.snd (Y n ฯ‰)) P
Learning.IsAlgEnvSeq.isBayesAlgEnvSeq.{u_1, u_2, u_3, u_4} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} {ฮฉ : Type u_4} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [MeasurableSpace ฮฉ] {Q : MeasureTheory.Measure ๐“”} [MeasureTheory.IsProbabilityMeasure Q] {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} [ProbabilityTheory.IsMarkovKernel ฮบ] {alg : Algorithm ๐“ ๐“จ} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“” ร— ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (h : IsAlgEnvSeq A Y (Algorithm.prodLeft ๐“” alg) (bayesStationaryEnv Q ฮบ) P) : IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ => Prod.fst (Y 0 ฯ‰)) A (fun n ฯ‰ => Prod.snd (Y n ฯ‰)) P

Code

lemma IsAlgEnvSeq.isBayesAlgEnvSeq
    (h : IsAlgEnvSeq A Y (alg.prodLeft ๐“”) (bayesStationaryEnv Q ฮบ) P) :
    IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ โ†ฆ (Y 0 ฯ‰).1) A (fun n ฯ‰ โ†ฆ (Y n ฯ‰).2) P where
  measurable_param
Proof
(h.measurable_feedback 0).fst
  measurable_action := h.measurable_action
  measurable_feedback n := (h.measurable_feedback n).snd
  hasLaw_env := by
    apply HasCondDistrib.hasLaw_of_const
    simpa [bayesStationaryEnv] using h.hasCondDistrib_feedback_zero.fst
  hasCondDistrib_action_zero := by
    have hc : HasCondDistrib (fun ฯ‰ โ†ฆ (Y 0 ฯ‰).1) (A 0) (Kernel.const _ Q) P := by
      simpa [bayesStationaryEnv] using h.hasCondDistrib_feedback_zero.fst
    simpa [h.hasLaw_action_zero.map_eq, Algorithm.prodLeft] using hc.const_map_of_const
  hasCondDistrib_feedback_zero :=
    h.hasCondDistrib_feedback_zero.of_compProd.measurableEquiv_comp_right MeasurableEquiv.prodComm
  hasCondDistrib_action n := by
    let f : (Iic n โ†’ ๐“ ร— ๐“” ร— ๐“จ) โ†’ ๐“” ร— (Iic n โ†’ ๐“ ร— ๐“จ) :=
      fun h โ†ฆ ((h โŸจ0, by simpโŸฉ).2.1, fun i โ†ฆ ((h i).1, (h i).2.2))
    have hc : HasCondDistrib (A (n + 1)) (history A Y n)
        (((alg.policy n).comap Prod.snd (by fun_prop)).comap f (by fun_prop)) P :=
      h.hasCondDistrib_action n
    exact hc.comp_right (f := f)
  hasCondDistrib_feedback n := by
    let f : (Iic n โ†’ ๐“ ร— ๐“” ร— ๐“จ) ร— ๐“ โ†’ (Iic n โ†’ ๐“ ร— ๐“จ) ร— ๐“” ร— ๐“ :=
      fun p โ†ฆ ((fun i โ†ฆ ((p.1 i).1, (p.1 i).2.2)), (p.1 โŸจ0, by simpโŸฉ).2.1, p.2)
    have hc : HasCondDistrib (fun ฯ‰ โ†ฆ (Y (n + 1) ฯ‰).2)
        (fun ฯ‰ โ†ฆ (history A Y n ฯ‰, A (n + 1) ฯ‰))
        ((Kernel.prodMkLeft ((Iic n) โ†’ ๐“ ร— ๐“จ) ฮบ).comap f (by fun_prop)) P := by
      simpa [bayesStationaryEnv, Kernel.prodMkLeft, โ† Kernel.comap_comp_right, Function.comp_def]
        using (h.hasCondDistrib_feedback n).snd
    exact hc.comp_right

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, 53 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.