LeanMachineLearning

Bandits.ArrayModel.measurable_hist_comapπŸ”—

Lemma

No docstring.

πŸ”—theorem
Bandits.ArrayModel.measurable_hist_comap.{u_1, u_2} {𝓐 : Type u_1} {R : Type u_2} {m𝓐 : MeasurableSpace 𝓐} {mR : MeasurableSpace R} [Nonempty 𝓐] [StandardBorelSpace 𝓐] [DecidableEq 𝓐] [Countable 𝓐] (alg : Learning.Algorithm 𝓐 R) (n : β„•) : Measurable fun x => hist alg x n
Bandits.ArrayModel.measurable_hist_comap.{u_1, u_2} {𝓐 : Type u_1} {R : Type u_2} {m𝓐 : MeasurableSpace 𝓐} {mR : MeasurableSpace R} [Nonempty 𝓐] [StandardBorelSpace 𝓐] [DecidableEq 𝓐] [Countable 𝓐] (alg : Learning.Algorithm 𝓐 R) (n : β„•) : Measurable fun x => hist alg x n

Code

lemma measurable_hist_comap [Countable 𝓐] (alg : Algorithm 𝓐 R) (n : β„•) :
    Measurable[MeasurableSpace.comap (fun Ο‰ ↦ (fun (i : Iic n) ↦ Ο‰.1 i, Ο‰.2)) inferInstance]
      (hist alg Β· n)
Proof
by
  have h_eq : (hist alg Β· n) =
      ((hist alg Β· n) ∘ (fun p ↦ (fun i : β„• ↦ p.1 ⟨min i n, by grind⟩, p.2))) ∘
        (fun Ο‰ ↦ (fun (i : Iic n) ↦ Ο‰.1 i, Ο‰.2)) := by
    ext Ο‰ : 1
    exact hist_congr alg n (by grind) (by simp)
  rw [h_eq]
  refine measurable_comp_comap _ (Measurable.comp (by fun_prop) ?_)
  refine Measurable.prodMk ?_ (by fun_prop)
  rw [measurable_pi_iff]
  intro i
  change Measurable ((fun p ↦ p ⟨min i n, by simp⟩) ∘ (fun x : (Iic n β†’ I) Γ— (β„• β†’ 𝓐 β†’ R) ↦ x.1))
  exact Measurable.comp (by fun_prop) measurable_fst

Actions: Source Β· Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 5th 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: 8 project declarations, 78 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.