Integral over an interval #
In this file we define ∫ x in a..b, f x ∂μ
to be ∫ x in Ioc a b, f x ∂μ
if a ≤ b
and
-∫ x in Ioc b a, f x ∂μ
if b ≤ a
.
Implementation notes #
Avoiding if
, min
, and max
#
In order to avoid if
s in the definition, we define IntervalIntegrable f μ a b
as
integrable_on f (Ioc a b) μ ∧ integrable_on f (Ioc b a) μ
. For any a
, b
one of these
intervals is empty and the other coincides with Set.uIoc a b = Set.Ioc (min a b) (max a b)
.
Similarly, we define ∫ x in a..b, f x ∂μ
to be ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ
.
Again, for any a
, b
one of these integrals is zero, and the other gives the expected result.
This way some properties can be translated from integrals over sets without dealing with
the cases a ≤ b
and b ≤ a
separately.
Choice of the interval #
We use integral over Set.uIoc a b = Set.Ioc (min a b) (max a b)
instead of one of the other
three possible intervals with the same endpoints for two reasons:
- this way
∫ x in a..b, f x ∂μ + ∫ x in b..c, f x ∂μ = ∫ x in a..c, f x ∂μ
holds wheneverf
is integrable on each interval; in particular, it works even if the measureμ
has an atom atb
; this rules outSet.Ioo
andSet.Icc
intervals; - with this definition for a probability measure
μ
, the integral∫ x in a..b, 1 ∂μ
equals the difference $F_μ(b)-F_μ(a)$, where $F_μ(a)=μ(-∞, a]$ is the cumulative distribution function ofμ
.
Tags #
integral
Integrability on an interval #
A function f
is called interval integrable with respect to a measure μ
on an unordered
interval a..b
if it is integrable on both intervals (a, b]
and (b, a]
. One of these
intervals is always empty, so this property is equivalent to f
being integrable on
(min a b, max a b]
.
Equations
- IntervalIntegrable f μ a b = (MeasureTheory.IntegrableOn f (Set.Ioc a b) μ ∧ MeasureTheory.IntegrableOn f (Set.Ioc b a) μ)
Instances For
Basic iff's for IntervalIntegrable
#
A function is interval integrable with respect to a given measure μ
on a..b
if and
only if it is integrable on uIoc a b
with respect to μ
. This is an equivalent
definition of IntervalIntegrable
.
If a function is interval integrable with respect to a given measure μ
on a..b
then
it is integrable on uIoc a b
with respect to μ
.
If a function is integrable with respect to a given measure μ
then it is interval integrable
with respect to μ
on uIcc a b
.
Basic properties of interval integrability #
- interval integrability is symmetric, reflexive, transitive
- monotonicity and strong measurability of the interval integral
- if
f
is interval integrable, so are its absolute value and norm - arithmetic properties
Continuous functions are interval integrable #
A continuous function on ℝ
is IntervalIntegrable
with respect to any locally finite measure
ν
on ℝ.
Monotone and antitone functions are integral integrable #
Let l'
be a measurably generated filter; let l
be a of filter such that each s ∈ l'
eventually includes Ioc u v
as both u
and v
tend to l
. Let μ
be a measure finite at l'
.
Suppose that f : ℝ → E
has a finite limit at l' ⊓ ae μ
. Then f
is interval integrable on
u..v
provided that both u
and v
tend to l
.
Typeclass instances allow Lean to find l'
based on l
but not vice versa, so
apply Tendsto.eventually_intervalIntegrable_ae
will generate goals Filter ℝ
and
TendstoIxxClass Ioc ?m_1 l'
.
Let l'
be a measurably generated filter; let l
be a of filter such that each s ∈ l'
eventually includes Ioc u v
as both u
and v
tend to l
. Let μ
be a measure finite at l'
.
Suppose that f : ℝ → E
has a finite limit at l
. Then f
is interval integrable on u..v
provided that both u
and v
tend to l
.
Typeclass instances allow Lean to find l'
based on l
but not vice versa, so
apply Tendsto.eventually_intervalIntegrable
will generate goals Filter ℝ
and
TendstoIxxClass Ioc ?m_1 l'
.
Interval integral: definition and basic properties #
In this section we define ∫ x in a..b, f x ∂μ
as ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ
and prove some basic properties.
The interval integral ∫ x in a..b, f x ∂μ
is defined
as ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ
. If a ≤ b
, then it equals
∫ x in Ioc a b, f x ∂μ
, otherwise it equals -∫ x in Ioc b a, f x ∂μ
.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of RCLike.intervalIntegral_ofReal
.
Basic arithmetic #
Includes addition, scalar multiplication and affine transformations.
Porting note: some @[simp]
attributes in this section were removed to make the simpNF
linter
happy. TODO: find out if these lemmas are actually good or bad simp
lemmas.
Integral is an additive function of the interval #
In this section we prove that ∫ x in a..b, f x ∂μ + ∫ x in b..c, f x ∂μ = ∫ x in a..c, f x ∂μ
as well as a few other identities trivially equivalent to this one. We also prove that
∫ x in a..b, f x ∂μ = ∫ x, f x ∂μ
provided that support f ⊆ Ioc a b
.
If two functions are equal in the relevant interval, their interval integrals are also equal.
If μ
is a finite measure then ∫ x in a..b, c ∂μ = (μ (Iic b) - μ (Iic a)) • c
.
If f
is nonnegative and integrable on the unordered interval Set.uIoc a b
, then its
integral over a..b
is positive if and only if a < b
and the measure of
Function.support f ∩ Set.Ioc a b
is positive.
If f
is nonnegative a.e.-everywhere and it is integrable on the unordered interval
Set.uIoc a b
, then its integral over a..b
is positive if and only if a < b
and the
measure of Function.support f ∩ Set.Ioc a b
is positive.
If f : ℝ → ℝ
is integrable on (a, b]
for real numbers a < b
, and positive on the interior
of the interval, then its integral over a..b
is strictly positive.
If f : ℝ → ℝ
is strictly positive everywhere, and integrable on (a, b]
for real numbers
a < b
, then its integral over a..b
is strictly positive. (See intervalIntegral_pos_of_pos_on
for a version only assuming positivity of f
on (a, b)
rather than everywhere.)
If f
and g
are two functions that are interval integrable on a..b
, a ≤ b
,
f x ≤ g x
for a.e. x ∈ Set.Ioc a b
, and f x < g x
on a subset of Set.Ioc a b
of nonzero measure, then ∫ x in a..b, f x ∂μ < ∫ x in a..b, g x ∂μ
.
If f
and g
are continuous on [a, b]
, a < b
, f x ≤ g x
on this interval, and
f c < g c
at some point c ∈ [a, b]
, then ∫ x in a..b, f x < ∫ x in a..b, g x
.