theoremhasDerivAt_det_at_identity {A : ℝ→Matrix ι ι ℝ}
{B : Matrix ι ι ℝ} {t : ℝ} (hA : A t = 1) (hd : HasDerivAtAB t) :
HasDerivAt (fun s => (A s).det) B.trace t :=by
proof · 10
lines
letD : ContinuousMultilinearMapℝ (fun_ : ι => ι →ℝ) ℝ:=
⟨Matrix.detRowAlternating.toMultilinearMap,continuous_id.matrix_det⟩
have hD := (D.hasFDerivAt (A t)).comp_hasDerivAt t hd
change HasDerivAt (fun s => (A s).det) (D.linearDeriv (A t) B) t at hD
havehv : D.linearDeriv (fun i j =>A t i j) (fun i j =>B i j) = B.trace :=by
rw [ContinuousMultilinearMap.linearDeriv_apply]
change (∑ i, (Matrix.updateRow (A t) i (B i)).det) = B.trace
rw [hA]
simp only [det_updateRow_identity,Matrix.trace,Matrix.diag]
exact hD.congr_deriv hv
lemmaspatialRadialForm_hasDerivAt_zero (g r : ℝ) (α γ : ι →ℝ) :
HasDerivAt (fun t => spatialRadialForm g r t α γ)
(Matrix.of fun i j => -2*g*(if i=j then1else0)-r*(α i*γ j+γ i*α j)) 0:=by
proof · 13
lines
apply hasDerivAt_pi.2
intro i
apply hasDerivAt_pi.2
intro j
have hl := (hasDerivAt_const (0:ℝ) 1).sub ((hasDerivAt_id (0:ℝ)).mul_const g)
have he := (((hl.fun_pow 2).mul_const (if i=j then1else0)).sub
(((hl.mul (hasDerivAt_id (0:ℝ))).mul_const r).mul_const (α i*γ j+γ i*α j))).add
((((hasDerivAt_id (0:ℝ)).fun_pow 2).mul_const (r^2)).mul_const (γ i*γ j))
convert he using1
· ext t
simp only [spatialRadialForm,Matrix.of_apply,Pi.sub_apply,Pi.add_apply,Pi.mul_apply,id_eq]
ring
· simp
theoremspatialRadialForm_sqrt_det_hasDerivAt_zero (g r : ℝ) (α γ : ι →ℝ) :
HasDerivAt (fun t =>Real.sqrt (spatialRadialForm g r t α γ).det)
(-((Fintype.card ι : ℝ)*g+r*∑ i, α i*γ i)) 0:=by
proof · 14
lines
have hd := hasDerivAt_det_at_identity (spatialRadialForm_zero g r α γ)
(spatialRadialForm_hasDerivAt_zero g r α γ)
have hs := hd.sqrt (by simp [spatialRadialForm_zero])
convert hs using1
simp only [spatialRadialForm_zero,Matrix.det_one,Real.sqrt_one,Matrix.trace,
Matrix.diag,Matrix.of_apply,ite_true, mul_one, Finset.sum_sub_distrib,
Finset.sum_const, nsmul_eq_mul, Finset.card_univ]
rw [←Finset.mul_sum]
havehh : (∑ i, (α i*γ i+γ i*α i)) = 2*(∑ i, α i*γ i) :=by
rw [Finset.sum_add_distrib]
simp only [mul_comm (γ _) (α _)]
ring
rw [hh]
ring