math / data /lean /OAI /Analysis /Calculus /Current /Physical /Parameters.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.47 kB
import OAI.Analysis.Calculus.Current.Physical.Inverse
/-! A fixed compact parameter ball for the physical fibers. -/
noncomputable section
namespace OAI.Analysis.Calculus.Current
def fiberParameterBall (d : β„•) : Set (Option (Fin d) β†’ β„‚) :=
{u | (βˆ‘ i, β€–u iβ€– ^ 2) ≀ (1 / 100 : ℝ)}
theorem fiberParameterBall_coordinate {d : β„•} {u : Option (Fin d) β†’ β„‚}
(hu : u ∈ fiberParameterBall d) (i : Option (Fin d)) : β€–u iβ€– ≀ (1 / 10 : ℝ) := by
have hi : β€–u iβ€– ^ 2 ≀ βˆ‘ j, β€–u jβ€– ^ 2 :=
Finset.single_le_sum (fun j _ => sq_nonneg β€–u jβ€–) (Finset.mem_univ i)
change (βˆ‘ j, β€–u jβ€– ^ 2) ≀ (1 / 100 : ℝ) at hu
nlinarith [norm_nonneg (u i)]
theorem fiberParameterBall_denominator {d : β„•} {u : Option (Fin d) β†’ β„‚}
(hu : u ∈ fiberParameterBall d) : fiberDenominator (fun i => u (some i)) β‰  0 := by
apply fiberDenominator_ne_zero
change (βˆ‘ j, β€–u jβ€– ^ 2) ≀ (1 / 100 : ℝ) at hu
rw [Fintype.sum_option] at hu
nlinarith [sq_nonneg β€–u noneβ€–]
theorem fiberParameterBall_numerator {d : β„•} (a : ℝ) (Ο„ : β„‚) (ha : 0 < a)
(ht : a ≀ β€–Ο„β€–) {u : Option (Fin d) β†’ β„‚} (hu : u ∈ fiberParameterBall d) :
Real.sqrt 2 β€’ Ο„ + a β€’ u none β‰  0 := by
have hs : 1 ≀ Real.sqrt 2 := by rw [Real.le_sqrt (by norm_num) (by norm_num)]; norm_num
intro hz
have he : Real.sqrt 2 β€’ Ο„ = -(a β€’ u none) := eq_neg_of_add_eq_zero_left hz
have hn := congrArg norm he
rw [norm_smul, norm_neg, norm_smul, Real.norm_eq_abs, Real.norm_eq_abs,
abs_of_nonneg (Real.sqrt_nonneg _), abs_of_pos ha] at hn
have hc := fiberParameterBall_coordinate hu none
nlinarith [mul_le_mul_of_nonneg_right hs (norm_nonneg Ο„)]
theorem isCompact_fiberParameterBall (d : β„•) : IsCompact (fiberParameterBall d) := by
have hp : Continuous (fun u : Option (Fin d) β†’ β„‚ => βˆ‘ i, β€–u iβ€– ^ 2) := by fun_prop
have hc : IsClosed (fiberParameterBall d) := isClosed_le hp continuous_const
apply (isCompact_closedBall (0 : Option (Fin d) β†’ β„‚) 1).of_isClosed_subset hc
intro u hu
simp only [Metric.mem_closedBall, dist_zero_right]
apply (pi_norm_le_iff_of_nonneg zero_le_one).mpr
exact fun i => (fiberParameterBall_coordinate hu i).trans (by norm_num)
theorem fiberParameterBall_nonempty (d : β„•) : (fiberParameterBall d).Nonempty :=
⟨0, by simp [fiberParameterBall]⟩
theorem physical_inverse_defining {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) :
physicalFiberDefining (1 / 10) a Ο„ (physicalFiberInverse a Ο„ u) =
100 * (βˆ‘ i, β€–u iβ€– ^ 2) - 1 := by
have he := physicalCoordinates_right_inverse a Ο„ u ha hN hD
have h0 := congrFun he none
have hW (i : Fin d) := congrFun he (some i)
change phi (physicalEmbedding Ο„ (physicalFiberInverse a Ο„ u)) / (a : β„‚) = u none at h0
change βˆ€ i : Fin d, ratio (physicalEmbedding Ο„ (physicalFiberInverse a Ο„ u)) i = u (some i) at hW
unfold physicalFiberDefining fiberDefining
simp only [Fintype.sum_option, fiberMap, hW]
have hc : 10 * phi (physicalEmbedding Ο„ (physicalFiberInverse a Ο„ u)) / (a : β„‚) = 10 * u none := by
rw [mul_div_assoc, h0]
rw [hc]
simp only [norm_mul, norm_div, Complex.norm_real, Real.norm_eq_abs, mul_pow, div_pow]
norm_num
rw [← Finset.sum_div]
ring
theorem contDiffAt_physicalFiberInverse_joint {d : β„•} (a : ℝ) (Ο„ : β„‚)
(u : Option (Fin d) β†’ β„‚) (hD : fiberDenominator (fun i => u (some i)) β‰  0) :
ContDiffAt β„‚ ⊀ (fun p : β„‚ Γ— (Option (Fin d) β†’ β„‚) => physicalFiberInverse a p.1 p.2) (Ο„, u) := by
have hH : ContDiffAt β„‚ ⊀ (fun p : β„‚ Γ— (Option (Fin d) β†’ β„‚) => inverseHeight a p.1 p.2) (Ο„, 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 p : β„‚ Γ— (Option (Fin d) β†’ β„‚) => Real.sqrt 2 β€’ inverseHeight a p.1 p.2 - p.1) (Ο„, u)
exact (hH.const_smul (Real.sqrt 2)).sub contDiffAt_fst
| some i =>
change ContDiffAt β„‚ ⊀ (fun p : β„‚ Γ— (Option (Fin d) β†’ β„‚) => p.2 (some i) * inverseHeight a p.1 p.2) (Ο„, u)
exact (by fun_prop : ContDiffAt β„‚ ⊀ (fun p : β„‚ Γ— (Option (Fin d) β†’ β„‚) => p.2 (some i)) (Ο„, u)).mul hH
end OAI.Analysis.Calculus.Current