The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V18. Measure and integration

Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus

78 declarations. Mathlib docs · Source

Fundamental Theorem of Calculus

We prove various versions of the fundamental theorem of calculus for interval integrals in ℝ.

Recall that its first version states that the function (u, v) ↦ ∫ x in u..v, f x has derivative (δu, δv) ↦ δv • f b - δu • f a at (a, b) provided that f is continuous at a and b, and its second version states that, if f has an integrable derivative on [a, b], then ∫ x in a..b, f' x = f b - f a.

Main statements

FTC-1 for Lebesgue measure

We prove several versions of FTC-1, all in the intervalIntegral namespace. Many of them follow the naming scheme integral_has(Strict?)(F?)Deriv(Within?)At(_of_tendsto_ae?)(_right|_left?). They formulate FTC in terms of Has(Strict?)(F?)Deriv(Within?)At. Let us explain the meaning of each part of the name:

  • Strict means that the theorem is about strict differentiability, see HasStrictDerivAt and HasStrictFDerivAt;
  • F means that the theorem is about differentiability in both endpoints; incompatible with _right|_left;
  • Within means that the theorem is about one-sided derivatives, see below for details;
  • _of_tendsto_ae means that instead of continuity the theorem assumes that f has a finite limit almost surely as x tends to a and/or b;
  • _right or _left mean that the theorem is about differentiability in the right (resp., left) endpoint.

We also reformulate these theorems in terms of (f?)deriv(Within?). These theorems are named (f?)deriv(Within?)_integral(_of_tendsto_ae?)(_right|_left?) with the same meaning of parts of the name.

One-sided derivatives

Theorem intervalIntegral.integral_hasFDerivWithinAt_of_tendsto_ae states that (u, v) ↦ ∫ x in u..v, f x has a derivative (δu, δv) ↦ δv • cb - δu • ca within the set s × t at (a, b) provided that f tends to ca (resp., cb) almost surely at la (resp., lb), where possible values of s, t, and corresponding filters la, lb are given in the following table.

| s | la | t | lb | | ------- | ---- | --- | ---- | | Iic a | 𝓝[≤] a | Iic b | 𝓝[≤] b | | Ici a | 𝓝[>] a | Ici b | 𝓝[>] b | | {a} | ⊥ | {b} | ⊥ | | univ | 𝓝 a | univ | 𝓝 b |

We use a typeclass intervalIntegral.FTCFilter to make Lean automatically find la/lb based on s/t. This way we can formulate one theorem instead of 16 (or 8 if we leave only non-trivial ones not covered by integral_hasDerivWithinAt_of_tendsto_ae_(left|right) and integral_hasFDerivAt_of_tendsto_ae). Similarly, integral_hasDerivWithinAt_of_tendsto_ae_right works for both one-sided derivatives using the same typeclass to find an appropriate filter.

FTC for a locally finite measure

Before proving FTC for the Lebesgue measure, we prove a few statements that can be seen as FTC for any measure. The most general of them, measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae, states the following. Let (la, la') be an intervalIntegral.FTCFilter pair of filters around a (i.e., intervalIntegral.FTCFilter a la la') and let (lb, lb') be an intervalIntegral.FTCFilter pair of filters around b. If f has finite limits ca and cb almost surely at la' and lb', respectively, then $$ \int_{va}^{vb} f ∂μ - \int_{ua}^{ub} f ∂μ = \int_{ub}^{vb} cb ∂μ - \int_{ua}^{va} ca ∂μ + o(‖∫{ua}^{va} 1 ∂μ‖ + ‖∫{ub}^{vb} (1:ℝ) ∂μ‖) $$ as ua and va tend to la while ub and vb tend to lb.

FTC-2 and corollaries

We use FTC-1 to prove several versions of FTC-2 for the Lebesgue measure, using a similar naming scheme as for the versions of FTC-1. They include:

  • intervalIntegral.integral_eq_sub_of_hasDeriv_right_of_le - most general version, for functions with a right derivative
  • intervalIntegral.integral_eq_sub_of_hasDerivAt - version for functions with a derivative on an open set
  • intervalIntegral.integral_deriv_eq_sub' - version that is easiest to use when computing the integral of a specific function

Many applications of these theorems can be found in the directory Mathlib/Analysis/SpecialFunctions/Integrals/.

Note that the assumptions of FTC-2 are formulated in the form that f' is integrable. To use it in a context with the stronger assumption that f' is continuous, one can use ContinuousOn.intervalIntegrable or ContinuousOn.integrableOn_Icc or ContinuousOn.integrableOn_uIcc.

Versions of FTC-2 under the simpler assumption that the function is C^1 are given in the file Mathlib/MeasureTheory/Integral/IntervalIntegral/ContDiff.lean.

Applications to integration by parts are in the file Mathlib.MeasureTheory.Integral.IntegrationByParts.

intervalIntegral.FTCFilter class

As explained above, many theorems in this file rely on the typeclass intervalIntegral.FTCFilter (a : ℝ) (l l' : Filter ℝ) to avoid code duplication. This typeclass combines four assumptions:

  • pure a ≤ l;
  • l' ≤ 𝓝 a;
  • l' has a basis of measurable sets;
  • if u n and v n tend to l, then for any s ∈ l', Ioc (u n) (v n) is eventually included in s.

This typeclass has the following “real” instances: (a, pure a, ⊥), (a, 𝓝[≥] a, 𝓝[>] a), (a, 𝓝[≤] a, 𝓝[≤] a), (a, 𝓝 a, 𝓝 a). Furthermore, we have the following instances that are equal to the previously mentioned instances: (a, 𝓝[{a}] a, ⊥) and (a, 𝓝[univ] a, 𝓝[univ] a). While the difference between Ici a and Ioi a doesn't matter for theorems about Lebesgue measure, it becomes important in the versions of FTC about any locally finite measure if this measure has an atom at one of the endpoints.

Combining one-sided and two-sided derivatives

There are some intervalIntegral.FTCFilter instances where the fact that it is one-sided or two-sided depends on the point, namely (x, 𝓝[Set.Icc a b] x, 𝓝[Set.Icc a b] x) (resp. (x, 𝓝[Set.uIcc a b] x, 𝓝[Set.uIcc a b] x)), with x ∈ Icc a b (resp. x ∈ uIcc a b). This results in a two-sided derivatives for x ∈ Set.Ioo a b and one-sided derivatives for x ∈ {a, b}. Other instances could be added when needed (in that case, one also needs to add instances for Filter.IsMeasurablyGenerated and Filter.TendstoIxxClass).

Tags

integral, fundamental theorem of calculus, FTC-1, FTC-2

Fundamental theorem of calculus, part 1, for any measure

In this section we prove a few lemmas that can be seen as versions of FTC-1 for interval integrals w.r.t. any measure. Many theorems are formulated for one or two pairs of filters related by intervalIntegral.FTCFilter a l l'. This typeclass has exactly four “real” instances: (a, pure a, ⊥), (a, 𝓝[≥] a, 𝓝[>] a), (a, 𝓝[≤] a, 𝓝[≤] a), (a, 𝓝 a, 𝓝 a), and two instances that are equal to the first and last “real” instances: (a, 𝓝[{a}] a, ⊥) and (a, 𝓝[univ] a, 𝓝[univ] a). We use this approach to avoid repeating arguments in many very similar cases. Lean can automatically find both a and l' based on l.

The most general theorem measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae can be seen as a generalization of lemma integral_hasStrictFDerivAt below which states strict differentiability of ∫ x in u..v, f x in (u, v) at (a, b) for a measurable function f that is integrable on a..b and is continuous at a and b. The lemma is generalized in three directions: first, measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae deals with any locally finite measure μ; second, it works for one-sided limits/derivatives; third, it assumes only that f has finite limits almost surely at a and b.

Namely, let f be a measurable function integrable on a..b. Let (la, la') be a pair of intervalIntegral.FTCFilters around a; let (lb, lb') be a pair of intervalIntegral.FTCFilters around b. Suppose that f has finite limits ca and cb at la' ⊓ ae μ and lb' ⊓ ae μ, respectively. Then ∫ x in va..vb, f x ∂μ - ∫ x in ua..ub, f x ∂μ = ∫ x in ub..vb, cb ∂μ - ∫ x in ua..va, ca ∂μ + o(‖∫ x in ua..va, (1:ℝ) ∂μ‖ + ‖∫ x in ub..vb, (1:ℝ) ∂μ‖) as ua and va tend to la while ub and vb tend to lb.

This theorem is formulated with integral of constants instead of measures in the right-hand sides for two reasons: first, this way we avoid min/max in the statements; second, often it is possible to write better simp lemmas for these integrals, see integral_const and integral_const_of_cdf.

In the next subsection we apply this theorem to prove various theorems about differentiability of the integral w.r.t. Lebesgue measure.

Fundamental theorem of calculus-1 for Lebesgue measure

In this section we restate theorems from the previous section for Lebesgue measure. In particular, we prove that ∫ x in u..v, f x is strictly differentiable in (u, v) at (a, b) provided that f is integrable on a..b and is continuous at a and b.

Auxiliary Asymptotics.IsLittleO statements

In this section we prove several lemmas that can be interpreted as strict differentiability of (u, v) ↦ ∫ x in u..v, f x ∂μ in u and/or v at a filter. The statements use Asymptotics.isLittleO because we have no definition of HasStrict(F)DerivAtFilter in the library.

Strict differentiability

In this section we prove that for a measurable function f integrable on a..b,

  • integral_hasStrictFDerivAt_of_tendsto_ae: the function (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca at (a, b) in the sense of strict differentiability provided that f tends to ca and cb almost surely as x tends to a and b, respectively;

  • integral_hasStrictFDerivAt: the function (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • f b - u • f a at (a, b) in the sense of strict differentiability provided that f is continuous at a and b;

  • integral_hasStrictDerivAt_of_tendsto_ae_right: the function u ↦ ∫ x in a..u, f x has derivative c at b in the sense of strict differentiability provided that f tends to c almost surely as x tends to b;

  • integral_hasStrictDerivAt_right: the function u ↦ ∫ x in a..u, f x has derivative f b at b in the sense of strict differentiability provided that f is continuous at b;

  • integral_hasStrictDerivAt_of_tendsto_ae_left: the function u ↦ ∫ x in u..b, f x has derivative -c at a in the sense of strict differentiability provided that f tends to c almost surely as x tends to a;

  • integral_hasStrictDerivAt_left: the function u ↦ ∫ x in u..b, f x has derivative -f a at a in the sense of strict differentiability provided that f is continuous at a.

Fréchet differentiability

In this subsection we restate results from the previous subsection in terms of HasFDerivAt, HasDerivAt, fderiv, and deriv.

One-sided derivatives

Fundamental theorem of calculus, part 2

This section contains theorems pertaining to FTC-2 for interval integrals, i.e., the assertion that ∫ x in a..b, f' x = f b - f a under suitable assumptions.

The most classical version of this theorem assumes that f' is continuous. However, this is unnecessarily strong: the result holds if f' is just integrable. We prove the strong version, following [Rudin, Real and Complex Analysis (Theorem 7.21)][rudin1987]. The proof is first given for real-valued functions, and then deduced for functions with a general target space. For a real-valued function g, it suffices to show that g b - g a ≤ (∫ x in a..b, g' x) + ε for all positive ε. To prove this, choose a lower-semicontinuous function G' with g' < G' and with integral close to that of g' (its existence is guaranteed by the Vitali-Carathéodory theorem). It satisfies g t - g a ≤ ∫ x in a..t, G' x for all t ∈ [a, b]: this inequality holds at a, and if it holds at t then it holds for u close to t on its right, as the left-hand side increases by g u - g t ∼ (u -t) g' t, while the right-hand side increases by ∫ x in t..u, G' x which is roughly at least ∫ x in t..u, G' t = (u - t) G' t, by lower semicontinuity. As g' t < G' t, this gives the conclusion. One can therefore push progressively this inequality to the right until the point b, where it gives the desired conclusion.

Automatic integrability for nonnegative derivatives

class intervalIntegral.FTCFilter E1 #

outParam ℝ → Filter ℝ → outParam (Filter ℝ) → Prop

An auxiliary typeclass for the Fundamental theorem of calculus, part 1. It is used to formulate theorems that work simultaneously for left and right one-sided derivatives of ∫ x in u..v, f x.

ctor intervalIntegral.FTCFilter.mk E0 #

∀ {a : outParam ℝ} {outer : Filter ℝ} {inner : outParam (Filter ℝ)}
  [toTendstoIxxClass : Filter.TendstoIxxClass Set.Ioc outer inner],
  pure a ≤ outer → inner ≤ nhds a → ∀ [meas_gen : inner.IsMeasurablyGenerated], intervalIntegral.FTCFilter a outer inner

instance intervalIntegral.FTCFilter.toTendstoIxxClass E0 #

∀ {a : outParam ℝ} {outer : Filter ℝ} {inner : outParam (Filter ℝ)} [self : intervalIntegral.FTCFilter a outer inner],
  Filter.TendstoIxxClass Set.Ioc outer inner

theorem intervalIntegral.FTCFilter.pure_le E1 #

∀ {a : outParam ℝ} {outer : Filter ℝ} {inner : outParam (Filter ℝ)} [self : intervalIntegral.FTCFilter a outer inner],
  pure a ≤ outer

theorem intervalIntegral.FTCFilter.le_nhds E1 #

∀ {a : outParam ℝ} (outer : Filter ℝ) {inner : outParam (Filter ℝ)} [self : intervalIntegral.FTCFilter a outer inner],
  inner ≤ nhds a

theorem intervalIntegral.FTCFilter.meas_gen E1 #

∀ {a : outParam ℝ} (outer : Filter ℝ) {inner : outParam (Filter ℝ)} [self : intervalIntegral.FTCFilter a outer inner],
  inner.IsMeasurablyGenerated

instance intervalIntegral.FTCFilter.pure E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (pure a) ⊥

instance intervalIntegral.FTCFilter.nhdsWithinSingleton E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (nhdsWithin a {a}) ⊥

theorem intervalIntegral.FTCFilter.finiteAt_inner E1 #

∀ {a : ℝ} (l : Filter ℝ) {l' : Filter ℝ} [h : intervalIntegral.FTCFilter a l l'] {μ : MeasureTheory.Measure ℝ}
  [MeasureTheory.IsLocallyFiniteMeasure μ], μ.FiniteAtFilter l'

instance intervalIntegral.FTCFilter.nhds E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (nhds a) (nhds a)

instance intervalIntegral.FTCFilter.nhdsUniv E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (nhdsWithin a Set.univ) (nhds a)

instance intervalIntegral.FTCFilter.nhdsLeft E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (nhdsWithin a (Set.Iic a)) (nhdsWithin a (Set.Iic a))

instance intervalIntegral.FTCFilter.nhdsRight E0 #

∀ (a : ℝ), intervalIntegral.FTCFilter a (nhdsWithin a (Set.Ici a)) (nhdsWithin a (Set.Ioi a))

instance intervalIntegral.FTCFilter.nhdsIcc E0 #

∀ {x a b : ℝ} [h : Fact (x ∈ Set.Icc a b)],
  intervalIntegral.FTCFilter x (nhdsWithin x (Set.Icc a b)) (nhdsWithin x (Set.Icc a b))

instance intervalIntegral.FTCFilter.nhdsUIcc E0 #

∀ {x a b : ℝ} [h : Fact (x ∈ Set.uIcc a b)],
  intervalIntegral.FTCFilter x (nhdsWithin x (Set.uIcc a b)) (nhdsWithin x (Set.uIcc a b))

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae' E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [l'.IsMeasurablyGenerated]
  [Filter.TendstoIxxClass Set.Ioc l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      μ.FiniteAtFilter l' →
        Filter.Tendsto u lt l →
          Filter.Tendsto v lt l →
            (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ - ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt] fun t ↦
              ∫ (x : ℝ) in u t..v t, 1 ∂μ

Fundamental theorem of calculus-1, local version for any measure. Let filters l and l' be related by TendstoIxxClass Ioc. If f has a finite limit c at l' ⊓ ae μ, where μ is a measure finite at l', then ∫ x in u..v, f x ∂μ = ∫ x in u..v, c ∂μ + o(∫ x in u..v, 1 ∂μ) as both u and v tend to l.

See also measure_integral_sub_linear_isLittleO_of_tendsto_ae for a version assuming [intervalIntegral.FTCFilter a l l'] and [MeasureTheory.IsLocallyFiniteMeasure μ]. If l is one of 𝓝[≥] a, 𝓝[≤] a, 𝓝 a, then it's easier to apply the non-primed version. The primed version also works, e.g., for l = l' = atTop.

We use integrals of constants instead of measures because this way it is easier to formulate a statement that works in both cases u ≤ v and v ≤ u.

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le' E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [CompleteSpace E]
  [l'.IsMeasurablyGenerated] [Filter.TendstoIxxClass Set.Ioc l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      μ.FiniteAtFilter l' →
        Filter.Tendsto u lt l →
          Filter.Tendsto v lt l →
            u ≤ᶠ[lt] v →
              (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ - μ.real (Set.Ioc (u t) (v t)) • c) =o[lt] fun t ↦
                μ.real (Set.Ioc (u t) (v t))

Fundamental theorem of calculus-1, local version for any measure. Let filters l and l' be related by TendstoIxxClass Ioc. If f has a finite limit c at l ⊓ ae μ, where μ is a measure finite at l, then ∫ x in u..v, f x ∂μ = μ (Ioc u v) • c + o(μ(Ioc u v)) as both u and v tend to l so that u ≤ v.

See also measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le for a version assuming [intervalIntegral.FTCFilter a l l'] and [MeasureTheory.IsLocallyFiniteMeasure μ]. If l is one of 𝓝[≥] a, 𝓝[≤] a, 𝓝 a, then it's easier to apply the non-primed version. The primed version also works, e.g., for l = l' = Filter.atTop.

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_ge' E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [CompleteSpace E]
  [l'.IsMeasurablyGenerated] [Filter.TendstoIxxClass Set.Ioc l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      μ.FiniteAtFilter l' →
        Filter.Tendsto u lt l →
          Filter.Tendsto v lt l →
            v ≤ᶠ[lt] u →
              (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ + μ.real (Set.Ioc (v t) (u t)) • c) =o[lt] fun t ↦
                μ.real (Set.Ioc (v t) (u t))

Fundamental theorem of calculus-1, local version for any measure. Let filters l and l' be related by TendstoIxxClass Ioc. If f has a finite limit c at l ⊓ ae μ, where μ is a measure finite at l, then ∫ x in u..v, f x ∂μ = -μ (Ioc v u) • c + o(μ(Ioc v u)) as both u and v tend to l so that v ≤ u.

See also measure_integral_sub_linear_is_o_of_tendsto_ae_of_ge for a version assuming [intervalIntegral.FTCFilter a l l'] and [MeasureTheory.IsLocallyFiniteMeasure μ]. If l is one of 𝓝[≥] a, 𝓝[≤] a, 𝓝 a, then it's easier to apply the non-primed version. The primed version also works, e.g., for l = l' = Filter.atTop.

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a : ℝ} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [MeasureTheory.IsLocallyFiniteMeasure μ]
  [intervalIntegral.FTCFilter a l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      Filter.Tendsto u lt l →
        Filter.Tendsto v lt l →
          (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ - ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt] fun t ↦
            ∫ (x : ℝ) in u t..v t, 1 ∂μ

Fundamental theorem of calculus-1, local version for any measure.

Let filters l and l' be related by [intervalIntegral.FTCFilter a l l']; let μ be a locally finite measure. If f has a finite limit c at l' ⊓ ae μ, then ∫ x in u..v, f x ∂μ = ∫ x in u..v, c ∂μ + o(∫ x in u..v, 1 ∂μ) as both u and v tend to l.

See also measure_integral_sub_linear_isLittleO_of_tendsto_ae' for a version that also works, e.g., for l = l' = Filter.atTop.

We use integrals of constants instead of measures because this way it is easier to formulate a statement that works in both cases u ≤ v and v ≤ u.

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a : ℝ} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [MeasureTheory.IsLocallyFiniteMeasure μ]
  [CompleteSpace E] [intervalIntegral.FTCFilter a l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      Filter.Tendsto u lt l →
        Filter.Tendsto v lt l →
          u ≤ᶠ[lt] v →
            (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ - μ.real (Set.Ioc (u t) (v t)) • c) =o[lt] fun t ↦
              μ.real (Set.Ioc (u t) (v t))

Fundamental theorem of calculus-1, local version for any measure.

Let filters l and l' be related by [intervalIntegral.FTCFilter a l l']; let μ be a locally finite measure. If f has a finite limit c at l' ⊓ ae μ, then ∫ x in u..v, f x ∂μ = μ (Ioc u v) • c + o(μ(Ioc u v)) as both u and v tend to l.

See also measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le' for a version that also works, e.g., for l = l' = Filter.atTop.

theorem intervalIntegral.measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_ge E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a : ℝ} {c : E}
  {l l' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ} [MeasureTheory.IsLocallyFiniteMeasure μ]
  [CompleteSpace E] [intervalIntegral.FTCFilter a l l'],
  StronglyMeasurableAtFilter f l' μ →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (nhds c) →
      Filter.Tendsto u lt l →
        Filter.Tendsto v lt l →
          v ≤ᶠ[lt] u →
            (fun t ↦ ∫ (x : ℝ) in u t..v t, f x ∂μ + μ.real (Set.Ioc (v t) (u t)) • c) =o[lt] fun t ↦
              μ.real (Set.Ioc (v t) (u t))

Fundamental theorem of calculus-1, local version for any measure.

Let filters l and l' be related by [intervalIntegral.FTCFilter a l l']; let μ be a locally finite measure. If f has a finite limit c at l' ⊓ ae μ, then ∫ x in u..v, f x ∂μ = -μ (Set.Ioc v u) • c + o(μ(Set.Ioc v u)) as both u and v tend to l.

See also measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_ge' for a version that also works, e.g., for l = l' = Filter.atTop.

theorem intervalIntegral.measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a b : ℝ}
  {ca cb : E} {la la' lb lb' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {ua va ub vb : ι → ℝ}
  [MeasureTheory.IsLocallyFiniteMeasure μ] [intervalIntegral.FTCFilter a la la'] [intervalIntegral.FTCFilter b lb lb'],
  IntervalIntegrable f μ a b →
    StronglyMeasurableAtFilter f la' μ →
      StronglyMeasurableAtFilter f lb' μ →
        Filter.Tendsto f (la' ⊓ MeasureTheory.ae μ) (nhds ca) →
          Filter.Tendsto f (lb' ⊓ MeasureTheory.ae μ) (nhds cb) →
            Filter.Tendsto ua lt la →
              Filter.Tendsto va lt la →
                Filter.Tendsto ub lt lb →
                  Filter.Tendsto vb lt lb →
                    (fun t ↦
                        ∫ (x : ℝ) in va t..vb t, f x ∂μ - ∫ (x : ℝ) in ua t..ub t, f x ∂μ -
                          (∫ (x : ℝ) in ub t..vb t, cb ∂μ - ∫ (x : ℝ) in ua t..va t, ca ∂μ)) =o[lt]
                      fun t ↦ ‖∫ (x : ℝ) in ua t..va t, 1 ∂μ‖ + ‖∫ (x : ℝ) in ub t..vb t, 1 ∂μ‖

Fundamental theorem of calculus-1, strict derivative in both limits for a locally finite measure.

Let f be a measurable function integrable on a..b. Let (la, la') be a pair of intervalIntegral.FTCFilters around a; let (lb, lb') be a pair of intervalIntegral.FTCFilters around b. Suppose that f has finite limits ca and cb at la' ⊓ ae μ and lb' ⊓ ae μ, respectively. Then ∫ x in va..vb, f x ∂μ - ∫ x in ua..ub, f x ∂μ = ∫ x in ub..vb, cb ∂μ - ∫ x in ua..va, ca ∂μ + o(‖∫ x in ua..va, (1:ℝ) ∂μ‖ + ‖∫ x in ub..vb, (1:ℝ) ∂μ‖) as ua and va tend to la while ub and vb tend to lb.

theorem intervalIntegral.measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_right E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a b : ℝ} {c : E}
  {lb lb' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ}
  [MeasureTheory.IsLocallyFiniteMeasure μ] [intervalIntegral.FTCFilter b lb lb'],
  IntervalIntegrable f μ a b →
    StronglyMeasurableAtFilter f lb' μ →
      Filter.Tendsto f (lb' ⊓ MeasureTheory.ae μ) (nhds c) →
        Filter.Tendsto u lt lb →
          Filter.Tendsto v lt lb →
            (fun t ↦ ∫ (x : ℝ) in a..v t, f x ∂μ - ∫ (x : ℝ) in a..u t, f x ∂μ - ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt]
              fun t ↦ ∫ (x : ℝ) in u t..v t, 1 ∂μ

Fundamental theorem of calculus-1, strict derivative in right endpoint for a locally finite measure.

Let f be a measurable function integrable on a..b. Let (lb, lb') be a pair of intervalIntegral.FTCFilters around b. Suppose that f has a finite limit c at lb' ⊓ ae μ.

Then ∫ x in a..v, f x ∂μ - ∫ x in a..u, f x ∂μ = ∫ x in u..v, c ∂μ + o(∫ x in u..v, (1:ℝ) ∂μ) as u and v tend to lb.

theorem intervalIntegral.measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_left E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f : ℝ → E} {a b : ℝ} {c : E}
  {la la' : Filter ℝ} {lt : Filter ι} {μ : MeasureTheory.Measure ℝ} {u v : ι → ℝ}
  [MeasureTheory.IsLocallyFiniteMeasure μ] [intervalIntegral.FTCFilter a la la'],
  IntervalIntegrable f μ a b →
    StronglyMeasurableAtFilter f la' μ →
      Filter.Tendsto f (la' ⊓ MeasureTheory.ae μ) (nhds c) →
        Filter.Tendsto u lt la →
          Filter.Tendsto v lt la →
            (fun t ↦ ∫ (x : ℝ) in v t..b, f x ∂μ - ∫ (x : ℝ) in u t..b, f x ∂μ + ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt]
              fun t ↦ ∫ (x : ℝ) in u t..v t, 1 ∂μ

Fundamental theorem of calculus-1, strict derivative in left endpoint for a locally finite measure.

Let f be a measurable function integrable on a..b. Let (la, la') be a pair of intervalIntegral.FTCFilters around a. Suppose that f has a finite limit c at la' ⊓ ae μ.

Then ∫ x in v..b, f x ∂μ - ∫ x in u..b, f x ∂μ = -∫ x in u..v, c ∂μ + o(∫ x in u..v, (1:ℝ) ∂μ) as u and v tend to la.

theorem intervalIntegral.integral_sub_linear_isLittleO_of_tendsto_ae E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
  {c : E} {l l' : Filter ℝ} {lt : Filter ι} {a : ℝ} [intervalIntegral.FTCFilter a l l'],
  StronglyMeasurableAtFilter f l' MeasureTheory.volume →
    Filter.Tendsto f (l' ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
      ∀ {u v : ι → ℝ},
        Filter.Tendsto u lt l →
          Filter.Tendsto v lt l → (fun t ↦ (∫ (x : ℝ) in u t..v t, f x) - (v t - u t) • c) =o[lt] (v - u)

Fundamental theorem of calculus-1, local version.

If f has a finite limit c almost surely at l', where (l, l') is an intervalIntegral.FTCFilter pair around a, then ∫ x in u..v, f x ∂μ = (v - u) • c + o (v - u) as both u and v tend to l.

theorem intervalIntegral.integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
  {ca cb : E} {la la' lb lb' : Filter ℝ} {lt : Filter ι} {a b : ℝ} {ua ub va vb : ι → ℝ}
  [intervalIntegral.FTCFilter a la la'] [intervalIntegral.FTCFilter b lb lb'],
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f la' MeasureTheory.volume →
      StronglyMeasurableAtFilter f lb' MeasureTheory.volume →
        Filter.Tendsto f (la' ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
          Filter.Tendsto f (lb' ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
            Filter.Tendsto ua lt la →
              Filter.Tendsto va lt la →
                Filter.Tendsto ub lt lb →
                  Filter.Tendsto vb lt lb →
                    (fun t ↦
                        ((∫ (x : ℝ) in va t..vb t, f x) - ∫ (x : ℝ) in ua t..ub t, f x) -
                          ((vb t - ub t) • cb - (va t - ua t) • ca)) =o[lt]
                      fun t ↦ ‖va t - ua t‖ + ‖vb t - ub t‖

Fundamental theorem of calculus-1, strict differentiability at filter in both endpoints.

If f is a measurable function integrable on a..b, (la, la') is an intervalIntegral.FTCFilter pair around a, and (lb, lb') is an intervalIntegral.FTCFilter pair around b, and f has finite limits ca and cb almost surely at la' and lb', respectively, then (∫ x in va..vb, f x) - ∫ x in ua..ub, f x = (vb - ub) • cb - (va - ua) • ca + o(‖va - ua‖ + ‖vb - ub‖) as ua and va tend to la while ub and vb tend to lb.

This lemma could've been formulated using HasStrictFDerivAtFilter if we had this definition.

theorem intervalIntegral.integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_right E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
  {c : E} {lb lb' : Filter ℝ} {lt : Filter ι} {a b : ℝ} {u v : ι → ℝ} [intervalIntegral.FTCFilter b lb lb'],
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f lb' MeasureTheory.volume →
      Filter.Tendsto f (lb' ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        Filter.Tendsto u lt lb →
          Filter.Tendsto v lt lb →
            (fun t ↦ ((∫ (x : ℝ) in a..v t, f x) - ∫ (x : ℝ) in a..u t, f x) - (v t - u t) • c) =o[lt] (v - u)

Fundamental theorem of calculus-1, strict differentiability at filter in both endpoints.

If f is a measurable function integrable on a..b, (lb, lb') is an intervalIntegral.FTCFilter pair around b, and f has a finite limit c almost surely at lb', then (∫ x in a..v, f x) - ∫ x in a..u, f x = (v - u) • c + o(‖v - u‖) as u and v tend to lb.

This lemma could've been formulated using HasStrictDerivAtFilter if we had this definition.

theorem intervalIntegral.integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_left E2 #

∀ {ι : Type u_1} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
  {c : E} {la la' : Filter ℝ} {lt : Filter ι} {a b : ℝ} {u v : ι → ℝ} [intervalIntegral.FTCFilter a la la'],
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f la' MeasureTheory.volume →
      Filter.Tendsto f (la' ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        Filter.Tendsto u lt la →
          Filter.Tendsto v lt la →
            (fun t ↦ ((∫ (x : ℝ) in v t..b, f x) - ∫ (x : ℝ) in u t..b, f x) + (v t - u t) • c) =o[lt] (v - u)

Fundamental theorem of calculus-1, strict differentiability at filter in both endpoints.

If f is a measurable function integrable on a..b, (la, la') is an intervalIntegral.FTCFilter pair around a, and f has a finite limit c almost surely at la', then (∫ x in v..b, f x) - ∫ x in u..b, f x = -(v - u) • c + o(‖v - u‖) as u and v tend to la.

This lemma could've been formulated using HasStrictDerivAtFilter if we had this definition.

theorem intervalIntegral.integral_hasStrictFDerivAt_of_tendsto_ae E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {ca cb : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
          Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
            HasStrictFDerivAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
              ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca) (a, b)

Fundamental theorem of calculus-1, strict differentiability in both endpoints.

If f : ℝ → E is integrable on a..b and f x has finite limits ca and cb almost surely as x tends to a and b, respectively, then (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca at (a, b) in the sense of strict differentiability.

theorem intervalIntegral.integral_hasStrictFDerivAt E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        ContinuousAt f a →
          ContinuousAt f b →
            HasStrictFDerivAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
              ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)) (a, b)

Fundamental theorem of calculus-1, strict differentiability in both endpoints.

If f : ℝ → E is integrable on a..b and f is continuous at a and b, then (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca at (a, b) in the sense of strict differentiability.

theorem intervalIntegral.integral_hasStrictDerivAt_of_tendsto_ae_right E3 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        HasStrictDerivAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) c b

Fundamental theorem of calculus-1, strict differentiability in the right endpoint.

If f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely at b, then u ↦ ∫ x in a..u, f x has derivative c at b in the sense of strict differentiability.

theorem intervalIntegral.integral_hasStrictDerivAt_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      ContinuousAt f b → HasStrictDerivAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) (f b) b

Fundamental theorem of calculus-1, strict differentiability in the right endpoint.

If f : ℝ → E is integrable on a..b and f is continuous at b, then u ↦ ∫ x in a..u, f x has derivative f b at b in the sense of strict differentiability.

theorem intervalIntegral.integral_hasStrictDerivAt_of_tendsto_ae_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        HasStrictDerivAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-c) a

Fundamental theorem of calculus-1, strict differentiability in the left endpoint.

If f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely at a, then u ↦ ∫ x in u..b, f x has derivative -c at a in the sense of strict differentiability.

theorem intervalIntegral.integral_hasStrictDerivAt_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      ContinuousAt f a → HasStrictDerivAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-f a) a

Fundamental theorem of calculus-1, strict differentiability in the left endpoint.

If f : ℝ → E is integrable on a..b and f is continuous at a, then u ↦ ∫ x in u..b, f x has derivative -f a at a in the sense of strict differentiability.

theorem Continuous.integral_hasStrictDerivAt E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E},
  Continuous f → ∀ (a b : ℝ), HasStrictDerivAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) (f b) b

Fundamental theorem of calculus-1, strict differentiability in the right endpoint.

If f : ℝ → E is continuous, then u ↦ ∫ x in a..u, f x has derivative f b at b in the sense of strict differentiability.

theorem Continuous.deriv_integral E3 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] (f : ℝ → E),
  Continuous f → ∀ (a b : ℝ), deriv (fun u ↦ ∫ (x : ℝ) in a..u, f x) b = f b

Fundamental theorem of calculus-1, derivative in the right endpoint.

If f : ℝ → E is continuous, then the derivative of u ↦ ∫ x in a..u, f x at b is f b.

theorem intervalIntegral.integral_hasFDerivAt_of_tendsto_ae E3 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {ca cb : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
          Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
            HasFDerivAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
              ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca) (a, b)

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f x has finite limits ca and cb almost surely as x tends to a and b, respectively, then (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca at (a, b).

theorem intervalIntegral.integral_hasFDerivAt E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        ContinuousAt f a →
          ContinuousAt f b →
            HasFDerivAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
              ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)) (a, b)

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f is continuous at a and b, then (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca at (a, b).

theorem intervalIntegral.fderiv_integral_of_tendsto_ae E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {ca cb : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
          Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
            fderiv ℝ (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x) (a, b) =
              (ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f x has finite limits ca and cb almost surely as x tends to a and b, respectively, then fderiv derivative of (u, v) ↦ ∫ x in u..v, f x at (a, b) equals (u, v) ↦ v • cb - u • ca.

theorem intervalIntegral.fderiv_integral E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
        ContinuousAt f a →
          ContinuousAt f b →
            fderiv ℝ (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x) (a, b) =
              (ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f is continuous at a and b, then fderiv derivative of (u, v) ↦ ∫ x in u..v, f x at (a, b) equals (u, v) ↦ v • cb - u • ca.

theorem intervalIntegral.integral_hasDerivAt_of_tendsto_ae_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        HasDerivAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) c b

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely at b, then u ↦ ∫ x in a..u, f x has derivative c at b.

theorem intervalIntegral.integral_hasDerivAt_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      ContinuousAt f b → HasDerivAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) (f b) b

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f is continuous at b, then u ↦ ∫ x in a..u, f x has derivative f b at b.

theorem intervalIntegral.deriv_integral_of_tendsto_ae_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      Filter.Tendsto f (nhds b ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        deriv (fun u ↦ ∫ (x : ℝ) in a..u, f x) b = c

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f has a finite limit c almost surely at b, then the derivative of u ↦ ∫ x in a..u, f x at b equals c.

theorem intervalIntegral.deriv_integral_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume →
      ContinuousAt f b → deriv (fun u ↦ ∫ (x : ℝ) in a..u, f x) b = f b

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f is continuous at b, then the derivative of u ↦ ∫ x in a..u, f x at b equals f b.

theorem intervalIntegral.integral_hasDerivAt_of_tendsto_ae_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        HasDerivAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-c) a

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely at a, then u ↦ ∫ x in u..b, f x has derivative -c at a.

theorem intervalIntegral.integral_hasDerivAt_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      ContinuousAt f a → HasDerivAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-f a) a

Fundamental theorem of calculus-1: if f : ℝ → E is integrable on a..b and f is continuous at a, then u ↦ ∫ x in u..b, f x has derivative -f a at a.

theorem intervalIntegral.deriv_integral_of_tendsto_ae_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      Filter.Tendsto f (nhds a ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
        deriv (fun u ↦ ∫ (x : ℝ) in u..b, f x) a = -c

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f has a finite limit c almost surely at a, then the derivative of u ↦ ∫ x in u..b, f x at a equals -c.

theorem intervalIntegral.deriv_integral_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f (nhds a) MeasureTheory.volume →
      ContinuousAt f a → deriv (fun u ↦ ∫ (x : ℝ) in u..b, f x) a = -f a

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f is continuous at a, then the derivative of u ↦ ∫ x in u..b, f x at a equals -f a.

theorem intervalIntegral.integral_hasFDerivWithinAt_of_tendsto_ae E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {ca cb : E}
  {la lb : Filter ℝ} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) la]
      [intervalIntegral.FTCFilter b (nhdsWithin b t) lb],
      StronglyMeasurableAtFilter f la MeasureTheory.volume →
        StronglyMeasurableAtFilter f lb MeasureTheory.volume →
          Filter.Tendsto f (la ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
            Filter.Tendsto f (lb ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
              HasFDerivWithinAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
                ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca) (s ×ˢ t)
                (a, b)

Let f be a measurable function integrable on a..b. The function (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • cb - u • ca within s × t at (a, b), where s ∈ {Iic a, {a}, Ici a, univ} and t ∈ {Iic b, {b}, Ici b, univ} provided that f tends to ca and cb almost surely at the filters la and lb from the following table.

| s | la | t | lb | | ------- | ---- | --- | ---- | | Iic a | 𝓝[≤] a | Iic b | 𝓝[≤] b | | Ici a | 𝓝[>] a | Ici b | 𝓝[>] b | | {a} | ⊥ | {b} | ⊥ | | univ | 𝓝 a | univ | 𝓝 b |

theorem intervalIntegral.integral_hasFDerivWithinAt E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
  {la lb : Filter ℝ} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f la MeasureTheory.volume →
      StronglyMeasurableAtFilter f lb MeasureTheory.volume →
        ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) la]
          [intervalIntegral.FTCFilter b (nhdsWithin b t) lb],
          Filter.Tendsto f la (nhds (f a)) →
            Filter.Tendsto f lb (nhds (f b)) →
              HasFDerivWithinAt (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x)
                ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a))
                (s ×ˢ t) (a, b)

Let f be a measurable function integrable on a..b. The function (u, v) ↦ ∫ x in u..v, f x has derivative (u, v) ↦ v • f b - u • f a within s × t at (a, b), where s ∈ {Iic a, {a}, Ici a, univ} and t ∈ {Iic b, {b}, Ici b, univ} provided that f tends to f a and f b at the filters la and lb from the following table. In most cases this assumption is definitionally equal ContinuousAt f _ or ContinuousWithinAt f _ _.

| s | la | t | lb | | ------- | ---- | --- | ---- | | Iic a | 𝓝[≤] a | Iic b | 𝓝[≤] b | | Ici a | 𝓝[>] a | Ici b | 𝓝[>] b | | {a} | ⊥ | {b} | ⊥ | | univ | 𝓝 a | univ | 𝓝 b |

def intervalIntegral.tacticUniqueDiffWithinAt_Ici_Iic_univ E1 #

Lean.ParserDescr

An auxiliary tactic closing goals UniqueDiffWithinAt ℝ s a where s ∈ {Iic a, Ici a, univ}.

theorem intervalIntegral.fderivWithin_integral_of_tendsto_ae E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {ca cb : E}
  {la lb : Filter ℝ} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    StronglyMeasurableAtFilter f la MeasureTheory.volume →
      StronglyMeasurableAtFilter f lb MeasureTheory.volume →
        ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) la]
          [intervalIntegral.FTCFilter b (nhdsWithin b t) lb],
          Filter.Tendsto f (la ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds ca) →
            Filter.Tendsto f (lb ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds cb) →
              autoParam (UniqueDiffWithinAt ℝ s a) intervalIntegral.fderivWithin_integral_of_tendsto_ae._auto_1 →
                autoParam (UniqueDiffWithinAt ℝ t b) intervalIntegral.fderivWithin_integral_of_tendsto_ae._auto_3 →
                  fderivWithin ℝ (fun p ↦ ∫ (x : ℝ) in p.1..p.2, f x) (s ×ˢ t) (a, b) =
                    (ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca

Let f be a measurable function integrable on a..b. Choose s ∈ {Iic a, Ici a, univ} and t ∈ {Iic b, Ici b, univ}. Suppose that f tends to ca and cb almost surely at the filters la and lb from the table below. Then fderivWithin ℝ (fun p ↦ ∫ x in p.1..p.2, f x) (s ×ˢ t) is equal to (u, v) ↦ u • cb - v • ca.

| s | la | t | lb | | ------- | ---- | --- | ---- | | Iic a | 𝓝[≤] a | Iic b | 𝓝[≤] b | | Ici a | 𝓝[>] a | Ici b | 𝓝[>] b | | {a} | ⊥ | {b} | ⊥ | | univ | 𝓝 a | univ | 𝓝 b |

theorem intervalIntegral.integral_hasDerivWithinAt_of_tendsto_ae_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter b (nhdsWithin b s) (nhdsWithin b t)],
      StronglyMeasurableAtFilter f (nhdsWithin b t) MeasureTheory.volume →
        Filter.Tendsto f (nhdsWithin b t ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
          HasDerivWithinAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) c s b

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely as x tends to b from the right or from the left, then u ↦ ∫ x in a..u, f x has right (resp., left) derivative c at b.

theorem intervalIntegral.integral_hasDerivWithinAt_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter b (nhdsWithin b s) (nhdsWithin b t)],
      StronglyMeasurableAtFilter f (nhdsWithin b t) MeasureTheory.volume →
        ContinuousWithinAt f t b → HasDerivWithinAt (fun u ↦ ∫ (x : ℝ) in a..u, f x) (f b) s b

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x is continuous from the left or from the right at b, then u ↦ ∫ x in a..u, f x has left (resp., right) derivative f b at b.

theorem intervalIntegral.derivWithin_integral_of_tendsto_ae_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter b (nhdsWithin b s) (nhdsWithin b t)],
      StronglyMeasurableAtFilter f (nhdsWithin b t) MeasureTheory.volume →
        Filter.Tendsto f (nhdsWithin b t ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
          autoParam (UniqueDiffWithinAt ℝ s b) intervalIntegral.derivWithin_integral_of_tendsto_ae_right._auto_1 →
            derivWithin (fun u ↦ ∫ (x : ℝ) in a..u, f x) s b = c

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely as x tends to b from the right or from the left, then the right (resp., left) derivative of u ↦ ∫ x in a..u, f x at b equals c.

theorem intervalIntegral.derivWithin_integral_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter b (nhdsWithin b s) (nhdsWithin b t)],
      StronglyMeasurableAtFilter f (nhdsWithin b t) MeasureTheory.volume →
        ContinuousWithinAt f t b →
          autoParam (UniqueDiffWithinAt ℝ s b) intervalIntegral.derivWithin_integral_right._auto_1 →
            derivWithin (fun u ↦ ∫ (x : ℝ) in a..u, f x) s b = f b

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x is continuous on the right or on the left at b, then the right (resp., left) derivative of u ↦ ∫ x in a..u, f x at b equals f b.

theorem intervalIntegral.integral_hasDerivWithinAt_of_tendsto_ae_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) (nhdsWithin a t)],
      StronglyMeasurableAtFilter f (nhdsWithin a t) MeasureTheory.volume →
        Filter.Tendsto f (nhdsWithin a t ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
          HasDerivWithinAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-c) s a

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely as x tends to a from the right or from the left, then u ↦ ∫ x in u..b, f x has right (resp., left) derivative -c at a.

theorem intervalIntegral.integral_hasDerivWithinAt_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) (nhdsWithin a t)],
      StronglyMeasurableAtFilter f (nhdsWithin a t) MeasureTheory.volume →
        ContinuousWithinAt f t a → HasDerivWithinAt (fun u ↦ ∫ (x : ℝ) in u..b, f x) (-f a) s a

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x is continuous from the left or from the right at a, then u ↦ ∫ x in u..b, f x has left (resp., right) derivative -f a at a.

theorem intervalIntegral.derivWithin_integral_of_tendsto_ae_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {c : E}
  {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) (nhdsWithin a t)],
      StronglyMeasurableAtFilter f (nhdsWithin a t) MeasureTheory.volume →
        Filter.Tendsto f (nhdsWithin a t ⊓ MeasureTheory.ae MeasureTheory.volume) (nhds c) →
          autoParam (UniqueDiffWithinAt ℝ s a) intervalIntegral.derivWithin_integral_of_tendsto_ae_left._auto_1 →
            derivWithin (fun u ↦ ∫ (x : ℝ) in u..b, f x) s a = -c

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x has a finite limit c almost surely as x tends to a from the right or from the left, then the right (resp., left) derivative of u ↦ ∫ x in u..b, f x at a equals -c.

theorem intervalIntegral.derivWithin_integral_left E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a b : ℝ},
  IntervalIntegrable f MeasureTheory.volume a b →
    ∀ {s t : Set ℝ} [intervalIntegral.FTCFilter a (nhdsWithin a s) (nhdsWithin a t)],
      StronglyMeasurableAtFilter f (nhdsWithin a t) MeasureTheory.volume →
        ContinuousWithinAt f t a →
          autoParam (UniqueDiffWithinAt ℝ s a) intervalIntegral.derivWithin_integral_left._auto_1 →
            derivWithin (fun u ↦ ∫ (x : ℝ) in u..b, f x) s a = -f a

Fundamental theorem of calculus: if f : ℝ → E is integrable on a..b and f x is continuous on the right or on the left at a, then the right (resp., left) derivative of u ↦ ∫ x in u..b, f x at a equals -f a.

theorem intervalIntegral.differentiable_integral_of_continuous E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a : ℝ},
  Continuous f → Differentiable ℝ fun u ↦ ∫ (x : ℝ) in a..u, f x

The integral of a continuous function is differentiable on a real set s.

theorem intervalIntegral.differentiableOn_integral_of_continuous E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E} {a : ℝ}
  {s : Set ℝ}, Continuous f → DifferentiableOn ℝ (fun u ↦ ∫ (x : ℝ) in a..u, f x) s

The integral of a continuous function is differentiable on a real set s.

theorem intervalIntegral.sub_le_integral_of_hasDeriv_right_of_le_Ico E2 #

∀ {g' g φ : ℝ → ℝ} {a b : ℝ},
  a ≤ b →
    ContinuousOn g (Set.Icc a b) →
      (∀ x ∈ Set.Ico a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x) →
        MeasureTheory.IntegrableOn φ (Set.Icc a b) MeasureTheory.volume →
          (∀ x ∈ Set.Ico a b, g' x ≤ φ x) → g b - g a ≤ ∫ (y : ℝ) in a..b, φ y

Hard part of FTC-2 for integrable derivatives, real-valued functions: one has g b - g a ≤ ∫ y in a..b, g' y when g' is integrable. Auxiliary lemma in the proof of integral_eq_sub_of_hasDeriv_right_of_le. We give the slightly more general version that g b - g a ≤ ∫ y in a..b, φ y when g' ≤ φ and φ is integrable (even if g' is not known to be integrable). Version assuming that g is differentiable on [a, b).

theorem intervalIntegral.sub_le_integral_of_hasDeriv_right_of_le E2 #

∀ {g' g φ : ℝ → ℝ} {a b : ℝ},
  a ≤ b →
    ContinuousOn g (Set.Icc a b) →
      (∀ x ∈ Set.Ioo a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x) →
        MeasureTheory.IntegrableOn φ (Set.Icc a b) MeasureTheory.volume →
          (∀ x ∈ Set.Ioo a b, g' x ≤ φ x) → g b - g a ≤ ∫ (y : ℝ) in a..b, φ y

Hard part of FTC-2 for integrable derivatives, real-valued functions: one has g b - g a ≤ ∫ y in a..b, g' y when g' is integrable. Auxiliary lemma in the proof of integral_eq_sub_of_hasDeriv_right_of_le. We give the slightly more general version that g b - g a ≤ ∫ y in a..b, φ y when g' ≤ φ and φ is integrable (even if g' is not known to be integrable). Version assuming that g is differentiable on (a, b).

theorem intervalIntegral.integral_le_sub_of_hasDeriv_right_of_le E2 #

∀ {g' g φ : ℝ → ℝ} {a b : ℝ},
  a ≤ b →
    ContinuousOn g (Set.Icc a b) →
      (∀ x ∈ Set.Ioo a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x) →
        MeasureTheory.IntegrableOn φ (Set.Icc a b) MeasureTheory.volume →
          (∀ x ∈ Set.Ioo a b, φ x ≤ g' x) → ∫ (y : ℝ) in a..b, φ y ≤ g b - g a

Auxiliary lemma in the proof of integral_eq_sub_of_hasDeriv_right_of_le.

theorem intervalIntegral.integral_eq_sub_of_hasDeriv_right_of_le_real E2 #

∀ {g' g : ℝ → ℝ} {a b : ℝ},
  a ≤ b →
    ContinuousOn g (Set.Icc a b) →
      (∀ x ∈ Set.Ioo a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x) →
        MeasureTheory.IntegrableOn g' (Set.Icc a b) MeasureTheory.volume → ∫ (y : ℝ) in a..b, g' y = g b - g a

Auxiliary lemma in the proof of integral_eq_sub_of_hasDeriv_right_of_le: real version

theorem intervalIntegral.integral_eq_sub_of_hasDeriv_right_of_le E3 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f f' : ℝ → E},
  a ≤ b →
    ContinuousOn f (Set.Icc a b) →
      (∀ x ∈ Set.Ioo a b, HasDerivWithinAt f (f' x) (Set.Ioi x) x) →
        IntervalIntegrable f' MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, f' y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E is continuous on [a, b] (where a ≤ b) and has a right derivative at f' x for all x in (a, b), and f' is integrable on [a, b], then ∫ y in a..b, f' y equals f b - f a.

theorem intervalIntegral.integral_eq_sub_of_hasDeriv_right E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f f' : ℝ → E},
  ContinuousOn f (Set.uIcc a b) →
    (∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Set.Ioi x) x) →
      IntervalIntegrable f' MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, f' y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E is continuous on [a, b] and has a right derivative at f' x for all x in [a, b), and f' is integrable on [a, b] then ∫ y in a..b, f' y equals f b - f a.

theorem intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f f' : ℝ → E},
  a ≤ b →
    ContinuousOn f (Set.Icc a b) →
      (∀ x ∈ Set.Ioo a b, HasDerivAt f (f' x) x) →
        IntervalIntegrable f' MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, f' y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E is continuous on [a, b] (where a ≤ b) and has a derivative at f' x for all x in (a, b), and f' is integrable on [a, b], then ∫ y in a..b, f' y equals f b - f a.

theorem intervalIntegral.integral_eq_sub_of_hasDerivAt E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f f' : ℝ → E},
  (∀ x ∈ Set.uIcc a b, HasDerivAt f (f' x) x) →
    IntervalIntegrable f' MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, f' y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E has a derivative at f' x for all x in [a, b] and f' is integrable on [a, b], then ∫ y in a..b, f' y equals f b - f a.

theorem intervalIntegral.integral_eq_sub_of_hasDerivAt_of_tendsto E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f f' : ℝ → E},
  a < b →
    ∀ {fa fb : E},
      (∀ x ∈ Set.Ioo a b, HasDerivAt f (f' x) x) →
        IntervalIntegrable f' MeasureTheory.volume a b →
          Filter.Tendsto f (nhdsWithin a (Set.Ioi a)) (nhds fa) →
            Filter.Tendsto f (nhdsWithin b (Set.Iio b)) (nhds fb) → ∫ (y : ℝ) in a..b, f' y = fb - fa

theorem intervalIntegral.integral_deriv_eq_sub E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f : ℝ → E},
  (∀ x ∈ Set.uIcc a b, DifferentiableAt ℝ f x) →
    IntervalIntegrable (deriv f) MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, deriv f y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E is differentiable at every x in [a, b] and its derivative is integrable on [a, b], then ∫ y in a..b, deriv f y equals f b - f a.

See also integral_deriv_of_contDiffOn_Icc for a similar theorem assuming that f is C^1.

theorem intervalIntegral.integral_deriv_eq_sub' E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f' : ℝ → E}
  (f : ℝ → E),
  deriv f = f' →
    (∀ x ∈ Set.uIcc a b, DifferentiableAt ℝ f x) → ContinuousOn f' (Set.uIcc a b) → ∫ (y : ℝ) in a..b, f' y = f b - f a

theorem intervalIntegral.integral_deriv_eq_sub_uIoo E2 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {a b : ℝ} [CompleteSpace E] {f : ℝ → E},
  ContinuousOn f (Set.uIcc a b) →
    (∀ x ∈ Set.uIoo a b, DifferentiableAt ℝ f x) →
      IntervalIntegrable (deriv f) MeasureTheory.volume a b → ∫ (y : ℝ) in a..b, deriv f y = f b - f a

Fundamental theorem of calculus-2: If f : ℝ → E is differentiable at every x in (a, b) and its derivative is integrable on [a, b], then ∫ y in a..b, deriv f y equals f b - f a.

theorem intervalIntegral.integral_unitInterval_deriv_eq_sub E2 #

∀ {𝕜 : Type u_2} {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E]
  [inst_3 : RCLike 𝕜] [inst_4 : NormedSpace 𝕜 E] {f f' : 𝕜 → E} {z₀ z₁ : 𝕜},
  ContinuousOn (fun t ↦ f' (z₀ + t • z₁)) (Set.Icc 0 1) →
    (∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (z₀ + t • z₁)) (z₀ + t • z₁)) →
      z₁ • ∫ (t : ℝ) in 0..1, f' (z₀ + t • z₁) = f (z₀ + z₁) - f z₀

A variant of intervalIntegral.integral_deriv_eq_sub, the Fundamental theorem of calculus, involving integrating over the unit interval.

theorem intervalIntegral.integrableOn_deriv_right_of_nonneg E1 #

∀ {g' g : ℝ → ℝ} {a b : ℝ},
  ContinuousOn g (Set.Icc a b) →
    (∀ x ∈ Set.Ioo a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x) →
      (∀ x ∈ Set.Ioo a b, 0 ≤ g' x) → MeasureTheory.IntegrableOn g' (Set.Ioc a b) MeasureTheory.volume

When the right derivative of a function is nonnegative, then it is automatically integrable.

theorem intervalIntegral.integrableOn_deriv_of_nonneg E1 #

∀ {g' g : ℝ → ℝ} {a b : ℝ},
  ContinuousOn g (Set.Icc a b) →
    (∀ x ∈ Set.Ioo a b, HasDerivAt g (g' x) x) →
      (∀ x ∈ Set.Ioo a b, 0 ≤ g' x) → MeasureTheory.IntegrableOn g' (Set.Ioc a b) MeasureTheory.volume

When the derivative of a function is nonnegative, then it is automatically integrable, Ioc version.

theorem intervalIntegral.intervalIntegrable_deriv_of_nonneg E1 #

∀ {g' g : ℝ → ℝ} {a b : ℝ},
  ContinuousOn g (Set.uIcc a b) →
    (∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt g (g' x) x) →
      (∀ x ∈ Set.Ioo (min a b) (max a b), 0 ≤ g' x) → IntervalIntegrable g' MeasureTheory.volume a b

When the derivative of a function is nonnegative, then it is automatically integrable, interval version.