Learning.IsBayesAlgEnvSeq.hasCondDistrib_IT_obs
Lemma
No docstring.
Types
-
π : Type u_1MeasurableSpace πA measurable space is a space equipped with a Ο-algebra. -
π : Type u_2MeasurableSpace πStandardBorelSpace πA standard Borel space is a measurable space arising as the Borel sets of some Polish topology.Nonempty π -
π¨ : Type u_3MeasurableSpace π¨StandardBorelSpace π¨Nonempty π¨ -
Ξ© : Type u_4MeasurableSpace Ξ©
Given
-
Q : MeasureTheory.Measure πA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsProbabilityMeasure QA measureΞΌis called a probability measure ifΞΌ univ = 1. -
ΞΊ : ProbabilityTheory.Kernel (π Γ π) π¨A kernel from a measurable spaceΞ±to another measurable spaceΞ²is a measurable functionΞΊ : Ξ± β Measure Ξ².ProbabilityTheory.IsMarkovKernel ΞΊA kernel is a Markov kernel if every measure in its image is a probability measure. -
alg : Algorithm Unit π π¨A stochastic, sequential algorithm. -
P : MeasureTheory.Measure Ξ©MeasureTheory.IsProbabilityMeasure P -
E : Ξ© β π -
A : β β Ξ© β π -
Y : β β Ξ© β π¨ -
n : β
Assuming
Then
βα΅ (e : π) βQ,
ProbabilityTheory.HasCondDistrib (IT.obs n) (IT.hist n)
(ProbabilityTheory.Kernel.const (Hist Unit π π¨ n) (MeasureTheory.Measure.dirac ()))
(π[trajectory (noObs Ξ©) A Y | E; P] e)f.Eventually p or βαΆ x in f, p x mean that {x | p x} β f.MeasurableSpace : Type u_6 β Type u_6A measurable space is a space equipped with a Ο-algebra.
StandardBorelSpace : (Ξ± : Type u_1) β [MeasurableSpace Ξ±] β PropA standard Borel space is a measurable space arising as the Borel sets of some Polish topology. This is useful in situations where a space has no natural topology or the natural topology in a space is non-Polish. To endow a standard Borel space `Ξ±` with a compatible Polish topology, use `letI := upgradeStandardBorel Ξ±`. One can then use `eq_borel_upgradeStandardBorel Ξ±` to rewrite the `MeasurableSpace Ξ±` instance to `borel Ξ± t`, where `t` is the new topology.
Nonempty : Sort u β Prop`Nonempty Ξ±` is a typeclass that says that `Ξ±` is not an empty type, that is, there exists an element in the type. It differs from `Inhabited Ξ±` in that `Nonempty Ξ±` is a `Prop`, which means that it does not actually carry an element of `Ξ±`, only a proof that *there exists* such an element. Given `Nonempty Ξ±`, you can construct an element of `Ξ±` *nonconstructively* using `Classical.choice`.
MeasureTheory.IsProbabilityMeasure : {Ξ± : Type u_1} β {m0 : MeasurableSpace Ξ±} β MeasureTheory.Measure Ξ± β PropA measure `ΞΌ` is called a probability measure if `ΞΌ univ = 1`.
MeasureTheory.Measure : (Ξ± : Type u_5) β [MeasurableSpace Ξ±] β Type u_5A measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure. The measure of a set `s`, denoted `ΞΌ s`, is an extended nonnegative real. The real-valued version is written `ΞΌ.real s`.
ProbabilityTheory.IsMarkovKernel : {Ξ± : Type u_1} β
{Ξ² : Type u_2} β {mΞ± : MeasurableSpace Ξ±} β {mΞ² : MeasurableSpace Ξ²} β ProbabilityTheory.Kernel Ξ± Ξ² β PropA kernel is a Markov kernel if every measure in its image is a probability measure.
ProbabilityTheory.Kernel : (Ξ± : Type u_1) β (Ξ² : Type u_2) β [MeasurableSpace Ξ±] β [MeasurableSpace Ξ²] β Type (max u_1 u_2)A kernel from a measurable space `Ξ±` to another measurable space `Ξ²` is a measurable function `ΞΊ : Ξ± β Measure Ξ²`. The measurable space structure on `MeasureTheory.Measure Ξ²` is given by `MeasureTheory.Measure.instMeasurableSpace`. A map `ΞΊ : Ξ± β MeasureTheory.Measure Ξ²` is measurable iff `β s : Set Ξ², MeasurableSet s β Measurable (fun a β¦ ΞΊ a s)`.
Prod : Type u β Type v β Type (max u v)The product type, usually written `Ξ± Γ Ξ²`. Product types are also called pair or tuple types. Elements of this type are pairs in which the first element is an `Ξ±` and the second element is a `Ξ²`. Products nest to the right, so `(x, y, z) : Ξ± Γ Ξ² Γ Ξ³` is equivalent to `(x, (y, z)) : Ξ± Γ (Ξ² Γ Ξ³)`. Conventions for notations in identifiers: * The recommended spelling of `Γ` in identifiers is `Prod`.
Learning.Algorithm : (π : Type u_5) β
(π : Type u_6) β
(π¨ : Type u_7) β [MeasurableSpace π] β [MeasurableSpace π] β [MeasurableSpace π¨] β Type (max (max u_5 u_6) u_7)A stochastic, sequential algorithm. At each round, it sees an observation in `π`, then takes an action in `π`, and finally receives feedback in `π¨`. The action is a random function of the past rounds and the current observation.Go to its page
Unit : TypeThe canonical type with one element. This element is written `()`. `Unit` has a number of uses: * It can be used to model control flow that returns from a function call without providing other information. * Monadic actions that return `Unit` have side effects without computing values. * In polymorphic types, it can be used to indicate that no data is to be stored in a particular field.
Nat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
Learning.IsBayesAlgEnvSeq : {π : Type u_1} β
{π : Type u_2} β
{π¨ : Type u_3} β
{Ξ© : Type u_4} β
[inst : MeasurableSpace π] β
[inst_1 : MeasurableSpace π] β
[inst_2 : MeasurableSpace π¨] β
[inst_3 : MeasurableSpace Ξ©] β
(Q : MeasureTheory.Measure π) β
[MeasureTheory.IsProbabilityMeasure Q] β
(ΞΊ : ProbabilityTheory.Kernβ¦`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 Unit π π¨` interacting with an underlying environment that depends on `E` and `ΞΊ` (`stationaryEnv (ΞΊ.sectR (E Ο))`). This is `IsAlgEnvSeq` for the announcing environment `bayesStationaryEnv Q ΞΊ` and the algorithm `alg.comapObs (fun _ β¦ ())` that ignores the announced parameter: the observation at every round is `E Ο`.Go to its page
Filter.Eventually : {Ξ± : Type u_1} β (Ξ± β Prop) β Filter Ξ± β Prop`f.Eventually p` or `βαΆ x in f, p x` mean that `{x | p x} β f`. E.g., `βαΆ x in atTop, p x`
means that `p` holds true for sufficiently large `x`.ProbabilityTheory.HasCondDistrib : {Ξ© : Type u_1} β
{π§ : Type u_2} β
{π¨ : Type u_3} β
{mΞ© : MeasurableSpace Ξ©} β
{mπ§ : MeasurableSpace π§} β
{mπ¨ : MeasurableSpace π¨} β (Ξ© β π¨) β (Ξ© β π§) β ProbabilityTheory.Kernel π§ π¨ β MeasureTheory.Measure Ξ© β PropPredicate stating that the conditional distribution of `Y` given `X` under the measure `P` is equal to the kernel `ΞΊ`.
Learning.IT.obs : {π : Type u_1} β {π : Type u_2} β {π¨ : Type u_3} β β β (β β Learning.Round π π π¨) β π`obs n` is the observation at time `n`. This is a random variable on the measurable space `β β Round π π π¨`.Go to its page
Learning.IT.hist : {π : Type u_1} β {π : Type u_2} β {π¨ : Type u_3} β (n : β) β (β β Learning.Round π π π¨) β Learning.Hist π π π¨ n`hist n` is the history before time `n`: the rounds at times `0, ..., n - 1`. This is a random variable on the measurable space `β β Round π π π¨`.Go to its page
ProbabilityTheory.Kernel.const : (Ξ± : Type u_4) β
{Ξ² : Type u_5} β
[inst : MeasurableSpace Ξ±] β {x : MeasurableSpace Ξ²} β MeasureTheory.Measure Ξ² β ProbabilityTheory.Kernel Ξ± Ξ²Constant kernel, which always returns the same measure.
Learning.Hist : Type u_5 β Type u_6 β Type u_7 β β β Type (max (max u_7 u_6) u_5)History of `n` complete rounds; `n = 0` is the empty history.Go to its page
MeasureTheory.Measure.dirac : {Ξ± : Type u_1} β [inst : MeasurableSpace Ξ±] β Ξ± β MeasureTheory.Measure Ξ±The dirac measure.
Unit.unit : UnitThe only element of the unit type. It can be written as an empty tuple: `()`.
ProbabilityTheory.condDistrib : {Ξ± : Type u_5} β
{Ξ² : Type u_6} β
{Ξ© : Type u_7} β
[inst : MeasurableSpace Ξ©] β
[StandardBorelSpace Ξ©] β
[Nonempty Ξ©] β
{x : MeasurableSpace Ξ±} β
[inst_3 : MeasurableSpace Ξ²] β
(Ξ± β Ξ©) β
(Ξ± β Ξ²) β
(ΞΌ : MeasureTheory.Measure Ξ±) β [MeasureTheory.IsFiniteMeasure ΞΌ] β ProbabilityTheory.Kernelβ¦**Regular conditional probability distribution**: kernel associated with the conditional expectation of `Y` given `X`. For almost all `a`, `condDistrib Y X ΞΌ` evaluated at `X a` and a measurable set `s` is equal to the conditional expectation `ΞΌβ¦Y β»ΒΉ' s | mΞ².comap Xβ§ a`. It also satisfies the equality `ΞΌ[(fun a => f (X a, Y a)) | mΞ².comap X] =α΅[ΞΌ] fun a => β« y, f (X a, y) β(condDistrib Y X ΞΌ (X a))` for all integrable functions `f`.
Learning.trajectory : {π : Type u_1} β
{π : Type u_2} β
{π¨ : Type u_3} β {Ξ© : Type u_4} β (β β Ξ© β π) β (β β Ξ© β π) β (β β Ξ© β π¨) β Ξ© β β β Learning.Round π π π¨A random variable that gives the sequence of rounds.Go to its page
Learning.noObs : (Ξ© : Type u_5) β β β Ξ© β UnitThe observation process of an algorithm-environment sequence without observations.Go to its page
Code
lemma hasCondDistrib_IT_obs (_h : IsBayesAlgEnvSeq Q ΞΊ alg E A Y P) (n : β) :
βα΅ e βQ, HasCondDistrib (IT.obs n) (IT.hist n) (Kernel.const _ (Measure.dirac ()))
(condDistrib (trajectory (noObs Ξ©) A Y) E P e)Proof
ae_of_all _ fun _ β¦ hasCondDistrib_unit (IT.measurable_hist n).aemeasurable _ _
Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10).
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: 20 project declarations, 63 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.