Learning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeq
This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.
ae_IsAlgEnvSeqπ
Learning.IsBayesAlgEnvSeq.ae_IsAlgEnvSeqNo docstring.
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β©Dependency graph
Type dependencies (7)
Algorithmπ
Learning.AlgorithmA stochastic, sequential algorithm.
Learning.Algorithm.{u_4, u_5} (π : Type u_4) (π¨ : Type u_5) [MeasurableSpace π] [MeasurableSpace π¨] : Type (max u_4 u_5)Learning.Algorithm.{u_4, u_5} (π : Type u_4) (π¨ : Type u_5) [MeasurableSpace π] [MeasurableSpace π¨] : Type (max u_4 u_5)
Code
structure Algorithm (π π¨ : Type*) [MeasurableSpace π] [MeasurableSpace π¨] where /-- Policy or sampling rule: distribution of the next action. -/ policy : (n : β) β Kernel (Iic n β π Γ π¨) π /-- The policy is a Markov kernel. -/ [h_policy : β n, IsMarkovKernel (policy n)] /-- Distribution of the first action. -/ p0 : Measure π /-- The first action distribution is a probability measure. -/ [hp0 : IsProbabilityMeasure p0]
Used by (216)
Actions: Source Β· Open Issue
IsBayesAlgEnvSeqπ
Learning.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 Ο))).
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] : PropLearning.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 _) PActions: Source Β· Open Issue
IsAlgEnvSeqπ
Learning.IsAlgEnvSeqAn algorithm-environment sequence: a sequence of actions and feedbacks generated by an algorithm interacting with an environment.
Learning.IsAlgEnvSeq.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} {mΞ© : MeasurableSpace Ξ©} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (alg : Algorithm π π¨) (env : Environment π π¨) (P : MeasureTheory.Measure Ξ©) [MeasureTheory.IsFiniteMeasure P] : PropLearning.IsAlgEnvSeq.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} {mΞ© : MeasurableSpace Ξ©} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (alg : Algorithm π π¨) (env : Environment π π¨) (P : MeasureTheory.Measure Ξ©) [MeasureTheory.IsFiniteMeasure P] : Prop
Code
structure IsAlgEnvSeq
(A : β β Ξ© β π) (Y : β β Ξ© β π¨) (alg : Algorithm π π¨) (env : Environment π π¨)
(P : Measure Ξ©) [IsFiniteMeasure P] : Prop where
/-- The action sequence is measurable. -/
measurable_action n : Measurable (A n) := by fun_prop
/-- The feedback sequence is measurable. -/
measurable_feedback n : Measurable (Y n) := by fun_prop
/-- The first action has the correct law. -/
hasLaw_action_zero : HasLaw (fun Ο β¦ (A 0 Ο)) alg.p0 P
/-- The first feedback has the correct conditional distribution. -/
hasCondDistrib_feedback_zero : HasCondDistrib (Y 0) (A 0) env.Ξ½0 P
/-- The next action has the correct conditional distribution given the history. -/
hasCondDistrib_action n :
HasCondDistrib (A (n + 1)) (history A Y n) (alg.policy n) P
/-- The next feedback has the correct conditional distribution given the history and
next action. -/
hasCondDistrib_feedback n :
HasCondDistrib (Y (n + 1)) (fun Ο β¦ (history A Y n Ο, A (n + 1) Ο))
(env.feedback n) PType uses (3)
Used by (111)
Actions: Source Β· Open Issue
actionπ
Learning.IT.action
action n is the action pulled at time n. This is a random variable on the measurable space
β β π Γ π¨.
Learning.IT.action.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} (n : β) (h : β β π Γ π¨) : πLearning.IT.action.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} (n : β) (h : β β π Γ π¨) : π
Code
def action (n : β) (h : β β π Γ π¨) : π := (h n).1
Actions: Source Β· Open Issue
feedbackπ
Learning.IT.feedback
feedback n is the feedback at time n. This is a random variable on the measurable space
β β π Γ π¨.
Learning.IT.feedback.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} (n : β) (h : β β π Γ π¨) : π¨Learning.IT.feedback.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} (n : β) (h : β β π Γ π¨) : π¨
Code
def feedback (n : β) (h : β β π Γ π¨) : π¨ := (h n).2
Used by (16)
Actions: Source Β· Open Issue
stationaryEnvπ
Learning.stationaryEnvA stationary environment, in which the distribution of the next feedback depends only on the last action.
Learning.stationaryEnv.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} (Ξ½ : ProbabilityTheory.Kernel π π¨) [ProbabilityTheory.IsMarkovKernel Ξ½] : Environment π π¨Learning.stationaryEnv.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} (Ξ½ : ProbabilityTheory.Kernel π π¨) [ProbabilityTheory.IsMarkovKernel Ξ½] : Environment π π¨
Code
def stationaryEnv (Ξ½ : Kernel π π¨) [IsMarkovKernel Ξ½] : Environment π π¨ := obliviousEnv fun _ β¦ Ξ½
Type uses (1)
Body uses (1)
Used by (81)
Actions: Source Β· Open Issue
trajectoryπ
Learning.trajectoryA random variable that gives the sequence of action-feedback pairs.
Learning.trajectory.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (Ο : Ξ©) : β β π Γ π¨Learning.trajectory.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (Ο : Ξ©) : β β π Γ π¨
Code
def trajectory (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (Ο : Ξ©) : β β π Γ π¨ := fun n β¦ (A n Ο, Y n Ο)
Used by (18)
Actions: Source Β· Open Issue
All dependencies, transitively (3)
historyπ
Learning.history
History of the algorithm-environment sequence up to time n.
Learning.history.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (n : β) (Ο : Ξ©) : β₯(Finset.Iic n) β π Γ π¨Learning.history.{u_1, u_2, u_3} {π : Type u_1} {π¨ : Type u_2} {Ξ© : Type u_3} (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (n : β) (Ο : Ξ©) : β₯(Finset.Iic n) β π Γ π¨
Code
def history (A : β β Ξ© β π) (Y : β β Ξ© β π¨) (n : β) (Ο : Ξ©) : Iic n β π Γ π¨ := fun i β¦ (A i Ο, Y i Ο)
Actions: Source Β· Open Issue
Environmentπ
Learning.EnvironmentA stochastic environment.
Learning.Environment.{u_4, u_5} (π : Type u_4) (π¨ : Type u_5) [MeasurableSpace π] [MeasurableSpace π¨] : Type (max u_4 u_5)Learning.Environment.{u_4, u_5} (π : Type u_4) (π¨ : Type u_5) [MeasurableSpace π] [MeasurableSpace π¨] : Type (max u_4 u_5)
Code
structure Environment (π π¨ : Type*) [MeasurableSpace π] [MeasurableSpace π¨] where /-- Distribution of the next observation as function of the past history. -/ feedback : (n : β) β Kernel ((Iic n β π Γ π¨) Γ π) π¨ /-- The feedback kernels are Markov kernels. -/ [h_feedback : β n, IsMarkovKernel (feedback n)] /-- Distribution of the first observation given the first action. -/ Ξ½0 : Kernel π π¨ /-- The initial observation kernel is a Markov kernel. -/ [hp0 : IsMarkovKernel Ξ½0]
Actions: Source Β· Open Issue
obliviousEnvπ
Learning.obliviousEnvAn oblivious environment, in which the distribution of the next feedback depends only on the last action, but in a possibly time-dependent manner.
Learning.obliviousEnv.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} (Ξ½ : β β ProbabilityTheory.Kernel π π¨) [β (n : β), ProbabilityTheory.IsMarkovKernel (Ξ½ n)] : Environment π π¨Learning.obliviousEnv.{u_1, u_2} {π : Type u_1} {π¨ : Type u_2} {mπ : MeasurableSpace π} {mπ¨ : MeasurableSpace π¨} (Ξ½ : β β ProbabilityTheory.Kernel π π¨) [β (n : β), ProbabilityTheory.IsMarkovKernel (Ξ½ n)] : Environment π π¨
Code
def obliviousEnv (Ξ½ : β β Kernel π π¨) [β n, IsMarkovKernel (Ξ½ n)] : Environment π π¨ where feedback n := (Ξ½ (n + 1)).prodMkLeft _ Ξ½0 := Ξ½ 0
Type uses (1)
Used by (10)
Actions: Source Β· Open Issue