Bandits.hasLaw_snd_apply_prod_streamMeasure
From the authors
Under a product measure μ.prod (streamMeasure ν), the entry (n, a) of the reward array has
law ν a.
-
𝓐 : Type u_1m𝓐 : MeasurableSpace 𝓐A measurable space is a space equipped with a σ-algebra. -
𝓡 : Type u_2m𝓡 : MeasurableSpace 𝓡 -
Ω : Type u_3mΩ : MeasurableSpace Ω
-
μ : 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 μA 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. -
n : ℕ -
a : 𝓐
ProbabilityTheory.HasLaw (fun ω => ω.2 n a) (ν a) (μ.prod (streamMeasure ν))The predicate HasLaw X μ P registers the fact that the random variable X has law μ under the measure P, in other words that P.map X = μ.MeasurableSpace : Type u_6 → Type u_6A measurable space is a space equipped with a σ-algebra.
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)`.
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.
ProbabilityTheory.HasLaw : {Ω : Type u_1} →
{𝓧 : Type u_2} →
{mΩ : MeasurableSpace Ω} →
{m𝓧 : MeasurableSpace 𝓧} →
(Ω → 𝓧) → MeasureTheory.Measure 𝓧 → autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasLaw._auto_1 → PropThe predicate `HasLaw X μ P` registers the fact that the random variable `X` has law `μ` under the measure `P`, in other words that `P.map X = μ`. We also require `X` to be `AEMeasurable`, to allow for nice interactions with operations on the codomain of `X`. See for instance `HasLaw.comp`, `IndepFun.hasLaw_mul` and `IndepFun.hasLaw_add`.
MeasureTheory.Measure.prod : {α : Type u_4} →
{β : Type u_5} →
[inst : MeasurableSpace α] →
[inst_1 : MeasurableSpace β] → MeasureTheory.Measure α → MeasureTheory.Measure β → MeasureTheory.Measure (α × β)The binary product of measures. They are defined for arbitrary measures, but we basically prove all properties under the assumption that at least one of them is s-finite.
Bandits.streamMeasure : {𝓐 : Type u_1} →
{𝓡 : Type u_2} →
{m𝓐 : MeasurableSpace 𝓐} →
{m𝓡 : MeasurableSpace 𝓡} → ProbabilityTheory.Kernel 𝓐 𝓡 → MeasureTheory.Measure (ℕ → 𝓐 → 𝓡)Measure of an infinite stream of rewards from each action.Go to its page
Code
lemma hasLaw_snd_apply_prod_streamMeasure {Ω : Type*} {mΩ : MeasurableSpace Ω} (μ : Measure Ω)
[IsProbabilityMeasure μ] (ν : Kernel 𝓐 𝓡) [IsMarkovKernel ν] (n : ℕ) (a : 𝓐) :
HasLaw (fun ω : Ω × (ℕ → 𝓐 → 𝓡) ↦ ω.2 n a) (ν a) (μ.prod (streamMeasure ν))Proof
(hasLaw_eval_eval_streamMeasure ν n a).comp (hasLaw_snd_prod μ _)
Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 2th 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: 1 project declarations, 15 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.