Download lean/OAI/Analysis/BernoulliCone/HomogeneousCalculus.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.66 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/BernoulliCone/HomogeneousCalculus.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Analysis/BernoulliCone/HomogeneousCalculus.lean
-
curl -L -o HomogeneousCalculus.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/BernoulliCone/HomogeneousCalculus.lean
2.66 kB
Lean 4 · 3
declarations statementsfull
lemma euler_identity {f : E → ℝ} {x : E} (hf : DifferentiableAt ℝ f x)
(hom : ∀ r : ℝ, 0 < r → ∀ y, f (r • y) = r*f y) :
fderiv ℝ f x x = f x := by proof · 9 lines
have hc : HasDerivAt (fun r : ℝ => f (r • x)) (fderiv ℝ f x x) 1 := by
have hf1 : HasFDerivAt f (fderiv ℝ f x) ((fun r : ℝ => r • x) 1) := by simpa using hf.hasFDerivAt
convert! hf1.comp_hasDerivAt 1 ((hasDerivAt_id (1:ℝ)).smul_const x) using 1
simp
have he : (fun r : ℝ => f (r • x)) =ᶠ[𝓝 1] (fun r => r*f x) := by
filter_upwards [eventually_gt_nhds (by norm_num : (0:ℝ)<1)] with r hr
exact hom r hr x
apply hc.unique
simpa using (((hasDerivAt_id (1:ℝ)).mul_const (f x)).congr_of_eventuallyEq he)29Euler's homogeneous identity differentiated on the actual open smooth phase. No Hessian or angular equation is assumed.
lemma hessian_radial {f : E → ℝ} {O : Set E} (hO : IsOpen O)
(hf : ContDiffOn ℝ ∞ f O)
(hom : ∀ r : ℝ, 0 < r → ∀ y, f (r • y) = r*f y)
{x : E} (hx : x∈O) (v : E) :
fderiv ℝ (fderiv ℝ f) x v x = 0 := by proof · 12 lines
have hs := hf.contDiffAt (hO.mem_nhds hx)
have hd := hs.differentiableAt (by simp)
have hD : DifferentiableAt ℝ (fderiv ℝ f) x :=
(hs.fderiv_right (m:=1) (by change (↑(2 : ℕ∞) : WithTop ℕ∞) ≤ ↑(⊤ : ℕ∞); exact WithTop.coe_le_coe.mpr le_top)).differentiableAt (by simp)
have he : (fun y => fderiv ℝ f y y) =ᶠ[𝓝 x] f := by
filter_upwards [hO.mem_nhds hx] with y hy
exact euler_identity ((hf.contDiffAt (hO.mem_nhds hy)).differentiableAt (by simp)) hom
have hh := (hD.hasFDerivAt.clm_apply (hasFDerivAt_id x)).congr_of_eventuallyEq he.symm
have heq := congrArg (fun A : E →L[ℝ] ℝ => A v) (hh.unique hd.hasFDerivAt)
simp only [add_apply,ContinuousLinearMap.coe_comp,
Function.comp_apply,ContinuousLinearMap.id_apply,ContinuousLinearMap.flip_apply,id_eq] at heq
linarithlemma laplacian_trace (f : EuclideanSpace ℝ (Fin d) → ℝ) (x : EuclideanSpace ℝ (Fin d)) :
Laplacian.laplacian f x = ∑ i, fderiv ℝ (fderiv ℝ f) x
(EuclideanSpace.basisFun (Fin d) ℝ i) (EuclideanSpace.basisFun (Fin d) ℝ i) := by proof · 3 lines
rw [InnerProductSpace.laplacian_eq_iteratedFDeriv_orthonormalBasis f
(EuclideanSpace.basisFun (Fin d) ℝ)]
simp [iteratedFDeriv_two_apply]Outline