Learning.eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntil
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.
eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntil๐
Learning.eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntilNo docstring.
Learning.eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntil.{u_1, u_2, u_4} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} {ฮฉ : Type u_4} {mฮฉ : MeasurableSpace ฮฉ} {alg : Algorithm ๐ ๐จ} {env : Environment ๐ ๐จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {Aโ : โ โ ฮฉ โ ๐} {Rโ : โ โ ฮฉ โ ๐จ} {N : โ} (h : IsAlgEnvSeqUntil Aโ Rโ alg env P N) : MeasureTheory.Measure.map (fun ฯ n => (Aโ (โn) ฯ, Rโ (โn) ฯ)) P = MeasureTheory.Measure.map (Preorder.frestrictLe N) (trajMeasure alg env)Learning.eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntil.{u_1, u_2, u_4} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} {ฮฉ : Type u_4} {mฮฉ : MeasurableSpace ฮฉ} {alg : Algorithm ๐ ๐จ} {env : Environment ๐ ๐จ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {Aโ : โ โ ฮฉ โ ๐} {Rโ : โ โ ฮฉ โ ๐จ} {N : โ} (h : IsAlgEnvSeqUntil Aโ Rโ alg env P N) : MeasureTheory.Measure.map (fun ฯ n => (Aโ (โn) ฯ, Rโ (โn) ฯ)) P = MeasureTheory.Measure.map (Preorder.frestrictLe N) (trajMeasure alg env)
Code
lemma eq_trajMeasure_map_frestrictLe_of_isAlgEnvSeqUntil
(h : IsAlgEnvSeqUntil Aโ Rโ alg env P N) :
P.map (fun ฯ (n : Iic N) โฆ (Aโ n ฯ, Rโ n ฯ)) =
(trajMeasure alg env).map (Preorder.frestrictLe N)Type uses (4)
Body uses (7)
Used by (1)
Actions: Source ยท Open Issue
Proof
by
rw [trajMeasure]
have h := Kernel.eq_trajMeasure_map_frestrictLe (Y := fun n ฯ โฆ (Aโ n ฯ, Rโ n ฯ))
(P := P) (ฮผโ := alg.p0 โโ env.ฮฝ0) (ฮบ := stepKernel alg env) ?_ (fun n hn โฆ ?_) (N := N)
ยท exact h
ยท exact h.hasLaw_step_zero
ยท exact h.hasCondDistrib_step n hnDependency graph
Type dependencies (4)
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
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
IsAlgEnvSeqUntil๐
Learning.IsAlgEnvSeqUntilAn algorithm-environment sequence: a sequence of actions and feedbacks generated by an algorithm interacting with an environment.
Learning.IsAlgEnvSeqUntil.{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] (N : โ) : PropLearning.IsAlgEnvSeqUntil.{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] (N : โ) : Prop
Code
structure IsAlgEnvSeqUntil
(A : โ โ ฮฉ โ ๐) (Y : โ โ ฮฉ โ ๐จ) (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ)
(P : Measure ฮฉ) [IsFiniteMeasure P] (N : โ) : 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 (hn : n < 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 (hn : n < N) :
HasCondDistrib (Y (n + 1)) (fun ฯ โฆ (history A Y n ฯ, A (n + 1) ฯ))
(env.feedback n) PType uses (3)
Used by (22)
Actions: Source ยท Open Issue
trajMeasure๐
Learning.trajMeasureMeasure on the sequence of actions and observations generated by the algorithm/environment.
Learning.trajMeasure.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐จ)Learning.trajMeasure.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐จ)
Code
noncomputable
def trajMeasure (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) :
Measure (โ โ ๐ ร ๐จ) :=
Kernel.trajMeasure (alg.p0 โโ env.ฮฝ0) (stepKernel alg env)
deriving IsProbabilityMeasureType uses (2)
Used by (19)
Actions: Source ยท Open Issue
All dependencies, transitively (5)
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
stepKernel๐
Learning.stepKernel
Kernel describing the distribution of the next action-feedback pair given the history
up to n.
Learning.stepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.Kernel (โฅ(Finset.Iic n) โ ๐ ร ๐จ) (๐ ร ๐จ)Learning.stepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.Kernel (โฅ(Finset.Iic n) โ ๐ ร ๐จ) (๐ ร ๐จ)
Code
noncomputable
def stepKernel (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) :
Kernel (Iic n โ ๐ ร ๐จ) (๐ ร ๐จ) :=
alg.policy n โโ env.feedback n
deriving IsMarkovKernelType uses (2)
Actions: Source ยท Open Issue
instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy๐
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicyNo docstring.
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Algorithm.policy alg n)Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Algorithm.policy alg n)
Code
instance (alg : Algorithm ๐ ๐จ) (n : โ) : IsMarkovKernel (alg.policy n)
Type uses (1)
Actions: Source ยท Open Issue
Proof
alg.h_policy n
instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback๐
Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedbackNo docstring.
Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Environment.feedback env n)Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Environment.feedback env n)
Code
instance (env : Environment ๐ ๐จ) (n : โ) : IsMarkovKernel (env.feedback n)
Type uses (1)
Used by (5)
Actions: Source ยท Open Issue
Proof
env.h_feedback n
instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel๐
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernelNo docstring.
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (stepKernel alg env n)Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (stepKernel alg env n)
Code
deriving IsMarkovKernel
Type uses (3)
Body uses (2)
Used by (10)
Actions: Source ยท Open Issue
Proof
deriving IsMarkovKernel