File: Mathlib/Probability/Kernel/Basic.lean

full_name: ProbabilityTheory.Kernel
code: /-- 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)`. -/
structure Kernel (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] where
  /-- The underlying function of a kernel.

  Do not use this function directly. Instead use the coercion coming from the `DFunLike`
  instance. -/
  toFun : α → Measure β
  /-- A kernel is a measurable map.

  Do not use this lemma directly. Use `Kernel.measurable` instead. -/
  measurable' : Measurable toFun
goal: Type (max u_1 u_2)

full_name: ProbabilityTheory.Kernel.measurable'
code: /-- 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)`. -/
structure Kernel (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] where
  /-- The underlying function of a kernel.

  Do not use this function directly. Instead use the coercion coming from the `DFunLike`
  instance. -/
  toFun : α → Measure β
  /-- A kernel is a measurable map.

  Do not use this lemma directly. Use `Kernel.measurable` instead. -/
  measurable' : Measurable toFun
goal: Measurable self.toFun

full_name: ProbabilityTheory.Kernel.toFun
code: /-- 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)`. -/
structure Kernel (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] where
  /-- The underlying function of a kernel.

  Do not use this function directly. Instead use the coercion coming from the `DFunLike`
  instance. -/
  toFun : α → Measure β
  /-- A kernel is a measurable map.

  Do not use this lemma directly. Use `Kernel.measurable` instead. -/
  measurable' : Measurable toFun
goal: α → MeasureTheory.Measure β

full_name: ProbabilityTheory.Kernel.instFunLike
code: instance instFunLike : FunLike (Kernel α β) α (Measure β) 
goal: FunLike (ProbabilityTheory.Kernel α β) α (MeasureTheory.Measure β)

full_name: ProbabilityTheory.Kernel.measurable
code: lemma measurable (κ : Kernel α β) : Measurable κ 
goal: Measurable ⇑κ

full_name: ProbabilityTheory.Kernel.instZero
code: instance instZero : Zero (Kernel α β) 
goal: Zero (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.instAdd
code: noncomputable instance instAdd : Add (Kernel α β) 
goal: Add (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.instSMulNat
code: noncomputable instance instSMulNat : SMul ℕ (Kernel α β) 
goal: SMul ℕ (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.coe_zero
code: @[simp, norm_cast] lemma coe_zero : ⇑(0 : Kernel α β) = 0 
goal: ⇑0 = 0

full_name: ProbabilityTheory.Kernel.coe_add
code: @[simp, norm_cast] lemma coe_add (κ η : Kernel α β) : ⇑(κ + η) = κ + η 
goal: ⇑(κ + η) = ⇑κ + ⇑η

full_name: ProbabilityTheory.Kernel.coe_nsmul
code: @[simp, norm_cast] lemma coe_nsmul (n : ℕ) (κ : Kernel α β) : ⇑(n • κ) = n • κ 
goal: ⇑(n • κ) = n • ⇑κ

full_name: ProbabilityTheory.Kernel.zero_apply
code: @[simp] lemma zero_apply (a : α) : (0 : Kernel α β) a = 0 
goal: 0 a = 0

full_name: ProbabilityTheory.Kernel.add_apply
code: @[simp] lemma add_apply (κ η : Kernel α β) (a : α) : (κ + η) a = κ a + η a 
goal: (κ + η) a = κ a + η a

full_name: ProbabilityTheory.Kernel.nsmul_apply
code: @[simp] lemma nsmul_apply (n : ℕ) (κ : Kernel α β) (a : α) : (n • κ) a = n • κ a 
goal: (n • κ) a = n • κ a

full_name: ProbabilityTheory.Kernel.instAddCommMonoid
code: noncomputable instance instAddCommMonoid : AddCommMonoid (Kernel α β) 
goal: AddCommMonoid (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.instPartialOrder
code: instance instPartialOrder : PartialOrder (Kernel α β) 
goal: PartialOrder (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.instCovariantAddLE
code: instance instCovariantAddLE {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] :
    CovariantClass (Kernel α β) (Kernel α β) (· + ·) (· ≤ ·) 
goal: CovariantClass (ProbabilityTheory.Kernel α β) (ProbabilityTheory.Kernel α β) (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1

full_name: ProbabilityTheory.Kernel.instOrderBot
code: noncomputable
instance instOrderBot {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] :
    OrderBot (Kernel α β) 
goal: OrderBot (ProbabilityTheory.Kernel α β)

full_name: ProbabilityTheory.Kernel.coeAddHom
code: /-- Coercion to a function as an additive monoid homomorphism. -/
def coeAddHom (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] :
    Kernel α β →+ α → Measure β 
goal: ProbabilityTheory.Kernel α β →+ α → MeasureTheory.Measure β

full_name: ProbabilityTheory.Kernel.coe_finset_sum
code: @[simp]
theorem coe_finset_sum (I : Finset ι) (κ : ι → Kernel α β) : ⇑(∑ i ∈ I, κ i) = ∑ i ∈ I, ⇑(κ i) 
goal: ⇑(∑ i ∈ I, κ i) = ∑ i ∈ I, ⇑(κ i)

full_name: ProbabilityTheory.Kernel.finset_sum_apply
code: theorem finset_sum_apply (I : Finset ι) (κ : ι → Kernel α β) (a : α) :
    (∑ i ∈ I, κ i) a = ∑ i ∈ I, κ i a 
goal: (∑ i ∈ I, κ i) a = ∑ i ∈ I, (κ i) a

full_name: ProbabilityTheory.Kernel.finset_sum_apply'
code: theorem finset_sum_apply' (I : Finset ι) (κ : ι → Kernel α β) (a : α) (s : Set β) :
    (∑ i ∈ I, κ i) a s = ∑ i ∈ I, κ i a s 
goal: ((∑ i ∈ I, κ i) a) s = ∑ i ∈ I, ((κ i) a) s

full_name: ProbabilityTheory.IsMarkovKernel
code: /-- A kernel is a Markov kernel if every measure in its image is a probability measure. -/
class IsMarkovKernel (κ : Kernel α β) : Prop where
  isProbabilityMeasure : ∀ a, IsProbabilityMeasure (κ a)
goal: Prop

full_name: ProbabilityTheory.IsMarkovKernel.isProbabilityMeasure
code: /-- A kernel is a Markov kernel if every measure in its image is a probability measure. -/
class IsMarkovKernel (κ : Kernel α β) : Prop where
  isProbabilityMeasure : ∀ a, IsProbabilityMeasure (κ a)
goal: MeasureTheory.IsProbabilityMeasure (κ a)

full_name: ProbabilityTheory.IsFiniteKernel.exists_univ_le
code: /-- A kernel is finite if every measure in its image is finite, with a uniform bound. -/
class IsFiniteKernel (κ : Kernel α β) : Prop where
  exists_univ_le : ∃ C : ℝ≥0∞, C < ∞ ∧ ∀ a, κ a Set.univ ≤ C
goal: ∃ C < ⊤, ∀ (a : α), (κ a) Set.univ ≤ C

full_name: ProbabilityTheory.IsFiniteKernel
code: /-- A kernel is finite if every measure in its image is finite, with a uniform bound. -/
class IsFiniteKernel (κ : Kernel α β) : Prop where
  exists_univ_le : ∃ C : ℝ≥0∞, C < ∞ ∧ ∀ a, κ a Set.univ ≤ C
goal: Prop

full_name: ProbabilityTheory.IsFiniteKernel.bound
code: /-- A constant `C : ℝ≥0∞` such that `C < ∞` (`ProbabilityTheory.IsFiniteKernel.bound_lt_top κ`) and
for all `a : α` and `s : Set β`, `κ a s ≤ C` (`ProbabilityTheory.Kernel.measure_le_bound κ a s`).

Porting note (#11215): TODO: does it make sense to
-- make `ProbabilityTheory.IsFiniteKernel.bound` the least possible bound?
-- Should it be an `NNReal` number? -/
noncomputable def IsFiniteKernel.bound (κ : Kernel α β) [h : IsFiniteKernel κ] : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: ProbabilityTheory.IsFiniteKernel.bound_lt_top
code: theorem IsFiniteKernel.bound_lt_top (κ : Kernel α β) [h : IsFiniteKernel κ] :
    IsFiniteKernel.bound κ < ∞ 
goal: ProbabilityTheory.IsFiniteKernel.bound κ < ⊤

full_name: ProbabilityTheory.IsFiniteKernel.bound_ne_top
code: theorem IsFiniteKernel.bound_ne_top (κ : Kernel α β) [IsFiniteKernel κ] :
    IsFiniteKernel.bound κ ≠ ∞ 
goal: ProbabilityTheory.IsFiniteKernel.bound κ ≠ ⊤

full_name: ProbabilityTheory.Kernel.measure_le_bound
code: theorem Kernel.measure_le_bound (κ : Kernel α β) [h : IsFiniteKernel κ] (a : α) (s : Set β) :
    κ a s ≤ IsFiniteKernel.bound κ 
goal: (κ a) s ≤ ProbabilityTheory.IsFiniteKernel.bound κ

full_name: ProbabilityTheory.isFiniteKernel_zero
code: instance isFiniteKernel_zero (α β : Type*) {mα : MeasurableSpace α} {mβ : MeasurableSpace β} :
    IsFiniteKernel (0 : Kernel α β) 
goal: ProbabilityTheory.IsFiniteKernel 0

full_name: ProbabilityTheory.IsFiniteKernel.add
code: instance IsFiniteKernel.add (κ η : Kernel α β) [IsFiniteKernel κ] [IsFiniteKernel η] :
    IsFiniteKernel (κ + η) 
goal: ProbabilityTheory.IsFiniteKernel (κ + η)

full_name: ProbabilityTheory.isFiniteKernel_of_le
code: lemma isFiniteKernel_of_le {κ ν : Kernel α β} [hν : IsFiniteKernel ν] (hκν : κ ≤ ν) :
    IsFiniteKernel κ 
goal: ProbabilityTheory.IsFiniteKernel κ

full_name: ProbabilityTheory.IsMarkovKernel.is_probability_measure'
code: instance IsMarkovKernel.is_probability_measure' [IsMarkovKernel κ] (a : α) :
    IsProbabilityMeasure (κ a) 
goal: MeasureTheory.IsProbabilityMeasure (κ a)

full_name: ProbabilityTheory.IsFiniteKernel.isFiniteMeasure
code: instance IsFiniteKernel.isFiniteMeasure [IsFiniteKernel κ] (a : α) : IsFiniteMeasure (κ a) 
goal: MeasureTheory.IsFiniteMeasure (κ a)

full_name: ProbabilityTheory.IsMarkovKernel.isFiniteKernel
code: instance (priority := 100) IsMarkovKernel.isFiniteKernel [IsMarkovKernel κ] :
    IsFiniteKernel κ 
goal: ProbabilityTheory.IsFiniteKernel κ

full_name: ProbabilityTheory.Kernel.ext
code: @[ext]
theorem ext {η : Kernel α β} (h : ∀ a, κ a = η a) : κ = η 
goal: κ = η

full_name: ProbabilityTheory.Kernel.ext_iff
code: theorem ext_iff {η : Kernel α β} : κ = η ↔ ∀ a, κ a = η a 
goal: κ = η ↔ ∀ (a : α), κ a = η a

full_name: ProbabilityTheory.Kernel.ext_iff'
code: theorem ext_iff' {η : Kernel α β} :
    κ = η ↔ ∀ a s, MeasurableSet s → κ a s = η a s 
goal: κ = η ↔ ∀ (a : α) (s : Set β), MeasurableSet s → (κ a) s = (η a) s

full_name: ProbabilityTheory.Kernel.ext_fun
code: theorem ext_fun {η : Kernel α β} (h : ∀ a f, Measurable f → ∫⁻ b, f b ∂κ a = ∫⁻ b, f b ∂η a) :
    κ = η 
goal: κ = η

full_name: ProbabilityTheory.Kernel.ext_fun_iff
code: theorem ext_fun_iff {η : Kernel α β} :
    κ = η ↔ ∀ a f, Measurable f → ∫⁻ b, f b ∂κ a = ∫⁻ b, f b ∂η a 
goal: κ = η ↔ ∀ (a : α) (f : β → ℝ≥0∞), Measurable f → ∫⁻ (b : β), f b ∂κ a = ∫⁻ (b : β), f b ∂η a

full_name: ProbabilityTheory.Kernel.measurable_coe
code: protected theorem measurable_coe (κ : Kernel α β) {s : Set β} (hs : MeasurableSet s) :
    Measurable fun a => κ a s 
goal: Measurable fun a => (κ a) s

full_name: ProbabilityTheory.Kernel.apply_congr_of_mem_measurableAtom
code: lemma apply_congr_of_mem_measurableAtom (κ : Kernel α β) {y' y : α} (hy' : y' ∈ measurableAtom y) :
  κ y' = κ y 
goal: κ y' = κ y

full_name: ProbabilityTheory.Kernel.IsFiniteKernel.integrable
code: lemma IsFiniteKernel.integrable (μ : Measure α) [IsFiniteMeasure μ]
    (κ : Kernel α β) [IsFiniteKernel κ] {s : Set β} (hs : MeasurableSet s) :
    Integrable (fun x => (κ x s).toReal) μ 
goal: MeasureTheory.Integrable (fun x => ((κ x) s).toReal) μ

full_name: ProbabilityTheory.Kernel.IsMarkovKernel.integrable
code: lemma IsMarkovKernel.integrable (μ : Measure α) [IsFiniteMeasure μ]
    (κ : Kernel α β) [IsMarkovKernel κ] {s : Set β} (hs : MeasurableSet s) :
    Integrable (fun x => (κ x s).toReal) μ 
goal: MeasureTheory.Integrable (fun x => ((κ x) s).toReal) μ

full_name: ProbabilityTheory.Kernel.sum
code: /-- Sum of an indexed family of kernels. -/
protected noncomputable def sum [Countable ι] (κ : ι → Kernel α β) : Kernel α β 
goal: ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.sum_apply
code: theorem sum_apply [Countable ι] (κ : ι → Kernel α β) (a : α) :
    Kernel.sum κ a = Measure.sum fun n => κ n a 
goal: (ProbabilityTheory.Kernel.sum κ) a = MeasureTheory.Measure.sum fun n => (κ n) a

full_name: ProbabilityTheory.Kernel.sum_apply'
code: theorem sum_apply' [Countable ι] (κ : ι → Kernel α β) (a : α) {s : Set β} (hs : MeasurableSet s) :
    Kernel.sum κ a s = ∑' n, κ n a s 
goal: ((ProbabilityTheory.Kernel.sum κ) a) s = ∑' (n : ι), ((κ n) a) s

full_name: ProbabilityTheory.Kernel.sum_zero
code: @[simp]
theorem sum_zero [Countable ι] : (Kernel.sum fun _ : ι => (0 : Kernel α β)) = 0 
goal: (ProbabilityTheory.Kernel.sum fun x => 0) = 0

full_name: ProbabilityTheory.Kernel.sum_comm
code: theorem sum_comm [Countable ι] (κ : ι → ι → Kernel α β) :
    (Kernel.sum fun n => Kernel.sum (κ n)) = Kernel.sum fun m => Kernel.sum fun n => κ n m 
goal: (ProbabilityTheory.Kernel.sum fun n => ProbabilityTheory.Kernel.sum (κ n)) =
  ProbabilityTheory.Kernel.sum fun m => ProbabilityTheory.Kernel.sum fun n => κ n m

full_name: ProbabilityTheory.Kernel.sum_fintype
code: @[simp]
theorem sum_fintype [Fintype ι] (κ : ι → Kernel α β) : Kernel.sum κ = ∑ i, κ i 
goal: ProbabilityTheory.Kernel.sum κ = ∑ i : ι, κ i

full_name: ProbabilityTheory.Kernel.sum_add
code: theorem sum_add [Countable ι] (κ η : ι → Kernel α β) :
    (Kernel.sum fun n => κ n + η n) = Kernel.sum κ + Kernel.sum η 
goal: (ProbabilityTheory.Kernel.sum fun n => κ n + η n) = ProbabilityTheory.Kernel.sum κ + ProbabilityTheory.Kernel.sum η

full_name: ProbabilityTheory.IsSFiniteKernel
code: /-- A kernel is s-finite if it can be written as the sum of countably many finite kernels. -/
class _root_.ProbabilityTheory.IsSFiniteKernel (κ : Kernel α β) : Prop where
  tsum_finite : ∃ κs : ℕ → Kernel α β, (∀ n, IsFiniteKernel (κs n)) ∧ κ = Kernel.sum κs
goal: Prop

full_name: ProbabilityTheory.IsSFiniteKernel.tsum_finite
code: /-- A kernel is s-finite if it can be written as the sum of countably many finite kernels. -/
class _root_.ProbabilityTheory.IsSFiniteKernel (κ : Kernel α β) : Prop where
  tsum_finite : ∃ κs : ℕ → Kernel α β, (∀ n, IsFiniteKernel (κs n)) ∧ κ = Kernel.sum κs
goal: ∃ κs, (∀ (n : ℕ), ProbabilityTheory.IsFiniteKernel (κs n)) ∧ κ = ProbabilityTheory.Kernel.sum κs

full_name: ProbabilityTheory.Kernel.IsFiniteKernel.isSFiniteKernel
code: instance (priority := 100) IsFiniteKernel.isSFiniteKernel [h : IsFiniteKernel κ] :
    IsSFiniteKernel κ 
goal: ProbabilityTheory.IsSFiniteKernel κ

full_name: ProbabilityTheory.Kernel.seq
code: /-- A sequence of finite kernels such that `κ = ProbabilityTheory.Kernel.sum (seq κ)`. See
`ProbabilityTheory.Kernel.isFiniteKernel_seq` and `ProbabilityTheory.Kernel.kernel_sum_seq`. -/
noncomputable def seq (κ : Kernel α β) [h : IsSFiniteKernel κ] : ℕ → Kernel α β 
goal: ℕ → ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.kernel_sum_seq
code: theorem kernel_sum_seq (κ : Kernel α β) [h : IsSFiniteKernel κ] : Kernel.sum (seq κ) = κ 
goal: ProbabilityTheory.Kernel.sum κ.seq = κ

full_name: ProbabilityTheory.Kernel.measure_sum_seq
code: theorem measure_sum_seq (κ : Kernel α β) [h : IsSFiniteKernel κ] (a : α) :
    (Measure.sum fun n => seq κ n a) = κ a 
goal: (MeasureTheory.Measure.sum fun n => (κ.seq n) a) = κ a

full_name: ProbabilityTheory.Kernel.isFiniteKernel_seq
code: instance isFiniteKernel_seq (κ : Kernel α β) [h : IsSFiniteKernel κ] (n : ℕ) :
    IsFiniteKernel (Kernel.seq κ n) 
goal: ProbabilityTheory.IsFiniteKernel (κ.seq n)

full_name: ProbabilityTheory.IsSFiniteKernel.sFinite
code: instance _root_.ProbabilityTheory.IsSFiniteKernel.sFinite [IsSFiniteKernel κ] (a : α) :
    SFinite (κ a) 
goal: MeasureTheory.SFinite (κ a)

full_name: ProbabilityTheory.Kernel.IsSFiniteKernel.add
code: instance IsSFiniteKernel.add (κ η : Kernel α β) [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    IsSFiniteKernel (κ + η) 
goal: ProbabilityTheory.IsSFiniteKernel (κ + η)

full_name: ProbabilityTheory.Kernel.IsSFiniteKernel.finset_sum
code: theorem IsSFiniteKernel.finset_sum {κs : ι → Kernel α β} (I : Finset ι)
    (h : ∀ i ∈ I, IsSFiniteKernel (κs i)) : IsSFiniteKernel (∑ i ∈ I, κs i) 
goal: ProbabilityTheory.IsSFiniteKernel (∑ i ∈ I, κs i)

full_name: ProbabilityTheory.Kernel.isSFiniteKernel_sum_of_denumerable
code: theorem isSFiniteKernel_sum_of_denumerable [Denumerable ι] {κs : ι → Kernel α β}
    (hκs : ∀ n, IsSFiniteKernel (κs n)) : IsSFiniteKernel (Kernel.sum κs) 
goal: ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.sum κs)

full_name: ProbabilityTheory.Kernel.isSFiniteKernel_sum
code: theorem isSFiniteKernel_sum [Countable ι] {κs : ι → Kernel α β}
    (hκs : ∀ n, IsSFiniteKernel (κs n)) : IsSFiniteKernel (Kernel.sum κs) 
goal: ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.sum κs)

full_name: ProbabilityTheory.Kernel.deterministic
code: /-- Kernel which to `a` associates the dirac measure at `f a`. This is a Markov kernel. -/
noncomputable def deterministic (f : α → β) (hf : Measurable f) : Kernel α β 
goal: ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.deterministic_apply
code: theorem deterministic_apply {f : α → β} (hf : Measurable f) (a : α) :
    deterministic f hf a = Measure.dirac (f a) 
goal: (ProbabilityTheory.Kernel.deterministic f hf) a = MeasureTheory.Measure.dirac (f a)

full_name: ProbabilityTheory.Kernel.deterministic_apply'
code: theorem deterministic_apply' {f : α → β} (hf : Measurable f) (a : α) {s : Set β}
    (hs : MeasurableSet s) : deterministic f hf a s = s.indicator (fun _ => 1) (f a) 
goal: ((ProbabilityTheory.Kernel.deterministic f hf) a) s = s.indicator (fun x => 1) (f a)

full_name: ProbabilityTheory.Kernel.isMarkovKernel_deterministic
code: instance isMarkovKernel_deterministic {f : α → β} (hf : Measurable f) :
    IsMarkovKernel (deterministic f hf) 
goal: ProbabilityTheory.IsMarkovKernel (ProbabilityTheory.Kernel.deterministic f hf)

full_name: ProbabilityTheory.Kernel.lintegral_deterministic'
code: theorem lintegral_deterministic' {f : β → ℝ≥0∞} {g : α → β} {a : α} (hg : Measurable g)
    (hf : Measurable f) : ∫⁻ x, f x ∂deterministic g hg a = f (g a) 
goal: ∫⁻ (x : β), f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = f (g a)

full_name: ProbabilityTheory.Kernel.lintegral_deterministic
code: @[simp]
theorem lintegral_deterministic {f : β → ℝ≥0∞} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] : ∫⁻ x, f x ∂deterministic g hg a = f (g a) 
goal: ∫⁻ (x : β), f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = f (g a)

full_name: ProbabilityTheory.Kernel.setLIntegral_deterministic'
code: theorem setLIntegral_deterministic' {f : β → ℝ≥0∞} {g : α → β} {a : α} (hg : Measurable g)
    (hf : Measurable f) {s : Set β} (hs : MeasurableSet s) [Decidable (g a ∈ s)] :
    ∫⁻ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0 
goal: ∫⁻ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0

full_name: ProbabilityTheory.Kernel.setLIntegral_deterministic
code: @[simp]
theorem setLIntegral_deterministic {f : β → ℝ≥0∞} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] (s : Set β) [Decidable (g a ∈ s)] :
    ∫⁻ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0 
goal: ∫⁻ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0

full_name: ProbabilityTheory.Kernel.integral_deterministic'
code: theorem integral_deterministic' {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    (hf : StronglyMeasurable f) : ∫ x, f x ∂deterministic g hg a = f (g a) 
goal: ∫ (x : β), f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = f (g a)

full_name: ProbabilityTheory.Kernel.integral_deterministic
code: @[simp]
theorem integral_deterministic {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] : ∫ x, f x ∂deterministic g hg a = f (g a) 
goal: ∫ (x : β), f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = f (g a)

full_name: ProbabilityTheory.Kernel.setIntegral_deterministic'
code: theorem setIntegral_deterministic' {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    (hf : StronglyMeasurable f) {s : Set β} (hs : MeasurableSet s) [Decidable (g a ∈ s)] :
    ∫ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0 
goal: ∫ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0

full_name: ProbabilityTheory.Kernel.setIntegral_deterministic
code: @[simp]
theorem setIntegral_deterministic {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] (s : Set β) [Decidable (g a ∈ s)] :
    ∫ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0 
goal: ∫ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0

full_name: ProbabilityTheory.Kernel.const
code: /-- Constant kernel, which always returns the same measure. -/
def const (α : Type*) {β : Type*} [MeasurableSpace α] {_ : MeasurableSpace β} (μβ : Measure β) :
    Kernel α β 
goal: {x : MeasurableSpace β} → MeasureTheory.Measure β → ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.const_apply
code: @[simp]
theorem const_apply (μβ : Measure β) (a : α) : const α μβ a = μβ 
goal: (ProbabilityTheory.Kernel.const α μβ) a = μβ

full_name: ProbabilityTheory.Kernel.const_zero
code: @[simp]
lemma const_zero : const α (0 : Measure β) = 0 
goal: ProbabilityTheory.Kernel.const α 0 = 0

full_name: ProbabilityTheory.Kernel.const_add
code: lemma const_add (β : Type*) [MeasurableSpace β] (μ ν : Measure α) :
    const β (μ + ν) = const β μ + const β ν 
goal: ProbabilityTheory.Kernel.const β (μ + ν) = ProbabilityTheory.Kernel.const β μ + ProbabilityTheory.Kernel.const β ν

full_name: ProbabilityTheory.Kernel.sum_const
code: lemma sum_const [Countable ι] (μ : ι → Measure β) :
    Kernel.sum (fun n ↦ const α (μ n)) = const α (Measure.sum μ) 
goal: (ProbabilityTheory.Kernel.sum fun n => ProbabilityTheory.Kernel.const α (μ n)) =
  ProbabilityTheory.Kernel.const α (MeasureTheory.Measure.sum μ)

full_name: ProbabilityTheory.Kernel.const.instIsFiniteKernel
code: instance const.instIsFiniteKernel {μβ : Measure β} [IsFiniteMeasure μβ] :
    IsFiniteKernel (const α μβ) 
goal: ProbabilityTheory.IsFiniteKernel (ProbabilityTheory.Kernel.const α μβ)

full_name: ProbabilityTheory.Kernel.const.instIsSFiniteKernel
code: instance const.instIsSFiniteKernel {μβ : Measure β} [SFinite μβ] :
    IsSFiniteKernel (const α μβ) 
goal: ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.const α μβ)

full_name: ProbabilityTheory.Kernel.const.instIsMarkovKernel
code: instance const.instIsMarkovKernel {μβ : Measure β} [hμβ : IsProbabilityMeasure μβ] :
    IsMarkovKernel (const α μβ) 
goal: ProbabilityTheory.IsMarkovKernel (ProbabilityTheory.Kernel.const α μβ)

full_name: ProbabilityTheory.Kernel.isSFiniteKernel_const
code: lemma isSFiniteKernel_const [Nonempty α] {μβ : Measure β} :
    IsSFiniteKernel (const α μβ) ↔ SFinite μβ 
goal: ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.const α μβ) ↔ MeasureTheory.SFinite μβ

full_name: ProbabilityTheory.Kernel.lintegral_const
code: @[simp]
theorem lintegral_const {f : β → ℝ≥0∞} {μ : Measure β} {a : α} :
    ∫⁻ x, f x ∂const α μ a = ∫⁻ x, f x ∂μ 
goal: ∫⁻ (x : β), f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫⁻ (x : β), f x ∂μ

full_name: ProbabilityTheory.Kernel.setLIntegral_const
code: @[simp]
theorem setLIntegral_const {f : β → ℝ≥0∞} {μ : Measure β} {a : α} {s : Set β} :
    ∫⁻ x in s, f x ∂const α μ a = ∫⁻ x in s, f x ∂μ 
goal: ∫⁻ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫⁻ (x : β) in s, f x ∂μ

full_name: ProbabilityTheory.Kernel.integral_const
code: @[simp]
theorem integral_const {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : β → E} {μ : Measure β} {a : α} : ∫ x, f x ∂const α μ a = ∫ x, f x ∂μ 
goal: ∫ (x : β), f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫ (x : β), f x ∂μ

full_name: ProbabilityTheory.Kernel.setIntegral_const
code: @[simp]
theorem setIntegral_const {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : β → E} {μ : Measure β} {a : α} {s : Set β} :
    ∫ x in s, f x ∂const α μ a = ∫ x in s, f x ∂μ 
goal: ∫ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫ (x : β) in s, f x ∂μ

full_name: ProbabilityTheory.Kernel.ofFunOfCountable
code: /-- In a countable space with measurable singletons, every function `α → MeasureTheory.Measure β`
defines a kernel. -/
def ofFunOfCountable [MeasurableSpace α] {_ : MeasurableSpace β} [Countable α]
    [MeasurableSingletonClass α] (f : α → Measure β) : Kernel α β 
goal: {x : MeasurableSpace β} →
  [inst : Countable α] →
    [inst : MeasurableSingletonClass α] → (α → MeasureTheory.Measure β) → ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.restrict
code: /-- Kernel given by the restriction of the measures in the image of a kernel to a set. -/
protected noncomputable def restrict (κ : Kernel α β) (hs : MeasurableSet s) : Kernel α β 
goal: ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.restrict_apply
code: theorem restrict_apply (κ : Kernel α β) (hs : MeasurableSet s) (a : α) :
    κ.restrict hs a = (κ a).restrict s 
goal: (κ.restrict hs) a = (κ a).restrict s

full_name: ProbabilityTheory.Kernel.restrict_apply'
code: theorem restrict_apply' (κ : Kernel α β) (hs : MeasurableSet s) (a : α) (ht : MeasurableSet t) :
    κ.restrict hs a t = (κ a) (t ∩ s) 
goal: ((κ.restrict hs) a) t = (κ a) (t ∩ s)

full_name: ProbabilityTheory.Kernel.restrict_univ
code: @[simp]
theorem restrict_univ : κ.restrict MeasurableSet.univ = κ 
goal: κ.restrict ⋯ = κ

full_name: ProbabilityTheory.Kernel.lintegral_restrict
code: @[simp]
theorem lintegral_restrict (κ : Kernel α β) (hs : MeasurableSet s) (a : α) (f : β → ℝ≥0∞) :
    ∫⁻ b, f b ∂κ.restrict hs a = ∫⁻ b in s, f b ∂κ a 
goal: ∫⁻ (b : β), f b ∂(κ.restrict hs) a = ∫⁻ (b : β) in s, f b ∂κ a

full_name: ProbabilityTheory.Kernel.setLIntegral_restrict
code: @[simp]
theorem setLIntegral_restrict (κ : Kernel α β) (hs : MeasurableSet s) (a : α) (f : β → ℝ≥0∞)
    (t : Set β) : ∫⁻ b in t, f b ∂κ.restrict hs a = ∫⁻ b in t ∩ s, f b ∂κ a 
goal: ∫⁻ (b : β) in t, f b ∂(κ.restrict hs) a = ∫⁻ (b : β) in t ∩ s, f b ∂κ a

full_name: ProbabilityTheory.Kernel.setIntegral_restrict
code: @[simp]
theorem setIntegral_restrict {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : β → E} {a : α} (hs : MeasurableSet s) (t : Set β) :
    ∫ x in t, f x ∂κ.restrict hs a = ∫ x in t ∩ s, f x ∂κ a 
goal: ∫ (x : β) in t, f x ∂(κ.restrict hs) a = ∫ (x : β) in t ∩ s, f x ∂κ a

full_name: ProbabilityTheory.Kernel.IsFiniteKernel.restrict
code: instance IsFiniteKernel.restrict (κ : Kernel α β) [IsFiniteKernel κ] (hs : MeasurableSet s) :
    IsFiniteKernel (κ.restrict hs) 
goal: ProbabilityTheory.IsFiniteKernel (κ.restrict hs)

full_name: ProbabilityTheory.Kernel.IsSFiniteKernel.restrict
code: instance IsSFiniteKernel.restrict (κ : Kernel α β) [IsSFiniteKernel κ] (hs : MeasurableSet s) :
    IsSFiniteKernel (κ.restrict hs) 
goal: ProbabilityTheory.IsSFiniteKernel (κ.restrict hs)

full_name: ProbabilityTheory.Kernel.comapRight
code: /-- Kernel with value `(κ a).comap f`, for a measurable embedding `f`. That is, for a measurable set
`t : Set β`, `ProbabilityTheory.Kernel.comapRight κ hf a t = κ a (f '' t)`. -/
noncomputable def comapRight (κ : Kernel α β) (hf : MeasurableEmbedding f) : Kernel α γ 
goal: ProbabilityTheory.Kernel α γ

full_name: ProbabilityTheory.Kernel.comapRight_apply
code: theorem comapRight_apply (κ : Kernel α β) (hf : MeasurableEmbedding f) (a : α) :
    comapRight κ hf a = Measure.comap f (κ a) 
goal: (κ.comapRight hf) a = MeasureTheory.Measure.comap f (κ a)

full_name: ProbabilityTheory.Kernel.comapRight_apply'
code: theorem comapRight_apply' (κ : Kernel α β) (hf : MeasurableEmbedding f) (a : α) {t : Set γ}
    (ht : MeasurableSet t) : comapRight κ hf a t = κ a (f '' t) 
goal: ((κ.comapRight hf) a) t = (κ a) (f '' t)

full_name: ProbabilityTheory.Kernel.comapRight_id
code: @[simp]
lemma comapRight_id (κ : Kernel α β) : comapRight κ MeasurableEmbedding.id = κ 
goal: κ.comapRight ⋯ = κ

full_name: ProbabilityTheory.Kernel.IsMarkovKernel.comapRight
code: theorem IsMarkovKernel.comapRight (κ : Kernel α β) (hf : MeasurableEmbedding f)
    (hκ : ∀ a, κ a (Set.range f) = 1) : IsMarkovKernel (comapRight κ hf) 
goal: ProbabilityTheory.IsMarkovKernel (κ.comapRight hf)

full_name: ProbabilityTheory.Kernel.IsFiniteKernel.comapRight
code: instance IsFiniteKernel.comapRight (κ : Kernel α β) [IsFiniteKernel κ]
    (hf : MeasurableEmbedding f) : IsFiniteKernel (comapRight κ hf) 
goal: ProbabilityTheory.IsFiniteKernel (κ.comapRight hf)

full_name: ProbabilityTheory.Kernel.IsSFiniteKernel.comapRight
code: protected instance IsSFiniteKernel.comapRight (κ : Kernel α β) [IsSFiniteKernel κ]
    (hf : MeasurableEmbedding f) : IsSFiniteKernel (comapRight κ hf) 
goal: ProbabilityTheory.IsSFiniteKernel (κ.comapRight hf)

full_name: ProbabilityTheory.Kernel.piecewise
code: /-- `ProbabilityTheory.Kernel.piecewise hs κ η` is the kernel equal to `κ` on the measurable set `s`
and to `η` on its complement. -/
def piecewise (hs : MeasurableSet s) (κ η : Kernel α β) : Kernel α β 
goal: ProbabilityTheory.Kernel α β

full_name: ProbabilityTheory.Kernel.piecewise_apply
code: theorem piecewise_apply (a : α) : piecewise hs κ η a = if a ∈ s then κ a else η a 
goal: (ProbabilityTheory.Kernel.piecewise hs κ η) a = if a ∈ s then κ a else η a

full_name: ProbabilityTheory.Kernel.piecewise_apply'
code: theorem piecewise_apply' (a : α) (t : Set β) :
    piecewise hs κ η a t = if a ∈ s then κ a t else η a t 
goal: ((ProbabilityTheory.Kernel.piecewise hs κ η) a) t = if a ∈ s then (κ a) t else (η a) t

full_name: ProbabilityTheory.Kernel.IsMarkovKernel.piecewise
code: instance IsMarkovKernel.piecewise [IsMarkovKernel κ] [IsMarkovKernel η] :
    IsMarkovKernel (piecewise hs κ η) 
goal: ProbabilityTheory.IsMarkovKernel (ProbabilityTheory.Kernel.piecewise hs κ η)

full_name: ProbabilityTheory.Kernel.IsFiniteKernel.piecewise
code: instance IsFiniteKernel.piecewise [IsFiniteKernel κ] [IsFiniteKernel η] :
    IsFiniteKernel (piecewise hs κ η) 
goal: ProbabilityTheory.IsFiniteKernel (ProbabilityTheory.Kernel.piecewise hs κ η)

full_name: ProbabilityTheory.Kernel.IsSFiniteKernel.piecewise
code: protected instance IsSFiniteKernel.piecewise [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    IsSFiniteKernel (piecewise hs κ η) 
goal: ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.piecewise hs κ η)

full_name: ProbabilityTheory.Kernel.lintegral_piecewise
code: theorem lintegral_piecewise (a : α) (g : β → ℝ≥0∞) :
    ∫⁻ b, g b ∂piecewise hs κ η a = if a ∈ s then ∫⁻ b, g b ∂κ a else ∫⁻ b, g b ∂η a 
goal: ∫⁻ (b : β), g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫⁻ (b : β), g b ∂κ a else ∫⁻ (b : β), g b ∂η a

full_name: ProbabilityTheory.Kernel.setLIntegral_piecewise
code: theorem setLIntegral_piecewise (a : α) (g : β → ℝ≥0∞) (t : Set β) :
    ∫⁻ b in t, g b ∂piecewise hs κ η a =
      if a ∈ s then ∫⁻ b in t, g b ∂κ a else ∫⁻ b in t, g b ∂η a 
goal: ∫⁻ (b : β) in t, g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫⁻ (b : β) in t, g b ∂κ a else ∫⁻ (b : β) in t, g b ∂η a

full_name: ProbabilityTheory.Kernel.integral_piecewise
code: theorem integral_piecewise {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (a : α) (g : β → E) :
    ∫ b, g b ∂piecewise hs κ η a = if a ∈ s then ∫ b, g b ∂κ a else ∫ b, g b ∂η a 
goal: ∫ (b : β), g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫ (b : β), g b ∂κ a else ∫ (b : β), g b ∂η a

full_name: ProbabilityTheory.Kernel.setIntegral_piecewise
code: theorem setIntegral_piecewise {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (a : α) (g : β → E) (t : Set β) :
    ∫ b in t, g b ∂piecewise hs κ η a =
      if a ∈ s then ∫ b in t, g b ∂κ a else ∫ b in t, g b ∂η a 
goal: ∫ (b : β) in t, g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫ (b : β) in t, g b ∂κ a else ∫ (b : β) in t, g b ∂η a