LeanMachineLearning exposition

3.4.ย SequentialLearning.BayesStationaryEnv๐Ÿ”—

Bayesian stationary environments

This file defines the structure IsBayesAlgEnvSeq and provides its basic properties.

Main definitions

  • IsBayesAlgEnvSeq Q ฮบ alg E A Y P: states that there is a measure P : Measure ฮฉ such that the parameter E : ฮฉ โ†’ ๐“” has law Q and that the sequences of actions A : โ„• โ†’ ฮฉ โ†’ ๐“ and feedbacks Y : โ„• โ†’ ฮฉ โ†’ ๐“จ are generated by the algorithm alg : Algorithm ๐“ ๐“จ interacting with an underlying environment that depends on E and ฮบ (stationaryEnv (ฮบ.sectR (E ฯ‰))).

  • bayesTrajMeasure Q ฮบ alg: for any choice of probability measure Q : Measure ๐“”, Markov kernel ฮบ : Kernel (๐“” ร— ๐“) ๐“จ, and algorithm alg : Algorithm ๐“ ๐“จ, provides a probability measure P : Measure (โ„• โ†’ ๐“ ร— ๐“” ร— ๐“จ) on a space that carries E, A, and Y such that IsBayesAlgEnvSeq Q ฮบ alg E A Y P.

  • bayesTrajMeasurePosterior Q ฮบ alg n: a Kernel (Iic n โ†’ ๐“ ร— ๐“จ) ๐“” that represents the posterior over E given the history up to time n under the prior Q and the algorithm alg, assuming that the kernel ฮบ specifies how E gives rise to the underlying (stationary) environment. See also LeanMachineLearning/SequentialLearning/AlgorithmDensityBayes.lean.

Main results

  • ae_IsAlgEnvSeq h: if h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P, for Q-almost every e : ๐“”, IsAlgEnvSeq A' Y' alg (stationaryEnv (ฮบ.sectR e)) (condDistrib (trajectory A Y) E P e) for some sequence of actions A' : โ„• โ†’ (โ„• โ†’ ๐“ ร— ๐“จ) โ†’ ๐“ and sequence of feedbacks Y' : โ„• โ†’ (โ„• โ†’ ๐“ ร— ๐“จ) โ†’ ๐“จ. Intuitively, if the observable trajectory is generated by an underlying parameter e : ๐“”, the measure that carries the IsBayesAlgEnvSeq structure reveals a measure that carries an IsAlgEnvSeq structure under the environment stationaryEnv (ฮบ.sectR e) and the same algorithm. This allows transferring results from the IsAlgEnvSeq structure to the IsBayesAlgEnvSeq structure.

Module LeanMachineLearning.SequentialLearning.BayesStationaryEnv contains 17 exposed declarations.

IsBayesAlgEnvSeq๐Ÿ”—

StructureLearning.IsBayesAlgEnvSeq

IsBayesAlgEnvSeq Q ฮบ alg E A Y P states that there is a measure P : Measure ฮฉ such that the parameter E : ฮฉ โ†’ ๐“” has law Q and that the sequences of actions A : โ„• โ†’ ฮฉ โ†’ ๐“ and feedbacks Y : โ„• โ†’ ฮฉ โ†’ ๐“จ are generated by the algorithm alg : Algorithm ๐“ ๐“จ interacting with an underlying environment that depends on E and ฮบ (stationaryEnv (ฮบ.sectR (E ฯ‰))).

๐Ÿ”—structure
Learning.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 ๐“”) (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) (alg : Algorithm ๐“ ๐“จ) (E : ฮฉ โ†’ ๐“”) (A : โ„• โ†’ ฮฉ โ†’ ๐“) (Y : โ„• โ†’ ฮฉ โ†’ ๐“จ) (P : MeasureTheory.Measure ฮฉ) [MeasureTheory.IsFiniteMeasure P] : Prop
Learning.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 ๐“”) (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) (alg : Algorithm ๐“ ๐“จ) (E : ฮฉ โ†’ ๐“”) (A : โ„• โ†’ ฮฉ โ†’ ๐“) (Y : โ„• โ†’ ฮฉ โ†’ ๐“จ) (P : MeasureTheory.Measure ฮฉ) [MeasureTheory.IsFiniteMeasure P] : Prop

Code

structure IsBayesAlgEnvSeq
    (Q : Measure ๐“”) (ฮบ : Kernel (๐“” ร— ๐“) ๐“จ) (alg : Algorithm ๐“ ๐“จ)
    (E : ฮฉ โ†’ ๐“”) (A : โ„• โ†’ ฮฉ โ†’ ๐“) (Y : โ„• โ†’ ฮฉ โ†’ ๐“จ)
    (P : Measure ฮฉ) [IsFiniteMeasure P] : Prop where
  measurable_param : Measurable E := by fun_prop
  measurable_action n : Measurable (A n) := by fun_prop
  measurable_feedback n : Measurable (Y n) := by fun_prop
  hasLaw_env : HasLaw E Q P
  hasCondDistrib_action_zero : HasCondDistrib (A 0) E (Kernel.const _ alg.p0) P
  hasCondDistrib_feedback_zero : HasCondDistrib (Y 0) (fun ฯ‰ โ†ฆ (E ฯ‰, A 0 ฯ‰)) ฮบ P
  hasCondDistrib_action n :
    HasCondDistrib (A (n + 1)) (fun ฯ‰ โ†ฆ (E ฯ‰, history A Y n ฯ‰))
      ((alg.policy n).prodMkLeft _) P
  hasCondDistrib_feedback n :
    HasCondDistrib (Y (n + 1)) (fun ฯ‰ โ†ฆ (history A Y n ฯ‰, E ฯ‰, A (n + 1) ฯ‰))
      (ฮบ.prodMkLeft _) P
Type uses (2)
Used by (22)

Actions: Source ยท Open Issue

hasLaw_action_zero๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasLaw_action_zero

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasLaw_action_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [MeasureTheory.IsProbabilityMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : ProbabilityTheory.HasLaw (A 0) (Algorithm.p0 alg) P
Learning.IsBayesAlgEnvSeq.hasLaw_action_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [MeasureTheory.IsProbabilityMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : ProbabilityTheory.HasLaw (A 0) (Algorithm.p0 alg) P

Code

lemma hasLaw_action_zero [IsProbabilityMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) :
    HasLaw (A 0) alg.p0 P
Type uses (2)
Body uses (1)

Actions: Source ยท Open Issue

Proof
h.hasCondDistrib_action_zero.hasLaw_of_const

hasCondDistrib_action'๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasCondDistrib_action'

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasCondDistrib_action'.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : ProbabilityTheory.HasCondDistrib (A (n + 1)) (history A Y n) (Algorithm.policy alg n) P
Learning.IsBayesAlgEnvSeq.hasCondDistrib_action'.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : ProbabilityTheory.HasCondDistrib (A (n + 1)) (history A Y n) (Algorithm.policy alg n) P

Code

lemma hasCondDistrib_action' (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) :
    HasCondDistrib (A (n + 1)) (history A Y n) (alg.policy n) P
Type uses (3)
Body uses (1)
Used by (1)

Actions: Source ยท Open Issue

Proof
(h.hasCondDistrib_action n).comp_right

hasCondDistrib_feedback'๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasCondDistrib_feedback'

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasCondDistrib_feedback'.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : ProbabilityTheory.HasCondDistrib (Y (n + 1)) (fun ฯ‰ => (E ฯ‰, A (n + 1) ฯ‰)) ฮบ P
Learning.IsBayesAlgEnvSeq.hasCondDistrib_feedback'.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : ProbabilityTheory.HasCondDistrib (Y (n + 1)) (fun ฯ‰ => (E ฯ‰, A (n + 1) ฯ‰)) ฮบ P

Code

lemma hasCondDistrib_feedback' [IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) :
    HasCondDistrib (Y (n + 1)) (fun ฯ‰ โ†ฆ (E ฯ‰, A (n + 1) ฯ‰)) ฮบ P
Type uses (2)
Body uses (1)

Actions: Source ยท Open Issue

Proof
(h.hasCondDistrib_feedback n).comp_right

hasLaw_IT_action_zero๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasLaw_IT_action_zero

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasLaw_IT_action_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasLaw (IT.action 0) (Algorithm.p0 alg) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.hasLaw_IT_action_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasLaw (IT.action 0) (Algorithm.p0 alg) (๐“›[trajectory A Y | E; P] e)

Code

lemma hasLaw_IT_action_zero (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) :
    โˆ€แต e โˆ‚Q, HasLaw (IT.action 0) alg.p0 (condDistrib (trajectory A Y) E P e)
Type uses (4)
Body uses (4)
Used by (1)

Actions: Source ยท Open Issue

Proof
by
  rw [โ† h.hasLaw_env.map_eq]
  filter_upwards [condDistrib_comp E
      ((measurable_trajectory h.measurable_action h.measurable_feedback).aemeasurable)
      (IT.measurable_action (๐“ := ๐“) (๐“จ := ๐“จ) 0),
    h.hasCondDistrib_action_zero.condDistrib_eq] with _ hc hcd
  exact โŸจ(IT.measurable_action 0).aemeasurable, by
    rw [โ† Kernel.map_apply _ (IT.measurable_action 0), โ† hc,
      show IT.action 0 โˆ˜ trajectory A Y = A 0 from rfl, hcd, Kernel.const_apply]โŸฉ

hasCondDistrib_IT_feedback_zero๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback_zero

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.feedback 0) (IT.action 0) (ProbabilityTheory.Kernel.sectR ฮบ e) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback_zero.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.feedback 0) (IT.action 0) (ProbabilityTheory.Kernel.sectR ฮบ e) (๐“›[trajectory A Y | E; P] e)

Code

lemma hasCondDistrib_IT_feedback_zero [IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) :
    โˆ€แต e โˆ‚Q, HasCondDistrib (IT.feedback 0) (IT.action 0) (ฮบ.sectR e)
      (condDistrib (trajectory A Y) E P e)
Type uses (5)
Body uses (4)
Used by (1)

Actions: Source ยท Open Issue

Proof
by
  rw [โ† h.hasLaw_env.map_eq]
  exact h.hasCondDistrib_feedback_zero.hasCondDistrib_sectR
    (IT.measurable_action 0) (IT.measurable_feedback 0)
    (measurable_trajectory h.measurable_action h.measurable_feedback).aemeasurable

hasCondDistrib_IT_action๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasCondDistrib_IT_action

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_action.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.action (n + 1)) (IT.hist n) (Algorithm.policy alg n) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_action.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.action (n + 1)) (IT.hist n) (Algorithm.policy alg n) (๐“›[trajectory A Y | E; P] e)

Code

lemma hasCondDistrib_IT_action (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) :
    โˆ€แต e โˆ‚Q, HasCondDistrib (IT.action (n + 1)) (IT.hist n) (alg.policy n)
      (condDistrib (trajectory A Y) E P e)
Type uses (5)
Body uses (6)
Used by (1)

Actions: Source ยท Open Issue

Proof
by
  rw [โ† h.hasLaw_env.map_eq]
  filter_upwards [(h.hasCondDistrib_action n).hasCondDistrib_sectR
    (IT.measurable_hist n) (IT.measurable_action (n + 1))
    (measurable_trajectory h.measurable_action h.measurable_feedback).aemeasurable] with _ he
  rwa [Kernel.sectR_prodMkLeft] at he

hasCondDistrib_IT_feedback๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.feedback (n + 1)) (fun ฯ„ => (IT.hist n ฯ„, IT.action (n + 1) ฯ„)) (ProbabilityTheory.Kernel.prodMkLeft (โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ) (ProbabilityTheory.Kernel.sectR ฮบ e)) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasCondDistrib (IT.feedback (n + 1)) (fun ฯ„ => (IT.hist n ฯ„, IT.action (n + 1) ฯ„)) (ProbabilityTheory.Kernel.prodMkLeft (โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ) (ProbabilityTheory.Kernel.sectR ฮบ e)) (๐“›[trajectory A Y | E; P] e)

Code

lemma hasCondDistrib_IT_feedback [IsFiniteKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P)
    (n : โ„•) :
    โˆ€แต e โˆ‚Q, HasCondDistrib (IT.feedback (n + 1)) (fun ฯ„ โ†ฆ (IT.hist n ฯ„, IT.action (n + 1) ฯ„))
      ((ฮบ.sectR e).prodMkLeft _) (condDistrib (trajectory A Y) E P e)
Type uses (6)
Body uses (6)
Used by (1)

Actions: Source ยท Open Issue

Proof
by
  rw [โ† h.hasLaw_env.map_eq]
  have hc : HasCondDistrib (Y (n + 1))
      (fun ฯ‰ โ†ฆ (E ฯ‰, history A Y n ฯ‰, A (n + 1) ฯ‰))
      (ฮบ.comap (fun (e, _, a) โ†ฆ (e, a)) (by fun_prop)) P :=
    (h.hasCondDistrib_feedback n).measurableEquiv_comp_right (MeasurableEquiv.prodAssoc.symm.trans
      ((MeasurableEquiv.prodCongr .prodComm (.refl _)).trans .prodAssoc))
  exact hc.hasCondDistrib_sectR ((IT.measurable_hist n).prodMk
    (IT.measurable_action (n + 1))) (IT.measurable_feedback (n + 1))
    (measurable_trajectory h.measurable_action h.measurable_feedback).aemeasurable

hasLaw_IT_hist๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.hasLaw_IT_hist

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.hasLaw_IT_hist.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasLaw (IT.hist n) (๐“›[history A Y n | E; P] e) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.hasLaw_IT_hist.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) : โˆ€แต (e : ๐“”) โˆ‚Q, ProbabilityTheory.HasLaw (IT.hist n) (๐“›[history A Y n | E; P] e) (๐“›[trajectory A Y | E; P] e)

Code

lemma hasLaw_IT_hist (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) (n : โ„•) :
    โˆ€แต e โˆ‚Q, HasLaw (IT.hist n) (condDistrib (history A Y n) E P e)
      (condDistrib (trajectory A Y) E P e)
Type uses (5)
Body uses (2)
Used by (1)

Actions: Source ยท Open Issue

Proof
by
  rw [โ† h.hasLaw_env.map_eq, show history A Y n = IT.hist n โˆ˜ trajectory A Y from rfl]
  filter_upwards [condDistrib_comp E
    (measurable_trajectory h.measurable_action h.measurable_feedback).aemeasurable
    (IT.measurable_hist n)] with _ he
  exact โŸจ(IT.measurable_hist n).aemeasurable, by
    rw [โ† Kernel.map_apply _ (IT.measurable_hist n), he]โŸฉ

ae_IsAlgEnvSeq๐Ÿ”—

LemmaLearning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeq

No docstring.

๐Ÿ”—theorem
Learning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeq.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsMarkovKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, IsAlgEnvSeq IT.action IT.feedback alg (stationaryEnv (ProbabilityTheory.Kernel.sectR ฮบ e)) (๐“›[trajectory A Y | E; P] e)
Learning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeq.{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 ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ} {alg : Algorithm ๐“ ๐“จ} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsFiniteMeasure P] [StandardBorelSpace ๐“] [Nonempty ๐“] [StandardBorelSpace ๐“จ] [Nonempty ๐“จ] [ProbabilityTheory.IsMarkovKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) : โˆ€แต (e : ๐“”) โˆ‚Q, IsAlgEnvSeq IT.action IT.feedback alg (stationaryEnv (ProbabilityTheory.Kernel.sectR ฮบ e)) (๐“›[trajectory A Y | E; P] e)

Code

lemma ae_IsAlgEnvSeq [IsMarkovKernel ฮบ] (h : IsBayesAlgEnvSeq Q ฮบ alg E A Y P) :
    โˆ€แต e โˆ‚Q, IsAlgEnvSeq IT.action IT.feedback alg (stationaryEnv (ฮบ.sectR e))
      (condDistrib (trajectory A Y) E P e)
Type uses (7)
Body uses (9)
Used by (3)

Actions: Source ยท Open Issue

Proof
by
  filter_upwards [hasLaw_IT_action_zero h, hasCondDistrib_IT_feedback_zero h,
    ae_all_iff.2 (hasCondDistrib_IT_action h), ae_all_iff.2 (hasCondDistrib_IT_feedback h)]
    with _ ha0 hr0 hA hR
  exact โŸจIT.measurable_action, IT.measurable_feedback, ha0, hr0, hA, hRโŸฉ

bayesStationaryEnv๐Ÿ”—

DefinitionLearning.bayesStationaryEnv

An environment with observations in ๐“” ร— ๐“จ. The first element e of an observation is sampled from Q once and remains constant. The second element of an observation is sampled from ฮบ (e, a), where a is the corresponding action.

๐Ÿ”—def
Learning.bayesStationaryEnv.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] : Environment ๐“ (๐“” ร— ๐“จ)
Learning.bayesStationaryEnv.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] : Environment ๐“ (๐“” ร— ๐“จ)

Code

noncomputable
def bayesStationaryEnv (Q : Measure ๐“”) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐“” ร— ๐“) ๐“จ)
    [IsMarkovKernel ฮบ] : Environment ๐“ (๐“” ร— ๐“จ) where
  feedback n :=
    let g : (Iic n โ†’ ๐“ ร— ๐“” ร— ๐“จ) ร— ๐“ โ†’ ๐“” ร— ๐“ := fun (h, a) => ((h โŸจ0, by simpโŸฉ).2.1, a)
    (Kernel.deterministic (Prod.fst โˆ˜ g) (by fun_prop)) ร—โ‚– (ฮบ.comap g (by fun_prop))
  ฮฝ0 := (Kernel.const _ Q) โŠ—โ‚– ฮบ.swapLeft
Type uses (1)
Used by (4)

Actions: Source ยท Open Issue

isBayesAlgEnvSeq๐Ÿ”—

LemmaLearning.IsAlgEnvSeq.isBayesAlgEnvSeq

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
Type uses (5)
Body uses (6)
Used by (1)

Actions: Source ยท Open Issue

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

bayesTrajMeasure๐Ÿ”—

DefinitionLearning.IT.bayesTrajMeasure

A measure P on a measurable space that carries random variables E, A, and Y such that IsBayesAlgEnvSeq Q ฮบ alg E A Y P.

๐Ÿ”—def
Learning.IT.bayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : MeasureTheory.Measure (โ„• โ†’ ๐“ ร— ๐“” ร— ๐“จ)
Learning.IT.bayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : MeasureTheory.Measure (โ„• โ†’ ๐“ ร— ๐“” ร— ๐“จ)

Code

noncomputable
def bayesTrajMeasure (Q : Measure ๐“”) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐“” ร— ๐“) ๐“จ)
    [IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : Measure (โ„• โ†’ ๐“ ร— ๐“” ร— ๐“จ) :=
  trajMeasure (alg.prodLeft ๐“”) (bayesStationaryEnv Q ฮบ)
deriving IsProbabilityMeasure
Type uses (1)
Body uses (3)
Used by (5)

Actions: Source ยท Open Issue

instIsProbabilityMeasureForallNatProdBayesTrajMeasure๐Ÿ”—

InstanceLearning.IT.instIsProbabilityMeasureForallNatProdBayesTrajMeasure

No docstring.

๐Ÿ”—theorem
Learning.IT.instIsProbabilityMeasureForallNatProdBayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : MeasureTheory.IsProbabilityMeasure (bayesTrajMeasure Q ฮบ alg)
Learning.IT.instIsProbabilityMeasureForallNatProdBayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : MeasureTheory.IsProbabilityMeasure (bayesTrajMeasure Q ฮบ alg)

Code

deriving IsProbabilityMeasure
Type uses (2)
Body uses (3)
Used by (4)

Actions: Source ยท Open Issue

Proof
deriving IsProbabilityMeasure

isBayesAlgEnvSeq_bayesTrajMeasure๐Ÿ”—

LemmaLearning.IT.isBayesAlgEnvSeq_bayesTrajMeasure

No docstring.

๐Ÿ”—theorem
Learning.IT.isBayesAlgEnvSeq_bayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ => Prod.fst (Prod.snd (ฯ‰ 0))) action (fun n ฯ‰ => Prod.snd (Prod.snd (ฯ‰ n))) (bayesTrajMeasure Q ฮบ alg)
Learning.IT.isBayesAlgEnvSeq_bayesTrajMeasure.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) : IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ => Prod.fst (Prod.snd (ฯ‰ 0))) action (fun n ฯ‰ => Prod.snd (Prod.snd (ฯ‰ n))) (bayesTrajMeasure Q ฮบ alg)

Code

lemma isBayesAlgEnvSeq_bayesTrajMeasure
    (Q : Measure ๐“”) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐“” ร— ๐“) ๐“จ) [IsMarkovKernel ฮบ]
    (alg : Algorithm ๐“ ๐“จ) :
    IsBayesAlgEnvSeq Q ฮบ alg (fun ฯ‰ โ†ฆ (ฯ‰ 0).2.1) action (fun n ฯ‰ โ†ฆ (ฯ‰ n).2.2)
       (bayesTrajMeasure Q ฮบ alg)
Type uses (5)
Body uses (7)
Used by (1)

Actions: Source ยท Open Issue

Proof
(isAlgEnvSeq_trajMeasure _ _).isBayesAlgEnvSeq

bayesTrajMeasurePosterior๐Ÿ”—

DefinitionLearning.IT.bayesTrajMeasurePosterior

A kernel that represents the posterior over E given the history up to time n.

๐Ÿ”—def
Learning.IT.bayesTrajMeasurePosterior.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [StandardBorelSpace ๐“”] [Nonempty ๐“”] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) (n : โ„•) : ProbabilityTheory.Kernel (โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ) ๐“”
Learning.IT.bayesTrajMeasurePosterior.{u_1, u_2, u_3} {๐“” : Type u_1} {๐“ : Type u_2} {๐“จ : Type u_3} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [StandardBorelSpace ๐“”] [Nonempty ๐“”] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) (n : โ„•) : ProbabilityTheory.Kernel (โ†ฅ(Finset.Iic n) โ†’ ๐“ ร— ๐“จ) ๐“”

Code

noncomputable
def bayesTrajMeasurePosterior [StandardBorelSpace ๐“”] [Nonempty ๐“”]
    (Q : Measure ๐“”) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐“” ร— ๐“) ๐“จ) [IsMarkovKernel ฮบ]
    (alg : Algorithm ๐“ ๐“จ) (n : โ„•) : Kernel (Iic n โ†’ ๐“ ร— ๐“จ) ๐“” :=
  condDistrib (fun ฯ‰ โ†ฆ (ฯ‰ 0).2.1) (history action (fun n ฯ‰ โ†ฆ (ฯ‰ n).2.2) n)
    (bayesTrajMeasure Q ฮบ alg)
deriving IsMarkovKernel
Type uses (1)
Body uses (4)
Used by (4)

Actions: Source ยท Open Issue

instIsMarkovKernelForallSubtypeNatMemFinsetIicProdBayesTrajMeasurePosterior๐Ÿ”—

InstanceLearning.IT.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdBayesTrajMeasurePosterior

No docstring.

๐Ÿ”—theorem
Learning.IT.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdBayesTrajMeasurePosterior.{u_1, u_2, u_3} {๐“” : Type u_3} {๐“ : Type u_1} {๐“จ : Type u_2} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [StandardBorelSpace ๐“”] [Nonempty ๐“”] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) (n : โ„•) : ProbabilityTheory.IsMarkovKernel (bayesTrajMeasurePosterior Q ฮบ alg n)
Learning.IT.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdBayesTrajMeasurePosterior.{u_1, u_2, u_3} {๐“” : Type u_3} {๐“ : Type u_1} {๐“จ : Type u_2} [MeasurableSpace ๐“”] [MeasurableSpace ๐“] [MeasurableSpace ๐“จ] [StandardBorelSpace ๐“”] [Nonempty ๐“”] (Q : MeasureTheory.Measure ๐“”) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐“” ร— ๐“) ๐“จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐“ ๐“จ) (n : โ„•) : ProbabilityTheory.IsMarkovKernel (bayesTrajMeasurePosterior Q ฮบ alg n)

Code

deriving IsMarkovKernel
Type uses (2)
Body uses (4)
Used by (1)

Actions: Source ยท Open Issue

Proof
deriving IsMarkovKernel
  1. Learning.IsBayesAlgEnvSeq
  2. Learning.IsBayesAlgEnvSeq.hasLaw_action_zero
  3. Learning.IsBayesAlgEnvSeq.hasCondDistrib_action'
  4. Learning.IsBayesAlgEnvSeq.hasCondDistrib_feedback'
  5. Learning.IsBayesAlgEnvSeq.hasLaw_IT_action_zero
  6. Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback_zero
  7. Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_action
  8. Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_feedback
  9. Learning.IsBayesAlgEnvSeq.hasLaw_IT_hist
  10. Learning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeq
  11. Learning.bayesStationaryEnv
  12. Learning.IsAlgEnvSeq.isBayesAlgEnvSeq
  13. Learning.IT.bayesTrajMeasure
  14. Learning.IT.instIsProbabilityMeasureForallNatProdBayesTrajMeasure
  15. Learning.IT.isBayesAlgEnvSeq_bayesTrajMeasure
  16. Learning.IT.bayesTrajMeasurePosterior
  17. Learning.IT.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdBayesTrajMeasurePosterior