Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: add a version of FTC-2 with an integral over the unit interval #8615

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ We use FTC-1 to prove several versions of FTC-2 for the Lebesgue measure, using
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
* `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
Expand Down Expand Up @@ -1243,6 +1243,27 @@ theorem integral_deriv_eq_sub' (f) (hderiv : deriv f = f')
exact hcont.intervalIntegrable
#align interval_integral.integral_deriv_eq_sub' intervalIntegral.integral_deriv_eq_sub'

/-- A variant of `intervalIntegral.integral_deriv_eq_sub`, the Fundamental theorem
of calculus, involving integrating over the unit interval. -/
lemma integral_unitInterval_deriv_eq_sub [IsROrC 𝕜] [NormedSpace 𝕜 E] [IsScalarTower ℝ 𝕜 E]
{f f' : 𝕜 → E} {z₀ z₁ : 𝕜}
(hcont : ContinuousOn (fun t : ℝ ↦ f' (z₀ + t • z₁)) (Set.Icc 0 1))
(hderiv : ∀ 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₀ := by
let γ (t : ℝ) : 𝕜 := z₀ + t • z₁
have hint : IntervalIntegrable (z₁ • (f' ∘ γ)) MeasureTheory.volume 0 1 :=
MichaelStollBayreuth marked this conversation as resolved.
Show resolved Hide resolved
(ContinuousOn.const_smul hcont z₁).intervalIntegrable_of_Icc zero_le_one
have hderiv' : ∀ t ∈ Set.uIcc (0 : ℝ) 1, HasDerivAt (f ∘ γ) (z₁ • (f' ∘ γ) t) t
· intro t ht
refine (hderiv t <| (Set.uIcc_of_le (α := ℝ) zero_le_one).symm ▸ ht).scomp t ?_
have : HasDerivAt (fun t : ℝ ↦ t • z₁) z₁ t
· convert (hasDerivAt_id t).smul_const (F := 𝕜) _ using 1
simp only [one_smul]
exact this.const_add z₀
convert (integral_eq_sub_of_hasDerivAt hderiv' hint) using 1
· simp_rw [← integral_smul, Function.comp_apply]
· simp only [Function.comp_apply, one_smul, zero_smul, add_zero]

/-!
### Automatic integrability for nonnegative derivatives
-/
Expand Down