File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

full_name: MeasureTheory.SimpleFunc.finite_range'
code: /-- A function `f` from a measurable space to any type is called *simple*,
if every preimage `f ⁻¹' {x}` is measurable, and the range is finite. This structure bundles
a function with these properties. -/
structure SimpleFunc.{u, v} (α : Type u) [MeasurableSpace α] (β : Type v) where
  toFun : α → β
  measurableSet_fiber' : ∀ x, MeasurableSet (toFun ⁻¹' {x})
  finite_range' : (Set.range toFun).Finite
goal: (Set.range ↑self).Finite

full_name: MeasureTheory.SimpleFunc.toFun
code: /-- A function `f` from a measurable space to any type is called *simple*,
if every preimage `f ⁻¹' {x}` is measurable, and the range is finite. This structure bundles
a function with these properties. -/
structure SimpleFunc.{u, v} (α : Type u) [MeasurableSpace α] (β : Type v) where
  toFun : α → β
  measurableSet_fiber' : ∀ x, MeasurableSet (toFun ⁻¹' {x})
  finite_range' : (Set.range toFun).Finite
goal: α → β

full_name: MeasureTheory.SimpleFunc.measurableSet_fiber'
code: /-- A function `f` from a measurable space to any type is called *simple*,
if every preimage `f ⁻¹' {x}` is measurable, and the range is finite. This structure bundles
a function with these properties. -/
structure SimpleFunc.{u, v} (α : Type u) [MeasurableSpace α] (β : Type v) where
  toFun : α → β
  measurableSet_fiber' : ∀ x, MeasurableSet (toFun ⁻¹' {x})
  finite_range' : (Set.range toFun).Finite
goal: MeasurableSet (↑self ⁻¹' {x})

full_name: MeasureTheory.«_aux_Mathlib_MeasureTheory_Function_SimpleFunc___macroRules_MeasureTheory_term_→ₛ__1»
code: local infixr:25 " →ₛ " => SimpleFunc
goal: Lean.Macro

full_name: MeasureTheory._aux_Mathlib_MeasureTheory_Function_SimpleFunc___unexpand_MeasureTheory_SimpleFunc_1
code: local infixr:25 " →ₛ " => SimpleFunc
goal: Lean.PrettyPrinter.Unexpander

full_name: MeasureTheory.SimpleFunc.instCoeFun
code: instance instCoeFun : CoeFun (α →ₛ β) fun _ => α → β 
goal: CoeFun (MeasureTheory.SimpleFunc α β) fun x => α → β

full_name: MeasureTheory.SimpleFunc.coe_injective
code: theorem coe_injective ⦃f g : α →ₛ β⦄ (H : (f : α → β) = g) : f = g 
goal: f = g

full_name: MeasureTheory.SimpleFunc.ext
code: @[ext]
theorem ext {f g : α →ₛ β} (H : ∀ a, f a = g a) : f = g 
goal: f = g

full_name: MeasureTheory.SimpleFunc.finite_range
code: theorem finite_range (f : α →ₛ β) : (Set.range f).Finite 
goal: (Set.range ↑f).Finite

full_name: MeasureTheory.SimpleFunc.measurableSet_fiber
code: theorem measurableSet_fiber (f : α →ₛ β) (x : β) : MeasurableSet (f ⁻¹' {x}) 
goal: MeasurableSet (↑f ⁻¹' {x})

full_name: MeasureTheory.SimpleFunc.apply_mk
code: theorem apply_mk (f : α → β) (h h') (x : α) : SimpleFunc.mk f h h' x = f x 
goal: ↑{ toFun := f, measurableSet_fiber' := h, finite_range' := h' } x = f x

full_name: MeasureTheory.SimpleFunc.ofFinite
code: /-- Simple function defined on a finite type. -/
def ofFinite [Finite α] [MeasurableSingletonClass α] (f : α → β) : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.ofIsEmpty
code: /-- Simple function defined on the empty type. -/
def ofIsEmpty [IsEmpty α] : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.range
code: /-- Range of a simple function `α →ₛ β` as a `Finset β`. -/
protected def range (f : α →ₛ β) : Finset β 
goal: Finset β

full_name: MeasureTheory.SimpleFunc.mem_range
code: @[simp]
theorem mem_range {f : α →ₛ β} {b} : b ∈ f.range ↔ b ∈ range f 
goal: b ∈ f.range ↔ b ∈ Set.range ↑f

full_name: MeasureTheory.SimpleFunc.mem_range_self
code: theorem mem_range_self (f : α →ₛ β) (x : α) : f x ∈ f.range 
goal: ↑f x ∈ f.range

full_name: MeasureTheory.SimpleFunc.coe_range
code: @[simp]
theorem coe_range (f : α →ₛ β) : (↑f.range : Set β) = Set.range f 
goal: ↑f.range = Set.range ↑f

full_name: MeasureTheory.SimpleFunc.mem_range_of_measure_ne_zero
code: theorem mem_range_of_measure_ne_zero {f : α →ₛ β} {x : β} {μ : Measure α} (H : μ (f ⁻¹' {x}) ≠ 0) :
    x ∈ f.range 
goal: x ∈ f.range

full_name: MeasureTheory.SimpleFunc.forall_mem_range
code: theorem forall_mem_range {f : α →ₛ β} {p : β → Prop} : (∀ y ∈ f.range, p y) ↔ ∀ x, p (f x) 
goal: (∀ y ∈ f.range, p y) ↔ ∀ (x : α), p (↑f x)

full_name: MeasureTheory.SimpleFunc.exists_range_iff
code: theorem exists_range_iff {f : α →ₛ β} {p : β → Prop} : (∃ y ∈ f.range, p y) ↔ ∃ x, p (f x) 
goal: (∃ y ∈ f.range, p y) ↔ ∃ x, p (↑f x)

full_name: MeasureTheory.SimpleFunc.preimage_eq_empty_iff
code: theorem preimage_eq_empty_iff (f : α →ₛ β) (b : β) : f ⁻¹' {b} = ∅ ↔ b ∉ f.range 
goal: ↑f ⁻¹' {b} = ∅ ↔ b ∉ f.range

full_name: MeasureTheory.SimpleFunc.exists_forall_le
code: theorem exists_forall_le [Nonempty β] [Preorder β] [IsDirected β (· ≤ ·)] (f : α →ₛ β) :
    ∃ C, ∀ x, f x ≤ C 
goal: ∃ C, ∀ (x : α), ↑f x ≤ C

full_name: MeasureTheory.SimpleFunc.const
code: /-- Constant function as a `SimpleFunc`. -/
def const (α) {β} [MeasurableSpace α] (b : β) : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.instInhabited
code: instance instInhabited [Inhabited β] : Inhabited (α →ₛ β) 
goal: Inhabited (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.const_apply
code: theorem const_apply (a : α) (b : β) : (const α b) a = b 
goal: ↑(MeasureTheory.SimpleFunc.const α b) a = b

full_name: MeasureTheory.SimpleFunc.coe_const
code: @[simp]
theorem coe_const (b : β) : ⇑(const α b) = Function.const α b 
goal: ↑(MeasureTheory.SimpleFunc.const α b) = Function.const α b

full_name: MeasureTheory.SimpleFunc.range_const
code: @[simp]
theorem range_const (α) [MeasurableSpace α] [Nonempty α] (b : β) : (const α b).range = {b} 
goal: (MeasureTheory.SimpleFunc.const α b).range = {b}

full_name: MeasureTheory.SimpleFunc.range_const_subset
code: theorem range_const_subset (α) [MeasurableSpace α] (b : β) : (const α b).range ⊆ {b} 
goal: (MeasureTheory.SimpleFunc.const α b).range ⊆ {b}

full_name: MeasureTheory.SimpleFunc.simpleFunc_bot
code: theorem simpleFunc_bot {α} (f : @SimpleFunc α ⊥ β) [Nonempty β] : ∃ c, ∀ x, f x = c 
goal: ∃ c, ∀ (x : α), ↑f x = c

full_name: MeasureTheory.SimpleFunc.simpleFunc_bot'
code: theorem simpleFunc_bot' {α} [Nonempty β] (f : @SimpleFunc α ⊥ β) :
    ∃ c, f = @SimpleFunc.const α _ ⊥ c 
goal: ∃ c, f = MeasureTheory.SimpleFunc.const α c

full_name: MeasureTheory.SimpleFunc.measurableSet_cut
code: theorem measurableSet_cut (r : α → β → Prop) (f : α →ₛ β) (h : ∀ b, MeasurableSet { a | r a b }) :
    MeasurableSet { a | r a (f a) } 
goal: MeasurableSet {a | r a (↑f a)}

full_name: MeasureTheory.SimpleFunc.measurableSet_preimage
code: @[measurability]
theorem measurableSet_preimage (f : α →ₛ β) (s) : MeasurableSet (f ⁻¹' s) 
goal: MeasurableSet (↑f ⁻¹' s)

full_name: MeasureTheory.SimpleFunc.measurable
code: /-- A simple function is measurable -/
@[measurability]
protected theorem measurable [MeasurableSpace β] (f : α →ₛ β) : Measurable f 
goal: Measurable ↑f

full_name: MeasureTheory.SimpleFunc.aemeasurable
code: @[measurability]
protected theorem aemeasurable [MeasurableSpace β] {μ : Measure α} (f : α →ₛ β) :
    AEMeasurable f μ 
goal: AEMeasurable (↑f) μ

full_name: MeasureTheory.SimpleFunc.sum_measure_preimage_singleton
code: protected theorem sum_measure_preimage_singleton (f : α →ₛ β) {μ : Measure α} (s : Finset β) :
    (∑ y ∈ s, μ (f ⁻¹' {y})) = μ (f ⁻¹' ↑s) 
goal: ∑ y ∈ s, μ (↑f ⁻¹' {y}) = μ (↑f ⁻¹' ↑s)

full_name: MeasureTheory.SimpleFunc.sum_range_measure_preimage_singleton
code: theorem sum_range_measure_preimage_singleton (f : α →ₛ β) (μ : Measure α) :
    (∑ y ∈ f.range, μ (f ⁻¹' {y})) = μ univ 
goal: ∑ y ∈ f.range, μ (↑f ⁻¹' {y}) = μ Set.univ

full_name: MeasureTheory.SimpleFunc.piecewise
code: /-- If-then-else as a `SimpleFunc`. -/
def piecewise (s : Set α) (hs : MeasurableSet s) (f g : α →ₛ β) : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.coe_piecewise
code: @[simp]
theorem coe_piecewise {s : Set α} (hs : MeasurableSet s) (f g : α →ₛ β) :
    ⇑(piecewise s hs f g) = s.piecewise f g 
goal: ↑(MeasureTheory.SimpleFunc.piecewise s hs f g) = s.piecewise ↑f ↑g

full_name: MeasureTheory.SimpleFunc.piecewise_apply
code: theorem piecewise_apply {s : Set α} (hs : MeasurableSet s) (f g : α →ₛ β) (a) :
    piecewise s hs f g a = if a ∈ s then f a else g a 
goal: ↑(MeasureTheory.SimpleFunc.piecewise s hs f g) a = if a ∈ s then ↑f a else ↑g a

full_name: MeasureTheory.SimpleFunc.piecewise_compl
code: @[simp]
theorem piecewise_compl {s : Set α} (hs : MeasurableSet sᶜ) (f g : α →ₛ β) :
    piecewise sᶜ hs f g = piecewise s hs.of_compl g f 
goal: MeasureTheory.SimpleFunc.piecewise sᶜ hs f g = MeasureTheory.SimpleFunc.piecewise s ⋯ g f

full_name: MeasureTheory.SimpleFunc.piecewise_univ
code: @[simp]
theorem piecewise_univ (f g : α →ₛ β) : piecewise univ MeasurableSet.univ f g = f 
goal: MeasureTheory.SimpleFunc.piecewise Set.univ ⋯ f g = f

full_name: MeasureTheory.SimpleFunc.piecewise_empty
code: @[simp]
theorem piecewise_empty (f g : α →ₛ β) : piecewise ∅ MeasurableSet.empty f g = g 
goal: MeasureTheory.SimpleFunc.piecewise ∅ ⋯ f g = g

full_name: MeasureTheory.SimpleFunc.piecewise_same
code: @[simp]
theorem piecewise_same (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) :
    piecewise s hs f f = f 
goal: MeasureTheory.SimpleFunc.piecewise s hs f f = f

full_name: MeasureTheory.SimpleFunc.support_indicator
code: theorem support_indicator [Zero β] {s : Set α} (hs : MeasurableSet s) (f : α →ₛ β) :
    Function.support (f.piecewise s hs (SimpleFunc.const α 0)) = s ∩ Function.support f 
goal: Function.support ↑(MeasureTheory.SimpleFunc.piecewise s hs f (MeasureTheory.SimpleFunc.const α 0)) =
  s ∩ Function.support ↑f

full_name: MeasureTheory.SimpleFunc.range_indicator
code: theorem range_indicator {s : Set α} (hs : MeasurableSet s) (hs_nonempty : s.Nonempty)
    (hs_ne_univ : s ≠ univ) (x y : β) :
    (piecewise s hs (const α x) (const α y)).range = {x, y} 
goal: (MeasureTheory.SimpleFunc.piecewise s hs (MeasureTheory.SimpleFunc.const α x)
      (MeasureTheory.SimpleFunc.const α y)).range =
  {x, y}

full_name: MeasureTheory.SimpleFunc.measurable_bind
code: theorem measurable_bind [MeasurableSpace γ] (f : α →ₛ β) (g : β → α → γ)
    (hg : ∀ b, Measurable (g b)) : Measurable fun a => g (f a) a 
goal: Measurable fun a => g (↑f a) a

full_name: MeasureTheory.SimpleFunc.bind
code: /-- If `f : α →ₛ β` is a simple function and `g : β → α →ₛ γ` is a family of simple functions,
then `f.bind g` binds the first argument of `g` to `f`. In other words, `f.bind g a = g (f a) a`. -/
def bind (f : α →ₛ β) (g : β → α →ₛ γ) : α →ₛ γ 
goal: MeasureTheory.SimpleFunc α γ

full_name: MeasureTheory.SimpleFunc.bind_apply
code: @[simp]
theorem bind_apply (f : α →ₛ β) (g : β → α →ₛ γ) (a) : f.bind g a = g (f a) a 
goal: ↑(f.bind g) a = ↑(g (↑f a)) a

full_name: MeasureTheory.SimpleFunc.map
code: /-- Given a function `g : β → γ` and a simple function `f : α →ₛ β`, `f.map g` return the simple
    function `g ∘ f : α →ₛ γ` -/
def map (g : β → γ) (f : α →ₛ β) : α →ₛ γ 
goal: MeasureTheory.SimpleFunc α γ

full_name: MeasureTheory.SimpleFunc.map_apply
code: theorem map_apply (g : β → γ) (f : α →ₛ β) (a) : f.map g a = g (f a) 
goal: ↑(MeasureTheory.SimpleFunc.map g f) a = g (↑f a)

full_name: MeasureTheory.SimpleFunc.map_map
code: theorem map_map (g : β → γ) (h : γ → δ) (f : α →ₛ β) : (f.map g).map h = f.map (h ∘ g) 
goal: MeasureTheory.SimpleFunc.map h (MeasureTheory.SimpleFunc.map g f) = MeasureTheory.SimpleFunc.map (h ∘ g) f

full_name: MeasureTheory.SimpleFunc.coe_map
code: @[simp]
theorem coe_map (g : β → γ) (f : α →ₛ β) : (f.map g : α → γ) = g ∘ f 
goal: ↑(MeasureTheory.SimpleFunc.map g f) = g ∘ ↑f

full_name: MeasureTheory.SimpleFunc.range_map
code: @[simp]
theorem range_map [DecidableEq γ] (g : β → γ) (f : α →ₛ β) : (f.map g).range = f.range.image g 
goal: (MeasureTheory.SimpleFunc.map g f).range = Finset.image g f.range

full_name: MeasureTheory.SimpleFunc.map_const
code: @[simp]
theorem map_const (g : β → γ) (b : β) : (const α b).map g = const α (g b) 
goal: MeasureTheory.SimpleFunc.map g (MeasureTheory.SimpleFunc.const α b) = MeasureTheory.SimpleFunc.const α (g b)

full_name: MeasureTheory.SimpleFunc.map_preimage
code: theorem map_preimage (f : α →ₛ β) (g : β → γ) (s : Set γ) :
    f.map g ⁻¹' s = f ⁻¹' ↑(f.range.filter fun b => g b ∈ s) 
goal: ↑(MeasureTheory.SimpleFunc.map g f) ⁻¹' s = ↑f ⁻¹' ↑(Finset.filter (fun b => g b ∈ s) f.range)

full_name: MeasureTheory.SimpleFunc.map_preimage_singleton
code: theorem map_preimage_singleton (f : α →ₛ β) (g : β → γ) (c : γ) :
    f.map g ⁻¹' {c} = f ⁻¹' ↑(f.range.filter fun b => g b = c) 
goal: ↑(MeasureTheory.SimpleFunc.map g f) ⁻¹' {c} = ↑f ⁻¹' ↑(Finset.filter (fun b => g b = c) f.range)

full_name: MeasureTheory.SimpleFunc.comp
code: /-- Composition of a `SimpleFun` and a measurable function is a `SimpleFunc`. -/
def comp [MeasurableSpace β] (f : β →ₛ γ) (g : α → β) (hgm : Measurable g) : α →ₛ γ 
goal: MeasureTheory.SimpleFunc α γ

full_name: MeasureTheory.SimpleFunc.coe_comp
code: @[simp]
theorem coe_comp [MeasurableSpace β] (f : β →ₛ γ) {g : α → β} (hgm : Measurable g) :
    ⇑(f.comp g hgm) = f ∘ g 
goal: ↑(f.comp g hgm) = ↑f ∘ g

full_name: MeasureTheory.SimpleFunc.range_comp_subset_range
code: theorem range_comp_subset_range [MeasurableSpace β] (f : β →ₛ γ) {g : α → β} (hgm : Measurable g) :
    (f.comp g hgm).range ⊆ f.range 
goal: (f.comp g hgm).range ⊆ f.range

full_name: MeasureTheory.SimpleFunc.extend
code: /-- Extend a `SimpleFunc` along a measurable embedding: `f₁.extend g hg f₂` is the function
`F : β →ₛ γ` such that `F ∘ g = f₁` and `F y = f₂ y` whenever `y ∉ range g`. -/
def extend [MeasurableSpace β] (f₁ : α →ₛ γ) (g : α → β) (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) : β →ₛ γ 
goal: MeasureTheory.SimpleFunc β γ

full_name: MeasureTheory.SimpleFunc.extend_apply
code: @[simp]
theorem extend_apply [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) (x : α) : (f₁.extend g hg f₂) (g x) = f₁ x 
goal: ↑(f₁.extend g hg f₂) (g x) = ↑f₁ x

full_name: MeasureTheory.SimpleFunc.extend_apply'
code: @[simp]
theorem extend_apply' [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) {y : β} (h : ¬∃ x, g x = y) : (f₁.extend g hg f₂) y = f₂ y 
goal: ↑(f₁.extend g hg f₂) y = ↑f₂ y

full_name: MeasureTheory.SimpleFunc.extend_comp_eq'
code: @[simp]
theorem extend_comp_eq' [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) : f₁.extend g hg f₂ ∘ g = f₁ 
goal: ↑(f₁.extend g hg f₂) ∘ g = ↑f₁

full_name: MeasureTheory.SimpleFunc.extend_comp_eq
code: @[simp]
theorem extend_comp_eq [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) : (f₁.extend g hg f₂).comp g hg.measurable = f₁ 
goal: (f₁.extend g hg f₂).comp g ⋯ = f₁

full_name: MeasureTheory.SimpleFunc.seq
code: /-- If `f` is a simple function taking values in `β → γ` and `g` is another simple function
with the same domain and codomain `β`, then `f.seq g = f a (g a)`. -/
def seq (f : α →ₛ β → γ) (g : α →ₛ β) : α →ₛ γ 
goal: MeasureTheory.SimpleFunc α γ

full_name: MeasureTheory.SimpleFunc.seq_apply
code: @[simp]
theorem seq_apply (f : α →ₛ β → γ) (g : α →ₛ β) (a : α) : f.seq g a = f a (g a) 
goal: ↑(f.seq g) a = ↑f a (↑g a)

full_name: MeasureTheory.SimpleFunc.pair
code: /-- Combine two simple functions `f : α →ₛ β` and `g : α →ₛ β`
into `fun a => (f a, g a)`. -/
def pair (f : α →ₛ β) (g : α →ₛ γ) : α →ₛ β × γ 
goal: MeasureTheory.SimpleFunc α (β × γ)

full_name: MeasureTheory.SimpleFunc.pair_apply
code: @[simp]
theorem pair_apply (f : α →ₛ β) (g : α →ₛ γ) (a) : pair f g a = (f a, g a) 
goal: ↑(f.pair g) a = (↑f a, ↑g a)

full_name: MeasureTheory.SimpleFunc.pair_preimage
code: theorem pair_preimage (f : α →ₛ β) (g : α →ₛ γ) (s : Set β) (t : Set γ) :
    pair f g ⁻¹' s ×ˢ t = f ⁻¹' s ∩ g ⁻¹' t 
goal: ↑(f.pair g) ⁻¹' s ×ˢ t = ↑f ⁻¹' s ∩ ↑g ⁻¹' t

full_name: MeasureTheory.SimpleFunc.pair_preimage_singleton
code: theorem pair_preimage_singleton (f : α →ₛ β) (g : α →ₛ γ) (b : β) (c : γ) :
    pair f g ⁻¹' {(b, c)} = f ⁻¹' {b} ∩ g ⁻¹' {c} 
goal: ↑(f.pair g) ⁻¹' {(b, c)} = ↑f ⁻¹' {b} ∩ ↑g ⁻¹' {c}

full_name: MeasureTheory.SimpleFunc.bind_const
code: theorem bind_const (f : α →ₛ β) : f.bind (const α) = f 
goal: f.bind (MeasureTheory.SimpleFunc.const α) = f

full_name: MeasureTheory.SimpleFunc.instZero
code: @[to_additive]
instance instOne [One β] : One (α →ₛ β) 
goal: Zero (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instOne
code: @[to_additive]
instance instOne [One β] : One (α →ₛ β) 
goal: One (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instMul
code: @[to_additive]
instance instMul [Mul β] : Mul (α →ₛ β) 
goal: Mul (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instAdd
code: @[to_additive]
instance instMul [Mul β] : Mul (α →ₛ β) 
goal: Add (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instDiv
code: @[to_additive]
instance instDiv [Div β] : Div (α →ₛ β) 
goal: Div (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instSub
code: @[to_additive]
instance instDiv [Div β] : Div (α →ₛ β) 
goal: Sub (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instNeg
code: @[to_additive]
instance instInv [Inv β] : Inv (α →ₛ β) 
goal: Neg (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instInv
code: @[to_additive]
instance instInv [Inv β] : Inv (α →ₛ β) 
goal: Inv (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instSup
code: instance instSup [Sup β] : Sup (α →ₛ β) 
goal: Sup (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instInf
code: instance instInf [Inf β] : Inf (α →ₛ β) 
goal: Inf (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instLE
code: instance instLE [LE β] : LE (α →ₛ β) 
goal: LE (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.const_zero
code: @[to_additive (attr := simp)]
theorem const_one [One β] : const α (1 : β) = 1 
goal: MeasureTheory.SimpleFunc.const α 0 = 0

full_name: MeasureTheory.SimpleFunc.const_one
code: @[to_additive (attr := simp)]
theorem const_one [One β] : const α (1 : β) = 1 
goal: MeasureTheory.SimpleFunc.const α 1 = 1

full_name: MeasureTheory.SimpleFunc.coe_one
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_one [One β] : ⇑(1 : α →ₛ β) = 1 
goal: ↑1 = 1

full_name: MeasureTheory.SimpleFunc.coe_zero
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_one [One β] : ⇑(1 : α →ₛ β) = 1 
goal: ↑0 = 0

full_name: MeasureTheory.SimpleFunc.coe_mul
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_mul [Mul β] (f g : α →ₛ β) : ⇑(f * g) = ⇑f * ⇑g 
goal: ↑(f * g) = ↑f * ↑g

full_name: MeasureTheory.SimpleFunc.coe_add
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_mul [Mul β] (f g : α →ₛ β) : ⇑(f * g) = ⇑f * ⇑g 
goal: ↑(f + g) = ↑f + ↑g

full_name: MeasureTheory.SimpleFunc.coe_neg
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv β] (f : α →ₛ β) : ⇑(f⁻¹) = (⇑f)⁻¹ 
goal: ↑(-f) = -↑f

full_name: MeasureTheory.SimpleFunc.coe_inv
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv β] (f : α →ₛ β) : ⇑(f⁻¹) = (⇑f)⁻¹ 
goal: ↑f⁻¹ = (↑f)⁻¹

full_name: MeasureTheory.SimpleFunc.coe_div
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_div [Div β] (f g : α →ₛ β) : ⇑(f / g) = ⇑f / ⇑g 
goal: ↑(f / g) = ↑f / ↑g

full_name: MeasureTheory.SimpleFunc.coe_sub
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_div [Div β] (f g : α →ₛ β) : ⇑(f / g) = ⇑f / ⇑g 
goal: ↑(f - g) = ↑f - ↑g

full_name: MeasureTheory.SimpleFunc.coe_le
code: @[simp, norm_cast]
theorem coe_le [Preorder β] {f g : α →ₛ β} : (f : α → β) ≤ g ↔ f ≤ g 
goal: ↑f ≤ ↑g ↔ f ≤ g

full_name: MeasureTheory.SimpleFunc.coe_sup
code: @[simp, norm_cast]
theorem coe_sup [Sup β] (f g : α →ₛ β) : ⇑(f ⊔ g) = ⇑f ⊔ ⇑g 
goal: ↑(f ⊔ g) = ↑f ⊔ ↑g

full_name: MeasureTheory.SimpleFunc.coe_inf
code: @[simp, norm_cast]
theorem coe_inf [Inf β] (f g : α →ₛ β) : ⇑(f ⊓ g) = ⇑f ⊓ ⇑g 
goal: ↑(f ⊓ g) = ↑f ⊓ ↑g

full_name: MeasureTheory.SimpleFunc.add_apply
code: @[to_additive]
theorem mul_apply [Mul β] (f g : α →ₛ β) (a : α) : (f * g) a = f a * g a 
goal: ↑(f + g) a = ↑f a + ↑g a

full_name: MeasureTheory.SimpleFunc.mul_apply
code: @[to_additive]
theorem mul_apply [Mul β] (f g : α →ₛ β) (a : α) : (f * g) a = f a * g a 
goal: ↑(f * g) a = ↑f a * ↑g a

full_name: MeasureTheory.SimpleFunc.sub_apply
code: @[to_additive]
theorem div_apply [Div β] (f g : α →ₛ β) (x : α) : (f / g) x = f x / g x 
goal: ↑(f - g) x = ↑f x - ↑g x

full_name: MeasureTheory.SimpleFunc.div_apply
code: @[to_additive]
theorem div_apply [Div β] (f g : α →ₛ β) (x : α) : (f / g) x = f x / g x 
goal: ↑(f / g) x = ↑f x / ↑g x

full_name: MeasureTheory.SimpleFunc.inv_apply
code: @[to_additive]
theorem inv_apply [Inv β] (f : α →ₛ β) (x : α) : f⁻¹ x = (f x)⁻¹ 
goal: ↑f⁻¹ x = (↑f x)⁻¹

full_name: MeasureTheory.SimpleFunc.neg_apply
code: @[to_additive]
theorem inv_apply [Inv β] (f : α →ₛ β) (x : α) : f⁻¹ x = (f x)⁻¹ 
goal: ↑(-f) x = -↑f x

full_name: MeasureTheory.SimpleFunc.sup_apply
code: theorem sup_apply [Sup β] (f g : α →ₛ β) (a : α) : (f ⊔ g) a = f a ⊔ g a 
goal: ↑(f ⊔ g) a = ↑f a ⊔ ↑g a

full_name: MeasureTheory.SimpleFunc.inf_apply
code: theorem inf_apply [Inf β] (f g : α →ₛ β) (a : α) : (f ⊓ g) a = f a ⊓ g a 
goal: ↑(f ⊓ g) a = ↑f a ⊓ ↑g a

full_name: MeasureTheory.SimpleFunc.range_zero
code: @[to_additive (attr := simp)]
theorem range_one [Nonempty α] [One β] : (1 : α →ₛ β).range = {1} 
goal: MeasureTheory.SimpleFunc.range 0 = {0}

full_name: MeasureTheory.SimpleFunc.range_one
code: @[to_additive (attr := simp)]
theorem range_one [Nonempty α] [One β] : (1 : α →ₛ β).range = {1} 
goal: MeasureTheory.SimpleFunc.range 1 = {1}

full_name: MeasureTheory.SimpleFunc.range_eq_empty_of_isEmpty
code: @[simp]
theorem range_eq_empty_of_isEmpty {β} [hα : IsEmpty α] (f : α →ₛ β) : f.range = ∅ 
goal: f.range = ∅

full_name: MeasureTheory.SimpleFunc.eq_zero_of_mem_range_zero
code: theorem eq_zero_of_mem_range_zero [Zero β] : ∀ {y : β}, y ∈ (0 : α →ₛ β).range → y = 0 
goal: y ∈ MeasureTheory.SimpleFunc.range 0 → y = 0

full_name: MeasureTheory.SimpleFunc.add_eq_map₂
code: @[to_additive]
theorem mul_eq_map₂ [Mul β] (f g : α →ₛ β) : f * g = (pair f g).map fun p : β × β => p.1 * p.2 
goal: f + g = MeasureTheory.SimpleFunc.map (fun p => p.1 + p.2) (f.pair g)

full_name: MeasureTheory.SimpleFunc.mul_eq_map₂
code: @[to_additive]
theorem mul_eq_map₂ [Mul β] (f g : α →ₛ β) : f * g = (pair f g).map fun p : β × β => p.1 * p.2 
goal: f * g = MeasureTheory.SimpleFunc.map (fun p => p.1 * p.2) (f.pair g)

full_name: MeasureTheory.SimpleFunc.sup_eq_map₂
code: theorem sup_eq_map₂ [Sup β] (f g : α →ₛ β) : f ⊔ g = (pair f g).map fun p : β × β => p.1 ⊔ p.2 
goal: f ⊔ g = MeasureTheory.SimpleFunc.map (fun p => p.1 ⊔ p.2) (f.pair g)

full_name: MeasureTheory.SimpleFunc.const_add_eq_map
code: @[to_additive]
theorem const_mul_eq_map [Mul β] (f : α →ₛ β) (b : β) : const α b * f = f.map fun a => b * a 
goal: MeasureTheory.SimpleFunc.const α b + f = MeasureTheory.SimpleFunc.map (fun a => b + a) f

full_name: MeasureTheory.SimpleFunc.const_mul_eq_map
code: @[to_additive]
theorem const_mul_eq_map [Mul β] (f : α →ₛ β) (b : β) : const α b * f = f.map fun a => b * a 
goal: MeasureTheory.SimpleFunc.const α b * f = MeasureTheory.SimpleFunc.map (fun a => b * a) f

full_name: MeasureTheory.SimpleFunc.map_add
code: @[to_additive]
theorem map_mul [Mul β] [Mul γ] {g : β → γ} (hg : ∀ x y, g (x * y) = g x * g y) (f₁ f₂ : α →ₛ β) :
    (f₁ * f₂).map g = f₁.map g * f₂.map g 
goal: MeasureTheory.SimpleFunc.map g (f₁ + f₂) = MeasureTheory.SimpleFunc.map g f₁ + MeasureTheory.SimpleFunc.map g f₂

full_name: MeasureTheory.SimpleFunc.map_mul
code: @[to_additive]
theorem map_mul [Mul β] [Mul γ] {g : β → γ} (hg : ∀ x y, g (x * y) = g x * g y) (f₁ f₂ : α →ₛ β) :
    (f₁ * f₂).map g = f₁.map g * f₂.map g 
goal: MeasureTheory.SimpleFunc.map g (f₁ * f₂) = MeasureTheory.SimpleFunc.map g f₁ * MeasureTheory.SimpleFunc.map g f₂

full_name: MeasureTheory.SimpleFunc.instVAdd
code: @[to_additive]
instance instSMul [SMul K β] : SMul K (α →ₛ β) 
goal: VAdd K (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instSMul
code: @[to_additive]
instance instSMul [SMul K β] : SMul K (α →ₛ β) 
goal: SMul K (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.coe_smul
code: @[to_additive (attr := simp)]
theorem coe_smul [SMul K β] (c : K) (f : α →ₛ β) : ⇑(c • f) = c • ⇑f 
goal: ↑(c • f) = c • ↑f

full_name: MeasureTheory.SimpleFunc.coe_vadd
code: @[to_additive (attr := simp)]
theorem coe_smul [SMul K β] (c : K) (f : α →ₛ β) : ⇑(c • f) = c • ⇑f 
goal: ↑(c +ᵥ f) = c +ᵥ ↑f

full_name: MeasureTheory.SimpleFunc.vadd_apply
code: @[to_additive (attr := simp)]
theorem smul_apply [SMul K β] (k : K) (f : α →ₛ β) (a : α) : (k • f) a = k • f a 
goal: ↑(k +ᵥ f) a = k +ᵥ ↑f a

full_name: MeasureTheory.SimpleFunc.smul_apply
code: @[to_additive (attr := simp)]
theorem smul_apply [SMul K β] (k : K) (f : α →ₛ β) (a : α) : (k • f) a = k • f a 
goal: ↑(k • f) a = k • ↑f a

full_name: MeasureTheory.SimpleFunc.hasNatSMul
code: instance hasNatSMul [AddMonoid β] : SMul ℕ (α →ₛ β) 
goal: SMul ℕ (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.hasNatPow
code: @[to_additive existing hasNatSMul]
instance hasNatPow [Monoid β] : Pow (α →ₛ β) ℕ 
goal: Pow (MeasureTheory.SimpleFunc α β) ℕ

full_name: MeasureTheory.SimpleFunc.coe_pow
code: @[simp]
theorem coe_pow [Monoid β] (f : α →ₛ β) (n : ℕ) : ⇑(f ^ n) = (⇑f) ^ n 
goal: ↑(f ^ n) = ↑f ^ n

full_name: MeasureTheory.SimpleFunc.pow_apply
code: theorem pow_apply [Monoid β] (n : ℕ) (f : α →ₛ β) (a : α) : (f ^ n) a = f a ^ n 
goal: ↑(f ^ n) a = ↑f a ^ n

full_name: MeasureTheory.SimpleFunc.hasIntPow
code: instance hasIntPow [DivInvMonoid β] : Pow (α →ₛ β) ℤ 
goal: Pow (MeasureTheory.SimpleFunc α β) ℤ

full_name: MeasureTheory.SimpleFunc.coe_zpow
code: @[simp]
theorem coe_zpow [DivInvMonoid β] (f : α →ₛ β) (z : ℤ) : ⇑(f ^ z) = (⇑f) ^ z 
goal: ↑(f ^ z) = ↑f ^ z

full_name: MeasureTheory.SimpleFunc.zpow_apply
code: theorem zpow_apply [DivInvMonoid β] (z : ℤ) (f : α →ₛ β) (a : α) : (f ^ z) a = f a ^ z 
goal: ↑(f ^ z) a = ↑f a ^ z

full_name: MeasureTheory.SimpleFunc.instAddMonoid
code: instance instAddMonoid [AddMonoid β] : AddMonoid (α →ₛ β) 
goal: AddMonoid (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instAddCommMonoid
code: instance instAddCommMonoid [AddCommMonoid β] : AddCommMonoid (α →ₛ β) 
goal: AddCommMonoid (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instAddGroup
code: instance instAddGroup [AddGroup β] : AddGroup (α →ₛ β) 
goal: AddGroup (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instAddCommGroup
code: instance instAddCommGroup [AddCommGroup β] : AddCommGroup (α →ₛ β) 
goal: AddCommGroup (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instMonoid
code: @[to_additive existing]
instance instMonoid [Monoid β] : Monoid (α →ₛ β) 
goal: Monoid (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instCommMonoid
code: @[to_additive existing]
instance instCommMonoid [CommMonoid β] : CommMonoid (α →ₛ β) 
goal: CommMonoid (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instGroup
code: @[to_additive existing]
instance instGroup [Group β] : Group (α →ₛ β) 
goal: Group (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instCommGroup
code: @[to_additive existing]
instance instCommGroup [CommGroup β] : CommGroup (α →ₛ β) 
goal: CommGroup (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instModule
code: instance instModule [Semiring K] [AddCommMonoid β] [Module K β] : Module K (α →ₛ β) 
goal: Module K (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.smul_eq_map
code: theorem smul_eq_map [SMul K β] (k : K) (f : α →ₛ β) : k • f = f.map (k • ·) 
goal: k • f = MeasureTheory.SimpleFunc.map (fun x => k • x) f

full_name: MeasureTheory.SimpleFunc.instPreorder
code: instance instPreorder [Preorder β] : Preorder (α →ₛ β) 
goal: Preorder (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instPartialOrder
code: instance instPartialOrder [PartialOrder β] : PartialOrder (α →ₛ β) 
goal: PartialOrder (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instOrderBot
code: instance instOrderBot [LE β] [OrderBot β] : OrderBot (α →ₛ β) 
goal: OrderBot (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instOrderTop
code: instance instOrderTop [LE β] [OrderTop β] : OrderTop (α →ₛ β) 
goal: OrderTop (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instSemilatticeInf
code: instance instSemilatticeInf [SemilatticeInf β] : SemilatticeInf (α →ₛ β) 
goal: SemilatticeInf (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instSemilatticeSup
code: instance instSemilatticeSup [SemilatticeSup β] : SemilatticeSup (α →ₛ β) 
goal: SemilatticeSup (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instLattice
code: instance instLattice [Lattice β] : Lattice (α →ₛ β) 
goal: Lattice (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.instBoundedOrder
code: instance instBoundedOrder [LE β] [BoundedOrder β] : BoundedOrder (α →ₛ β) 
goal: BoundedOrder (MeasureTheory.SimpleFunc α β)

full_name: MeasureTheory.SimpleFunc.finset_sup_apply
code: theorem finset_sup_apply [SemilatticeSup β] [OrderBot β] {f : γ → α →ₛ β} (s : Finset γ) (a : α) :
    s.sup f a = s.sup fun c => f c a 
goal: ↑(s.sup f) a = s.sup fun c => ↑(f c) a

full_name: MeasureTheory.SimpleFunc.restrict
code: /-- Restrict a simple function `f : α →ₛ β` to a set `s`. If `s` is measurable,
then `f.restrict s a = if a ∈ s then f a else 0`, otherwise `f.restrict s = const α 0`. -/
def restrict (f : α →ₛ β) (s : Set α) : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.restrict_of_not_measurable
code: theorem restrict_of_not_measurable {f : α →ₛ β} {s : Set α} (hs : ¬MeasurableSet s) :
    restrict f s = 0 
goal: f.restrict s = 0

full_name: MeasureTheory.SimpleFunc.coe_restrict
code: @[simp]
theorem coe_restrict (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) :
    ⇑(restrict f s) = indicator s f 
goal: ↑(f.restrict s) = s.indicator ↑f

full_name: MeasureTheory.SimpleFunc.restrict_univ
code: @[simp]
theorem restrict_univ (f : α →ₛ β) : restrict f univ = f 
goal: f.restrict Set.univ = f

full_name: MeasureTheory.SimpleFunc.restrict_empty
code: @[simp]
theorem restrict_empty (f : α →ₛ β) : restrict f ∅ = 0 
goal: f.restrict ∅ = 0

full_name: MeasureTheory.SimpleFunc.map_restrict_of_zero
code: theorem map_restrict_of_zero [Zero γ] {g : β → γ} (hg : g 0 = 0) (f : α →ₛ β) (s : Set α) :
    (f.restrict s).map g = (f.map g).restrict s 
goal: MeasureTheory.SimpleFunc.map g (f.restrict s) = (MeasureTheory.SimpleFunc.map g f).restrict s

full_name: MeasureTheory.SimpleFunc.map_coe_ennreal_restrict
code: theorem map_coe_ennreal_restrict (f : α →ₛ ℝ≥0) (s : Set α) :
    (f.restrict s).map ((↑) : ℝ≥0 → ℝ≥0∞) = (f.map (↑)).restrict s 
goal: MeasureTheory.SimpleFunc.map ENNReal.ofNNReal (f.restrict s) =
  (MeasureTheory.SimpleFunc.map ENNReal.ofNNReal f).restrict s

full_name: MeasureTheory.SimpleFunc.map_coe_nnreal_restrict
code: theorem map_coe_nnreal_restrict (f : α →ₛ ℝ≥0) (s : Set α) :
    (f.restrict s).map ((↑) : ℝ≥0 → ℝ) = (f.map (↑)).restrict s 
goal: MeasureTheory.SimpleFunc.map NNReal.toReal (f.restrict s) = (MeasureTheory.SimpleFunc.map NNReal.toReal f).restrict s

full_name: MeasureTheory.SimpleFunc.restrict_apply
code: theorem restrict_apply (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) (a) :
    restrict f s a = indicator s f a 
goal: ↑(f.restrict s) a = s.indicator (↑f) a

full_name: MeasureTheory.SimpleFunc.restrict_preimage
code: theorem restrict_preimage (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) {t : Set β}
    (ht : (0 : β) ∉ t) : restrict f s ⁻¹' t = s ∩ f ⁻¹' t 
goal: ↑(f.restrict s) ⁻¹' t = s ∩ ↑f ⁻¹' t

full_name: MeasureTheory.SimpleFunc.restrict_preimage_singleton
code: theorem restrict_preimage_singleton (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) {r : β}
    (hr : r ≠ 0) : restrict f s ⁻¹' {r} = s ∩ f ⁻¹' {r} 
goal: ↑(f.restrict s) ⁻¹' {r} = s ∩ ↑f ⁻¹' {r}

full_name: MeasureTheory.SimpleFunc.mem_restrict_range
code: theorem mem_restrict_range {r : β} {s : Set α} {f : α →ₛ β} (hs : MeasurableSet s) :
    r ∈ (restrict f s).range ↔ r = 0 ∧ s ≠ univ ∨ r ∈ f '' s 
goal: r ∈ (f.restrict s).range ↔ r = 0 ∧ s ≠ Set.univ ∨ r ∈ ↑f '' s

full_name: MeasureTheory.SimpleFunc.mem_image_of_mem_range_restrict
code: theorem mem_image_of_mem_range_restrict {r : β} {s : Set α} {f : α →ₛ β}
    (hr : r ∈ (restrict f s).range) (h0 : r ≠ 0) : r ∈ f '' s 
goal: r ∈ ↑f '' s

full_name: MeasureTheory.SimpleFunc.restrict_mono
code: @[mono]
theorem restrict_mono [Preorder β] (s : Set α) {f g : α →ₛ β} (H : f ≤ g) :
    f.restrict s ≤ g.restrict s 
goal: f.restrict s ≤ g.restrict s

full_name: MeasureTheory.SimpleFunc.approx
code: /-- Fix a sequence `i : ℕ → β`. Given a function `α → β`, its `n`-th approximation
by simple functions is defined so that in case `β = ℝ≥0∞` it sends each `a` to the supremum
of the set `{i k | k ≤ n ∧ i k ≤ f a}`, see `approx_apply` and `iSup_approx_apply` for details. -/
def approx (i : ℕ → β) (f : α → β) (n : ℕ) : α →ₛ β 
goal: MeasureTheory.SimpleFunc α β

full_name: MeasureTheory.SimpleFunc.approx_apply
code: theorem approx_apply [TopologicalSpace β] [OrderClosedTopology β] [MeasurableSpace β]
    [OpensMeasurableSpace β] {i : ℕ → β} {f : α → β} {n : ℕ} (a : α) (hf : Measurable f) :
    (approx i f n : α →ₛ β) a = (Finset.range n).sup fun k => if i k ≤ f a then i k else 0 
goal: ↑(MeasureTheory.SimpleFunc.approx i f n) a = (Finset.range n).sup fun k => if i k ≤ f a then i k else 0

full_name: MeasureTheory.SimpleFunc.monotone_approx
code: theorem monotone_approx (i : ℕ → β) (f : α → β) : Monotone (approx i f) 
goal: Monotone (MeasureTheory.SimpleFunc.approx i f)

full_name: MeasureTheory.SimpleFunc.approx_comp
code: theorem approx_comp [TopologicalSpace β] [OrderClosedTopology β] [MeasurableSpace β]
    [OpensMeasurableSpace β] [MeasurableSpace γ] {i : ℕ → β} {f : γ → β} {g : α → γ} {n : ℕ} (a : α)
    (hf : Measurable f) (hg : Measurable g) :
    (approx i (f ∘ g) n : α →ₛ β) a = (approx i f n : γ →ₛ β) (g a) 
goal: ↑(MeasureTheory.SimpleFunc.approx i (f ∘ g) n) a = ↑(MeasureTheory.SimpleFunc.approx i f n) (g a)

full_name: MeasureTheory.SimpleFunc.iSup_approx_apply
code: theorem iSup_approx_apply [TopologicalSpace β] [CompleteLattice β] [OrderClosedTopology β] [Zero β]
    [MeasurableSpace β] [OpensMeasurableSpace β] (i : ℕ → β) (f : α → β) (a : α) (hf : Measurable f)
    (h_zero : (0 : β) = ⊥) : ⨆ n, (approx i f n : α →ₛ β) a = ⨆ (k) (_ : i k ≤ f a), i k 
goal: ⨆ n, ↑(MeasureTheory.SimpleFunc.approx i f n) a = ⨆ k, ⨆ (_ : i k ≤ f a), i k

full_name: MeasureTheory.SimpleFunc.ennrealRatEmbed
code: /-- A sequence of `ℝ≥0∞`s such that its range is the set of non-negative rational numbers. -/
def ennrealRatEmbed (n : ℕ) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: MeasureTheory.SimpleFunc.ennrealRatEmbed_encode
code: theorem ennrealRatEmbed_encode (q : ℚ) :
    ennrealRatEmbed (Encodable.encode q) = Real.toNNReal q 
goal: MeasureTheory.SimpleFunc.ennrealRatEmbed (Encodable.encode q) = ↑(↑q).toNNReal

full_name: MeasureTheory.SimpleFunc.eapprox
code: /-- Approximate a function `α → ℝ≥0∞` by a sequence of simple functions. -/
def eapprox : (α → ℝ≥0∞) → ℕ → α →ₛ ℝ≥0∞ 
goal: (α → ℝ≥0∞) → ℕ → MeasureTheory.SimpleFunc α ℝ≥0∞

full_name: MeasureTheory.SimpleFunc.eapprox_lt_top
code: theorem eapprox_lt_top (f : α → ℝ≥0∞) (n : ℕ) (a : α) : eapprox f n a < ∞ 
goal: ↑(MeasureTheory.SimpleFunc.eapprox f n) a < ⊤

full_name: MeasureTheory.SimpleFunc.monotone_eapprox
code: @[mono]
theorem monotone_eapprox (f : α → ℝ≥0∞) : Monotone (eapprox f) 
goal: Monotone (MeasureTheory.SimpleFunc.eapprox f)

full_name: MeasureTheory.SimpleFunc.iSup_eapprox_apply
code: theorem iSup_eapprox_apply (f : α → ℝ≥0∞) (hf : Measurable f) (a : α) :
    ⨆ n, (eapprox f n : α →ₛ ℝ≥0∞) a = f a 
goal: ⨆ n, ↑(MeasureTheory.SimpleFunc.eapprox f n) a = f a

full_name: MeasureTheory.SimpleFunc.eapprox_comp
code: theorem eapprox_comp [MeasurableSpace γ] {f : γ → ℝ≥0∞} {g : α → γ} {n : ℕ} (hf : Measurable f)
    (hg : Measurable g) : (eapprox (f ∘ g) n : α → ℝ≥0∞) = (eapprox f n : γ →ₛ ℝ≥0∞) ∘ g 
goal: ↑(MeasureTheory.SimpleFunc.eapprox (f ∘ g) n) = ↑(MeasureTheory.SimpleFunc.eapprox f n) ∘ g

full_name: MeasureTheory.SimpleFunc.eapproxDiff
code: /-- Approximate a function `α → ℝ≥0∞` by a series of simple functions taking their values
in `ℝ≥0`. -/
def eapproxDiff (f : α → ℝ≥0∞) : ℕ → α →ₛ ℝ≥0
  
goal: ℕ → MeasureTheory.SimpleFunc α ℝ≥0

full_name: MeasureTheory.SimpleFunc.sum_eapproxDiff
code: theorem sum_eapproxDiff (f : α → ℝ≥0∞) (n : ℕ) (a : α) :
    (∑ k ∈ Finset.range (n + 1), (eapproxDiff f k a : ℝ≥0∞)) = eapprox f n a 
goal: ∑ k ∈ Finset.range (n + 1), ↑(↑(MeasureTheory.SimpleFunc.eapproxDiff f k) a) = ↑(MeasureTheory.SimpleFunc.eapprox f n) a

full_name: MeasureTheory.SimpleFunc.tsum_eapproxDiff
code: theorem tsum_eapproxDiff (f : α → ℝ≥0∞) (hf : Measurable f) (a : α) :
    (∑' n, (eapproxDiff f n a : ℝ≥0∞)) = f a 
goal: ∑' (n : ℕ), ↑(↑(MeasureTheory.SimpleFunc.eapproxDiff f n) a) = f a

full_name: MeasureTheory.SimpleFunc.lintegral
code: /-- Integral of a simple function whose codomain is `ℝ≥0∞`. -/
def lintegral {_m : MeasurableSpace α} (f : α →ₛ ℝ≥0∞) (μ : Measure α) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: MeasureTheory.SimpleFunc.lintegral_eq_of_subset
code: theorem lintegral_eq_of_subset (f : α →ₛ ℝ≥0∞) {s : Finset ℝ≥0∞}
    (hs : ∀ x, f x ≠ 0 → μ (f ⁻¹' {f x}) ≠ 0 → f x ∈ s) :
    f.lintegral μ = ∑ x ∈ s, x * μ (f ⁻¹' {x}) 
goal: f.lintegral μ = ∑ x ∈ s, x * μ (↑f ⁻¹' {x})

full_name: MeasureTheory.SimpleFunc.lintegral_eq_of_subset'
code: theorem lintegral_eq_of_subset' (f : α →ₛ ℝ≥0∞) {s : Finset ℝ≥0∞} (hs : f.range \ {0} ⊆ s) :
    f.lintegral μ = ∑ x ∈ s, x * μ (f ⁻¹' {x}) 
goal: f.lintegral μ = ∑ x ∈ s, x * μ (↑f ⁻¹' {x})

full_name: MeasureTheory.SimpleFunc.map_lintegral
code: /-- Calculate the integral of `(g ∘ f)`, where `g : β → ℝ≥0∞` and `f : α →ₛ β`.  -/
theorem map_lintegral (g : β → ℝ≥0∞) (f : α →ₛ β) :
    (f.map g).lintegral μ = ∑ x ∈ f.range, g x * μ (f ⁻¹' {x}) 
goal: (MeasureTheory.SimpleFunc.map g f).lintegral μ = ∑ x ∈ f.range, g x * μ (↑f ⁻¹' {x})

full_name: MeasureTheory.SimpleFunc.add_lintegral
code: theorem add_lintegral (f g : α →ₛ ℝ≥0∞) : (f + g).lintegral μ = f.lintegral μ + g.lintegral μ 
goal: (f + g).lintegral μ = f.lintegral μ + g.lintegral μ

full_name: MeasureTheory.SimpleFunc.const_mul_lintegral
code: theorem const_mul_lintegral (f : α →ₛ ℝ≥0∞) (x : ℝ≥0∞) :
    (const α x * f).lintegral μ = x * f.lintegral μ 
goal: (MeasureTheory.SimpleFunc.const α x * f).lintegral μ = x * f.lintegral μ

full_name: MeasureTheory.SimpleFunc.lintegralₗ
code: /-- Integral of a simple function `α →ₛ ℝ≥0∞` as a bilinear map. -/
def lintegralₗ {m : MeasurableSpace α} : (α →ₛ ℝ≥0∞) →ₗ[ℝ≥0∞] Measure α →ₗ[ℝ≥0∞] ℝ≥0∞ 
goal: MeasureTheory.SimpleFunc α ℝ≥0∞ →ₗ[ℝ≥0∞] MeasureTheory.Measure α →ₗ[ℝ≥0∞] ℝ≥0∞

full_name: MeasureTheory.SimpleFunc.zero_lintegral
code: @[simp]
theorem zero_lintegral : (0 : α →ₛ ℝ≥0∞).lintegral μ = 0 
goal: MeasureTheory.SimpleFunc.lintegral 0 μ = 0

full_name: MeasureTheory.SimpleFunc.lintegral_add
code: theorem lintegral_add {ν} (f : α →ₛ ℝ≥0∞) : f.lintegral (μ + ν) = f.lintegral μ + f.lintegral ν 
goal: f.lintegral (μ + ν) = f.lintegral μ + f.lintegral ν

full_name: MeasureTheory.SimpleFunc.lintegral_smul
code: theorem lintegral_smul (f : α →ₛ ℝ≥0∞) (c : ℝ≥0∞) : f.lintegral (c • μ) = c • f.lintegral μ 
goal: f.lintegral (c • μ) = c • f.lintegral μ

full_name: MeasureTheory.SimpleFunc.lintegral_zero
code: @[simp]
theorem lintegral_zero [MeasurableSpace α] (f : α →ₛ ℝ≥0∞) : f.lintegral 0 = 0 
goal: f.lintegral 0 = 0

full_name: MeasureTheory.SimpleFunc.lintegral_sum
code: theorem lintegral_sum {m : MeasurableSpace α} {ι} (f : α →ₛ ℝ≥0∞) (μ : ι → Measure α) :
    f.lintegral (Measure.sum μ) = ∑' i, f.lintegral (μ i) 
goal: f.lintegral (MeasureTheory.Measure.sum μ) = ∑' (i : ι), f.lintegral (μ i)

full_name: MeasureTheory.SimpleFunc.restrict_lintegral
code: theorem restrict_lintegral (f : α →ₛ ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    (restrict f s).lintegral μ = ∑ r ∈ f.range, r * μ (f ⁻¹' {r} ∩ s) 
goal: (f.restrict s).lintegral μ = ∑ r ∈ f.range, r * μ (↑f ⁻¹' {r} ∩ s)

full_name: MeasureTheory.SimpleFunc.lintegral_restrict
code: theorem lintegral_restrict {m : MeasurableSpace α} (f : α →ₛ ℝ≥0∞) (s : Set α) (μ : Measure α) :
    f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (f ⁻¹' {y} ∩ s) 
goal: f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (↑f ⁻¹' {y} ∩ s)

full_name: MeasureTheory.SimpleFunc.restrict_lintegral_eq_lintegral_restrict
code: theorem restrict_lintegral_eq_lintegral_restrict (f : α →ₛ ℝ≥0∞) {s : Set α}
    (hs : MeasurableSet s) : (restrict f s).lintegral μ = f.lintegral (μ.restrict s) 
goal: (f.restrict s).lintegral μ = f.lintegral (μ.restrict s)

full_name: MeasureTheory.SimpleFunc.lintegral_restrict_iUnion_of_directed
code: theorem lintegral_restrict_iUnion_of_directed {ι : Type*} [Countable ι]
    (f : α →ₛ ℝ≥0∞) {s : ι → Set α} (hd : Directed (· ⊆ ·) s) (μ : Measure α) :
    f.lintegral (μ.restrict (⋃ i, s i)) = ⨆ i, f.lintegral (μ.restrict (s i)) 
goal: f.lintegral (μ.restrict (⋃ i, s i)) = ⨆ i, f.lintegral (μ.restrict (s i))

full_name: MeasureTheory.SimpleFunc.const_lintegral
code: theorem const_lintegral (c : ℝ≥0∞) : (const α c).lintegral μ = c * μ univ 
goal: (MeasureTheory.SimpleFunc.const α c).lintegral μ = c * μ Set.univ

full_name: MeasureTheory.SimpleFunc.const_lintegral_restrict
code: theorem const_lintegral_restrict (c : ℝ≥0∞) (s : Set α) :
    (const α c).lintegral (μ.restrict s) = c * μ s 
goal: (MeasureTheory.SimpleFunc.const α c).lintegral (μ.restrict s) = c * μ s

full_name: MeasureTheory.SimpleFunc.restrict_const_lintegral
code: theorem restrict_const_lintegral (c : ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    ((const α c).restrict s).lintegral μ = c * μ s 
goal: ((MeasureTheory.SimpleFunc.const α c).restrict s).lintegral μ = c * μ s

full_name: MeasureTheory.SimpleFunc.le_sup_lintegral
code: theorem le_sup_lintegral (f g : α →ₛ ℝ≥0∞) : f.lintegral μ ⊔ g.lintegral μ ≤ (f ⊔ g).lintegral μ 
goal: f.lintegral μ ⊔ g.lintegral μ ≤ (f ⊔ g).lintegral μ

full_name: MeasureTheory.SimpleFunc.lintegral_mono
code: /-- `SimpleFunc.lintegral` is monotone both in function and in measure. -/
@[mono]
theorem lintegral_mono {f g : α →ₛ ℝ≥0∞} (hfg : f ≤ g) (hμν : μ ≤ ν) :
    f.lintegral μ ≤ g.lintegral ν 
goal: f.lintegral μ ≤ g.lintegral ν

full_name: MeasureTheory.SimpleFunc.lintegral_eq_of_measure_preimage
code: /-- `SimpleFunc.lintegral` depends only on the measures of `f ⁻¹' {y}`. -/
theorem lintegral_eq_of_measure_preimage [MeasurableSpace β] {f : α →ₛ ℝ≥0∞} {g : β →ₛ ℝ≥0∞}
    {ν : Measure β} (H : ∀ y, μ (f ⁻¹' {y}) = ν (g ⁻¹' {y})) : f.lintegral μ = g.lintegral ν 
goal: f.lintegral μ = g.lintegral ν

full_name: MeasureTheory.SimpleFunc.lintegral_congr
code: /-- If two simple functions are equal a.e., then their `lintegral`s are equal. -/
theorem lintegral_congr {f g : α →ₛ ℝ≥0∞} (h : f =ᵐ[μ] g) : f.lintegral μ = g.lintegral μ 
goal: f.lintegral μ = g.lintegral μ

full_name: MeasureTheory.SimpleFunc.lintegral_map'
code: theorem lintegral_map' {β} [MeasurableSpace β] {μ' : Measure β} (f : α →ₛ ℝ≥0∞) (g : β →ₛ ℝ≥0∞)
    (m' : α → β) (eq : ∀ a, f a = g (m' a)) (h : ∀ s, MeasurableSet s → μ' s = μ (m' ⁻¹' s)) :
    f.lintegral μ = g.lintegral μ' 
goal: f.lintegral μ = g.lintegral μ'

full_name: MeasureTheory.SimpleFunc.lintegral_map
code: theorem lintegral_map {β} [MeasurableSpace β] (g : β →ₛ ℝ≥0∞) {f : α → β} (hf : Measurable f) :
    g.lintegral (Measure.map f μ) = (g.comp f hf).lintegral μ 
goal: g.lintegral (MeasureTheory.Measure.map f μ) = (g.comp f hf).lintegral μ

full_name: MeasureTheory.SimpleFunc.support_eq
code: theorem support_eq [MeasurableSpace α] [Zero β] (f : α →ₛ β) :
    support f = ⋃ y ∈ f.range.filter fun y => y ≠ 0, f ⁻¹' {y} 
goal: Function.support ↑f = ⋃ y ∈ Finset.filter (fun y => y ≠ 0) f.range, ↑f ⁻¹' {y}

full_name: MeasureTheory.SimpleFunc.measurableSet_support
code: theorem measurableSet_support [MeasurableSpace α] (f : α →ₛ β) : MeasurableSet (support f) 
goal: MeasurableSet (Function.support ↑f)

full_name: MeasureTheory.SimpleFunc.FinMeasSupp
code: /-- A `SimpleFunc` has finite measure support if it is equal to `0` outside of a set of finite
measure. -/
protected def FinMeasSupp {_m : MeasurableSpace α} (f : α →ₛ β) (μ : Measure α) : Prop 
goal: Prop

full_name: MeasureTheory.SimpleFunc.finMeasSupp_iff_support
code: theorem finMeasSupp_iff_support : f.FinMeasSupp μ ↔ μ (support f) < ∞ 
goal: f.FinMeasSupp μ ↔ μ (Function.support ↑f) < ⊤

full_name: MeasureTheory.SimpleFunc.finMeasSupp_iff
code: theorem finMeasSupp_iff : f.FinMeasSupp μ ↔ ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞ 
goal: f.FinMeasSupp μ ↔ ∀ (y : β), y ≠ 0 → μ (↑f ⁻¹' {y}) < ⊤

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.meas_preimage_singleton_ne_zero
code: theorem meas_preimage_singleton_ne_zero (h : f.FinMeasSupp μ) {y : β} (hy : y ≠ 0) :
    μ (f ⁻¹' {y}) < ∞ 
goal: μ (↑f ⁻¹' {y}) < ⊤

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.map
code: protected theorem map {g : β → γ} (hf : f.FinMeasSupp μ) (hg : g 0 = 0) : (f.map g).FinMeasSupp μ 
goal: (MeasureTheory.SimpleFunc.map g f).FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.of_map
code: theorem of_map {g : β → γ} (h : (f.map g).FinMeasSupp μ) (hg : ∀ b, g b = 0 → b = 0) :
    f.FinMeasSupp μ 
goal: f.FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.map_iff
code: theorem map_iff {g : β → γ} (hg : ∀ {b}, g b = 0 ↔ b = 0) :
    (f.map g).FinMeasSupp μ ↔ f.FinMeasSupp μ 
goal: (MeasureTheory.SimpleFunc.map g f).FinMeasSupp μ ↔ f.FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.pair
code: protected theorem pair {g : α →ₛ γ} (hf : f.FinMeasSupp μ) (hg : g.FinMeasSupp μ) :
    (pair f g).FinMeasSupp μ 
goal: (f.pair g).FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.map₂
code: protected theorem map₂ [Zero δ] (hf : f.FinMeasSupp μ) {g : α →ₛ γ} (hg : g.FinMeasSupp μ)
    {op : β → γ → δ} (H : op 0 0 = 0) : ((pair f g).map (Function.uncurry op)).FinMeasSupp μ 
goal: (MeasureTheory.SimpleFunc.map (Function.uncurry op) (f.pair g)).FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.add
code: protected theorem add {β} [AddMonoid β] {f g : α →ₛ β} (hf : f.FinMeasSupp μ)
    (hg : g.FinMeasSupp μ) : (f + g).FinMeasSupp μ 
goal: (f + g).FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.mul
code: protected theorem mul {β} [MonoidWithZero β] {f g : α →ₛ β} (hf : f.FinMeasSupp μ)
    (hg : g.FinMeasSupp μ) : (f * g).FinMeasSupp μ 
goal: (f * g).FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.lintegral_lt_top
code: theorem lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hm : f.FinMeasSupp μ) (hf : ∀ᵐ a ∂μ, f a ≠ ∞) :
    f.lintegral μ < ∞ 
goal: f.lintegral μ < ⊤

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.of_lintegral_ne_top
code: theorem of_lintegral_ne_top {f : α →ₛ ℝ≥0∞} (h : f.lintegral μ ≠ ∞) : f.FinMeasSupp μ 
goal: f.FinMeasSupp μ

full_name: MeasureTheory.SimpleFunc.FinMeasSupp.iff_lintegral_lt_top
code: theorem iff_lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hf : ∀ᵐ a ∂μ, f a ≠ ∞) :
    f.FinMeasSupp μ ↔ f.lintegral μ < ∞ 
goal: f.FinMeasSupp μ ↔ f.lintegral μ < ⊤

full_name: MeasureTheory.SimpleFunc.induction
code: /-- To prove something for an arbitrary simple function, it suffices to show
that the property holds for (multiples of) characteristic functions and is closed under
addition (of functions with disjoint support).

It is possible to make the hypotheses in `h_add` a bit stronger, and such conditions can be added
once we need them (for example it is only necessary to consider the case where `g` is a multiple
of a characteristic function, and that this multiple doesn't appear in the image of `f`) -/
@[elab_as_elim]
protected theorem induction {α γ} [MeasurableSpace α] [AddMonoid γ] {P : SimpleFunc α γ → Prop}
    (h_ind :
      ∀ (c) {s} (hs : MeasurableSet s),
        P (SimpleFunc.piecewise s hs (SimpleFunc.const _ c) (SimpleFunc.const _ 0)))
    (h_add : ∀ ⦃f g : SimpleFunc α γ⦄, Disjoint (support f) (support g) → P f → P g → P (f + g))
    (f : SimpleFunc α γ) : P f 
goal: P f

full_name: Measurable.add_simpleFunc
code: /-- In a topological vector space, the addition of a measurable function and a simple function is
measurable. -/
theorem _root_.Measurable.add_simpleFunc
    {E : Type*} {_ : MeasurableSpace α} [MeasurableSpace E] [AddGroup E] [MeasurableAdd E]
    {g : α → E} (hg : Measurable g) (f : SimpleFunc α E) :
    Measurable (g + (f : α → E)) 
goal: ∀ {x : MeasurableSpace α} [inst : MeasurableSpace E] [inst_1 : AddGroup E] [inst_2 : MeasurableAdd E] {g : α → E},
  Measurable g → ∀ (f : MeasureTheory.SimpleFunc α E), Measurable (g + ↑f)

full_name: Measurable.simpleFunc_add
code: /-- In a topological vector space, the addition of a simple function and a measurable function is
measurable. -/
theorem _root_.Measurable.simpleFunc_add
    {E : Type*} {_ : MeasurableSpace α} [MeasurableSpace E] [AddGroup E] [MeasurableAdd E]
    {g : α → E} (hg : Measurable g) (f : SimpleFunc α E) :
    Measurable ((f : α → E) + g) 
goal: ∀ {x : MeasurableSpace α} [inst : MeasurableSpace E] [inst_1 : AddGroup E] [inst_2 : MeasurableAdd E] {g : α → E},
  Measurable g → ∀ (f : MeasureTheory.SimpleFunc α E), Measurable (↑f + g)

full_name: Measurable.ennreal_induction
code: /-- To prove something for an arbitrary measurable function into `ℝ≥0∞`, it suffices to show
that the property holds for (multiples of) characteristic functions and is closed under addition
and supremum of increasing sequences of functions.

It is possible to make the hypotheses in the induction steps a bit stronger, and such conditions
can be added once we need them (for example in `h_add` it is only necessary to consider the sum of
a simple function with a multiple of a characteristic function and that the intersection
of their images is a subset of `{0}`. -/
@[elab_as_elim]
theorem Measurable.ennreal_induction {α} [MeasurableSpace α] {P : (α → ℝ≥0∞) → Prop}
    (h_ind : ∀ (c : ℝ≥0∞) ⦃s⦄, MeasurableSet s → P (Set.indicator s fun _ => c))
    (h_add :
      ∀ ⦃f g : α → ℝ≥0∞⦄,
        Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g))
    (h_iSup :
      ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ n, Measurable (f n)) → Monotone f → (∀ n, P (f n)) →
        P fun x => ⨆ n, f n x)
    ⦃f : α → ℝ≥0∞⦄ (hf : Measurable f) : P f 
goal: P f