File size: 6,304 Bytes
59d1c80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import OAI.Geometry.IsometricImmersion.Taylor.TopChainExtraction
import OAI.Geometry.IsometricImmersion.Estimates.LargestBlockLinearization
import OAI.Geometry.IsometricImmersion.Immersions.HeightCoefficientRegularity

namespace OAI

noncomputable section
open Set Function Filter
open scoped ContDiff Topology BigOperators Matrix

namespace SmoothLocal.HighEquation
open SmoothLocal.Geometry

theorem second_fderiv_comp_constant_direction
    {F : DarbouxState → ℝ} {J : Coord → DarbouxState} {p : Coord}
    (hF : ContDiffAt ℝ ∞ F (J p)) (hJ : DifferentiableAt ℝ J p) (v : DarbouxState) :
    iteratedFDeriv ℝ 2 F (J p) ![coordPartial 1 J p, v] =
      coordPartial 1 (fun r => fderiv ℝ F (J r) v) p := by
  have hdF : DifferentiableAt ℝ (fderiv ℝ F) (J p) :=
    (hF.fderiv_right (m := 1) (WithTop.coe_le_coe.mpr le_top)).differentiableAt (by norm_num)
  have hc : DifferentiableAt ℝ (fun r => fderiv ℝ F (J r)) p := hdF.comp p hJ
  rw [iteratedFDeriv_two_apply]
  simp only [Matrix.cons_val_zero, Matrix.cons_val_one]
  unfold coordPartial
  have hcomp : fderiv ℝ (fun r => fderiv ℝ F (J r)) p =
      (fderiv ℝ (fderiv ℝ F) (J p)).comp (fderiv ℝ J p) := by
    convert fderiv_comp p hdF hJ using 1
    rfl
  rw [fderiv_clm_apply hc (differentiableAt_const (c := v)), hcomp]
  simp

theorem sixVariableP_second_vertical_direction
    {g : MetricField} {z : Coord → ℝ} {U : Set Coord} {p : Coord}
    (hg : SmoothPositiveOn g U) (hU : IsOpen U) (hz : ContDiffOn ℝ ∞ z U)
    (hyy : ∀ r ∈ U, covHessian g z r 1 1 ≠ 0) (hp : p ∈ U)
    (v : DarbouxState) (hv0 : v 0 = 0) (hv1 : v 1 = 0) :
    iteratedFDeriv ℝ 2 (sixVariableP g) (solutionJet z p)
        ![coordPartial 1 (solutionJet z) p, v] =
      coordPartial 1 (heightPFirst g z 0) p * v 2 +
      coordPartial 1 (heightPFirst g z 1) p * v 3 +
      2 * coordPartial 1 (hessianQuotient g z) p * v 4 -
      coordPartial 1 (fun r => (hessianQuotient g z r)^2 +
        gaussianCurvature g r * darbouxG g z r) p * v 5 := by
  rw [second_fderiv_comp_constant_direction
    (sixVariableP_contDiffAt_solutionJet hg hU hp (hyy _ hp))
    (((solutionJet_contDiffOn hU hz).contDiffAt (hU.mem_nhds hp)).differentiableAt (by simp))]
  have heq : (fun r => fderiv ℝ (sixVariableP g) (solutionJet z r) v) =ᶠ[𝓝 p]
      (fun r => heightPFirst g z 0 r * v 2 + heightPFirst g z 1 r * v 3 +
        2 * hessianQuotient g z r * v 4 -
        ((hessianQuotient g z r)^2 + gaussianCurvature g r * darbouxG g z r) * v 5) := by
    filter_upwards [hU.mem_nhds hp] with r hr
    exact sixVariableP_vertical_direction hg hU hr (hyy _ hr) v hv0 hv1
  have h0 := ((heightPFirst_contDiffOn hg hU hz hyy 0).contDiffAt
    (hU.mem_nhds hp)).differentiableAt (by simp)
  have h1 := ((heightPFirst_contDiffOn hg hU hz hyy 1).contDiffAt
    (hU.mem_nhds hp)).differentiableAt (by simp)
  have hq := ((hessianQuotient_contDiffOn hg hU hz hyy).contDiffAt
    (hU.mem_nhds hp)).differentiableAt (by simp)
  have hK := ((gaussianCurvature_contDiffOn hg hU).contDiffAt
    (hU.mem_nhds hp)).differentiableAt (by simp)
  have hG := ((darbouxG_contDiffOn hg hU hz hyy).contDiffAt
    (hU.mem_nhds hp)).differentiableAt (by simp)
  have ha : DifferentiableAt ℝ (fun r => (hessianQuotient g z r)^2 +
      gaussianCurvature g r * darbouxG g z r) p := (hq.pow 2).add (hK.mul hG)
  have hd := (((h0.hasFDerivAt.mul_const (v 2)).add
    (h1.hasFDerivAt.mul_const (v 3))).add
    ((hq.hasFDerivAt.const_mul 2).mul_const (v 4))).sub (ha.hasFDerivAt.mul_const (v 5))
  simp only [Pi.add_def, Pi.sub_def] at hd
  unfold coordPartial
  rw [heq.fderiv_eq]
  change fderiv ℝ (fun r => heightPFirst g z 0 r * v 2 + heightPFirst g z 1 r * v 3 +
      2 * hessianQuotient g z r * v 4 -
      ((hessianQuotient g z r)^2 + gaussianCurvature g r * darbouxG g z r) * v 5) p
      (Pi.single 1 1) = _
  rw [hd.fderiv]
  simp only [add_apply, sub_apply, smul_apply, smul_eq_mul]
  ring

def firstJetPairRemainder (g : MetricField) (z : Coord → ℝ) (n : ℕ) (p : Coord) : ℝ :=
  coordPartial 1 (heightPFirst g z 0) p * coordPartial 0 (verticalJet z n) p +
  coordPartial 1 (heightPFirst g z 1) p * coordPartial 1 (verticalJet z n) p

def secondJetCorrection (g : MetricField) (z u : Coord → ℝ) (p : Coord) : ℝ :=
  2 * coordPartial 1 (hessianQuotient g z) p * coordPartial 0 u p -
  coordPartial 1 (fun r => (hessianQuotient g z r)^2 +
    gaussianCurvature g r * darbouxG g z r) p * coordPartial 1 u p

theorem actualP_pair_extract_secondJet
    {g : MetricField} {z : Coord → ℝ} {U : Set Coord} {x y : ℝ}
    (hg : SmoothPositiveOn g U) (hU : IsOpen U) (hz : ContDiffOn ℝ ∞ z U)
    (hyy : ∀ p ∈ U, covHessian g z p 1 1 ≠ 0)
    (hp : (![x, y] : Coord) ∈ U) (n : ℕ) (hn : 2 ≤ n) :
    chainTerm (sixVariableP g) (solutionJetCurve z x) (ChainWord.pair 1 n) y =
      secondJetCorrection g z (verticalJet z (n + 1)) ![x, y] +
        firstJetPairRemainder g z n ![x, y] := by
  have hfirst : iteratedDeriv 1 (solutionJetCurve z x) y =
      coordPartial 1 (solutionJet z) ![x, y] :=
    verticalJet_slice hU (solutionJet_contDiffOn hU hz) x 1 y hp
  rw [chainTerm_pair_eq, hfirst, solutionJetCurve_iteratedDeriv hU hz hp n hn]
  change iteratedFDeriv ℝ 2 (sixVariableP g) (solutionJet z ![x, y]) _ = _
  rw [sixVariableP_second_vertical_direction hg hU hz hyy hp _ (by rfl) (by rfl)]
  change
    coordPartial 1 (heightPFirst g z 0) ![x, y] * coordPartial 0 (verticalJet z n) ![x, y] +
    coordPartial 1 (heightPFirst g z 1) ![x, y] * coordPartial 1 (verticalJet z n) ![x, y] +
    2 * coordPartial 1 (hessianQuotient g z) ![x, y] *
      coordPartial 0 (coordPartial 1 (verticalJet z n)) ![x, y] -
    coordPartial 1 (fun r => (hessianQuotient g z r)^2 +
      gaussianCurvature g r * darbouxG g z r) ![x, y] *
      coordPartial 1 (coordPartial 1 (verticalJet z n)) ![x, y] = _
  unfold secondJetCorrection firstJetPairRemainder
  change _ =
    (2 * coordPartial 1 (hessianQuotient g z) ![x, y] *
        coordPartial 0 (coordPartial 1 (verticalJet z n)) ![x, y] -
      coordPartial 1 (fun r => (hessianQuotient g z r)^2 +
        gaussianCurvature g r * darbouxG g z r) ![x, y] *
        coordPartial 1 (coordPartial 1 (verticalJet z n)) ![x, y]) + _
  ring

end SmoothLocal.HighEquation

end

end OAI