theoremscalarHierarchy_hessian_square_cramer {f : ℝ→ℝ}
(hf : BoundedDerivs f) (hc : ScalarSpinConvex f) (n : ℕ) (m v : Fin n →ℝ)
(hm : ∀ i,m i∈Icc (0:ℝ) 1) (x : ℝ) :
(∑ i,(v i)^2)*(rootHessian 0 (scalarHierarchy n m v f) x)^2≤
(1+2*(∑ i,(v i)^2))*(scalarHierarchyAverage n m v f
(fun y => (rootGradient 0 f y)^2) x-(rootGradient 0 (scalarHierarchy n m v f) x)^2) :=by
proof · 19
lines
letS:=∑ i,(v i)^2letK:= scalarHierarchyAverage n m v f (rootHessian 0 f) x
letH:= rootHessian 0 (scalarHierarchy n m v f) x
letV:= scalarHierarchyAverage n m v f (fun y => (rootGradient 0 f y)^2) x-
(rootGradient 0 (scalarHierarchy n m v f) x)^2havehS : 0≤S:=Finset.sum_nonneg (fun _ _ => sq_nonneg _)
have hd := scalarHierarchy_cramer_data hf hc n m v hm x
change 0≤K∧K≤H∧H≤K+V∧S*K^2≤V at hd
havehH1 : H≤1:= (le_abs_self H).trans ((hc.scalarHierarchy hf n m v hm).bounds x).2havehV : 0≤V:= (mul_nonneg hS (sq_nonneg _)).trans hd.2.2.2havehe : H^2≤K^2+2*V:=byhavehdiff : 0≤H-K:= sub_nonneg.mpr hd.2.1havehsum : H+K≤2:=by linarith [hd.2.1]
have hh := mul_le_mul_of_nonneg_left hsum hdiff
nlinarith [hd.2.2.1]
have heS := mul_le_mul_of_nonneg_left he hS
change S*H^2≤(1+2*S)*V
nlinarith [hd.2.2.2]
rawVariance j*scalarIncrementAverage l H (fun x => (rootHessian 0H x)^2) 0≤
(1+2*rawVariance j)*(scalarIncrementAverage (l++j) f (fun x => (rootGradient 0 f x)^2) 0-
scalarIncrementAverage l H (fun x => (rootGradient 0H x)^2) 0) :=by
dsimp only
letH:= scalarIncrementChain j f
have hH := scalarIncrementChain_regular j hf
havehHc : ScalarSpinConvexH:=by
change ScalarSpinConvex (scalarIncrementChain j f)
rw [scalarIncrementChain_get]
exact hc.scalarHierarchy hf _ _ _ (fun i => hj _ (List.get_mem _ _))
have hχ := hHc.hessian_bounded hH
have hU := hHc.gradient_bounded hH
have hV := (scalarIncrementAverage_bounded j hf (hc.gradient_bounded hf).sq).sub hU.sq
have hpoint (x : ℝ) : rawVariance j*(rootHessian 0H x)^2≤
(1+2*rawVariance j)*(scalarIncrementAverage j f (fun y => (rootGradient 0 f y)^2) x-
(rootGradient 0H x)^2) :=byhaveG:= scalarHierarchy_hessian_square_cramer hf hc j.length
(fun i => (j.get i).1) (fun i => (j.get i).2) (fun i => hj _ (List.get_mem _ _)) x
rw [sum_get_map j (fun p => p.2^2)] at G
simpa only [H,scalarIncrementChain_get,scalarIncrementAverage_get,rawVariance] usingGhaveG:= scalarIncrementAverage_mono l hH (hχ.sq.const_mul (rawVariance j))
(hV.const_mul (1+2*rawVariance j)) hpoint 0
change rawVariance j*scalarIncrementAverage l H (fun x => (rootHessian 0H x)^2) 0≤ _
have hleft := scalarHierarchyAverage_const_mul hH hχ.sq
(n:=l.length) (m:=fun i => (l.get i).1) (v:=fun i => (l.get i).2)
(c:=rawVariance j) (x:=0)
have hright := scalarHierarchyAverage_const_mul hH hV
(n:=l.length) (m:=fun i => (l.get i).1) (v:=fun i => (l.get i).2)
(c:=1+2*rawVariance j) (x:=0)
have hsub := scalarHierarchyAverage_sub hH
(scalarIncrementAverage_bounded j hf (hc.gradient_bounded hf).sq) hU.sq
(n:=l.length) (m:=fun i => (l.get i).1) (v:=fun i => (l.get i).2) (x:=0)
simp only [← scalarIncrementAverage_get] at hleft hright hsub
rw [hleft,hright] at G
change rawVariance j*scalarIncrementAverage l H (fun x => (rootHessian 0H x)^2) 0≤
(1+2*rawVariance j)*scalarIncrementAverage l H (fun x => scalarIncrementAverage j f
(fun y => (rootGradient 0 f y)^2) x-(rootGradient 0H x)^2) 0 at G
rw [hsub] at G
rw [scalarIncrementAverage_append]
exact G