File size: 4,240 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | import OAI.LinearAlgebra.Moore.Monotone
/-! The determinant-square identity on the positive quaternionic cone. -/
noncomputable section
namespace OAI.LinearAlgebra.Moore
open Matrix Set
open scoped MatrixOrder ComplexOrder
theorem hasDerivAt_complexDet_invertible {I : Type*} [Fintype I] [DecidableEq I]
(M : β β Matrix I I β) (N : Matrix I I β) (t : β)
(hdet : (M t).det β 0)
(h : β i j, HasDerivAt (fun s β¦ M s i j) (N i j) t) :
HasDerivAt (fun s β¦ (M s).det) ((M t).det * ((M t)β»ΒΉ * N).trace) t := by
let F : β β Matrix I I β := fun s β¦ (M t)β»ΒΉ * M s
have hF : F t = 1 := Matrix.nonsing_inv_mul _ (isUnit_iff_ne_zero.mpr hdet)
have hdF (i j : I) : HasDerivAt (fun s β¦ F s i j) (((M t)β»ΒΉ * N) i j) t := by
simpa only [F, Matrix.mul_apply] using
HasDerivAt.fun_sum (u := Finset.univ) (fun k _ β¦ (h k j).const_mul ((M t)β»ΒΉ i k))
have hd := (hasDerivAt_complexDet_identity F _ t hF hdF).const_mul (M t).det
have he (s : β) : (M t).det * (F s).det = (M s).det := by
rw [β Matrix.det_mul]
simp only [F, β Matrix.mul_assoc,
Matrix.mul_nonsing_inv _ (isUnit_iff_ne_zero.mpr hdet), Matrix.one_mul]
simpa only [he] using hd
/-- A direct differential proof, starting at the identity, fixes the sign of
the Moore determinant and identifies its square with the complex determinant. -/
theorem mooreDet_sq_eq_complexify_det_of_posDef {n : β}
(A : Matrix (Fin n) (Fin n) (Quaternion β)) (hA : (complexify A).PosDef) :
mooreDet n A ^ 2 = (complexify A).det.re := by
let D := A - 1
let B : β β Matrix (Fin n) (Fin n) (Quaternion β) := fun t β¦ 1 + t β’ D
have hD : D.IsHermitian := (isHermitian_of_complexify hA.isHermitian).sub isHermitian_one
have hBform (t : β) : complexify (B t) =
(1 - t) β’ (1 : Matrix (Fin n Γ Fin 2) (Fin n Γ Fin 2) β) + t β’ complexify A := by
simp only [B, D, complexify_add, complexify_real_smul, complexify_sub, complexify_one,
smul_sub, sub_smul, one_smul]
abel
have hBpos (t : β) (ht : t β Icc (0 : β) 1) : (complexify (B t)).PosDef := by
rw [hBform]
exact complex_posDef_segment_identity hA ht
let f : β β β := fun t β¦ mooreDet n (B t) ^ 2 / (complexify (B t)).det.re
have hf (t : β) (ht : t β Icc (0 : β) 1) : HasDerivAt f 0 t := by
have hm : HasDerivAt (fun s β¦ mooreDet n (B s))
(mooreDet n (B t) * (((complexify (B t))β»ΒΉ * complexify D).trace.re / 2)) t := by
convert! hasDerivAt_mooreDet_affine 1 D t using 1
exact (mooreDifferential_eq_complex_inverse (B t) D (hBpos t ht) hD).symm
have he (i j : Fin n Γ Fin 2) :
HasDerivAt (fun s β¦ complexify (B s) i j) (complexify D i j) t := by
simp only [B, complexify_add, complexify_real_smul, Matrix.add_apply, Matrix.smul_apply]
convert! (hasDerivAt_const t (complexify (1 : Matrix (Fin n) (Fin n) (Quaternion β)) i j)).add
((hasDerivAt_id t).smul_const (complexify D i j)) using 1
simp
have hc := hasDerivAt_complexDet_invertible (fun s β¦ complexify (B s))
(complexify D) t (hBpos t ht).det_pos.ne' he
have hr := Complex.reCLM.hasFDerivAt.comp_hasDerivAt t hc
change HasDerivAt (fun s β¦ (complexify (B s)).det.re)
((complexify (B t)).det * ((complexify (B t))β»ΒΉ * complexify D).trace).re t at hr
rw [Complex.mul_re, complexify_det_real, zero_mul, sub_zero] at hr
have hden : (complexify (B t)).det.re β 0 := (hBpos t ht).det_pos.1.ne'
change HasDerivAt (fun s β¦ mooreDet n (B s) ^ 2 / (complexify (B s)).det.re) 0 t
convert! (hm.pow 2).div hr hden using 1
simp only [Pi.pow_apply]
field_simp
; ring
have hnorm := (convex_Icc (0 : β) 1).norm_image_sub_le_of_norm_hasDerivWithin_le
(x := 0) (y := 1)
(fun t ht β¦ (hf t ht).hasDerivWithinAt)
(C := 0) (fun _ _ β¦ by simp) (by simp) (by simp)
have h10 : f 1 = f 0 := sub_eq_zero.mp (norm_eq_zero.mp
(le_antisymm (by simpa using hnorm) (norm_nonneg _)))
have hratio : mooreDet n A ^ 2 / (complexify A).det.re = 1 := by
simpa [f, B, D, mooreDet_identity, complexify_one] using h10
exact (div_eq_one_iff_eq (hA.det_pos.1.ne')).mp hratio
end OAI.LinearAlgebra.Moore
|