noncomputabledefexternalCovariance (t u : ℝ) : ℝ:=
body · 3
lines
externalAverage ξ μ ν η r s S a TQ m base old DE f t u -
oldTreeAverage ξ μ ν r s STQ (fun j => m j.succ) base old f *
externalAverage ξ μ ν η r s S a TQ m base old DE (fun _ =>1) t u
externalCoefficientAverage ξ μ ν η r s S a TQ m base old DE f k -
oldTreeAverage ξ μ ν r s STQ (fun j => m j.succ) base old f *
externalCoefficientAverage ξ μ ν η r s S a TQ m base old DE (fun _ =>1) k
lemmaexternalCovariance_taylor_bound {t : ℝ} (ht : t ∈Set.Icc (0:ℝ) (1/2)) (k : ℕ) :
|externalCovariance ξ μ ν η r s S a TQ m base old DE f t 0 -
∑ j ∈Finset.range (k+1), covarianceCoefficient ξ μ ν η r s S a TQ m base old DE f j*t^j| ≤
(2*B*PrescribedTree.derivativeBound (S.leaves+(Finset.univ.erase a).card) (k+1)/(k.factorial:ℝ))*t^(k+1) :=by
proof · 22
lines
have h1 := externalAverage_taylor_bound ξ μ ν η r s S a TQ m base old DE f hb hm hmono hpos hroot hend hB hf hD hE ht k
have h2 := externalAverage_taylor_bound ξ μ ν η r s S a TQ m base old DE (fun _ =>1) hb hm hmono hpos hroot hend
(bynorm_num : (0:ℝ) ≤1) (by intro _; norm_num) hD hE ht k
have hmean := oldTreeAverage_bound ξ μ ν r s STQ (fun j => m j.succ) base old f hf
let c := oldTreeAverage ξ μ ν r s STQ (fun j => m j.succ) base old f
letF:= externalAverage ξ μ ν η r s S a TQ m base old DE f t 0letG:= externalAverage ξ μ ν η r s S a TQ m base old DE (fun _ =>1) t 0letP:=∑ j ∈Finset.range (k+1), externalCoefficientAverage ξ μ ν η r s S a TQ m base old DE f j*t^j
letR:=∑ j ∈Finset.range (k+1), externalCoefficientAverage ξ μ ν η r s S a TQ m base old DE (fun _ =>1) j*t^j
havehe : externalCovariance ξ μ ν η r s S a TQ m base old DE f t 0 -
∑ j ∈Finset.range (k+1), covarianceCoefficient ξ μ ν η r s S a TQ m base old DE f j*t^j = (F-P)-c*(G-R) :=by
simp only [externalCovariance,covarianceCoefficient,sub_mul,Finset.sum_sub_distrib,mul_assoc,←Finset.mul_sum]
dsimp only [F,P,c,G,R]
ring
rw [he]
have hh := (abs_sub (F-P) (c*(G-R))).trans (add_le_add h1 (show |c*(G-R)| ≤B*((1*PrescribedTree.derivativeBound (S.leaves+(Finset.univ.erase a).card) (k+1)/(k.factorial:ℝ))*t^(k+1)) fromby
rw [abs_mul]
exact mul_le_mul hmean h2 (abs_nonneg _) hB))
calc
_ ≤ (B*PrescribedTree.derivativeBound (S.leaves+(Finset.univ.erase a).card) (k+1)/(k.factorial:ℝ))*t^(k+1) +
B*((1*PrescribedTree.derivativeBound (S.leaves+(Finset.univ.erase a).card) (k+1)/(k.factorial:ℝ))*t^(k+1)) := hh
_ = _ :=by ring
lemmaexternalCovariance_sub_le {t u : ℝ} (ht : |t| ≤1/4) (huz : 0≤ u) (hu : u ≤1/4) :
|externalCovariance ξ μ ν η r s S a TQ m base old DE f t u -
externalCovariance ξ μ ν η r s S a TQ m base old DE f t 0| ≤2*(4+8*(S.leaves:ℝ))*B*u :=by
proof · 10
lines
have h1 := externalAverage_sub_le ξ μ ν η r s S a TQ m base old DE f hb hm hmono hpos hroot hend hB hf hD hE ht huz hu
have h2 := externalAverage_sub_le ξ μ ν η r s S a TQ m base old DE (fun _ =>1) hb hm hmono hpos hroot hend
(bynorm_num : (0:ℝ) ≤1) (by intro _; norm_num) hD hE ht huz hu
have hmean := oldTreeAverage_bound ξ μ ν r s STQ (fun j => m j.succ) base old f hf
unfold externalCovariance
rw [show∀FGF'G'c : ℝ, (F-c*G)-(F'-c*G')=(F-F')-c*(G-G') by intros; ring]
refine (abs_sub _ _).trans ?_
rw [abs_mul]
have hh := mul_le_mul hmean h2 (abs_nonneg _) hB
linarith