File size: 5,654 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
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.Analysis.Calculus.Current.Physical.Compact
import OAI.Analysis.Calculus.Current.Physical.Hessian

/-! The explicit biholomorphic inverse in physical fixed-time coordinates. -/

noncomputable section
namespace OAI.Analysis.Calculus.Current

def physicalFiberCoordinates {d : β„•} (a : ℝ) (Ο„ : β„‚) (q : Option (Fin d) β†’ β„‚) :
    Option (Fin d) β†’ β„‚
  | none => phi (physicalEmbedding Ο„ q) / a
  | some i => ratio (physicalEmbedding Ο„ q) i

def inverseHeight {d : β„•} (a : ℝ) (Ο„ : β„‚) (u : Option (Fin d) β†’ β„‚) : β„‚ :=
  (Real.sqrt 2 β€’ Ο„ + a β€’ u none) / fiberDenominator (fun i => u (some i))

def physicalFiberInverse {d : β„•} (a : ℝ) (Ο„ : β„‚) (u : Option (Fin d) β†’ β„‚) :
    Option (Fin d) β†’ β„‚
  | none => Real.sqrt 2 β€’ inverseHeight a Ο„ u - Ο„
  | some i => u (some i) * inverseHeight a Ο„ u

theorem physicalEmbedding_inverse {d : β„•} (a : ℝ) (Ο„ : β„‚) (u : Option (Fin d) β†’ β„‚) :
    physicalEmbedding Ο„ (physicalFiberInverse a Ο„ u) =
      fiberInverse (Real.sqrt 2 β€’ Ο„) (fun i => u (some i)) (a β€’ u none) := by
  have hs : (Real.sqrt 2 : β„‚) ^ 2 = 2 := by
    exact_mod_cast Real.sq_sqrt (by norm_num : (0 : ℝ) ≀ 2)
  have hs0 : (Real.sqrt 2 : β„‚) β‰  0 := by
    exact_mod_cast (Real.sqrt_pos.mpr (by norm_num : (0 : ℝ) < 2)).ne'
  funext b
  cases b with
  | none =>
    simp [physicalEmbedding, physicalLift, physicalTimeOffset, physicalFiberInverse,
      inverseHeight, fiberInverse, Complex.real_smul, mul_sub, hs0]
  | some b =>
    cases b with
    | none =>
      simp only [physicalEmbedding, physicalLift, physicalTimeOffset, physicalFiberInverse,
        inverseHeight, fiberInverse, Pi.add_apply, ContinuousLinearMap.pi_apply,
        smul_apply, ContinuousLinearMap.proj_apply, Complex.real_smul,
        Complex.ofReal_inv, Complex.ofReal_neg]
      field_simp
      linear_combination Ο„ * hs
    | some i => simp [physicalEmbedding, physicalLift, physicalTimeOffset, physicalFiberInverse,
        inverseHeight, fiberInverse]

theorem physicalCoordinates_right_inverse {d : β„•} (a : ℝ) (Ο„ : β„‚)
    (u : Option (Fin d) β†’ β„‚) (ha : a β‰  0)
    (hN : Real.sqrt 2 β€’ Ο„ + a β€’ u none β‰  0)
    (hD : fiberDenominator (fun i => u (some i)) β‰  0) :
    physicalFiberCoordinates a Ο„ (physicalFiberInverse a Ο„ u) = u := by
  have ha' : (a : β„‚) β‰  0 := by exact_mod_cast ha
  funext b
  cases b with
  | none =>
    simp only [physicalFiberCoordinates, physicalEmbedding_inverse]
    rw [phi_fiberInverse (Real.sqrt 2 β€’ Ο„) (a β€’ u none) (fun i => u (some i)) hN hD]
    simp only [Complex.real_smul]
    exact mul_div_cancel_leftβ‚€ _ ha'
  | some i =>
    simp only [physicalFiberCoordinates, physicalEmbedding_inverse,
      ratio_fiberInverse _ _ _ hN hD]

theorem physicalCoordinates_left_inverse {d : β„•} (a : ℝ) (Ο„ : β„‚)
    (q : Option (Fin d) β†’ β„‚) (ha : a β‰  0)
    (hY : physicalEmbedding Ο„ q none β‰  0)
    (hD : fiberDenominator (ratio (physicalEmbedding Ο„ q)) β‰  0) :
    physicalFiberInverse a Ο„ (physicalFiberCoordinates a Ο„ q) = q := by
  have ha' : (a : β„‚) β‰  0 := by exact_mod_cast ha
  let z := physicalEmbedding Ο„ q
  have hYz : z none β‰  0 := hY
  have ht : Real.sqrt 2 β€’ Ο„ = z none - z (some none) := by
    have h := imaginaryTime_physicalEmbedding Ο„ q
    have hs : (Real.sqrt 2 : β„‚) β‰  0 := by
      exact_mod_cast (Real.sqrt_pos.mpr (by norm_num : (0 : ℝ) < 2)).ne'
    change (z none - z (some none)) / (Real.sqrt 2 : β„‚) = Ο„ at h
    rw [div_eq_iff hs] at h
    simpa only [Complex.real_smul, mul_comm] using h.symm
  have hH : inverseHeight a Ο„ (physicalFiberCoordinates a Ο„ q) = z none := by
    simp only [inverseHeight, physicalFiberCoordinates, Complex.real_smul, mul_div_cancelβ‚€ _ ha']
    change (Real.sqrt 2 * Ο„ + phi z) / fiberDenominator (ratio z) = z none
    rw [show (Real.sqrt 2 : β„‚) * Ο„ = z none - z (some none) from ht,
      ← fiberDenominator_mul_height z]
    exact mul_div_cancel_leftβ‚€ _ hD
  funext b
  cases b with
  | none =>
    simp only [physicalFiberInverse, hH]
    exact physicalEmbedding_first Ο„ q
  | some i =>
    simp only [physicalFiberInverse, physicalFiberCoordinates, hH]
    change ratio z i * z none = q (some i)
    rw [show ratio z i * z none = z (some (some i)) by simp [ratio, hYz]]
    simp [z, physicalEmbedding, physicalLift, physicalTimeOffset]

theorem contDiffAt_physicalFiberInverse {d : β„•} (a : ℝ) (Ο„ : β„‚)
    (u : Option (Fin d) β†’ β„‚) (hD : fiberDenominator (fun i => u (some i)) β‰  0) :
    ContDiffAt β„‚ ⊀ (physicalFiberInverse a Ο„) u := by
  have hH : ContDiffAt β„‚ ⊀ (inverseHeight a Ο„) u := by
    unfold inverseHeight fiberDenominator fiberQuadratic
    simp only [Complex.real_smul]
    fun_prop (disch := exact hD)
  apply contDiffAt_pi.mpr
  intro b
  cases b with
  | none =>
    change ContDiffAt β„‚ ⊀ (fun v => Real.sqrt 2 β€’ inverseHeight a Ο„ v - Ο„) u
    exact (hH.const_smul (Real.sqrt 2)).sub contDiffAt_const
  | some i =>
    change ContDiffAt β„‚ ⊀ (fun v => v (some i) * inverseHeight a Ο„ v) u
    exact (by fun_prop : ContDiffAt β„‚ ⊀ (fun v : Option (Fin d) β†’ β„‚ => v (some i)) u).mul hH

theorem physicalFiberInverse_scale {d : β„•} (a : ℝ) (Ο„ : β„‚) (u : Option (Fin d) β†’ β„‚) :
    physicalFiberInverse a (a β€’ Ο„) u = a β€’ physicalFiberInverse 1 Ο„ u := by
  funext b
  cases b with
  | none =>
    simp only [physicalFiberInverse, inverseHeight, Pi.smul_apply, Complex.real_smul, one_smul]
    ring
  | some i =>
    simp only [physicalFiberInverse, inverseHeight, Pi.smul_apply, Complex.real_smul, one_smul]
    ring

end OAI.Analysis.Calculus.Current