Simple functions #
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. In this file, we define simple functions and establish their
basic properties; and we construct a sequence of simple functions approximating an arbitrary Borel
measurable function f : α → ℝ≥0∞
.
The theorem Measurable.ennreal_induction
shows that in order to prove something for an arbitrary
measurable function into ℝ≥0∞
, it is sufficient to show that the property holds for (multiples of)
characteristic functions and is closed under addition and supremum of increasing sequences of
functions.
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.
- toFun : α → β
The underlying function
- measurableSet_fiber' (x : β) : MeasurableSet (self.toFun ⁻¹' {x})
Equations
- MeasureTheory.SimpleFunc.instFunLike = { coe := MeasureTheory.SimpleFunc.toFun, coe_injective' := ⋯ }
Simple function defined on a finite type.
Equations
- MeasureTheory.SimpleFunc.ofFinite f = { toFun := f, measurableSet_fiber' := ⋯, finite_range' := ⋯ }
Simple function defined on the empty type.
Equations
- MeasureTheory.SimpleFunc.ofIsEmpty = MeasureTheory.SimpleFunc.ofFinite fun (a : α) => isEmptyElim a
Range of a simple function α →ₛ β
as a Finset β
.
Constant function as a SimpleFunc
.
Equations
- MeasureTheory.SimpleFunc.const α b = { toFun := fun (x : α) => b, measurableSet_fiber' := ⋯, finite_range' := ⋯ }
Equations
- MeasureTheory.SimpleFunc.instInhabited = { default := MeasureTheory.SimpleFunc.const α default }
A simple function is measurable
If-then-else as a SimpleFunc
.
Equations
- MeasureTheory.SimpleFunc.piecewise s hs f g = { toFun := s.piecewise ⇑f ⇑g, measurableSet_fiber' := ⋯, finite_range' := ⋯ }
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
.
Given a function g : β → γ
and a simple function f : α →ₛ β
, f.map g
return the simple
function g ∘ f : α →ₛ γ
Equations
- MeasureTheory.SimpleFunc.map g f = f.bind (MeasureTheory.SimpleFunc.const α ∘ g)
Composition of a SimpleFun
and a measurable function is a SimpleFunc
.
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
.
Equations
- f₁.extend g hg f₂ = { toFun := Function.extend g ⇑f₁ ⇑f₂, measurableSet_fiber' := ⋯, finite_range' := ⋯ }
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)
.
Equations
- f.seq g = f.bind fun (f : β → γ) => MeasureTheory.SimpleFunc.map f g
Combine two simple functions f : α →ₛ β
and g : α →ₛ β
into fun a => (f a, g a)
.
Equations
- f.pair g = (MeasureTheory.SimpleFunc.map Prod.mk f).seq g
Equations
- MeasureTheory.SimpleFunc.instOne = { one := MeasureTheory.SimpleFunc.const α 1 }
Equations
- MeasureTheory.SimpleFunc.instZero = { zero := MeasureTheory.SimpleFunc.const α 0 }
Equations
- MeasureTheory.SimpleFunc.instMul = { mul := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 * x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instAdd = { add := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 + x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instDiv = { div := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 / x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instSub = { sub := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 - x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instInv = { inv := fun (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map Inv.inv f }
Equations
- MeasureTheory.SimpleFunc.instNeg = { neg := fun (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map Neg.neg f }
Equations
- MeasureTheory.SimpleFunc.instSup = { max := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 ⊔ x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instInf = { min := fun (f g : MeasureTheory.SimpleFunc α β) => (MeasureTheory.SimpleFunc.map (fun (x1 x2 : β) => x1 ⊓ x2) f).seq g }
Equations
- MeasureTheory.SimpleFunc.instLE = { le := fun (f g : MeasureTheory.SimpleFunc α β) => ∀ (a : α), f a ≤ g a }
Equations
- MeasureTheory.SimpleFunc.instSMul = { smul := fun (k : K) (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map (fun (x : β) => k • x) f }
Equations
- MeasureTheory.SimpleFunc.instVAdd = { vadd := fun (k : K) (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map (fun (x : β) => k +ᵥ x) f }
Equations
- MeasureTheory.SimpleFunc.hasNatPow = { pow := fun (f : MeasureTheory.SimpleFunc α β) (n : ℕ) => MeasureTheory.SimpleFunc.map (fun (x : β) => x ^ n) f }
Equations
- MeasureTheory.SimpleFunc.hasIntPow = { pow := fun (f : MeasureTheory.SimpleFunc α β) (n : ℤ) => MeasureTheory.SimpleFunc.map (fun (x : β) => x ^ n) f }
Equations
- MeasureTheory.SimpleFunc.instAddMonoid = Function.Injective.addMonoid (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instAddCommMonoid = Function.Injective.addCommMonoid (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instAddGroup = Function.Injective.addGroup (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instAddCommGroup = Function.Injective.addCommGroup (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instMonoid = Function.Injective.monoid (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instCommMonoid = Function.Injective.commMonoid (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instGroup = Function.Injective.group (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- MeasureTheory.SimpleFunc.instCommGroup = Function.Injective.commGroup (fun (f : MeasureTheory.SimpleFunc α β) => let_fun this := ⇑f; this) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Alias of the reverse direction of MeasureTheory.SimpleFunc.mk_le_mk
.
Alias of the reverse direction of MeasureTheory.SimpleFunc.mk_lt_mk
.
Alias of the reverse direction of MeasureTheory.SimpleFunc.coe_le_coe
.
Alias of the reverse direction of MeasureTheory.SimpleFunc.coe_lt_coe
.
Equations
- MeasureTheory.SimpleFunc.instPartialOrder = { toPreorder := MeasureTheory.SimpleFunc.instPreorder, le_antisymm := ⋯ }
Equations
- MeasureTheory.SimpleFunc.instOrderBot = { bot := MeasureTheory.SimpleFunc.const α ⊥, bot_le := ⋯ }
Equations
- MeasureTheory.SimpleFunc.instOrderTop = { top := MeasureTheory.SimpleFunc.const α ⊤, le_top := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MeasureTheory.SimpleFunc.instLattice = { toSemilatticeSup := MeasureTheory.SimpleFunc.instSemilatticeSup, inf := SemilatticeInf.inf, inf_le_left := ⋯, inf_le_right := ⋯, le_inf := ⋯ }
Equations
- MeasureTheory.SimpleFunc.instBoundedOrder = { toOrderTop := MeasureTheory.SimpleFunc.instOrderTop, toOrderBot := MeasureTheory.SimpleFunc.instOrderBot }
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
.
Equations
- f.restrict s = if hs : MeasurableSet s then MeasureTheory.SimpleFunc.piecewise s hs f 0 else 0
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.
Equations
- MeasureTheory.SimpleFunc.approx i f n = (Finset.range n).sup fun (k : ℕ) => (MeasureTheory.SimpleFunc.const α (i k)).restrict {a : α | i k ≤ f a}
A sequence of ℝ≥0∞
s such that its range is the set of non-negative rational numbers.
Equations
Approximate a function α → ℝ≥0∞
by a sequence of simple functions.
Approximate a function α → ℝ≥0∞
by a series of simple functions taking their values
in ℝ≥0
.
Equations
- MeasureTheory.SimpleFunc.eapproxDiff f 0 = MeasureTheory.SimpleFunc.map ENNReal.toNNReal (MeasureTheory.SimpleFunc.eapprox f 0)
- MeasureTheory.SimpleFunc.eapproxDiff f n.succ = MeasureTheory.SimpleFunc.map ENNReal.toNNReal (MeasureTheory.SimpleFunc.eapprox f (n + 1) - MeasureTheory.SimpleFunc.eapprox f n)
Integral of a simple function whose codomain is ℝ≥0∞
.
Integral of a simple function α →ₛ ℝ≥0∞
as a bilinear map.
Equations
- MeasureTheory.SimpleFunc.lintegralₗ = { toFun := fun (f : MeasureTheory.SimpleFunc α ENNReal) => { toFun := f.lintegral, map_add' := ⋯, map_smul' := ⋯ }, map_add' := ⋯, map_smul' := ⋯ }
SimpleFunc.lintegral
is monotone both in function and in measure.
SimpleFunc.lintegral
depends only on the measures of f ⁻¹' {y}
.
If two simple functions are equal a.e., then their lintegral
s are equal.
A SimpleFunc
has finite measure support if it is equal to 0
outside of a set of finite
measure.
Equations
- f.FinMeasSupp μ = (⇑f =ᶠ[μ.cofinite] 0)
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
).
To use in an induction proof, the syntax is induction f using SimpleFunc.induction with
.
To prove something for an arbitrary simple function, it suffices to show that the property holds for constant functions and that it is closed under piecewise combinations of functions.
To use in an induction proof, the syntax is induction f with
.
In a topological vector space, the addition of a measurable function and a simple function is measurable.
In a topological vector space, the addition of a simple function and a measurable function is measurable.
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}
.
To prove something for an arbitrary measurable function into ℝ≥0∞
, it suffices to show
that the property holds for (multiples of) characteristic functions with finite mass according to
some sigma-finite measure 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}
.