math / data /lean /OAI /Analysis /Calculus /Current /Fiber /Kernel.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.92 kB
import OAI.Analysis.Calculus.Current.Fiber
namespace OAI.Analysis.Calculus.Current
noncomputable section
open scoped Matrix
/-- The exact Jacobian row of `P_i / Y`. -/
def ratioRow {d : β„•} (z : Index d β†’ β„‚) (i : Fin d) : Index d β†’ β„‚
| none => -ratio z i / z none
| some none => 0
| some (some j) => if j = i then 1 / z none else 0
theorem ratioRow_apply {d : β„•} (z h : Index d β†’ β„‚) (hY : z none β‰  0) (i : Fin d) :
(βˆ‘ b, ratioRow z i b * h b) = ratioSlope z h i := by
simp [Fintype.sum_option, ratioRow, ratioSlope, ratio]
field_simp
ring
def fiberJacobian {d : β„•} (w a : ℝ) (z : Index d β†’ β„‚) :
Matrix (Option (Fin d)) (Index d) β„‚
| none, b => (10 / (a : β„‚)) * phaseRow (ratio z) b
| some i, b => (1 / (w : β„‚)) * ratioRow z i b
theorem hasDerivAt_ratio_complexLine {d : β„•} (z h : Index d β†’ β„‚)
(hY : z none β‰  0) (i : Fin d) :
HasDerivAt (fun t : β„‚ => ratio (fun b => z b + t * h b) i) (ratioSlope z h i) 0 := by
have hz (b : Index d) : HasDerivAt (fun t : β„‚ => z b + t * h b) (h b) 0 := by
simpa using ((hasDerivAt_id (0 : β„‚)).mul_const (h b)).const_add (z b)
simpa [ratio, ratioSlope] using (hz (some (some i))).fun_div (hz none) (by simpa using hY)
/-- Each row really differentiates the stated holomorphic fiber map. -/
theorem hasDerivAt_fiberMap_complexLine {d : β„•} (w a : ℝ) (z h : Index d β†’ β„‚)
(hY : z none β‰  0) (i : Option (Fin d)) :
HasDerivAt (fun t : β„‚ => fiberMap w a (fun b => z b + t * h b) i)
((fiberJacobian w a z *α΅₯ h) i) 0 := by
cases i with
| none =>
convert ((hasDerivAt_phi_line z h hY).const_mul (10 : β„‚)).div_const (a : β„‚) using 1
Β· rfl
Β· simp only [Matrix.mulVec, dotProduct, fiberJacobian, mul_assoc, ← Finset.mul_sum]
ring
| some i =>
convert (hasDerivAt_ratio_complexLine z h hY i).div_const (w : β„‚) using 1
Β· rfl
Β· simp only [Matrix.mulVec, dotProduct, fiberJacobian, mul_assoc, ← Finset.mul_sum]
rw [ratioRow_apply z h hY i]
ring
/-- The unique free direction of the full fiber Jacobian, normalized by `dY = 1`. -/
def fiberKernelVector {d : β„•} (z : Index d β†’ β„‚) : Index d β†’ β„‚
| none => 1
| some none => -fiberQuadratic (ratio z) / 2
| some (some i) => ratio z i
theorem fiberKernelVector_eq_tangent {d : β„•} (z : Index d β†’ β„‚) :
fiberKernelVector z = tangentVector (ratio z) (ratio z) := by
funext b
cases b with
| none => rfl
| some b =>
cases b with
| none => rfl
| some i => simp [fiberKernelVector, tangentVector]
theorem fiberKernelVector_ne_zero {d : β„•} (z : Index d β†’ β„‚) : fiberKernelVector z β‰  0 := by
intro h
have h0 := congrFun h none
norm_num [fiberKernelVector] at h0
theorem fiberJacobian_kernel {d : β„•} (w a : ℝ) (z : Index d β†’ β„‚) :
fiberJacobian w a z *α΅₯ fiberKernelVector z = 0 := by
funext i
cases i with
| none =>
simp only [Matrix.mulVec, dotProduct, fiberJacobian, mul_assoc, ← Finset.mul_sum,
fiberKernelVector_eq_tangent, background_tangent, mul_zero, Pi.zero_apply]
| some i =>
simp [Matrix.mulVec, dotProduct, fiberJacobian, Fintype.sum_option, ratioRow,
fiberKernelVector]
ring
/-- No additional full-space null directions are hidden by the coordinates. -/
theorem fiberJacobian_kernel_unique {d : β„•} (w a : ℝ) (z h : Index d β†’ β„‚)
(hw : w β‰  0) (ha : a β‰  0) (hY : z none β‰  0)
(hJ : fiberJacobian w a z *α΅₯ h = 0) :
h = fun b => fiberKernelVector z b * h none := by
have hwC : (w : β„‚) β‰  0 := by exact_mod_cast hw
have haC : (a : β„‚) β‰  0 := by exact_mod_cast ha
have hx (i : Fin d) : h (some (some i)) = ratio z i * h none := by
have he := congrFun hJ (some i)
have hr : (1 / (w : β„‚)) * ratioSlope z h i = 0 := by
simpa only [Matrix.mulVec, dotProduct, fiberJacobian, mul_assoc, ← Finset.mul_sum,
ratioRow_apply z h hY i, Pi.zero_apply] using he
have hs := (mul_eq_zero.mp hr).resolve_left (div_ne_zero one_ne_zero hwC)
unfold ratioSlope at hs
unfold ratio
field_simp at hs ⊒
linear_combination hs
have hp : (βˆ‘ b, phaseRow (ratio z) b * h b) = 0 := by
have he := congrFun hJ none
have hr : (10 / (a : β„‚)) * (βˆ‘ b, phaseRow (ratio z) b * h b) = 0 := by
simpa only [Matrix.mulVec, dotProduct, fiberJacobian, mul_assoc, ← Finset.mul_sum,
Pi.zero_apply] using he
exact (mul_eq_zero.mp hr).resolve_left (div_ne_zero (by norm_num) haC)
have hs : h (some none) = (-fiberQuadratic (ratio z) / 2) * h none := by
simp only [Fintype.sum_option, phaseRow, one_mul] at hp
simp_rw [hx] at hp
have hsum : (βˆ‘ i, ratio z i * (ratio z i * h none)) =
fiberQuadratic (ratio z) * h none := by
simp only [fiberQuadratic, Finset.sum_mul, mul_assoc]
rw [hsum] at hp
change _ + (_ + _) = 0 at hp
unfold fiberQuadratic at hp ⊒
linear_combination hp
funext b
cases b with
| none => simp [fiberKernelVector]
| some b =>
cases b with
| none => exact hs
| some i => exact hx i
/-- The Jacobian is injective on variations with fixed physical time.
In null coordinates these are precisely the directions `dY = dS₁`. -/
theorem fiberJacobian_spatial_injective {d : β„•} (w a : ℝ) (z h : Index d β†’ β„‚)
(hw : w β‰  0) (ha : a β‰  0) (hY : z none β‰  0)
(hD : fiberDenominator (ratio z) β‰  0)
(htime : h none = h (some none)) (hJ : fiberJacobian w a z *α΅₯ h = 0) : h = 0 := by
have hu := fiberJacobian_kernel_unique w a z h hw ha hY hJ
have hs := congrFun hu (some none)
change h (some none) = (-fiberQuadratic (ratio z) / 2) * h none at hs
have hz : fiberDenominator (ratio z) * h none = 0 := by
unfold fiberDenominator
linear_combination htime + hs
have h0 := (mul_eq_zero.mp hz).resolve_left hD
rw [hu]
simp only [h0, mul_zero]
rfl
end
end OAI.Analysis.Calculus.Current