theorempoint_le_base_add_variation (FG : ℝ→ℝ)
(hG : ContinuousG) (hderiv : ∀ x, HasDerivAtF (G x) x)
{a x b : ℝ} (hax : a ≤ x) (hxb : x ≤ b) :
F x ≤F a + ∫ t in a..b, |G t| :=by
proof · 13
lines
haveheq : (∫ t in a..x, G t) = F x - F a :=
intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hderiv t)
(hG.intervalIntegrable a x)
havehbound : F x - F a ≤∫ t in a..b, |G t| :=bycalcF x - F a ≤ |F x - F a| := le_abs_self _
_ = |∫ t in a..x, G t| := congrArg abs heq.symm
_ ≤∫ t in a..x, |G t| := intervalIntegral.abs_integral_le_integral_abs hax
_ ≤∫ t in a..b, |G t| :=
intervalIntegral.integral_mono_interval le_rfl hax hxb
(Filter.Eventually.of_forall (fun t => abs_nonneg (G t)))
(hG.abs.intervalIntegrable a b)
linarith
theoremsum_norm_sq_varying_parameter_le {ι : Type*} (samples : Finset ι)
(f g : ι →ℝ→ℂ) (β : ι →ℝ) {a b : ℝ}
(hβ : ∀ i ∈ samples, β i ∈Icc a b)
(hf : ∀ i ∈ samples, Continuous (f i)) (hg : ∀ i ∈ samples, Continuous (g i))
(hderiv : ∀ i ∈ samples, ∀ t, HasDerivAt (f i) (g i t) t) :
(∑ i ∈ samples, ‖f i (β i)‖ ^ 2) ≤
(∑ i ∈ samples, ‖f i a‖ ^ 2) +
∫ t in a..b, ∑ i ∈ samples, (‖f i t‖ ^ 2 + ‖g i t‖ ^ 2) :=by
proof · 12
lines
calc
(∑ i ∈ samples, ‖f i (β i)‖ ^ 2) ≤∑ i ∈ samples, (‖f i a‖ ^ 2 +
∫ t in a..b, (‖f i t‖ ^ 2 + ‖g i t‖ ^ 2)) :=by
apply Finset.sum_le_sum
intro i hi
exact norm_sq_le_base_add_energy (f i) (g i) (hf i hi) (hg i hi)
(hderiv i hi) (hβ i hi).1 (hβ i hi).2
_ = _ :=by
rw [Finset.sum_add_distrib, intervalIntegral.integral_finsetSum]
intro i hi
exact ((hf i hi).norm.pow 2 |>.add ((hg i hi).norm.pow 2)).intervalIntegrable a b
theoremsum_norm_sq_varying_parameter_le_of_uniform {ι : Type*} (samples : Finset ι)
(f g : ι →ℝ→ℂ) (β : ι →ℝ) {a b B₀B₁ : ℝ}
(hab : a ≤ b) (hlen : b - a ≤1) (hB₀ : 0≤B₀) (hB₁ : 0≤B₁)
(hβ : ∀ i ∈ samples, β i ∈Icc a b)
(hf : ∀ i ∈ samples, Continuous (f i)) (hg : ∀ i ∈ samples, Continuous (g i))
(hderiv : ∀ i ∈ samples, ∀ t, HasDerivAt (f i) (g i t) t)
(hbound₀ : ∀ t ∈Icc a b, (∑ i ∈ samples, ‖f i t‖ ^ 2) ≤B₀)
(hbound₁ : ∀ t ∈Icc a b, (∑ i ∈ samples, ‖g i t‖ ^ 2) ≤B₁) :
(∑ i ∈ samples, ‖f i (β i)‖ ^ 2) ≤2 * B₀ + B₁:=by
proof · 16
lines
have hbase := hbound₀ a ⟨le_rfl, hab⟩
havehc : Continuous (fun t =>∑ i ∈ samples, (‖f i t‖ ^ 2 + ‖g i t‖ ^ 2)) :=
continuous_finsetSum samples fun i hi => (hf i hi).norm.pow 2 |>.add ((hg i hi).norm.pow 2)
havehint : (∫ t in a..b, ∑ i ∈ samples, (‖f i t‖ ^ 2 + ‖g i t‖ ^ 2)) ≤B₀ + B₁:=bycalc
_ ≤∫ t in a..b, (B₀ + B₁) :=by
apply intervalIntegral.integral_mono_on hab (hc.intervalIntegrable a b)
(intervalIntegrable_const)
intro t ht
rw [Finset.sum_add_distrib]
exact add_le_add (hbound₀ t ht) (hbound₁ t ht)
_ = (b - a) * (B₀ + B₁) :=by simp [mul_add]
_ ≤B₀ + B₁:=by nlinarith
have h := sum_norm_sq_varying_parameter_le samples f g β hβ hf hg hderiv
linarith