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 : α → β
- measurableSet_fiber' : ∀ (x : β), MeasurableSet (↑self ⁻¹' {x})
- finite_range' : Set.Finite (Set.range ↑self)
Instances For
Equations
- MeasureTheory.SimpleFunc.instCoeFun = { coe := MeasureTheory.SimpleFunc.toFun }
Simple function defined on a finite type.
Equations
- MeasureTheory.SimpleFunc.ofFinite f = { toFun := f, measurableSet_fiber' := (_ : ∀ (x : β), MeasurableSet (f ⁻¹' {x})), finite_range' := (_ : Set.Finite (Set.range f)) }
Instances For
Alias of MeasureTheory.SimpleFunc.ofFinite
.
Simple function defined on a finite type.
Instances For
Simple function defined on the empty type.
Equations
- MeasureTheory.SimpleFunc.ofIsEmpty = MeasureTheory.SimpleFunc.ofFinite fun (a : α) => isEmptyElim a
Instances For
Range of a simple function α →ₛ β
as a Finset β
.
Equations
Instances For
Constant function as a SimpleFunc
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- MeasureTheory.SimpleFunc.instInhabited = { default := MeasureTheory.SimpleFunc.const α default }
A simple function is measurable
If-then-else as a SimpleFunc
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a function g : β → γ
and a simple function f : α →ₛ β
, f.map g
return the simple
function g ∘ f : α →ₛ γ
Equations
Instances For
Composition of a SimpleFun
and a measurable function is a SimpleFunc
.
Equations
- MeasureTheory.SimpleFunc.comp f g hgm = { toFun := ↑f ∘ g, measurableSet_fiber' := (_ : ∀ (z : γ), MeasurableSet (g ⁻¹' (↑f ⁻¹' {z}))), finite_range' := (_ : Set.Finite (Set.range (↑f ∘ g))) }
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
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
- MeasureTheory.SimpleFunc.seq f g = MeasureTheory.SimpleFunc.bind f fun (f : β → γ) => MeasureTheory.SimpleFunc.map f g
Instances For
Combine two simple functions f : α →ₛ β
and g : α →ₛ β
into fun a => (f a, g a)
.
Equations
Instances For
Equations
- MeasureTheory.SimpleFunc.instZero = { zero := MeasureTheory.SimpleFunc.const α 0 }
Equations
- MeasureTheory.SimpleFunc.instOne = { one := MeasureTheory.SimpleFunc.const α 1 }
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
- 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.instNeg = { neg := fun (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map Neg.neg f }
Equations
- MeasureTheory.SimpleFunc.instInv = { inv := fun (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map Inv.inv f }
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.instLE = { le := fun (f g : MeasureTheory.SimpleFunc α β) => ∀ (a : α), ↑f a ≤ ↑g a }
Equations
- MeasureTheory.SimpleFunc.instVAdd = { vadd := fun (k : K) (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map (fun (x : β) => k +ᵥ x) f }
Equations
- MeasureTheory.SimpleFunc.instSMul = { smul := fun (k : K) (f : MeasureTheory.SimpleFunc α β) => MeasureTheory.SimpleFunc.map (fun (x : β) => k • x) f }
Equations
- MeasureTheory.SimpleFunc.hasNatSMul = inferInstance
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
- 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
- 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
- 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
- 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
- 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.instPartialOrder = let src := MeasureTheory.SimpleFunc.instPreorder; PartialOrder.mk (_ : ∀ (_f _g : MeasureTheory.SimpleFunc α β), _f ≤ _g → _g ≤ _f → _f = _g)
Equations
- MeasureTheory.SimpleFunc.instOrderBot = OrderBot.mk (_ : ∀ (x : MeasureTheory.SimpleFunc α β) (x_1 : α), ⊥ ≤ ↑x x_1)
Equations
- MeasureTheory.SimpleFunc.instOrderTop = OrderTop.mk (_ : ∀ (x : MeasureTheory.SimpleFunc α β) (x_1 : α), ↑x x_1 ≤ ⊤)
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
- One or more equations did not get rendered due to their size.
Equations
- MeasureTheory.SimpleFunc.instBoundedOrder = let src := MeasureTheory.SimpleFunc.instOrderBot; let src_1 := MeasureTheory.SimpleFunc.instOrderTop; BoundedOrder.mk
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
- MeasureTheory.SimpleFunc.restrict f s = if hs : MeasurableSet s then MeasureTheory.SimpleFunc.piecewise s hs f 0 else 0
Instances For
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.sup (Finset.range n) fun (k : ℕ) => MeasureTheory.SimpleFunc.restrict (MeasureTheory.SimpleFunc.const α (i k)) {a : α | i k ≤ f a}
Instances For
A sequence of ℝ≥0∞
s such that its range is the set of non-negative rational numbers.
Equations
Instances For
Approximate a function α → ℝ≥0∞
by a sequence of simple functions.
Equations
- MeasureTheory.SimpleFunc.eapprox = MeasureTheory.SimpleFunc.approx MeasureTheory.SimpleFunc.ennrealRatEmbed
Instances For
Approximate a function α → ℝ≥0∞
by a series of simple functions taking their values
in ℝ≥0
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Integral of a simple function whose codomain is ℝ≥0∞
.
Equations
- MeasureTheory.SimpleFunc.lintegral f μ = Finset.sum (MeasureTheory.SimpleFunc.range f) fun (x : ENNReal) => x * ↑↑μ (↑f ⁻¹' {x})
Instances For
Calculate the integral of (g ∘ f)
, where g : β → ℝ≥0∞
and f : α →ₛ β
.
Integral of a simple function α →ₛ ℝ≥0∞
as a bilinear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
Instances For
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
)
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}
.