File size: 5,267 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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | import OAI.Analysis.Calculus.Current.Fiber.Quaternion
namespace OAI.Analysis.Calculus.Current
noncomputable section
open scoped Matrix
def fiberGradient {d : β} (w a : β) (z : Index d β β) : Index d β Quaternion β :=
OAI.Analysis.Calculus.Quaternion.imaginaryGradient (fiberDefining w a) z
theorem fiberGradient_formula {d : β} (w a : β) (z : Index d β β)
(hY : z none β 0) (b : Index d) :
fiberGradient w a z b = (2 : β) β’
(((quaternionFiberJacobian w a z)α΄΄ *α΅₯ (fun i => complexK (fiberMap w a z i))) b * qi) := by
unfold fiberGradient fiberDefining
rw [OAI.Analysis.Calculus.Quaternion.imaginaryGradient_sub_const, OAI.Analysis.Calculus.Quaternion.imaginaryGradient_sum _ (fun i =>
((contDiffAt_fiberMap_complex w a z hY i).differentiableAt (by norm_num)).restrictScalars β |>.norm_sq β)]
simp_rw [OAI.Analysis.Calculus.Quaternion.imaginaryGradient_norm_sq
((contDiffAt_fiberMap_complex w a z hY _).differentiableAt (by norm_num)),
fderiv_fiberMap_single w a z hY]
simp only [Matrix.mulVec, dotProduct, Matrix.conjTranspose_apply, quaternionFiberJacobian,
complexK_star, β map_mul, β Finset.sum_mul, β Finset.smul_sum]
private theorem gradient_pairing_algebra {ΞΉ : Type*} [Fintype ΞΉ]
(u v : ΞΉ β Quaternion β) :
(β b, star ((2 : β) β’ (u b * qi)) * v b) =
(2 : β) β’ (star qi * (star u β¬α΅₯ v)) := by
simp only [Quaternion.star_smul, star_mul, smul_mul_assoc, Finset.smul_sum,
dotProduct, Pi.star_apply, Finset.mul_sum, mul_assoc]
/-- The full Hessian kernel is orthogonal to the actual defining-function gradient. -/
theorem fiberHessian_kernel_orthogonal_gradient {d : β} (w a : β) (z : Index d β β)
(hY : z none β 0) (v : Index d β Quaternion β)
(hH : fiberHessian w a z *α΅₯ v = 0) : star (fiberGradient w a z) β¬α΅₯ v = 0 := by
have hJ := (fiberHessian_kernel_iff w a z hY v).mp hH
have hp : star ((quaternionFiberJacobian w a z)α΄΄ *α΅₯
(fun i => complexK (fiberMap w a z i))) β¬α΅₯ v = 0 := by
rw [Matrix.star_mulVec, Matrix.conjTranspose_conjTranspose, β Matrix.dotProduct_mulVec,
hJ, dotProduct_zero]
simp only [dotProduct, Pi.star_apply, fiberGradient_formula w a z hY]
rw [gradient_pairing_algebra, hp, mul_zero, smul_zero]
theorem fiberHessian_kernel_tangent_phi {d : β} (w a : β) (z : Index d β β)
(v : Index d β Quaternion β) (ha : a β 0) (hY : z none β 0)
(hH : fiberHessian w a z *α΅₯ v = 0) :
(β b, complexK (phaseRow (ratio z) b) * v b) = 0 := by
have hJ := congrFun ((fiberHessian_kernel_iff w a z hY v).mp hH) none
have he : complexK (10 / (a : β)) * (β b, complexK (phaseRow (ratio z) b) * v b) = 0 := by
simpa only [Matrix.mulVec, dotProduct, quaternionFiberJacobian, fiberJacobian,
map_mul, mul_assoc, β Finset.mul_sum, Pi.zero_apply] using hJ
have hc : complexK (10 / (a : β)) β 0 := by
intro hz
have heq := congrArg quaternionFirst hz
change (10 / (a : β)) = 0 at heq
have haC : (a : β) β 0 := by exact_mod_cast ha
exact (div_ne_zero (by norm_num) haC) heq
exact (mul_eq_zero.mp he).resolve_left hc
theorem fderiv_phi_single {d : β} (z : Index d β β) (hY : z none β 0) (b : Index d) :
fderiv β (phi : (Index d β β) β β) z (Pi.single b 1) = phaseRow (ratio z) b := by
have he : (fun q : Index d β β => fiberMap 1 10 q none) = phi := by
funext q
simp [fiberMap]
have hh := fderiv_fiberMap_single 1 10 z hY none b
rw [he] at hh
simpa [fiberJacobian] using hh
def backgroundHessian {d : β} (z : Index d β β) :
Matrix (Index d) (Index d) (Quaternion β) :=
OAI.Analysis.Calculus.Quaternion.imaginaryHessian (fun q => βphi qβ ^ 2) z
theorem backgroundHessian_formula {d : β} (z : Index d β β) (hY : z none β 0) :
backgroundHessian z = (4 : β) β’
OAI.Analysis.Calculus.Quaternion.outer (fun b => complexK (star (phaseRow (ratio z) b))) := by
have he : (fun q : Index d β β => fiberMap 1 10 q none) = phi := by
funext q
simp [fiberMap]
have hf : ContDiffAt β 2 (phi : (Index d β β) β β) z := by
rw [β he]
exact contDiffAt_fiberMap_complex 1 10 z hY none
apply Matrix.ext
intro a b
simp only [backgroundHessian, OAI.Analysis.Calculus.Quaternion.imaginaryHessian_norm_sq hf, fderiv_phi_single z hY,
Matrix.smul_apply, OAI.Analysis.Calculus.Quaternion.outer, β complexK_star, star_star, map_mul]
/-- The full fiber Hessian and the rank-one background have the required common kernel. -/
theorem fiberHessian_kernel_background {d : β} (w a : β) (z : Index d β β)
(v : Index d β Quaternion β) (ha : a β 0) (hY : z none β 0)
(hH : fiberHessian w a z *α΅₯ v = 0) : backgroundHessian z *α΅₯ v = 0 := by
have ht := fiberHessian_kernel_tangent_phi w a z v ha hY hH
rw [backgroundHessian_formula z hY, Matrix.smul_mulVec]
have hz : OAI.Analysis.Calculus.Quaternion.outer (fun b => complexK (star (phaseRow (ratio z) b))) *α΅₯ v = 0 := by
funext b
rw [OAI.Analysis.Calculus.Quaternion.outer_mulVec]
simp only [β complexK_star, star_star, ht, mul_zero, Pi.zero_apply]
rw [hz, smul_zero]
end
end OAI.Analysis.Calculus.Current
|