diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e2a24e3b425700a05a4588d3a9cf3eebc1b50cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationStability.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularZeroStability + +namespace OAI + +/-! Small scalar-weighted translations preserve compact regular zero sets. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] +local instance translationScalarNormed : NormedAddCommGroup (E →L[ℝ] ℝ) := inferInstance +local instance translationScalarSpace : NormedSpace ℝ (E →L[ℝ] ℝ) := inferInstance +local instance translationTargetNormed : NormedAddCommGroup (E →L[ℝ] F) := inferInstance +local instance translationTargetSpace : NormedSpace ℝ (E →L[ℝ] F) := inferInstance + +theorem compact_translation_stability {f : E → F} {χ : E → ℝ} + (hf : ContDiff ℝ ∞ f) (hχ : ContDiff ℝ ∞ χ) + {K : Set E} (hK : IsCompact K) + (hreg : ∀ x ∈ K, f x = 0 → Function.Surjective (fderiv ℝ f x)) : + ∃ δ > 0, ∀ a : F, ‖a‖ < δ → ∀ x ∈ K, f x+χ x • a = 0 → + Function.Surjective (fderiv ℝ (fun y => f y+χ y • a) x) := by + obtain ⟨ε,hε,hεreg⟩ := compact_regular_zero_stability hf hK hreg + obtain ⟨M₀,hM₀⟩ := hK.exists_bound_of_continuousOn hχ.continuous.continuousOn + obtain ⟨M₁,hM₁⟩ := hK.exists_bound_of_continuousOn (hχ.continuous_fderiv (by simp)).continuousOn + let B := max M₀ (max M₁ 0)+1 + have hB : 0 < B := by dsimp [B]; have := le_max_right M₀ (max M₁ 0); have := le_max_right M₁ 0; linarith + refine ⟨ε/B,div_pos hε hB,?_⟩ + intro a ha + have hab : B*‖a‖ < ε := by + simpa only [mul_comm] using (lt_div_iff₀ hB).mp ha + apply hεreg (fun y => f y+χ y • a) + · intro x hx + rw [add_sub_cancel_left,norm_smul] + have hχB : ‖χ x‖ ≤ B := (hM₀ x hx).trans (by dsimp [B]; linarith [le_max_left M₀ (max M₁ 0)]) + exact (mul_le_mul_of_nonneg_right hχB (norm_nonneg a)).trans_lt hab + · intro x hx + have hd := ((hf.differentiable (by simp) x).hasFDerivAt.add + ((hχ.differentiable (by simp) x).hasFDerivAt.smul_const a)).fderiv + change ‖fderiv ℝ (f + fun y => χ y • a) x-fderiv ℝ f x‖ < ε + rw [hd,add_sub_cancel_left,ContinuousLinearMap.norm_smulRight_apply] + have hχB : ‖fderiv ℝ χ x‖ ≤ B := (hM₁ x hx).trans (by + dsimp [B]; linarith [le_max_right M₀ (max M₁ 0),le_max_left M₁ 0]) + exact (mul_le_mul_of_nonneg_right hχB (norm_nonneg a)).trans_lt hab + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactVaryingFrameTube.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactVaryingFrameTube.lean new file mode 100644 index 0000000000000000000000000000000000000000..44c25303f3f54f4604d2ebdb46c46fd7bb76e0b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactVaryingFrameTube.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.VaryingFramedCurveTube +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! One transverse radius works for all points of a compact regular + segment of the ruled target tube. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem compact_varying_frame_tube {c a : ℝ → (Fin 3 → ℝ)} + (hc : ContDiff ℝ ∞ c) (ha : ContDiff ℝ ∞ a) {K : Set ℝ} + (hK : IsCompact K) (hne : K.Nonempty) + (hv : ∀ t ∈ K, deriv c t ≠ 0) (htrans : ∀ t ∈ K, ∀ r : ℝ, r • deriv c t ≠ a t) : + ∃ (r : ℝ) (U : Set ℝ), 0 < r ∧ IsOpen U ∧ K ⊆ U ∧ + ∀ x : Base, ‖x‖ < r → ∀ t ∈ U, + Function.Bijective (fderiv ℝ (varyingFramedCurveTube c a) (x,t)) := by + obtain ⟨t₀,ht₀⟩ := hne + have hR := varyingFramedCurveTube_regular_axis hc ha (hv t₀ ht₀) (htrans t₀ ht₀) + let R : (Base × ℝ) ≃L[ℝ] (Fin 3 → ℝ) := + ContinuousLinearEquiv.ofBijective (fderiv ℝ (varyingFramedCurveTube c a) (0,t₀)) + (LinearMap.ker_eq_bot.mpr hR.1) (LinearMap.range_eq_top.mpr hR.2) + let W : Set (Base × ℝ) := + {z | IsUnit (R.symm.toContinuousLinearMap.comp (fderiv ℝ (varyingFramedCurveTube c a) z))} + have hcont : Continuous (fun z => + R.symm.toContinuousLinearMap.comp (fderiv ℝ (varyingFramedCurveTube c a) z)) := + continuous_const.clm_comp ((varyingFramedCurveTube_smooth hc ha).continuous_fderiv (by simp)) + have hW : IsOpen W := Units.isOpen.preimage hcont + have haxis : ({0} : Set Base) ×ˢ K ⊆ W := by + rintro ⟨x,t⟩ ⟨hx,ht⟩ + obtain rfl : x = 0 := hx + apply ContinuousLinearMap.isUnit_iff_bijective.mpr + exact R.symm.bijective.comp (varyingFramedCurveTube_regular_axis hc ha (hv t ht) (htrans t ht)) + obtain ⟨V,U,hV,hU,h0V,hKU,hVU⟩ := + generalized_tube_lemma isCompact_singleton hK hW haxis + obtain ⟨r,hr,hball⟩ := Metric.isOpen_iff.mp hV 0 (h0V (by simp)) + refine ⟨r,U,hr,hU,hKU,?_⟩ + intro x hx t ht + have hxV : x ∈ V := hball (by simpa [dist_zero_right] using hx) + have hunit : IsUnit (R.symm.toContinuousLinearMap.comp + (fderiv ℝ (varyingFramedCurveTube c a) (x,t))) := hVU ⟨hxV,ht⟩ + have hbij := ContinuousLinearMap.isUnit_iff_bijective.mp hunit + have heq : (R : (Base × ℝ) → (Fin 3 → ℝ)) ∘ + (R.symm.toContinuousLinearMap.comp (fderiv ℝ (varyingFramedCurveTube c a) (x,t))) = + fderiv ℝ (varyingFramedCurveTube c a) (x,t) := by + funext v + exact R.apply_symm_apply _ + rw [← heq] + exact R.bijective.comp hbij + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexFirstVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexFirstVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..72dc8d2f000de0f7136af478a45d8093aaa7f4fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexFirstVariation.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexMixedJets +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexJetDecomposition + +namespace OAI + +/-! The complex polynomial first variation is exactly the complexification +of the actual real differential. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +def complexDirectionData (G : Base → Space) (H : Base → Fin 4 → ℂ) : JetData := + Fin.cases (fun w a p => (jet G w a p : ℂ)) + (fun j w a p => if j = 0 then complexJet H w a p else 0) + +lemma evalComplex_sumList {ι : Type*} (l : List ι) (f : ι → MixedExpression) + (G : Base → Space) (J : JetData) (z : Base × ℝ) : + (sumList l f).evalComplex G J z = (l.map (fun i => (f i).evalComplex G J z)).sum := by + induction l with + | nil => rfl + | cons i l ih => simp only [sumList, evalComplex, List.map_cons, List.sum_cons, ih] + +lemma evalComplex_ofExpression (e : Expression) (G : Base → Space) + (H : Base → Fin 4 → ℂ) (z : Base × ℝ) : + (ofExpression e).evalComplex G (complexDirectionData G H) z = (e.eval G z : ℂ) := by + induction e with + | coeff c => rfl + | atom w a e ih => simp only [ofExpression, evalComplex, complexDirectionData, Fin.cases_zero, + ih, Expression.eval, Complex.ofReal_mul] + | add e f ihe ihf => simp only [ofExpression, evalComplex, ihe, ihf, Expression.eval, Complex.ofReal_add] + +lemma complex_coefficient_variation (c : LowJet × ℝ → ℝ) (G : Base → Space) + (H : Base → Fin 4 → ℂ) (z : Base × ℝ) : + ((coeff c).differentiate 0).evalComplex G (complexDirectionData G H) z = + ∑ i : Fin 7 × Fin 4, complexJet H (lowWord i.1) i.2 z.1 * + (coefficientDerivative c i (lowJet G z.1, z.2) : ℂ) := by + simp only [differentiate, evalComplex_sumList, evalComplex, complexDirectionData, + Fin.cases_succ, ↓reduceIte] + exact Finset.sum_map_toList _ _ + +private lemma complex_sum_decompose {ι : Type*} [Fintype ι] (a b d : ι → ℝ) : + (∑ i, ((a i : ℂ) + Complex.I * (b i : ℂ)) * (d i : ℂ)) = + (∑ i, a i * d i : ℝ) + Complex.I * (∑ i, b i * d i : ℝ) := by + simp only [add_mul, mul_assoc, Finset.sum_add_distrib, ← Finset.mul_sum, + ← Complex.ofReal_mul, ← Complex.ofReal_sum] + +/-- This identity identifies the algebraic complex evaluation with the +actual real differential on the real and imaginary parts separately. -/ +theorem complex_first_variation (e : Expression) (G : Base → Space) + {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (z : Base × ℝ) : + ((ofExpression e).differentiate 0).evalComplex G (complexDirectionData G H) z = + (e.variation G (realField H) z : ℂ) + + Complex.I * (e.variation G (imagField H) z : ℂ) := by + induction e with + | coeff c => + rw [ofExpression, complex_coefficient_variation] + simp_rw [complexJet_decompose hH] + rw [complex_sum_decompose] + rw [Expression.variation, Expression.variation, + coefficient_variation_sum, coefficient_variation_sum] + rfl + | atom w a e ih => + simp only [ofExpression, differentiate, ↓reduceIte, evalComplex, + complexDirectionData, Fin.cases_zero, Fin.cases_succ, evalComplex_ofExpression, ih, + Expression.variation] + rw [complexJet_decompose hH] + push_cast + ring + | add e f ihe ihf => + simp only [ofExpression, differentiate, evalComplex, ihe, ihf, Expression.variation, + Complex.ofReal_add] + ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexJetDecomposition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexJetDecomposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..af473149ea13b79c9a025b3bade1d1cc93bfe3b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexJetDecomposition.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations + +namespace OAI + +/-! Real and imaginary parts commute with all actual ordered jets. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma directional_clm {A E F : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] + (L : E →L[ℝ] F) {f : A → E} (hf : ContDiff ℝ ∞ f) (w : List A) : + iteratedDirectional w (L ∘ f) = L ∘ iteratedDirectional w f := by + induction w with + | nil => rfl + | cons v w ih => + rw [iteratedDirectional, ih] + funext p + have hs := contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hf.contDiffOn w) + exact congrArg (fun T : A →L[ℝ] F => T v) + ((L.hasFDerivAt.comp p (hs.differentiable (by simp) p).hasFDerivAt).fderiv) + +def complexJet (H : Base → Fin 4 → ℂ) (w : List (Fin 2)) (a : Fin 4) : Base → ℂ := + iteratedDirectional (w.map coordinateVector) (fun p => H p a) + +def realField (H : Base → Fin 4 → ℂ) : Base → Space := fun p a => (H p a).re +def imagField (H : Base → Fin 4 → ℂ) : Base → Space := fun p a => (H p a).im + +lemma realField_smooth {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (realField H) := by + apply contDiff_pi.mpr + intro a + exact Complex.reCLM.contDiff.comp (contDiff_pi.mp hH a) + +lemma imagField_smooth {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (imagField H) := by + apply contDiff_pi.mpr + intro a + exact Complex.imCLM.contDiff.comp (contDiff_pi.mp hH a) + +lemma complexJet_re {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) + (w : List (Fin 2)) (a : Fin 4) (p : Base) : + (complexJet H w a p).re = jet (realField H) w a p := by + exact (congrFun (directional_clm Complex.reCLM (contDiff_pi.mp hH a) + (w.map coordinateVector)) p).symm + +lemma complexJet_im {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) + (w : List (Fin 2)) (a : Fin 4) (p : Base) : + (complexJet H w a p).im = jet (imagField H) w a p := by + exact (congrFun (directional_clm Complex.imCLM (contDiff_pi.mp hH a) + (w.map coordinateVector)) p).symm + +lemma complexJet_decompose {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) + (w : List (Fin 2)) (a : Fin 4) (p : Base) : + complexJet H w a p = (jet (realField H) w a p : ℂ) + + Complex.I * (jet (imagField H) w a p : ℂ) := by + rw [← complexJet_re hH, ← complexJet_im hH] + exact Complex.ext (by simp) (by simp) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexMixedJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexMixedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..371ae4e1ef4102a38387d7064fd0a6438c534616 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexMixedJets.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationScaling + +namespace OAI + +/-! Complex evaluation of the real polynomial variations, keeping the base +map fixed and complexifying the direction jets. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression + +abbrev JetData := Fin 4 → List (Fin 2) → Fin 4 → Base → ℂ + +def evalComplex : MixedExpression → (Base → Space) → JetData → Base × ℝ → ℂ + | .coeff c, G, _, z => (c (lowJet G z.1, z.2) : ℂ) + | .atom i w a e, G, J, z => J i w a z.1 * e.evalComplex G J z + | .add e f, G, J, z => e.evalComplex G J z + f.evalComplex G J z + +def scaleJetSlot (J : JetData) (j : Fin 3) (c : Base → ℂ) : JetData := + fun i w a p => if i = j.succ then c p * J i w a p else J i w a p + +lemma DegreeIn.evalComplex_scaleSlot {j : Fin 3} {e : MixedExpression} {n : ℕ} + (he : DegreeIn j e n) (G : Base → Space) (J : JetData) (c : Base → ℂ) (z : Base × ℝ) : + e.evalComplex G (scaleJetSlot J j c) z = c z.1 ^ n * e.evalComplex G J z := by + induction he with + | coeff d => simp only [evalComplex, pow_zero, one_mul] + | zero n => simp only [evalComplex, Complex.ofReal_zero, mul_zero] + | other i w a hi h ih => + simp only [evalComplex, scaleJetSlot, hi, ↓reduceIte, ih] + ring + | same w a h ih => + simp only [evalComplex, scaleJetSlot, ↓reduceIte, ih, pow_succ] + ring + | add he hf ihe ihf => simp only [evalComplex, ihe, ihf, mul_add] + +def scaleJets (J : JetData) (c : Fin 3 → Base → ℂ) : JetData := + scaleJetSlot (scaleJetSlot (scaleJetSlot J 0 (c 0)) 1 (c 1)) 2 (c 2) + +lemma evalComplex_scaleJets {e : MixedExpression} {n : Fin 3 → ℕ} + (he : ∀ j, DegreeIn j e (n j)) (G : Base → Space) (J : JetData) + (c : Fin 3 → Base → ℂ) (z : Base × ℝ) : + e.evalComplex G (scaleJets J c) z = + ((c 0 z.1) ^ n 0 * (c 1 z.1) ^ n 1 * (c 2 z.1) ^ n 2) * e.evalComplex G J z := by + simp only [scaleJets, (he 2).evalComplex_scaleSlot, (he 1).evalComplex_scaleSlot, + (he 0).evalComplex_scaleSlot] + ring + +lemma evalComplex_smooth {O : Set LowJet} {U : Set Base} {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + {J : JetData} (hJ : ∀ i w a, ContDiffOn ℝ ∞ (J i w a) U) + {e : MixedExpression} (he : e.SmoothCoeffs O) : + ContDiffOn ℝ ∞ (e.evalComplex G J) (U ×ˢ Set.univ) := by + induction e with + | coeff c => + exact Complex.ofRealCLM.contDiff.comp_contDiffOn + (he.comp (((lowJet_smooth hG).comp contDiff_fst).prodMk contDiff_snd).contDiffOn + (fun z hz => ⟨hQ hz.1, hz.2⟩)) + | atom i w a e ih => + exact ((hJ i w a).comp contDiffOn_fst (fun _ hz => hz.1)).mul (ih he) + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +lemma evalComplex_parameter_smooth {O : Set LowJet} {U : Set Base} {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + {J : JetData} (hJ : ∀ i w a, ContDiffOn ℝ ∞ (J i w a) U) + {e : MixedExpression} (he : e.SmoothCoeffs O) (t : ℝ) : + ContDiffOn ℝ ∞ (fun p => e.evalComplex G J (p, t)) U := + (evalComplex_smooth hG hQ hJ he).comp (contDiffOn_id.prodMk contDiffOn_const) + (fun _ hp => ⟨hp, Set.mem_univ t⟩) + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexQuadraticVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexQuadraticVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d91beadab03c1c39c1754c86c0135c4657d7f3c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexQuadraticVariation.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexSlotAdditivity +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexFirstVariation + +namespace OAI + +/-! Actual complexified second polynomial variation, with both direction +slots and their bilinear algebra made explicit. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +abbrev DirectionJets := List (Fin 2) → Fin 4 → Base → ℂ + +def pairJetData (G : Base → Space) (J K : DirectionJets) : JetData := + ![fun w a p => (jet G w a p : ℂ), J, K, 0] + +def quadraticComplex (e : Expression) (G : Base → Space) + (J K : DirectionJets) (z : Base × ℝ) : ℂ := + (e.variations 1).evalComplex G (pairJetData G J K) z + +lemma quadraticComplex_add_left (e : Expression) (G : Base → Space) + (J K L : DirectionJets) (z : Base × ℝ) : + quadraticComplex e G (J + K) L z = quadraticComplex e G J L z + quadraticComplex e G K L z := by + apply DegreeIn.evalComplex_add (j := 0) + (show DegreeIn 0 (e.variations 1) 1 by simpa using e.variations_degree 1 0) + · intro i hi w a + fin_cases i <;> simp_all [pairJetData] + · intro i hi w a + fin_cases i <;> simp_all [pairJetData] + · intro w a + rfl + +lemma quadraticComplex_add_right (e : Expression) (G : Base → Space) + (J K L : DirectionJets) (z : Base × ℝ) : + quadraticComplex e G J (K + L) z = quadraticComplex e G J K z + quadraticComplex e G J L z := by + apply DegreeIn.evalComplex_add (j := 1) + (show DegreeIn 1 (e.variations 1) 1 by simpa using e.variations_degree 1 1) + · intro i hi w a + fin_cases i <;> simp_all [pairJetData] + · intro i hi w a + fin_cases i <;> simp_all [pairJetData] + · intro w a + rfl + +lemma quadraticComplex_smul_left (e : Expression) (G : Base → Space) + (J K : DirectionJets) (c : ℂ) (z : Base × ℝ) : + quadraticComplex e G (c • J) K z = c * quadraticComplex e G J K z := by + have hh := (show DegreeIn 0 (e.variations 1) 1 by simpa using e.variations_degree 1 0).evalComplex_scaleSlot + G (pairJetData G J K) (fun _ => c) z + have he : scaleJetSlot (pairJetData G J K) 0 (fun _ => c) = pairJetData G (c • J) K := by + funext i w a p + fin_cases i <;> simp [scaleJetSlot, pairJetData] + rw [he, pow_one] at hh + exact hh + +lemma quadraticComplex_smul_right (e : Expression) (G : Base → Space) + (J K : DirectionJets) (c : ℂ) (z : Base × ℝ) : + quadraticComplex e G J (c • K) z = c * quadraticComplex e G J K z := by + have hh := (show DegreeIn 1 (e.variations 1) 1 by simpa using e.variations_degree 1 1).evalComplex_scaleSlot + G (pairJetData G J K) (fun _ => c) z + have he : scaleJetSlot (pairJetData G J K) 1 (fun _ => c) = pairJetData G J (c • K) := by + funext i w a p + fin_cases i <;> simp [scaleJetSlot, pairJetData] + rw [he, pow_one] at hh + exact hh + +def starDirectionJets (J : DirectionJets) : DirectionJets := fun w a p => star (J w a p) + +lemma evalComplex_star (e : MixedExpression) (G : Base → Space) (J : JetData) (z : Base × ℝ) : + e.evalComplex G (fun i w a p => star (J i w a p)) z = star (e.evalComplex G J z) := by + induction e with + | coeff c => simp only [evalComplex, Complex.star_def, Complex.conj_ofReal] + | atom i w a e ih => simp only [evalComplex, ih, star_mul'] + | add e f ihe ihf => simp only [evalComplex, ihe, ihf, star_add] + +lemma quadraticComplex_star (e : Expression) (G : Base → Space) + (J K : DirectionJets) (z : Base × ℝ) : + quadraticComplex e G (starDirectionJets J) (starDirectionJets K) z = + star (quadraticComplex e G J K z) := by + have he : pairJetData G (starDirectionJets J) (starDirectionJets K) = + fun i w a p => star (pairJetData G J K i w a p) := by + funext i w a p + fin_cases i <;> simp [pairJetData, starDirectionJets] + change (e.variations 1).evalComplex G _ z = _ + rw [he] + exact evalComplex_star (e.variations 1) G (pairJetData G J K) z + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexSlotAdditivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexSlotAdditivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..77338d4be322e446ec27f543141ebae6bca0c9b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ComplexSlotAdditivity.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexMixedJets + +namespace OAI + +/-! Additivity in each degree-one complex direction slot of the actual +mixed polynomial variation. -/ +noncomputable section +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression + +private theorem degree_addition {j : Fin 3} {e : MixedExpression} {n : ℕ} + (he : DegreeIn j e n) (G : Base → Space) (J₁ J₂ J₃ : JetData) (z : Base × ℝ) + (h₂ : ∀ i, i ≠ j.succ → ∀ w a, J₂ i w a z.1 = J₁ i w a z.1) + (h₃ : ∀ i, i ≠ j.succ → ∀ w a, J₃ i w a z.1 = J₁ i w a z.1) + (hadd : ∀ w a, J₃ j.succ w a z.1 = J₁ j.succ w a z.1 + J₂ j.succ w a z.1) : + (n = 0 → e.evalComplex G J₁ z = e.evalComplex G J₂ z ∧ + e.evalComplex G J₃ z = e.evalComplex G J₁ z) ∧ + (n = 1 → e.evalComplex G J₃ z = e.evalComplex G J₁ z + e.evalComplex G J₂ z) := by + induction he with + | coeff c => + constructor + · intro _; exact ⟨rfl, rfl⟩ + · intro hn; omega + | zero k => simp [evalComplex] + | other i w a hi h ih => + constructor + · intro hn + obtain ⟨h12, h31⟩ := ih.1 hn + simp only [evalComplex, h₂ i hi, h₃ i hi, h12, h31, and_self] + · intro hn + simp only [evalComplex, h₂ i hi, h₃ i hi, ih.2 hn, mul_add] + | @same e k w a h ih => + constructor + · intro hn; omega + · intro hn + have hk : k = 0 := by omega + obtain ⟨h12, h31⟩ := ih.1 hk + simp only [evalComplex, hadd, h31, ← h12, add_mul] + | add he hf ihe ihf => + constructor + · intro hn + obtain ⟨he12, he31⟩ := ihe.1 hn + obtain ⟨hf12, hf31⟩ := ihf.1 hn + simp only [evalComplex, he12, he31, hf12, hf31, and_self] + · intro hn + simp only [evalComplex, ihe.2 hn, ihf.2 hn] + ring + +theorem DegreeIn.evalComplex_add {j : Fin 3} {e : MixedExpression} + (he : DegreeIn j e 1) (G : Base → Space) (J₁ J₂ J₃ : JetData) (z : Base × ℝ) + (h₂ : ∀ i, i ≠ j.succ → ∀ w a, J₂ i w a z.1 = J₁ i w a z.1) + (h₃ : ∀ i, i ≠ j.succ → ∀ w a, J₃ i w a z.1 = J₁ i w a z.1) + (hadd : ∀ w a, J₃ j.succ w a z.1 = J₁ j.succ w a z.1 + J₂ j.succ w a z.1) : + e.evalComplex G J₃ z = e.evalComplex G J₁ z + e.evalComplex G J₂ z := + (degree_addition he G J₁ J₂ J₃ z h₂ h₃ hadd).2 rfl + +theorem DegreeIn.evalComplex_independent {j : Fin 3} {e : MixedExpression} + (he : DegreeIn j e 0) (G : Base → Space) (J₁ J₂ : JetData) (z : Base × ℝ) + (h₂ : ∀ i, i ≠ j.succ → ∀ w a, J₂ i w a z.1 = J₁ i w a z.1) : + e.evalComplex G J₁ z = e.evalComplex G J₂ z := by + let J₃ : JetData := fun i w a p => if i = j.succ then J₁ i w a p + J₂ i w a p else J₁ i w a p + exact ((degree_addition he G J₁ J₂ J₃ z h₂ + (fun i hi w a => by simp only [J₃, hi, ↓reduceIte]) + (fun w a => by simp only [J₃, ↓reduceIte])).1 rfl).1 + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConditionalMain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConditionalMain.lean new file mode 100644 index 0000000000000000000000000000000000000000..6809c0fab5d55d615bd5f26acc511f04a70d1806 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConditionalMain.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformCorrectedTermC1 +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceBoundaryStartingFamily +import OAI.Geometry.SurfaceImmersion.Geometry.UniformScaledPathBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CycleCorrectedGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentCircularRealization +import OAI.Geometry.SurfaceImmersion.Whitney.WhitneyStartingGeometry + +namespace OAI + +/-! Smooth isometric immersions constructed from spherical immersions, +and from the compact surface case of Whitney (1944), Theorem 8, p.274. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [SecondCountableTopology M] +local instance mainFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance mainFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance mainDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance mainDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance mainSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance mainSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +omit [SecondCountableTopology M] in +/-- The construction starting from a smooth unit spherical immersion. All +primitive amplitudes and the starting scale are chosen uniformly before +selecting the finite crossings. -/ +theorem isometric_immersion_of_spherical_immersion (g : SmoothMetric M) + {I : M → Space} (hI : ContMDiff planeModel spaceModel ∞ I) + (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M g W := by + classical + obtain ⟨A⟩ := exists_smoothingAtlas (M := M) + obtain ⟨r,D,c,hr,hr1,hD,hc,_hIb,_hIm,hIs,hstart⟩ := + A.reference_circular_starting_family g hI hunit hImm zero_lt_one + let gref := A.shortRemainderMetric g (space_smul_contMDiff hI r) hIs + have href : gref.inner = g.inner-inducedTensor (r • I) := rfl + obtain ⟨C,hC,hpath⟩ := A.uniform_scaled_path_bound g r hD + obtain ⟨d⟩ := A.exists_reference_circular_atlas gref g hc (show 0 ≤ C+1 by linarith) + obtain ⟨pt,wt,mt,hpt,hwt,hmt,hterm⟩ := d.uniform_corrected_term_C1 hI r href hD + let m := Fintype.card (d.B.centers × Fin 3) + let e : Fin m ≃ (d.B.centers × Fin 3) := (Fintype.equivFin _).symm + obtain ⟨mapTol,delta,W,hmapTol,hmapLe,_hdelta,_hdeltaR,hW,hcycles⟩ := + d.corrected_cycles hI r href hpt hwt hmt e + obtain ⟨E,hE,hterms⟩ := hterm (W 1) (hW 1) + obtain ⟨N,hN,hrealize⟩ := A.independent_circular_realization g c C d.B + d.radius d.L (fun i => ‖(d.P i).ξ‖+1) d.L_pos d.region + d.weight_nonneg d.weight_positive d.convex m E hE + obtain ⟨q,hindex,houter,_hchart,hpart,hell,hphase,hweights,hweightClose,hcorrect⟩ := + hcycles N hN + obtain ⟨G,g₀,normal,hG,_hu,hG₀,hg₀,⟨good⟩,_hn,hnear,hGb,hlower,_hgm,hshort,hgeom⟩ := + hstart (N*m) d.B q mapTol hmapTol + obtain ⟨f,dCirc,hamp,hphi,hcurves,_hrad,_houter',_hchart',hlinear,hconvex,hcycle,hcyclePhase,_htotal⟩ := + hcorrect G hG hnear + have hnear' : A.WeightedBound 1 1 mt (G-I) := + fun i => (hnear i).mono_const hmapLe + have hcopy (k : Fin N) (b : d.B.centers × Fin 3) : + (finProdFinEquiv (k,e.symm b)).divNat = k ∧ + e (finProdFinEquiv (k,e.symm b)).modNat = b := by + have hh := Prod.mk.inj (finProdFinEquiv.symm_apply_apply (k,e.symm b)) + exact ⟨hh.1,by rw [hh.2,e.apply_symm_apply]⟩ + have hell' (k : Fin N) (i : d.B.centers) (j : Fin 3) : + ‖d.cycleLinearParts e q k i j-(d.P i).ξ j‖ < pt := by + have h := hphase (finProdFinEquiv (k,e.symm (i,j))) + simpa only [ReferenceCircularAtlas.cycleLinearParts, + (hcopy k (i,j)).2] using h + have htermBound (k : Fin N) (a : Fin m) : + A.TensorWeightedBound 1 1 E ((f k).term a) := by + let f' := (f k).reindex e.symm + have hp' : f'.phase = d.perturbedPhases (d.cycleLinearParts e q k) := by + funext b + exact (hphi k (e.symm b)).trans (congrArg _ (e.apply_symm_apply b)) + have ha' : f'.amplitude = d.B.correctedPrimitiveAmplitude d.basis + (d.cycleWeights e q k) (d.perturbedPhases (d.cycleLinearParts e q k)) + (g.inner-inducedTensor (r • G)) := by + funext b + exact (hamp k (e.symm b)).trans (congrArg _ (e.apply_symm_apply b)) + have hnon (b : d.B.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (d.cycleWeights e q k b) := by + let a : Fin (N*m) := finProdFinEquiv (k,e.symm b) + have hh : e a.modNat = b := (hcopy k b).2 + have hrsmall : (q.radius a)^2 < (d.radius b.1)^2 := by + have hrpos := q.radius_pos a + have hro := q.radius_outer a + rw [houter a,hh] at hro + nlinarith [d.radius_pos b.1] + exact (shrinkingCircularWeight_smooth (b.1 : M) (d.B.weight b.1) + (d.B.weight_smooth b.1) (d.region b.1) hrsmall).1 + have hsupp (b : d.B.centers × Fin 3) : + tsupport (d.cycleWeights e q k b) ⊆ tsupport (d.B.weight b.1) := by + apply closure_mono + intro p hp + change d.cycleWeights e q k b p ≠ 0 at hp + change d.B.weight b.1 p ≠ 0 + intro hz + exact hp (by simp only [ReferenceCircularAtlas.cycleWeights,shrinkingCircularWeight,hz,zero_mul]) + have hb := hterms (d.cycleLinearParts e q k) (d.cycleWeights e q k) (hell' k) + hnon hsupp (hweightClose k) (fun b => hweights k b 1) G hG hnear' hGb f' hp' ha' (e a) + change A.TensorWeightedBound 1 1 E ((f k).term (e.symm (e a))) at hb + simpa only [e.symm_apply_apply] using hb + have hshort' : ∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v := by + intro p v + change inducedTensor (r • G) p v v ≤ _ + rw [← hg₀] + exact hshort p v + have hpBound (k : Fin N) : A.TensorWeightedBound 1 1 C + (g₀.inner+((k.val : ℝ)/(N : ℝ)) • (g.inner-inducedTensor (r • G))) := by + rw [hg₀] + exact hpath G hG hGb (hG₀.mfderiv_injective) hshort' _ + (div_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) + ((div_le_one (by exact_mod_cast hN)).mpr (by exact_mod_cast k.isLt.le)) + have hcv (a : Fin (N*m)) : dCirc.convexPart a = d.L (dCirc.curves a).index := by + rw [hconvex,hpart,hcurves,hindex] + have hlin (a : Fin (N*m)) : ‖dCirc.linearPart a‖ ≤ ‖(d.P (dCirc.curves a).index).ξ‖+1 := by + rw [hlinear,hcurves,hindex] + exact hell a + have htarget : g.inner = g₀.inner+(g.inner-inducedTensor (r • G)) := by + rw [hg₀] + abel + have hgeom' : FiniteBoundaryGeometry dCirc.curves + (boundaryCrossingSet dCirc.curves univ) (r • G) normal := by + rw [hcurves] + exact hgeom + obtain ⟨F,hF,_hgood⟩ := hrealize g₀ hlower _ f htermBound hpBound dCirc + hcycle hcyclePhase hcv hlin g htarget (r • G) normal hG₀ good hgeom' + exact ⟨F,hF⟩ + +/-- Main theorem of paper 094-01. The sole published hypothesis is Whitney +(1944), Theorem 8, p.274, specialized to a closed smooth surface. -/ +theorem smooth_isometric_immersion_conditional (g : SmoothMetric M) + (hW : PublishedInputs.WhitneySurfaceInput M) : + ∃ F : M → Space, IsSmoothIsometricImmersion M g F := by + obtain ⟨I,hI,hunit,hImm,_⟩ := metricPhaseData_of_whitney g hW + exact isometric_immersion_of_spherical_immersion g hI hunit hImm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedMultilinearBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedMultilinearBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..58b383a5ebb34db577191bd29897efa449a7d00d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedMultilinearBounds.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ModulatedJetScaling + +namespace OAI + +/-! The conjugated polynomial estimates retain the product of the input +amplitude bounds. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates MixedExpression + +/-- Product estimate corresponding to the fixed-power perturbation bound +in the small-modes argument. No output-order or accuracy dependence is +hidden in the short-scale exponent. -/ +theorem compact_conjugated_multilinear_bound {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : Expression) (he : e.SmoothCoeffs O) (m : ℕ) (B P : ℝ) (hB : 1 ≤ B) (hP : 0 ≤ P) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (s τ : ℝ) (C : Fin 3 → ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → (∀ j, 0 < C j) → + ContDiff ℝ ∞ G → (∀ j, ContDiff ℝ ∞ (φ j)) → (∀ j, ContDiff ℝ ∞ (H j)) → + Set.MapsTo (lowJet G) U K → + WeightedBound U s (m + e.order) B (lowJet G) → + (∀ j, WeightedBound U s (m + e.order) (C j) (H j)) → + (∀ j v, WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ (φ j) p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ i : Fin 3, + WeightedBound U s m + (D * (C 0 * (if 1 ≤ i then C 1 else 1) * (if 2 ≤ i then C 2 else 1)) / + τ ^ (e.loss + 6)) (fun p => conjugatedVariation e G φ H τ i (p, t)) := by + obtain ⟨D, hD, hb⟩ := compact_conjugated_variation_bound hU hO hK hKO e he m B P hB hP + refine ⟨D, hD, ?_⟩ + intro G φ H s τ C hτ hs hτs hs1 hC hG hφ hH hGK hGb hHb hφb t ht i + let V := scaleDirections H (fun j => (C j)⁻¹) + have hV := scaleDirections_smooth hH (fun j => (C j)⁻¹) + have hunit : ∀ j, WeightedBound U s (m + e.order) 1 (V j) := by + intro j + have h := (hHb j).const_smul hU.uniqueDiffOn (hH j).contDiffOn (C j)⁻¹ + change WeightedBound U s (m + e.order) 1 (fun p => (C j)⁻¹ • H j p) + simpa only [abs_of_pos (inv_pos.mpr (hC j)), + inv_mul_cancel₀ (ne_of_gt (hC j))] using h + have hbound := hb G φ V s τ hτ hs hτs hs1 hG hφ hV hGK hGb hunit hφb t ht i + let W : ℝ := C 0 * (if 1 ≤ i then C 1 else 1) * (if 2 ≤ i then C 2 else 1) + have hW : 0 < W := by + have h₀ := hC 0 + have h₁ := hC 1 + have h₂ := hC 2 + dsimp only [W] + split_ifs <;> positivity + have heq : (fun p => conjugatedVariation e G φ H τ i (p, t)) = + (fun p => W • conjugatedVariation e G φ V τ i (p, t)) := by + funext p + have h := conjugatedVariation_scale e G hφ hV τ C i (p, t) + rw [scaleDirections_inverse H C (fun j => ne_of_gt (hC j))] at h + exact h + rw [heq] + have hsmooth : ContDiffOn ℝ ∞ (fun p => conjugatedVariation e G φ V τ i (p, t)) U := by + have h := evalComplex_parameter_smooth hG (fun p hp => hKO (hGK hp)) + (fun j w a => (amplitudeData_smooth hG hφ hV τ j w a).contDiffOn) + (e := e.variations i) (e.variations_smoothCoeffs hO he i) t + convert h using 1 + funext p + exact conjugatedVariation_eq e G hφ hV τ i (p, t) + have h := hbound.const_smul hU.uniqueDiffOn hsmooth W + convert h using 1 + rw [abs_of_pos hW] + ring + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedOperatorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedOperatorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3cd51dc6c2166d66c1d0b23b51632f0a07483302 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedOperatorBounds.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ConjugatedPolynomialOperator + +namespace OAI + +/-! The fixed-loss conjugated estimate for the actual supported linear map. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +lemma supportedField_eq_zero_of_seminorm_eq_zero {F : Type*} [NormedAddCommGroup F] + [NormedSpace ℝ F] {K : Compacts Base} (s : ℝ≥0) (m : ℕ) + {f : SupportedField (F := F) K} (hf : supportedWeightedSeminorm K s m f = 0) : f = 0 := by + apply DFunLike.ext + intro p + have h := (weightedBound_of_supportedSeminorm s m f).norm_le (Set.mem_univ p) + rw [hf] at h + exact norm_eq_zero.mp (le_antisymm h (norm_nonneg _)) + +namespace Expression + +theorem conjugatedVariationLM_bound {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQcompact : IsCompact Q) (hQO : Q ⊆ O) + (e : Expression) (he : e.SmoothCoeffs O) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (m : ℕ) (B P : ℝ) (hB : 1 ≤ B) (hP : 0 ≤ P) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hGQ : Set.MapsTo (lowJet G) U Q) (s : ℝ≥0) (τ : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + WeightedBound U s (m + e.order) B (lowJet G) → + (∀ v, WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ H : SupportedField (F := Fin 4 → ℂ) K, + supportedWeightedSeminorm K s m + (conjugatedVariationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ t H) ≤ + D / τ ^ (e.loss + 6) * supportedWeightedSeminorm K s (m + e.order) H := by + obtain ⟨D, hD, hd⟩ := compact_conjugated_multilinear_bound hU hO hQcompact hQO e he m B P hB hP + refine ⟨D, hD, ?_⟩ + intro G φ hG hφ hGQ s τ hτ hs hτs hs1 hGb hφb t ht H + let C := supportedWeightedSeminorm K s (m + e.order) H + have hC : 0 ≤ C := apply_nonneg _ _ + by_cases hC0 : C = 0 + · have hH0 : H = 0 := supportedField_eq_zero_of_seminorm_eq_zero s (m + e.order) hC0 + simp only [hH0, map_zero, mul_zero, le_refl] + · have hCpos : 0 < C := lt_of_le_of_ne hC (Ne.symm hC0) + have hCs : ∀ j : Fin 3, 0 < (![C, 1, 1] j) := by + intro j + fin_cases j <;> simp [hCpos] + have hHb : ∀ j, WeightedBound U s (m + e.order) (![C, 1, 1] j) (singleDirection H j) := by + intro j + fin_cases j + · exact (weightedBound_of_supportedSeminorm s (m + e.order) H).restrict_open hU + · exact (weightedBound_zero U s (m + e.order)).mono_const zero_le_one + · exact (weightedBound_zero U s (m + e.order)).mono_const zero_le_one + have hΦb : ∀ j v, WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ (singlePhase φ j) p (coordinateVector v)) := by + intro j v + fin_cases j + · exact hφb v + · change WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ (fun _ : Base => (0 : ℝ)) p (coordinateVector v)) + simpa only [fderiv_fun_const, Pi.zero_apply, zero_apply] using + (weightedBound_zero U s (m + e.order) (F := ℝ)).mono_const hP + · change WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ (fun _ : Base => (0 : ℝ)) p (coordinateVector v)) + simpa only [fderiv_fun_const, Pi.zero_apply, zero_apply] using + (weightedBound_zero U s (m + e.order) (F := ℝ)).mono_const hP + have hv := hd G (singlePhase φ) (singleDirection H) s τ ![C, 1, 1] + hτ hs hτs hs1 hCs hG (singlePhase_smooth hφ) (singleDirection_smooth H.contDiff) + hGQ hGb hHb hΦb t ht 0 + have hl : WeightedBound U s m (D * C / τ ^ (e.loss + 6)) + (conjugatedVariationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ t H) := by + apply (show WeightedBound U s m (D * C / τ ^ (e.loss + 6)) + (fun p => conjugatedVariation e G (singlePhase φ) (singleDirection H) τ 0 (p, t)) by + simpa using hv).congr + intro p _ + exact conjugatedVariationLM_apply hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ t H p + have hg := hl.extend_support hU + ((conjugatedVariationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ t H).tsupport_subset.trans hKU) + (by positivity) + have hn := supportedSeminorm_le_of_weightedBound hs (show 0 ≤ D * C / τ ^ (e.loss + 6) by positivity) + (conjugatedVariationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ t H) hg + convert hn using 1 + dsimp only [C] + ring + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedVariationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedVariationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d11050ce43591a3818c0b5d5fdc6598821e73872 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConjugatedVariationBounds.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ModulatedJetDataBounds + +namespace OAI + +/-! Sharp slow-scale estimates for the first three conjugated polynomial +variations. The power E+6 is independent of correction accuracy and order. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates MixedExpression + +def phaseProduct (φ : Fin 3 → Base → ℝ) (τ : ℝ) (i : Fin 3) (p : Base) : ℂ := + phase τ (φ 0) p * (if 1 ≤ i then phase τ (φ 1) p else 1) * + (if 2 ≤ i then phase τ (φ 2) p else 1) + +lemma phaseProduct_ne_zero (φ : Fin 3 → Base → ℝ) (τ : ℝ) (i : Fin 3) (p : Base) : + phaseProduct φ τ i p ≠ 0 := by + have h (j : Fin 3) : phase τ (φ j) p ≠ 0 := Complex.exp_ne_zero _ + apply mul_ne_zero + · exact mul_ne_zero (h 0) (by split_ifs; exact h 1; exact one_ne_zero) + · split_ifs + · exact h 2 + · exact one_ne_zero + +def conjugatedVariation (e : Expression) (G : Base → Space) + (φ : Fin 3 → Base → ℝ) (H : DirectionFields) (τ : ℝ) (i : Fin 3) (z : Base × ℝ) : ℂ := + (phaseProduct φ τ i z.1)⁻¹ * (e.variations i).evalComplex G (oscillatoryData G φ H τ) z + +lemma conjugatedVariation_eq (e : Expression) (G : Base → Space) {φ : Fin 3 → Base → ℝ} + {H : DirectionFields} (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (τ : ℝ) (i : Fin 3) (z : Base × ℝ) : + conjugatedVariation e G φ H τ i z = + (e.variations i).evalComplex G (amplitudeData G φ H τ) z := by + rw [conjugatedVariation, variation_phase_factor e G hφ hH τ z i] + change (phaseProduct φ τ i z.1)⁻¹ * + (phaseProduct φ τ i z.1 * (e.variations i).evalComplex G (amplitudeData G φ H τ) z) = _ + rw [← mul_assoc, inv_mul_cancel₀ (phaseProduct_ne_zero φ τ i z.1), one_mul] + +/-- Unit amplitude bounds give the sharp exponent for every first, second, +and third variation after removing all participating phase factors. -/ +theorem compact_conjugated_variation_bound {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : Expression) (he : e.SmoothCoeffs O) (m : ℕ) (B P : ℝ) (hB : 1 ≤ B) (hP : 0 ≤ P) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (s τ : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → + ContDiff ℝ ∞ G → (∀ j, ContDiff ℝ ∞ (φ j)) → (∀ j, ContDiff ℝ ∞ (H j)) → + Set.MapsTo (lowJet G) U K → + WeightedBound U s (m + e.order) B (lowJet G) → + (∀ j, WeightedBound U s (m + e.order) 1 (H j)) → + (∀ j v, WeightedBound U s (m + e.order) P + (fun p => fderiv ℝ (φ j) p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ i : Fin 3, + WeightedBound U s m (D / τ ^ (e.loss + 6)) + (fun p => conjugatedVariation e G φ H τ i (p, t)) := by + classical + let A := amplitudeBudget e.order m B P + have hA : 1 ≤ A := amplitudeBudget_ge_one (zero_le_one.trans hB) hP + have hex := fun i : Fin 3 => compact_complex_mixed_bound hU hO hK hKO (e.variations i) + (e.variations_smoothCoeffs hO he i) m A hA + choose D hD hb using hex + refine ⟨∑ i, D i, Finset.sum_nonneg (fun i _ => hD i), ?_⟩ + intro G φ H s τ hτ hs hτs hs1 hG hφ hH hGK hGb hHb hφb t ht i + have hdata := weighted_amplitudeData hU hG hφ hH hτ hs hτs (zero_le_one.trans hB) hP + m e.order hGb hHb hφb + have h := hb i G (amplitudeData G φ H τ) s τ hs hτ (hτs.trans hs1) hG hGK + ((hGb.mono_order (by omega)).mono_const (le_amplitudeBudget hP)) + (fun j w a => (amplitudeData_smooth hG hφ hH τ j w a).contDiffOn) + (fun j w a hw => hdata j w a (hw.trans (e.variations_order i))) t ht + have hbound : D i / τ ^ (e.variations i).loss ≤ (∑ j, D j) / τ ^ (e.loss + 6) := by + calc + _ ≤ D i / τ ^ (e.loss + 6) := div_le_div_of_nonneg_left (hD i) (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le (hτs.trans hs1) (e.variations_loss i)) + _ ≤ _ := div_le_div_of_nonneg_right + (Finset.single_le_sum (fun j _ => hD j) (Finset.mem_univ i)) (pow_nonneg hτ.le _) + apply (h.mono_const hbound).congr + intro p _ + exact conjugatedVariation_eq e G hφ hH τ i (p, t) + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConnectedOpenPieces.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConnectedOpenPieces.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b7f6a00006a79deb916ba4b290144d662ed70e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConnectedOpenPieces.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcTopology + +namespace OAI + +/-! Connected open pieces with frontier in a deleted vertex set either +coincide or are disjoint. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem connected_open_pieces_equal_or_disjoint + {S T V : Set X} (hSo : IsOpen S) (hTo : IsOpen T) + (hSc : IsPreconnected S) (hTc : IsPreconnected T) + (hSb : closure S \ S ⊆ V) (hTb : closure T \ T ⊆ V) + (hSV : Disjoint S V) (hTV : Disjoint T V) : S = T ∨ Disjoint S T := by + by_cases hd : Disjoint S T + · exact Or.inr hd + left + have hi : (S ∩ T).Nonempty := not_disjoint_iff_nonempty_inter.mp hd + have hTS : T ⊆ S := hTc.subset_of_closure_inter_subset hSo (by simpa only [inter_comm] using hi) + (by + intro x hx + by_contra hn + exact disjoint_left.mp hTV hx.2 (hSb ⟨hx.1,hn⟩)) + have hST : S ⊆ T := hSc.subset_of_closure_inter_subset hTo hi + (by + intro x hx + by_contra hn + exact disjoint_left.mp hSV hx.2 (hTb ⟨hx.1,hn⟩)) + exact Subset.antisymm hST hTS + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConstantNormBoundaryGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConstantNormBoundaryGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6e3d8e56e98bdeb92e90c9a819cb9daf10d249b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConstantNormBoundaryGeometry.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SphericalMetricPhaseData +import OAI.Geometry.SurfaceImmersion.Geometry.RealMetricDerivatives +import OAI.Geometry.SurfaceImmersion.Geometry.NormalInterpolation +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData + +namespace OAI + +/-! The initial inward normal has a strictly positive pairing with every +nonzero directional second form, at every point of a constant-radius sphere. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame VelocityFrame + +lemma constant_norm_radial_first {F : RField 4} {R : ℝ} {x : Base} + (hF : DifferentiableAt ℝ F x) (hR : ∀ y, F y ⬝ᵥ F y = R) (v : Base) : + F x ⬝ᵥ coordDeriv v F x = 0 := by + have he : (fun y => F y ⬝ᵥ F y) = fun _ => R := funext hR + have hd : coordDeriv v (fun y => F y ⬝ᵥ F y) x = 0 := by + rw [he] + simp [coordDeriv] + rw [real_partial_dot hF hF,dotProduct_comm (coordDeriv v F x) (F x)] at hd + linarith + +lemma constant_norm_radial_second {F : RField 4} {U : Set Base} {R : ℝ} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) (hR : ∀ y, F y ⬝ᵥ F y = R) + {x : Base} (hx : x ∈ U) (v w : Base) : + F x ⬝ᵥ coordDeriv v (coordDeriv w F) x = + -(coordDeriv v F x ⬝ᵥ coordDeriv w F x) := by + have hFx := (hF x hx).contDiffAt (hU.mem_nhds hx) + have he : (fun y => F y ⬝ᵥ coordDeriv w F y) =ᶠ[𝓝 x] (fun _ => (0 : ℝ)) := by + filter_upwards [hU.mem_nhds hx] with y hy + exact constant_norm_radial_first + (((hF y hy).contDiffAt (hU.mem_nhds hy)).differentiableAt (by simp)) hR w + have hd : coordDeriv v (fun y => F y ⬝ᵥ coordDeriv w F y) x = 0 := by + change fderiv ℝ _ x v = 0 + rw [he.fderiv_eq] + simp + rw [real_partial_dot (hFx.differentiableAt (by simp)) + ((contDiffAt_coordDeriv hFx w).differentiableAt (by simp))] at hd + linarith + +lemma constant_norm_secondForm_inward {F : RField 4} {U : Set Base} {R : ℝ} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) (hR : ∀ y, F y ⬝ᵥ F y = R) + {x : Base} (hx : x ∈ U) (v w : Base) : + realSecondForm F v w x ⬝ᵥ (-F x) = coordDeriv v F x ⬝ᵥ coordDeriv w F x := by + have hFx := ((hF x hx).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) + have hX : coordDeriv dx F x ⬝ᵥ (-F x) = 0 := by + rw [dotProduct_neg,dotProduct_comm,constant_norm_radial_first hFx hR,neg_zero] + have hY : coordDeriv dy F x ⬝ᵥ (-F x) = 0 := by + rw [dotProduct_neg,dotProduct_comm,constant_norm_radial_first hFx hR,neg_zero] + unfold realSecondForm realNormalPart + simp only [sub_dotProduct,smul_dotProduct,smul_eq_mul,hX,hY,mul_zero,sub_zero] + rw [dotProduct_neg,dotProduct_comm,constant_norm_radial_second hU hF hR hx,neg_neg] + +lemma positive_pairing_excludes_antipode {X n : Vec} (hp : 0 < X ⬝ᵥ n) : + X ≠ 0 ∧ normalize X ≠ -n := by + have hn : X ≠ 0 := by + intro hz + rw [hz,zero_dotProduct] at hp + exact lt_irrefl _ hp + refine ⟨hn,?_⟩ + intro he + have hs := dot_normalize_self hn + rw [he,dotProduct_neg] at hs + linarith [Real.sqrt_nonneg (X ⬝ᵥ X)] + +theorem constant_norm_boundary_geometry {F : RField 4} {U : Set Base} {R r : ℝ} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) (hR : ∀ y, F y ⬝ᵥ F y = R) + (hr : 0 < r) {x : Base} (hx : x ∈ U) + (hI : Function.Injective (fderiv ℝ F x)) {v : Base} (hv : v ≠ 0) : + 0 < realSecondForm F v v x ⬝ᵥ (r⁻¹ • (-F x)) ∧ + realSecondForm F v v x ≠ 0 ∧ + normalize (realSecondForm F v v x) ≠ -(r⁻¹ • (-F x)) := by + have hd : coordDeriv v F x ≠ 0 := by + intro hz + exact hv (hI (by simpa only [coordDeriv,map_zero] using hz)) + have hp : 0 < realSecondForm F v v x ⬝ᵥ (r⁻¹ • (-F x)) := by + rw [dotProduct_smul,constant_norm_secondForm_inward hU hF hR hx] + exact mul_pos (inv_pos.mpr hr) (dot_self_pos hd) + exact ⟨hp,positive_pairing_excludes_antipode hp⟩ + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvexDerivativeInjectivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvexDerivativeInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e1eb19c36f526895d0524218da185ceefda84b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvexDerivativeInjectivity.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactTranslationImmersion +import Mathlib.Analysis.Calculus.MeanValue + +namespace OAI + +/-! A fixed strict derivative bound excludes distinct coincidences on a +convex coordinate neighborhood. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem convex_injective_of_derivative_close + {f : Base → ProjectionTarget 3} {L : Base →L[ℝ] ProjectionTarget 3} + {K : NNReal} (hK : 0 < K) (hL : AntilipschitzWith K L) + {S : Set Base} (hS : Convex ℝ S) + (hf : ∀ x ∈ S, DifferentiableAt ℝ f x) + (hclose : ∀ x ∈ S, ‖fderiv ℝ f x-L‖ ≤ 1/(2*(K:ℝ))) : + Set.InjOn f S := by + intro x hx y hy he + have hb := hS.norm_image_sub_le_of_norm_fderiv_le' hf hclose hx hy + have hl := ZeroHomClass.bound_of_antilipschitz L hL (y-x) + rw [he,sub_self,zero_sub,norm_neg] at hb + have hKr : 0 < (K:ℝ) := hK + have hnum : (K:ℝ)*(1/(2*(K:ℝ))) = 1/2 := by field_simp [ne_of_gt hKr] + have hnorm : ‖y-x‖ ≤ (1/2)*‖y-x‖ := by + calc + ‖y-x‖ ≤ (K:ℝ)*‖L (y-x)‖ := hl + _ ≤ (K:ℝ)*((1/(2*(K:ℝ)))*‖y-x‖) := mul_le_mul_of_nonneg_left hb hKr.le + _ = (1/2)*‖y-x‖ := by rw [← mul_assoc,hnum] + have hz : y-x = 0 := norm_eq_zero.mp (by linarith [norm_nonneg (y-x)]) + exact (sub_eq_zero.mp hz).symm + +theorem exists_injective_coordinate_ball {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) {x : Base} (hi : Function.Injective (fderiv ℝ f x)) : + ∃ K : NNReal, 0 < K ∧ AntilipschitzWith K (fderiv ℝ f x) ∧ + ∃ r : ℝ, 0 < r ∧ ∀ y ∈ closedBall x r, + ‖fderiv ℝ f y-fderiv ℝ f x‖ < 1/(4*(K:ℝ)) := by + obtain ⟨K,hK,hL⟩ := (fderiv ℝ f x).toLinearMap.exists_antilipschitzWith + (LinearMap.ker_eq_bot.mpr hi) + have hp : 0 < 1/(4*(K:ℝ)) := by positivity + have hn : ∀ᶠ y in 𝓝 x, ‖fderiv ℝ f y-fderiv ℝ f x‖ < 1/(4*(K:ℝ)) := + by + simpa only [dist_eq_norm] using + (Metric.tendsto_nhds.mp (hf.continuous_fderiv (by simp)).continuousAt) _ hp + obtain ⟨r,hr,hrn⟩ := Metric.mem_nhds_iff.mp hn + refine ⟨K,hK,hL,r/2,half_pos hr,?_⟩ + intro y hy + apply hrn + exact (closedBall_subset_ball (by linarith : r/2 < r)) hy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvolutionDerivativeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvolutionDerivativeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c88aebe48de33057f29cfcf07511a6a1c921ef3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ConvolutionDerivativeBounds.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingDerivativeBounds + +namespace OAI + +/-! Differentiating the compact kernel gives derivative gains without using +uncontrolled derivatives of the input. -/ +noncomputable section +open scoped ContDiff Convolution + +universe u v w +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory ContinuousLinearMap +open JetPolynomial (Base) + +variable {E : Type u} {F : Type v} {H : Type w} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup H] [NormedSpace ℝ H] + +/-- All derivatives may be placed on the compactly supported kernel. -/ +theorem convolution_iterated_norm_le (L : E →L[ℝ] F →L[ℝ] H) (n : ℕ) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + {g : Base → F} (hg : Continuous g) {C : ℝ} (hb : ∀ x, ‖g x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ n (f ⋆[L, volume] g) x‖ ≤ + ‖L‖ * (∫ y, ‖iteratedFDeriv ℝ n f y‖) * C := by + have hC : 0 ≤ C := (norm_nonneg (g 0)).trans (hb 0) + induction n generalizing E H with + | zero => + simp only [norm_iteratedFDeriv_zero] + have hi := (hf.continuous.integrable_of_hasCompactSupport (μ := volume) hfc).norm + change ‖∫ y, L (f y) (g (x - y))‖ ≤ _ + calc + _ ≤ ∫ y, ‖L‖ * ‖f y‖ * C := by + apply norm_integral_le_of_norm_le ((hi.const_mul ‖L‖).mul_const C) + exact Filter.Eventually.of_forall fun y => + (L.le_opNorm₂ _ _).trans (mul_le_mul_of_nonneg_left (hb (x - y)) + (mul_nonneg (norm_nonneg L) (norm_nonneg (f y)))) + _ = _ := by rw [integral_mul_const, integral_const_mul] + | succ n ih => + rw [← norm_iteratedFDeriv_fderiv] + have heq : fderiv ℝ (f ⋆[L, volume] g) = + (fderiv ℝ f ⋆[L.precompL Base, volume] g) := by + funext y + exact (hfc.hasFDerivAt_convolution_left L (hf.of_le (by simp)) hg.locallyIntegrable y).fderiv + rw [heq] + have h := ih (L.precompL Base) (hf.fderiv_right (m := ∞) (by simp)) + (hfc.fderiv ℝ) + simp_rw [norm_iteratedFDeriv_fderiv] at h + apply h.trans + gcongr + exact L.norm_precompL_le Base + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CorrectedNormalSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CorrectedNormalSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd5862ff12fd7ef12dbe5e624c5494cd22e03ea2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CorrectedNormalSeed.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformFreeModeConstants +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedPerturbedDifference + +namespace OAI + +/-! Explicit size and difference budgets for the actual corrected normal seed. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates +open JetPolynomial (SupportedField supportedWeightedSeminorm) + +variable {F : RField 4} {U : Set Base} + +def correctedNormalSeed (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (q : ℕ) (b : SupportedField (F := ℝ) K) : SupportedField (F := Ambient 4) K := + perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q + (supportedFreeSeed δ τ hF h K hKU b) + +def correctedSeedBudget (L : ℕ) (B D : ℕ → ℝ) (q m : ℕ) (N : ℝ) : ℝ := + (1 + freeModeBudget 4 L B D q m) * + (Real.sqrt 2 * 2 ^ (m + (q + 1) * (L + 1)) * N) + +lemma correctedSeedBudget_nonneg (L : ℕ) (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) + (q m : ℕ) {N : ℝ} (hN : 0 ≤ N) : 0 ≤ correctedSeedBudget L B D q m N := by + have h := freeModeBudget_nonneg 4 L B D hB q m + dsimp only [correctedSeedBudget] + positivity + +lemma correctedNormalSeed_sub (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (q : ℕ) (b c : SupportedField (F := ℝ) K) : + correctedNormalSeed δ τ hF h K hKU R q (b - c) = + correctedNormalSeed δ τ hF h K hKU R q b - correctedNormalSeed δ τ hF h K hKU R q c := by + simp only [correctedNormalSeed, supportedFreeSeed_sub, map_sub] + +theorem correctedNormalSeed_bound (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {ε : ℝ} {p L : ℕ} + (hδ : 0 ≤ δ) (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ p ≤ 1) + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (hc : ∀ m, ReconstructionCoefficientBound (fun p => complexify (F p)) U s (m + 1) (B m)) + (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (hR : ∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) + (q m : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hbN : WeightedBound U s (m + (q + 1) * (L + 1)) N (freeNormal F)) + (b : SupportedField (F := ℝ) K) + (hb : supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) b ≤ A) : + supportedWeightedSeminorm K s m (correctedNormalSeed δ τ hF h K hKU R q b) ≤ + correctedSeedBudget L B D q m N * A * (δ * τ) := by + have hv := supportedFreeSeed_bound hF h K hKU b hδ hτ.le hs hA hN + (m + (q + 1) * (L + 1)) hb hbN + have ht := freeModeBudget_size (contDiff_complexify hF) (h.complexDomain hF) + K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q m + (supportedFreeSeed δ τ hF h K hKU b) (supportedFreeSeed_isFree δ τ hF h K hKU b) + have hbudget := freeModeBudget_nonneg 4 L B D hB q m + calc + _ ≤ (1 + freeModeBudget 4 L B D q m) * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) + (supportedFreeSeed δ τ hF h K hKU b) := ht + _ ≤ (1 + freeModeBudget 4 L B D q m) * + ((Real.sqrt 2 * 2 ^ (m + (q + 1) * (L + 1)) * A * N) * (δ * τ)) := + mul_le_mul_of_nonneg_left hv (by positivity) + _ = _ := by dsimp only [correctedSeedBudget]; ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1cf5e24c4410149c5f7cebe8c017ab6928e9d4b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceParameter.lean @@ -0,0 +1,229 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CovarianceCorrector + +namespace OAI + +/-! +Smooth parameter dependence of the actual finite covariance solve. Averaging +is a bounded linear map on continuous periodic functions; the covariance is +a quadratic map on that Banach space. Thus no regularity assumption on the +inverse matrix is needed. +-/ + +noncomputable section + +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.CovarianceCorrector + +section PeriodicMaps + +variable {E F G : Type*} + [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + +/-- Apply a continuous bilinear map pointwise to continuous periodic maps. -/ +def periodicBilinear (B : E →L[ℝ] F →L[ℝ] G) : + C(Period, E) →L[ℝ] C(Period, F) →L[ℝ] C(Period, G) := by + let b : C(Period, E) → C(Period, F) → C(Period, G) := fun f g => + ⟨fun t => B (f t) (g t), (B.continuous.comp f.continuous).clm_apply g.continuous⟩ + let L : C(Period, E) →ₗ[ℝ] C(Period, F) →ₗ[ℝ] C(Period, G) := + LinearMap.mk₂ ℝ b + (by intros; ext; simp [b, map_add]) + (by intros; ext; simp [b, map_smul]) + (by intros; ext; simp [b, map_add]) + (by intros; ext; simp [b, map_smul]) + exact L.mkContinuous₂ ‖B‖ (by + intro f g + apply (ContinuousMap.norm_le _ (by positivity)).mpr + intro t + exact (B.le_opNorm₂ (f t) (g t)).trans (by + gcongr + · exact f.norm_coe_le_norm t + · exact g.norm_coe_le_norm t)) + +@[simp] theorem periodicBilinear_apply (B : E →L[ℝ] F →L[ℝ] G) + (f : C(Period, E)) (g : C(Period, F)) (t : Period) : + periodicBilinear B f g t = B (f t) (g t) := rfl + +variable [CompleteSpace E] + +/-- The normalized Haar average, bundled with its norm bound. -/ +def averageCLM : C(Period, E) →L[ℝ] E := + ({ toFun := fun f => ∫ t, f t ∂AddCircle.haarAddCircle + map_add' := fun f g => integral_add + (integrable_of_continuous f.continuous) (integrable_of_continuous g.continuous) + map_smul' := fun c f => integral_smul c f } : C(Period, E) →ₗ[ℝ] E).mkContinuous + 1 (by + intro f + have h := norm_integral_le_of_norm_le_const + (μ := AddCircle.haarAddCircle) (f := fun t => f t) + (Filter.Eventually.of_forall f.norm_coe_le_norm) + simpa using h) + +omit [CompleteSpace E] in +@[simp] theorem averageCLM_apply (f : C(Period, E)) : + averageCLM f = ∫ t, f t ∂AddCircle.haarAddCircle := rfl + +def centeredPeriodic (V : C(Period, E)) : C(Period, E) := + V - ContinuousMap.const Period (averageCLM V) + +omit [CompleteSpace E] in +theorem contDiff_centeredPeriodic : ContDiff ℝ ∞ (centeredPeriodic : C(Period, E) → _) := by + let L : E →L[ℝ] C(Period, E) := ContinuousLinearMap.const ℝ Period + exact contDiff_id.sub (L.contDiff.comp (averageCLM (E := E)).contDiff) + +end PeriodicMaps + +variable {E P : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + [NormedAddCommGroup P] [NormedSpace ℝ P] + +/-- The covariance as a quadratic expression in a continuous periodic map. -/ +def covarianceCLM (V : C(Period, E)) : E →L[ℝ] E := + averageCLM (periodicBilinear (InnerProductSpace.rankOne ℝ) + (centeredPeriodic V) (centeredPeriodic V)) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +theorem covarianceCLM_apply (V : C(Period, E)) (m : E) : + covarianceCLM V m = covariance V (average V) m := by + unfold covarianceCLM + rw [averageCLM_apply] + change (∫ t, periodicBilinear (InnerProductSpace.rankOne ℝ) + (centeredPeriodic V) (centeredPeriodic V) t ∂AddCircle.haarAddCircle) m = _ + rw [ContinuousLinearMap.integral_apply (integrable_of_continuous + (periodicBilinear (InnerProductSpace.rankOne ℝ) + (centeredPeriodic V) (centeredPeriodic V)).continuous)] + rfl + +omit [CompleteSpace E] in +theorem contDiff_covarianceCLM : ContDiff ℝ ∞ (covarianceCLM : C(Period, E) → _) := by + rw [contDiff_clm_apply_iff] + intro m + let L : C(Period, E) →L[ℝ] C(Period, ℝ) := + (innerSL ℝ m).compLeftContinuous ℝ Period + let B : C(Period, ℝ) →L[ℝ] C(Period, E) →L[ℝ] C(Period, E) := + periodicBilinear (ContinuousLinearMap.lsmul ℝ ℝ) + have hB := B.isBoundedBilinearMap.contDiff.comp + ((L.contDiff.comp contDiff_centeredPeriodic).prodMk contDiff_centeredPeriodic) + have hh := averageCLM.contDiff.comp hB + convert hh using 1 + ext V + rw [covarianceCLM_apply] + change (∫ t, inner ℝ (V t - average V) m • (V t - average V) + ∂AddCircle.haarAddCircle) = + ∫ t, inner ℝ m (V t - average V) • (V t - average V) ∂AddCircle.haarAddCircle + congr 1 + funext t + rw [real_inner_comm] + +def meanCLM (V : C(Period, E)) (q : ℝ) : E →L[ℝ] E := + ContinuousLinearMap.id ℝ E - q⁻¹ • covarianceCLM V + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +theorem meanCLM_apply (V : C(Period, E)) (q : ℝ) (m : E) : + meanCLM V q m = m - q⁻¹ • covariance V (average V) m := by + simp only [meanCLM, sub_apply, ContinuousLinearMap.id_apply, + smul_apply, covarianceCLM_apply] + +theorem meanCLM_isInvertible {V : C(Period, E)} {q : ℝ} (hq : 0 < q) + (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : (meanCLM V q).IsInvertible := by + have hinj : Function.Injective (meanCLM V q) := by + intro m n he + apply sub_eq_zero.mp + apply meanOperator_kernel_trivial V.continuous rfl hq hcircle + change (m - n) - q⁻¹ • covariance V (average V) (m - n) = 0 + rw [← meanCLM_apply, map_sub, he, sub_self] + have hsurj : Function.Surjective (meanCLM V q) := + LinearMap.surjective_of_injective (f := (meanCLM V q).toLinearMap) hinj + refine ⟨(LinearEquiv.ofBijective (meanCLM V q).toLinearMap ⟨hinj, hsurj⟩).toContinuousLinearEquiv, ?_⟩ + rfl + +def weightedAverage (V : C(Period, E)) (r : C(Period, ℝ)) : E := + averageCLM (periodicBilinear (ContinuousLinearMap.lsmul ℝ ℝ) r V) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] theorem weightedAverage_apply (V : C(Period, E)) (r : C(Period, ℝ)) : + weightedAverage V r = average (fun t => r t • V t) := rfl + +def covarianceSolution (V : C(Period, E)) (r : C(Period, ℝ)) (q : ℝ) : E := + (meanCLM V q).inverse (weightedAverage V r) + +theorem covarianceSolution_equation {V : C(Period, E)} (r : C(Period, ℝ)) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + covarianceSolution V r q - q⁻¹ • covariance V (average V) (covarianceSolution V r q) = + average (fun t => r t • V t) := by + rw [← meanCLM_apply] + exact (meanCLM_isInvertible hq hcircle).self_apply_inverse _ + +theorem contDiff_covarianceSolution {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + {q : P → ℝ} (hV : ContDiff ℝ ∞ V) (hr : ContDiff ℝ ∞ r) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ x, 0 < q x) + (hcircle : ∀ x t, inner ℝ (V x t) (V x t) = q x) : + ContDiff ℝ ∞ (fun x => covarianceSolution (V x) (r x) (q x)) := by + have hM : ContDiff ℝ ∞ (fun x => meanCLM (V x) (q x)) := + contDiff_const.sub ((hq.inv (fun x => (hqpos x).ne')).smul + (contDiff_covarianceCLM.comp hV)) + have hMinv : ContDiff ℝ ∞ (fun x => (meanCLM (V x) (q x)).inverse) := by + rw [contDiff_iff_contDiffAt] + intro x + exact (meanCLM_isInvertible (hqpos x) (hcircle x)).contDiffAt_map_inverse.comp x hM.contDiffAt + have hsource : ContDiff ℝ ∞ (fun x => weightedAverage (V x) (r x)) := + by + let B : C(Period, ℝ) →L[ℝ] C(Period, E) →L[ℝ] C(Period, E) := + periodicBilinear (ContinuousLinearMap.lsmul ℝ ℝ) + exact averageCLM.contDiff.comp (B.isBoundedBilinearMap.contDiff.comp (hr.prodMk hV)) + exact hMinv.clm_apply hsource + +def parameterCorrector (V : P → C(Period, E)) (r : P → C(Period, ℝ)) + (q : P → ℝ) (x : P) : Period → E := + correctedVector (V x) (average (V x)) (q x) (r x) + (covarianceSolution (V x) (r x) (q x)) + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] in +theorem parameterCorrector_average {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + {q : P → ℝ} (hqpos : ∀ x, 0 < q x) + (hcircle : ∀ x t, inner ℝ (V x t) (V x t) = q x) (x : P) : + average (parameterCorrector V r q x) = 0 := + average_correctedVector (V x).continuous rfl (r x).continuous (q x) + (covarianceSolution (V x) (r x) (q x)) + (covarianceSolution_equation (r x) (hqpos x) (hcircle x)) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] [NormedAddCommGroup P] [NormedSpace ℝ P] in +theorem parameterCorrector_projection {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + {q : P → ℝ} (hr0 : ∀ x, average (r x) = 0) (hqpos : ∀ x, 0 < q x) + (hcircle : ∀ x t, inner ℝ (V x t) (V x t) = q x) (x : P) : + fluctuation (fun t => inner ℝ (V x t) (parameterCorrector V r q x t)) = r x := + corrected_projection (V x) (average (V x)) (r x).continuous (hr0 x) + (hqpos x).ne' (hcircle x) _ + +/-- Smoothness in both the finite-dimensional parameters and the angular +variable. The Banach-space hypotheses ensure uniform parameter smoothness; +the real-lift hypotheses provide angular smoothness and mixed derivatives. -/ +theorem contDiff_parameterCorrector {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + {q : P → ℝ} (hV : ContDiff ℝ ∞ V) (hr : ContDiff ℝ ∞ r) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ x, 0 < q x) + (hcircle : ∀ x t, inner ℝ (V x t) (V x t) = q x) + (hVlift : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hrlift : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) : + ContDiff ℝ ∞ (fun p : P × ℝ => parameterCorrector V r q p.1 (p.2 : Period)) := by + have hm : ContDiff ℝ ∞ (fun p : P × ℝ => + covarianceSolution (V p.1) (r p.1) (q p.1)) := + (contDiff_covarianceSolution hV hr hq hqpos hcircle).comp contDiff_fst + have hv : ContDiff ℝ ∞ (fun p : P × ℝ => average (V p.1)) := + (averageCLM.contDiff.comp hV).comp contDiff_fst + have hi : ContDiff ℝ ∞ (fun p : P × ℝ => (q p.1)⁻¹) := + (hq.comp contDiff_fst).inv (fun p => (hqpos p.1).ne') + have hs : ContDiff ℝ ∞ (fun p : P × ℝ => + correctedScalar (V p.1) (average (V p.1)) (q p.1) (r p.1) + (covarianceSolution (V p.1) (r p.1) (q p.1)) (p.2 : Period)) := by + simpa only [correctedScalar, div_eq_mul_inv] using + hrlift.add (((hVlift.sub hv).inner ℝ hm).mul hi) + exact hi.smul ((hs.smul hVlift).sub hm) + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceRealOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceRealOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a5341f1af0c85ca7f763fd9ea6423fded40b0b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovarianceRealOperator.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalCovarianceParameter + +namespace OAI + +/-! The actual covariance correction acting on real-parameter forcing. +This form exposes linearity and does not require separate periodicity proofs +for the individual coefficients of a jet polynomial. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.CovarianceCorrector + +variable {E P : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + +def realMoment (V : C(Period, E)) (r : ℝ → ℝ) : E := + ∫ t in 0..1, r t • V (t : Period) + +def realMeanSolution (V : C(Period, E)) (q : ℝ) (r : ℝ → ℝ) : E := + (meanCLM V q).inverse (realMoment V r) + +def realCorrector (V : C(Period, E)) (q : ℝ) (r : ℝ → ℝ) (t : ℝ) : E := + let m := realMeanSolution V q r + q⁻¹ • ((r t + inner ℝ (V (t : Period) - average V) m / q) • V (t : Period) - m) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma realMeanSolution_add (V : C(Period, E)) (q : ℝ) {f g : ℝ → ℝ} + (hf : Continuous f) (hg : Continuous g) : + realMeanSolution V q (fun t => f t + g t) = + realMeanSolution V q f + realMeanSolution V q g := by + unfold realMeanSolution realMoment + simp only [add_smul] + have hfi : IntervalIntegrable (fun t : ℝ => f t • V (t : Period)) volume 0 1 := + (hf.smul (V.continuous.comp (AddCircle.continuous_mk' 1))).intervalIntegrable 0 1 + have hgi : IntervalIntegrable (fun t : ℝ => g t • V (t : Period)) volume 0 1 := + (hg.smul (V.continuous.comp (AddCircle.continuous_mk' 1))).intervalIntegrable 0 1 + rw [intervalIntegral.integral_add hfi hgi, map_add] + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma realMeanSolution_smul (V : C(Period, E)) (q a : ℝ) (f : ℝ → ℝ) : + realMeanSolution V q (fun t => a * f t) = a • realMeanSolution V q f := by + unfold realMeanSolution realMoment + simp only [mul_smul, intervalIntegral.integral_smul, map_smul] + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma realCorrector_add (V : C(Period, E)) (q : ℝ) {f g : ℝ → ℝ} + (hf : Continuous f) (hg : Continuous g) (t : ℝ) : + realCorrector V q (fun s => f s + g s) t = realCorrector V q f t + realCorrector V q g t := by + simp only [realCorrector, realMeanSolution_add V q hf hg, inner_add_right, add_div] + module + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma realCorrector_smul (V : C(Period, E)) (q a : ℝ) (f : ℝ → ℝ) (t : ℝ) : + realCorrector V q (fun s => a * f s) t = a • realCorrector V q f t := by + simp only [realCorrector, realMeanSolution_smul, inner_smul_right] + have ha : a * f t + a * inner ℝ (V (t : Period) - average V) (realMeanSolution V q f) / q = + a * (f t + inner ℝ (V (t : Period) - average V) (realMeanSolution V q f) / q) := by ring + rw [ha] + module + +omit [CompleteSpace E] [FiniteDimensional ℝ E] [NormedAddCommGroup P] + [NormedSpace ℝ P] [FiniteDimensional ℝ P] in +/-- Agreement with the covariance correction already used in the periodic solver. -/ +lemma realCorrector_eq_parameterCorrector (V : P → C(Period, E)) (q : P → ℝ) + (r : P → C(Period, ℝ)) (p : P) (t : ℝ) : + realCorrector (V p) (q p) (fun s => r p (s : Period)) t = + parameterCorrector V r q p (t : Period) := by + have hm : realMoment (V p) (fun s => r p (s : Period)) = weightedAverage (V p) (r p) := by + exact PeriodicPrimitive.integral_lift_eq_haar (fun s => r p s • V p s) + simp only [realCorrector, realMeanSolution, hm, parameterCorrector, + correctedVector, correctedScalar, covarianceSolution] + +lemma contDiffOn_realMeanSolution {O : Set P} (hO : IsOpen O) + {V : P → C(Period, E)} {q : P → ℝ} {c : P × ℝ → ℝ} + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun p => realMeanSolution (V p) (q p) (fun t => c (p, t))) O := by + have hM : ContDiffOn ℝ ∞ (fun p => meanCLM (V p) (q p)) O := + contDiffOn_const.sub ((hq.inv (fun p hp => (hqpos p hp).ne')).smul + (contDiffOn_covarianceCLM_joint hO hV)) + have hi : ContDiffOn ℝ ∞ (fun p => (meanCLM (V p) (q p)).inverse) O := by + apply hO.contDiffOn_iff.mpr + intro p hp + exact (meanCLM_isInvertible (hqpos p hp) (hcircle p hp)).contDiffAt_map_inverse.comp p + (hM.contDiffAt (hO.mem_nhds hp)) + exact hi.clm_apply (SmoothParameterIntegral.contDiffOn_integral hO (hc.smul hV) 0 1) + +lemma contDiffOn_realCorrector {O : Set P} (hO : IsOpen O) + {V : P → C(Period, E)} {q : P → ℝ} {c : P × ℝ → ℝ} + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => realCorrector (V z.1) (q z.1) + (fun t => c (z.1, t)) z.2) (O ×ˢ Set.univ) := by + have hm : ContDiffOn ℝ ∞ (fun z : P × ℝ => + realMeanSolution (V z.1) (q z.1) (fun t => c (z.1, t))) (O ×ˢ Set.univ) := + (contDiffOn_realMeanSolution hO hV hq hqpos hcircle hc).comp + contDiffOn_fst (fun _ hz => hz.1) + have hv : ContDiffOn ℝ ∞ (fun z : P × ℝ => average (V z.1)) (O ×ˢ Set.univ) := + (contDiffOn_average_joint hO hV).comp contDiffOn_fst (fun _ hz => hz.1) + have hq' : ContDiffOn ℝ ∞ (fun z : P × ℝ => q z.1) (O ×ˢ Set.univ) := + hq.comp contDiffOn_fst (fun _ hz => hz.1) + have hi := hq'.inv (fun z hz => (hqpos z.1 hz.1).ne') + exact hi.smul (((hc.add (((hV.sub hv).inner ℝ hm).div hq' + (fun z hz => (hqpos z.1 hz.1).ne'))).smul hV).sub hm) + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovectorPullbackParameters.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovectorPullbackParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..d83b299d2e784bddda95f4eac907eaf65c019b49 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CovectorPullbackParameters.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentPhaseProjections +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases + +namespace OAI + +/-! Actual pullback of phase covectors by a chart derivative. Its parameter +map is open when the chart determinant is nonzero. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +def pullCovectorMap (A : CurvePlane →L[ℝ] CurvePlane) : CurvePlane →L[ℝ] CurvePlane := + (((A dx).1 • ContinuousLinearMap.fst ℝ ℝ ℝ) + + ((A dx).2 • ContinuousLinearMap.snd ℝ ℝ ℝ)).prod + (((A dy).1 • ContinuousLinearMap.fst ℝ ℝ ℝ) + + ((A dy).2 • ContinuousLinearMap.snd ℝ ℝ ℝ)) + +lemma pullCovectorMap_apply (A : CurvePlane →L[ℝ] CurvePlane) (v : CurvePlane) : + pullCovectorMap A v = pullCovector A v := by + ext <;> simp [pullCovectorMap,pullCovector] <;> ring + +lemma pullCovectorMap_surjective (A : CurvePlane →L[ℝ] CurvePlane) + (hA : coordDet A ≠ 0) : Function.Surjective (pullCovectorMap A) := by + intro y + refine ⟨(((A dy).2*y.1-(A dx).2*y.2)/coordDet A, + ((A dx).1*y.2-(A dy).1*y.1)/coordDet A),?_⟩ + rw [pullCovectorMap_apply] + ext <;> dsimp [pullCovector] <;> field_simp [hA] <;> dsimp [coordDet] <;> ring + +lemma covectorDet_pullback (A : CurvePlane →L[ℝ] CurvePlane) (v w : CurvePlane) : + covectorDet (pullCovector A v) (pullCovector A w) = coordDet A * covectorDet v w := by + dsimp [covectorDet,pullCovector,coordDet] + ring + +lemma phaseLinear_ne_zero_on_kernel {v w t : CurvePlane} + (hdet : covectorDet v w ≠ 0) (ht : t ≠ 0) (hv : phaseLinear v t = 0) : + phaseLinear w t ≠ 0 := by + intro hw + by_cases ht1 : t.1 = 0 + · have ht2 : t.2 ≠ 0 := fun ht2 => ht (Prod.ext ht1 ht2) + have he : covectorDet v w * t.2 = v.1 * phaseLinear w t-w.1 * phaseLinear v t := by + dsimp [covectorDet,phaseLinear_apply] + ring + rw [hv,hw,mul_zero,mul_zero,sub_self] at he + exact hdet ((mul_eq_zero.mp he).resolve_right ht2) + · have he : covectorDet v w * t.1 = w.2 * phaseLinear v t-v.2 * phaseLinear w t := by + dsimp [covectorDet,phaseLinear_apply] + ring + rw [hv,hw,mul_zero,mul_zero,sub_self] at he + exact hdet ((mul_eq_zero.mp he).resolve_right ht1) + +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +lemma independent_pulled_covectors_open_dense {i j : ι} (hij : i ≠ j) + (A B : CurvePlane →L[ℝ] CurvePlane) (hA : coordDet A ≠ 0) (hB : coordDet B ≠ 0) + (a b : CurvePlane) : + IsOpen {ell : ι → CurvePlane | + covectorDet (pullCovector A (ell i+a)) (pullCovector B (ell j+b)) ≠ 0} ∧ + Dense {ell : ι → CurvePlane | + covectorDet (pullCovector A (ell i+a)) (pullCovector B (ell j+b)) ≠ 0} := by + let T : (CurvePlane × CurvePlane) →L[ℝ] (CurvePlane × CurvePlane) := + ((pullCovectorMap A).comp (ContinuousLinearMap.fst ℝ CurvePlane CurvePlane)).prod + ((pullCovectorMap B).comp (ContinuousLinearMap.snd ℝ CurvePlane CurvePlane)) + have hT : Function.Surjective T := by + intro y + obtain ⟨v,hv⟩ := pullCovectorMap_surjective A hA y.1 + obtain ⟨w,hw⟩ := pullCovectorMap_surjective B hB y.2 + exact ⟨(v,w),Prod.ext hv hw⟩ + let F : (ι → CurvePlane) → CurvePlane × CurvePlane := + fun ell => T (phasePairProjection i j ell+(a,b)) + have hF : Continuous F := by fun_prop + have hopen : IsOpenMap F := (T.isOpenMap hT).comp + ((isOpenMap_add_right (a,b)).comp + ((phasePairProjection i j).isOpenMap (phasePairProjection_surjective hij))) + have he : {ell : ι → CurvePlane | + covectorDet (pullCovector A (ell i+a)) (pullCovector B (ell j+b)) ≠ 0} = + F ⁻¹' {z | covectorDet z.1 z.2 ≠ 0} := by + ext ell + change covectorDet (pullCovector A (ell i+a)) (pullCovector B (ell j+b)) ≠ 0 ↔ + covectorDet (pullCovectorMap A (ell i+a)) (pullCovectorMap B (ell j+b)) ≠ 0 + rw [pullCovectorMap_apply,pullCovectorMap_apply] + rw [he] + exact ⟨covectorDet_open_dense.1.preimage hF,covectorDet_open_dense.2.preimage hopen⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CriticalSetClosed.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CriticalSetClosed.lean new file mode 100644 index 0000000000000000000000000000000000000000..b818546b76a136c5d3d68bf2ffe5fa36e1f96bbd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CriticalSetClosed.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSardCompact +import Mathlib.Analysis.Normed.Ring.Units + +namespace OAI + +/-! Finite-dimensional critical loci are closed. This supplies compact +exhaustions for the fiberwise critical-value argument. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] + +theorem surjective_clm_open : IsOpen {K : E →L[ℝ] F | Function.Surjective K} := by + rw [isOpen_iff_mem_nhds] + intro K hK + obtain ⟨R,hR⟩ := K.toLinearMap.exists_rightInverse_of_surjective (LinearMap.range_eq_top.mpr hK) + let R' : F →L[ℝ] E := R.toContinuousLinearMap + have hKR : K.comp R' = ContinuousLinearMap.id ℝ F := by + apply ContinuousLinearMap.ext + intro x + exact congrArg (fun L : F →ₗ[ℝ] F => L x) hR + have hc : Continuous (fun L : E →L[ℝ] F => L.comp R') := continuous_id.clm_comp continuous_const + have hn : ∀ᶠ L in 𝓝 K, IsUnit (L.comp R') := by + change (fun L : E →L[ℝ] F => L.comp R') ⁻¹' {A | IsUnit A} ∈ 𝓝 K + apply hc.continuousAt.preimage_mem_nhds + apply Units.isOpen.mem_nhds + rw [hKR] + exact isUnit_one + filter_upwards [hn] with L hL + obtain ⟨u,hu⟩ := hL + intro y + refine ⟨R' ((↑u⁻¹ : F →L[ℝ] F) y),?_⟩ + have hval : L (R' ((↑u⁻¹ : F →L[ℝ] F) y)) = + (↑u : F →L[ℝ] F) ((↑u⁻¹ : F →L[ℝ] F) y) := by rw [hu]; rfl + rw [hval] + change ((u : F →L[ℝ] F) * (↑u⁻¹ : F →L[ℝ] F)) y = y + simp + +theorem smooth_critical_set_closed {f : E → F} (hf : ContDiff ℝ ∞ f) : + IsClosed {x | ¬ Function.Surjective (fderiv ℝ f x)} := + (surjective_clm_open.preimage (hf.continuous_fderiv (by simp))).isClosed_compl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CubicTaylorRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CubicTaylorRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..865e76c0954c14299ba3c3fac34d7426da8703aa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CubicTaylorRemainder.lean @@ -0,0 +1,67 @@ +import Mathlib + +namespace OAI + +/-! The third-order integral remainder needed after the finite quadratic +mean correction. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4 + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +omit [CompleteSpace E] in +lemma quadraticTaylor_value {f : ℝ → E} (hf : ContDiff ℝ ∞ f) : + taylorWithinEval f 2 (uIcc (0 : ℝ) 1) 0 1 = + f 0 + deriv f 0 + (1 / 2 : ℝ) • iteratedDeriv 2 f 0 := by + have hi (k : ℕ) : iteratedDerivWithin k f (uIcc (0 : ℝ) 1) 0 = iteratedDeriv k f 0 := + iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_uIcc (by norm_num)) + ((hf.of_le (by simp : (k : ℕ∞ω) ≤ ∞)).contDiffAt) (by simp) + rw [show 2 = 1 + 1 from rfl, taylorWithinEval_succ, taylorWithinEval_succ, + taylor_within_zero_eval, hi 1, hi 2] + norm_num + +lemma cubicTaylor_remainder {f : ℝ → E} (hf : ContDiff ℝ ∞ f) : + f 1 - f 0 - deriv f 0 - (1 / 2 : ℝ) • iteratedDeriv 2 f 0 = + ∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / 2) • iteratedDeriv 3 f t := by + have ht := taylor_integral_remainder (f := f) (n := 2) (x₀ := 0) (x := 1) + (hf.of_le (by simp : ((2 + 1 : ℕ) : ℕ∞ω) ≤ ∞)).contDiffOn + rw [quadraticTaylor_value hf] at ht + have hi : (∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / (Nat.factorial 2 : ℝ)) • + iteratedDerivWithin 3 f (uIcc (0 : ℝ) 1) t) = + ∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / 2) • iteratedDeriv 3 f t := by + apply intervalIntegral.integral_congr + intro t ht + dsimp only + rw [iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_uIcc (by norm_num)) + ((hf.of_le (by simp : (3 : ℕ∞ω) ≤ ∞)).contDiffAt) ht] + norm_num + rw [hi] at ht + convert ht using 1 + abel + +lemma cubicTaylor_bound {f : ℝ → E} (hf : ContDiff ℝ ∞ f) {M : ℝ} (hM : 0 ≤ M) + (hderiv : ∀ t ∈ Icc (0 : ℝ) 1, ‖iteratedDeriv 3 f t‖ ≤ M) : + ‖f 1 - f 0 - deriv f 0 - (1 / 2 : ℝ) • iteratedDeriv 2 f 0‖ ≤ M / 2 := by + rw [cubicTaylor_remainder hf] + have hbound : ‖∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / 2) • iteratedDeriv 3 f t‖ ≤ + (M / 2) * |1 - 0| := by + apply intervalIntegral.norm_integral_le_of_norm_le_const + intro t ht + have ht' : t ∈ Icc (0 : ℝ) 1 := by + simpa using uIoc_subset_uIcc ht + have hweight : (1 - t) ^ 2 / 2 ≤ (1 / 2 : ℝ) := by nlinarith [ht'.1, ht'.2] + rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ (1 - t) ^ 2 / 2)] + calc + _ ≤ ((1 - t) ^ 2 / 2) * M := mul_le_mul_of_nonneg_left (hderiv t ht') (by positivity) + _ ≤ (1 / 2 : ℝ) * M := mul_le_mul_of_nonneg_right hweight hM + _ = M / 2 := by ring + simpa using hbound + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeLocalization.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..819ce7f33a7dc7c5fb41fe04bbd5c5cc1a1a7566 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeLocalization.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgePaths +import OAI.Geometry.SurfaceImmersion.Geometry.CurveIncidenceGraph + +namespace OAI + +/-! Localization of a full edge path at its two graph vertices and its +single open interval edge. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem curve_edge_frontier_endpoints {V : Set X} {E : Set X} + (w : CurveEdgeWitness V E) (hdis : Disjoint E V) (a b : V) (hne : a ≠ b) + (ha : a.val ∈ closure E) (hb : b.val ∈ closure E) : + closure E \ E = {a.val,b.val} := by + have hne' : a.val ≠ b.val := fun h => hne (Subtype.ext h) + rcases (w.endpoint_iff hdis a.property).mp ha with hal | har <;> + rcases (w.endpoint_iff hdis b.property).mp hb with hbl | hbr + · exact False.elim (hne' (hal.trans hbl.symm)) + · rw [w.frontier_eq,hal,hbr] + · rw [w.frontier_eq,har,hbl,pair_comm] + · exact False.elim (hne' (har.trans hbr.symm)) + +theorem curve_edge_path_localization {V : Set X} {P : Finset (Set X)} + (hP : ∀ E ∈ P, Disjoint E V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (E : P) (w : CurveEdgeWitness V E.val) (a b : V) (hne : a ≠ b) + (ha : a.val ∈ closure E.val) (hb : b.val ∈ closure E.val) + (γ : Path a.val b.val) (hrange : range γ = closure E.val) : + (∀ v : V, v.val ∈ range γ → v = a ∨ v = b) ∧ + (∀ F : P, (range γ ∩ F.val).Nonempty → F = E) := by + have hfront := curve_edge_frontier_endpoints w (hP E.val E.property) a b hne ha hb + constructor + · intro v hv + have hn : v.val ∉ E.val := fun h => disjoint_left.mp (hP E.val E.property) h v.property + have hv' : v.val ∈ closure E.val \ E.val := ⟨hrange ▸ hv,hn⟩ + rw [hfront] at hv' + rcases hv' with he | he + · exact Or.inl (Subtype.ext he) + · exact Or.inr (Subtype.ext (mem_singleton_iff.mp he)) + · rintro F ⟨x,hxγ,hxF⟩ + by_contra hFE + have hxcl : x ∈ closure E.val := hrange ▸ hxγ + by_cases hxE : x ∈ E.val + · exact disjoint_left.mp (hdis F.val F.property E.val E.property + (fun h => hFE (Subtype.ext h))) hxF hxE + · have hxV : x ∈ V := by + have hx : x ∈ closure E.val \ E.val := ⟨hxcl,hxE⟩ + rw [w.frontier_eq] at hx + rcases hx with he | he + · exact he ▸ w.left_mem + · exact (mem_singleton_iff.mp he) ▸ w.right_mem + exact disjoint_left.mp (hP F.val F.property) hxF hxV + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeParametrization.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeParametrization.lean new file mode 100644 index 0000000000000000000000000000000000000000..414cec6256855feea01c6830d3f4d7bb2dfe6877 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeParametrization.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeWitness +import OAI.Geometry.SurfaceImmersion.Atlas.LineChartEndpointObstruction + +namespace OAI + +/-! Retained edge witnesses give actual compact interval +parametrizations of their closures. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +def CurveEdgeWitness.param {V E : Set X} (w : CurveEdgeWitness V E) : Icc w.lo w.hi → X := + fun t => w.arc.map ⟨t.val,w.lower.trans t.property.1,t.property.2.trans w.upper⟩ + +lemma CurveEdgeWitness.param_closedEmbedding {V E : Set X} (w : CurveEdgeWitness V E) : + IsClosedEmbedding w.param := by + let j : Icc w.lo w.hi → Icc w.arc.left w.arc.right := fun t => + ⟨t.val,w.lower.trans t.property.1,t.property.2.trans w.upper⟩ + have hj : Continuous j := continuous_subtype_val.subtype_mk _ + have hc : Continuous w.param := w.arc.embedding.continuous.comp hj + apply hc.isClosedEmbedding + intro s t hst + have he := w.arc.embedding.injective hst + exact Subtype.ext (congrArg (fun u : Icc w.arc.left w.arc.right => (u:ℝ)) he) + +omit [T2Space X] in +lemma CurveEdgeWitness.param_range {V E : Set X} (w : CurveEdgeWitness V E) : + range w.param = closure E := by + conv_rhs => rw [w.piece_eq,w.arc.subarc_closure w.lower w.upper w.ordered] + apply Subset.antisymm + · rintro x ⟨t,rfl⟩ + exact ⟨⟨t.val,w.lower.trans t.property.1,t.property.2.trans w.upper⟩,t.property,rfl⟩ + · rintro x ⟨t,ht,rfl⟩ + exact ⟨⟨t.val,ht⟩,rfl⟩ + +lemma CurveEdgeWitness.frontier_not_interior_closure {V E : Set X} (w : CurveEdgeWitness V E) + (d : OpenPartialHomeomorph X ℝ) {p : X} (hp : p ∈ d.source) + (hb : p ∈ closure E \ E) : p ∉ interior (closure E) := by + have hend : p = w.param ⟨w.lo,le_rfl,w.ordered.le⟩ ∨ + p = w.param ⟨w.hi,w.ordered.le,le_rfl⟩ := by + rw [w.frontier_eq] at hb + rcases hb with h | h + · exact Or.inl h + · exact Or.inr (mem_singleton_iff.mp h) + rw [← w.param_range] + exact compact_arc_endpoint_not_interior d w.ordered.le w.param w.param_closedEmbedding.isEmbedding hp hend + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgePaths.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgePaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a13a89f69fecf927fe3ffb23946938a8036a59b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgePaths.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricCurvePaths + +namespace OAI + +/-! Each retained compact interval edge is parametrized by an injective +path, in either orientation. -/ +noncomputable section +open Set Topology unitInterval +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +def CurveEdgeWitness.path {V E : Set X} (w : CurveEdgeWitness V E) : + Path w.leftPoint w.rightPoint where + toFun t := w.param ((iccHomeoI w.lo w.hi w.ordered).symm t) + continuous_toFun := w.param_closedEmbedding.continuous.comp (iccHomeoI w.lo w.hi w.ordered).symm.continuous + source' := by + change w.param _ = w.param ⟨w.lo,le_rfl,w.ordered.le⟩ + congr 1 + apply Subtype.ext + simp + target' := by + change w.param _ = w.param ⟨w.hi,w.ordered.le,le_rfl⟩ + congr 1 + apply Subtype.ext + simp + +lemma CurveEdgeWitness.path_injective {V E : Set X} (w : CurveEdgeWitness V E) : + Function.Injective w.path := + w.param_closedEmbedding.injective.comp (iccHomeoI w.lo w.hi w.ordered).symm.injective + +lemma CurveEdgeWitness.path_range {V E : Set X} (w : CurveEdgeWitness V E) : + range w.path = closure E := by + change range (w.param ∘ (iccHomeoI w.lo w.hi w.ordered).symm) = _ + rw [range_comp,(iccHomeoI w.lo w.hi w.ordered).symm.surjective.range_eq,image_univ,w.param_range] + +lemma CurveEdgeWitness.endpoint_iff {V E : Set X} (w : CurveEdgeWitness V E) + (hdis : Disjoint E V) {p : X} (hp : p ∈ V) : + p ∈ closure E ↔ p = w.leftPoint ∨ p = w.rightPoint := by + have hnot : p ∉ E := fun h => disjoint_left.mp hdis h hp + have he : p ∈ closure E ↔ p ∈ closure E \ E := by simp only [mem_sdiff,hnot,not_false_eq_true,and_true] + rw [he,w.frontier_eq] + simp only [mem_insert_iff,mem_singleton_iff] + +lemma CurveEdgeWitness.oriented_path {V E : Set X} (w : CurveEdgeWitness V E) + (hdis : Disjoint E V) {p q : X} (hp : p ∈ V) (hq : q ∈ V) (hne : p ≠ q) + (hpE : p ∈ closure E) (hqE : q ∈ closure E) : + ∃ γ : Path p q, Function.Injective γ ∧ range γ = closure E := by + rcases (w.endpoint_iff hdis hp).mp hpE with hpl | hpr <;> + rcases (w.endpoint_iff hdis hq).mp hqE with hql | hqr + · exact False.elim (hne (hpl.trans hql.symm)) + · exact ⟨w.path.cast hpl hqr,w.path_injective,w.path_range⟩ + · refine ⟨w.path.symm.cast hpr hql,?_,?_⟩ + · exact w.path_injective.comp unitInterval.symm_bijective.injective + · simpa only [Path.cast_coe,Path.symm_range] using w.path_range + · exact False.elim (hne (hpr.trans hqr.symm)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeWitness.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeWitness.lean new file mode 100644 index 0000000000000000000000000000000000000000..0866d1aafa83c7c74e42d3e621e6aeb6e49b3c5f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveEdgeWitness.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcClosure + +namespace OAI + +/-! Each finite curve edge retains its actual compact interval +parametrization, two distinct endpoints, and exact frontier. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +structure CurveEdgeWitness (V E : Set X) where + arc : CompactCurveArc X + lo : ℝ + hi : ℝ + lower : arc.left ≤ lo + upper : hi ≤ arc.right + ordered : lo < hi + piece_eq : E = arc.openSubarc lo hi + left_mem : arc.map ⟨lo,lower,ordered.le.trans upper⟩ ∈ V + right_mem : arc.map ⟨hi,lower.trans ordered.le,upper⟩ ∈ V + +def CurveEdgeWitness.leftPoint {V E : Set X} (w : CurveEdgeWitness V E) : X := + w.arc.map ⟨w.lo,w.lower,w.ordered.le.trans w.upper⟩ + +def CurveEdgeWitness.rightPoint {V E : Set X} (w : CurveEdgeWitness V E) : X := + w.arc.map ⟨w.hi,w.lower.trans w.ordered.le,w.upper⟩ + +lemma CurveEdgeWitness.endpoints_ne {V E : Set X} (w : CurveEdgeWitness V E) : + w.leftPoint ≠ w.rightPoint := by + intro he + have ht := w.arc.embedding.injective he + exact w.ordered.ne (congrArg Subtype.val ht) + +variable [T2Space X] +lemma CurveEdgeWitness.frontier_eq {V E : Set X} (w : CurveEdgeWitness V E) : + closure E \ E = {w.leftPoint,w.rightPoint} := by + conv_lhs => rw [w.piece_eq] + exact w.arc.subarc_boundary_eq w.lower w.upper w.ordered + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveFrameInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveFrameInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6495dd853d971dbe969f20e89ed2b294edbb20f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveFrameInverse.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapStripFrame + +namespace OAI + +/-! Smooth inverse frames and the exact normal-coordinate immersion criterion. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma curveNormalLinear_invertible {v a : Fin 3 → ℝ} + (hv : v ≠ 0) (ha : ∀ r : ℝ, r • v ≠ a) : (curveNormalLinear v a).IsInvertible := by + have hb := curveNormalLinear_bijective hv ha + exact ⟨ContinuousLinearEquiv.ofBijective (curveNormalLinear v a) + (LinearMap.ker_eq_bot.mpr hb.1) (LinearMap.range_eq_top.mpr hb.2),rfl⟩ + +lemma curveNormalLinear_inverse_velocity {v a : Fin 3 → ℝ} + (hv : v ≠ 0) (ha : ∀ r : ℝ, r • v ≠ a) : + (curveNormalLinear v a).inverse v = ((0 : Base),1) := by + apply ((curveNormalLinear_invertible hv ha).inverse_apply_eq).mpr + simp [curveNormalLinear_apply] + +lemma curveNormalLinear_inverse_smooth {v : ℝ → Fin 3 → ℝ} + (hv : ContDiff ℝ ∞ v) {a : Fin 3 → ℝ} {J : Set ℝ} + (hn : ∀ t ∈ J, v t ≠ 0) (ha : ∀ t r : ℝ, r • v t ≠ a) : + ContDiffOn ℝ ∞ (fun t => (curveNormalLinear (v t) a).inverse) J := by + intro t ht + exact ((curveNormalLinear_invertible (hn t ht) (ha t)).contDiffAt_map_inverse.comp t + (curveNormalLinear_smooth hv a).contDiffAt).contDiffWithinAt + +lemma normal_coordinates_injective_iff (L : Base →L[ℝ] (Base × ℝ)) + (hL : L (![1,0] : Base) = ((0:Base),1)) : + Function.Injective L ↔ (L (![0,1] : Base)).1 ≠ 0 := by + have hsplit : ∀ x : Base, L x = (x 0) • L (![1,0] : Base) + (x 1) • L (![0,1] : Base) := by + intro x + have hx : x = (x 0) • (![1,0] : Base) + (x 1) • (![0,1] : Base) := by + ext i; fin_cases i <;> simp + conv_lhs => rw [hx] + rw [map_add,map_smul,map_smul] + constructor + · intro h hz + have hEq : L (![0,1] : Base) = L (((L (![0,1] : Base)).2) • (![1,0] : Base)) := by + rw [map_smul,hL] + apply Prod.ext + · simpa using hz + · simp + have h0 := congrFun (h hEq) 1 + norm_num at h0 + · intro hn x y hxy + have hd : L (x-y) = 0 := by rw [map_sub,hxy,sub_self] + rw [hsplit,hL] at hd + have hfst := congrArg Prod.fst hd + have h1 : (x-y) 1 = 0 := by + have hm : (x-y) 1 • (L (![0,1] : Base)).1 = 0 := by simpa using hfst + exact (smul_eq_zero.mp hm).resolve_right hn + have hsnd := congrArg Prod.snd hd + have h0 : (x-y) 0 = 0 := by simpa [h1] using hsnd + apply sub_eq_zero.mp + ext i + fin_cases i + · exact h0 + · exact h1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceBoundaryPair.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceBoundaryPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae206f8ccf01c1335203ff301f59bfe8d8a3d943 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceBoundaryPair.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryDegreeOne +import OAI.Geometry.SurfaceImmersion.Geometry.OrdinaryDegreeTwo +import OAI.Geometry.SurfaceImmersion.Geometry.DegreeOneReachability + +namespace OAI + +/-! Every boundary point of a compact curve is connected to a different +boundary point in its actual finite interval incidence graph. -/ +noncomputable section +open Set Topology +attribute [local instance] Classical.propDecidable +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem curve_incidence_degrees (D V : Set X) (hV : V.Finite) (P : Finset (Set X)) + (hP : ∀ E ∈ P, IsOpen E ∧ Disjoint E V ∧ closure E \ E ⊆ V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (hcover : Vᶜ = ⋃ E ∈ P, E) (hwitness : ∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) + (hline : ∀ p ∉ D, ∃ c : OpenPartialHomeomorph X ℝ, p ∈ c.source) + (hhalf : ∀ p ∈ D, ∃ c : OpenPartialHomeomorph X (Ici (0:ℝ)), + p ∈ c.source ∧ c p = ⟨0,by simp⟩) [Fintype V] : + (∀ p : V, (curveIncidenceGraph V P).degree (Sum.inl p) = if p.val ∈ D then 1 else 2) ∧ + (∀ E : P, (curveIncidenceGraph V P).degree (Sum.inr E) = 2) := by + constructor + · intro p + by_cases hp : p.val ∈ D + · simp only [hp, ↓reduceIte] + obtain ⟨c,hc,hc0⟩ := hhalf p.val hp + exact curveIncidenceGraph_degree_left_one V P p + (boundary_vertex_degree_one V hV P hP hdis hcover p.property c hc hc0) + · simp only [hp, ↓reduceIte] + obtain ⟨c,hc⟩ := hline p.val hp + exact curveIncidenceGraph_degree_left_two V P p + (ordinary_vertex_degree_two V hV P hP hdis hcover hwitness p.property c hc) + · intro E + exact curveIncidenceGraph_degree_right_two V P E (hP E.val E.property).2.1 + (Classical.choice (hwitness E.val E.property)) + +theorem curve_boundary_pair (D V : Set X) (hDV : D ⊆ V) (hV : V.Finite) + (P : Finset (Set X)) + (hP : ∀ E ∈ P, IsOpen E ∧ Disjoint E V ∧ closure E \ E ⊆ V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (hcover : Vᶜ = ⋃ E ∈ P, E) (hwitness : ∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) + (hline : ∀ p ∉ D, ∃ c : OpenPartialHomeomorph X ℝ, p ∈ c.source) + (hhalf : ∀ p ∈ D, ∃ c : OpenPartialHomeomorph X (Ici (0:ℝ)), + p ∈ c.source ∧ c p = ⟨0,by simp⟩) + (p : D) : ∃ (q : D), q ≠ p ∧ Nonempty + ((curveIncidenceGraph V P).Path (Sum.inl ⟨p.val,hDV p.property⟩) + (Sum.inl ⟨q.val,hDV q.property⟩)) := by + let : Fintype V := hV.fintype + let G := curveIncidenceGraph V P + obtain ⟨hl,hr⟩ := curve_incidence_degrees D V hV P hP hdis hcover hwitness hline hhalf + have hdegrees : ∀ x, G.degree x = 1 ∨ G.degree x = 2 := by + rintro (v|E) + · rw [hl] + split_ifs <;> simp + · exact Or.inr (hr E) + have hp : G.degree (Sum.inl ⟨p.val,hDV p.property⟩) = 1 := by + rw [hl] + simp only [p.property, ↓reduceIte] + obtain ⟨q,hqp,hq,hpath⟩ := degree_one_reaches_degree_one G hdegrees + (Sum.inl ⟨p.val,hDV p.property⟩) hp + cases q with + | inr E => rw [hr] at hq; norm_num at hq + | inl v => + have hvD : v.val ∈ D := by + rw [hl] at hq + by_contra hn + simp only [hn, ↓reduceIte] at hq + norm_num at hq + refine ⟨⟨v.val,hvD⟩,?_,hpath⟩ + intro he + exact hqp (congrArg Sum.inl (Subtype.ext (congrArg (fun z : D => z.val) he))) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceGraph.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..35a8457596fdf2f9a7a0e14c647ca4336a4c3011 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveIncidenceGraph.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeWitness +import Mathlib.Combinatorics.SimpleGraph.DegreeSum +import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected + +namespace OAI + +/-! The bipartite incidence graph remembers distinct parallel interval edges. -/ +noncomputable section +open Set +attribute [local instance] Classical.propDecidable +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +def curveIncidenceGraph (V : Set X) (P : Finset (Set X)) : SimpleGraph (V ⊕ P) where + Adj a b := match a,b with + | Sum.inl v, Sum.inr E => v.val ∈ closure E.val + | Sum.inr E, Sum.inl v => v.val ∈ closure E.val + | _,_ => False + symm := ⟨by rintro (v|E) (w|F) h <;> exact h⟩ + loopless := ⟨by rintro (v|E) h <;> exact h⟩ + +@[simp] lemma curveIncidenceGraph_left_right (V : Set X) (P : Finset (Set X)) (v : V) (E : P) : + (curveIncidenceGraph V P).Adj (Sum.inl v) (Sum.inr E) ↔ v.val ∈ closure E.val := Iff.rfl + +lemma graph_degree_two {A : Type*} (G : SimpleGraph A) [Fintype A] + (p a b : A) (hne : a ≠ b) (ha : G.Adj p a) (hb : G.Adj p b) + (hall : ∀ z, G.Adj p z → z = a ∨ z = b) : G.degree p = 2 := by + classical + have hs : G.neighborSet p = {a,b} := by + ext z + constructor + · exact hall z + · rintro (rfl | hz) + · exact ha + · exact (mem_singleton_iff.mp hz) ▸ hb + rw [← G.ncard_neighborSet,hs] + simp [hne] + +lemma curveIncidenceGraph_degree_left_one (V : Set X) (P : Finset (Set X)) [Fintype V] + (v : V) (h : ∃ E ∈ P, v.val ∈ closure E ∧ + ∀ F ∈ P, v.val ∈ closure F → F = E) : + (curveIncidenceGraph V P).degree (Sum.inl v) = 1 := by + apply SimpleGraph.degree_eq_one_iff_existsUnique_adj.mpr + obtain ⟨E,hE,hv,huniq⟩ := h + refine ⟨Sum.inr ⟨E,hE⟩,hv,?_⟩ + rintro (w|F) hw + · exact False.elim hw + · exact congrArg Sum.inr (Subtype.ext (huniq F.val F.property hw)) + +lemma curveIncidenceGraph_degree_left_two (V : Set X) (P : Finset (Set X)) [Fintype V] + (v : V) (h : ∃ E ∈ P, ∃ F ∈ P, E ≠ F ∧ v.val ∈ closure E ∧ v.val ∈ closure F ∧ + ∀ G ∈ P, v.val ∈ closure G → G = E ∨ G = F) : + (curveIncidenceGraph V P).degree (Sum.inl v) = 2 := by + obtain ⟨E,hE,F,hF,hne,hvE,hvF,hall⟩ := h + apply graph_degree_two (curveIncidenceGraph V P) (Sum.inl v) + (Sum.inr ⟨E,hE⟩) (Sum.inr ⟨F,hF⟩) + · intro he + exact hne (congrArg (fun z : P => z.val) (Sum.inr.inj he)) + · exact hvE + · exact hvF + · rintro (w|G) hg + · exact False.elim hg + · rcases hall G.val G.property hg with he | he + · exact Or.inl (congrArg Sum.inr (Subtype.ext he)) + · exact Or.inr (congrArg Sum.inr (Subtype.ext he)) + +variable [T2Space X] +lemma curveIncidenceGraph_degree_right_two (V : Set X) (P : Finset (Set X)) [Fintype V] + (E : P) (hdis : Disjoint E.val V) (w : CurveEdgeWitness V E.val) : + (curveIncidenceGraph V P).degree (Sum.inr E) = 2 := by + let l : V := ⟨w.leftPoint,w.left_mem⟩ + let r : V := ⟨w.rightPoint,w.right_mem⟩ + have hboundary : ∀ x ∈ V, x ∈ closure E.val ↔ x = w.leftPoint ∨ x = w.rightPoint := by + intro x hxV + have hn : x ∉ E.val := fun h => disjoint_left.mp hdis h hxV + have h := w.frontier_eq + constructor + · intro hx + have hb : x ∈ closure E.val \ E.val := ⟨hx,hn⟩ + rw [h] at hb + simpa only [mem_insert_iff,mem_singleton_iff] using hb + · intro hx + have hb : x ∈ closure E.val \ E.val := by + rw [h] + simpa only [mem_insert_iff,mem_singleton_iff] using hx + exact hb.1 + apply graph_degree_two (curveIncidenceGraph V P) (Sum.inr E) (Sum.inl l) (Sum.inl r) + · intro he + exact w.endpoints_ne (congrArg (fun z : V => z.val) (Sum.inl.inj he)) + · exact (hboundary _ w.left_mem).mpr (Or.inl rfl) + · exact (hboundary _ w.right_mem).mpr (Or.inr rfl) + · rintro (v|F) hv + · rcases (hboundary _ v.property).mp hv with he | he + · exact Or.inl (congrArg Sum.inl (Subtype.ext he)) + · exact Or.inr (congrArg Sum.inl (Subtype.ext he)) + · exact False.elim hv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveNormalFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveNormalFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..47044cdf7614f40b030e6ba8d4d61d32d3741cf0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveNormalFrame.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveTransverseVector + +namespace OAI + +/-! An explicit invertible three-dimensional frame along a regular curve. -/ +noncomputable section +open Set Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def curveNormalLinear (v a : Fin 3 → ℝ) : (Base × ℝ) →L[ℝ] (Fin 3 → ℝ) := + (ContinuousLinearMap.snd ℝ Base ℝ).smulRight v + + ((ContinuousLinearMap.proj (0 : Fin 2)).comp (ContinuousLinearMap.fst ℝ Base ℝ)).smulRight a + + ((ContinuousLinearMap.proj (1 : Fin 2)).comp (ContinuousLinearMap.fst ℝ Base ℝ)).smulRight (v ⨯₃ a) + +lemma curveNormalLinear_apply (v a : Fin 3 → ℝ) (z : Base × ℝ) : + curveNormalLinear v a z = z.2 • v+z.1 0 • a+z.1 1 • (v ⨯₃ a) := rfl + +lemma curveNormalLinear_bijective {v a : Fin 3 → ℝ} + (hv : v ≠ 0) (ha : ∀ r : ℝ, r • v ≠ a) : + Function.Bijective (curveNormalLinear v a) := by + have hli := curve_transverse_vector_independent hv ha + have hw := curve_transverse_cross_ne_zero hv ha + have hwv : (v ⨯₃ a) ⬝ᵥ v = 0 := by rw [dotProduct_comm]; exact dot_self_cross v a + have hwa : (v ⨯₃ a) ⬝ᵥ a = 0 := by rw [dotProduct_comm]; exact dot_cross_self v a + have hww : (v ⨯₃ a) ⬝ᵥ (v ⨯₃ a) ≠ 0 := (dotProduct_self_eq_zero).not.mpr hw + have hz : ∀ z : Base × ℝ, curveNormalLinear v a z = 0 → z = 0 := by + intro z h + have hd := congrArg (fun w => (v ⨯₃ a) ⬝ᵥ w) h + rw [curveNormalLinear_apply] at hd + simp only [dotProduct_add,dotProduct_smul,hwv,hwa,smul_eq_mul,mul_zero,zero_add,dotProduct_zero] at hd + have hz1 : z.1 1 = 0 := (mul_eq_zero.mp hd).resolve_right hww + have hsum : z.2 • v+z.1 0 • a = 0 := by + simpa only [curveNormalLinear_apply,hz1,zero_smul,add_zero] using h + obtain ⟨hz2,hz0⟩ := (LinearIndependent.pair_iff.mp hli) z.2 (z.1 0) hsum + apply Prod.ext + · ext i + fin_cases i + · exact hz0 + · exact hz1 + · exact hz2 + have hi : Function.Injective (curveNormalLinear v a) := by + intro z w h + apply sub_eq_zero.mp + apply hz + rw [map_sub,h,sub_self] + refine ⟨hi,?_⟩ + apply (LinearMap.injective_iff_surjective_of_finrank_eq_finrank + (f := (curveNormalLinear v a).toLinearMap) _).mp hi + simp [Base] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondFields.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondFields.lean new file mode 100644 index 0000000000000000000000000000000000000000..87f20f48b1101dbada01e0d2a6fef5dcb0fe8e0d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondFields.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDiskNormalGluing + +namespace OAI + +/-! Smooth global representatives of second-form fields along a compact curve. +A cutoff in its own phase chart extends the field without choosing a normal frame. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame + +lemma realSecondForm_field_smoothAt {F : RField 4} {v w : Base → Base} + (hF : ContDiff ℝ ∞ F) (hv : ContDiff ℝ ∞ v) (hw : ContDiff ℝ ∞ w) + {p : Base} (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + ContDiffAt ℝ ∞ (fun q => realSecondForm F (v q) (w q) q) p := by + have hDF := hF.fderiv_right (m := ∞) (by simp) + have hDDF := hDF.fderiv_right (m := ∞) (by simp) + have heq : (fun q => realSecondForm F (v q) (w q) q) = + fun q => realNormalPart (coordDeriv dx F q) (coordDeriv dy F q) + (fderiv ℝ (fderiv ℝ F) q (v q) (w q)) := by + funext q + unfold realSecondForm + rw [real_second_coordDeriv ((hDF.differentiable (by simp)) q)] + rw [heq] + exact contDiffAt_realNormalPart (contDiff_real_coordDeriv hF dx).contDiffAt + (contDiff_real_coordDeriv hF dy).contDiffAt + ((hDDF.clm_apply hv).clm_apply hw).contDiffAt hD + +end ClosedSurfaceR4.RealModes +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SmallModes NormalFrame SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phase_gram_ne_zero (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : SmallModes.Base} (hp : baseEquiv.symm p ∈ e.target) + (ha : A.chartWeight i (e.symm (baseEquiv.symm p)) ≠ 0) : + gramDet (coordDeriv dx (A.phaseRealChartMap i e.symm F) p) + (coordDeriv dy (A.phaseRealChartMap i e.symm F) p) ≠ 0 := by + rw [A.phaseMetricRead_isometry_det i hi hF ha] + have hh := (A.phaseMetricRead_positive i g e he hi hp ha).2.ne' + simpa only [baseEquiv.apply_symm_apply] using hh + +/-- This cutoff is selected from the curve and phase chart before selecting +any later isometric immersion. -/ +lemma phase_curve_cutoff (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) + {K : Set SmallModes.Base} (hK : IsCompact K) + (hKt : ∀ p ∈ K, baseEquiv.symm p ∈ e.target) + (hKa : ∀ p ∈ K, A.chartWeight i (e.symm (baseEquiv.symm p)) ≠ 0) : + ∃ β : SmallModes.Base → ℝ, ContDiff ℝ ∞ β ∧ HasCompactSupport β ∧ + (∀ p ∈ K, β p = 1) ∧ ∀ p ∈ tsupport β, + baseEquiv.symm p ∈ e.target ∧ A.chartWeight i (e.symm (baseEquiv.symm p)) ≠ 0 := by + let U : Set SmallModes.Base := baseEquiv.symm ⁻¹' e.target ∩ + {p | A.chartWeight i (e.symm (baseEquiv.symm p)) ≠ 0} + have hU : IsOpen U := (e.open_target.preimage baseEquiv.symm.continuous).inter + (isOpen_ne.preimage ((A.chartWeight_smooth i).continuous.comp + (hi.continuous.comp baseEquiv.symm.continuous))) + obtain ⟨β,hβ,hβc,_,hβs,hβone⟩ := CollarVelocity.compact_cutoff hK hU + (fun p hp => ⟨hKt p hp,hKa p hp⟩) + exact ⟨β,hβ,hβc,hβone,fun p hp => hβs hp⟩ + +def phaseCurveSecondField (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (β : SmallModes.Base → ℝ) (F : M → Space) (v w : SmallModes.Base → SmallModes.Base) : M → Space := + restore (i : M) (A.outer i) (fun x => spaceCoordinates.symm + (β (baseEquiv (e x)) • realSecondForm (A.phaseRealChartMap i e.symm F) + (v (baseEquiv (e x))) (w (baseEquiv (e x))) (baseEquiv (e x)))) + +lemma phaseCurveSecondField_smooth (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {β : SmallModes.Base → ℝ} (hβ : ContDiff ℝ ∞ β) + (hs : ∀ p ∈ tsupport β, baseEquiv.symm p ∈ e.target ∧ + A.chartWeight i (e.symm (baseEquiv.symm p)) ≠ 0) + {v w : SmallModes.Base → SmallModes.Base} (hv : ContDiff ℝ ∞ v) (hw : ContDiff ℝ ∞ w) : + ContMDiff planeModel spaceModel ∞ (A.phaseCurveSecondField i e β F v w) := by + have hB : ContDiff ℝ ∞ (fun p => β p • + realSecondForm (A.phaseRealChartMap i e.symm F) (v p) (w p) p) := by + rw [contDiff_iff_contDiffAt] + intro p + by_cases hp : p ∈ tsupport β + · exact hβ.contDiffAt.smul (realSecondForm_field_smoothAt + (A.phaseRealChartMap_smooth i hi hF.1) hv hw (A.phase_gram_ne_zero i e he hi hF + (hs p hp).1 (hs p hp).2)) + · apply (contDiffAt_const (c := (0 : Vec))).congr_of_eventuallyEq + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hp] with q hq + simp only [Pi.zero_apply] at hq + simp only [hq,zero_smul] + exact restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (spaceCoordinates.symm.contDiff.comp (hB.comp (baseEquiv.contDiff.comp he))) + +omit [CompactSpace M] in +lemma phaseCurveSecondField_eq (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (β : SmallModes.Base → ℝ) (F : M → Space) (v w : SmallModes.Base → SmallModes.Base) + {p : M} (hp : p ∈ (chart (i : M)).source) (ho : A.outer i p = 1) + (hβ : β (baseEquiv (e (chart (i : M) p))) = 1) : + spaceCoordinates (A.phaseCurveSecondField i e β F v w p) = + realSecondForm (A.phaseRealChartMap i e.symm F) + (v (baseEquiv (e (chart (i : M) p)))) (w (baseEquiv (e (chart (i : M) p)))) + (baseEquiv (e (chart (i : M) p))) := by + simp only [phaseCurveSecondField,restore,indicator_of_mem hp,ho,hβ,one_smul, + spaceCoordinates.apply_symm_apply] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..13aae92cf591e02e3ea33fa077d37661a28339db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveSecondTransition.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionVectors + +namespace OAI + +/-! A curve's global second-form representative agrees with its transported +second form in the current primitive chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas + +lemma curveSecondField_transition (A B : SmoothingAtlas M) + (i : A.centers) (j : B.centers) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hf : ContDiff ℝ ∞ f) (hfi : ContDiff ℝ ∞ f.symm) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (β : SmallModes.Base → ℝ) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition (j : M) f (i : M) e).source) + (hwB : B.weight j ((surfacePhaseChart (j : M) f).symm x) ≠ 0) + (hwA : A.weight i ((surfacePhaseChart (j : M) f).symm x) ≠ 0) + (hβ : β x = 1) : + let T := surfacePhaseTransition (j : M) f (i : M) e + spaceCoordinates (B.phaseCurveSecondField j f β F (fun _ => dy) (fun _ => dy) + ((surfacePhaseChart (j : M) f).symm x)) = + realSecondForm (A.phaseRealChartMap i e.symm F) + (fderiv ℝ T x dy) (fderiv ℝ T x dy) (T x) := by + have hxj : x ∈ (surfacePhaseChart (j : M) f).target := hx.1 + have hp := (surfacePhaseChart (j : M) f).map_target hxj + have hread := B.phaseCurveSecondField_eq j f β F (fun _ => dy) (fun _ => dy) + hp.1 (B.outer_one j _ (subset_tsupport (B.weight j) hwB)) (by + change β ((surfacePhaseChart (j : M) f) ((surfacePhaseChart (j : M) f).symm x)) = 1 + rwa [(surfacePhaseChart (j : M) f).right_inv hxj]) + have hr : baseEquiv (f (chart (j : M) ((surfacePhaseChart (j : M) f).symm x))) = x := + (surfacePhaseChart (j : M) f).right_inv hxj + simp only [hr] at hread + rw [hread] + exact B.phase_secondForm_transition A j i f e hf hfi he hi hF hx hwB hwA dy dy + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveTransverseVector.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveTransverseVector.lean new file mode 100644 index 0000000000000000000000000000000000000000..798e5da58f2ec56f0490abc28c08a019cd09a7ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CurveTransverseVector.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EuclideanSurfaceImageNull +import Mathlib.LinearAlgebra.CrossProduct + +namespace OAI + +/-! A smooth curve in three-space admits one constant vector transverse +to every nonzero velocity. This uses the proved two-dimensional image estimate. -/ +noncomputable section +open Set Filter MeasureTheory Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem exists_curve_transverse_vector (v : ℝ → (Fin 3 → ℝ)) + (hv : ContDiff ℝ ∞ v) : + ∃ a : Fin 3 → ℝ, ∀ t r : ℝ, r • v t ≠ a := by + let E := EuclideanSpace.equiv (Fin 3) ℝ + let f : Base → ProjectionTarget 3 := fun x => E.symm (x 0 • v (x 1)) + have hf : ContDiff ℝ ∞ f := + E.symm.contDiff.comp ((contDiff_apply ℝ ℝ 0).smul (hv.comp (contDiff_apply ℝ ℝ 1))) + have hn : volume (range f) = 0 := euclidean_surface_image_null f hf + have hae : ∀ᵐ x ∂volume, x ∉ range f := by + simp only [ae_iff,not_not] + exact hn + obtain ⟨a,_,ha⟩ := (Measure.dense_of_ae hae).inter_open_nonempty + univ isOpen_univ Set.univ_nonempty + refine ⟨E a,?_⟩ + intro t r heq + apply ha + refine ⟨![r,t],?_⟩ + change E.symm (r • v t) = a + rw [heq,E.symm_apply_apply] + +lemma curve_transverse_vector_independent {v a : Fin 3 → ℝ} + (hv : v ≠ 0) (ha : ∀ r : ℝ, r • v ≠ a) : LinearIndependent ℝ ![v,a] := + (LinearIndependent.pair_iff' hv).mpr ha + +lemma curve_transverse_cross_ne_zero {v a : Fin 3 → ℝ} + (hv : v ≠ 0) (ha : ∀ r : ℝ, r • v ≠ a) : v ⨯₃ a ≠ 0 := + crossProduct_ne_zero_iff_linearIndependent.mpr (curve_transverse_vector_independent hv ha) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CycleCorrectedGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CycleCorrectedGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..a66c6ef1710006037cc242576a12b40236401a3c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CycleCorrectedGeometry.lean @@ -0,0 +1,341 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceCorrectedFamily +import OAI.Geometry.SurfaceImmersion.Primitive.CircularCycleMetrics +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentRadiusBox +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularFamilyGeometry + +namespace OAI + +/-! Reference charts give the generic finite geometry for any number of +cycles without shrinking the admissible chart radii after that number is +chosen. The actual corrected families are then attached to those circles. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseGeometry SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance cycleGeometryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance cycleGeometryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance cycleGeometryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance cycleGeometryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance cycleGeometrySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance cycleGeometrySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +/-- Use the already selected full-disk reference charts, for arbitrarily many +copies, rather than choosing a new admissible radius after the copy count. -/ +theorem finite_copy_geometry {ι : Type*} [Fintype ι] [DecidableEq ι] + (index : ι → d.B.centers) (component : ι → Fin 3) + (lo hi : ι → ℝ) (hlo : ∀ a, 0 < lo a) (hlohi : ∀ a, lo a < hi a) + (hhi : ∀ a, hi a < d.radius (index a)) + {eta : ℝ} (heta : 0 < eta) : + ∃ q : CircularFamilyGeometry d.B ι, + (∀ a, lo a < q.radius a ∧ q.radius a < hi a) ∧ + (∀ a, (q.curves a).index = index a) ∧ + (∀ a, q.outerRadius a = d.radius (index a)) ∧ + (∀ a, q.chartRadius a = d.radius (index a)) ∧ + (∀ a, q.convexPart a = d.L (index a)) ∧ + (∀ a, ‖q.linearPart a-(d.P (index a)).ξ (component a)‖ < eta) ∧ + ∀ a, q.linearPart a ∈ Metric.closedBall ((d.P (index a)).ξ (component a)) + (d.epsilon (index a)) := by + classical + let eps : ι → ℝ := fun a => min eta (d.epsilon (index a)) + let U : Set (ι → Base) := {ell | ∀ a, ‖ell a-(d.P (index a)).ξ (component a)‖ < eps a} + have hU : IsOpen U := by + simp only [U,ofPred_forall] + apply isOpen_iInter_of_finite + intro a + exact isOpen_lt (((continuous_apply a).sub continuous_const).norm) continuous_const + have hne : U.Nonempty := by + refine ⟨fun a => (d.P (index a)).ξ (component a),?_⟩ + intro a + simpa only [sub_self,norm_zero] using lt_min heta (d.epsilon_pos (index a)) + obtain ⟨r,ell,hell,hr,hcross,htriple,htrans,htangent,hind⟩ := + d.B.finite_circular_preparation index (fun a => d.radius (index a)) lo hi + (fun a => d.L (index a)) hlo hlohi hhi + (fun a => d.weight_positive (index a)) (fun a => d.region (index a)) U hU hne + have hball (a : ι) : ell a ∈ Metric.closedBall ((d.P (index a)).ξ (component a)) + (d.epsilon (index a)) := by + rw [Metric.mem_closedBall,dist_eq_norm] + exact ((hell a).trans_le (min_le_right _ _)).le + choose e he hei hephase hecover using fun a => d.charts (index a) (component a) (ell a) (hball a) + have hrpos (a : ι) : 0 < r a := (hlo a).trans (hr a).1 + have hrr (a : ι) : r a < d.radius (index a) := (hr a).2.trans (hhi a) + have hrreg (a : ι) : circularCoordinateRegion (index a : M) (r a) ⊆ + (coordinateChart (index a : M)).target := by + intro x hx + change circularRadiusSquared (coordinateChart (index a : M) (index a)) x ≤ (r a)^2 at hx + exact d.region (index a) (hx.trans (by nlinarith [hrpos a,hrr a])) + have hcover (a : ι) : ∀ x ∈ circularCoordinateRegion (index a : M) (r a), + baseEquiv.symm x ∈ (e a).source := by + intro x hx + apply hecover a x + change circularRadiusSquared (coordinateChart (index a : M) (index a)) x ≤ (r a)^2 at hx + change circularRadiusSquared (coordinateChart (index a : M) (index a)) x ≤ (d.radius (index a))^2 + exact hx.trans (by nlinarith [hrpos a,hrr a]) + let curves : ι → PhaseBoundaryCurve d.B := fun a => + d.B.circularPhaseBoundaryCurve (index a) (hrpos a) (by nlinarith [hrpos a,hrr a]) + (d.weight_positive (index a)) (hrreg a) (e a) (he a) (hei a) (hcover a) + have hcarrier (a : ι) : (curves a).carrier = circularBoundary (index a : M) (r a) := rfl + have hsub : boundaryCrossingSet curves univ ⊆ circularCrossingSet (fun a => (index a : M)) r := by + rintro p ⟨a,_,b,_,hab,hpa,hpb⟩ + exact mem_iUnion.mpr ⟨⟨(a,b),hab⟩,⟨hpa,hpb⟩⟩ + let q : CircularFamilyGeometry d.B ι := { + curves := curves, radius := r, outerRadius := fun a => d.radius (index a), + chartRadius := fun a => d.radius (index a), linearPart := ell, convexPart := fun a => d.L (index a), + radius_pos := hrpos, radius_outer := fun a => by nlinarith [hrpos a,hrr a], + radius_chart := hrr, weight_positive := fun a => d.weight_positive (index a), + region := hrreg, carrier := hcarrier, cover := hcover, first_coordinate := hephase, + pair_finite := fun a b hab => hcross.subset (fun _ hp => hsub + (boundaryCrossingSet_pair curves (mem_univ a) (mem_univ b) hab hp.1 hp.2)), + triple_empty := htriple, tangencies_finite := htangent, + independent := fun a b hab p hp hpa hpb => hind a b hab p (hsub hp) hpa hpb } + exact ⟨q,hr,(fun _ => rfl),(fun _ => rfl),(fun _ => rfl),(fun _ => rfl), + (fun a => (hell a).trans_le (min_le_left _ _)),hball⟩ + +end ReferenceCircularAtlas + +namespace SmoothPrimitiveFamily +variable {u : ∀ p : M, CovariantTwoTensor p} {ι κ : Type*} [Fintype ι] [Fintype κ] + +/-- Reindex only the genuine finite family, preserving its exact sum. -/ +def reindex (f : SmoothPrimitiveFamily ι u) (e : κ ≃ ι) : SmoothPrimitiveFamily κ u where + amplitude := f.amplitude ∘ e + phase := f.phase ∘ e + smoothAmplitude a := f.smoothAmplitude (e a) + smoothPhase a := f.smoothPhase (e a) + sum_eq p := by + simpa only [Function.comp_apply] using + (e.sum_comp (fun a => (f.amplitude a p)^2 • + SmoothingAtlas.phaseDifferentialSquare (f.phase a) p)).trans (f.sum_eq p) + +end SmoothPrimitiveFamily + +namespace CircularFamilyGeometry +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + +/-- The actual restored phase, allowing repeated copies of a chart. -/ +def copiedPhases (q : CircularFamilyGeometry B ι) (a : ι) : M → ℝ := + B.circularPhase (q.curves a).index (q.linearPart a) (q.convexPart a) + +omit [CompactSpace M] [T2Space M] in +lemma copiedPhases_germ (q : CircularFamilyGeometry B ι) + (houter : ∀ i p, p ∈ tsupport (B.weight i) → B.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (a : ι) {p : M} + (hp : p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a)) : + q.copiedPhases a =ᶠ[𝓝 p] + (fun x => ((q.curves a).phase (chart ((q.curves a).index : M) x)) 0) := by + have hw : B.weight (q.curves a).index p ≠ 0 := by + apply ne_of_gt ((q.weight_positive a p).mpr ?_) + exact ⟨hp.1,hp.2.trans (q.radius_outer a)⟩ + let loc : B.centers → Fin 3 → Base → ℝ := fun i _ => + centeredConvexPhase (q.linearPart a) (q.convexPart a) (coordinateChart (i : M) i) + have hg := B.curvedAtlasPhase_eventually loc ((q.curves a).index,0) + (houter (q.curves a).index) (subset_tsupport _ hw) + change q.copiedPhases a =ᶠ[𝓝 p] + (centeredConvexPhase (q.linearPart a) (q.convexPart a) + (coordinateChart ((q.curves a).index : M) (q.curves a).index) ∘ + coordinateChart ((q.curves a).index : M)) at hg + apply hg.trans + apply Filter.Eventually.of_forall + intro x + have hh := q.first_coordinate a (chart ((q.curves a).index : M) x) + change ((q.curves a).phase (chart ((q.curves a).index : M) x)) 0 = _ at hh + exact hh.symm + +omit [CompactSpace M] [T2Space M] in +/-- Attach cycle amplitudes without changing any selected generic geometry. -/ +theorem with_cycle_families {N m : ℕ} (q : CircularFamilyGeometry B (Fin (N*m))) + {u : ∀ p : M, CovariantTwoTensor p} + (f : Fin N → SmoothPrimitiveFamily (Fin m) u) (hN : 0 < N) + (hamp : ∀ k a p, 0 ≤ (f k).amplitude a p) + (hpos : ∀ a p, 0 < (f a.divNat).amplitude a.modNat p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a)) + (hphase : ∀ a, (f a.divNat).phase a.modNat = q.copiedPhases a) + (houter : ∀ i p, p ∈ tsupport (B.weight i) → B.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ D : CircularPrimitiveFamily B (Fin (N*m)), + D.curves = q.curves ∧ D.radius = q.radius ∧ D.outerRadius = q.outerRadius ∧ + D.chartRadius = q.chartRadius ∧ D.linearPart = q.linearPart ∧ D.convexPart = q.convexPart ∧ + (∀ a p, D.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) ∧ + (∀ a, D.phase a = (f a.divNat).phase a.modNat) ∧ D.totalTensor = u := by + let amp := fun a : Fin (N*m) => (f a.divNat).cycleAmplitude N a.modNat + let phi := fun a : Fin (N*m) => (f a.divNat).phase a.modNat + have ha : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (amp a) := + fun a => (f a.divNat).cycleAmplitude_smooth N a.modNat + have hp : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a) := + fun a => (f a.divNat).smoothPhase a.modNat + have hn : ∀ a p, 0 ≤ amp a p := fun a p => + div_nonneg (hamp _ _ _) (Real.sqrt_nonneg _) + have hpos' : ∀ a p, 0 < amp a p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a) := by + intro a p + exact ((f a.divNat).cycleAmplitude_pos_iff hN a.modNat p).trans (hpos a p) + have hg : ∀ a p, p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a) → + phi a =ᶠ[𝓝 p] (fun x => ((q.curves a).phase (chart ((q.curves a).index : M) x)) 0) := by + intro a p hpa + change (f a.divNat).phase a.modNat =ᶠ[𝓝 p] _ + rw [hphase a] + exact q.copiedPhases_germ houter a hpa + let D := q.withAmplitudes amp phi ha hp hn hpos' hg + refine ⟨D,rfl,rfl,rfl,rfl,rfl,rfl,(fun _ _ => rfl),(fun _ => rfl),?_⟩ + exact D.totalTensor_cycle f (fun _ _ => rfl) (fun _ => rfl) hN + +end CircularFamilyGeometry + +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +def cycleLinearParts {N m : ℕ} (e : Fin m ≃ (d.B.centers × Fin 3)) + (q : CircularFamilyGeometry d.B (Fin (N*m))) (k : Fin N) (i : d.B.centers) (j : Fin 3) : Base := + q.linearPart (finProdFinEquiv (k,e.symm (i,j))) + +def cycleWeights {N m : ℕ} (e : Fin m ≃ (d.B.centers × Fin 3)) + (q : CircularFamilyGeometry d.B (Fin (N*m))) (k : Fin N) (b : d.B.centers × Fin 3) : M → ℝ := + shrinkingCircularWeight (b.1 : M) (d.B.weight b.1) (d.radius b.1) + (q.radius (finProdFinEquiv (k,e.symm b))) + +/-- One radius box and map neighborhood precede every cycle count. The +output retains the actual amplitude formula and fixed cutoff bounds, so +the uniform C1 estimate can be applied without choosing further constants. -/ +theorem corrected_cycles {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) + {phaseBound weightBound mapBound : ℝ} + (hphaseBound : 0 < phaseBound) (hweightBound : 0 < weightBound) + (hmapBound : 0 < mapBound) + {m : ℕ} (e : Fin m ≃ (d.B.centers × Fin 3)) : + ∃ (mapTol delta : ℝ) (W : ℕ → ℝ), + 0 < mapTol ∧ mapTol ≤ mapBound ∧ 0 < delta ∧ + (∀ i, delta ≤ d.radius i/2) ∧ (∀ j, 0 ≤ W j) ∧ + ∀ N : ℕ, 0 < N → + ∃ q : CircularFamilyGeometry d.B (Fin (N*m)), + (∀ a, (q.curves a).index = (e a.modNat).1) ∧ + (∀ a, q.outerRadius a = d.radius (e a.modNat).1) ∧ + (∀ a, q.chartRadius a = d.radius (e a.modNat).1) ∧ + (∀ a, q.convexPart a = d.L (e a.modNat).1) ∧ + (∀ a, ‖q.linearPart a‖ ≤ ‖(d.P (e a.modNat).1).ξ‖+1) ∧ + (∀ a, ‖q.linearPart a-(d.P (e a.modNat).1).ξ (e a.modNat).2‖ < phaseBound) ∧ + (∀ k b j, d.B.WeightedBound 1 j (W j) (d.cycleWeights e q k b)) ∧ + (∀ k b p, |d.cycleWeights e q k b p-d.B.weight b.1 p| < weightBound) ∧ + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mapTol (G-F) → + ∃ (f : Fin N → SmoothPrimitiveFamily (Fin m) (g.inner-inducedTensor (r • G))) + (D : CircularPrimitiveFamily d.B (Fin (N*m))), + (∀ k a, (f k).amplitude a = d.B.correctedPrimitiveAmplitude d.basis + (d.cycleWeights e q k) (d.perturbedPhases (d.cycleLinearParts e q k)) + (g.inner-inducedTensor (r • G)) (e a)) ∧ + (∀ k a, (f k).phase a = d.perturbedPhases (d.cycleLinearParts e q k) (e a)) ∧ + D.curves = q.curves ∧ D.radius = q.radius ∧ D.outerRadius = q.outerRadius ∧ + D.chartRadius = q.chartRadius ∧ D.linearPart = q.linearPart ∧ D.convexPart = q.convexPart ∧ + (∀ a p, D.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) ∧ + (∀ a, D.phase a = (f a.divNat).phase a.modNat) ∧ + D.totalTensor = g.inner-inducedTensor (r • G) := by + classical + obtain ⟨pt,wt,mt,hpt,hwt,hmt,hcorrect⟩ := d.corrected_smooth_family hF r href + obtain ⟨delta,W,hdelta,hdeltaR,hW,hweights⟩ := d.B.independent_radius_box + (fun b : d.B.centers × Fin 3 => b.1) (fun b => d.radius b.1) + (fun b => d.weight_nonneg b.1) (fun b => d.radius_pos b.1) (fun b => d.region b.1) + (fun b => d.weight_positive b.1) (lt_min hwt hweightBound) + refine ⟨min mt mapBound,delta,W,lt_min hmt hmapBound,min_le_right _ _,hdelta, + (fun i => hdeltaR (i,0)),hW,?_⟩ + intro N hN + let ind := fun a : Fin (N*m) => (e a.modNat).1 + let cmp := fun a : Fin (N*m) => (e a.modNat).2 + let lo := fun a : Fin (N*m) => d.radius (ind a)-delta + let hi := fun a : Fin (N*m) => d.radius (ind a)-delta/2 + have hlo (a : Fin (N*m)) : 0 < lo a := by + have hh := hdeltaR (ind a,cmp a) + have hp := d.radius_pos (ind a) + dsimp only [lo] + linarith + have hmid (a : Fin (N*m)) : lo a < hi a := by dsimp only [lo,hi]; linarith + have hhi (a : Fin (N*m)) : hi a < d.radius (ind a) := by dsimp only [hi]; linarith + obtain ⟨q,hr,hindex,houter,hchart,hL,hell,hball⟩ := + d.finite_copy_geometry ind cmp lo hi hlo hmid hhi (lt_min hpt hphaseBound) + let copy := fun (k : Fin N) (b : d.B.centers × Fin 3) => finProdFinEquiv (k,e.symm b) + have hcopy (k : Fin N) (b : d.B.centers × Fin 3) : + (copy k b).divNat = k ∧ e (copy k b).modNat = b := by + have hh := Prod.mk.inj (finProdFinEquiv.symm_apply_apply (k,e.symm b)) + exact ⟨hh.1,by rw [hh.2,e.apply_symm_apply]⟩ + have hcopy' (a : Fin (N*m)) : copy a.divNat (e a.modNat) = a := by + simp only [copy,e.symm_apply_apply] + exact finProdFinEquiv.apply_symm_apply a + let rr := fun (k : Fin N) (b : d.B.centers × Fin 3) => q.radius (copy k b) + let ell := d.cycleLinearParts e q + let psi := d.cycleWeights e q + have hrr (k : Fin N) (b : d.B.centers × Fin 3) : + d.radius b.1-delta < rr k b ∧ rr k b < d.radius b.1-delta/2 := by + have hh := hr (copy k b) + simpa only [lo,hi,ind,(hcopy k b).2,rr] using hh + have hpsi (k : Fin N) := hweights (rr k) (hrr k) + have hrsmall (k : Fin N) (b : d.B.centers × Fin 3) : (rr k b)^2 < (d.radius b.1)^2 := by + have hh := hrr k b + have hp := (hpsi k).1 b + have hR := d.radius_pos b.1 + nlinarith + have hnorm (a : Fin (N*m)) : ‖q.linearPart a‖ ≤ ‖(d.P (ind a)).ξ‖+1 := + (d.parameters (ind a) (cmp a) (q.linearPart a) (hball a)).2 + refine ⟨q,hindex,houter,hchart,hL,hnorm, + (fun a => (hell a).trans_le (min_le_right _ _)), + (fun k => (hpsi k).2.2.2.2.2), + (fun k b p => ((hpsi k).2.2.2.2.1 b p).trans_le (min_le_right _ _)),?_⟩ + intro G hG hGF + have hnon (k : Fin N) (b : d.B.centers × Fin 3) (p : M) : 0 ≤ psi k b p := + (shrinkingCircularWeight_nonneg_le (b.1 : M) (d.B.weight b.1) + (d.weight_nonneg b.1) (hrsmall k b).le p).1 + have hsupp (k : Fin N) (b : d.B.centers × Fin 3) : + tsupport (psi k b) ⊆ tsupport (d.B.weight b.1) := by + apply closure_mono + intro p hp + change psi k b p ≠ 0 at hp + change d.B.weight b.1 p ≠ 0 + intro hz + exact hp (by simp only [psi,cycleWeights,shrinkingCircularWeight,hz,zero_mul]) + have hell' (k : Fin N) (i : d.B.centers) (j : Fin 3) : + ‖ell k i j-(d.P i).ξ j‖ < pt := by + have hh := (hell (copy k (i,j))).trans_le (min_le_left _ _) + simpa only [ind,cmp,(hcopy k (i,j)).2,ell,cycleLinearParts] using hh + choose fc hphase hamp hnonamp hposamp hsamp using fun k : Fin N => + hcorrect (ell k) (psi k) (hell' k) (hpsi k).2.1 (hnon k) (hsupp k) + (fun b p => ((hpsi k).2.2.2.2.1 b p).trans_le (min_le_left _ _)) G hG + (fun i => (hGF i).mono_const (min_le_left _ _)) + let f := fun k => (fc k).reindex e + have hphase' (a : Fin (N*m)) : (f a.divNat).phase a.modNat = q.copiedPhases a := by + change (fc a.divNat).phase (e a.modNat) = _ + rw [hphase a.divNat] + change d.B.circularPhase (e a.modNat).1 + (ell a.divNat (e a.modNat).1 (e a.modNat).2) (d.L (e a.modNat).1) = _ + rw [show ell a.divNat (e a.modNat).1 (e a.modNat).2 = q.linearPart a from by + change q.linearPart (copy a.divNat (e a.modNat)) = q.linearPart a + rw [hcopy' a]] + simp only [CircularFamilyGeometry.copiedPhases,hindex a,hL a,ind] + have hpositive (a : Fin (N*m)) (p : M) : + 0 < (f a.divNat).amplitude a.modNat p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a) := by + change 0 < (fc a.divNat).amplitude (e a.modNat) p ↔ _ + rw [hposamp a.divNat (e a.modNat) p] + have hh := (hpsi a.divNat).2.2.1 (e a.modNat) p + change 0 < psi a.divNat (e a.modNat) p ↔ _ at hh + simpa only [rr,hcopy' a,hindex a,ind] using hh + obtain ⟨D,hD⟩ := q.with_cycle_families f hN + (fun k a p => hnonamp k (e a) p) hpositive hphase' d.outer + refine ⟨f,D,?_,?_,hD⟩ + · intro k a + change (fc k).amplitude (e a) = _ + exact congrFun (hamp k) (e a) + · intro k a + change (fc k).phase (e a) = _ + exact congrFun (hphase k) (e a) + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/DegreeOneReachability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DegreeOneReachability.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebea7425fb9473eb32f28360fc37dae6221808c6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DegreeOneReachability.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveIncidenceGraph + +namespace OAI + +/-! A finite graph of degrees one and two joins each degree-one vertex +to a distinct degree-one vertex by a simple path. -/ +noncomputable section +open Set +attribute [local instance] Classical.propDecidable +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem degree_one_reaches_degree_one {A : Type*} [Fintype A] + (G : SimpleGraph A) (hdegrees : ∀ x, G.degree x = 1 ∨ G.degree x = 2) + (p : A) (hp : G.degree p = 1) : + ∃ q : A, q ≠ p ∧ G.degree q = 1 ∧ Nonempty (G.Path p q) := by + classical + let C : Set A := {x | G.Reachable p x} + let H := G.induce C + let p' : C := ⟨p,SimpleGraph.Reachable.rfl⟩ + have hdegree (x : C) : H.degree x = G.degree x.val := + G.degree_induce_of_neighborSet_subset (fun _ hy => x.property.trans hy.reachable) + have hodd : Odd (H.degree p') := by rw [hdegree,hp]; decide + obtain ⟨q,hne,hq⟩ := H.exists_ne_odd_degree_of_exists_odd_degree p' hodd + have hqp : q.val ≠ p := by + intro he + exact hne (Subtype.ext he) + have hq1 : G.degree q.val = 1 := by + rw [hdegree] at hq + rcases hdegrees q.val with h | h + · exact h + · rw [h] at hq + norm_num at hq + obtain ⟨w,hw⟩ := q.property.exists_isPath + exact ⟨q.val,hqp,hq1,⟨⟨w,hw⟩⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/DensityNormalizedPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DensityNormalizedPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e596b315b5c78dd7e8d2cabe0df55693ae0f51a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DensityNormalizedPath.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityMoments +import OAI.Geometry.SurfaceImmersion.Primitive.PositiveDensityTurns + +namespace OAI + +/-! Actual smooth unit-circle loops with the prescribed uniform mean. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +def normalizedPath (ρ : B × ℝ → ℝ) (p : B → ℝ → Plane) : B × ℝ → Plane := + PositiveDensity.reparametrize ρ (fun z => p z.1 z.2) + +theorem normalizedPath_properties {ρ : B × ℝ → ℝ} {p : B → ℝ → Plane} + {c : B → Plane} {U : Set B} (hU : IsOpen U) + (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hp : ContDiffOn ℝ ∞ (fun z : B × ℝ => p z.1 z.2) (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hpper : ∀ b ∈ U, Function.Periodic (p b) 1) + (hmom : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • augment (p b t)) = augment (c b)) + (hunit : ∀ b ∈ U, ∀ t, p b t 0 ^ 2 + p b t 1 ^ 2 = 1) : + ContDiffOn ℝ ∞ (normalizedPath ρ p) (U ×ˢ univ) ∧ + (∀ b ∈ U, Function.Periodic (fun t => normalizedPath ρ p (b, t)) 1) ∧ + (∀ b ∈ U, (∫ t in 0..1, normalizedPath ρ p (b, t)) = c b) ∧ + ∀ b ∈ U, ∀ t, normalizedPath ρ p (b, t) 0 ^ 2 + normalizedPath ρ p (b, t) 1 ^ 2 = 1 := by + have hmm (b : B) (hb : b ∈ U) := mass_and_mean + (LocalPeriodicCalculus.smooth_slice hU hρ hb).continuous + (LocalPeriodicCalculus.smooth_slice hU hp hb).continuous (hmom b hb) + have hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1 := fun b hb => (hmm b hb).1 + refine ⟨PositiveDensity.reparametrize_smoothOn hU hρ hpos hper hmass hp, ?_, ?_, ?_⟩ + · intro b hb + exact PositiveDensity.reparametrize_periodic hU hρ hpos hper hmass hpper hb + · intro b hb + exact (PositiveDensity.reparametrize_mean hU hρ hpos hper hmass hp hb).trans (hmm b hb).2 + · intro b hb t + exact hunit b hb (PositiveDensity.inverseClock ρ b t) + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/DirectionalJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DirectionalJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f623c2807ca6bbf938534efbc97e05f098ab5471 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DirectionalJetBounds.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds + +namespace OAI + +/-! Higher directional jets of a controlled second jet lose one scale per +additional derivative. These are the factors in the finite jet polynomials. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.WeightedEstimates + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +def iteratedDirectional : List A → (A → E) → A → E + | [], f => f + | v :: vs, f => fun x => fderiv ℝ (iteratedDirectional vs f) x v + +lemma contDiffOn_iteratedDirectional {U : Set A} (hU : IsOpen U) {f : A → E} + (hf : ContDiffOn ℝ ∞ f U) (vs : List A) : + ContDiffOn ℝ ∞ (iteratedDirectional vs f) U := by + induction vs with + | nil => exact hf + | cons v vs ih => + exact (ih.fderiv_of_isOpen hU (by simp)).clm_apply contDiffOn_const + +lemma WeightedBound.iteratedDirectional {U : Set A} (hU : IsOpen U) {f : A → E} + {s C : ℝ} (hs : 0 < s) (hC : 0 ≤ C) (hf : ContDiffOn ℝ ∞ f U) + (vs : List A) (hv : ∀ v ∈ vs, ‖v‖ ≤ 1) (m : ℕ) + (hb : WeightedBound U s (m + vs.length) C f) : + WeightedBound U s m (C / s ^ vs.length) (iteratedDirectional vs f) := by + induction vs generalizing m with + | nil => simpa [ClosedSurfaceR4.WeightedEstimates.iteratedDirectional] using hb + | cons v vs ih => + have he : m + (v :: vs).length = (m + 1) + vs.length := by simp; omega + have ht := ih (fun w hw => hv w (List.mem_cons_of_mem v hw)) (m + 1) (he ▸ hb) + have hd := ht.directional hU hs (contDiffOn_iteratedDirectional hU hf vs) v + apply hd.mono_const + have hn : ‖v‖ ≤ 1 := hv v (List.mem_cons_self ..) + have hc : 0 ≤ C / s ^ vs.length / s := by positivity + calc + ‖v‖ * (C / s ^ vs.length / s) ≤ C / s ^ vs.length / s := mul_le_of_le_one_left hc hn + _ = C / s ^ (v :: vs).length := by simp [pow_succ, div_div] + +/-- Products of higher-jet factors have a loss equal to the sum of their +additional derivative orders. The sum is independent of the output order. -/ +lemma weighted_higher_jet_monomial {ι : Type*} {U : Set A} (hU : IsOpen U) + {s : ℝ} (hs : 0 < s) (a : Finset ι) (C : ι → ℝ) (vs : ι → List A) + (f : ι → A → ℝ) (m : ℕ) (hC : ∀ i ∈ a, 0 ≤ C i) + (hv : ∀ i ∈ a, ∀ v ∈ vs i, ‖v‖ ≤ 1) + (hf : ∀ i ∈ a, ContDiffOn ℝ ∞ (f i) U) + (hb : ∀ i ∈ a, WeightedBound U s (m + (vs i).length) (C i) (f i)) : + WeightedBound U s m + (((2 ^ m) ^ a.card * ∏ i ∈ a, C i) / s ^ (∑ i ∈ a, (vs i).length)) + (fun x => ∏ i ∈ a, iteratedDirectional (vs i) (f i) x) := by + apply WeightedBound.finset_prod_losses hU.uniqueDiffOn hs a C (fun i => (vs i).length) + (fun i => iteratedDirectional (vs i) (f i)) hC + · intro i hi + exact contDiffOn_iteratedDirectional hU (hf i hi) (vs i) + · intro i hi + exact (hb i hi).iteratedDirectional hU hs (hC i hi) (hf i hi) (vs i) (hv i hi) m + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisjointJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisjointJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4f4843d6ffedb77c61e368145b693bd94e13838 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisjointJetBounds.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.QuadraticCutoffBounds +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Disjoint supports prevent a factor counting the prescribed points in +the finite-point preparation estimates. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.SphericalJets +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem disjoint_sum_jet_bound {ι : Type*} [DecidableEq ι] (s : Finset ι) + (q : ι → E → V) (hq : ∀ i ∈ s, ContDiff ℝ ∞ (q i)) + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (tsupport (q i)) (tsupport (q j))) + {C : ℝ} (hC : 0 ≤ C) (j : ℕ) + (hb : ∀ i ∈ s, ∀ x, ‖iteratedFDeriv ℝ j (q i) x‖ ≤ C) (x : E) : + ‖iteratedFDeriv ℝ j (fun x => ∑ i ∈ s, q i x) x‖ ≤ C := by + rw [iteratedFDeriv_fun_sum_apply (fun i hi => ((hq i hi).of_le (by simp)).contDiffAt)] + have hz (i : ι) (hx : x ∉ tsupport (q i)) : iteratedFDeriv ℝ j (q i) x = 0 := by + by_contra hn + exact hx (tsupport_iteratedFDeriv_subset j (subset_closure hn)) + by_cases hex : ∃ i ∈ s, x ∈ tsupport (q i) + · obtain ⟨i,hi,hxi⟩ := hex + have hzero : ∀ k ∈ s, k ≠ i → iteratedFDeriv ℝ j (q k) x = 0 := by + intro k hk hki + apply hz k + exact fun hxk => Set.disjoint_left.mp (hdisj hk hi hki) hxk hxi + rw [Finset.sum_eq_single i hzero (by simp [hi])] + exact hb i hi x + · have hzero : ∀ i ∈ s, iteratedFDeriv ℝ j (q i) x = 0 := by + intro i hi + exact hz i (fun hxi => hex ⟨i,hi,hxi⟩) + rw [Finset.sum_eq_zero hzero,norm_zero] + exact hC + +theorem disjoint_sum_weighted_bound {ι : Type*} [DecidableEq ι] (s : Finset ι) + (q : ι → E → V) (hq : ∀ i ∈ s, ContDiff ℝ ∞ (q i)) + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (tsupport (q i)) (tsupport (q j))) + {C : ℝ} (hC : 0 ≤ C) {m : ℕ} + (hb : ∀ i ∈ s, WeightedEstimates.WeightedBound univ 1 m C (q i)) : + WeightedEstimates.WeightedBound univ 1 m C (fun x => ∑ i ∈ s, q i x) := by + intro j hj x hx + simp only [one_pow,one_mul,iteratedFDerivWithin_univ] + apply disjoint_sum_jet_bound s q hq hdisj hC j + intro i hi y + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hb i hi j hj y (mem_univ y) + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisplacementSum.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisplacementSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..89c78d986871e8d1dbd08769d64fa6d6c6ff0d00 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/DisplacementSum.lean @@ -0,0 +1,25 @@ +import OAI.Geometry.Immersion.ClosedSurface.QuadraticMean + +namespace OAI + +/-! Exact recombination of phase targets split by a finite partition. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.QuadraticMean + +lemma realMode_sum {n : ℕ} {ι : Type*} [Fintype ι] (θ : ℝ) (A : ι → CVec n) : + realMode θ (∑ i, A i) = ∑ i, realMode θ (A i) := by + funext k + simp [realMode,realPart,Finset.mul_sum] + +lemma displacement_sum {n : ℕ} {ι : Type*} [Fintype ι] + (τ : ℝ) (φ : Base → ℝ) (A : ι → Base → CVec n) : + displacement τ φ (fun x => ∑ i, A i x) = fun x => ∑ i, displacement τ φ (A i) x := by + funext x + exact realMode_sum (φ x / τ) (fun i => A i x) + +end ClosedSurfaceR4.QuadraticMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedCurveGraphPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedCurveGraphPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd45c119e8dedc324a8f547d0724824fb1af3bfc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedCurveGraphPath.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeLocalization +import OAI.Geometry.SurfaceImmersion.Geometry.InjectivePathConcatenation + +namespace OAI + +/-! A simple path in the interval incidence graph has an actual +embedded realization in the compact curve. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +structure RealizedCurveWalk {V : Set X} {P : Finset (Set X)} {a b : V} + (p : (curveIncidenceGraph V P).Walk (Sum.inl a) (Sum.inl b)) where + path : Path a.val b.val + injective : a ≠ b → Function.Injective path + vertex : ∀ v : V, v.val ∈ range path → Sum.inl v ∈ p.support + edge : ∀ E : P, (range path ∩ E.val).Nonempty → Sum.inr E ∈ p.support + +theorem realize_simple_curve_walk {V : Set X} {P : Finset (Set X)} + (hP : ∀ E ∈ P, Disjoint E V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (w : ∀ E : P, CurveEdgeWitness V E.val) + {a b : V} (p : (curveIncidenceGraph V P).Walk (Sum.inl a) (Sum.inl b)) + (hp : p.IsPath) : Nonempty (RealizedCurveWalk p) := by + classical + suffices ∀ n (a b : V) (p : (curveIncidenceGraph V P).Walk (Sum.inl a) (Sum.inl b)), + p.length = n → p.IsPath → Nonempty (RealizedCurveWalk p) by + exact this p.length a b p rfl hp + intro n + induction n using Nat.strong_induction_on with + | h n ih => + intro a b p hn hp + cases p with + | nil => + refine ⟨⟨Path.refl a.val,?_,?_,?_⟩⟩ + · intro h + exact False.elim (h rfl) + · rintro v ⟨t,ht⟩ + have hv : v = a := Subtype.ext ht.symm + simp [hv] + · rintro E ⟨x,⟨t,ht⟩,hxE⟩ + have hx : x = a.val := ht.symm + exact False.elim (disjoint_left.mp (hP E.val E.property) hxE (hx ▸ a.property)) + | cons h p => + rename_i c + cases c with + | inl c => exact False.elim h + | inr E => + cases p with + | cons h' q => + rename_i c + cases c with + | inr F => exact False.elim h' + | inl c => + obtain ⟨hp',haNot⟩ := (SimpleGraph.Walk.cons_isPath_iff _ _).mp hp + obtain ⟨hq,hENot⟩ := (SimpleGraph.Walk.cons_isPath_iff _ _).mp hp' + have hac : a ≠ c := by + intro he + apply haNot + simp [he] + obtain ⟨σ,hσ,hσrange⟩ := (w E).oriented_path (hP E.val E.property) + a.property c.property (fun he => hac (Subtype.ext he)) h h' + obtain ⟨hσV,hσE⟩ := curve_edge_path_localization hP hdis E (w E) a c hac h h' σ hσrange + by_cases hcb : c = b + · subst b + refine ⟨⟨σ,fun _ => hσ,?_,?_⟩⟩ + · intro v hv + rcases hσV v hv with he | he <;> simp [he] + · intro F hF + have he := hσE F hF + simp [he] + · have hqn : q.length < n := by + simp only [SimpleGraph.Walk.length_cons] at hn + omega + obtain ⟨r⟩ := ih q.length hqn c b q rfl hq + have hmeet : range σ ∩ range r.path ⊆ {c.val} := by + rintro x ⟨hxσ,hxr⟩ + by_cases hxE : x ∈ E.val + · exact False.elim (hENot (r.edge E ⟨x,hxr,hxE⟩)) + · have hfront : x ∈ closure E.val \ E.val := ⟨hσrange ▸ hxσ,hxE⟩ + rw [curve_edge_frontier_endpoints (w E) (hP E.val E.property) a c hac h h'] at hfront + rcases hfront with he | he + · have ha : a.val ∈ range r.path := he ▸ hxr + exact False.elim (haNot (by simp [r.vertex a ha])) + · exact he + refine ⟨⟨σ.trans r.path,fun _ => path_trans_injective_of_range σ r.path hσ + (r.injective hcb) hmeet,?_,?_⟩⟩ + · intro v hv + rw [Path.trans_range] at hv + rcases hv with hv | hv + · rcases hσV v hv with he | he <;> simp [he] + · simp [r.vertex v hv] + · intro F hF + obtain ⟨x,hx,hxF⟩ := hF + rw [Path.trans_range] at hx + rcases hx with hx | hx + · have he := hσE F ⟨x,hx,hxF⟩ + simp [he] + · simp [r.edge F ⟨x,hx,hxF⟩] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedOpenSubset.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedOpenSubset.lean new file mode 100644 index 0000000000000000000000000000000000000000..13c18dba408cc8bdbec2337740b07b332998cd90 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EmbeddedOpenSubset.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactCurveArc + +namespace OAI + +/-! Open subarcs remain open in the ambient curve. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] + +theorem embedded_open_subset {f : X → Y} (hf : IsEmbedding f) + {U S : Set X} (hU : IsOpen (f '' U)) (hS : IsOpen S) (hSU : S ⊆ U) : + IsOpen (f '' S) := by + obtain ⟨V,hV,hVS⟩ := hf.isInducing.isOpen_iff.mp hS + have heq : f '' S = (f '' U) ∩ V := by + ext y + constructor + · rintro ⟨x,hx,rfl⟩ + exact ⟨⟨x,hSU hx,rfl⟩,by rw [← hVS] at hx; exact hx⟩ + · rintro ⟨⟨x,hx,rfl⟩,hy⟩ + exact ⟨x,by rw [← hVS]; exact hy,rfl⟩ + rw [heq] + exact hU.inter hV + +variable {Z : Type*} [TopologicalSpace Z] + +def CompactCurveArc.openSubarc (A : CompactCurveArc Z) (u v : ℝ) : Set Z := + A.map '' {t | u < (t:ℝ) ∧ (t:ℝ) < v} + +def CompactCurveArc.closedSubarc (A : CompactCurveArc Z) (u v : ℝ) : Set Z := + A.map '' {t | u ≤ (t:ℝ) ∧ (t:ℝ) ≤ v} + +lemma CompactCurveArc.openSubarc_open (A : CompactCurveArc Z) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) : IsOpen (A.openSubarc u v) := by + apply embedded_open_subset A.embedding.isEmbedding A.interior_open + · exact isOpen_Ioo.preimage continuous_subtype_val + · intro t ht + exact ⟨hu.trans_lt ht.1,ht.2.trans_le hv⟩ + +lemma CompactCurveArc.closedSubarc_compact (A : CompactCurveArc Z) (u v : ℝ) : + IsCompact (A.closedSubarc u v) := by + exact (IsClosed.isCompact (isClosed_Icc.preimage continuous_subtype_val)).image A.embedding.continuous + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanImmersionLocalInjective.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanImmersionLocalInjective.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab0ad736afa9245150e97903f9ab259d06a35230 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanImmersionLocalInjective.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! A smooth finite-dimensional immersion is locally injective, using +an actual linear left inverse followed by the inverse function theorem. -/ +noncomputable section +open Set Filter Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem euclidean_immersion_locally_injective {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (p : Base) (hp : Function.Injective (fderiv ℝ f p)) : + ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ U.InjOn f := by + let L := fderiv ℝ f p + obtain ⟨A,hA⟩ := L.toLinearMap.exists_leftInverse_of_injective (LinearMap.ker_eq_bot.mpr hp) + let P : ProjectionTarget 3 →L[ℝ] Base := A.toContinuousLinearMap + have hPL : P.comp L = ContinuousLinearMap.id ℝ Base := by + apply ContinuousLinearMap.ext + intro v + exact congrArg (fun T : Base →ₗ[ℝ] Base => T v) hA + let g := P ∘ f + have hg : ContDiff ℝ ∞ g := P.contDiff.comp hf + have hd : HasFDerivAt g (ContinuousLinearEquiv.refl ℝ Base).toContinuousLinearMap p := by + have h := P.hasFDerivAt.comp p (hf.differentiable (by simp) p).hasFDerivAt + change HasFDerivAt g (P.comp L) p at h + rw [hPL] at h + exact h + let e := hg.contDiffAt.toOpenPartialHomeomorph g hd (by simp) + refine ⟨e.source,e.open_source,hg.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),?_⟩ + intro x hx y hy hxy + apply e.injOn hx hy + exact congrArg P hxy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanRestoration.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanRestoration.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a60c14bb35d5ff00302934a5317a78de73a4960 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanRestoration.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothing +import OAI.Geometry.SurfaceImmersion.Atlas.FinitePointChartBalls + +namespace OAI + +/-! Restore a compactly supported Euclidean chart correction. The support +and germ formulas are used in finite-point spherical preparation. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def euclideanRestore (p : M) (χ : M → ℝ) (h : Plane → Space) : M → Space := + restore p χ (h ∘ (EuclideanSpace.equiv (Fin 2) ℝ).symm) + +lemma euclideanRestore_eq (p : M) (χ : M → ℝ) (h : Plane → Space) : + euclideanRestore p χ h = (chartAt Plane p).source.indicator + (fun x => χ x • h (chartAt Plane p x)) := by + funext x + by_cases hx : x ∈ (chartAt Plane p).source + · simp [euclideanRestore,restore,chart,hx] + · simp [euclideanRestore,restore,chart,hx] + +lemma euclideanRestore_smooth [IsManifold planeModel ∞ M] (p : M) {χ : M → ℝ} + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + (hχs : tsupport χ ⊆ (chartAt Plane p).source) {h : Plane → Space} + (hh : ContDiff ℝ ∞ h) : ContMDiff planeModel spaceModel ∞ (euclideanRestore p χ h) := by + exact restore_smooth p hχ (by simpa only [chart_source] using hχs) + (hh.comp (EuclideanSpace.equiv (Fin 2) ℝ).symm.contDiff) + +lemma euclideanRestore_tsupport [T2Space M] (p : M) (χ : M → ℝ) {h : Plane → Space} + {K : Set Plane} (hK : IsCompact K) (hKt : K ⊆ (chartAt Plane p).target) + (hs : tsupport h ⊆ K) : + tsupport (euclideanRestore p χ h) ⊆ (chartAt Plane p).symm '' K := by + have hclosed : IsClosed ((chartAt Plane p).symm '' K) := + (hK.image_of_continuousOn ((chartAt Plane p).continuousOn_symm.mono hKt)).isClosed + apply closure_minimal _ hclosed + intro x hx + by_contra hn + rw [euclideanRestore_eq] at hx + by_cases hxs : x ∈ (chartAt Plane p).source + · have hh : h (chartAt Plane p x) = 0 := by + apply image_eq_zero_of_notMem_tsupport + intro hmem + exact hn ⟨chartAt Plane p x,hs hmem,(chartAt Plane p).left_inv hxs⟩ + exact hx (by simp [indicator_of_mem hxs,hh]) + · exact hx (indicator_of_notMem hxs _) + +lemma euclideanRestore_chart_germ (p : M) (χ : M → ℝ) (h : Plane → Space) + {x : Plane} (hx : x ∈ (chartAt Plane p).target) + (hχ : (fun y => χ ((chartAt Plane p).symm y)) =ᶠ[𝓝 x] (fun _ => (1 : ℝ))) : + (fun y => euclideanRestore p χ h ((chartAt Plane p).symm y)) =ᶠ[𝓝 x] h := by + filter_upwards [(chartAt Plane p).open_target.mem_nhds hx,hχ] with y hy hχy + rw [euclideanRestore_eq,indicator_of_mem ((chartAt Plane p).map_target hy), + hχy,one_smul,(chartAt Plane p).right_inv hy] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanSurfaceImageNull.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanSurfaceImageNull.lean new file mode 100644 index 0000000000000000000000000000000000000000..1181ceb5b3b0a64cd89f95ccf3a9752e59976e67 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/EuclideanSurfaceImageNull.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowerDimensionalImage +import OAI.Geometry.SurfaceImmersion.Geometry.LinearEquivNullImage +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative + +namespace OAI + +/-! Smooth two-dimensional images in three-space are null, in the +actual coordinate models used by the surface perturbations. -/ +noncomputable section +open Set MeasureTheory Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance : (volume : Measure (Plane × ℝ)).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +theorem euclidean_surface_image_null (f : Base → ProjectionTarget 3) (hf : ContDiff ℝ ∞ f) : + volume (range f) = 0 := by + let L : Plane ≃L[ℝ] Base := ContinuousLinearEquiv.ofFinrankEq (by simp [Base]) + let T : ProjectionTarget 3 ≃L[ℝ] Plane × ℝ := ContinuousLinearEquiv.ofFinrankEq (by simp) + have hnull := PublishedInputs.smooth_surface_image_volume_zero (T ∘ f ∘ L) + (T.contDiff.comp (hf.comp L.contDiff)) + have hnull' := linear_equiv_null_image T.symm volume volume hnull + have he : T.symm '' range (T ∘ f ∘ L) = range f := by + ext y + constructor + · rintro ⟨z,⟨x,rfl⟩,rfl⟩ + exact ⟨L x,by simp⟩ + · rintro ⟨x,rfl⟩ + exact ⟨T (f x),⟨L.symm x,by simp⟩,by simp⟩ + rwa [he] at hnull' + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +theorem compact_surface_image_null (f : M → ProjectionTarget 3) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : volume (range f) = 0 := by + choose U F hU hp hsrc hF he using fun p => surface_chart_representative hf p + obtain ⟨s,hs⟩ := isCompact_univ.elim_finite_subcover U hU + (fun p _ => mem_iUnion.mpr ⟨p,hp p⟩) + have hsub : range f ⊆ ⋃ p ∈ s, range (F p) := by + rintro y ⟨x,rfl⟩ + obtain ⟨p,hps,hxp⟩ := mem_iUnion₂.mp (hs (mem_univ x)) + exact mem_iUnion₂.mpr ⟨p,hps,⟨chart p x,(he p hxp).symm⟩⟩ + apply measure_mono_null hsub + exact (measure_biUnion_null_iff s.finite_toSet.countable).mpr (fun p _ => euclidean_surface_image_null (F p) (hF p)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactFastFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactFastFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..642750a82a89172baa113c2049c9c969ce8fb7bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactFastFamily.lean @@ -0,0 +1,193 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AnchoredPreparedCorrection +import OAI.Geometry.SurfaceImmersion.Geometry.RescaledReadBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPreparedInitialization +import OAI.Geometry.SurfaceImmersion.Correction.InitialCorrectionStage + +namespace OAI + +/-! Arbitrarily accurate primitive maps give an actual smooth exact metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes JetPolynomial JetPolynomial.Perturbation +local instance exactFastFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactFastFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactFastDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactFastDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactFastSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactFastSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Quantitative finite-accuracy data supplied by the actual primitive construction. -/ +def GeometricFastFamily (g : SmoothMetric M) (R c b V₀ : ℝ) : Prop := + ∀ N : ℕ, ∃ η C Cv : ℝ, 0 < η ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ F : M → Space, + ContMDiff planeModel spaceModel ∞ F ∧ + A.WeightedBound 1 0 V₀ F ∧ A.WeightedBound z 442 Cv F ∧ + A.ShiftedBound 2 440 z (Cv/z^2) F ∧ + A.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor F-g.inner) ∧ + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).2 ∧ + b ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ + +/-- Retain a proved property of the actual finite-accuracy approximant. -/ +def GeometricFastFamilyWithProperty (g : SmoothMetric M) (R c b V₀ : ℝ) (property : ℝ → (M → Space) → Prop) : Prop := + ∀ N : ℕ, ∃ η C Cv : ℝ, 0 < η ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ F : M → Space, + ContMDiff planeModel spaceModel ∞ F ∧ property z F ∧ + A.WeightedBound 1 0 V₀ F ∧ A.WeightedBound z 442 Cv F ∧ + A.ShiftedBound 2 440 z (Cv/z^2) F ∧ + A.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor F-g.inner) ∧ + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).2 ∧ + b ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ + +theorem exact_metric_with_property (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c b V₀ : ℝ) (hc : 0 < c) (hb : 0 < b) (hV₀ : 0 ≤ V₀) + (property : ℝ → (M → Space) → Prop) + (hfamily : A.GeometricFastFamilyWithProperty g R c b V₀ property) : + ∃ B : ℝ, 1 ≤ B ∧ ∀ ζ : ℝ, 0 < ζ → ∀ K : ℝ, 0 < K → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F ∧ property z F ∧ IsSmoothIsometricImmersion M g G ∧ + A.WeightedBound 1 2 (z^8/K) (G-F) ∧ + (∀ i, WeightedEstimates.WeightedBound univ (z^2) 3 B + (spaceCoordinates ∘ A.vectorPlaneRead i F)) ∧ + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).2 ∧ + b ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ := by + obtain ⟨B,hB,hreads⟩ := A.uniform_rescaled_read_bound V₀ hV₀ + refine ⟨B,hB,?_⟩ + intro ζ hζ + obtain ⟨z₀,a,D,hz₀,hz₀1,ha,hD,hprep⟩ := + A.anchored_prepared_correction g houter R c B b hc (zero_le_one.trans hB) hb + let P : ℝ → ℝ := fun x => x^2 + have hP : HasPolynomialBound P := polynomialBound_id.pow 2 + obtain ⟨Budget,EpsInv,hBudget,hEpsInv,hdata⟩ := hprep P P hP hP + obtain ⟨ν,hν,N,hinit⟩ := ExactCorrection.polynomial_prepared_initialization EpsInv hEpsInv + obtain ⟨ηf,C,Cv,hηf,hC,hCv,hf⟩ := hfamily N + obtain ⟨Dg,hDg,hg⟩ := A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain 440 g.contMDiff + let H := max C Cv + have hH : 0 ≤ H := hC.trans (le_max_left _ _) + have hCH : C ≤ H := le_max_left _ _ + have hCvH : Cv ≤ H := le_max_right _ _ + obtain ⟨ηr,hηr,hηr1,hr⟩ := hreads Cv hCv + obtain ⟨ηb,hηb,_,hbase⟩ := ExactCorrection.positive_power_threshold Cv 2 1 (by norm_num) zero_lt_one + intro K hK + obtain ⟨ηi,hηi,hηi1,hi⟩ := hinit H Dg (a/16) D K hH hDg (by positivity) hD hK + let η := min z₀ (min ηf (min ηr (min ηb (min ηi ζ)))) + have hη : 0 < η := lt_min hz₀ (lt_min hηf (lt_min hηr (lt_min hηb (lt_min hηi hζ)))) + let z := η/2 + have hz : 0 < z := half_pos hη + have hzη : z < η := half_lt_self hη + have hzz₀ : z < z₀ := hzη.trans_le (min_le_left _ _) + have hzf : z < ηf := hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzr : z < ηr := hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have hzb : z < ηb := hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))) + have hziζ : z < min ηi ζ := hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)))) + have hzi := hziζ.trans_le (min_le_left _ _) + have hzζ := hziζ.trans_le (min_le_right _ _) + have hz1 : z ≤ 1 := hzz₀.le.trans hz₀1 + have hzsq : z^2 ≤ z := by simpa only [pow_one] using pow_le_pow_of_le_one hz.le hz1 (by norm_num : 1 ≤ 2) + obtain ⟨F,hF,hproperty,hFzero,hFwb,hFshift,herr,hgeom⟩ := hf z hz hzf + have hFread := hr z hz hzr F hF hFzero (fun i => (hFwb i).mono_order (by omega)) + have hsmall : Cv*z^2 ≤ 1 := by + simpa only [Real.rpow_ofNat] using (hbase z hz hzb).le + have hFbase : A.ShiftedBound 2 0 1 (P ((z^2)⁻¹)) F := by + intro i j hj x + have hj0 : j-2 = 0 := by omega + have hh := hFshift i j (by omega) x + simp only [hj0,pow_zero,one_mul] at hh ⊢ + apply hh.trans + change Cv/z^2 ≤ ((z^2)⁻¹)^2 + apply (div_le_iff₀ (pow_pos hz 2)).mpr + have heq : ((z^2)⁻¹)^2*z^2 = 1/z^2 := by field_simp + rw [heq] + exact (le_div_iff₀ (pow_pos hz 2)).mpr hsmall + obtain ⟨p,hpa,hprho,hpbudget,hpWish,hpε⟩ := hdata (z^2) (pow_pos hz 2) + (hzsq.trans hzz₀.le) + F hF hFread hgeom hFbase + have hρ : p.ρ = z^8/D := by rw [hprho]; congr 1; ring + have hbudget : 1/z^4 ≤ p.budget := by + have hPval : P ((z^2)⁻¹) = 1/z^4 := by dsimp [P]; field_simp + rw [hPval] at hpWish + linarith [p.budget_pos] + obtain ⟨htz,ht32,htε,hMB,hHB,hnear,herror,hcontrol⟩ := hi z hz hzi + have ht : 0 < z^ν := Real.rpow_pos_of_pos hz _ + have ht1 : z^ν ≤ 1 := by linarith + have hmap : A.ShiftedBound 2 440 z (H/z^2) F := by + intro i j hj x + exact (hFshift i j hj x).trans (div_le_div_of_nonneg_right hCvH (sq_nonneg z)) + have hmap0 : A.ShiftedBound 2 0 1 (H/z^2) F := by + intro i j hj x + have hj0 : j-2 = 0 := by omega + simpa only [hj0,pow_zero,one_mul] using hmap i j (by omega) x + have hmetric0 : A.TensorWeightedBound 1 0 Dg g.inner := fun i => (hg i).mono_order (by omega) + have herror' : A.TensorWeightedBound (z^ν) 440 (((z^ν)^(10 : ℝ))^2*(a/16)) + (inducedTensor F-g.inner) := by + intro i + apply ((herr i).shrink_scale ht.le ht1).mono_const + exact (mul_le_mul_of_nonneg_right hCH (pow_nonneg hz.le _)).trans herror + obtain ⟨seed,hseed⟩ := p.initial_stage_of_scaled_bounds hF ht ht32 + (htε _ (p.ε_pos 0) hpε) hz htz (by positivity) (by positivity) hDg (by positivity) + hmap0 hmap hmetric0 hg herror' (hMB.trans hbudget) (hHB.trans hbudget) + (by rwa [hρ]) (by rw [hpa]; linarith) + obtain ⟨G,hG,hclose⟩ := p.exact_correction_initial_displacement hF ht ht32 + (by positivity) hmap0 seed hseed + rw [hρ] at hclose + exact ⟨z,hz,hzζ,hz1,F,G,hF,hproperty,hG,(fun i => (hclose i).mono_const hcontrol),hFread,hgeom⟩ + +/-- The original geometric conclusion, with no extra property requested. -/ +theorem exact_metric_from_fast_family (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c b V₀ : ℝ) (hc : 0 < c) (hb : 0 < b) (hV₀ : 0 ≤ V₀) + (hfamily : A.GeometricFastFamily g R c b V₀) : + ∃ B : ℝ, 1 ≤ B ∧ ∀ ζ : ℝ, 0 < ζ → ∀ K : ℝ, 0 < K → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F ∧ IsSmoothIsometricImmersion M g G ∧ + A.WeightedBound 1 2 (z^8/K) (G-F) ∧ + (∀ i, WeightedEstimates.WeightedBound univ (z^2) 3 B + (spaceCoordinates ∘ A.vectorPlaneRead i F)) ∧ + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x).2 ∧ + b ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x‖ := by + have hdecorated : A.GeometricFastFamilyWithProperty g R c b V₀ (fun _ _ => True) := by + intro N + obtain ⟨η,C,Cv,hη,hC,hCv,hf⟩ := hfamily N + refine ⟨η,C,Cv,hη,hC,hCv,?_⟩ + intro z hz hzη + obtain ⟨F,hF,hFzero,hFwb,hFshift,herr,hgeom⟩ := hf z hz hzη + exact ⟨F,hF,trivial,hFzero,hFwb,hFshift,herr,hgeom⟩ + obtain ⟨B,hB,hall⟩ := A.exact_metric_with_property g houter R c b V₀ hc hb hV₀ + (fun _ _ => True) hdecorated + refine ⟨B,hB,?_⟩ + intro ζ hζ K hK + obtain ⟨z,hz,hzζ,hz1,F,G,hF,_,hG,hclose,hread,hgeom⟩ := hall ζ hζ K hK + exact ⟨z,hz,hzζ,hz1,F,G,hF,hG,hclose,hread,hgeom⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactGeometricFastFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactGeometricFastFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ecedf54751f26c67ba61a6c058d8f2d3f535979 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactGeometricFastFamily.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExactFastFamily +import OAI.Geometry.SurfaceImmersion.Geometry.UniformFastNormalMargin +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasImmersionGeometry + +namespace OAI + +/-! Exact limits retain the geometric hypotheses needed for the next primitive. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes JetPolynomial JetPolynomial.Perturbation +local instance exactGeometricFastFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactGeometricFastFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactGeometricFastDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactGeometricFastDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactGeometricFastSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactGeometricFastSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exact_geometric_metric_with_property [T2Space M] (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c b V₀ : ℝ) (hc : 0 < c) (hb : 0 < b) (hV₀ : 0 ≤ V₀) + (property : ℝ → (M → Space) → Prop) + (hfamily : A.GeometricFastFamilyWithProperty g R c b V₀ property) + (ζ : ℝ) (hζ : 0 < ζ) : + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F ∧ property z F ∧ + IsSmoothIsometricImmersion M g G ∧ Nonempty (MetricGoodPhaseData g G) ∧ + A.WeightedBound 1 2 (z^8) (G-F) := by + obtain ⟨B,hB,hall⟩ := A.exact_metric_with_property g houter R c b V₀ hc hb hV₀ property hfamily + obtain ⟨η,hη,hη1,hnormal⟩ := uniform_fast_normal_margin R c B b hc (zero_le_one.trans hB) hb + obtain ⟨D,hD,hball⟩ := A.readJetBall_radius + obtain ⟨z,hz,hzcap,hz1,F,G,hF,hproperty,hG,hclose,hread,hgeom⟩ := + hall (min η ζ) (lt_min hη hζ) D (zero_lt_one.trans_le hD) + have hzη := hzcap.trans_le (min_le_left _ _) + have hzζ := hzcap.trans_le (min_le_right _ _) + have hclose' : A.WeightedBound 1 2 ((z^2)^4/D) (G-F) := by + convert hclose using 1; ring + have hjet := hball (z^2) F G hF hG.1 hclose' + have hsη : z^2 ≤ η := (show z^2 ≤ z from by + simpa only [pow_one] using pow_le_pow_of_le_one hz.le hz1 (by norm_num : 1 ≤ 2)).trans hzη.le + have hlocal := fun i x hx => hnormal (z^2) (pow_pos hz 2) hsη + (spaceCoordinates ∘ A.vectorPlaneRead i F) (spaceCoordinates ∘ A.vectorPlaneRead i G) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) (hread i) x + (hgeom i x hx).1 (hgeom i x hx).2.1 (hgeom i x hx).2.2 + (hjet.2 i x hx).1 (hjet.2 i x hx).2 + have hgeometry := A.geometry_of_chartwise_good hG.1 houter (by + intro p + obtain ⟨i,hi⟩ : ∃ i : A.centers, A.weight i p ≠ 0 := by + by_contra! hz + have hh := A.partition p + simp only [hz,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hh + norm_num at hh + have hp : p ∈ tsupport (A.weight i) := subset_tsupport _ hi + have hx : planeCoordinateIsometry (chart (i : M) p) ∈ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + ⟨chart (i : M) p,⟨p,hp,rfl⟩,rfl⟩ + obtain ⟨hI,hN⟩ := hlocal i _ hx + have hNZ : realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p)) ≠ 0 := + norm_pos_iff.mp ((half_pos hb).trans_le hN) + obtain ⟨ξ,Q,_,_,hgood,_⟩ := PhaseGeometry.positive_good_phase_data hNZ + (H₀ := ![(1:ℝ),0,1]) (by simp) (by simp) + exact ⟨i,hp,hI,ξ 0,hgood 0⟩) + refine ⟨z,hz,hzζ,hz1,F,G,hF,hproperty,hG, + MetricGoodPhaseData.nonempty g hG.1 hgeometry.1 hgeometry.2,?_⟩ + intro i + apply (hclose i).mono_const + apply (div_le_iff₀ (zero_lt_one.trans_le hD)).mpr + nlinarith [mul_le_mul_of_nonneg_left hD (pow_nonneg hz.le 8)] + +/-- The geometric conclusion after forgetting the approximant. -/ +theorem exact_geometric_metric_from_fast_family [T2Space M] (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c b V₀ : ℝ) (hc : 0 < c) (hb : 0 < b) (hV₀ : 0 ≤ V₀) + (hfamily : A.GeometricFastFamily g R c b V₀) : + ∃ G : M → Space, IsSmoothIsometricImmersion M g G ∧ Nonempty (MetricGoodPhaseData g G) := by + have hdecorated : A.GeometricFastFamilyWithProperty g R c b V₀ (fun _ _ => True) := by + intro N + obtain ⟨η,C,Cv,hη,hC,hCv,hf⟩ := hfamily N + refine ⟨η,C,Cv,hη,hC,hCv,?_⟩ + intro z hz hzη + obtain ⟨F,hF,hFzero,hFwb,hFshift,herr,hgeom⟩ := hf z hz hzη + exact ⟨F,hF,trivial,hFzero,hFwb,hFshift,herr,hgeom⟩ + obtain ⟨z,hz,hz1,_,F,G,hF,_,hG,hgeometry,_⟩ := A.exact_geometric_metric_with_property + g houter R c b V₀ hc hb hV₀ (fun _ _ => True) hdecorated 1 zero_lt_one + exact ⟨G,hG,hgeometry⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrence.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..db9f3fab65682f8e1dccdb8f5d433da69d246c36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrence.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalInputRecurrence +import OAI.Geometry.SurfaceImmersion.Geometry.ExactInputRecurrenceBound +import OAI.Geometry.SurfaceImmersion.Geometry.ExactScaleOrdering + +namespace OAI + +/-! The actual next map and normalized defect satisfy the waiting recurrence. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance exactInputFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactInputFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exact_scale_input_recurrence {g : SmoothMetric M} {G U : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (hU : ContMDiff planeModel spaceModel ∞ U) + {t P P₀ Pm B C L B₀ δ' : ℝ} {k m : ℕ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hP : 0 ≤ P) (hP₀ : 0 ≤ P₀) (hPm : 0 ≤ Pm) + (hB : 0 ≤ B) (hC : 0 ≤ C) (hL : 0 ≤ L) (hB₀ : 0 ≤ B₀) + (hp : A.ShiftedBound 2 0 t P G) + (hc : A.ShiftedBound 2 m t C G) + (hu : A.WeightedBound (t^(6/5 : ℝ)) (2+m) (B*(t^(k : ℝ)*t^(6/5 : ℝ))) U) + (ht₀ : A.TensorWeightedBound 1 0 P₀ g.inner) + (htm : A.TensorWeightedBound 1 m Pm g.inner) + (he : A.TensorWeightedBound (t^(6/5 : ℝ)) m (L*(1+B₀+C)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner δ' (G+U)-g.inner)) : + A.InputBound (t^(6/5 : ℝ)) m + (P+P₀+(Pm+B+L*(1+B₀)+1+L)*t^(1/5 : ℝ)*(1+C)) + (G+U) (normalizedTensorDefect g.inner δ' (G+U)) := by + have hτ : 0 < t^(6/5 : ℝ) := Real.rpow_pos_of_pos ht _ + obtain ⟨_,_,hτs,hst⟩ := ExactCorrection.exact_scale_order ht ht1 hk + have hτt := hτs.trans hst + have hh := A.next_input_bound g.contMDiff hG hU ht hτ hτt (hτt.trans ht1) + hP hP₀ hPm hC (mul_nonneg hB (mul_nonneg (Real.rpow_nonneg ht.le _) hτ.le)) + (mul_nonneg (mul_nonneg hL (by linarith)) (Real.rpow_nonneg ht.le _)) + hp hc hu ht₀ htm he + have hsize := ExactCorrection.exact_input_recurrence_bound ht ht1 hk hPm hB hC hL hB₀ + (P := P) (P₀ := P₀) + constructor + · intro i j hj x + exact (hh.1 i j hj x).trans hsize + · intro i + exact (hh.2 i).mono_const hsize + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrenceBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrenceBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..11b649fd3ed424c50ce3bcd7d802600345e01241 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactInputRecurrenceBound.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleAlgebra + +namespace OAI + +/-! The two components of the actual input share a contracting affine bound. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection + +theorem exact_input_recurrence_bound {t P P₀ Pm B C L B₀ : ℝ} {k : ℕ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hPm : 0 ≤ Pm) (hB : 0 ≤ B) (hC : 0 ≤ C) (hL : 0 ≤ L) (hB₀ : 0 ≤ B₀) : + P+P₀+t^(6/5 : ℝ)*Pm+(t^(6/5 : ℝ)/t)*C+ + (B*(t^(k : ℝ)*t^(6/5 : ℝ)))/(t^(6/5 : ℝ))^2+ + L*(1+B₀+C)*t^(1/5 : ℝ) ≤ + P+P₀+(Pm+B+L*(1+B₀)+1+L)*t^(1/5 : ℝ)*(1+C) := by + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + have hτ : t^(6/5 : ℝ) ≤ t^(1/5 : ℝ) := + Real.rpow_le_rpow_of_exponent_ge ht ht1 (by norm_num) + have hratio : t^(6/5 : ℝ)/t = t^(1/5 : ℝ) := by + conv_lhs => rhs; rw [← Real.rpow_one t] + rw [← Real.rpow_sub ht] + norm_num + have hquotient : (t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^2 = + t^((k : ℝ)-(6/5 : ℝ)) := by + rw [← Real.rpow_natCast,← Real.rpow_mul ht.le,scale_quotient_product ht] + congr 1 + ring + have hquotient_le : (t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^2 ≤ t^(1/5 : ℝ) := by + rw [hquotient] + exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + have hterm : (B*(t^(k : ℝ)*t^(6/5 : ℝ)))/(t^(6/5 : ℝ))^2 ≤ B*t^(1/5 : ℝ) := by + rw [mul_div_assoc] + exact mul_le_mul_of_nonneg_left hquotient_le hB + calc + _ ≤ P+P₀+t^(1/5 : ℝ)*Pm+t^(1/5 : ℝ)*C+B*t^(1/5 : ℝ)+ + L*(1+B₀+C)*t^(1/5 : ℝ) := by + rw [hratio] + gcongr + _ = P+P₀+(Pm+C+B+L*(1+B₀+C))*t^(1/5 : ℝ) := by ring + _ ≤ _ := by + apply add_le_add le_rfl + rw [mul_assoc _ _ (1+C),mul_comm (t^(1/5 : ℝ)) (1+C),← mul_assoc] + apply mul_le_mul_of_nonneg_right _ (Real.rpow_nonneg ht.le _) + nlinarith [mul_nonneg hPm hC,mul_nonneg hB hC, + mul_nonneg (mul_nonneg hL hB₀) hC] + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactScaleOrdering.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactScaleOrdering.lean new file mode 100644 index 0000000000000000000000000000000000000000..6726306b8ee64716cac88fdcf340983a1c605009 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExactScaleOrdering.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleAlgebra + +namespace OAI + +/-! Positivity and ordering of the actual scales in each correction step. -/ +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +theorem exact_scale_positive {t : ℝ} (ht : 0 < t) (k : ℕ) : + 0 < t^((6/5 : ℝ)*((k : ℝ)+1)) ∧ 0 < t^(k : ℝ) ∧ + 0 < t^(6/5 : ℝ) ∧ 0 < t^(11/10 : ℝ) := + ⟨Real.rpow_pos_of_pos ht _,Real.rpow_pos_of_pos ht _, + Real.rpow_pos_of_pos ht _,Real.rpow_pos_of_pos ht _⟩ + +theorem exact_scale_order {t : ℝ} (ht : 0 < t) (ht1 : t ≤ 1) {k : ℕ} (hk : 10 ≤ k) : + t^((6/5 : ℝ)*((k : ℝ)+1)) ≤ t^(k : ℝ) ∧ + t^(k : ℝ) ≤ t^(6/5 : ℝ) ∧ t^(6/5 : ℝ) ≤ t^(11/10 : ℝ) ∧ + t^(11/10 : ℝ) ≤ t := by + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + refine ⟨Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith), + Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith), + Real.rpow_le_rpow_of_exponent_ge ht ht1 (by norm_num),?_⟩ + simpa only [Real.rpow_one] using + Real.rpow_le_rpow_of_exponent_ge ht ht1 (show (1 : ℝ) ≤ 11/10 by norm_num) + +theorem next_amplitude_scale {t : ℝ} (ht : 0 < t) (k : ℕ) : + t^((6/5 : ℝ)*((k : ℝ)+1)) = (t^(6/5 : ℝ))^(k+1) := by + rw [← Real.rpow_natCast,← Real.rpow_mul ht.le] + simp only [Nat.cast_add,Nat.cast_one] + +theorem amplitude_scale_nat (t : ℝ) (k : ℕ) : t^(k : ℝ) = t^k := + Real.rpow_natCast t k + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitFixedOrderThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitFixedOrderThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..698e694f387827266cdb20eda2a73cd9c22a24b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitFixedOrderThreshold.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPowerThreshold + +namespace OAI + +/-! The fixed-order scale conditions with one explicitly specified +threshold. Its reciprocal is polynomial in the finite numerical budgets. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.ExactCorrection + +def fixedOrderNumericalBudget (k : ℕ) (D B K : ℝ) (C : ℕ → ℝ) : ℝ := + 2+D*B+K+∑ m ∈ Finset.range (k/2+1), |C m| + +def fixedOrderThreshold (k : ℕ) (ρ a η D B K : ℝ) (C : ℕ → ℝ) : ℝ := + powerThreshold 10 (fixedOrderNumericalBudget k D B K C) (min η (min (ρ/4) (a/8))) + +theorem fixedOrderThreshold_spec (k : ℕ) (hk : 10 ≤ k) + (ρ a η D B K : ℝ) (hρ : 0 < ρ) (ha : 0 < a) (hη : 0 < η) + (hD : 0 ≤ D) (hB : 0 ≤ B) (hK : 0 ≤ K) (C : ℕ → ℝ) : + 0 < fixedOrderThreshold k ρ a η D B K C ∧ + fixedOrderThreshold k ρ a η D B K C ≤ 1 ∧ + ∀ t : ℝ, 0 < t → t < fixedOrderThreshold k ρ a η D B K C → + ∀ j : ℕ, k ≤ j → j ≤ k+1 → + t^(6/5 : ℝ)/t^(11/10 : ℝ) ≤ η ∧ + D*B*(t^(11/10 : ℝ)/t)^(40*(k+1)) ≤ min (ρ/4) (a/8) ∧ + (t^((6/5 : ℝ)*(j : ℝ))/t^(k : ℝ))^(2 : ℕ)*K ≤ a/8 ∧ + (∀ m ≤ k/2, C m*(t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m ≤ ρ*t) ∧ + t^((6/5 : ℝ)*(j : ℝ)) ≤ t^(k : ℝ) ∧ + t^((6/5 : ℝ)*((k : ℝ)+1)) ≤ t^((6/5 : ℝ)*(j : ℝ)) := by + let M := 1+∑ m ∈ Finset.range (k/2+1), |C m| + let S := fixedOrderNumericalBudget k D B K C + let b := min η (min (ρ/4) (a/8)) + have hsum : 0 ≤ ∑ m ∈ Finset.range (k/2+1), |C m| := + Finset.sum_nonneg (fun _ _ => abs_nonneg _) + have hDB := mul_nonneg hD hB + have hS : 0 ≤ S := by dsimp [S, fixedOrderNumericalBudget]; linarith + have hS1 : 1 ≤ S := by dsimp [S, fixedOrderNumericalBudget]; linarith + have hSDB : D*B ≤ S := by dsimp [S, fixedOrderNumericalBudget]; linarith + have hSK : K ≤ S := by dsimp [S, fixedOrderNumericalBudget]; linarith + have hSM : M ≤ S := by dsimp [S, fixedOrderNumericalBudget, M]; linarith + have hb : 0 < b := lt_min hη (lt_min (by positivity) (by positivity)) + have hε := powerThreshold_spec (n := 10) (by decide) hS hb + (show ((10 : ℕ) : ℝ)⁻¹ ≤ (1/10 : ℝ) by norm_num) + refine ⟨hε.1,hε.2.1,?_⟩ + intro t ht htε j hkj hjk + have ht1 : t ≤ 1 := htε.le.trans hε.2.1 + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + have hkj' : (k : ℝ) ≤ j := by exact_mod_cast hkj + have hjk' : (j : ℝ) ≤ (k : ℝ)+1 := by exact_mod_cast hjk + have hbound (c p : ℝ) (hc : c ≤ S) (hp : (1/10 : ℝ) ≤ p) : c*t^p ≤ b := by + have hh := (powerThreshold_spec (n := 10) (by decide) hS hb + (show ((10 : ℕ) : ℝ)⁻¹ ≤ p by norm_num; exact hp)).2.2 t ht htε + exact (mul_le_mul_of_nonneg_right hc (Real.rpow_nonneg ht.le _)).trans hh.le + have hr : t^(6/5 : ℝ)/t^(11/10 : ℝ) = t^(1/10 : ℝ) := by + rw [← Real.rpow_sub ht] + norm_num + have hs : t^(11/10 : ℝ)/t = t^(1/10 : ℝ) := by + conv_lhs => rhs; rw [← Real.rpow_one t] + rw [← Real.rpow_sub ht] + norm_num + have hpow : (t^(11/10 : ℝ)/t)^(40*(k+1)) = t^(4*((k : ℝ)+1)) := by + rw [hs,← Real.rpow_natCast,← Real.rpow_mul ht.le] + congr 1 + push_cast + ring + have hδ : (t^((6/5 : ℝ)*(j : ℝ))/t^(k : ℝ))^(2 : ℕ) = + t^((12/5 : ℝ)*(j : ℝ)-2*(k : ℝ)) := by + rw [← Real.rpow_sub ht,← Real.rpow_natCast,← Real.rpow_mul ht.le] + congr 1 + ring + refine ⟨?_,?_,?_,?_,?_,?_⟩ + · rw [hr] + have hh := hbound 1 (1/10) hS1 le_rfl + simpa only [one_mul] using hh.trans (min_le_left _ _) + · rw [hpow] + exact (hbound (D*B) _ hSDB (by linarith)).trans (min_le_right _ _) + · rw [hδ,mul_comm] + exact (hbound K _ hSK (by linarith)).trans + ((min_le_right _ _).trans (min_le_right _ _)) + · intro m hm + have hCM : C m ≤ M := by + have hh := Finset.single_le_sum (fun j (_ : j ∈ Finset.range (k/2+1)) => abs_nonneg (C j)) + (Finset.mem_range.mpr (by omega : m < k/2+1)) + have hc := le_abs_self (C m) + dsimp [M] + linarith + let e : ℝ := (k : ℝ)+(1/5 : ℝ)-(6/5 : ℝ)*(m : ℝ) + have hmk : 2*m ≤ k := by omega + have hmk' : (2 : ℝ)*(m : ℝ) ≤ (k : ℝ) := by exact_mod_cast hmk + have he : (1/10 : ℝ) ≤ e := by dsimp [e]; linarith + have heρ : C m*t^e ≤ ρ := (hbound (C m) e (hCM.trans hSM) he).trans (by + have hbρ : b ≤ ρ/4 := (min_le_right _ _).trans (min_le_left _ _) + linarith) + have hratio : (t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m = t^e*t := by + rw [← Real.rpow_natCast,← Real.rpow_mul ht.le,scale_quotient_product ht] + conv_rhs => rhs; rw [← Real.rpow_one t] + rw [← Real.rpow_add ht] + congr 1 + dsimp [e] + ring + calc + _ = C m*((t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m) := by ring + _ = (C m*t^e)*t := by rw [hratio]; ring + _ ≤ ρ*t := mul_le_mul_of_nonneg_right heρ ht.le + · exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + · exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitPowerThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitPowerThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..0db8b17a5f0cd1fb50411727fb203dbec8cc6699 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitPowerThreshold.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! Explicit integer-power thresholds for the finitely many real powers +used by the first correction block. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection + +/-- The exponent of this threshold depends only on a lower bound for the +positive exponent, not on either numerical constant. -/ +def powerThreshold (n : ℕ) (c b : ℝ) : ℝ := (min 1 (b/(c+1)))^n + +theorem powerThreshold_spec {n : ℕ} (hn : 0 < n) {c b p : ℝ} + (hc : 0 ≤ c) (hb : 0 < b) (hp : (n : ℝ)⁻¹ ≤ p) : + 0 < powerThreshold n c b ∧ powerThreshold n c b ≤ 1 ∧ + ∀ t : ℝ, 0 < t → t < powerThreshold n c b → c*t^p < b := by + let q := min 1 (b/(c+1)) + have hq : 0 < q := lt_min zero_lt_one (div_pos hb (by linarith)) + have hq1 : q ≤ 1 := min_le_left _ _ + have hn' : 0 < (n : ℝ) := by exact_mod_cast hn + refine ⟨pow_pos hq n, pow_le_one₀ hq.le hq1,?_⟩ + intro t ht hsmall + have ht1 : t ≤ 1 := hsmall.le.trans (pow_le_one₀ hq.le hq1) + have hroot : t^((n : ℝ)⁻¹) < q := by + have h := Real.rpow_lt_rpow ht.le hsmall (inv_pos.mpr hn') + change t^((n : ℝ)⁻¹) < (q^n)^((n : ℝ)⁻¹) at h + rwa [← Real.rpow_natCast, Real.rpow_rpow_inv hq.le hn'.ne'] at h + have htp : t^p < q := + (Real.rpow_le_rpow_of_exponent_ge ht ht1 hp).trans_lt hroot + have hqb : (c+1)*q ≤ b := by + have h := (le_div_iff₀ (show 0 < c+1 by linarith)).mp + (show q ≤ b/(c+1) from min_le_right _ _) + nlinarith + calc + c*t^p ≤ (c+1)*t^p := mul_le_mul_of_nonneg_right (by linarith) (Real.rpow_nonneg ht.le _) + _ < (c+1)*q := mul_lt_mul_of_pos_left htp (by linarith) + _ ≤ b := hqb + +/-- An upper bound on the reciprocal threshold follows from upper bounds +on the coefficient and reciprocal margin. -/ +lemma powerThreshold_inverse_le {n : ℕ} {c b C B : ℝ} + (hc : 0 ≤ c) (hb : 0 < b) (hC : c ≤ C) (hB : b⁻¹ ≤ B) : + (powerThreshold n c b)⁻¹ ≤ (1+(C+1)*B)^n := by + have hC0 : 0 ≤ C := hc.trans hC + have hB0 : 0 ≤ B := (inv_pos.mpr hb).le.trans hB + have hq : 0 < min 1 (b/(c+1)) := lt_min zero_lt_one (div_pos hb (by linarith)) + have hi : (min 1 (b/(c+1)))⁻¹ ≤ 1+(C+1)*B := by + have hh : (c+1)/b ≤ (C+1)*B := by + rw [div_eq_mul_inv] + exact mul_le_mul (by linarith) hB (inv_nonneg.mpr hb.le) (by linarith) + by_cases hle : b/(c+1) ≤ 1 + · rw [min_eq_right hle, inv_div] + linarith + · rw [min_eq_left (le_of_not_ge hle), inv_one] + nlinarith + rw [powerThreshold, ← inv_pow] + exact pow_le_pow_left₀ (inv_nonneg.mpr hq.le) hi n + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitQuadraticSolverInput.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitQuadraticSolverInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..69f84a20e5e978ef293b247fec1cf7da90cafa80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitQuadraticSolverInput.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargetBudget +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm + +namespace OAI + +/-! Actual supported quadratic targets in the norm used by each phase solver. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance explicitSolverInputFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance explicitSolverInputFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance explicitSolverInputDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance explicitSolverInputDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance explicitSolverInputSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance explicitSolverInputSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {ι : Type*} + +theorem quadratic_solver_input_bound_of_cutoff_bound (k : A.centers) (m : ℕ) + {D : ℝ} (hD : 0 ≤ D) + (hd : ∀ s : ℝ, 0 < s → s ≤ 1 → WeightedEstimates.WeightedBound univ s m D + (fun x => ((A.supportedPlaneWeight k x * A.supportedPlaneWeight k x : ℝ) : ℂ))) : + ∀ (A₀ P₀ : ℝ), ∀ (τ δ : ℝ) (s : ℝ≥0) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → 0 ≤ A₀ → 0 ≤ P₀ → + (∀ a, WeightedEstimates.WeightedBound univ s (m+1) (A₀*(δ*τ)) (A.vectorPlaneRead k (Z a))) → + (∀ a v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m P₀ + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∀ (l : RealModes.QuadraticLabel ι) {n : ℕ} {P : Fin 3 → Fin n → JetPolynomial.Expression} + {G : JetPolynomial.Base → JetPolynomial.Space} {hG : ContDiff ℝ ∞ G} + (c : PolynomialSolveData P 0 G hG (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s) + (I : ℕ → ℝ), (∀ j, 1 ≤ I j) → + (∀ a j, 1 ≤ j → j ≤ a → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I a) → + c.norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m ≤ + δ^2 * (tensorChartBudget m (I m) (I (m+1)) * quadraticTargetBudget m D A₀ P₀) := by + intro A₀ P₀ τ δ s φ Z hφ hZ S hS hSZ hτ hs hτs hs1 hδ hA hP hz hp l n P G hG c I hI hi + have ht : WeightedEstimates.WeightedBound univ s m + (quadraticTargetBudget m D A₀ P₀*δ^2) + (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) := + cutoff_quadratic_bound_explicit (A.supportedPlaneWeight k) m hD hd A₀ P₀ τ s δ + (fun a => A.vectorPlaneRead k (φ a)) (fun a => A.vectorPlaneRead k (Z a)) + (fun a => A.vectorPlaneRead_smooth k (hφ a)) + (fun a => A.vectorPlaneRead_smooth k (hZ a)) hτ hs hτs hs1 hδ hA hP hz hp l + have hB : 0 ≤ quadraticTargetBudget m D A₀ P₀ := by + dsimp [quadraticTargetBudget] + positivity + have hh := c.norm_le_of_weightedBound hs hs1 I hI hi m + (mul_nonneg hB (sq_nonneg δ)) _ ht + calc + _ ≤ tensorChartBudget m (I m) (I (m+1)) * (quadraticTargetBudget m D A₀ P₀*δ^2) := hh + _ = _ := by ring + +theorem explicit_quadratic_solver_input_bound (k : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (A₀ P₀ : ℝ), ∀ (τ δ : ℝ) (s : ℝ≥0) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → 0 ≤ A₀ → 0 ≤ P₀ → + (∀ a, WeightedEstimates.WeightedBound univ s (m+1) (A₀*(δ*τ)) (A.vectorPlaneRead k (Z a))) → + (∀ a v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m P₀ + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∀ (l : RealModes.QuadraticLabel ι) {n : ℕ} {P : Fin 3 → Fin n → JetPolynomial.Expression} + {G : JetPolynomial.Base → JetPolynomial.Space} {hG : ContDiff ℝ ∞ G} + (c : PolynomialSolveData P 0 G hG (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s) + (I : ℕ → ℝ), (∀ j, 1 ≤ I j) → + (∀ a j, 1 ≤ j → j ≤ a → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I a) → + c.norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m ≤ + δ^2 * (tensorChartBudget m (I m) (I (m+1)) * quadraticTargetBudget m D A₀ P₀) := by + obtain ⟨D,hD,hd⟩ := cutoff_square_complex_bound (A.supportedPlaneWeight k) m + exact ⟨D,hD,A.quadratic_solver_input_bound_of_cutoff_bound k m hD hd⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitSplitCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitSplitCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d18d587f622bbc60660c1636648b47c19d8dc4e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExplicitSplitCancellation.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSplitCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.MetricForcedFactorBudgets + +namespace OAI + +/-! The finite-chart correction retains explicit coordinate, splitting and +cardinality factors. These factors can be bounded before a fast scale is chosen. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + + def splitInputBudget (q m : ℕ) (I S : ℕ → ℝ) : ℝ := + let k := PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m + tensorChartBudget k (I k) (I (k+1))*S k + + def splitSizeBudget (q m : ℕ) (C J I S : ℕ → ℝ) : ℝ := + max 1 (metricForcedSizeBudget C J (fun _ => 1) q m)*splitInputBudget q m I S + + def splitResidualBudget (q m : ℕ) (C J I S : ℕ → ℝ) : ℝ := + max 1 (metricForcedResidualBudget C J (fun _ => 1) q m)*splitInputBudget q m I S + + theorem explicit_finite_split_cancellation {ι : Type*} [Fintype ι] + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (φ : JetPolynomial.Base → ℝ) (K : Compacts SmallModes.Base) + (L : ι → Compacts JetPolynomial.Base) + (T : (i : ι) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i))) + {τ : ℝ} {s : ℝ≥0} + (c : (i : ι) → PolynomialSolveData emptyMetricPolynomial 0 G hG φ (L i) τ s) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hLK : ∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) + (C J I S : ℕ → ℝ) (hI : ∀ m, 1 ≤ I m) (hS : ∀ m, 1 ≤ S m) + (hc : ∀ i, (c i).C = C ∧ (c i).D = (fun _ => 0) ∧ (c i).J = J) + (hi : ∀ i m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c i).e.target, + ‖iteratedFDerivWithin ℝ j (c i).e.symm (c i).e.target x‖ ≤ I m) + (hT : ∀ m i A, supportedWeightedSeminorm (modeSupport (L i)) s m (T i A) ≤ + S m * supportedWeightedSeminorm K s m A) + (hsum : ∀ A x, ∑ i, T i A x = A x) (q : ℕ) + (A : SupportedField (F := ComplexTensor) K) : + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m + ((Fintype.card ι : ℝ)*splitSizeBudget q m C J I S * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder + (P := emptyMetricPolynomial) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ/s)^(q+1)*(Fintype.card ι : ℝ)*splitResidualBudget q m C J I S * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder + (P := emptyMetricPolynomial) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + have hsmall : τ/s+(0:ℝ)/τ^tensorLoss emptyMetricPolynomial ≤ 1 := by + simpa only [zero_div,add_zero] using (div_le_one₀ hs).mpr hτs + obtain ⟨X,hX,hsp,hb,hr⟩ := finite_polynomial_cancellation emptyMetricPolynomial 0 hG + (fun _ : ι => φ) L c hτ hs hτs hs1 le_rfl hsmall (fun i => T i A) q + have hn (i : ι) (m : ℕ) : (c i).norm (T i A) m ≤ + (tensorChartBudget m (I m) (I (m+1))*S m)*supportedWeightedSeminorm K s m A := by + have hh := (c i).norm_le_of_weightedBound hs hs1 I hI (hi i) m + (mul_nonneg (zero_le_one.trans (hS m)) (apply_nonneg _ _)) (T i A) + ((weightedBound_of_supportedSeminorm s m (T i A)).mono_const (hT m i A)) + simpa only [mul_assoc] using hh + have hsize (i : ι) (m : ℕ) : (c i).size (T i A) q m ≤ + splitSizeBudget q m C J I S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A := by + rw [(c i).size_eq_factor] + calc + _ ≤ (c i).sizeFactor q m * (splitInputBudget q m I S * + supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) := + mul_le_mul_of_nonneg_left (hn i _) ((c i).sizeFactor_nonneg q m) + _ ≤ max 1 (metricForcedSizeBudget C J (fun _ => 1) q m) * + (splitInputBudget q m I S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) := by + have hf : (c i).sizeFactor q m ≤ + max 1 (metricForcedSizeBudget C J (fun _ => 1) q m) := by + rw [(c i).metric_sizeFactor_eq (fun r => congrFun (hc i).2.1 r), + (hc i).1,(hc i).2.2] + exact le_max_right _ _ + apply mul_le_mul_of_nonneg_right hf + exact mul_nonneg (mul_nonneg (tensorChartBudget_nonneg _ + (zero_le_one.trans (hI _)) (zero_le_one.trans (hI _))) + (zero_le_one.trans (hS _))) (apply_nonneg _ _) + _ = _ := by unfold splitSizeBudget; ring + have hres (i : ι) (m : ℕ) : (c i).residual (T i A) q m ≤ + (τ/s)^(q+1)*splitResidualBudget q m C J I S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A := by + rw [(c i).residual_eq_factor] + simp only [zero_div,add_zero] + calc + _ ≤ (τ/s)^(q+1)*(c i).residualFactor q m * (splitInputBudget q m I S * + supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) := + mul_le_mul_of_nonneg_left (hn i _) (mul_nonneg + (pow_nonneg (div_nonneg hτ.le hs.le) _) ((c i).residualFactor_nonneg q m)) + _ ≤ (τ/s)^(q+1)*max 1 (metricForcedResidualBudget C J (fun _ => 1) q m) * + (splitInputBudget q m I S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) := by + apply mul_le_mul_of_nonneg_right + · apply mul_le_mul_of_nonneg_left _ (pow_nonneg (div_nonneg hτ.le hs.le) _) + rw [(c i).metric_residualFactor_eq (fun r => congrFun (hc i).2.1 r), + (hc i).1,(hc i).2.2] + exact le_max_right _ _ + · exact mul_nonneg (mul_nonneg (tensorChartBudget_nonneg _ + (zero_le_one.trans (hI _)) (zero_le_one.trans (hI _))) + (zero_le_one.trans (hS _))) (apply_nonneg _ _) + _ = _ := by unfold splitResidualBudget; ring + have hdisp (x : SmallModes.Base) : + ∑ i, QuadraticMean.displacement τ (coordinatePhase φ) (T i A) x = + QuadraticMean.displacement τ (coordinatePhase φ) A x := by + simp only [QuadraticMean.displacement] + rw [← QuadraticMean.realMode_sum,hsum A x] + refine ⟨X,hX,?_,?_,?_⟩ + · intro x hx + obtain ⟨i,hi⟩ := mem_iUnion.mp (hsp hx) + exact hLK i hi + · intro m + apply (hb m).mono_const + calc + _ ≤ ∑ _i : ι, splitSizeBudget q m C J I S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A := + Finset.sum_le_sum (fun i _ => hsize i m) + _ = _ := by simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul]; ring + · intro m + have hsumres : (∑ i, (c i).residual (T i A) q m) ≤ + (τ/s)^(q+1)*(Fintype.card ι : ℝ)*splitResidualBudget q m C J I S * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder + (P := emptyMetricPolynomial) q m) A := by + calc + _ ≤ ∑ _i : ι, (τ/s)^(q+1)*splitResidualBudget q m C J I S * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder + (P := emptyMetricPolynomial) q m) A := + Finset.sum_le_sum (fun i _ => hres i m) + _ = _ := by simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul]; ring + simpa only [coordinateFullLinearized_unperturbed,hdisp,Pi.add_def] using + (hr m).mono_const hsumres + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d448f7b4f1444e3f09d0dc1d8460bf7bb7e26095 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorApproximation.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! The comparison map retained by the exact primitive theorem gives +actual exterior C2 proximity to the original immersion. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_read_C2_bound (j : A.centers) + (houter : ∀ x ∈ tsupport (A.weight j), A.outer j =ᶠ[𝓝 x] (fun _ => 1)) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G V W : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ContMDiff planeModel spaceModel ∞ W → + ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ p ∈ tsupport (A.weight j), V =ᶠ[𝓝 p] G → + ∀ m ≤ 2, + ‖iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead j (W-F)) + (planeCoordinateIsometry (chart (j : M) p))‖ ≤ D*(b+c) := by + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) j 2 + refine ⟨‖spaceCoordinates.toContinuousLinearMap‖*D, + mul_nonneg (norm_nonneg _) hD,?_⟩ + intro F G V W hF hG hV hW b c hb hc hGF hWV p hp he m hm + let H := (G-F)+(W-V) + have hH : ContMDiff planeModel spaceModel ∞ H := (hG.sub hF).add (hW.sub hV) + have hbound : A.WeightedBound 1 2 (b+c) H := by + intro i + change WeightedEstimates.WeightedBound univ 1 2 (b+c) + (localize (i : M) (A.weight i) ((G-F)+(W-V))) + rw [localize_add] + exact WeightedEstimates.WeightedBound.add uniqueDiffOn_univ zero_le_one + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (hG.sub hF)).contDiffOn + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (hW.sub hV)).contDiffOn + (hGF i) (hWV i) + have hread := hd H 1 (b+c) zero_lt_one le_rfl (add_nonneg hb hc) hH hbound + have hlinear := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth j hH).contDiffOn spaceCoordinates.toContinuousLinearMap + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead j H) at hlinear + have he' : W-F =ᶠ[𝓝 p] H := by + filter_upwards [he] with x hx + dsimp [H] + rw [hx] + abel + have hjet := (A.planeRead_eventuallyEq_on_weight he' j hp houter).iteratedFDeriv ℝ m + rw [hjet.eq_of_nhds] + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ,mul_assoc] using + hlinear m hm (planeCoordinateIsometry (chart (j : M) p)) (mem_univ _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorBoundaryPreservation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorBoundaryPreservation.lean new file mode 100644 index 0000000000000000000000000000000000000000..996a6534e36ba5c475074f72cc3bdb3629318aea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorBoundaryPreservation.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorJetNormalControl +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryJetCrossings + +namespace OAI + +/-! The actual exterior comparison retained by a primitive step preserves +all strict boundary data on compact curve portions and crossing sets. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame GeometryPreservation VelocityFrame +variable {M X : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [TopologicalSpace X] [CompactSpace X] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] [CompactSpace X] in +lemma continuous_planeChart_on_weight (i : A.centers) {p : X → M} (hp : Continuous p) + (hpi : ∀ x, p x ∈ tsupport (A.weight i)) : + Continuous (fun x => planeCoordinateIsometry (chart (i : M) (p x))) := + planeCoordinateIsometry.continuous.comp + ((chart (i : M)).continuousOn.comp_continuous hp (fun x => A.weight_support i (hpi x))) + +theorem compact_exterior_curve_preservation {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) {p : X → M} (hp : Continuous p) (hpi : ∀ x, p x ∈ tsupport (A.weight i)) + {v : X → SmallModes.Base} (hv : Continuous v) + (hB : ∀ x, realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ≠ 0) + (havoid : ∀ x, spaceCoordinates (n.vector (p x)) ≠ + -normalize (realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))))) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ x : X, V =ᶠ[𝓝 (p x)] G → + realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ≠ + -normalize (realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x)))) := by + have hread := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF) + obtain ⟨δ,hδ,hclose⟩ := compact_actual_exterior_avoidance hread + (A.continuous_planeChart_on_weight i hp hpi) + (spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp)) hv + (fun x => A.planeRead_gram_of_immersion hF hI houter i (hpi x)) hB havoid + obtain ⟨ρ,hρ,hcontrol⟩ := A.exterior_jet_normal_control hF hI n houter hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV x he + obtain ⟨hjet,_,hnorm⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV i (p x) (hpi x) he + exact hclose x _ (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hW)) _ hjet hnorm + +theorem compact_exterior_crossing_preservation {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) {p : X → M} (hp : Continuous p) (hpi : ∀ x, p x ∈ tsupport (A.weight i)) + {v w : X → SmallModes.Base} {κ : X → ℝ} (hv : Continuous v) (hw : Continuous w) (hκ : Continuous κ) + (hpositive : ∀ x, + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x)) ∧ + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (w x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x))) + (hcross : ∀ x, + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) (κ x) ∧ + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i F) (w x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) (κ x)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ x : X, V =ᶠ[𝓝 (p x)] G → + (0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ∧ + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (w x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x))) ∧ + (0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) (κ x) ∧ + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i W) (w x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) (κ x)) := by + have hread := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF) + have hcoord := A.continuous_planeChart_on_weight i hp hpi + have hn := spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp) + have hD := fun x => A.planeRead_gram_of_immersion hF hI houter i (hpi x) + obtain ⟨δv,hδv,hvclose⟩ := compact_actual_exterior_pairing hread hcoord hn hv hD + (fun x => (hpositive x).1) + obtain ⟨δw,hδw,hwclose⟩ := compact_actual_exterior_pairing hread hcoord hn hw hD + (fun x => (hpositive x).2) + have hB (a : X → SmallModes.Base) (h : ∀ x, 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) + (a x) (a x) (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x))) : + ∀ x, realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (a x) (a x) + (planeCoordinateIsometry (chart (i : M) (p x))) ≠ 0 := by + intro x he + have hx := h x + rw [he,zero_dotProduct] at hx + exact lt_irrefl 0 hx + obtain ⟨δc,hδc,hcclose⟩ := compact_actual_exterior_crossings hread hcoord hv hw hκ hD + (hB v (fun x => (hpositive x).1)) (hB w (fun x => (hpositive x).2)) hcross + let δ := min δv (min δw δc) + have hδ : 0 < δ := lt_min hδv (lt_min hδw hδc) + have hδv' : δ ≤ δv := min_le_left _ _ + have hδw' : δ ≤ δw := (min_le_right _ _).trans (min_le_left _ _) + have hδc' : δ ≤ δc := (min_le_right _ _).trans (min_le_right _ _) + obtain ⟨ρ,hρ,hcontrol⟩ := A.exterior_jet_normal_control hF hI n houter hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV x he + obtain ⟨hjet,_,hnorm⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV i (p x) (hpi x) he + have hW' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hW) + exact ⟨⟨hvclose x _ hW' _ (hjet.trans_le hδv') (hnorm.trans_le hδv'), + hwclose x _ hW' _ (hjet.trans_le hδw') (hnorm.trans_le hδw')⟩, + hcclose x _ hW' (hjet.trans_le hδc')⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3dedde6b7ef2494cd1778cc6514f62709a7521a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureBounds.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureJets +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! Extend the actual exterior C2 estimate through the boundary by continuity +of every coordinate jet. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_read_C2_bound_closure (j : A.centers) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G V W : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ContMDiff planeModel spaceModel ∞ W → + ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ q ∈ O, V =ᶠ[𝓝 q] G) → + ∀ p ∈ closure O, p ∈ tsupport (A.weight j) → + ∀ m ≤ 2, + ‖iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead j (W-F)) + (planeCoordinateIsometry (chart (j : M) p))‖ ≤ D*(b+c) := by + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) j 2 + refine ⟨‖spaceCoordinates.toContinuousLinearMap‖*D, + mul_nonneg (norm_nonneg _) hD,?_⟩ + intro F G V W hF hG hV hW b c hb hc hGF hWV O hext p hpO hp m hm + let H := (G-F)+(W-V) + have hH : ContMDiff planeModel spaceModel ∞ H := (hG.sub hF).add (hW.sub hV) + have hbound : A.WeightedBound 1 2 (b+c) H := by + intro i + change WeightedEstimates.WeightedBound univ 1 2 (b+c) + (localize (i : M) (A.weight i) ((G-F)+(W-V))) + rw [localize_add] + exact WeightedEstimates.WeightedBound.add uniqueDiffOn_univ zero_le_one + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (hG.sub hF)).contDiffOn + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (hW.sub hV)).contDiffOn + (hGF i) (hWV i) + have hread := hd H 1 (b+c) zero_lt_one le_rfl (add_nonneg hb hc) hH hbound + have hlinear := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth j hH).contDiffOn spaceCoordinates.toContinuousLinearMap + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead j H) at hlinear + have he' : ∀ q ∈ O, W-F =ᶠ[𝓝 q] H := by + intro q hq + filter_upwards [hext q hq] with x hx + dsimp [H] + rw [hx] + abel + have hjet := A.planeRead_jets_eq_on_exterior_closure (hW.sub hF) hH he' j m + p hpO (A.weight_support j hp) + change iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead j (W-F)) + (planeCoordinateIsometry (chart (j : M) p)) = _ at hjet + rw [hjet] + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ,mul_assoc] using + hlinear m hm (planeCoordinateIsometry (chart (j : M) p)) (mem_univ _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..489bebd3cfd984b292560f3ea555c2ab60430833 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureControl.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureNormal +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal +import OAI.Geometry.SurfaceImmersion.Primitive.ExteriorProfileBounds + +namespace OAI + +/-! A single smallness threshold controls the exterior second jet and +preferred normal together, uniformly over the fixed finite atlas. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_jet_normal_control_closure {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {ε : ℝ} (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ q ∈ O, V =ᶠ[𝓝 q] G) → + ∀ i : A.centers, ∀ p ∈ closure O, p ∈ tsupport (A.weight i) → + ‖realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead i W) 1 + (planeCoordinateIsometry (chart (i : M) p))- + realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead i F) 1 + (planeCoordinateIsometry (chart (i : M) p))‖ < ε ∧ + A.projectedNormalField W n.vector p ≠ 0 ∧ + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector p)-spaceCoordinates (n.vector p)‖ < ε := by + classical + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + have hLp : 0 < L+1 := by positivity + obtain ⟨r,hr,hnclose⟩ := A.exterior_projected_normal_close_closure hF n.smooth n.unit n.normal + (fun i p hp => A.planeRead_gram_of_immersion hF hI houter i hp) + (div_pos hε hLp) + choose D hD hprofile using fun i => A.exterior_profile_bound_closure i + obtain ⟨s,hs,_,hsi⟩ := finite_positive_threshold (fun i => ε/(D i+1)) + (fun i => div_pos hε (by have := hD i; positivity)) + refine ⟨min r s,lt_min hr hs,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O hext i p hpO hp + obtain ⟨hne,hnorm⟩ := hnclose G V W hG hV hW b c hb hc + (hbc.trans_le (min_le_left _ _)) hGF hWV O hext p hpO + have hprof := hprofile i F G V W hF hG hV hW b c hb hc hGF hWV O hext p hpO hp + have hsmall : D i*(b+c) < ε := by + have ht := (lt_div_iff₀ (by have := hD i; positivity : 0 < D i+1)).mp + ((hbc.trans_le (min_le_right _ _)).trans_le (hsi i)) + nlinarith + refine ⟨hprof.trans_lt hsmall,hne,?_⟩ + rw [← map_sub] + calc + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector p-n.vector p)‖ ≤ + L*‖A.unitProjectedNormalField W n.vector p-n.vector p‖ := + spaceCoordinates.toContinuousLinearMap.le_opNorm _ + _ ≤ (L+1)*‖A.unitProjectedNormalField W n.vector p-n.vector p‖ := + mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) + _ < (L+1)*(ε/(L+1)) := mul_lt_mul_of_pos_left hnorm hLp + _ = ε := mul_div_cancel₀ _ hLp.ne' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..c323e8a65c47ac3bbc5efc29f7fc3b6b2f8028d7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureJets.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorApproximation + +namespace OAI + +/-! Smooth comparison maps agreeing on an open exterior have equal jets +at its boundary. This retains the disk boundary in exterior C2 estimates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma planeRead_eventuallyEq_at_source {F G : M → Space} {p : M} + (hFG : F =ᶠ[𝓝 p] G) (i : A.centers) (hp : p ∈ (chart (i : M)).source) : + (spaceCoordinates ∘ A.vectorPlaneRead i F) =ᶠ[ + 𝓝 (planeCoordinateIsometry (chart (i : M) p))] + (spaceCoordinates ∘ A.vectorPlaneRead i G) := by + have ht : Tendsto (fun x : SmallModes.Base => (chart (i : M)).symm (planeCoordinateIsometry.symm x)) + (𝓝 (planeCoordinateIsometry (chart (i : M) p))) (𝓝 p) := by + have hc : Tendsto (chart (i : M)).symm (𝓝 (chart (i : M) p)) (𝓝 p) := by + simpa only [(chart (i : M)).left_inv hp] using + ((chart (i : M)).continuousAt_symm ((chart (i : M)).map_source hp)).tendsto + have hi : Tendsto planeCoordinateIsometry.symm + (𝓝 (planeCoordinateIsometry (chart (i : M) p))) (𝓝 (chart (i : M) p)) := by + simpa only [LinearIsometryEquiv.symm_apply_apply] using + (planeCoordinateIsometry.symm.continuousAt (x := planeCoordinateIsometry (chart (i : M) p))).tendsto + exact hc.comp hi + filter_upwards [hFG.comp_tendsto ht] with x hx + change spaceCoordinates (localize (i : M) (A.outer i) F (planeCoordinateIsometry.symm x)) = + spaceCoordinates (localize (i : M) (A.outer i) G (planeCoordinateIsometry.symm x)) + unfold localize + by_cases hxT : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target + · simp only [indicator_of_mem hxT] + change F ((chart (i : M)).symm (planeCoordinateIsometry.symm x)) = + G ((chart (i : M)).symm (planeCoordinateIsometry.symm x)) at hx + rw [hx] + · simp only [indicator_of_notMem hxT] + +lemma planeRead_jets_eq_on_exterior_closure {F G : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) + {O : Set M} (hext : ∀ p ∈ O, F =ᶠ[𝓝 p] G) + (i : A.centers) (m : ℕ) : + ∀ p ∈ closure O, p ∈ (chart (i : M)).source → + iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)) = + iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p)) := by + let U := (chart (i : M)).source + have hU : IsOpen U := (chart (i : M)).open_source + let a := fun p => iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)) + let b := fun p => iteratedFDeriv ℝ m (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p)) + have hca : ContinuousOn a U := + ((spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).continuous_iteratedFDeriv + (by simp)).comp_continuousOn (planeCoordinateIsometry.continuous.comp_continuousOn (chart (i : M)).continuousOn) + have hcb : ContinuousOn b U := + ((spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)).continuous_iteratedFDeriv + (by simp)).comp_continuousOn (planeCoordinateIsometry.continuous.comp_continuousOn (chart (i : M)).continuousOn) + have he : EqOn a b (O ∩ U) := by + intro p hp + exact ((A.planeRead_eventuallyEq_at_source (hext p hp.1) i hp.2).iteratedFDeriv ℝ m).eq_of_nhds + have hclosed := he.of_subset_closure (hca.mono inter_subset_right) (hcb.mono inter_subset_right) + (fun p hp => ⟨subset_closure hp.1,hp.2⟩) hU.closure_inter + exact fun p hp hpU => hclosed ⟨hp,hpU⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0b703abf716e7090a3cfcb1d0b76aadc5cdaa17 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorClosureNormal.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExteriorClosureProfiles +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasProjectionStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorApproximation + +namespace OAI + +/-! The retained slow baseline and C2 correction control the actual +normalized exterior normal, uniformly over every atlas chart. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_projected_normal_close_closure {F n : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hn : ContMDiff planeModel spaceModel ∞ n) + (hunit : ∀ p, ‖n p‖ = 1) + (hN : ∀ p v, inner ℝ (surfaceDifferential F p v) (n p) = 0) + (hD : ∀ i p, p ∈ tsupport (A.weight i) → + gramDet (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) ≠ 0) + {ε : ℝ} (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ q ∈ O, V =ᶠ[𝓝 q] G) → + ∀ p ∈ closure O, + A.projectedNormalField W n p ≠ 0 ∧ ‖A.unitProjectedNormalField W n p-n p‖ < ε := by + classical + obtain ⟨δ,hδ,hnear⟩ := A.compact_atlas_projection_stability hF hn hunit hN hD hε + choose D hD0 hbound using fun i => A.exterior_read_C2_bound_closure i + obtain ⟨ρ,hρ,_,hle⟩ := finite_positive_threshold (fun i => δ/(D i+1)) + (fun i => div_pos hδ (by have := hD0 i; positivity)) + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O hext p hpO + apply hnear W p + intro i hi v hv + have hp := subset_tsupport (A.weight i) hi + have hd := hbound i F G V W hF hG hV hW b c hb hc hGF hWV O hext p hpO hp 1 (by omega) + rw [norm_iteratedFDeriv_one] at hd + have hs : D i*(b+c) < δ := by + have ht := (lt_div_iff₀ (by have := hD0 i; positivity : 0 < D i+1)).mp + (hbc.trans_le (hle i)) + nlinarith + have hnV : ‖v‖ ≤ 1 := by + rcases hv with rfl | hv + · simp [dx] + · have hv' : v = dy := by simpa only [mem_singleton_iff] using hv + subst v + simp [dy] + have hre : spaceCoordinates ∘ A.vectorPlaneRead i (W-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i W)-(spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext y + exact map_sub spaceCoordinates _ _ + rw [hre,fderiv_sub + (spaceCoordinates.differentiableAt.comp _ ((A.vectorPlaneRead_smooth i hW).differentiable (by simp) _)) + (spaceCoordinates.differentiableAt.comp _ ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _))] at hd + change ‖((fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i W) _)- + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) _)) v‖ < δ + exact ((ContinuousLinearMap.le_opNorm _ _).trans + ((mul_le_mul_of_nonneg_left hnV (norm_nonneg _)).trans (by simpa only [mul_one] using hd))).trans_lt hs + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorIntrinsicPreservation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorIntrinsicPreservation.lean new file mode 100644 index 0000000000000000000000000000000000000000..82bbb660b9a90aed454a11645618a9ab30e77df9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorIntrinsicPreservation.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorBoundaryPreservation +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureControl +import OAI.Geometry.SurfaceImmersion.Primitive.IntrinsicExteriorCrossings +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryJetCrossings + +namespace OAI + +/-! The actual exterior comparison retained by a primitive step preserves +all strict boundary data on compact curve portions and crossing sets. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame GeometryPreservation VelocityFrame +variable {M X : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [TopologicalSpace X] [CompactSpace X] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_exterior_intrinsic_crossing_preservation {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) {p : X → M} (hp : Continuous p) (hpi : ∀ x, p x ∈ tsupport (A.weight i)) + {v w : X → SmallModes.Base} (hv : Continuous v) (hw : Continuous w) + (hpositive : ∀ x, + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x)) ∧ + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (w x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x))) + (hcross : ∀ x, + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i F) (v x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) (coordinateGaussianCurvature (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dx dx) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dx dy) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dy dy) + (planeCoordinateIsometry (chart (i : M) (p x)))) ∧ + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i F) (w x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) (coordinateGaussianCurvature (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dx dx) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dx dy) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i F) dy dy) + (planeCoordinateIsometry (chart (i : M) (p x))))) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ q ∈ O, V =ᶠ[𝓝 q] G) → + ∀ x : X, p x ∈ closure O → + (0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ∧ + 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i W) (w x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x))) ∧ + (0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i W) (v x) (w x) + (planeCoordinateIsometry (chart (i : M) (p x))) (coordinateGaussianCurvature (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dx dx) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dx dy) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dy dy) + (planeCoordinateIsometry (chart (i : M) (p x)))) ∧ + 0 < orderedCrossing (spaceCoordinates ∘ A.vectorPlaneRead i W) (w x) (v x) + (planeCoordinateIsometry (chart (i : M) (p x))) (coordinateGaussianCurvature (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dx dx) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dx dy) + (realMetric (spaceCoordinates ∘ A.vectorPlaneRead i W) dy dy) + (planeCoordinateIsometry (chart (i : M) (p x))))) := by + have hread := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF) + have hcoord := A.continuous_planeChart_on_weight i hp hpi + have hn := spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp) + have hD := fun x => A.planeRead_gram_of_immersion hF hI houter i (hpi x) + obtain ⟨δv,hδv,hvclose⟩ := compact_actual_exterior_pairing hread hcoord hn hv hD + (fun x => (hpositive x).1) + obtain ⟨δw,hδw,hwclose⟩ := compact_actual_exterior_pairing hread hcoord hn hw hD + (fun x => (hpositive x).2) + have hB (a : X → SmallModes.Base) (h : ∀ x, 0 < realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) + (a x) (a x) (planeCoordinateIsometry (chart (i : M) (p x))) ⬝ᵥ spaceCoordinates (n.vector (p x))) : + ∀ x, realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) (a x) (a x) + (planeCoordinateIsometry (chart (i : M) (p x))) ≠ 0 := by + intro x he + have hx := h x + rw [he,zero_dotProduct] at hx + exact lt_irrefl 0 hx + obtain ⟨δc,hδc,hcclose⟩ := compact_actual_intrinsic_crossings hread hcoord hv hw hD + (hB v (fun x => (hpositive x).1)) (hB w (fun x => (hpositive x).2)) hcross + let δ := min δv (min δw δc) + have hδ : 0 < δ := lt_min hδv (lt_min hδw hδc) + have hδv' : δ ≤ δv := min_le_left _ _ + have hδw' : δ ≤ δw := (min_le_right _ _).trans (min_le_left _ _) + have hδc' : δ ≤ δc := (min_le_right _ _).trans (min_le_right _ _) + obtain ⟨ρ,hρ,hcontrol⟩ := A.exterior_jet_normal_control_closure hF hI n houter hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O hext x hxO + obtain ⟨hjet,_,hnorm⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV O hext i (p x) hxO (hpi x) + have hW' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hW) + exact ⟨⟨hvclose x _ hW' _ (hjet.trans_le hδv') (hnorm.trans_le hδv'), + hwclose x _ hW' _ (hjet.trans_le hδw') (hnorm.trans_le hδw')⟩, + hcclose x _ hW' (hjet.trans_le hδc')⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorJetNormalControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorJetNormalControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec2ee50ec98315552947b4cea704f8db43a1ff2e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorJetNormalControl.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal +import OAI.Geometry.SurfaceImmersion.Primitive.ExteriorProfileBounds + +namespace OAI + +/-! A single smallness threshold controls the exterior second jet and +preferred normal together, uniformly over the fixed finite atlas. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_jet_normal_control {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {ε : ℝ} (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ i : A.centers, ∀ p ∈ tsupport (A.weight i), V =ᶠ[𝓝 p] G → + ‖realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead i W) 1 + (planeCoordinateIsometry (chart (i : M) p))- + realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead i F) 1 + (planeCoordinateIsometry (chart (i : M) p))‖ < ε ∧ + A.projectedNormalField W n.vector p ≠ 0 ∧ + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector p)-spaceCoordinates (n.vector p)‖ < ε := by + classical + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + have hLp : 0 < L+1 := by positivity + obtain ⟨r,hr,hnclose⟩ := A.exterior_projected_normal_close hF n.smooth n.unit n.normal + (fun i p hp => A.planeRead_gram_of_immersion hF hI houter i hp) houter + (div_pos hε hLp) + choose D hD hprofile using fun i => A.exterior_profile_bound i (houter i) + obtain ⟨s,hs,_,hsi⟩ := finite_positive_threshold (fun i => ε/(D i+1)) + (fun i => div_pos hε (by have := hD i; positivity)) + refine ⟨min r s,lt_min hr hs,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV i p hp he + obtain ⟨hne,hnorm⟩ := hnclose G V W hG hV hW b c hb hc + (hbc.trans_le (min_le_left _ _)) hGF hWV p he + have hprof := hprofile i F G V W hF hG hV hW b c hb hc hGF hWV p hp he + have hsmall : D i*(b+c) < ε := by + have ht := (lt_div_iff₀ (by have := hD i; positivity : 0 < D i+1)).mp + ((hbc.trans_le (min_le_right _ _)).trans_le (hsi i)) + nlinarith + refine ⟨hprof.trans_lt hsmall,hne,?_⟩ + rw [← map_sub] + calc + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector p-n.vector p)‖ ≤ + L*‖A.unitProjectedNormalField W n.vector p-n.vector p‖ := + spaceCoordinates.toContinuousLinearMap.le_opNorm _ + _ ≤ (L+1)*‖A.unitProjectedNormalField W n.vector p-n.vector p‖ := + mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) + _ < (L+1)*(ε/(L+1)) := mul_lt_mul_of_pos_left hnorm hLp + _ = ε := mul_div_cancel₀ _ hLp.ne' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorNormalProjection.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorNormalProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..6eae057d40515d9c76aead399a07905f72f6b50a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorNormalProjection.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileNormal + +namespace OAI + +/-! Project the old unit normal into a nearby tangent plane's orthogonal +complement. Compactness gives nonvanishing and uniform closeness to the old normal. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame RealModes VelocityFrame + +lemma compact_exterior_normal_projection {X : Type*} [TopologicalSpace X] [CompactSpace X] + {A B n : X → Vec} (hA : Continuous A) (hB : Continuous B) (hn : Continuous n) + (hD : ∀ x, gramDet (A x) (B x) ≠ 0) + (hunit : ∀ x, n x ⬝ᵥ n x = 1) + (hAn : ∀ x, A x ⬝ᵥ n x = 0) (hBn : ∀ x, B x ⬝ᵥ n x = 0) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x, ∀ A' B' : Vec, + ‖A'-A x‖ < δ → ‖B'-B x‖ < δ → + gramDet A' B' ≠ 0 ∧ realNormalPart A' B' (n x) ≠ 0 ∧ + ‖normalize (realNormalPart A' B' (n x))-n x‖ < ε := by + let J : X → BoundaryProfile := fun x => ![A x,B x,n x,0,0] + have hJ : Continuous J := by + apply continuous_pi + intro i + fin_cases i + · exact hA + · exact hB + · exact hn + · exact continuous_const + · exact continuous_const + have hnormal (x : X) : profileNormalPart (J x) = n x := + realNormalPart_of_perp _ _ _ (hAn x) (hBn x) + have hreg (x : X) : J x ∈ regularBoundaryProfiles := by + refine ⟨hD x,?_⟩ + rw [hnormal] + intro hz + have hh := hunit x + norm_num [hz] at hh + have hpref (x : X) : profilePreferred (J x) = n x := by + change normalize (profileNormalPart (J x)) = n x + rw [hnormal,normalize_of_unit (hunit x)] + obtain ⟨δ,hδ,hclose⟩ := compact_boundary_profile_stability (isCompact_range hJ) + (by rintro _ ⟨x,rfl⟩; exact hreg x) ε hε + refine ⟨δ,hδ,?_⟩ + intro x A' B' hA' hB' + let H : BoundaryProfile := ![A',B',n x,0,0] + have herr : ‖H-J x‖ < δ := by + have hbnd : ‖H-J x‖ ≤ max ‖A'-A x‖ ‖B'-B x‖ := by + apply (pi_norm_le_iff_of_nonneg (le_trans (norm_nonneg _) (le_max_left _ _))).mpr + intro i + fin_cases i + · exact le_max_left _ _ + · exact le_max_right _ _ + · simp [H,J] + · simp [H,J] + · simp [H,J] + exact hbnd.trans_lt (max_lt hA' hB') + obtain ⟨hregular,hnear⟩ := hclose (J x) (mem_range_self x) H herr + have hnnear : ‖profilePreferred H-profilePreferred (J x)‖ < ε := by + exact ((norm_fst_le (profileGeometry H-profileGeometry (J x)).1).trans + (norm_fst_le (profileGeometry H-profileGeometry (J x)))).trans_lt hnear + rw [hpref] at hnnear + exact ⟨hregular.1,hregular.2,hnnear⟩ + +lemma normalized_projection_smoothOn {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {U : Set E} (hU : IsOpen U) {A B n : E → Vec} + (hA : ContDiffOn ℝ ∞ A U) (hB : ContDiffOn ℝ ∞ B U) (hn : ContDiffOn ℝ ∞ n U) + (hD : ∀ x ∈ U, gramDet (A x) (B x) ≠ 0) + (hp : ∀ x ∈ U, realNormalPart (A x) (B x) (n x) ≠ 0) : + ContDiffOn ℝ ∞ (fun x => normalize (realNormalPart (A x) (B x) (n x))) U := by + intro x hx + exact (normalize_smoothAt + (contDiffAt_realNormalPart (hA.contDiffAt (hU.mem_nhds hx)) + (hB.contDiffAt (hU.mem_nhds hx)) (hn.contDiffAt (hU.mem_nhds hx)) (hD x hx)) + (hp x hx)).contDiffWithinAt + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorProjectedNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorProjectedNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..003b2d25c3e74c300d786d28f0f1c5b219ad2af6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ExteriorProjectedNormal.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasProjectionStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorApproximation + +namespace OAI + +/-! The retained slow baseline and C2 correction control the actual +normalized exterior normal, uniformly over every atlas chart. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_projected_normal_close {F n : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hn : ContMDiff planeModel spaceModel ∞ n) + (hunit : ∀ p, ‖n p‖ = 1) + (hN : ∀ p v, inner ℝ (surfaceDifferential F p v) (n p) = 0) + (hD : ∀ i p, p ∈ tsupport (A.weight i) → + gramDet (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) ≠ 0) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {ε : ℝ} (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ p, V =ᶠ[𝓝 p] G → + A.projectedNormalField W n p ≠ 0 ∧ ‖A.unitProjectedNormalField W n p-n p‖ < ε := by + classical + obtain ⟨δ,hδ,hnear⟩ := A.compact_atlas_projection_stability hF hn hunit hN hD hε + choose D hD0 hbound using fun i => A.exterior_read_C2_bound i (houter i) + obtain ⟨ρ,hρ,_,hle⟩ := finite_positive_threshold (fun i => δ/(D i+1)) + (fun i => div_pos hδ (by have := hD0 i; positivity)) + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV p he + apply hnear W p + intro i hi v hv + have hp := subset_tsupport (A.weight i) hi + have hd := hbound i F G V W hF hG hV hW b c hb hc hGF hWV p hp he 1 (by omega) + rw [norm_iteratedFDeriv_one] at hd + have hs : D i*(b+c) < δ := by + have ht := (lt_div_iff₀ (by have := hD0 i; positivity : 0 < D i+1)).mp + (hbc.trans_le (hle i)) + nlinarith + have hnV : ‖v‖ ≤ 1 := by + rcases hv with rfl | hv + · simp [dx] + · have hv' : v = dy := by simpa only [mem_singleton_iff] using hv + subst v + simp [dy] + have hre : spaceCoordinates ∘ A.vectorPlaneRead i (W-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i W)-(spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext y + exact map_sub spaceCoordinates _ _ + rw [hre,fderiv_sub + (spaceCoordinates.differentiableAt.comp _ ((A.vectorPlaneRead_smooth i hW).differentiable (by simp) _)) + (spaceCoordinates.differentiableAt.comp _ ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _))] at hd + change ‖((fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i W) _)- + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) _)) v‖ < δ + exact ((ContinuousLinearMap.le_opNorm _ _).trans + ((mul_le_mul_of_nonneg_left hnV (norm_nonneg _)).trans (by simpa only [mul_one] using hd))).trans_lt hs + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..37cbb965e212d09af19aa2eb87649e13556d24df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryGeometry.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCurvePairGeometry + +namespace OAI + +/-! The finite boundary invariant retained by successive primitive corrections. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SmallModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {B : SmoothingAtlas M} {ι : Type*} + +structure FiniteBoundaryGeometry (curves : ι → PhaseBoundaryCurve B) (E : Set M) + (F : M → Space) (n : PreferredNormal F) : Prop where + nonzero : ∀ j p, p ∈ (curves j).carrier → (curves j).second F p ≠ 0 + avoids : ∀ j p, p ∈ (curves j).carrier → + spaceCoordinates (n.vector p) ≠ -normalize ((curves j).second F p) + positive : ∀ j k, j ≠ k → ∀ p ∈ E, p ∈ (curves j).carrier → p ∈ (curves k).carrier → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) + crossing : ∀ j k, j ≠ k → ∀ p ∈ E, p ∈ (curves j).carrier → p ∈ (curves k).carrier → + 0 < (curves j).crossing (curves k) F p + +namespace FiniteBoundaryGeometry + +lemma restrict {curves : ι → PhaseBoundaryCurve B} {E : Set M} + {F : M → Space} {n : PreferredNormal F} (h : FiniteBoundaryGeometry curves E F n) + {κ : Type*} (f : κ → ι) (hf : Function.Injective f) {E' : Set M} (hE : E' ⊆ E) : + FiniteBoundaryGeometry (curves ∘ f) E' F n where + nonzero j p hp := h.nonzero (f j) p hp + avoids j p hp := h.avoids (f j) p hp + positive j k hjk p hp hj hk := h.positive (f j) (f k) (fun he => hjk (hf he)) p (hE hp) hj hk + crossing j k hjk p hp hj hk := h.crossing (f j) (f k) (fun he => hjk (hf he)) p (hE hp) hj hk + +lemma pair_conditions {curves : ι → PhaseBoundaryCurve B} {E : Set M} + {F : M → Space} {n : PreferredNormal F} (h : FiniteBoundaryGeometry curves E F n) + {j k : ι} (hjk : j ≠ k) {p : M} (hp : p ∈ E) + (hj : p ∈ (curves j).carrier) (hk : p ∈ (curves k).carrier) : + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < (curves k).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < (curves j).crossing (curves k) F p ∧ + 0 < (curves k).crossing (curves j) F p := + ⟨h.positive j k hjk p hp hj hk,h.positive k j hjk.symm p hp hk hj, + h.crossing j k hjk p hp hj hk,h.crossing k j hjk.symm p hp hk hj⟩ + +end FiniteBoundaryGeometry +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryLocalDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryLocalDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..4dd1cf9fb18b55eb1434e190000e35fa5191a053 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryLocalDefiners.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCurveLocalDefiners + +namespace OAI + +/-! Finite closed boundary families can be isolated locally after any +continuous parametrization; no global extension of their coordinate maps +is needed. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +lemma finite_boundary_local_definers {ι X : Type*} [Fintype ι] [TopologicalSpace X] + (C : ι → Set X) (hC : ∀ i, IsClosed (C i)) (f : Base → X) + {K P : Set Base} (hf : ∀ p ∈ K, ContinuousAt f p) + (hcover : ∀ p ∈ K, ∃ i, f p ∈ C i) + (hcross : ∀ i j, i ≠ j → ∀ p ∈ K, f p ∈ C i → f p ∈ C j → p ∈ P) + (hlocal : ∀ i p, p ∈ K \ P → f p ∈ C i → + ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ ∃ g : Base → ℝ, + ContDiffOn ℝ ∞ g N ∧ (∀ x ∈ N, f x ∈ C i → g x = 0) ∧ + fderiv ℝ g p dy ≠ 0) : + ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ g : Base → ℝ, ContDiffOn ℝ ∞ g N ∧ (∀ x ∈ K ∩ N, g x = 0) ∧ + fderiv ℝ g p dy ≠ 0 := by + classical + intro p hp + obtain ⟨i,hi⟩ := hcover p hp.1 + obtain ⟨N,hN,hpN,g,hg,hzero,hderiv⟩ := hlocal i p hp hi + have hav : ∀ᶠ x in 𝓝 p, ∀ j, j ≠ i → f x ∉ C j := by + apply Filter.eventually_all.mpr + intro j + by_cases hji : j = i + · exact Filter.Eventually.of_forall (fun _ h => (h hji).elim) + · have hj : f p ∉ C j := fun hj => hp.2 (hcross i j (Ne.symm hji) p hp.1 hi hj) + filter_upwards [(hf p hp.1).eventually ((hC j).isOpen_compl.mem_nhds hj)] with x hx _ + exact hx + obtain ⟨W,hWsub,hW,hpW⟩ := mem_nhds_iff.mp hav + refine ⟨N ∩ W,hN.inter hW,⟨hpN,hpW⟩,g,hg.mono inter_subset_left,?_,hderiv⟩ + intro x hx + obtain ⟨j,hj⟩ := hcover x hx.1 + have hji : j = i := by + by_contra h + exact hWsub hx.2.2 j h hj + exact hzero x hx.2.1 (by simpa only [hji] using hj) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryRemoval.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryRemoval.lean new file mode 100644 index 0000000000000000000000000000000000000000..710481abfd561a924fb63d0bdd34b192c9d1d6b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryRemoval.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryStepGeometry + +namespace OAI + +/-! Removing the primitive's own boundary from the finite invariant. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {B : SmoothingAtlas M} {ι : Type*} + +omit [CompactSpace M] in +lemma removed_boundary_crossings_subset (curves : ι → PhaseBoundaryCurve B) (a : ι) : + boundaryCrossingSet (fun j : {j : ι // j ≠ a} => curves j) univ ⊆ + boundaryCrossingSet curves univ := by + rintro p ⟨j,_,k,_,hjk,hj,hk⟩ + exact ⟨j,mem_univ _,k,mem_univ _,fun h => hjk (Subtype.ext h),hj,hk⟩ + +omit [CompactSpace M] in +lemma removed_boundary_crossings_disjoint (curves : ι → PhaseBoundaryCurve B) (a : ι) + (htriple : ∀ j k l, j ≠ k → j ≠ l → k ≠ l → + (curves j).carrier ∩ (curves k).carrier ∩ (curves l).carrier = ∅) : + Disjoint (boundaryCrossingSet (fun j : {j : ι // j ≠ a} => curves j) univ) + (curves a).carrier := by + apply Set.disjoint_left.mpr + rintro p ⟨j,_,k,_,hjk,hj,hk⟩ ha + have hx : p ∈ (curves j).carrier ∩ (curves k).carrier ∩ (curves a).carrier := ⟨⟨hj,hk⟩,ha⟩ + rw [htriple j k a (fun h => hjk (Subtype.ext h)) j.2 k.2] at hx + exact hx.elim + +namespace FiniteBoundaryGeometry + +lemma remove {curves : ι → PhaseBoundaryCurve B} {F : M → Space} {n : PreferredNormal F} + (h : FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) F n) (a : ι) : + FiniteBoundaryGeometry (fun j : {j : ι // j ≠ a} => curves j) + (boundaryCrossingSet (fun j : {j : ι // j ≠ a} => curves j) univ) F n := + h.restrict Subtype.val Subtype.val_injective (removed_boundary_crossings_subset curves a) + +lemma remove_frontier {curves : ι → PhaseBoundaryCurve B} {F : M → Space} {n : PreferredNormal F} + (h : FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) F n) (a : ι) : + ∀ (j : {j : ι // j ≠ a}) p, p ∈ (curves j).carrier ∩ (curves a).carrier → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < (curves a).crossing (curves j) F p := by + intro j p hp + have hE := boundaryCrossingSet_pair curves (mem_univ j.val) (mem_univ a) j.2 hp.1 hp.2 + exact ⟨h.positive j a j.2 p hE hp.1 hp.2,h.crossing a j j.2.symm p hE hp.2 hp.1⟩ + +end FiniteBoundaryGeometry +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4a2a2b0a66b2b1d1a7409bad4db3b317ae594fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStartingFamily.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedBoundaryStartingFamily +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSphericalGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePreparedCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorMetric +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! Uniform spherical starting immersions carrying all actual finite +boundary invariants. The scale and estimates precede the crossing set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) {ι : Type*} (curves : ι → PhaseBoundaryCurve B) + +theorem finite_boundary_starting_family (g : SmoothMetric M) {I : M → Space} + (hI : ContMDiff planeModel spaceModel ∞ I) (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) + {η : ℝ} (hη : 0 < η) : + ∃ r D c : ℝ, 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + ∀ (E : Finset M) (ε : ℝ), 0 < ε → + ∃ (G : M → Space) (g₀ : SmoothMetric M) (n : PreferredNormal (r • G)), + ContMDiff planeModel spaceModel ∞ G ∧ (∀ p, ‖G p‖ = 1) ∧ + IsSmoothIsometricImmersion M g₀ (r • G) ∧ + g₀.inner = inducedTensor (r • G) ∧ Nonempty (MetricGoodPhaseData g₀ (r • G)) ∧ + n.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • G)) ∧ + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + FiniteBoundaryGeometry curves (E : Set M) (r • G) n := by + obtain ⟨r,D,c,hr,hr1,hD,hc,hprep⟩ := A.small_metric_boundary_family g hI hunit hImm hη + refine ⟨r,D,c,hr,hr1,hD,hc,?_⟩ + intro E ε hε + obtain ⟨G,n,hG,hu,hGI,hn,hclose,hbound,hlower,hmetric,hshort,hbase,hcross⟩ := hprep E ε hε + have hs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + let g₀ := A.immersionMetric hs hGI + have hF : IsSmoothIsometricImmersion M g₀ (r • G) := ⟨hs,fun _ _ _ => rfl⟩ + have hdata : Nonempty (MetricGoodPhaseData g₀ (r • G)) := + MetricGoodPhaseData.nonempty g₀ hs hGI (fun p => ⟨dy,dy, + (hbase p dy (by simp [dy])).2.1⟩) + refine ⟨G,g₀,n,hG,hu,hF,rfl,hdata,hn,hclose,hbound,hlower,hmetric,hshort,?_⟩ + refine ⟨?_,?_,?_,?_⟩ + · intro j p hp + exact ((curves j).spherical_second_positive hr hu hF hp).2.1 + · intro j p hp + rw [hn] + exact ((curves j).spherical_second_positive hr hu hF hp).2.2 + · intro j k _ p _ hp _ + rw [hn] + exact ((curves j).spherical_second_positive hr hu hF hp).1 + · intro j k _ p hp hj hk + apply (curves j).crossing_pos_of_coordinate_crossings (curves k) hF hj hk + have hsource : p ∈ (coordinateChart ((curves j).index : M)).source := by + rw [coordinateChart_source,← chart_source] + exact ((curves j).source hj).1 + exact ((hcross ⟨p,hp⟩).2 ((curves j).index : M) hsource).2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStepGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStepGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd1978c2c6ae51dd48ea32579620b4b1cea48b07 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteBoundaryStepGeometry.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteBoundaryCrossingSets + +namespace OAI + +/-! The finite invariant supplies precisely the old boundary inequalities +and the crossing set disjointness required at the next primitive step. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + +lemma finite_boundary_step_geometry (curves : ι → PhaseBoundaryCurve B) + {s : Set ι} {a : ι} (ha : a ∉ s) + (hpair : ∀ i j, i ≠ j → ((curves i).carrier ∩ (curves j).carrier).Finite) + (htriple : ∀ i j k, i ≠ j → i ≠ k → j ≠ k → + (curves i).carrier ∩ (curves j).carrier ∩ (curves k).carrier = ∅) + {F : M → Space} {n : PreferredNormal F} + (h : FiniteBoundaryGeometry curves (boundaryCrossingSet curves (insert a s)) F n) : + (boundaryCrossingSet curves s).Finite ∧ + Disjoint (boundaryCrossingSet curves s) (curves a).carrier ∧ + (∀ p ∈ (curves a).carrier, + realSecondForm (B.phaseRealChartMap (curves a).index (curves a).phase.symm F) + dy dy ((curves a).coordinate p) ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize + (realSecondForm (B.phaseRealChartMap (curves a).index (curves a).phase.symm F) + dy dy ((curves a).coordinate p))) ∧ + ∀ j ∈ s, ∀ p ∈ (curves j).carrier ∩ (curves a).carrier, + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < (curves a).crossing (curves j) F p ∧ 0 < (curves j).crossing (curves a) F p := by + refine ⟨boundaryCrossingSet_finite curves s hpair, + boundaryCrossingSet_disjoint_next curves ha htriple,?_,?_⟩ + · intro p hp + rw [← (curves a).second_eq F hp] + exact ⟨h.nonzero a p hp,h.avoids a p hp⟩ + · intro j hj p hp + have hja : j ≠ a := fun he => ha (he ▸ hj) + have hE : p ∈ boundaryCrossingSet curves (insert a s) := + boundaryCrossingSet_pair curves (mem_insert_of_mem _ hj) (mem_insert _ _) hja hp.1 hp.2 + exact ⟨h.positive j a hja p hE hp.1 hp.2, + h.crossing a j hja.symm p hE hp.2 hp.1,h.crossing j a hja p hE hp.1 hp.2⟩ + +omit [CompactSpace M] [Fintype ι] in +/-- At a listed crossing exactly two remaining curves occur. The point +itself indexes the crossing, so no duplicate crossing labels are introduced. -/ +lemma boundaryCrossingSet_select (curves : ι → PhaseBoundaryCurve B) (s : Set ι) + (htriple : ∀ i j k, i ≠ j → i ≠ k → j ≠ k → + (curves i).carrier ∩ (curves j).carrier ∩ (curves k).carrier = ∅) : + ∃ left right : boundaryCrossingSet curves s → ι, + (∀ p, left p ∈ s ∧ right p ∈ s ∧ left p ≠ right p ∧ + (p : M) ∈ (curves (left p)).carrier ∧ (p : M) ∈ (curves (right p)).carrier) ∧ + ∀ (p : boundaryCrossingSet curves s) j, (p : M) ∈ (curves j).carrier → j = left p ∨ j = right p := by + classical + have hex (p : boundaryCrossingSet curves s) : + ∃ i j, i ∈ s ∧ j ∈ s ∧ i ≠ j ∧ + (p : M) ∈ (curves i).carrier ∧ (p : M) ∈ (curves j).carrier := by + obtain ⟨i,hi,j,hj,hij,hpi,hpj⟩ := p.2 + exact ⟨i,j,hi,hj,hij,hpi,hpj⟩ + choose left right hchoice using hex + refine ⟨left,right,hchoice,?_⟩ + intro p j hpj + by_cases hl : j = left p + · exact Or.inl hl + by_cases hr : j = right p + · exact Or.inr hr + have hh := hchoice p + have hx : (p : M) ∈ (curves (left p)).carrier ∩ (curves (right p)).carrier ∩ (curves j).carrier := + ⟨⟨hh.2.2.2.1,hh.2.2.2.2⟩,hpj⟩ + rw [htriple (left p) (right p) j hh.2.2.1 (Ne.symm hl) (Ne.symm hr)] at hx + exact hx.elim + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCatalogCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCatalogCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8058df96ad5e55fe153055586e91b9ca47f1c5cc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCatalogCancellation.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFixedCancellation + +namespace OAI + +/-! One polynomial bound for all phases in a fixed finite catalog. +The target supports may vary with the immersion and the scale. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates RealModes + +lemma coordinatePhase_lift (φ : SmallModes.Base → ℝ) : + coordinatePhase (φ ∘ planeCoordinateIsometry) = φ := by + funext x + simp only [coordinatePhase,Function.comp_apply,LinearIsometryEquiv.apply_symm_apply] + +theorem finite_catalog_polynomial_cancellation + (Γ : Finset (SmallModes.Base → ℝ)) (hΓ : ∀ φ ∈ Γ, ContDiff ℝ ∞ φ) + (K₀ : Compacts SmallModes.Base) {ε b D : ℝ} + (hε : 0 < ε) (hb : 0 < b) (hD : 1 ≤ D) (hDB : (ε*b)⁻¹ ≤ D) + (B : ℕ → ℝ → ℝ) (hB : ∀ m, HasPolynomialBound (B m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q : ℕ) : + ∃ (d : ℕ → ℕ) (E : ℕ → ℝ), (∀ m, 1 ≤ E m) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ φ ∈ Γ, + ∀ {G : JetPolynomial.Base → JetPolynomial.Space} (_hG : ContDiff ℝ ∞ G) + (K : Compacts SmallModes.Base), (K : Set SmallModes.Base) ⊆ K₀ → + (∀ y ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) y)) → + (∀ y ∈ (K : Set SmallModes.Base), b ≤ ‖realSecondTensor (G ∘ planeCoordinateIsometry.symm) y‖) → + (∀ y ∈ (K : Set SmallModes.Base), + ε*‖realSecondTensor (G ∘ planeCoordinateIsometry.symm) y‖ ≤ + ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) y) + (-(phaseDerivative φ y).2,(phaseDerivative φ y).1)‖) → + (∀ y ∈ (K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) y) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) y))⁻¹‖ ≤ D) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m j, j ≤ m+3 → WeightedBound univ 1 j + (B m x/(s : ℝ)^(j-2)) (G ∘ planeCoordinateIsometry.symm)) → + ∀ f : SupportedField (F := ComplexTensor) K, + ∃ X : RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m + (E m*x^(d m)*supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) f) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ/s)^(q+1)*(E m*x^(d m))*supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) f) + (realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ φ f)) := by + classical + have hsmooth (φ : Γ) : ContDiff ℝ ∞ (φ.val ∘ planeCoordinateIsometry) := + (hΓ φ.val φ.property).comp planeCoordinateIsometry.contDiff + choose N J S p A hJ hS hA hc using fun φ : Γ => + relative_phase_polynomial_cancellation (hsmooth φ) K₀ hε hb + let C := fun (φ : Γ) m x => (N φ : ℝ)*splitSizeBudget q m + (fun r => A φ r*(fixedChartSolverBudget (J φ) (fun j => B j x) D r)^(p φ r)) + (fixedChartSolverBudget (J φ) (fun j => B j x) D) (J φ) (S φ) + let R := fun (φ : Γ) m x => (N φ : ℝ)*splitResidualBudget q m + (fun r => A φ r*(fixedChartSolverBudget (J φ) (fun j => B j x) D r)^(p φ r)) + (fixedChartSolverBudget (J φ) (fun j => B j x) D) (J φ) (S φ) + have hpoly (φ : Γ) (m : ℕ) : HasPolynomialBound (C φ m) ∧ HasPolynomialBound (R φ m) := + fixed_cancellation_budgets_polynomial (N φ) q m (J φ) (S φ) (A φ) (p φ) B + (hJ φ) (hS φ) (hA φ) hD hB hB1 + let H := fun m x => ∑ φ : Γ, (C φ m x+R φ m x) + have hH (m : ℕ) : HasPolynomialBound (H m) := + HasPolynomialBound.sum Finset.univ (fun φ : Γ => fun x => C φ m x+R φ m x) + (fun φ _ => (hpoly φ m).1.add (hpoly φ m).2) + choose d E hE hbound using hH + have hnonneg (φ : Γ) (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 0 ≤ C φ m x ∧ 0 ≤ R φ m x := by + obtain ⟨_,_,_,h⟩ := (hpoly φ m).1 + obtain ⟨_,_,_,h'⟩ := (hpoly φ m).2 + exact ⟨(h x hx).1,(h' x hx).1⟩ + have hmajor (φ : Γ) (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : + C φ m x ≤ E m*x^(d m) ∧ R φ m x ≤ E m*x^(d m) := by + have hh : C φ m x+R φ m x ≤ H m x := + Finset.single_le_sum (fun ψ _ => add_nonneg (hnonneg ψ m x hx).1 (hnonneg ψ m x hx).2) + (Finset.mem_univ φ) + exact ⟨((le_add_of_nonneg_right (hnonneg φ m x hx).2).trans hh).trans (hbound m x hx).2, + ((le_add_of_nonneg_left (hnonneg φ m x hx).1).trans hh).trans (hbound m x hx).2⟩ + refine ⟨d,E,hE,?_⟩ + intro x hx φ hφ G hG K hK hImm hBnorm hrel hgram τ s hτ hs hτs hs1 hFj f + let γ : Γ := ⟨φ,hφ⟩ + have hrel' : ∀ y ∈ (K : Set SmallModes.Base), + ε*‖realSecondTensor (G ∘ planeCoordinateIsometry.symm) y‖ ≤ + ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) y) + (-(phaseDerivative (coordinatePhase (γ.val ∘ planeCoordinateIsometry)) y).2, + (phaseDerivative (coordinatePhase (γ.val ∘ planeCoordinateIsometry)) y).1)‖ := by + simpa only [coordinatePhase_lift] using hrel + obtain ⟨X,hX,hsp,hv,hr⟩ := hc γ hG K hK D hD hDB hImm hBnorm hrel' hgram + τ s hτ hs hτs hs1 (fun j => B j x) (fun j => hB1 j x hx) hFj q f + refine ⟨X,hX,hsp,?_,?_⟩ + · intro m + exact (hv m).mono_const (mul_le_mul_of_nonneg_right (hmajor γ m x hx).1 (apply_nonneg _ _)) + · intro m + have hh := hr m + simp only [coordinatePhase_lift] at hh + apply hh.mono_const + have hm := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hmajor γ m x hx).2 + (pow_nonneg (div_nonneg hτ.le hs.le) (q+1))) + (show 0 ≤ supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) f from apply_nonneg _ _) + simpa only [R,mul_assoc] using hm + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveLocalDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveLocalDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..48450c05804842d0d6740593dcf2c2051a63b7b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveLocalDefiners.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedSurfaceLoop + +namespace OAI + +/-! A finite family of closed regular arcs supplies the local defining +functions needed to control angular derivatives away from its finite exceptions. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +lemma finite_curve_local_definers {ι : Type*} [Fintype ι] + (C V : ι → Set Base) (f : ι → Base → ℝ) + (hC : ∀ i, IsClosed (C i)) (hV : ∀ i, IsOpen (V i)) + (hCV : ∀ i, C i ⊆ V i) (hf : ∀ i, ContDiffOn ℝ ∞ (f i) (V i)) + (hzero : ∀ i x, x ∈ C i → f i x = 0) + {K P : Set Base} (hK : K ⊆ ⋃ i, C i) + (hcross : ∀ i j, i ≠ j → C i ∩ C j ⊆ P) + (hregular : ∀ i x, x ∈ K \ P → x ∈ C i → fderiv ℝ (f i) x dy ≠ 0) : + ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ g : Base → ℝ, ContDiffOn ℝ ∞ g N ∧ (∀ x ∈ K ∩ N, g x = 0) ∧ + fderiv ℝ g p dy ≠ 0 := by + classical + intro p hp + obtain ⟨i,hi⟩ := mem_iUnion.mp (hK hp.1) + let W : Set Base := ⋂ j, if j = i then univ else (C j)ᶜ + have hW : IsOpen W := by + apply isOpen_iInter_of_finite + intro j + split_ifs + · exact isOpen_univ + · exact (hC j).isOpen_compl + have hpW : p ∈ W := by + apply mem_iInter.mpr + intro j + by_cases hji : j = i + · simp [hji] + · simp only [hji,ite_false,mem_compl_iff] + intro hj + exact hp.2 (hcross i j (Ne.symm hji) ⟨hi,hj⟩) + refine ⟨V i ∩ W,(hV i).inter hW,⟨hCV i hi,hpW⟩,f i,(hf i).mono inter_subset_left,?_, + hregular i p hp hi⟩ + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp (hK hx.1) + have hji : j = i := by + by_contra hne + have havoid := mem_iInter.mp hx.2.2 j + simp only [hne,ite_false,mem_compl_iff] at havoid + exact havoid hj + exact hzero i x (by simpa only [hji] using hj) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTangencies.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTangencies.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2364bdcde1dd3a254ce7d660e976f2811cd03d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTangencies.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GenericCurvePhases + +namespace OAI + +/-! Nondegenerate critical points of a restricted phase are isolated, so +only finitely many lie in a compact boundary arc. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry + +lemma finite_compact_simple_zeros {f df : ℝ → ℝ} (hf : Continuous f) + {K : Set ℝ} (hK : IsCompact K) + (hd : ∀ t ∈ K, HasDerivAt f (df t) t) + (hn : ∀ t ∈ K, f t = 0 → df t ≠ 0) : + (K ∩ {t | f t = 0}).Finite := by + apply (hK.inter_right (isClosed_eq hf continuous_const)).finite + rw [isDiscrete_iff_forall_mem_exists_isOpen] + intro t ht + have he : ∀ᶠ s in 𝓝 t, s ≠ t → f s ≠ 0 := by + simpa only [mem_compl_iff,mem_singleton_iff] using + (eventually_nhdsWithin_iff.mp ((hd t ht.1).eventually_ne (c := 0) (hn t ht.1 ht.2))) + obtain ⟨U,hsub,hU,htU⟩ := mem_nhds_iff.mp he + refine ⟨U,hU,?_⟩ + ext s + constructor + · rintro ⟨hsU,hsK,hs0⟩ + apply mem_singleton_iff.mpr + by_contra hst + exact hsub hsU hst hs0 + · rintro rfl + exact ⟨htU,ht⟩ + +lemma curvePhaseVelocity_hasDerivAt {u v w : ℝ → CurvePlane} {L t : ℝ} {ell : CurvePlane} + (hu : HasDerivAt u (v t) t) (hv : HasDerivAt v (w t) t) : + HasDerivAt (fun s => curvePhaseVelocity u v L s ell) + (curvePhaseAcceleration u v w L t ell) t := by + have hu1 : HasDerivAt (fun s => (u s).1) (v t).1 t := + (ContinuousLinearMap.fst ℝ ℝ ℝ).hasFDerivAt.comp_hasDerivAt t hu + have hu2 : HasDerivAt (fun s => (u s).2) (v t).2 t := + (ContinuousLinearMap.snd ℝ ℝ ℝ).hasFDerivAt.comp_hasDerivAt t hu + have hv1 : HasDerivAt (fun s => (v s).1) (w t).1 t := + (ContinuousLinearMap.fst ℝ ℝ ℝ).hasFDerivAt.comp_hasDerivAt t hv + have hv2 : HasDerivAt (fun s => (v s).2) (w t).2 t := + (ContinuousLinearMap.snd ℝ ℝ ℝ).hasFDerivAt.comp_hasDerivAt t hv + have hh := (((hu1.const_mul L).const_add ell.1).mul hv1).add + (((hu2.const_mul L).const_add ell.2).mul hv2) + convert hh using 1 + · rfl + · dsimp [curvePhaseAcceleration] + ring + +theorem finite_nondegenerate_curve_tangencies + (u v w : ℝ → CurvePlane) (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) + (hdu : ∀ t, HasDerivAt u (v t) t) (hdv : ∀ t, HasDerivAt v (w t) t) + (L : ℝ) (ell : CurvePlane) {K : Set ℝ} (hK : IsCompact K) + (hregular : ∀ t ∈ K, v t ≠ 0) + (hnondeg : ∀ t, v t ≠ 0 → curvePhaseVelocity u v L t ell = 0 → + curvePhaseAcceleration u v w L t ell ≠ 0) : + (K ∩ {t | curvePhaseVelocity u v L t ell = 0}).Finite := by + apply finite_compact_simple_zeros (df := fun t => curvePhaseAcceleration u v w L t ell) + (by dsimp [curvePhaseVelocity]; fun_prop) hK + · intro t _ + exact curvePhaseVelocity_hasDerivAt (hdu t) (hdv t) + · intro t ht hz + exact hnondeg t (hregular t ht) hz + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTransverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTransverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..079333c804975bff319f456ebebf8f0dbbca7e75 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCurveTransverse.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseCurveEquation + +namespace OAI + +/-! Small-value prescribed derivatives on a finite family of closed embedded curves. +The exceptional finite set contains crossings and vertical tangencies; at all +other points a transverse smooth embedded parametrization is supplied. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.TransverseSmallFunction + +theorem finite_curve_prescribed_derivative {ι : Type*} [Fintype ι] + (C : ι → Set Base) (hC : ∀ i, IsClosed (C i)) {K O P : Set Base} + (hK : IsCompact K) (hKO : K ⊆ O) (hO : IsOpen O) + (hKC : K ⊆ ⋃ i, C i) (hP : P.Finite) + (hcross : ∀ i j, i ≠ j → C i ∩ C j ⊆ P) + (hchart : ∀ i p, p ∈ C i → p ∉ P → + ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ ∃ γ : ℝ → Base, + ContDiff ℝ ∞ γ ∧ Topology.IsEmbedding γ ∧ ∃ t : ℝ, + γ t = p ∧ C i ∩ U ⊆ range γ ∧ deriv (fun s => (γ s).1) t ≠ 0) + (B : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ H : Base → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ O ∧ + (∀ x, |H x| < ε) ∧ ∀ x ∈ K, fderiv ℝ H x (0, 1) = B := by + classical + apply small_value_prescribed_derivative hK hO hKO (hP.inter_of_right K) + inter_subset_left _ B hε + intro p hp + have hpP : p ∉ P := fun hpp => hp.2 ⟨hp.1, hpp⟩ + obtain ⟨i, hpi⟩ := mem_iUnion.mp (hKC hp.1) + obtain ⟨U, hU, hpU, γ, hγ, he, t, hγt, hgraph, ht⟩ := hchart i p hpi hpP + obtain ⟨V, hV, hpV, f, hf, hz, hd⟩ := embedded_curve_equation hγ he t ht + rw [hγt] at hpV hd + let A : Set Base := ⋃ j : {j : ι // j ≠ i}, C j.val + have hA : IsClosed A := isClosed_iUnion_of_finite (fun j => hC j.val) + have hpA : p ∉ A := by + intro hh + obtain ⟨j, hj⟩ := mem_iUnion.mp hh + exact hpP (hcross i j.val j.property.symm ⟨hpi, hj⟩) + refine ⟨(U ∩ V) ∩ Aᶜ, (hU.inter hV).inter hA.isOpen_compl, + ⟨⟨hpU, hpV⟩, hpA⟩, f, hf.mono (fun x hx => hx.1.2), ?_, (by rw [hd]; norm_num)⟩ + intro x hx + have hxi : x ∈ C i := by + obtain ⟨j, hxj⟩ := mem_iUnion.mp (hKC hx.1) + by_cases hji : j = i + · simpa only [hji] using hxj + · exact False.elim (hx.2.2 (mem_iUnion.mpr ⟨⟨j, hji⟩, hxj⟩)) + exact hz x ⟨hgraph ⟨hxi, hx.2.1.1⟩, hx.2.1.2⟩ + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCycleOrder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCycleOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..f993eade76266468f93b9a1ac35a1a05be2b0b89 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteCycleOrder.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrefixMetrics + +namespace OAI + +/-! Ordered prefixes of a finite sequence of primitive cycles. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma finite_cycle_order {m j j' k k' : ℕ} (hj : j < m) (hj' : j' < m) : + j'+m*k' < j+m*k ↔ k' < k ∨ k' = k ∧ j' < j := by + by_cases hk : k' < k + · have hb := Nat.mul_le_mul_left m hk + simp only [Nat.mul_succ] at hb + constructor + · exact fun _ => Or.inl hk + · intro _ + nlinarith + by_cases he : k' = k + · subst k' + simp only [lt_self_iff_false,false_or,true_and] + omega + · have hk' : k < k' := by omega + have hb := Nat.mul_le_mul_left m hk' + simp only [Nat.mul_succ] at hb + constructor + · intro h + exfalso + nlinarith + · rintro (h | ⟨h,_⟩) <;> contradiction + + theorem finite_cycle_prefix_sum {V : Type*} [AddCommMonoid V] {N m : ℕ} + (T : Fin N → Fin m → V) (u : V) (hsum : ∀ k, ∑ j, T k j = u) + (k : Fin N) (j : Fin m) : + (∑ a ∈ CircularPrimitiveFamily.prefixIndices + ((finProdFinEquiv (k,j)).castSucc), + T a.divNat a.modNat) = + k.val • u + ∑ b ∈ CircularPrimitiveFamily.prefixIndices j.castSucc, T k b := by + classical + have horder (k' : Fin N) (j' : Fin m) : + (finProdFinEquiv (k',j')).val < (finProdFinEquiv (k,j)).val ↔ + k'.val < k.val ∨ k' = k ∧ j'.val < j.val := by + change j'.val+m*k'.val < j.val+m*k.val ↔ _ + rw [Fin.ext_iff] + exact finite_cycle_order j.isLt j'.isLt + have hprefix : (∑ a ∈ CircularPrimitiveFamily.prefixIndices + ((finProdFinEquiv (k,j)).castSucc), T a.divNat a.modNat) = + ∑ k' : Fin N, ∑ j' : Fin m, + if k'.val < k.val ∨ k' = k ∧ j'.val < j.val then T k' j' else 0 := by + rw [CircularPrimitiveFamily.prefixIndices,Finset.sum_filter] + rw [← Equiv.sum_comp finProdFinEquiv] + rw [Fintype.sum_prod_type] + apply Finset.sum_congr rfl + intro k' _ + apply Finset.sum_congr rfl + intro j' _ + have hinv : (finProdFinEquiv (k',j')).divNat = k' ∧ + (finProdFinEquiv (k',j')).modNat = j' := by + exact Prod.mk.inj (finProdFinEquiv.symm_apply_apply (k',j')) + simp only [Fin.val_castSucc,horder,hinv.1,hinv.2] + rw [hprefix] + have hinner (k' : Fin N) : + (∑ j' : Fin m, if k'.val < k.val ∨ k' = k ∧ j'.val < j.val then T k' j' else 0) = + (if k'.val < k.val then u else 0) + + (if k' = k then ∑ b ∈ CircularPrimitiveFamily.prefixIndices j.castSucc, T k b else 0) := by + by_cases hk : k'.val < k.val + · have hne : k' ≠ k := by intro h; subst k'; omega + simp [hk,hne,hsum] + · by_cases he : k' = k + · subst k' + simp [CircularPrimitiveFamily.prefixIndices,Finset.sum_filter] + · simp [hk,he] + simp_rw [hinner] + rw [Finset.sum_add_distrib] + have hcount : (∑ k' : Fin N, if k'.val < k.val then u else 0) = k.val • u := by + rw [← Finset.sum_filter,Finset.sum_const] + congr 1 + have hf : Finset.univ.filter (fun k' : Fin N => k'.val < k.val) = Finset.Iio k := by + ext a + simp + rw [hf,Fin.card_Iio] + rw [hcount] + simp + +theorem finite_cycle_total_sum {V : Type*} [AddCommMonoid V] {N m : ℕ} + (T : Fin N → Fin m → V) (u : V) (hsum : ∀ k, ∑ j, T k j = u) : + (∑ a : Fin (N*m), T a.divNat a.modNat) = N • u := by + rw [← Equiv.sum_comp finProdFinEquiv,Fintype.sum_prod_type] + have hinv (k : Fin N) (j : Fin m) : + (finProdFinEquiv (k,j)).divNat = k ∧ (finProdFinEquiv (k,j)).modNat = j := + Prod.mk.inj (finProdFinEquiv.symm_apply_apply (k,j)) + simp_rw [(hinv _ _).1,(hinv _ _).2,hsum] + simp + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteDisjointAdjustment.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteDisjointAdjustment.lean new file mode 100644 index 0000000000000000000000000000000000000000..72ec22f92110c751ae3fbb71ac0e5dd486a0949b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteDisjointAdjustment.lean @@ -0,0 +1,71 @@ +import Mathlib + +namespace OAI + +/-! Combine the finitely many crossing adjustments on pairwise disjoint +neighborhoods. The patched field agrees exactly with the selected local field. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.VelocityFrame +variable {E F ι : Type*} + +def finiteDisjointAdjustment [AddCommGroup F] (s : Finset ι) (n : E → F) (g : ι → E → F) : E → F := + fun x => n x + ∑ i ∈ s, (g i x - n x) + +lemma finiteDisjointAdjustment_smoothOn + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {s : Finset ι} {n : E → F} + {g : ι → E → F} {U : Set E} (hn : ContDiffOn ℝ ∞ n U) + (hg : ∀ i ∈ s, ContDiffOn ℝ ∞ (g i) U) : + ContDiffOn ℝ ∞ (finiteDisjointAdjustment s n g) U := by + exact hn.add (ContDiffOn.sum fun i hi => (hg i hi).sub hn) + +lemma finiteDisjointAdjustment_of_mem [AddCommGroup F] [DecidableEq ι] {s : Finset ι} {n : E → F} + {g : ι → E → F} {O : ι → Set E} + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (O i) (O j)) + (hext : ∀ i ∈ s, ∀ x ∉ O i, g i x = n x) + {i : ι} (hi : i ∈ s) {x : E} (hx : x ∈ O i) : + finiteDisjointAdjustment s n g x = g i x := by + have hz : ∀ j ∈ s, j ≠ i → g j x-n x = 0 := by + intro j hj hji + apply sub_eq_zero.mpr + apply hext j hj x + intro hxj + exact Set.disjoint_left.mp (hdisj hj hi hji) hxj hx + unfold finiteDisjointAdjustment + rw [Finset.sum_eq_single i (fun j hj hji => hz j hj hji) (by simp [hi])] + abel + +lemma finiteDisjointAdjustment_of_exterior [AddCommGroup F] {s : Finset ι} {n : E → F} + {g : ι → E → F} {O : ι → Set E} + (hext : ∀ i ∈ s, ∀ x ∉ O i, g i x = n x) + {x : E} (hx : ∀ i ∈ s, x ∉ O i) : + finiteDisjointAdjustment s n g x = n x := by + unfold finiteDisjointAdjustment + have hz : ∑ i ∈ s, (g i x-n x) = 0 := Finset.sum_eq_zero fun i hi => by + rw [hext i hi x (hx i hi),sub_self] + rw [hz,add_zero] + +lemma finiteDisjointAdjustment_property [AddCommGroup F] [DecidableEq ι] {s : Finset ι} {n : E → F} + {g : ι → E → F} {O : ι → Set E} {U : Set E} {P : E → F → Prop} + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (O i) (O j)) + (hext : ∀ i ∈ s, ∀ x ∉ O i, g i x = n x) + (hn : ∀ x ∈ U, P x (n x)) + (hg : ∀ i ∈ s, ∀ x ∈ U ∩ O i, P x (g i x)) : + ∀ x ∈ U, P x (finiteDisjointAdjustment s n g x) := by + intro x hx + by_cases hex : ∃ i ∈ s, x ∈ O i + · obtain ⟨i,hi,hxi⟩ := hex + rw [finiteDisjointAdjustment_of_mem hdisj hext hi hxi] + exact hg i hi x ⟨hx,hxi⟩ + · have hout : ∀ i ∈ s, x ∉ O i := by + intro i hi hxi + exact hex ⟨i,hi,hxi⟩ + rw [finiteDisjointAdjustment_of_exterior hext hout] + exact hn x hx + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteExceptionalTransverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteExceptionalTransverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..36570c5626e060ed591bf1ac321d5623ddba7d7a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteExceptionalTransverse.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactTransverseCorrection +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSpecialPointCorrection + +namespace OAI + +/-! A small function with constant vertical derivative on a compact curve set, +allowing finitely many exceptional points. The regular local defining functions +are the only geometric input; all support and patching choices are constructed. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.TransverseSmallFunction + +theorem finite_exceptional_transverse_correction {K O P : Set Base} + (hK : IsCompact K) (hO : IsOpen O) (hKO : K ⊆ O) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + ∃ f : Base → ℝ, ContDiff ℝ ∞ f ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + ∀ x ∈ U, fderiv ℝ f x (0, 1) ≠ 0) + (B : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ H : Base → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ O ∧ + (∀ x, |H x| < ε) ∧ ∀ x ∈ K, fderiv ℝ H x (0, 1) = B := by + classical + let : Fintype P := hP.fintype + obtain ⟨H₀, hH₀, hH₀c, hH₀s, hH₀b, V, hV, hPV, _, hH₀d⟩ := + exists_finite_special_correction (fun p : P => p.val) Subtype.val_injective hO + (fun p => hKO (hPK p.property)) B (half_pos hε) + let T : Base → ℝ := fun x => B - fderiv ℝ H₀ x (0, 1) + have hT : ContDiff ℝ ∞ T := + contDiff_const.sub (((hH₀.fderiv_right (by simp)).clm_apply contDiff_const)) + have hTV (p : Base) (hp : p ∈ V) : p ∉ tsupport T := by + rw [notMem_tsupport_iff_eventuallyEq] + filter_upwards [hV.mem_nhds hp] with x hx + change B - fderiv ℝ H₀ x (0, 1) = 0 + rw [hH₀d x hx, sub_self] + have hl (p : Base) (hp : p ∈ K ∩ tsupport T) := + hlocal p ⟨hp.1, fun hpp => hTV p (hPV ⟨p, hpp⟩) hp.2⟩ + obtain ⟨H₁, hH₁, hH₁c, hH₁s, hH₁b, hH₁d⟩ := + compact_transverse_correction (0, 1) hK hO hKO hT hl (half_pos hε) + refine ⟨fun x => H₀ x + H₁ x, hH₀.add hH₁, ?_, ?_, ?_, ?_⟩ + · exact (hH₀c.union hH₁c).of_isClosed_subset (isClosed_tsupport _) (tsupport_add H₀ H₁) + · exact (tsupport_add H₀ H₁).trans (union_subset hH₀s hH₁s) + · intro x + calc + |H₀ x + H₁ x| ≤ |H₀ x| + |H₁ x| := abs_add_le _ _ + _ < ε / 2 + ε / 2 := add_lt_add (hH₀b x) (hH₁b x) + _ = ε := add_halves ε + · intro x hx + rw [fderiv_fun_add (hH₀.differentiable (by simp) x) + (hH₁.differentiable (by simp) x), add_apply, hH₁d x hx] + change fderiv ℝ H₀ x (0, 1) + (B - fderiv ℝ H₀ x (0, 1)) = B + ring + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteFastBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteFastBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..66ffcfbcd565ac98ee4b4bce5d098df6847087be --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteFastBounds.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FastPhaseBounds +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFiniteAnsatz + +namespace OAI + +/-! Uniform fast-scale estimates for finite collections of the actual +periodic correctors, and for their finite oscillatory sum. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.VectorExpression +open LocalPeriodicExpansion WeightedEstimates + +/-- Finitely many coefficients admit one common prefactor and one common +scale loss, also in the Euclidean norm on the target. -/ +theorem compact_finite_fast_bound {ι : Type*} [Fintype ι] + {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (R : ι → VectorExpression) (hRs : ∀ a, (R a).SmoothCoeffs O) + (N d : ℕ) (hN : ∀ a i, (R a i).order ≤ N) (hd : ∀ a i, (R a i).loss ≤ d) + (ℓ : Base →L[ℝ] ℝ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s z : ℝ), + 0 < z → z ≤ s → s ≤ 1 → ContDiff ℝ ∞ G → + Set.MapsTo (lowJet G) S K → WeightedBound S s (m + N) B (lowJet G) → + ∀ (U : ι → Family S R4), (∀ a, Represents G (R a) (U a)) → ∀ a, + WeightedBound S z m (D / s ^ d) ((U a).fastValue ℓ z) := by + classical + have hex := fun a : ι × Fin 4 => compact_fast_bound (S := S) hO hK hKO (R a.1) (hRs a.1) a.2 ℓ m B hB + choose C hC hc using hex + let C₀ : ℝ := ∑ a : ι × Fin 4, C a + let L : (Fin 4 → ℝ) →L[ℝ] R4 := (EuclideanSpace.equiv (Fin 4) ℝ).symm.toContinuousLinearMap + refine ⟨‖L‖ * C₀, mul_nonneg (norm_nonneg _) (Finset.sum_nonneg fun a _ => hC a), ?_⟩ + intro G s z hz hzs hs1 hG hGK hb U hrep a + have hs : 0 < s := hz.trans_le hzs + have hcoord (i : Fin 4) : + WeightedBound S z m (C₀ / s ^ d) (fun p => (U a).fastValue ℓ z p i) := by + have hi := hc (a, i) G s z hz hzs hs1 hG hGK + (hb.mono_order (Nat.add_le_add_left (hN a i) m)) (U a) (hrep a) + apply hi.mono_const + calc + C (a, i) / s ^ (R a i).loss ≤ C (a, i) / s ^ d := + div_le_div_of_nonneg_left (hC _) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (hd a i)) + _ ≤ C₀ / s ^ d := div_le_div_of_nonneg_right + (Finset.single_le_sum (fun b _ => hC b) (Finset.mem_univ (a, i))) (pow_nonneg hs.le _) + have hsmooth (i : Fin 4) : ContDiffOn ℝ ∞ (fun p => (U a).fastValue ℓ z p i) S := + (show R4 →L[ℝ] ℝ from EuclideanSpace.proj i).contDiff.comp_contDiffOn ((U a).fastValue_smooth ℓ z) + have hp := WeightedBound.pi S.isOpen.uniqueDiffOn hz + (div_nonneg (Finset.sum_nonneg fun b _ => hC b) (pow_nonneg hs.le _)) hsmooth hcoord + have hp' := hp.linear S.isOpen.uniqueDiffOn hz.le (contDiffOn_pi.mpr hsmooth) L + have heq : (L ∘ fun p i => (U a).fastValue ℓ z p i) = (U a).fastValue ℓ z := by + funext p + exact (EuclideanSpace.equiv (Fin 4) ℝ).symm_apply_apply _ + rw [heq] at hp' + convert hp' using 1 + ring + +/-- The finite ansatz differs from the slow map by `O_z(z s⁻ᵈ)`. +The exponent `d` is supplied by the finite jet expressions and is independent +of `m`; there is no assumption on an unconstructed correction. -/ +theorem compact_finite_ansatz_bound {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (R : ℕ → VectorExpression) (L N d : ℕ) + (hRs : ∀ i < L, (R i).SmoothCoeffs O) + (hN : ∀ i < L, ∀ a, (R i a).order ≤ N) + (hd : ∀ i < L, ∀ a, (R i a).loss ≤ d) + (ℓ : Base →L[ℝ] ℝ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s z : ℝ), + 0 < z → z ≤ s → s ≤ 1 → ContDiff ℝ ∞ G → + Set.MapsTo (lowJet G) S K → WeightedBound S s (m + N) B (lowJet G) → + ∀ (F : Base → R4) (U : ℕ → Family S R4), + (∀ i < L, Represents G (R i) (U i)) → + WeightedBound S z m (D * z / s ^ d) + (fun p => finiteAnsatz F U ℓ L z p - F p) := by + obtain ⟨C, hC, hc⟩ := compact_finite_fast_bound hO hK hKO + (fun i : Fin L => R i) (fun i => hRs i i.isLt) N d + (fun i => hN i i.isLt) (fun i => hd i i.isLt) ℓ m B hB + refine ⟨L * C, mul_nonneg (Nat.cast_nonneg _) hC, ?_⟩ + intro G s z hz hzs hs1 hG hGK hb F U hrep + have hs : 0 < s := hz.trans_le hzs + have hz1 : z ≤ 1 := hzs.trans hs1 + have hbU : ∀ i < L, WeightedBound S z m (C / s ^ d) ((U i).fastValue ℓ z) := by + intro i hi + exact hc G s z hz hzs hs1 hG hGK hb (fun j : Fin L => U j) + (fun j => hrep j j.isLt) ⟨i, hi⟩ + have hterm (i : ℕ) (hi : i ∈ Finset.range L) : + WeightedBound S z m (z * (C / s ^ d)) + (fun p => z ^ (i + 1) • (U i).fastValue ℓ z p) := by + have hh := (hbU i (Finset.mem_range.mp hi)).const_smul S.isOpen.uniqueDiffOn + ((U i).fastValue_smooth ℓ z) (z ^ (i + 1)) + apply hh.mono_const + rw [abs_of_nonneg (pow_nonneg hz.le _)] + apply mul_le_mul_of_nonneg_right _ (div_nonneg hC (pow_nonneg hs.le _)) + simpa only [pow_one] using pow_le_pow_of_le_one hz.le hz1 (by omega : 1 ≤ i + 1) + have hh := WeightedBound.finset_sum S.isOpen.uniqueDiffOn hz.le (Finset.range L) + (fun _ => z * (C / s ^ d)) + (fun i p => z ^ (i + 1) • (U i).fastValue ℓ z p) + (fun i _ => (contDiffOn_const (c := z ^ (i + 1))).smul ((U i).fastValue_smooth ℓ z)) hterm + have heq : (fun p => finiteAnsatz F U ℓ L z p - F p) = + (fun p => ∑ i ∈ Finset.range L, z ^ (i + 1) • (U i).fastValue ℓ z p) := by + funext p + simp only [finiteAnsatz, add_sub_cancel_left] + rw [heq] + convert hh using 1 + simp only [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + ring + +end ClosedSurfaceR4.JetPolynomial.VectorExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteGermSeparator.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteGermSeparator.lean new file mode 100644 index 0000000000000000000000000000000000000000..948b1550ca5366f05bb634651419d97ca38d0e5b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteGermSeparator.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceCrosscapPreparation +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! A smooth separator for a pair of distinct surface points, constant +near every point of a fixed finite set. It supports translation patches +without altering the prepared crosscap jets. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_germ_separator (S : Finset M) (x y : M) (hxy : x ≠ y) : + ∃ χ : M → ℝ, ContMDiff planeModel 𝓘(ℝ) ∞ χ ∧ + (∀ p, χ p ∈ Icc 0 1) ∧ χ =ᶠ[𝓝 x] (fun _ => 1) ∧ + χ =ᶠ[𝓝 y] (fun _ => 0) ∧ + ∀ p ∈ S, (χ =ᶠ[𝓝 p] (fun _ => 0)) ∨ (χ =ᶠ[𝓝 p] (fun _ => 1)) := by + classical + let A : Set M := ((S.erase x : Finset M) : Set M) ∪ {y} + have hA : IsClosed A := (S.erase x).finite_toSet.isClosed.union isClosed_singleton + have hdis : Disjoint A ({x} : Set M) := by + rw [Set.disjoint_singleton_right] + rintro (hx | hx) + · exact (Finset.mem_erase.mp hx).1 rfl + · exact hxy (mem_singleton_iff.mp hx) + obtain ⟨χ,hχ0,hχ1,hχrange⟩ := exists_contMDiffMap_zero_one_nhds_of_isClosed + planeModel hA isClosed_singleton hdis (n := (⊤ : ℕ∞)) + have h1 : (χ : M → ℝ) =ᶠ[𝓝 x] (fun _ => 1) := + hχ1.filter_mono (nhds_le_nhdsSet (mem_singleton x)) + have h0 (p : M) (hp : p ∈ A) : (χ : M → ℝ) =ᶠ[𝓝 p] (fun _ => 0) := + hχ0.filter_mono (nhds_le_nhdsSet hp) + refine ⟨χ,χ.contMDiff,hχrange,h1,h0 y (Or.inr (mem_singleton y)),?_⟩ + intro p hp + by_cases hpx : p = x + · exact Or.inr (hpx ▸ h1) + · exact Or.inl (h0 p (Or.inl (Finset.mem_erase.mpr ⟨hpx,hp⟩))) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteInjectivityCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteInjectivityCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..4789e28a22753fa70c1f90931ae6b131a5765b21 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteInjectivityCover.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceInjectivityPatch + +namespace OAI + +/-! Finite quantitative injectivity cover of a compact immersed region. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem finite_injectivity_cover {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {B : Set M} (hB : IsCompact B) + (hI : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) : + ∃ (P : ∀ x : B, SurfaceInjectivityPatch f x.val) (s : Finset B), + B ⊆ ⋃ x ∈ s, (P x).region := by + classical + let P : ∀ x : B, SurfaceInjectivityPatch f x.val := fun x => + Classical.choice (exists_surface_injectivity_patch hf x.val (hI x x.property)) + have hcover : B ⊆ ⋃ x : B, (P x).region := + fun x hx => mem_iUnion.mpr ⟨⟨x,hx⟩,(P ⟨x,hx⟩).mem_region⟩ + obtain ⟨s,hs⟩ := hB.elim_finite_subcover (fun x => (P x).region) + (fun x => (P x).region_open) hcover + exact ⟨P,s,hs⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteIntervalChopping.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteIntervalChopping.lean new file mode 100644 index 0000000000000000000000000000000000000000..5576b3ab03c29320818a973ccb061ef5317da3a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteIntervalChopping.lean @@ -0,0 +1,60 @@ +import Mathlib.Data.Finset.Max +import Mathlib.Basic.Real.Basic +import Mathlib.Tactic + +namespace OAI + +/-! Cutting a real interval at a finite vertex set produces uniquely +determined consecutive open subintervals. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +def ConsecutiveVertices (S : Finset ℝ) (a b : ℝ) : Prop := + a ∈ S ∧ b ∈ S ∧ a < b ∧ ∀ t ∈ S, ¬ (a < t ∧ t < b) + +theorem exists_consecutive_interval (S : Finset ℝ) {x : ℝ} (hx : x ∉ S) + (hleft : ∃ a ∈ S, a < x) (hright : ∃ b ∈ S, x < b) : + ∃ a b, ConsecutiveVertices S a b ∧ a < x ∧ x < b := by + classical + let L := S.filter (fun a => a < x) + let R := S.filter (fun b => x < b) + have hL : L.Nonempty := by + obtain ⟨a,ha,hax⟩ := hleft + exact ⟨a,Finset.mem_filter.mpr ⟨ha,hax⟩⟩ + have hR : R.Nonempty := by + obtain ⟨b,hb,hxb⟩ := hright + exact ⟨b,Finset.mem_filter.mpr ⟨hb,hxb⟩⟩ + let a := L.max' hL + let b := R.min' hR + have ha : a ∈ S ∧ a < x := Finset.mem_filter.mp (L.max'_mem hL) + have hb : b ∈ S ∧ x < b := Finset.mem_filter.mp (R.min'_mem hR) + refine ⟨a,b,⟨ha.1,hb.1,ha.2.trans hb.2,?_⟩,ha.2,hb.2⟩ + intro t ht hab + rcases lt_trichotomy t x with htx | rfl | hxt + · have hta : t ≤ a := L.le_max' t (Finset.mem_filter.mpr ⟨ht,htx⟩) + linarith [hab.1] + · exact hx ht + · have hbt : b ≤ t := R.min'_le t (Finset.mem_filter.mpr ⟨ht,hxt⟩) + linarith [hab.2] + +theorem consecutive_intervals_equal (S : Finset ℝ) {a b c d x : ℝ} + (hab : ConsecutiveVertices S a b) (hcd : ConsecutiveVertices S c d) + (hx : a < x ∧ x < b) (hy : c < x ∧ x < d) : a = c ∧ b = d := by + have hac : a = c := by + rcases lt_trichotomy a c with h | h | h + · exact False.elim (hab.2.2.2 c hcd.1 ⟨h,hy.1.trans hx.2⟩) + · exact h + · exact False.elim (hcd.2.2.2 a hab.1 ⟨h,hx.1.trans hy.2⟩) + have hbd : b = d := by + rcases lt_trichotomy b d with h | h | h + · exact False.elim (hcd.2.2.2 b hab.2.1 ⟨hy.1.trans hx.2,h⟩) + · exact h + · exact False.elim (hab.2.2.2 d hcd.2.1 ⟨hx.1.trans hy.2,h⟩) + exact ⟨hac,hbd⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairPatchCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairPatchCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..52de5ac6de4676824f87af244f11fa1214e2ad82 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairPatchCover.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FixedSurfacePairPatch + +namespace OAI + +/-! A finite compact pair-patch cover outside prescribed diagonal +squares. All cutoffs are chosen before the surface maps are perturbed. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_pair_patch_cover {ι : Type*} [Fintype ι] + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) + (hne : ∀ z ∈ K, z.1 ≠ z.2) + (hout : ∀ z ∈ K, ∀ i, ¬ (z.1 ∈ A i ∧ z.2 ∈ A i)) : + ∃ (P : ∀ z : K, SurfacePairTranslationPatch z.val.1 z.val.2) + (T : K → Set (M × M)) (s : Finset K), + (∀ z, IsCompact (T z) ∧ T z ⊆ K ∩ ((P z).U ×ˢ (P z).V)) ∧ + (K ⊆ ⋃ z ∈ s, T z) ∧ ∀ z i, + ((P z).χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ ((P z).χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1)) := by + classical + have hex (z : K) : ∃ (P : SurfacePairTranslationPatch z.val.1 z.val.2) + (T : Set (M × M)), IsCompact T ∧ z.val ∈ interior T ∧ + T ⊆ P.U ×ˢ P.V ∧ ∀ i, + (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1)) := by + obtain ⟨P,hP⟩ := exists_fixed_surface_pair_patch A hA hdis z.val.1 z.val.2 + (hne z z.property) (hout z z.property) + obtain ⟨T,hT,hzT,hTP⟩ := exists_compact_subset (P.openU.prod P.openV) ⟨P.memU,P.memV⟩ + exact ⟨P,T,hT,hzT,hTP,hP⟩ + choose P T hT hzT hTP hP using hex + have hcover : K ⊆ ⋃ z : K, interior (T z) := + fun z hz => mem_iUnion.mpr ⟨⟨z,hz⟩,hzT ⟨z,hz⟩⟩ + obtain ⟨s,hs⟩ := hK.elim_finite_subcover (fun z => interior (T z)) (fun _ => isOpen_interior) hcover + refine ⟨P,fun z => K ∩ T z,s,?_,?_,hP⟩ + · intro z + exact ⟨hK.inter (hT z),fun w hw => ⟨hw.1,hTP z hw.2⟩⟩ + · intro z hz + obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp (hs hz) + exact mem_iUnion₂.mpr ⟨i,hi,hz,interior_subset hzi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairRelativeRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairRelativeRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef0f7aa667359737521272cb191541e96d09467d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePairRelativeRegularization.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteChartTranslationBound +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSurfaceImmersionStability +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover + +namespace OAI + +/-! Finite regularization of prescribed compact pair pieces, with +arbitrarily small uniform displacement and frozen translation germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_regularization_relative + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + (J : Set (M × M)) (hJ : IsCompact J) + [Fintype ν] (c : ν → M) (Q : ν → Set JetPolynomial.Base) + (hQ : ∀ j, IsCompact (Q j)) (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (s : Finset ι) (B : Set M) (hB : IsCompact B) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hJreg : ∀ z ∈ J, f z.1 = f z.2 → Function.Surjective (surfacePairDerivative f z.1 z.2)) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + (∀ z ∈ J, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2)) ∧ + ∀ i ∈ s, ∀ z ∈ T i, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,by intro j x hx; simpa using hε,hIf,hJreg,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hDc,hIg,hJg,hgood⟩ := ih (half_pos hε) + let K := J ∪ ⋃ j ∈ s, T j + have hK : IsCompact K := hJ.union (s.isCompact_biUnion (fun j _ => hT j)) + have hKreg : ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + intro z hz + rcases hz with hz | hz + · exact hJg z hz + · obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact hgood j hj z hzj + obtain ⟨δ,hδ,hstable⟩ := compact_surface_pair_stability hg (P i).smooth hK hKreg + obtain ⟨η,hη,hηI⟩ := compact_surface_immersion_stability hg (P i).smooth hB hIg + obtain ⟨ζ,hζ,hζD⟩ := finite_chart_translation_bound c Q hQ hQT (P i).smooth (half_pos hε) + obtain ⟨a,ha,hnew⟩ := (P i).regularize hg (lt_min hδ (lt_min hη (lt_min hζ (half_pos hε)))) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haη : ‖a‖ < η := ha.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have haζ : ‖a‖ < ζ := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have haε : ‖a‖ < ε/2 := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,?_,hηI a haη,?_,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j x hx + have hd := hζD hg a haζ j x hx + calc + _ ≤ ‖fderiv ℝ (G ∘ (chart (c j)).symm) x-fderiv ℝ (g ∘ (chart (c j)).symm) x‖+ + ‖fderiv ℝ (g ∘ (chart (c j)).symm) x-fderiv ℝ (f ∘ (chart (c j)).symm) x‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hd (hDc j x hx) + _ = ε := by ring + · intro z hz + exact hstable a haδ z (Or.inl hz) + · intro j hj z hz hzz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2 hzz + · exact hstable a haδ z (Or.inr (mem_iUnion₂.mpr ⟨j,hj,hz⟩)) hzz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrix.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd22848f206651ed253e4e81e75c29e035b06c7e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrix.lean @@ -0,0 +1,84 @@ +import Mathlib + +namespace OAI + +/-! Finite parametrix improvement with derivative loss. This is a finite +algebraic iteration; no bounded inverse on one Banach space is assumed. -/ +noncomputable section + +namespace ClosedSurfaceR4.FiniteParametrix + +variable {E F : Type*} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] + +def improve (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) : ℕ → E + | 0 => z + | j + 1 => improve A S b z j - S (A (improve A S b z j) - b) + +def residual (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) (j : ℕ) : F := + A (improve A S b z j) - b + +def defect (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) : F →ₗ[ℝ] F := + A.comp S - LinearMap.id + +lemma residual_succ (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) (j : ℕ) : + residual A S b z (j + 1) = -defect A S (residual A S b z j) := by + simp only [residual, improve, map_sub, defect, LinearMap.sub_apply, + LinearMap.comp_apply, LinearMap.id_apply] + abel + +lemma improve_difference (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) (j : ℕ) : + improve A S b z (j + 1) - improve A S b z j = -S (residual A S b z j) := by + simp only [improve, residual] + abel + +def boundProfile (L : ℕ) (K C : ℕ → ℝ) : ℕ → ℕ → ℝ + | 0, m => C m + | j + 1, m => K m * boundProfile L K C j (m + L) + +lemma boundProfile_nonneg {L : ℕ} {K C : ℕ → ℝ} + (hK : ∀ m, 0 ≤ K m) (hC : ∀ m, 0 ≤ C m) (j m : ℕ) : + 0 ≤ boundProfile L K C j m := by + induction j generalizing m with + | zero => exact hC m + | succ j ih => exact mul_nonneg (hK m) (ih (m + L)) + +/-- Each finite correction gains one small factor while paying only the +stated finite number of additional input derivatives. -/ +theorem residual_bound (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) + (p : ℕ → Seminorm ℝ F) (L : ℕ) (K C : ℕ → ℝ) {η : ℝ} + (hη : 0 ≤ η) (hK : ∀ m, 0 ≤ K m) + (hdef : ∀ m f, p m (defect A S f) ≤ η * K m * p (m + L) f) + (hinit : ∀ m, p m (A z - b) ≤ C m) (j m : ℕ) : + p m (residual A S b z j) ≤ η ^ j * boundProfile L K C j m := by + induction j generalizing m with + | zero => simpa only [residual, improve, boundProfile, pow_zero, one_mul] using hinit m + | succ j ih => + rw [residual_succ, map_neg_eq_map] + calc + _ ≤ η * K m * p (m + L) (residual A S b z j) := hdef m _ + _ ≤ η * K m * (η ^ j * boundProfile L K C j (m + L)) := + mul_le_mul_of_nonneg_left (ih (m + L)) (mul_nonneg hη (hK m)) + _ = _ := by simp only [boundProfile, pow_succ]; ring + +/-- The corrections inherit the size and derivative loss of the initial +parametrix, with the improved residual as forcing. -/ +theorem increment_bound (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) + (p : ℕ → Seminorm ℝ F) (q : ℕ → Seminorm ℝ E) (L : ℕ) (K C B : ℕ → ℝ) + {η : ℝ} (hη : 0 ≤ η) (hK : ∀ m, 0 ≤ K m) (hB : ∀ m, 0 ≤ B m) + (hdef : ∀ m f, p m (defect A S f) ≤ η * K m * p (m + L) f) + (hS : ∀ m f, q m (S f) ≤ B m * p (m + L) f) + (hinit : ∀ m, p m (A z - b) ≤ C m) (j m : ℕ) : + q m (improve A S b z (j + 1) - improve A S b z j) ≤ + B m * η ^ j * boundProfile L K C j (m + L) := by + rw [improve_difference, map_neg_eq_map] + calc + _ ≤ B m * p (m + L) (residual A S b z j) := hS m _ + _ ≤ B m * (η ^ j * boundProfile L K C j (m + L)) := + mul_le_mul_of_nonneg_left (residual_bound A S b z p L K C hη hK hdef hinit j (m + L)) (hB m) + _ = _ := by ring + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b996207a8f4ace4cc0e949fe5e039fa4fc1c3b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixLinearity.lean @@ -0,0 +1,27 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrix + +namespace OAI + +/-! Linearity of the finite homogeneous correction in its initial amplitude. -/ +noncomputable section +namespace ClosedSurfaceR4.FiniteParametrix + +variable {E F : Type*} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] + +def homogeneousLM (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) : ℕ → E →ₗ[ℝ] E + | 0 => LinearMap.id + | j + 1 => (LinearMap.id - S.comp A).comp (homogeneousLM A S j) + +lemma homogeneousLM_apply (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (j : ℕ) (z : E) : + homogeneousLM A S j z = improve A S 0 z j := by + induction j with + | zero => rfl + | succ j ih => + simp only [homogeneousLM, LinearMap.comp_apply, LinearMap.sub_apply, + LinearMap.id_apply, ih, improve, sub_zero] + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixPowers.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixPowers.lean new file mode 100644 index 0000000000000000000000000000000000000000..90524f183b1c9048bb99bd377b2bd42dc58a355a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixPowers.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrixSize + +namespace OAI + +/-! The initial residual already contains one small factor. Finite +improvement retains that factor in both residual and amplitude estimates. -/ +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.FiniteParametrix + +lemma boundProfile_const_mul (L : ℕ) (K C : ℕ → ℝ) (a : ℝ) (j m : ℕ) : + boundProfile L K (fun r => a * C r) j m = a * boundProfile L K C j m := by + induction j generalizing m with + | zero => rfl + | succ j ih => rw [boundProfile, ih, boundProfile]; ring + +variable {E F : Type*} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] + +theorem residual_bound_succ (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) + (p : ℕ → Seminorm ℝ F) (L : ℕ) (K C : ℕ → ℝ) {η : ℝ} + (hη : 0 ≤ η) (hK : ∀ m, 0 ≤ K m) + (hdef : ∀ m f, p m (defect A S f) ≤ η * K m * p (m + L) f) + (hinit : ∀ m, p m (A z - b) ≤ η * C m) (j m : ℕ) : + p m (residual A S b z j) ≤ η ^ (j + 1) * boundProfile L K C j m := by + have hh := residual_bound A S b z p L K (fun r => η * C r) hη hK hdef hinit j m + rw [boundProfile_const_mul] at hh + convert hh using 1 + rw [pow_succ] + ring + +theorem improve_sub_initial_small (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) + (p : ℕ → Seminorm ℝ F) (q : ℕ → Seminorm ℝ E) (L : ℕ) (K C B : ℕ → ℝ) + {η : ℝ} (hη : 0 ≤ η) (hη1 : η ≤ 1) (hK : ∀ m, 0 ≤ K m) + (hC : ∀ m, 0 ≤ C m) (hB : ∀ m, 0 ≤ B m) + (hdef : ∀ m f, p m (defect A S f) ≤ η * K m * p (m + L) f) + (hS : ∀ m f, q m (S f) ≤ B m * p (m + L) f) + (hinit : ∀ m, p m (A z - b) ≤ η * C m) (j m : ℕ) : + q m (improve A S b z j - z) ≤ + η * ∑ i ∈ Finset.range j, B m * boundProfile L K C i (m + L) := by + have hh := improve_sub_initial_bound A S b z p q L K (fun r => η * C r) B + hη hK hB hdef hS hinit j m + apply hh.trans + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + rw [boundProfile_const_mul] + calc + _ = η * (B m * boundProfile L K C i (m + L)) * η ^ i := by ring + _ ≤ η * (B m * boundProfile L K C i (m + L)) * 1 := + mul_le_mul_of_nonneg_left (pow_le_one₀ hη hη1) + (mul_nonneg hη (mul_nonneg (hB m) (boundProfile_nonneg hK hC i (m + L)))) + _ = _ := mul_one _ + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixSize.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..215e7a3c0fcc65888abd20353155176d32b47b83 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteParametrixSize.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrix + +namespace OAI + +/-! Finite parametrix improvement controls amplitudes as well as residuals. -/ +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.FiniteParametrix + +variable {E F : Type*} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] + +lemma improve_sub_initial (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) (j : ℕ) : + improve A S b z j - z = -∑ i ∈ Finset.range j, S (residual A S b z i) := by + induction j with + | zero => simp [improve] + | succ j ih => + rw [Finset.sum_range_succ, neg_add] + have h := improve_difference A S b z j + rw [← ih] + rw [← h] + abel + +lemma improve_sub_initial_bound (A : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (b : F) (z : E) + (p : ℕ → Seminorm ℝ F) (q : ℕ → Seminorm ℝ E) (L : ℕ) (K C B : ℕ → ℝ) + {η : ℝ} (hη : 0 ≤ η) (hK : ∀ m, 0 ≤ K m) (hB : ∀ m, 0 ≤ B m) + (hdef : ∀ m f, p m (defect A S f) ≤ η * K m * p (m + L) f) + (hS : ∀ m f, q m (S f) ≤ B m * p (m + L) f) + (hinit : ∀ m, p m (A z - b) ≤ C m) (j m : ℕ) : + q m (improve A S b z j - z) ≤ + ∑ i ∈ Finset.range j, B m * η ^ i * boundProfile L K C i (m + L) := by + rw [improve_sub_initial, map_neg_eq_map] + have hsum : q m (∑ i ∈ Finset.range j, S (residual A S b z i)) ≤ + ∑ i ∈ Finset.range j, q m (S (residual A S b z i)) := by + induction j with + | zero => simp + | succ j ih => + rw [Finset.sum_range_succ, Finset.sum_range_succ] + exact (map_add_le_add _ _ _).trans (add_le_add ih le_rfl) + apply hsum.trans + apply Finset.sum_le_sum + intro i _ + calc + _ ≤ B m * p (m + L) (residual A S b z i) := hS m _ + _ ≤ B m * (η ^ i * boundProfile L K C i (m + L)) := + mul_le_mul_of_nonneg_left (residual_bound A S b z p L K C hη hK hdef hinit i (m + L)) (hB m) + _ = _ := by ring + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointNeighborhoods.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointNeighborhoods.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e52db12058d1fc4b41aad5848a31514296c96b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointNeighborhoods.lean @@ -0,0 +1,44 @@ +import Mathlib.Topology.Separation.Hausdorff + +namespace OAI + +/-! Pairwise disjoint open neighborhoods of finitely many distinct points, +refining any prescribed neighborhoods. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X ι : Type*} [TopologicalSpace X] [T2Space X] [Finite ι] + +theorem finite_disjoint_open_neighborhoods (p : ι → X) (hi : Function.Injective p) + (O : ι → Set X) (hO : ∀ i, IsOpen (O i)) (hpO : ∀ i, p i ∈ O i) : + ∃ U : ι → Set X, (∀ i, IsOpen (U i) ∧ p i ∈ U i ∧ U i ⊆ O i) ∧ + Pairwise (fun i j => Disjoint (U i) (U j)) := by + classical + have hpair : ∀ i j : ι, ∃ U V : Set X, + IsOpen U ∧ IsOpen V ∧ p i ∈ U ∧ p j ∈ V ∧ (i ≠ j → Disjoint U V) := by + intro i j + by_cases hij : i = j + · exact ⟨univ,univ,isOpen_univ,isOpen_univ,mem_univ _,mem_univ _,fun h => False.elim (h hij)⟩ + · obtain ⟨U,V,hU,hV,hpU,hpV,hUV⟩ := t2_separation (fun he => hij (hi he)) + exact ⟨U,V,hU,hV,hpU,hpV,fun _ => hUV⟩ + choose U V hU hV hpU hpV hUV using hpair + let W : ι → Set X := fun i => O i ∩ (⋂ j, U i j) ∩ (⋂ j, V j i) + have hW : ∀ i, IsOpen (W i) ∧ p i ∈ W i ∧ W i ⊆ O i := by + intro i + refine ⟨((hO i).inter (isOpen_iInter_of_finite (hU i))).inter + (isOpen_iInter_of_finite (fun j => hV j i)),?_,?_⟩ + · exact ⟨⟨hpO i,mem_iInter.mpr (hpU i)⟩,mem_iInter.mpr (fun j => hpV j i)⟩ + · exact fun _ hx => hx.1.1 + refine ⟨W,hW,?_⟩ + intro i j hij + apply (hUV i j hij).mono + · intro x hx + exact mem_iInter.mp hx.1.2 j + · intro x hx + exact mem_iInter.mp hx.2 i + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointPairAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointPairAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce989b0647ba1b01edf1cb510a91da277f0b31c7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FinitePointPairAvoidance.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularPairAvoidance +import OAI.Geometry.SurfaceImmersion.Geometry.EuclideanSurfaceImageNull + +namespace OAI + +/-! Arbitrarily small transverse translations remove every coincidence +that uses one of finitely many prescribed points on either coordinate patch. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem exists_small_transverse_translation_avoiding_points {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (U V : Set Base) (hU : IsOpen U) (hV : IsOpen V) + (S T : Set Base) (hS : S.Finite) (hT : T.Finite) + {ε : ℝ} (hε : 0 < ε) : + ∃ a : ProjectionTarget 3, ‖a‖ < ε ∧ + ∀ x ∈ U, ∀ y ∈ V, f x+a = g y → x ∉ S ∧ y ∉ T ∧ + Function.Surjective (fderiv ℝ (fun z : Base × Base => f z.1-g z.2) (x,y)) := by + let N₁ : Set (ProjectionTarget 3) := ⋃ s ∈ S, range (fun y => f s-g y) + let N₂ : Set (ProjectionTarget 3) := ⋃ t ∈ T, range (fun x => f x-g t) + have hN₁ : volume N₁ = 0 := (measure_biUnion_null_iff hS.countable).mpr + (fun s _ => euclidean_surface_image_null _ (contDiff_const.sub hg)) + have hN₂ : volume N₂ = 0 := (measure_biUnion_null_iff hT.countable).mpr + (fun t _ => euclidean_surface_image_null _ (hf.sub contDiff_const)) + obtain ⟨α,hα,havoid,hreg⟩ := exists_regular_pair_translation_avoiding_null hf hg U V hU hV + (Metric.ball 0 ε) Metric.isOpen_ball ⟨0,Metric.mem_ball_self hε⟩ + (N₁ ∪ N₂) (measure_union_null hN₁ hN₂) + refine ⟨-α,?_,?_⟩ + · simpa only [Metric.mem_ball,dist_zero_right,norm_neg] using hα + · intro x hx y hy heq + have hval : f x-g y = α := by + apply sub_eq_iff_eq_add.mpr + calc + f x = (f x + -α) + α := by abel + _ = g y + α := by rw [heq] + _ = α + g y := add_comm _ _ + refine ⟨?_,?_,hreg x hx y hy hval⟩ + · intro hxS + exact havoid (Or.inl (mem_iUnion₂.mpr ⟨x,hxS,y,hval⟩)) + · intro hyT + exact havoid (Or.inr (mem_iUnion₂.mpr ⟨y,hyT,x,hval⟩)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteQuadraticVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteQuadraticVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9a29db61dfa3c87dc883d16c186f296bf728032 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteQuadraticVariation.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticPhases + +namespace OAI + +/-! Finite sums in the actual complexified Hessian. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +def quadraticComplexBilinear (e : Expression) (G : Base → Space) (z : Base × ℝ) : + DirectionJets →ₗ[ℂ] DirectionJets →ₗ[ℂ] ℂ where + toFun J := { + toFun := fun K => quadraticComplex e G J K z + map_add' := fun K L => quadraticComplex_add_right e G J K L z + map_smul' := fun c K => quadraticComplex_smul_right e G J K c z } + map_add' J K := by + ext L + exact quadraticComplex_add_left e G J K L z + map_smul' c J := by + ext K + exact quadraticComplex_smul_left e G J K c z + +lemma quadraticComplex_sum {ι κ : Type*} (a : Finset ι) (b : Finset κ) + (e : Expression) (G : Base → Space) (J : ι → DirectionJets) (K : κ → DirectionJets) + (z : Base × ℝ) : + quadraticComplex e G (∑ i ∈ a, J i) (∑ j ∈ b, K j) z = + ∑ i ∈ a, ∑ j ∈ b, quadraticComplex e G (J i) (K j) z := by + change quadraticComplexBilinear e G z (∑ i ∈ a, J i) (∑ j ∈ b, K j) = _ + rw [map_sum] + simp only [LinearMap.sum_apply, map_sum] + rw [Finset.sum_comm] + rfl + +lemma complexJet_add {H K : Base → Fin 4 → ℂ} + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) : + complexJet (fun p => H p + K p) = complexJet H + complexJet K := by + funext w a p + exact congrFun (directional_add (contDiff_pi.mp hH a) (contDiff_pi.mp hK a) + (w.map coordinateVector)) p + +lemma complexJet_zero : complexJet (0 : Base → Fin 4 → ℂ) = 0 := by + funext w a p + exact congrFun (iteratedDirectional_zero (w.map coordinateVector)) p + +lemma complexJet_sum {ι : Type*} (a : Finset ι) (H : ι → Base → Fin 4 → ℂ) + (hH : ∀ i ∈ a, ContDiff ℝ ∞ (H i)) : + complexJet (fun p => ∑ i ∈ a, H i p) = ∑ i ∈ a, complexJet (H i) := by + classical + induction a using Finset.induction_on with + | empty => + simp only [Finset.sum_empty] + exact complexJet_zero + | @insert i a hi ih => + have hsm : ContDiff ℝ ∞ (fun p => ∑ j ∈ a, H j p) := + ContDiff.sum (fun j hj => hH j (Finset.mem_insert_of_mem hj)) + simp only [Finset.sum_insert hi] + rw [complexJet_add (hH i (Finset.mem_insert_self _ _)) hsm, + ih (fun j hj => hH j (Finset.mem_insert_of_mem hj))] + +lemma starDirectionJets_sum {ι : Type*} (a : Finset ι) (J : ι → DirectionJets) : + starDirectionJets (∑ i ∈ a, J i) = ∑ i ∈ a, starDirectionJets (J i) := by + funext w b p + simp [starDirectionJets, Finset.sum_apply, star_sum] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteRegularFibers.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteRegularFibers.lean new file mode 100644 index 0000000000000000000000000000000000000000..839d9b786e139e03d8089a5bb1c775fcd351a7db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteRegularFibers.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PublishedInputs +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! Regular two-dimensional coordinate values have finite fibers on a +compact set. This supplies the finite crossing sets for generic radii. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PublishedInputs + +lemma regular_point_locally_injective {f : Plane → Plane} (hf : ContDiff ℝ ∞ f) + {x : Plane} (hreg : Function.Surjective (fderiv ℝ f x)) : + ∃ U : Set Plane, IsOpen U ∧ x ∈ U ∧ U.InjOn f := by + have hinj : Function.Injective (fderiv ℝ f x) := + LinearMap.injective_iff_surjective.mpr hreg + let L : Plane ≃L[ℝ] Plane := ContinuousLinearEquiv.ofBijective (fderiv ℝ f x) + (LinearMap.ker_eq_bot.mpr hinj) (LinearMap.range_eq_top.mpr hreg) + have hd : HasFDerivAt f L.toContinuousLinearMap x := + (hf.differentiable (by simp) x).hasFDerivAt + let e := hf.contDiffAt.toOpenPartialHomeomorph f hd (by simp) + exact ⟨e.source,e.open_source,hf.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),e.injOn⟩ + +theorem finite_compact_regular_fiber {f : Plane → Plane} (hf : ContDiff ℝ ∞ f) + {K : Set Plane} (hK : IsCompact K) (y : Plane) + (hreg : ∀ x ∈ K, f x = y → Function.Surjective (fderiv ℝ f x)) : + (K ∩ {x | f x = y}).Finite := by + have hcompact : IsCompact (K ∩ {x | f x = y}) := + hK.inter_right (isClosed_eq hf.continuous continuous_const) + apply hcompact.finite + rw [isDiscrete_iff_forall_mem_exists_isOpen] + intro x hx + obtain ⟨U,hU,hxU,hUinj⟩ := regular_point_locally_injective hf (hreg x hx.1 hx.2) + refine ⟨U,hU,?_⟩ + ext z + constructor + · rintro ⟨hzU,hzK,hzy⟩ + exact mem_singleton_iff.mpr (hUinj hzU hxU (hzy.trans hx.2.symm)) + · rintro rfl + exact ⟨hxU,hx⟩ + +/-- Simultaneous regular values with finite fibers exist in every nonempty +open parameter set. -/ +theorem exists_simultaneous_finite_regular_fibers {ι : Type*} [Countable ι] + (f : ι → Plane → Plane) (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (K : ι → Set Plane) (hK : ∀ i, IsCompact (K i)) + (U : Set Plane) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ y ∈ U, (∀ i x, f i x = y → Function.Surjective (fderiv ℝ (f i) x)) ∧ + ∀ i, (K i ∩ {x | f i x = y}).Finite := by + obtain ⟨y,hy,hreg⟩ := exists_simultaneous_regular_value_unconditional f hf U hU hne + exact ⟨y,hy,hreg,fun i => finite_compact_regular_fiber (hf i) (hK i) y + (fun x _ hxy => hreg i x hxy)⟩ + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteScalarBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteScalarBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..9948c1ca722839e85804072bfc44cd1fbb85dcfd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteScalarBounds.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceBoundaryCollar +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Fintype.Basic + +namespace OAI + +noncomputable section +namespace ClosedSurfaceR4 + +lemma finite_positive_lower {ι : Type*} [Finite ι] {f : ι → ℝ} + (hf : ∀ i, 0 < f i) : ∃ δ : ℝ, 0 < δ ∧ ∀ i, δ ≤ f i := by + classical + let := Fintype.ofFinite ι + suffices ∀ s : Finset ι, ∃ δ : ℝ, 0 < δ ∧ ∀ i ∈ s, δ ≤ f i by + obtain ⟨δ,hδ,h⟩ := this Finset.univ + exact ⟨δ,hδ,fun i => h i (Finset.mem_univ i)⟩ + intro s + induction s using Finset.induction_on with + | empty => exact ⟨1,by norm_num,by simp⟩ + | @insert i s hi ih => + obtain ⟨δ,hδ,h⟩ := ih + refine ⟨min (f i) δ,lt_min (hf i) hδ,?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (h j hj) + +lemma finite_positive_upper {ι : Type*} [Finite ι] (f : ι → ℝ) : + ∃ H : ℝ, 0 < H ∧ ∀ i, f i ≤ H := by + classical + let := Fintype.ofFinite ι + suffices ∀ s : Finset ι, ∃ H : ℝ, 0 < H ∧ ∀ i ∈ s, f i ≤ H by + obtain ⟨H,hH,h⟩ := this Finset.univ + exact ⟨H,hH,fun i => h i (Finset.mem_univ i)⟩ + intro s + induction s using Finset.induction_on with + | empty => exact ⟨1,by norm_num,by simp⟩ + | @insert i s hi ih => + obtain ⟨H,hH,h⟩ := ih + refine ⟨max (f i) H,hH.trans_le (le_max_right _ _),?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact le_max_left _ _ + · exact (h j hj).trans (le_max_right _ _) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSeriesAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSeriesAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..336c8f232b4dba85075ec68265ef36b669c1525c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSeriesAlgebra.lean @@ -0,0 +1,40 @@ +import Mathlib + +namespace OAI + +/-! Reindexing the derivative series of the finite periodic ansatz. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +variable {E : Type*} [AddCommGroup E] [Module ℝ E] + +lemma shifted_derivative_sum (z : ℝ) (a b : ℕ → E) (n : ℕ) : + (∑ i ∈ Finset.range (n + 1), (z ^ (i + 1) • a i + z ^ i • b i)) = + b 0 + (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (a (i - 1) + b i)) + + z ^ (n + 1) • a n := by + induction n with + | zero => simp [add_comm] + | succ n ih => + rw [Finset.sum_range_succ, ih, Finset.sum_Ico_succ_top (by omega : 1 ≤ n + 1)] + simp only [Nat.add_sub_cancel, smul_add] + abel + +lemma weighted_sum_split_zero (z : ℝ) (a : ℕ → E) (n : ℕ) : + (∑ i ∈ Finset.range (n + 1), z ^ i • a i) = + a 0 + ∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • a i := by + rw [← Finset.sum_range_add_sum_Ico (fun i => z ^ i • a i) (by omega : 1 ≤ n + 1)] + simp + +lemma weighted_sum_split_endpoints (z : ℝ) (a : ℕ → E) (n : ℕ) : + (∑ i ∈ Finset.range (n + 2), z ^ i • a i) = + a 0 + (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • a i) + z ^ (n + 1) • a (n + 1) := by + rw [Finset.sum_range_succ, weighted_sum_split_zero] + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSplitCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSplitCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..64349b96e678dccb1046ee293d24db4eb025b0ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSplitCancellation.lean @@ -0,0 +1,142 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFacts +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.DisplacementSum + +namespace OAI + +/-! +Cancellation by a fixed finite family of unperturbed phase solvers. The +partition, local solvers, inverse-chart bounds and splitting bounds are all +fixed before choosing the target or scales. Thus the resulting constants +depend only on that geometric data and the finite iteration order. +-/ + +noncomputable section + +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal + +namespace ClosedSurfaceR4.PhaseGeometry + +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +/-- Uniform cancellation of targets split among finitely many fixed phase +charts. Neither the constants nor the input derivative order depend on the +target, wavelength or slow scale. -/ +theorem finite_split_cancellation {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin 3 → Fin n → Expression) + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (φ : JetPolynomial.Base → ℝ) (K : Compacts SmallModes.Base) + (L : ι → Compacts JetPolynomial.Base) + (T : (i : ι) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i))) + (c₀ : (i : ι) → PolynomialSolveData P 0 G hG φ (L i) 1 1) + (hLK : ∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) + (I : ι → ℕ → ℝ) (hI : ∀ i m, 1 ≤ I i m) + (hi : ∀ i m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c₀ i).e.target, + ‖iteratedFDerivWithin ℝ j (c₀ i).e.symm (c₀ i).e.target x‖ ≤ I i m) + (S : ℕ → ℝ) (hS : ∀ m, 1 ≤ S m) + (hT : ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → ∀ m i A, + supportedWeightedSeminorm (modeSupport (L i)) s m (T i A) ≤ + S m * supportedWeightedSeminorm K s m A) + (hsum : ∀ A x, ∑ i, T i A x = A x) (q : ℕ) : + ∃ C D : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ + ∀ (A : SupportedField (F := ComplexTensor) K) (τ : ℝ) (s : ℝ≥0), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m + (C m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := P) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ / s) ^ (q + 1) * D m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := P) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + let b : ι → ℕ → ℝ := fun i m => + tensorChartBudget m (I i m) (I i (m + 1)) * S m + have hbn (i : ι) (m : ℕ) : 0 ≤ b i m := + mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans (hI i m)) + (zero_le_one.trans (hI i (m + 1)))) (zero_le_one.trans (hS m)) + let cbase := fun i => (c₀ i).atUnperturbedScale 1 1 le_rfl + let C := fun m => ∑ i, (cbase i).sizeFactor q m * + b i (PolynomialSolveData.inputOrder (P := P) q m) + let D := fun m => ∑ i, (cbase i).residualFactor q m * + b i (PolynomialSolveData.inputOrder (P := P) q m) + refine ⟨C, D, ?_, ?_, ?_⟩ + · intro m + exact Finset.sum_nonneg (fun i _ => + mul_nonneg ((cbase i).sizeFactor_nonneg q m) (hbn i _)) + · intro m + exact Finset.sum_nonneg (fun i _ => + mul_nonneg ((cbase i).residualFactor_nonneg q m) (hbn i _)) + · intro A τ s hτ hs hτs hs1 + let c := fun i => (c₀ i).atUnperturbedScale τ s hs1 + have hsmall : τ / s + (0 : ℝ) / τ ^ tensorLoss P ≤ 1 := by + simpa only [zero_div, add_zero] using (div_le_one₀ hs).mpr hτs + obtain ⟨X, hX, hsp, hb, hr⟩ := finite_polynomial_cancellation P 0 hG + (fun _ : ι => φ) L c hτ hs hτs hs1 le_rfl hsmall (fun i => T i A) q + have hn (i : ι) (m : ℕ) : (c i).norm (T i A) m ≤ + b i m * supportedWeightedSeminorm K s m A := by + have hbound := (c i).norm_le_of_weightedBound hs hs1 (I i) (hI i) (hi i) m + (mul_nonneg (zero_le_one.trans (hS m)) (apply_nonneg _ _)) (T i A) + ((weightedBound_of_supportedSeminorm s m (T i A)).mono_const + (hT s hs hs1 m i A)) + simpa only [b, mul_assoc] using hbound + have hsz (i : ι) (m : ℕ) : (c i).size (T i A) q m ≤ + ((cbase i).sizeFactor q m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + rw [(c i).size_eq_factor] + exact (mul_le_mul_of_nonneg_left (hn i _) ((cbase i).sizeFactor_nonneg q m)).trans_eq + (mul_assoc _ _ _).symm + have hres (i : ι) (m : ℕ) : (c i).residual (T i A) q m ≤ + (τ / s) ^ (q + 1) * + ((cbase i).residualFactor q m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + rw [(c i).residual_eq_factor] + simp only [zero_div, add_zero] + calc + _ ≤ ((τ / s) ^ (q + 1) * (cbase i).residualFactor q m) * + (b i (PolynomialSolveData.inputOrder (P := P) q m) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A) := + mul_le_mul_of_nonneg_left (hn i _) + (mul_nonneg (pow_nonneg (div_nonneg hτ.le hs.le) _) + ((cbase i).residualFactor_nonneg q m)) + _ = _ := by ring + have hdisp (x : SmallModes.Base) : + ∑ i, QuadraticMean.displacement τ (coordinatePhase φ) (T i A) x = + QuadraticMean.displacement τ (coordinatePhase φ) A x := by + simp only [QuadraticMean.displacement] + rw [← QuadraticMean.realMode_sum, hsum A x] + refine ⟨X, hX, ?_, ?_, ?_⟩ + · intro x hx + obtain ⟨i, hi⟩ := mem_iUnion.mp (hsp hx) + exact hLK i hi + · intro m + apply (hb m).mono_const + calc + _ ≤ ∑ i, ((cbase i).sizeFactor q m * + b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := + Finset.sum_le_sum (fun i _ => hsz i m) + _ = _ := (Finset.sum_mul _ _ _).symm + · intro m + have hbound : (∑ i, (c i).residual (T i A) q m) ≤ + (τ / s) ^ (q + 1) * D m * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + calc + _ ≤ ∑ i, (τ / s) ^ (q + 1) * + ((cbase i).residualFactor q m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := + Finset.sum_le_sum (fun i _ => hres i m) + _ = _ := by rw [← Finset.sum_mul, ← Finset.mul_sum] + simpa only [coordinateFullLinearized_unperturbed, hdisp, Pi.add_def] using + (hr m).mono_const hbound + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfacePreparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfacePreparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..56e168680169874878b3d667d989138306c39750 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfacePreparation.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSurfaceCorrectionBounds +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionApproximation + +namespace OAI + +/-! Finite prescribed points can be prepared by one globally defined small +correction, with its C2 constant fixed before the finite set is supplied. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem finite_spherical_preparation_correction {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (c : P → A.centers) (Q : M → Space), + (∀ p, A.weight (c p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ Q ∧ + A.WeightedBound 1 1 ε Q ∧ A.WeightedBound 1 2 D Q ∧ + let G := radialNormalize ∘ (F+Q) + ∀ p : P, G p = F p ∧ + fderiv ℝ (G ∘ (chartAt Plane (c p : M)).symm) (chartAt Plane (c p : M) p) = + fderiv ℝ (F ∘ (chartAt Plane (c p : M)).symm) (chartAt Plane (c p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (c p : M)).symm) + (chartAt Plane (c p : M) p) v w = 0 := by + classical + obtain ⟨D,hD,hbudget⟩ := A.finite_surface_correction_budgets hF hunit + refine ⟨D,hD,?_⟩ + intro P ε hε + choose c hc using fun p : P => A.mem_some_weightCore (p : M) + have hcn (p : P) : A.weight (c p) p ≠ 0 := A.weightCore_nonzero (c p) (hc p) + let U (p : P) : Set M := {x | A.weight (c p) x ≠ 0} + have hU (p : P) : IsOpen (U p) := isOpen_ne_fun (A.weight_smooth (c p)).continuous continuous_const + have hpU (p : P) : (p : M) ∈ U p := hcn p + let η := min 1 (ε/(D+1)) + have hη : 0 < η := lt_min zero_lt_one (div_pos hε (by positivity)) + have hη1 : η ≤ 1 := min_le_left _ _ + have hDη : D*η ≤ ε := by + have hm := min_le_right (1 : ℝ) (ε/(D+1)) + have hh : (D+1)*η ≤ ε := by + simpa only [mul_comm] using (le_div_iff₀ (by positivity : 0 < D+1)).mp hm + nlinarith + obtain ⟨r,hr,hdisj⟩ := finite_point_chart_balls P + (fun p => chartAt Plane (c p : M)) + (fun p => by simpa only [chart_source] using (A.weight_support (c p) (subset_tsupport _ (hcn p)))) + U hU hpU hη + have ht (p : P) : closedBall (chartAt Plane (c p : M) p) (r p) ⊆ + (chartAt Plane (c p : M)).target := fun _ hx => (hr p).2.2 hx |>.1 + obtain ⟨hb1,hb2⟩ := hbudget P c r η hη hη1 hcn + (fun p => ⟨(hr p).1,(hr p).2.1.le⟩) ht hdisj + refine ⟨c,A.finiteSurfaceQuadratic P c r F,hcn, + A.finiteSurfaceQuadratic_smooth P c r F,?_,hb2,?_⟩ + · exact fun i => (hb1 i).mono_const hDη + · exact A.finiteSurfaceQuadratic_flattening P c r F hF hunit hcn + (fun p => (hr p).1) ht hdisj + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfaceReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfaceReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..156d12e4dafc733cb014abf711324285eb94fd00 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FiniteSurfaceReplacement.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceCrosscapPreparation +import OAI.Geometry.SurfaceImmersion.Correction.FiniteCorrectionGerms + +namespace OAI + +/-! Finite supported replacements on a surface agree with the selected +replacement near its support and with the original map elsewhere. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +theorem finite_disjoint_surface_replacement {ι : Type*} [Fintype ι] + (f : M → ProjectionTarget 3) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (g : ι → M → ProjectionTarget 3) + (hg : ∀ i, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ (g i)) + (K : ι → Set M) (hs : ∀ i, tsupport (g i-f) ⊆ K i) + (hd : Pairwise fun i j => Disjoint (K i) (K j)) : + ∃ F : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F ∧ + (∀ i p, p ∈ K i → F =ᶠ[𝓝 p] g i) ∧ + (∀ p, (∀ i, p ∉ K i) → F =ᶠ[𝓝 p] f) := by + classical + let F : M → ProjectionTarget 3 := fun x => f x + ∑ i, (g i x-f x) + have hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F := + hf.add (ContMDiff.sum fun i _ => (hg i).sub hf) + refine ⟨F,hF,?_,?_⟩ + · intro i p hp + have he := SphericalJets.finite_sum_germ_of_disjoint_supports Finset.univ + (fun i => g i-f) K (fun j _ => hs j) + (fun j _ k _ hjk => hd hjk) (Finset.mem_univ i) hp + filter_upwards [he] with x hx + change f x + ∑ j, (g j x-f x) = g i x + change (∑ j, (g j x-f x)) = g i x-f x at hx + rw [hx] + abel + · intro p hp + have he : ∀ᶠ x in 𝓝 p, ∀ i ∈ (Finset.univ : Finset ι), (g i-f) x = 0 := by + apply (eventually_all_finset Finset.univ).mpr + intro i _ + exact notMem_tsupport_iff_eventuallyEq.mp (fun h => hp i (hs i h)) + filter_upwards [he] with x hx + change f x + ∑ i, (g i x-f x) = f x + have hz : ∑ i, (g i x-f x) = 0 := Finset.sum_eq_zero fun i hi => hx i hi + rw [hz,add_zero] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f464cb90a7a4d0bd1d7dfc542c7a93292e366732 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactCancellation.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedCompactSolverFamily +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSplitBudgets + +namespace OAI + +/-! Finite-loss cancellation on a fixed compact noncritical region, with +polynomial geometric factors and an actual, support-preserving solution. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem fixed_compact_polynomial_cancellation + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K₀ : Compacts SmallModes.Base) + (hnoncritical : ∀ x ∈ (K₀ : Set SmallModes.Base), + phaseDerivative (coordinatePhase φ) x ≠ 0) : + ∃ (N : ℕ) (J S : ℕ → ℝ) (p : ℕ → ℕ) (A : ℕ → ℝ), + (∀ m, 1 ≤ J m) ∧ (∀ m, 1 ≤ S m) ∧ (∀ m, 1 ≤ A m) ∧ + ∀ {G : JetPolynomial.Base → JetPolynomial.Space} (_hG : ContDiff ℝ ∞ G) + (K : Compacts SmallModes.Base), (K : Set SmallModes.Base) ⊆ K₀ → + ∀ D : ℝ, 1 ≤ D → + (∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x)) → + (∀ x ∈ (K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ D) → + (∀ x ∈ (K : Set SmallModes.Base), + ‖secondQuadratic (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-(phaseDerivative (coordinatePhase φ) x).2, + (phaseDerivative (coordinatePhase φ) x).1)‖⁻¹ ≤ D) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ B : ℕ → ℝ, (∀ m, 1 ≤ B m) → + (∀ m j, j ≤ m+3 → WeightedBound univ 1 j + (B m/(s : ℝ)^(j-2)) (G ∘ planeCoordinateIsometry.symm)) → + ∀ q : ℕ, ∀ f : SupportedField (F := ComplexTensor) K, + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m + ((N : ℝ)*splitSizeBudget q m + (fun r => A r*(fixedChartSolverBudget J B D r)^(p r)) + (fixedChartSolverBudget J B D) J S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) f) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ/s)^(q+1)*(N : ℝ)*splitResidualBudget q m + (fun r => A r*(fixedChartSolverBudget J B D r)^(p r)) + (fixedChartSolverBudget J B D) J S * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) f) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) f)) := by + obtain ⟨t,J,S,p,A,hJ,hS,hA,hfamily⟩ := + fixed_compact_polynomial_solver_family hφ K₀ hnoncritical + refine ⟨Fintype.card t,J,S,p,A,hJ,hS,hA,?_⟩ + intro G hG K hK D hD hImm hgood hgram hnormal τ s hτ hs hτs hs1 B hB hFj q f + obtain ⟨L,T,c,hLK,hC,hzero,hCJ,hi,hT,hsum⟩ := + hfamily hG K hK D hD hImm hgood hgram hnormal τ s hs hs1 B hB hFj + exact explicit_finite_split_cancellation hG φ K L T c hτ hs hτs hs1 hLK + (fun r => A r*(fixedChartSolverBudget J B D r)^(p r)) + (fixedChartSolverBudget J B D) J S hJ hS + (fun i => ⟨funext (hC i),funext (hzero i),funext (hCJ i)⟩) + (fun i m j _ hj => hi i m j hj) hT hsum q f + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactSolverFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactSolverFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..da13b8ab5891a2b13654113aa3b392b2860f7ae5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedCompactSolverFamily.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FixedChartNonlinearSolver +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMarginCompact +import OAI.Geometry.SurfaceImmersion.Atlas.FastPhaseBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSupportCoordinates + +namespace OAI + +/-! A fixed noncritical phase cover supplies actual polynomially controlled +solvers for every smaller good target support. The cover and split constants +are selected before the immersion, scales, and target. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem fixed_compact_polynomial_solver_family + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K₀ : Compacts SmallModes.Base) + (hnoncritical : ∀ x ∈ (K₀ : Set SmallModes.Base), + phaseDerivative (coordinatePhase φ) x ≠ 0) : + ∃ (t : Finset K₀) (J S : ℕ → ℝ) (p : ℕ → ℕ) (A : ℕ → ℝ), + (∀ m, 1 ≤ J m) ∧ (∀ m, 1 ≤ S m) ∧ (∀ m, 1 ≤ A m) ∧ + ∀ {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (K : Compacts SmallModes.Base), (K : Set SmallModes.Base) ⊆ K₀ → + ∀ D : ℝ, 1 ≤ D → + (∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x)) → + (∀ x ∈ (K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ D) → + (∀ x ∈ (K : Set SmallModes.Base), + ‖secondQuadratic (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-(phaseDerivative (coordinatePhase φ) x).2, + (phaseDerivative (coordinatePhase φ) x).1)‖⁻¹ ≤ D) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ B : ℕ → ℝ, (∀ m, 1 ≤ B m) → + (∀ m j, j ≤ m+3 → WeightedBound univ 1 j + (B m/(s : ℝ)^(j-2)) (G ∘ planeCoordinateIsometry.symm)) → + ∃ (L : t → Compacts JetPolynomial.Base) + (T : (i : t) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i))) + (c : (i : t) → PolynomialSolveData emptyMetricPolynomial 0 G hG φ (L i) τ s), + (∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) ∧ + (∀ i m, (c i).C m = A m*(fixedChartSolverBudget J B D m)^(p m)) ∧ + (∀ i m, (c i).D m = 0) ∧ + (∀ i m, (c i).J m = fixedChartSolverBudget J B D m) ∧ + (∀ i m j, j ≤ m → ∀ x ∈ (c i).e.target, + ‖iteratedFDerivWithin ℝ j (c i).e.symm (c i).e.target x‖ ≤ J m) ∧ + (∀ m i f, supportedWeightedSeminorm (modeSupport (L i)) s m (T i f) ≤ + S m * supportedWeightedSeminorm K s m f) ∧ + (∀ f x, ∑ i, T i f x = f x) := by + classical + have hφ' := hφ.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨t,e,J,hcover,hJ,hf,hi⟩ := noncritical_phase_cover_budgets hφ' K₀ hnoncritical + obtain ⟨P⟩ := PhasePartitions.exists_compact_phase_partition K₀.isCompact + (fun i : t => (e i).chart.source) (fun i => (e i).chart.open_source) hcover + obtain ⟨p,A,hA,hsolver⟩ := fixed_chart_nonlinear_solver + refine ⟨t,J,P.splitConstant,p,A,hJ,P.one_le_splitConstant,hA,?_⟩ + intro G hG K hK D hD hImm hgood hgram hnormal τ s hs hs1 B hB hFj + let Q : PhasePartitions.CompactPhasePartition t (K : Set SmallModes.Base) + (fun i => (e i).chart.source) := P.restrictTarget K hK + let L : t → Compacts JetPolynomial.Base := fun i => jetSupport (Q.pieceSupport i) + let T : (i : t) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i)) := + fun i => (onModeSupportLM (Q.pieceSupport i)).comp (Q.splitSupportedLM i) + have hLK (i : t) : (modeSupport (L i) : Set SmallModes.Base) ⊆ K := by + simpa only [L,modeSupport_jetSupport] using Q.pieceSupport_subset_original i + have hLe (i : t) : (modeSupport (L i) : Set SmallModes.Base) ⊆ (e i).chart.source := by + simpa only [L,modeSupport_jetSupport] using Q.pieceSupport_subset_domain i + have hc (i : t) := hsolver hG (L i) hφ (e i) (hLe i) J hJ (hf i) (hi i) D hD + (fun x hx => hImm x (hLK i hx)) (fun x hx => hgood x (hLK i hx)) + (fun x hx => hgram x (hLK i hx)) (fun x hx => hnormal x (hLK i hx)) + τ s hs hs1 B hB (fun m j hj => (hFj m j hj).restrict_open_domain + isOpen_univ (e i).chart.open_source (subset_univ _)) + choose c hC hzero hCJ hInv using hc + refine ⟨L,T,c,hLK,hC,hzero,hCJ,hInv,?_,?_⟩ + · intro m i f + change supportedWeightedSeminorm (modeSupport (jetSupport (Q.pieceSupport i))) s m + (onModeSupport (Q.pieceSupport i) (Q.splitSupported f i)) ≤ _ + rw [onModeSupport_seminorm _ s hs] + exact Q.splitSupported_uniform_bound m i s hs hs1 f + · intro f x + exact Q.sum_splitSupported_apply f x + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderInputStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderInputStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba249f62f6c9a2269c7348329917b2880545ee4f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderInputStep.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderMetricStep +import OAI.Geometry.SurfaceImmersion.Geometry.ExactInputRecurrence +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasInputBaseline +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedStepEnvelope +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.ExactScaleOrdering + +namespace OAI + +/-! A genuine correction at the paper's fixed-order scales. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance inputStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The actual correction step controls the complete next input in every +order, including orders beyond the finite construction budget. -/ +theorem fixed_order_input_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (k : ℕ) (hk : 10 ≤ k) + {B₀ : ℝ} (hB₀ : 0 ≤ B₀) : + ∃ a ρ ε A₀ : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < ε ∧ ε ≤ 1 ∧ 0 ≤ A₀ ∧ + ∃ B N : ℕ → ℝ, (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ N m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + d.A.InputBound t (40*(k+1)) B₀ G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x - + d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound (t^(6/5 : ℝ)) m + (B m*(t^(k : ℝ)*t^(6/5 : ℝ))) U) ∧ + (∀ m ≤ k/2, d.A.WeightedBound 1 m (ρ*t) U) ∧ + ∀ m C, 0 ≤ C → d.A.InputBound t m C G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.InputBound (t^(6/5 : ℝ)) m + (A₀+N m*t^(1/5 : ℝ)*(1+C)) (G+U) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)) := by + classical + obtain ⟨a,ρ,ε,ha,hρ,hε,hε1,B,L,hB,hL,hstep⟩ := d.fixed_order_metric_step hF k hk hB₀ + obtain ⟨P,hP,hbaseline⟩ := d.A.shifted_zero_bound_of_near hF + choose Pg hPg hgb using fun m => d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain m g.contMDiff + let N := fun m => Pg m+B (m+2)+L m*(1+B₀)+1+L m + have hN (m : ℕ) : 0 ≤ N m := by + dsimp [N] + exact add_nonneg (add_nonneg (add_nonneg (add_nonneg (hPg m) (hB (m+2))) + (mul_nonneg (hL m) (by linarith))) zero_le_one) (hL m) + refine ⟨a,ρ,ε,P+ρ/4+Pg 0,ha,hρ,hε,hε1,add_nonneg (add_nonneg hP (by positivity)) (hPg 0),B,N,hB,hN,?_⟩ + intro G hG t ht htε j hkj hjk hinput hnear hmetric + obtain ⟨U,hU,hUB,hsmall,herror⟩ := hstep G hG t ht htε j hkj hjk hinput hnear hmetric + refine ⟨U,hU,hUB,hsmall,?_⟩ + intro m C hC hCm + have hb := hbaseline G hG (ρ/4) hnear t + have hUB' : d.A.WeightedBound (t^(6/5 : ℝ)) (2+m) + (B (m+2)*(t^(k : ℝ)*t^(6/5 : ℝ))) U := by + simpa only [Nat.add_comm] using hUB (m+2) + exact d.A.exact_scale_input_recurrence hG hU ht (htε.le.trans hε1) hk + (by positivity) (hPg 0) (hPg m) (hB (m+2)) hC (hL m) hB₀ + hb hCm.1 hUB' (hgb 0) (hgb m) (herror m C hC hCm) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderMetricStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderMetricStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..66cad8b86f41d0b427b11c725f39ddbf2b9b3741 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderMetricStep.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ActualSmoothedStep +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedStepEnvelope +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.ExactScaleOrdering + +namespace OAI + +/-! A genuine correction at the paper's fixed-order scales. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance fixedStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance fixedStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance fixedStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance fixedStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance fixedStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance fixedStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- At each fixed order one threshold permits either holding or increasing +the order. The actual correction has small low derivatives and an affine +bound for the new normalized metric error in every higher input norm. -/ +theorem fixed_order_metric_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (k : ℕ) (hk : 10 ≤ k) + {B₀ : ℝ} (hB₀ : 0 ≤ B₀) : + ∃ a ρ ε : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < ε ∧ ε ≤ 1 ∧ + ∃ B L : ℕ → ℝ, (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ L m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + d.A.InputBound t (40*(k+1)) B₀ G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x - + d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound (t^(6/5 : ℝ)) m + (B m*(t^(k : ℝ)*t^(6/5 : ℝ))) U) ∧ + (∀ m ≤ k/2, d.A.WeightedBound 1 m (ρ*t) U) ∧ + ∀ m C, 0 ≤ C → d.A.InputBound t m C G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.TensorWeightedBound (t^(6/5 : ℝ)) m + (L m*(1+B₀+C)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)-g.inner) := by + classical + let r := 40*(k+1) + obtain ⟨a,ρ,η,D,K,ha,hρ,hη,_,hD,hK,B,T,Dm,Em,hB,hT,hDm,hEm,hstep⟩ := + d.actual_smoothed_step hF r r hB₀ + obtain ⟨ε,hε,hε1,hthreshold⟩ := + ExactCorrection.fixed_order_threshold_hold_advance k hk ρ a η D B₀ K hρ ha hη hD hB₀ hK B + let L := fun m => Dm m*tailConstant r + Em m*B (m+1)*(Dm m*tailConstant r) + 2*T m + have hL (m : ℕ) : 0 ≤ L m := by + dsimp [L] + exact add_nonneg (add_nonneg + (mul_nonneg (hDm m) (tailConstant_nonneg r)) + (mul_nonneg (mul_nonneg (hEm m) (hB (m+1))) + (mul_nonneg (hDm m) (tailConstant_nonneg r)))) + (mul_nonneg (by norm_num) (hT m)) + refine ⟨a,ρ,ε,ha,hρ,hε,hε1,B,L,hB,hL,?_⟩ + intro G hG t ht htε j hkj hjk hinput hnear hmetric + have ht1 : t ≤ 1 := htε.le.trans hε1 + obtain ⟨hτη,htail,hratio,hlow,hδ'δ,hmin⟩ := hthreshold t ht htε j hkj hjk + obtain ⟨hminpos,hδ,hτ,hs⟩ := ExactCorrection.exact_scale_positive ht k + have hδ' : 0 < t^((6/5 : ℝ)*(j : ℝ)) := Real.rpow_pos_of_pos ht _ + obtain ⟨_,hδτ,hτs,hst⟩ := ExactCorrection.exact_scale_order ht ht1 hk + obtain ⟨U,hU,hUB,herror⟩ := hstep G hG (t^(k : ℝ)) + (t^((6/5 : ℝ)*(j : ℝ))) t (t^(11/10 : ℝ)) (t^(6/5 : ℝ)) + hδ hδ' hδ'δ ht ht1 hs hst hτ hτs hτη hδτ hinput hnear hmetric htail hratio + refine ⟨U,hU,hUB,?_,?_⟩ + · intro m hm i j hj x hx + have hb := (hUB j i).deriv_le hτ (le_refl j) hx + have hh := hb.trans (hlow j (hj.trans hm)) + simpa only [one_pow,one_mul] using hh + · intro m C hC hCm i + apply (herror m C hC hCm i).mono_const + have he : normalizedStepBound r r B₀ (Dm m) (Em m) (B (m+1)) (T m) C + (t^(k : ℝ)) (t^((6/5 : ℝ)*(j : ℝ))) + (t^(6/5 : ℝ)) (t^(11/10 : ℝ)) t = + ((t^((6/5 : ℝ)*(j : ℝ)))^2)⁻¹ * + (((t^(k : ℝ))^2 + Em m*B (m+1)*t^(k : ℝ)) * (Dm m*tailConstant r) * + (B₀*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + T m*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(r+1)+ + (t^(k : ℝ))^3/t^(6/5 : ℝ))) := by + unfold normalizedStepBound + field_simp [hτ.ne'] + rw [he] + have hden : ((t^((6/5 : ℝ)*(j : ℝ)))^2)⁻¹ ≤ + ((t^((6/5 : ℝ)*((k : ℝ)+1)))^2)⁻¹ := by + apply (inv_le_inv₀ (sq_pos_of_pos hδ') (sq_pos_of_pos hminpos)).mpr + nlinarith + have hdm := hDm m + have hem := hEm m + have hbm := hB (m+1) + have htm := hT m + have htc := tailConstant_nonneg r + have hnum : 0 ≤ + (((t^(k : ℝ))^2 + Em m*B (m+1)*t^(k : ℝ)) * (Dm m*tailConstant r) * + (B₀*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + T m*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(r+1)+ + (t^(k : ℝ))^3/t^(6/5 : ℝ))) := by positivity + exact (mul_le_mul_of_nonneg_right hden hnum).trans + (ExactCorrection.normalized_step_envelope_nat_succ ht ht1 hk hB₀ hC + (mul_nonneg (hDm m) (tailConstant_nonneg r)) (hEm m) (hB (m+1)) (hT m)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..77f88ec2710ed5f1e29c07adda6d6c33bb76a3a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FixedOrderThreshold.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleAlgebra +import Mathlib.Analysis.SpecialFunctions.Pow.Continuity + +namespace OAI + +/-! At each fixed order, all analytic smallness conditions and the +finite derivative budget hold below one positive scale threshold. -/ +noncomputable section +open Set Filter +open scoped Topology BigOperators + +namespace ClosedSurfaceR4.ExactCorrection + +lemma positive_power_threshold (c p b : ℝ) (hp : 0 < p) (hb : 0 < b) : + ∃ ε : ℝ, 0 < ε ∧ ε ≤ 1 ∧ ∀ t : ℝ, 0 < t → t < ε → c*t^p < b := by + have hf : ContinuousAt (fun t : ℝ => c*t^p) 0 := + continuousAt_const.mul (Real.continuousAt_rpow_const 0 p (Or.inr hp.le)) + have he : ∀ᶠ t in 𝓝 (0 : ℝ), c*t^p < b := + hf.eventually (gt_mem_nhds (by simpa only [Real.zero_rpow hp.ne',mul_zero] using hb)) + obtain ⟨ε,hε,heε⟩ := Metric.eventually_nhds_iff.mp he + refine ⟨min ε 1,lt_min hε zero_lt_one,min_le_right _ _,?_⟩ + intro t ht hsmall + apply heε + simpa only [Real.dist_eq,sub_zero,abs_of_pos ht] using hsmall.trans_le (min_le_left ε 1) + +theorem fixed_order_threshold (k : ℕ) (hk : 10 ≤ k) + (ρ a η D B K : ℝ) (hρ : 0 < ρ) (ha : 0 < a) (hη : 0 < η) + (_hD : 0 ≤ D) (_hB : 0 ≤ B) (_hK : 0 ≤ K) (C : ℕ → ℝ) : + ∃ ε : ℝ, 0 < ε ∧ ε ≤ 1 ∧ ∀ t : ℝ, 0 < t → t < ε → + t^(6/5 : ℝ)/t^(11/10 : ℝ) ≤ η ∧ + D*B*(t^(11/10 : ℝ)/t)^(40*(k+1)) ≤ min (ρ/4) (a/8) ∧ + (t^((6/5 : ℝ)*((k : ℝ)+1))/t^(k : ℝ))^(2 : ℕ)*K ≤ a/8 ∧ + ∀ m ≤ k/2, C m*(t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m ≤ ρ*t := by + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + let M := 1 + ∑ m ∈ Finset.range (k/2+1), |C m| + have hM : 0 < M := by + have hh : 0 ≤ ∑ m ∈ Finset.range (k/2+1), |C m| := + Finset.sum_nonneg (fun _ _ => abs_nonneg _) + dsimp [M] + linarith + have hCM (m : ℕ) (hm : m ≤ k/2) : C m ≤ M := by + have hh := Finset.single_le_sum (fun j (_ : j ∈ Finset.range (k/2+1)) => abs_nonneg (C j)) + (Finset.mem_range.mpr (by omega : m < k/2+1)) + have hc := le_abs_self (C m) + dsimp [M] + linarith + obtain ⟨ε₁,hε₁,hε₁1,h₁⟩ := positive_power_threshold 1 (1/10) η (by norm_num) hη + obtain ⟨ε₂,hε₂,_,h₂⟩ := positive_power_threshold (D*B) (4*((k : ℝ)+1)) + (min (ρ/4) (a/8)) (by linarith) (lt_min (by positivity) (by positivity)) + obtain ⟨ε₃,hε₃,_,h₃⟩ := positive_power_threshold K ((2*(k : ℝ)+12)/5) + (a/8) (by linarith) (by positivity) + obtain ⟨ε₄,hε₄,_,h₄⟩ := positive_power_threshold M (1/10) ρ (by norm_num) hρ + let ε := min ε₁ (min ε₂ (min ε₃ ε₄)) + have hε : 0 < ε := lt_min hε₁ (lt_min hε₂ (lt_min hε₃ hε₄)) + have hε1 : ε ≤ ε₁ := min_le_left _ _ + have hε2 : ε ≤ ε₂ := (min_le_right _ _).trans (min_le_left _ _) + have hε3 : ε ≤ ε₃ := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)) + have hε4 : ε ≤ ε₄ := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)) + refine ⟨ε,hε,hε1.trans hε₁1,?_⟩ + intro t ht hsmall + have ht1 : t ≤ 1 := (hsmall.trans_le hε1).le.trans hε₁1 + have hr : t^(6/5 : ℝ)/t^(11/10 : ℝ) = t^(1/10 : ℝ) := by + rw [← Real.rpow_sub ht] + norm_num + have hs : t^(11/10 : ℝ)/t = t^(1/10 : ℝ) := by + conv_lhs => rhs; rw [← Real.rpow_one t] + rw [← Real.rpow_sub ht] + norm_num + have hpow : (t^(11/10 : ℝ)/t)^(40*(k+1)) = t^(4*((k : ℝ)+1)) := by + rw [hs,← Real.rpow_natCast,← Real.rpow_mul ht.le] + congr 1 + push_cast + ring + have hδ : (t^((6/5 : ℝ)*((k : ℝ)+1))/t^(k : ℝ))^(2 : ℕ) = + t^((2*(k : ℝ)+12)/5) := by + rw [← Real.rpow_sub ht,← Real.rpow_natCast,← Real.rpow_mul ht.le] + congr 1 + ring + refine ⟨?_,?_,?_,?_⟩ + · rw [hr] + simpa only [one_mul] using (h₁ t ht (hsmall.trans_le hε1)).le + · rw [hpow] + exact (h₂ t ht (hsmall.trans_le hε2)).le + · rw [hδ,mul_comm] + exact (h₃ t ht (hsmall.trans_le hε3)).le + · intro m hm + let e : ℝ := (k : ℝ) + (1/5 : ℝ) - (6/5 : ℝ)*(m : ℝ) + have hmk : 2*m ≤ k := by omega + have hmk' : (2 : ℝ)*(m : ℝ) ≤ (k : ℝ) := by exact_mod_cast hmk + have he : (1/10 : ℝ) ≤ e := by dsimp [e]; linarith + have hratio : (t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m = t^e*t := by + rw [← Real.rpow_natCast,← Real.rpow_mul ht.le,scale_quotient_product ht] + conv_rhs => rhs; rw [← Real.rpow_one t] + rw [← Real.rpow_add ht] + congr 1 + dsimp [e] + ring + have hbound : C m*t^e ≤ ρ := by + calc + _ ≤ M*t^e := mul_le_mul_of_nonneg_right (hCM m hm) (Real.rpow_nonneg ht.le _) + _ ≤ M*t^(1/10 : ℝ) := mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow_of_exponent_ge ht ht1 he) hM.le + _ ≤ ρ := (h₄ t ht (hsmall.trans_le hε4)).le + calc + _ = C m*((t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m) := by ring + _ = (C m*t^e)*t := by rw [hratio]; ring + _ ≤ ρ*t := mul_le_mul_of_nonneg_right hbound ht.le + +/-- One threshold allows either retaining the current order or increasing it +by one. The retained-order amplitude is the larger of the two possibilities. -/ +theorem fixed_order_threshold_hold_advance (k : ℕ) (hk : 10 ≤ k) + (ρ a η D B K : ℝ) (hρ : 0 < ρ) (ha : 0 < a) (hη : 0 < η) + (hD : 0 ≤ D) (hB : 0 ≤ B) (hK : 0 ≤ K) (C : ℕ → ℝ) : + ∃ ε : ℝ, 0 < ε ∧ ε ≤ 1 ∧ ∀ t : ℝ, 0 < t → t < ε → + ∀ j : ℕ, k ≤ j → j ≤ k+1 → + t^(6/5 : ℝ)/t^(11/10 : ℝ) ≤ η ∧ + D*B*(t^(11/10 : ℝ)/t)^(40*(k+1)) ≤ min (ρ/4) (a/8) ∧ + (t^((6/5 : ℝ)*(j : ℝ))/t^(k : ℝ))^(2 : ℕ)*K ≤ a/8 ∧ + (∀ m ≤ k/2, C m*(t^(k : ℝ)*t^(6/5 : ℝ))/(t^(6/5 : ℝ))^m ≤ ρ*t) ∧ + t^((6/5 : ℝ)*(j : ℝ)) ≤ t^(k : ℝ) ∧ + t^((6/5 : ℝ)*((k : ℝ)+1)) ≤ t^((6/5 : ℝ)*(j : ℝ)) := by + obtain ⟨ε₀,hε₀,hε₀1,hbase⟩ := fixed_order_threshold k hk ρ a η D B K + hρ ha hη hD hB hK C + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + obtain ⟨ε₁,hε₁,_,hhold⟩ := positive_power_threshold K ((2/5 : ℝ)*(k : ℝ)) + (a/8) (by linarith) (by positivity) + refine ⟨min ε₀ ε₁,lt_min hε₀ hε₁,(min_le_left _ _).trans hε₀1,?_⟩ + intro t ht htε j hkj hjk + have htε₀ : t < ε₀ := htε.trans_le (min_le_left _ _) + have htε₁ : t < ε₁ := htε.trans_le (min_le_right _ _) + have ht1 : t ≤ 1 := htε₀.le.trans hε₀1 + obtain ⟨hηt,htail,_,hderiv⟩ := hbase t ht htε₀ + have hkj' : (k : ℝ) ≤ j := by exact_mod_cast hkj + have hjk' : (j : ℝ) ≤ (k : ℝ)+1 := by exact_mod_cast hjk + have hamplitude : t^((6/5 : ℝ)*(j : ℝ)) ≤ t^((6/5 : ℝ)*(k : ℝ)) := + Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + have hratio : t^((6/5 : ℝ)*(j : ℝ))/t^(k : ℝ) ≤ + t^((6/5 : ℝ)*(k : ℝ))/t^(k : ℝ) := + div_le_div_of_nonneg_right hamplitude (Real.rpow_nonneg ht.le _) + have hholdpow : (t^((6/5 : ℝ)*(k : ℝ))/t^(k : ℝ))^(2 : ℕ) = + t^((2/5 : ℝ)*(k : ℝ)) := by + rw [← Real.rpow_sub ht,← Real.rpow_natCast,← Real.rpow_mul ht.le] + congr 1 + ring + refine ⟨hηt,htail,?_,hderiv,?_,?_⟩ + · calc + _ ≤ (t^((6/5 : ℝ)*(k : ℝ))/t^(k : ℝ))^(2 : ℕ)*K := + mul_le_mul_of_nonneg_right (pow_le_pow_left₀ + (div_nonneg (Real.rpow_nonneg ht.le _) (Real.rpow_nonneg ht.le _)) hratio 2) hK + _ = K*t^((2/5 : ℝ)*(k : ℝ)) := by rw [hholdpow,mul_comm] + _ ≤ a/8 := (hhold t ht htε₁).le + · exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + · exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by linarith) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e5340af25a9abcdb6a777d12019589c812e8bb3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatExtension.lean @@ -0,0 +1,32 @@ +import Mathlib + +namespace OAI + +/-! Smooth zero extensions are flat at the boundary of their zero region. -/ + +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4 + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Vanishing on an open region forces every derivative to vanish on its closure. -/ +theorem iteratedFDeriv_zero_on_closure {F : A → E} (hF : ContDiff ℝ ∞ F) + {O : Set A} (hO : IsOpen O) (hz : ∀ p ∈ O, F p = 0) (n : ℕ) : + Set.EqOn (iteratedFDeriv ℝ n F) (fun _ => 0) (closure O) := by + have ho : Set.EqOn (iteratedFDeriv ℝ n F) (fun _ => 0) O := by + intro p hp + have he : F =ᶠ[𝓝 p] (fun _ : A => (0 : E)) := by + filter_upwards [hO.mem_nhds hp] with q hq + exact hz q hq + have hd := (he.iteratedFDeriv ℝ n).eq_of_nhds + simpa only [iteratedFDeriv_fun_zero, Pi.zero_apply] using hd + exact ho.closure (hF.continuous_iteratedFDeriv (by simp)) continuous_const + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstHolder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstHolder.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a59894f233b9cdceafee2c45a5653f73d7cbdde --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstHolder.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarFlatCriticalValues + +namespace OAI + +/-! Quadratic control on the rank-zero stratum. In dimensions three to + two and four to three it makes the critical image Hausdorff-null. -/ +noncomputable section +open Set Filter Metric MeasureTheory +open scoped ContDiff Topology NNReal ENNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] +local instance flatFirstNormed : NormedAddCommGroup (E →L[ℝ] F) := inferInstance +local instance flatFirstSpace : NormedSpace ℝ (E →L[ℝ] F) := inferInstance +local instance flatSecondNormed : NormedAddCommGroup (E →L[ℝ] E →L[ℝ] F) := inferInstance +local instance flatSecondSpace : NormedSpace ℝ (E →L[ℝ] E →L[ℝ] F) := inferInstance + +omit [FiniteDimensional ℝ E] in +lemma flat_first_quadratic_bound {f : E → F} (hf : ContDiff ℝ ∞ f) + (x y : E) (hfirst : fderiv ℝ f x = 0) {M : ℝ} (hM : 0 ≤ M) + (hsecond : ∀ z ∈ closedBall x ‖y-x‖, ‖fderiv ℝ (fderiv ℝ f) z‖ ≤ M) : + ‖f y-f x‖ ≤ M*‖y-x‖^2 := by + let d := ‖y-x‖ + have hd : 0 ≤ d := norm_nonneg _ + let B := closedBall x d + have hx : x ∈ B := mem_closedBall_self hd + have hy : y ∈ B := by simp only [B,d,mem_closedBall,dist_eq_norm,le_refl] + have hD := hf.fderiv_right (m := ∞) (by simp) + have hfirst_bound (z : E) (hz : z ∈ B) : ‖fderiv ℝ f z‖ ≤ M*d := by + have h := (convex_closedBall x d).norm_image_sub_le_of_norm_fderiv_le + (fun w _ => hD.differentiable (by simp) w) hsecond hx hz + rw [hfirst,sub_zero] at h + exact h.trans (mul_le_mul_of_nonneg_left (by simpa only [dist_eq_norm] using (mem_closedBall.mp hz)) hM) + have h := (convex_closedBall x d).norm_image_sub_le_of_norm_fderiv_le + (fun w _ => hf.differentiable (by simp) w) hfirst_bound hx hy + calc + _ ≤ (M*d)*‖y-x‖ := h + _ = M*‖y-x‖^2 := by dsimp [d]; ring + +theorem flat_first_local_holder {f : E → F} (hf : ContDiff ℝ ∞ f) (p : E) : + ∃ C : ℝ≥0, HolderOnWith C 2 f ({x | fderiv ℝ f x = 0} ∩ ball p (1/4)) := by + have hD := hf.fderiv_right (m := ∞) (by simp) + have hc := hD.continuous_fderiv (by simp) + obtain ⟨M,hM⟩ := (isCompact_closedBall p 1).exists_bound_of_continuousOn hc.continuousOn + let C : ℝ≥0 := ⟨max M 0,le_max_right _ _⟩ + refine ⟨C,?_⟩ + intro x hx y hy + have hsub : closedBall y ‖x-y‖ ⊆ closedBall p 1 := by + intro z hz + have hzp := dist_triangle z y p + have hxy := dist_triangle x p y + have hz' : dist z y ≤ dist x y := by simpa only [mem_closedBall,dist_eq_norm] using hz + have hxp : dist x p < 1/4 := hx.2 + have hyp : dist y p < 1/4 := hy.2 + rw [dist_comm p y] at hxy + change dist z p ≤ 1 + linarith + have hbound : ‖f x-f y‖ ≤ (C:ℝ)*‖x-y‖^2 := + flat_first_quadratic_bound hf y x hy.1 C.2 (fun z hz => + (hM z (hsub hz)).trans (le_max_left _ _)) + change edist (f x) (f y) ≤ (C : ℝ≥0∞)*edist x y ^ (2 : ℝ) + rw [edist_dist,edist_dist,show (2 : ℝ) = (2 : ℕ) by norm_num,ENNReal.rpow_natCast] + have he := ENNReal.ofReal_le_ofReal hbound + rw [ENNReal.ofReal_mul (p := (C:ℝ)) C.2, + ENNReal.ofReal_pow (norm_nonneg (x-y)) 2,ENNReal.ofReal_coe_nnreal] at he + simpa only [dist_eq_norm] using he + +theorem flat_first_image_dimH {f : E → F} (hf : ContDiff ℝ ∞ f) : + dimH (f '' {x | fderiv ℝ f x = 0}) ≤ (Module.finrank ℝ E : ℝ≥0∞)/2 := by + have hholder : dimH (f '' {x | fderiv ℝ f x = 0}) ≤ + dimH {x | fderiv ℝ f x = 0}/(2 : ℝ≥0∞) := by + apply dimH_image_le_of_locally_holder_on (by norm_num : (0 : ℝ≥0) < 2) + intro p hp + obtain ⟨C,hC⟩ := flat_first_local_holder hf p + exact ⟨C,_,inter_mem_nhdsWithin _ (ball_mem_nhds _ (by norm_num)),hC⟩ + have hdim : dimH {x | fderiv ℝ f x = 0} ≤ (Module.finrank ℝ E : ℝ≥0∞) := by + exact (dimH_mono (subset_univ _)).trans_eq (Real.dimH_univ_eq_finrank E) + exact hholder.trans (ENNReal.div_le_div_right hdim _) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstNull.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstNull.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ba2fb8d002cccfbbca924ae75526e36401e846a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatFirstNull.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FlatFirstHolder +import Mathlib.MeasureTheory.Measure.Haar.Unique + +namespace OAI + +/-! The rank-zero stratum is null when half the domain dimension is +strictly below the target dimension. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff Topology ENNReal NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] + [FiniteDimensional ℝ F] [MeasurableSpace F] [BorelSpace F] + +local instance flatNullFirstNormed : NormedAddCommGroup (E →L[ℝ] F) := inferInstance +local instance flatNullFirstSpace : NormedSpace ℝ (E →L[ℝ] F) := inferInstance + +theorem flat_first_image_null (μ : Measure F) [Measure.IsAddHaarMeasure μ] + {f : E → F} (hf : ContDiff ℝ ∞ f) + (hdim : (Module.finrank ℝ E : ℝ≥0∞)/2 < Module.finrank ℝ F) : + μ (f '' {x | fderiv ℝ f x = 0}) = 0 := by + let : SecondCountableTopology F := inferInstance + let : LocallyCompactSpace F := inferInstance + let : SigmaFinite μ := inferInstance + have hd : dimH (f '' {x | fderiv ℝ f x = 0}) < Module.finrank ℝ F := + (flat_first_image_dimH hf).trans_lt hdim + have hd' : dimH (f '' {x | fderiv ℝ f x = 0}) < + ((Module.finrank ℝ F : ℝ≥0) : ℝ≥0∞) := by + simpa only [ENNReal.coe_natCast] using hd + have hh' := hausdorffMeasure_of_dimH_lt (d := (Module.finrank ℝ F : ℝ≥0)) hd' + have hh : μH[(Module.finrank ℝ F : ℝ)] (f '' {x | fderiv ℝ f x = 0}) = 0 := by + simpa only [NNReal.coe_natCast] using hh' + have hμ : μ ≪ (μH[(Module.finrank ℝ F : ℝ)] : Measure F) := + Measure.absolutelyContinuous_isAddHaarMeasure μ (μH[(Module.finrank ℝ F : ℝ)] : Measure F) + exact hμ hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatSecondJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatSecondJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..da41f4c422993919360e8627f8cf8a158a722ba0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FlatSecondJetBounds.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionJet + +namespace OAI + +/-! Scale bounds for a remainder with vanishing value and first derivative. +The second derivative bound tends to zero for a flat second jet. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma flat_first_derivative_bound {R : Base → ProjectionTarget 3} + (hR : ContDiff ℝ ∞ R) (hD0 : fderiv ℝ R 0 = 0) + {r M : ℝ} (hr : 0 ≤ r) + (hb : ∀ x ∈ Metric.closedBall (0 : Base) r, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ M) + {x : Base} (hx : x ∈ Metric.closedBall (0 : Base) r) : + ‖fderiv ℝ R x‖ ≤ M*‖x‖ := by + have hd : ∀ y ∈ Metric.closedBall (0 : Base) r, DifferentiableAt ℝ (fderiv ℝ R) y := + fun y _ => (hR.fderiv_right (m := ∞) (by simp)).differentiable (by simp) y + have h := (convex_closedBall (0 : Base) r).norm_image_sub_le_of_norm_fderiv_le + hd hb (Metric.mem_closedBall_self hr) hx + simpa only [hD0,sub_zero] using h + +lemma flat_value_bound {R : Base → ProjectionTarget 3} + (hR : ContDiff ℝ ∞ R) (h0 : R 0 = 0) (hD0 : fderiv ℝ R 0 = 0) + {r M : ℝ} (hr : 0 ≤ r) (hM : 0 ≤ M) + (hb : ∀ x ∈ Metric.closedBall (0 : Base) r, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ M) + {x : Base} (hx : x ∈ Metric.closedBall (0 : Base) r) : + ‖R x‖ ≤ M*r*‖x‖ := by + have hD : ∀ y ∈ Metric.closedBall (0 : Base) r, ‖fderiv ℝ R y‖ ≤ M*r := by + intro y hy + apply (flat_first_derivative_bound hR hD0 hr hb hy).trans + exact mul_le_mul_of_nonneg_left (by simpa only [Metric.mem_closedBall,dist_zero_right] using hy) hM + have h := (convex_closedBall (0 : Base) r).norm_image_sub_le_of_norm_fderiv_le + (fun y _ => hR.differentiable (by simp) y) hD (Metric.mem_closedBall_self hr) hx + simpa only [h0,sub_zero] using h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenBoundaryCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenBoundaryCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf70fb3e6ca810d83f6c75146f06beeb74cd3dbd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenBoundaryCoefficients.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.FrozenCircularData +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityTurnDominance + +namespace OAI + +/-! The canonical profile coefficients have the same fixed bounds and turn +mechanism as the explicit circular velocity used to construct the loop. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame RealModes VelocityFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def circularSpatialProfile (Q X Y C : E → Vec) (R : E → ℝ) + (e₁ e₂ : E → Vec) (α : E → ℝ) (β : ℝ) (x d : E) : BoundaryProfile := + circularBoundaryProfile (X x) (Y x) (C x) + (fderiv ℝ (fun y => Q y+R y • direction (e₁ y) (e₂ y) (α y)) x d) + (e₁ x) (e₂ x) (R x) (α x) β + +lemma circularSpatialProfile_size (Q X Y C : E → Vec) (R : E → ℝ) + (e₁ e₂ : E → Vec) (α : E → ℝ) (β : ℝ) (x d : E) : + profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 0 = + frozenSize X Y C R e₁ e₂ (x,α x) := rfl + +lemma circularSpatialProfile_first {Q X Y C e₁ e₂ : E → Vec} {R α : E → ℝ} + {x d : E} (β : ℝ) (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) : + profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 1 = + frozenFirst Q X Y C R e₁ e₂ d (x,α x) := + actual_first_eq_frozen hQ hR h₁ h₂ hα hframe + +/-- Large transverse angular derivative gives a large canonical mixed +coefficient; the threshold uses no derivative of the chosen angular phase. -/ +theorem circularSpatialProfile_mixed_dominates {Q X Y C e₁ e₂ : E → Vec} + {R α : E → ℝ} {x d : E} (β : ℝ) {r B T : ℝ} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) + (hD : gramDet (Y x) (C x) ≠ 0) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hr : 0 < r) (hRx : r ≤ R x) (hB : 0 ≤ B) (hT : 0 ≤ T) + (hbound : ‖spatialError Q R e₁ e₂ α x d‖ ≤ B) + (hlarge : (T+4*B+1)/r < fderiv ℝ α x d) : + T+1 < |profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 2| := by + have hunit := angularDirection_unit hframe.1 hframe.2.1 hframe.2.2.1 (α x) + have hdom := circular_turn_dominates hQ hR h₁ h₂ hα hunit hr hRx hB hT hbound hlarge + have he := (circularBoundaryProfile_coefficients (X := X x) + (W := fderiv ℝ (fun y => Q y+R y • direction (e₁ y) (e₂ y) (α y)) x d) + (α := α x) (β := β) hD (hr.trans_le hRx).ne' + hframe.1 hframe.2.1 hframe.2.2.1 hframe.2.2.2.1 hframe.2.2.2.2.2.1 + hframe.2.2.2.2.1 hframe.2.2.2.2.2.2).1 + change T+1 < |profileCoefficients + (circularBoundaryProfile (X x) (Y x) (C x) _ (e₁ x) (e₂ x) (R x) (α x) β) 2| + rw [he] + exact hdom.trans_le (le_abs_self _) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCleanPairs.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCleanPairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d63790c18e918f9a5c73b27def5f613a3002b03 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCleanPairs.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CleanSurfacePairs + +namespace OAI + +/-! Frozen translation germs preserve both clean coincidences and their regularity. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma FrozenTranslationGerms.clean_pair {A : ι → Set M} {f g : M → ProjectionTarget 3} + (h : FrozenTranslationGerms A f g) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (S : Set M) (i : ι) {x y : M} (hx : x ∈ A i) (hy : y ∈ A i) + (hclean : (x,y) ∈ cleanSurfacePairs f S) : (x,y) ∈ cleanSurfacePairs g S := by + apply mem_cleanSurfacePairs.mpr + intro heq + have hh := (mem_cleanSurfacePairs.mp hclean) ((h.coincidence_iff i hx hy).mp heq) + refine ⟨hh.1,hh.2.1,?_⟩ + rw [h.pairDerivative_eq hf i hx hy] + exact hh.2.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCoefficientBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCoefficientBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3cb5f09991db289179216f424126e0e8bb62c1f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenCoefficientBounds.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenBoundaryCoefficients +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle + +namespace OAI + +/-! The metric and first-normal bounds precede every choice of large angular +jet: they are uniform over the entire circle of angular values. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma frozenSize_pos {X Y C e₁ e₂ : E → Vec} {R : E → ℝ} {x : E} + (hD : gramDet (Y x) (C x) ≠ 0) (hR : R x ≠ 0) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (α : ℝ) : 0 < frozenSize X Y C R e₁ e₂ (x,α) := by + apply normalSize_positive hD + · simp [direction,dotProduct_smul,dotProduct_add,hframe.2.2.2.1,hframe.2.2.2.2.2.1] + · simp [direction,dotProduct_smul,dotProduct_add,hframe.2.2.2.2.1,hframe.2.2.2.2.2.2] + · apply smul_ne_zero hR + intro he + have hh := direction_unit hframe.1 hframe.2.1 hframe.2.2.1 α + rw [he] at hh + norm_num at hh + +theorem compact_frozen_coefficient_bounds {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hR0 : ∀ x ∈ U, R x ≠ 0) (d : E) : + ∃ sLo sHi B : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ B ∧ ∀ x ∈ K, ∀ α : ℝ, + sLo ≤ frozenSize X Y C R e₁ e₂ (x,α) ∧ + frozenSize X Y C R e₁ e₂ (x,α) ≤ sHi ∧ + |frozenFirst Q X Y C R e₁ e₂ d (x,α)| ≤ B := by + obtain ⟨hfirst,hsize⟩ := frozen_coefficients_smoothOn hU hQ hX hY hC hR h₁ h₂ hD hframe hR0 d + let Z : Set (E × ℝ) := K ×ˢ Icc (-Real.pi) Real.pi + have hZ : IsCompact Z := hK.prod isCompact_Icc + have hZU : Z ⊆ U ×ˢ univ := fun z hz => ⟨hKU hz.1,mem_univ _⟩ + have hs : ContinuousOn (frozenSize X Y C R e₁ e₂) Z := hsize.continuousOn.mono hZU + have hf : ContinuousOn (frozenFirst Q X Y C R e₁ e₂ d) Z := hfirst.continuousOn.mono hZU + rcases K.eq_empty_or_nonempty with hempty | hne + · refine ⟨1,1,0,zero_lt_one,zero_lt_one,le_rfl,?_⟩ + simp [hempty] + have hZne : Z.Nonempty := by + obtain ⟨x,hx⟩ := hne + exact ⟨(x,0),hx,by constructor <;> linarith [Real.pi_pos]⟩ + obtain ⟨z,hz,hmin⟩ := hZ.exists_isMinOn hZne hs + obtain ⟨S,hS⟩ := hZ.exists_bound_of_continuousOn hs + obtain ⟨B,hB⟩ := hZ.exists_bound_of_continuousOn hf + refine ⟨frozenSize X Y C R e₁ e₂ z,max 1 S,max 0 B, + frozenSize_pos (hD z.1 (hKU hz.1)) (hR0 z.1 (hKU hz.1)) (hframe z.1 (hKU hz.1)) z.2, + lt_of_lt_of_le zero_lt_one (le_max_left _ _),le_max_left _ _,?_⟩ + intro x hx α + let θ := (α : Real.Angle).toReal + have hθ : θ ∈ Icc (-Real.pi) Real.pi := + ⟨(Real.Angle.toReal_mem_Ioc (α : Real.Angle)).1.le,(Real.Angle.toReal_mem_Ioc (α : Real.Angle)).2⟩ + have hcos : Real.cos θ = Real.cos α := (Real.Angle.cos_toReal _).trans (Real.Angle.cos_coe _) + have hsin : Real.sin θ = Real.sin α := (Real.Angle.sin_toReal _).trans (Real.Angle.sin_coe _) + have hsizeEq : frozenSize X Y C R e₁ e₂ (x,θ) = frozenSize X Y C R e₁ e₂ (x,α) := by + simp only [frozenSize,direction,hcos,hsin] + have hfirstEq : frozenFirst Q X Y C R e₁ e₂ d (x,θ) = + frozenFirst Q X Y C R e₁ e₂ d (x,α) := by + simp only [frozenFirst,frozenError,frozenNormal,direction,hcos,hsin] + have hxθ : (x,θ) ∈ Z := ⟨hx,hθ⟩ + rw [← hsizeEq,← hfirstEq] + exact ⟨hmin hxθ,(le_abs_self _).trans ((hS _ hxθ).trans (le_max_right _ _)), + (hB _ hxθ).trans (le_max_right _ _)⟩ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenGermDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenGermDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..582d46bae37b199fc925d956787c3d99a481baa1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenGermDerivative.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms + +namespace OAI + +/-! Translation germs preserve the full first derivative, and hence +preserve the prepared singularities on the frozen neighborhoods. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma mfderiv_eq_of_translation_germ {f g : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {x : M} {a : ProjectionTarget 3} (he : g =ᶠ[𝓝 x] (fun y => f y+a)) : + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x = + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x := by + rw [he.mfderiv_eq] + apply ContinuousLinearMap.ext + intro v + change (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (f + fun _ => a) x) v = _ + rw [mfderiv_add ((hf x).mdifferentiableAt (by simp)) mdifferentiableAt_const,mfderiv_const] + change (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) v+0 = _ + exact add_zero _ + +lemma FrozenTranslationGerms.mfderiv_eq {A : ι → Set M} {f g : M → ProjectionTarget 3} + (h : FrozenTranslationGerms A f g) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (i : ι) {x : M} (hx : x ∈ A i) : + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x = + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x := by + obtain ⟨a,ha⟩ := h i + exact mfderiv_eq_of_translation_germ hf (ha.filter_mono (nhds_le_nhdsSet hx)) + +theorem frozen_immersion_equivalence {A : ι → Set M} {B : Set M} + (hcover : B ∪ ⋃ i, A i = univ) {f g : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (h : FrozenTranslationGerms A f g) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hIg : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) : + ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) := by + intro x + have hx : x ∈ B ∪ ⋃ i, A i := by rw [hcover]; trivial + rcases hx with hx | hx + · exact iff_of_true (hIg x hx) (hIf x hx) + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx + rw [h.mfderiv_eq hf i hi] + exact Iff.rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenPairGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenPairGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ebc1a7853bb07ef04d13de811eebf436f9c99d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenPairGeometry.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenGermDerivative +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceRegularPairLocus + +namespace OAI + +/-! Translations on an entire frozen neighborhood preserve its internal +coincidences and their transverse tangent-plane geometry. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] [ChartedSpace Plane M] in +lemma FrozenTranslationGerms.coincidence_iff {A : ι → Set M} {f g : M → ProjectionTarget 3} + (h : FrozenTranslationGerms A f g) (i : ι) {x y : M} (hx : x ∈ A i) (hy : y ∈ A i) : + g x = g y ↔ f x = f y := by + obtain ⟨a,ha⟩ := h i + have hxg := (ha.filter_mono (nhds_le_nhdsSet hx)).self_of_nhds + have hyg := (ha.filter_mono (nhds_le_nhdsSet hy)).self_of_nhds + change g x = f x+a at hxg + change g y = f y+a at hyg + rw [hxg,hyg,add_left_inj] + +omit [IsManifold planeModel ∞ M] in +lemma FrozenTranslationGerms.pairDerivative_eq {A : ι → Set M} {f g : M → ProjectionTarget 3} + (h : FrozenTranslationGerms A f g) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (i : ι) {x y : M} (hx : x ∈ A i) (hy : y ∈ A i) : + surfacePairDerivative g x y = surfacePairDerivative f x y := by + unfold surfacePairDerivative + rw [h.mfderiv_eq hf i hx,h.mfderiv_eq hf i hy] + rfl + +omit [IsManifold planeModel ∞ M] in +lemma FrozenTranslationGerms.regular_pair {A : ι → Set M} {f g : M → ProjectionTarget 3} + (h : FrozenTranslationGerms A f g) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (i : ι) {x y : M} (hx : x ∈ A i) (hy : y ∈ A i) + (hreg : (x,y) ∈ regularSurfacePairs f) : (x,y) ∈ regularSurfacePairs g := by + rcases hreg with hreg | hreg + · exact Or.inl fun hxy => hreg ((h.coincidence_iff i hx hy).mp hxy) + · exact Or.inr (by rwa [h.pairDerivative_eq hf i hx hy]) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenTranslationGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenTranslationGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e38cc66752e9da4523f305fa72fdcc898a2bbfa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/FrozenTranslationGerms.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FixedSurfacePairPatch + +namespace OAI + +/-! Translation germs on frozen closed neighborhoods are retained by +finite compositions of the constructed scalar translation families. -/ +noncomputable section +open Set Filter +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] + +def FrozenTranslationGerms (A : ι → Set M) (f g : M → ProjectionTarget 3) : Prop := + ∀ i, ∃ c : ProjectionTarget 3, g =ᶠ[𝓝ˢ (A i)] (fun x => f x+c) + +lemma frozenTranslationGerms_refl (A : ι → Set M) (f : M → ProjectionTarget 3) : + FrozenTranslationGerms A f f := by + intro i + exact ⟨0,Filter.Eventually.of_forall fun _ => (add_zero _).symm⟩ + +lemma FrozenTranslationGerms.trans {A : ι → Set M} {f g h : M → ProjectionTarget 3} + (hfg : FrozenTranslationGerms A f g) (hgh : FrozenTranslationGerms A g h) : + FrozenTranslationGerms A f h := by + intro i + obtain ⟨a,ha⟩ := hfg i + obtain ⟨b,hb⟩ := hgh i + refine ⟨a+b,?_⟩ + filter_upwards [ha,hb] with x hax hbx + rw [hbx,hax,add_assoc] + +lemma frozenTranslationGerms_translate {A : ι → Set M} {χ : M → ℝ} + (hχ : ∀ i, (χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ (χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1))) + (f : M → ProjectionTarget 3) (a : ProjectionTarget 3) : + FrozenTranslationGerms A f (surfaceTranslation f χ a) := by + intro i + rcases hχ i with h0 | h1 + · refine ⟨0,?_⟩ + filter_upwards [h0] with x hx + simp only [surfaceTranslation,hx,zero_smul] + · refine ⟨a,?_⟩ + filter_upwards [h1] with x hx + simp only [surfaceTranslation,hx,one_smul] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericProjectionParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericProjectionParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..25d42e2d8319540002018f0c9a44bf48236a5417 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericProjectionParameter.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectionDirections +import OAI.Geometry.SurfaceImmersion.Geometry.LowerDimensionalRange + +namespace OAI + +/-! A common graph direction avoids every tangent plane in a finite family +of smooth surface-coordinate derivatives when the projection target has +dimension at least four. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {n : ℕ} +abbrev ProjectionTarget (n : ℕ) := EuclideanSpace ℝ (Fin n) + +def tangentSlope (H : Base → Base →L[ℝ] ProjectionTarget n × ℝ) + (b : Bool) (z : Base × ℝ) : ProjectionTarget n := + ((H z.1 (tangentRay b z.2)).2)⁻¹ • (H z.1 (tangentRay b z.2)).1 + +def tangentSlopeDomain (H : Base → Base →L[ℝ] ProjectionTarget n × ℝ) + (b : Bool) : Set (Base × ℝ) := + {z | (H z.1 (tangentRay b z.2)).2 ≠ 0} + +lemma tangentSlopeDomain_open {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + (hH : ContDiff ℝ ∞ H) (b : Bool) : IsOpen (tangentSlopeDomain H b) := by + exact isOpen_compl_singleton.preimage ((hH.comp contDiff_fst).clm_apply + ((tangentRay_smooth b).comp contDiff_snd)).continuous.snd + +lemma tangentSlope_smoothOn {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + (hH : ContDiff ℝ ∞ H) (b : Bool) : + ContDiffOn ℝ ∞ (tangentSlope H b) (tangentSlopeDomain H b) := by + have h := (hH.comp contDiff_fst).clm_apply + ((tangentRay_smooth b).comp contDiff_snd) + exact (h.snd.contDiffOn.inv (fun _ hx => hx)).smul h.fst.contDiffOn + +theorem tangentSlope_image_null (hn : 4 ≤ n) + {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + (hH : ContDiff ℝ ∞ H) (b : Bool) : + volume (tangentSlope H b '' tangentSlopeDomain H b) = 0 := + PublishedInputs.smooth_coordinate_parameter_image_null hn _ _ + (tangentSlopeDomain_open hH b) (tangentSlope_smoothOn hH b) + +/-- The excluded parameters form a null set; therefore the projection can +be chosen in any prescribed nonempty open set of graph parameters. -/ +theorem exists_common_projection_parameter (hn : 4 ≤ n) + {ι : Type*} [Countable ι] + (H : ι → Base → Base →L[ℝ] ProjectionTarget n × ℝ) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) + (U : Set (ProjectionTarget n)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ a ∈ U, ∀ i x, Function.Injective (H i x) → + Function.Injective ((graphProjection a).comp (H i x)) := by + let bad : Set (ProjectionTarget n) := + ⋃ i, ⋃ b : Bool, tangentSlope (H i) b '' tangentSlopeDomain (H i) b + have hbad : volume bad = 0 := + measure_iUnion_null (fun i => measure_iUnion_null (fun b => + tangentSlope_image_null hn (hH i) b)) + have hae : ∀ᵐ a ∂volume, a ∉ bad := by + simp only [ae_iff, not_not] + change volume bad = 0 + exact hbad + obtain ⟨a,hUa,ha⟩ := (Measure.dense_of_ae hae).inter_open_nonempty U hU hne + refine ⟨a,hUa,fun i x hi => graphProjection_comp_injective a (H i x) hi ?_⟩ + intro b t ht he + apply ha + exact mem_iUnion.mpr ⟨i,mem_iUnion.mpr ⟨b,⟨(x,t),ht,he.symm⟩⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericRadiusParameters.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericRadiusParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..87fc290b9f8c5a847a57c87f3275da1edb7899fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericRadiusParameters.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactRegularParameters +import OAI.Geometry.SurfaceImmersion.Geometry.LowerDimensionalImage + +namespace OAI + +/-! Simultaneous independent radius selection. Pair projections avoid +critical values and triple projections avoid surface images in three +coordinates, within every allowed open parameter box. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PublishedInputs + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] +variable {ι κ : Type*} [Countable ι] [Countable κ] + +theorem exists_generic_radius_parameters + (pair : ι → E →L[ℝ] Plane) (hpair : ∀ i, Function.Surjective (pair i)) + (triple : κ → E →L[ℝ] (Plane × ℝ)) (htriple : ∀ j, Function.Surjective (triple j)) + (f : ι → Plane → Plane) (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (K : ι → Set Plane) (hK : ∀ i, IsCompact (K i)) + (g : κ → Plane → Plane × ℝ) (hg : ∀ j, ContDiff ℝ ∞ (g j)) + (L : κ → Set Plane) (hL : ∀ j, IsCompact (L j)) + (U : Set E) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ t ∈ U, + (∀ i x, x ∈ K i → f i x = pair i t → Function.Surjective (fderiv ℝ (f i) x)) ∧ + (∀ i, (K i ∩ {x | f i x = pair i t}).Finite) ∧ + ∀ j x, x ∈ L j → g j x ≠ triple j t := by + let O : Sum ι κ → Set E + | .inl i => (pair i) ⁻¹' compactRegularValues (f i) (K i) + | .inr j => (triple j) ⁻¹' (g j '' L j)ᶜ + have ho : ∀ a, IsOpen (O a) := by + intro a + cases a with + | inl i => + exact (compact_regular_values_open_dense (f i) (hf i) (hK i)).1.preimage + (pair i).continuous + | inr j => + exact (compact_surface_image_open_dense (g j) (hg j) (hL j)).1.preimage + (triple j).continuous + have hd : ∀ a, Dense (O a) := by + intro a + cases a with + | inl i => + exact (compact_regular_values_open_dense (f i) (hf i) (hK i)).2.preimage + ((pair i).isOpenMap (hpair i)) + | inr j => + exact (compact_surface_image_open_dense (g j) (hg j) (hL j)).2.preimage + ((triple j).isOpenMap (htriple j)) + obtain ⟨t,htU,ht⟩ := (dense_iInter_of_isOpen ho hd).inter_open_nonempty U hU hne + have hreg (i : ι) : ∀ x ∈ K i, f i x = pair i t → + Function.Surjective (fderiv ℝ (f i) x) := mem_iInter.mp ht (Sum.inl i) + refine ⟨t,htU,hreg,fun i => finite_compact_regular_fiber (hf i) (hK i) _ (hreg i),?_⟩ + intro j x hx he + have hn : triple j t ∉ g j '' L j := mem_iInter.mp ht (Sum.inr j) + exact hn ⟨x,hx,he⟩ + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericSurfaceLevels.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericSurfaceLevels.lean new file mode 100644 index 0000000000000000000000000000000000000000..f88e9b5453b5af9e5aece780c4c7f8088b20c379 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GenericSurfaceLevels.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GenericCoordinateLevels +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Generic levels of actual smooth functions on a closed surface. Finite +chart extensions reduce the selection to the proved Euclidean Sard input; +no coordinate extension or transversality premise is assumed. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PublishedInputs +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem exists_generic_surface_levels (A : SmoothingAtlas M) + (ρ : ι → M → ℝ) (hρ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (ρ i)) + (U : Set (ι → ℝ)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ r ∈ U, + (∀ i j, i ≠ j → {p : M | ρ i p = r i ∧ ρ j p = r j}.Finite) ∧ + (∀ i j k, i ≠ j → i ≠ k → j ≠ k → + ∀ p : M, ¬ (ρ i p = r i ∧ ρ j p = r j ∧ ρ k p = r k)) ∧ + (∀ i j, i ≠ j → ∀ p : M, ρ i p = r i → ρ j p = r j → + ∃ q : M, p ∈ (chartAt Plane q).source ∧ + Function.Surjective (fderiv ℝ (fun y => radiusPairProjection i j + (fun k => ρ k ((chartAt Plane q).symm y))) (chartAt Plane q p))) := by + classical + let K : A.centers → Set Plane := fun a => (chartAt Plane (a : M)) '' tsupport (A.weight a) + have hsource (a : A.centers) : tsupport (A.weight a) ⊆ (chartAt Plane (a : M)).source := by + simpa only [chart_source] using A.weight_support a + have hK (a : A.centers) : IsCompact (K a) := + (isClosed_tsupport (A.weight a)).isCompact.image_of_continuousOn + ((chartAt Plane (a : M)).continuousOn.mono (hsource a)) + have hKt (a : A.centers) : K a ⊆ (chartAt Plane (a : M)).target := by + rintro x ⟨p,hp,rfl⟩ + exact (chartAt Plane (a : M)).map_source (hsource a hp) + have hs (a : A.centers) (i : ι) : ContDiffOn ℝ ∞ + (fun y => ρ i ((chartAt Plane (a : M)).symm y)) (chartAt Plane (a : M)).target := + ((hρ i).comp_contMDiffOn (contMDiffOn_chart_symm (I := planeModel) (x := (a : M)))).contDiffOn + choose W hW hKW hWt f hf he using fun a i => + CollarVelocity.compact_smooth_extension (hK a) (chartAt Plane (a : M)).open_target + (hKt a) (hs a i) + have hgerm (a : A.centers) (i : ι) {x : Plane} (hx : x ∈ K a) : + f a i =ᶠ[𝓝 x] (fun y => ρ i ((chartAt Plane (a : M)).symm y)) := by + filter_upwards [(hW a i).mem_nhds (hKW a i hx)] with y hy + exact he a i hy + obtain ⟨r,hr,hreg,hfinite,htriple⟩ := exists_generic_coordinate_levels f hf K hK U hU hne + have hcover (p : M) : ∃ a : A.centers, p ∈ tsupport (A.weight a) := by + by_contra hn + push Not at hn + have hz : ∀ a : A.centers, A.weight a p = 0 := + fun a => image_eq_zero_of_notMem_tsupport (hn a) + have hh := A.partition p + simp only [hz,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hh + exact zero_ne_one hh + have heval (a : A.centers) {p : M} (hp : p ∈ tsupport (A.weight a)) (i : ι) : + f a i (chartAt Plane (a : M) p) = ρ i p := by + rw [he a i (hKW a i ⟨p,hp,rfl⟩)] + change ρ i ((chartAt Plane (a : M)).symm (chartAt Plane (a : M) p)) = ρ i p + rw [(chartAt Plane (a : M)).left_inv (hsource a hp)] + refine ⟨r,hr,?_,?_,?_⟩ + · intro i j hij + have hfin : (⋃ a : A.centers, (chartAt Plane (a : M)).symm '' + (K a ∩ {x | f a i x = r i ∧ f a j x = r j})).Finite := + Set.finite_iUnion (fun a => (hfinite a i j hij).image _) + apply hfin.subset + intro p hp + obtain ⟨a,ha⟩ := hcover p + exact mem_iUnion.mpr ⟨a,⟨chartAt Plane (a : M) p, + ⟨⟨p,ha,rfl⟩,by + change f a i (chartAt Plane (a : M) p) = r i ∧ f a j (chartAt Plane (a : M) p) = r j + rw [heval a ha i,heval a ha j] + exact hp⟩, + (chartAt Plane (a : M)).left_inv (hsource a ha)⟩⟩ + · intro i j k hij hik hjk p hp + obtain ⟨a,ha⟩ := hcover p + apply htriple a i j k hij hik hjk (chartAt Plane (a : M) p) ⟨p,ha,rfl⟩ + simpa only [heval a ha i,heval a ha j,heval a ha k] using hp + · intro i j hij p hi hj + obtain ⟨a,ha⟩ := hcover p + let x : Plane := chartAt Plane (a : M) p + have hx : x ∈ K a := ⟨p,ha,rfl⟩ + have hh := hreg a i j hij x hx + ((heval a ha i).trans hi) ((heval a ha j).trans hj) + have heq : (fun y => radiusPairProjection i j (fun k => f a k y)) =ᶠ[𝓝 x] + (fun y => radiusPairProjection i j (fun k => ρ k ((chartAt Plane (a : M)).symm y))) := by + have hevery : ∀ᶠ y in 𝓝 x, ∀ k, f a k y = ρ k ((chartAt Plane (a : M)).symm y) := + eventually_all.mpr (fun k => hgerm a k hx) + filter_upwards [hevery] with y hy + congr 1 + funext k + exact hy k + exact ⟨(a : M),hsource a ha,by rw [← heq.fderiv_eq]; exact hh⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricCurvePaths.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricCurvePaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..c356148031d339ca6e70e947ff1596aff11a2701 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricCurvePaths.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveIncidenceGraph +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeParametrization +import Mathlib.Analysis.Convex.PathConnected + +namespace OAI + +/-! Convert paths in the finite incidence graph to actual continuous +paths in the compact double curve, using its retained interval maps. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +lemma CurveEdgeWitness.closure_pathConnected {V E : Set X} (w : CurveEdgeWitness V E) : + IsPathConnected (closure E) := by + let : PathConnectedSpace (Icc w.lo w.hi) := isPathConnected_iff_pathConnectedSpace.mp + ((convex_Icc w.lo w.hi).isPathConnected ⟨w.lo,le_rfl,w.ordered.le⟩) + rw [← w.param_range] + exact isPathConnected_range w.param_closedEmbedding.continuous + +def CurveEdgeWitness.middle {V E : Set X} (w : CurveEdgeWitness V E) : X := + w.param ⟨(w.lo+w.hi)/2,by constructor <;> linarith [w.ordered]⟩ + +omit [T2Space X] in +lemma CurveEdgeWitness.middle_mem {V E : Set X} (w : CurveEdgeWitness V E) : w.middle ∈ E := by + apply (congrArg (fun S : Set X => w.middle ∈ S) w.piece_eq).mpr + refine ⟨⟨(w.lo+w.hi)/2,by constructor <;> linarith [w.lower,w.upper,w.ordered]⟩,?_,rfl⟩ + constructor <;> linarith [w.ordered] + +def curveNodePoint {V : Set X} {P : Finset (Set X)} + (w : ∀ E : P, CurveEdgeWitness V E.val) : V ⊕ P → X + | Sum.inl v => v.val + | Sum.inr E => (w E).middle + +lemma curve_incidence_adj_joined {V : Set X} {P : Finset (Set X)} + (w : ∀ E : P, CurveEdgeWitness V E.val) {a b : V ⊕ P} + (h : (curveIncidenceGraph V P).Adj a b) : Joined (curveNodePoint w a) (curveNodePoint w b) := by + cases a with + | inl v => + cases b with + | inl u => exact False.elim h + | inr E => + exact ((w E).closure_pathConnected.joinedIn _ h _ + (subset_closure (w E).middle_mem)).joined + | inr E => + cases b with + | inl v => + exact ((w E).closure_pathConnected.joinedIn _ + (subset_closure (w E).middle_mem) _ h).joined + | inr F => exact False.elim h + +lemma curve_incidence_walk_joined {V : Set X} {P : Finset (Set X)} + (w : ∀ E : P, CurveEdgeWitness V E.val) {a b : V ⊕ P} + (p : (curveIncidenceGraph V P).Walk a b) : Joined (curveNodePoint w a) (curveNodePoint w b) := by + induction p with + | nil => exact Joined.refl _ + | cons h p ih => exact (curve_incidence_adj_joined w h).trans ih + +lemma curve_incidence_path_joined {V : Set X} {P : Finset (Set X)} + (w : ∀ E : P, CurveEdgeWitness V E.val) (p q : V) + (h : Nonempty ((curveIncidenceGraph V P).Path (Sum.inl p) (Sum.inl q))) : + Joined p.val q.val := by + obtain ⟨γ⟩ := h + exact curve_incidence_walk_joined w γ.val + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricNormalExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricNormalExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a47db850cfd29dc894ede96df50592f81fae702 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricNormalExtension.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceCurveNormalGluing +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceBoundaryMatching + +namespace OAI + +/-! Complete the global preferred-normal construction from the original +boundary crossing data and the local normal produced by the exact primitive. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes NormalFrame VelocityFrame GeometryPreservation +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [Fintype κ] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem geometric_normal_extension + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (curves : κ → PhaseBoundaryCurve B) + (hold : ∀ k p, p ∈ (curves k).carrier → (curves k).second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize ((curves k).second F p)) + (i : A.centers) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, A.weight i p ≠ 0) + (E : Set M) (hE : E.Finite) (hEf : Disjoint E (frontier D)) + (v : κ → SmallModes.Base → SmallModes.Base) (hv : ∀ k, Continuous (v k)) + (hvector : ∀ k p, p ∈ (curves k).carrier → p ∈ closure D → + v k (baseEquiv (e (chart (i : M) p))) = + fderiv ℝ (surfacePhaseTransition ((curves k).index : M) (curves k).phase (i : M) e) + ((curves k).coordinate p) dy) + (hboundary : ∀ p ∈ frontier D, + realSecondForm (A.phaseRealChartMap i e.symm F) dy dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (realSecondForm (A.phaseRealChartMap i e.symm F) + dy dy (baseEquiv (e (chart (i : M) p))))) + (hpositive : ∀ k p, p ∈ (curves k).carrier → p ∈ frontier D → + 0 < (curves k).second F p ⬝ᵥ spaceCoordinates (n.vector p)) + (hcross : ∀ k p, p ∈ (curves k).carrier → p ∈ frontier D → + let q := baseEquiv (e (chart (i : M) p)) + let H := A.phaseRealChartMap i e.symm F + 0 < orderedCrossing H dy (v k q) q + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) q)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ∀ h : SmoothMetric M, IsSmoothIsometricImmersion M h W → + ∀ b d : ℝ, 0 ≤ b → 0 ≤ d → b+d < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 d (W-V) → + (∀ p ∉ closure D, V =ᶠ[𝓝 p] G) → + ∀ z : ℝ, ∀ U₀ : Set SmallModes.Base, IsOpen U₀ → ∀ ν : SmallModes.Base → Vec, + ContDiffOn ℝ ∞ ν U₀ → + (∀ x ∈ U₀, ν x ⬝ᵥ ν x = 1) → + (∀ x ∈ U₀, ∀ w : SmallModes.Base, + SmallModes.coordDeriv w (A.phaseRealChartMap i e.symm W) x ⬝ᵥ ν x = 0) → + MapsTo (fun p => baseEquiv (e (chart (i : M) p))) (closure D) U₀ → + (∀ p ∈ frontier D, ν (baseEquiv (e (chart (i : M) p))) = + profilePreferred (realBoundaryProfile (A.phaseRealChartMap i e.symm W) z + (baseEquiv (e (chart (i : M) p))))) → + (∀ k p, p ∈ (curves k).carrier → p ∈ D → + let q := baseEquiv (e (chart (i : M) p)) + realSecondForm (A.phaseRealChartMap i e.symm W) (v k q) (v k q) q ≠ 0 ∧ + ν q ≠ -normalize (realSecondForm (A.phaseRealChartMap i e.symm W) (v k q) (v k q) q)) → + ∃ N : PreferredNormal W, + (∀ k p, p ∈ (curves k).carrier → (curves k).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves k).second W p)) ∧ + ∀ p ∈ E, (p ∈ D → N.vector p = A.phaseNormalLift i e ν p) ∧ + (p ∉ D → N.vector p = A.unitProjectedNormalField W n.vector p) := by + classical + have hsource : closure D ⊆ ((chart (i : M)).trans e).source := + fun p hp => ⟨hDs hp,hDe hp⟩ + have hread {h : SmoothMetric M} {W : M → Space} (hW : IsSmoothIsometricImmersion M h W) + (k : κ) (p : M) (hp : p ∈ (curves k).carrier) (hpD : p ∈ closure D) : + (curves k).second W p = + realSecondForm (A.phaseRealChartMap i e.symm W) + (v k (baseEquiv (e (chart (i : M) p)))) + (v k (baseEquiv (e (chart (i : M) p)))) + (baseEquiv (e (chart (i : M) p))) := by + rw [(curves k).second_transition A i e he hi hW hp (hsource hpD) (hDw p hpD), + hvector k p hp hpD] + obtain ⟨r,hr,hglue⟩ := A.finite_curve_disk_normal B hF n houter curves hold i e he hi + hD hDr hDs hDe hDw E hE hEf + obtain ⟨a,ha,hanti⟩ := A.compact_surface_phase_exterior_preservation A hF n houter i e he hi + (isClosed_frontier.isCompact) (fun p hp => hsource (frontier_subset_closure hp)) + (fun p hp => hDw p (frontier_subset_closure hp)) + (fun p hp => (hboundary p hp).1) (fun p hp => (hboundary p hp).2) + have hpair (k : κ) := A.compact_surface_boundary_matching hF n houter i e he hi + ((curves k).compact.inter_right isClosed_frontier) + (fun p hp => hsource (frontier_subset_closure hp.2)) + (fun p hp => hDw p (frontier_subset_closure hp.2)) (v k) (hv k) + (fun p hp => (hboundary p hp.2).1) (fun p hp => (hboundary p hp.2).2) + (fun p hp => by dsimp only; rw [← hread hF k p hp.1 (frontier_subset_closure hp.2)]; exact hpositive k p hp.1 hp.2) + (fun p hp => hcross k p hp.1 hp.2) + choose t ht hpair' using hpair + obtain ⟨s,hs,_,hst⟩ := finite_positive_threshold t ht + refine ⟨min r (min a s),lt_min hr (lt_min ha hs),?_⟩ + intro G V W hG hV h hW b d hb hd hbd hGF hWV hext z U₀ hU₀ ν hν hunit hnormal hDU hcanonical hlocal + have hbd_r := hbd.trans_le (min_le_left r (min a s)) + have hbd_a := hbd.trans_le ((min_le_right r (min a s)).trans (min_le_left a s)) + have hbd_s := hbd.trans_le ((min_le_right r (min a s)).trans (min_le_right a s)) + have hclosure (p : M) (hp : p ∈ frontier D) : p ∈ closure (closure D)ᶜ := by + rw [closure_compl,hDr] + exact hD.frontier_eq ▸ hp |>.2 + apply hglue G V W hG hV h hW b d hb hd hbd_r hGF hWV hext U₀ hU₀ ν hν hunit hnormal hDU + · intro p hp + rw [hcanonical p hp,profilePreferred_real] + exact (hanti G V W hG hV hW.1 b d hb hd hbd_a hGF hWV (closure D)ᶜ hext p + ⟨hp,hclosure p hp⟩).2.2 + · intro k p hp hpD + rw [hread hW k p hp (subset_closure hpD)] + exact hlocal k p hp hpD + · intro k p hp hpD + rw [hread hW k p hp (frontier_subset_closure hpD),hcanonical p hpD] + have hh := hpair' k G V W hG hV hW.1 b d hb hd (hbd_s.trans_le (hst k)) + hGF hWV (closure D)ᶜ hext p ⟨⟨hp,hpD⟩,hclosure p hpD⟩ z + exact ⟨hh.2,hh.1⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricPerturbedParametrix.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricPerturbedParametrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..284e67d6efd8359b2305701275019dd1da88e602 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricPerturbedParametrix.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedModeBounds +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedTupleOperators +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedParametrix + +namespace OAI + +/-! Finite improvement of the actual geometric parametrix in the presence +of a supported differential perturbation. The perturbation estimate is +stated with explicit derivative loss so that polynomial operators can be +inserted without a Banach-space inverse assumption. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +def perturbedMode (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (R : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (f : SupportedField (F := Fin 3 → ℂ) K) (q : ℕ) : SupportedField (F := Ambient n) K := + FiniteParametrix.improve ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) f + (forcedModeLM τ hG h K hKU 0 f) q + +lemma perturbed_geometric_defect_bound (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {ε : ℝ} {p L : ℕ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (hc : ∀ m, ReconstructionCoefficientBound G U s (m + 1) (B m)) + (R : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (hR : ∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) + (m : ℕ) (f : SupportedField (F := Fin 3 → ℂ) K) : + supportedWeightedSeminorm K s m + (FiniteParametrix.defect ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) f) ≤ + (τ / s + ε / τ ^ p) * + max (errorConstant m (B m)) (D m * initialConstant n (m + L) (B (m + L))) * + supportedWeightedSeminorm K s (m + (L + 1)) f := by + apply FiniteParametrix.perturbed_defect_bound + ((conjugatedDLM τ hG K).restrictScalars ℝ) R + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) + (fun r => supportedWeightedSeminorm K s r) (L + 1) + (fun r => errorConstant r (B r)) + (fun r => D r * initialConstant n (r + L) (B (r + L))) + (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + · intro r g + have hh := geometric_defect_bound τ hG h K hKU hτ hs hs1 (hB r) r + (hc r).toFullModeCoefficientBound.toModeCoefficientBound g + calc + _ ≤ (τ / s) * errorConstant r (B r) * supportedWeightedSeminorm K s (r + 1) g := hh + _ ≤ _ := mul_le_mul_of_nonneg_left + (supportedWeightedSeminorm_mono s (by omega) g) + (mul_nonneg (div_nonneg hτ.le hs.le) (errorConstant_nonneg _ (hB r))) + · intro r g + calc + _ ≤ ε / τ ^ p * D r * supportedWeightedSeminorm K s (r + L) + (forcedModeLM τ hG h K hKU 0 g) := hR r _ + _ ≤ ε / τ ^ p * D r * (initialConstant n (r + L) (B (r + L)) * + supportedWeightedSeminorm K s (r + L + 1) g) := + mul_le_mul_of_nonneg_left + (forcedModeLM_zero_bound τ hG h K hKU hτ hs hτs hs1 (hB (r + L)) (r + L) (hc (r + L)) g) + (mul_nonneg (div_nonneg hε (pow_nonneg hτ.le _)) (hD r)) + _ = _ := by rw [Nat.add_assoc]; ring + +/-- Every prescribed finite residual accuracy is achieved by the actual +geometric correction algorithm. Only the derivative budget grows. -/ +theorem perturbedMode_residual_bound (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {ε : ℝ} {p L : ℕ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (hc : ∀ m, ReconstructionCoefficientBound G U s (m + 1) (B m)) + (R : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (hR : ∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) + (f : SupportedField (F := Fin 3 → ℂ) K) (q m : ℕ) : + let η := τ / s + ε / τ ^ p + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + supportedWeightedSeminorm K s m + (((conjugatedDLM τ hG K).restrictScalars ℝ + R) + (perturbedMode τ hG h K hKU R f q) - f) ≤ + η ^ q * FiniteParametrix.boundProfile (L + 1) κ + (fun r => η * κ r * supportedWeightedSeminorm K s (r + (L + 1)) f) q m := by + dsimp only + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hκ : ∀ r, 0 ≤ κ r := fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _) + have hd := perturbed_geometric_defect_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR + exact FiniteParametrix.residual_bound + ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) f + (forcedModeLM τ hG h K hKU 0 f) (fun r => supportedWeightedSeminorm K s r) + (L + 1) κ _ hη hκ hd (fun r => hd r f) q m + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricScaleThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricScaleThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d893a0a7124ee01d5c85e6457fd45a734884373 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GeometricScaleThreshold.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFixedOrderThreshold + +namespace OAI + +/-! The grid scale-ratio threshold has a polynomial reciprocal. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection +open RealModes + +def geometricScaleThreshold (a E : ℝ) (e : ℕ) (x : ℝ) : ℝ := + min 1 ((a-a/2)/(2*(E*x^e))) + +lemma geometricScaleThreshold_pos {a E : ℝ} (ha : 0 < a) (hE : 0 < E) + (e : ℕ) {x : ℝ} (hx : 1 ≤ x) : 0 < geometricScaleThreshold a E e x := by + have hx0 : 0 < x := zero_lt_one.trans_le hx + unfold geometricScaleThreshold + exact lt_min zero_lt_one (div_pos (by linarith) (by positivity)) + +theorem geometricScaleThreshold_inverse_polynomial {a E : ℝ} (ha : 0 < a) (hE : 0 < E) (e : ℕ) : + HasPolynomialBound (fun x => (geometricScaleThreshold a E e x)⁻¹) := by + have hp : HasPolynomialBound (fun x : ℝ => 1+(4*E/a)*x^e) := + (polynomialBound_const zero_le_one).add + ((polynomialBound_const (by positivity : 0 ≤ 4*E/a)).mul (polynomialBound_id.pow e)) + apply HasPolynomialBound.of_le hp + · intro x hx + exact inv_nonneg.mpr (geometricScaleThreshold_pos ha hE e hx).le + · intro x hx + have hx0 : 0 < x := zero_lt_one.trans_le hx + have hv : 0 < (a-a/2)/(2*(E*x^e)) := div_pos (by linarith) (by positivity) + calc + (geometricScaleThreshold a E e x)⁻¹ ≤ 1+((a-a/2)/(2*(E*x^e)))⁻¹ := by + simpa only [inv_one,geometricScaleThreshold] using min_inverse_le_add zero_lt_one hv + _ = 1+(4*E/a)*x^e := by + rw [inv_div] + have hhalf : a-a/2 = a/2 := by ring + rw [hhalf] + field_simp + ring + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalCubicRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalCubicRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..04231254db9c0c326c502046c08afb8f3728b941 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalCubicRemainder.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearMetricChartReconstruction +import OAI.Geometry.Immersion.ClosedSurface.TensorBounds +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm + +namespace OAI + +/-! Uniform atlas estimate for the actual mixed metric and quadratic correction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance cubicFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance cubicFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance cubicDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance cubicDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance cubicSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance cubicSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma planeWeight_square_bound (i : A.centers) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → + WeightedEstimates.WeightedBound univ s m C (fun x => (A.planeWeight i x)^2) := by + let C := supportedWeightedSeminorm (modeSupport (A.chartWeightCompact i)) 1 m + (A.supportedPlaneWeight i) + have hC : 0 ≤ C := apply_nonneg _ _ + refine ⟨2^m*C*C,by positivity,?_⟩ + intro s hs hs1 + have hb : WeightedEstimates.WeightedBound univ s m C (A.planeWeight i) := + (weightedBound_of_supportedSeminorm 1 m (A.supportedPlaneWeight i)).shrink_scale hs.le hs1 + have hh := hb.mul_real uniqueDiffOn_univ hs.le hC hC + (A.planeWeight_smooth i).contDiffOn (A.planeWeight_smooth i).contDiffOn hb + simpa only [pow_two] using hh + +theorem global_cubic_remainder_bound (m : ℕ) (A₀ B₀ : ℝ) (hA : 0 ≤ A₀) (hB : 0 ≤ B₀) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (τ δ : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ δ → δ ≤ τ → + ∀ (U V : M → Space), ContMDiff planeModel spaceModel ∞ U → + ContMDiff planeModel spaceModel ∞ V → + A.WeightedBound τ (m+1) (A₀*(δ*τ)) U → + A.WeightedBound τ (m+1) (B₀*δ^2) V → + A.TensorWeightedBound τ m (D*(δ^3/τ)) (linearMetricTensor U V + inducedTensor V) := by + classical + choose E hE he using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i (m+1) + choose Q hQ hq using fun i : A.centers => A.planeWeight_square_bound i m + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + let C := fun i : A.centers => L*E i + let B := fun i : A.centers => 4*2^m*(2*(C i*A₀)*(C i*B₀)+(C i*B₀)^2) + let K := fun i : A.centers => 2^m*Q i*B i + have hC (i) : 0 ≤ C i := mul_nonneg (norm_nonneg _) (hE i) + have hB' (i) : 0 ≤ B i := by + have hc := hC i + dsimp [B] + positivity + have hK (i) : 0 ≤ K i := by + have hb := hB' i + have hqi := hQ i + dsimp [K] + positivity + have hsum : 0 ≤ ∑ i, K i := Finset.sum_nonneg (fun i _ => hK i) + refine ⟨D*∑ i, K i,mul_nonneg hD (Finset.sum_nonneg (fun i _ => hK i)),?_⟩ + intro τ δ hτ hτ1 hδ hδτ U V hU hV hbU hbV + have hreadU (i) := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU) + have hreadV (i) := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV) + have hbu (i) : WeightedEstimates.WeightedBound univ τ (m+1) ((C i*A₀)*δ*τ) + (spaceCoordinates ∘ A.vectorPlaneRead i U) := by + have hh := (he i U τ (A₀*(δ*τ)) hτ hτ1 (by positivity) hU hbU).linear + uniqueDiffOn_univ hτ.le (A.vectorPlaneRead_smooth i hU).contDiffOn + spaceCoordinates.toContinuousLinearMap + convert hh using 1 <;> dsimp [C,L] + all_goals ring + have hbv (i) : WeightedEstimates.WeightedBound univ τ (m+1) ((C i*B₀)*δ^2) + (spaceCoordinates ∘ A.vectorPlaneRead i V) := by + have hh := (he i V τ (B₀*δ^2) hτ hτ1 (by positivity) hV hbV).linear + uniqueDiffOn_univ hτ.le (A.vectorPlaneRead_smooth i hV).contDiffOn + spaceCoordinates.toContinuousLinearMap + convert hh using 1 <;> dsimp [C,L] + all_goals ring + let T := fun i x => RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i U) (spaceCoordinates ∘ A.vectorPlaneRead i V) x + + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i V) x + have hT (i) : ContDiff ℝ ∞ (T i) := contDiffOn_univ.mp + ((RealModes.contDiffOn_realLinearizedTensor isOpen_univ (hreadU i).contDiffOn + (hreadV i).contDiffOn).add (RealModes.contDiffOn_realMetricTensor isOpen_univ (hreadV i).contDiffOn)) + have hbT (i) : WeightedEstimates.WeightedBound univ τ m (B i*(δ^3/τ)) (T i) := by + exact RealModes.weighted_cubic_remainder isOpen_univ hτ hδ hδτ + (mul_nonneg (hC i) hA) (mul_nonneg (hC i) hB) + (hreadU i).contDiffOn (hreadV i).contDiffOn (hbu i) (hbv i) + have hprod (i) : WeightedEstimates.WeightedBound univ τ m + ((∑ j, K j)*(δ^3/τ)) (fun x => (A.planeWeight i x)^2 • T i x) := by + have hh := (hq i τ hτ hτ1).smul_real uniqueDiffOn_univ hτ.le (hQ i) + (mul_nonneg (hB' i) (by positivity)) + ((A.planeWeight_smooth i).pow 2).contDiffOn (hT i).contDiffOn (hbT i) + apply hh.mono_const + calc + 2^m*Q i*(B i*(δ^3/τ)) = K i*(δ^3/τ) := by dsimp [K]; ring + _ ≤ (∑ j, K j)*(δ^3/τ) := mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hK j) (Finset.mem_univ i)) (by positivity) + have hout := hd (fun i x => (A.planeWeight i x)^2 • T i x) τ + ((∑ i, K i)*(δ^3/τ)) hτ hτ1 (by positivity) + (fun i => ((A.planeWeight_smooth i).pow 2).smul (hT i)) hprod + have heq : A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • T i x) = + linearMetricTensor U V + inducedTensor V := by + have ht : (fun i x => (A.planeWeight i x)^2 • T i x) = + (fun i x => (A.planeWeight i x)^2 • RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i U) (spaceCoordinates ∘ A.vectorPlaneRead i V) x) + + (fun i x => (A.planeWeight i x)^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i V) x) := by + funext i x + exact smul_add _ _ _ + rw [ht,A.tensorPlaneRestore_add,A.linearMetric_from_chart_reads hU hV,A.metric_from_chart_reads hV] + rw [heq] at hout + convert hout using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalInputRecurrence.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalInputRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..22535caebc472f0f9b3719ccf00117325c769358 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalInputRecurrence.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalSmoothedMetricStep +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalScaleGain + +namespace OAI + +/-! Both components of the actual next input admit a common recurrence bound. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates JetPolynomial +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma shiftedBound_of_weighted {f : Base → V} {s C : ℝ} {q m : ℕ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hb : WeightedEstimates.WeightedBound univ s (q+m) C f) : + ShiftedBound q m s (C/s^q) f := by + intro j hj x + have hh := hb.deriv_le hs hj (mem_univ x) + rw [iteratedFDerivWithin_univ] at hh + by_cases hq : q ≤ j + · have he : s^j = s^(j-q)*s^q := by rw [← pow_add,Nat.sub_add_cancel hq] + calc + _ ≤ s^(j-q)*(C/s^j) := mul_le_mul_of_nonneg_left hh (pow_nonneg hs.le _) + _ = _ := by rw [he]; field_simp + · have hjq : j ≤ q := by omega + simp only [Nat.sub_eq_zero_of_le hjq,pow_zero,one_mul] + exact hh.trans (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 hjq)) + +lemma weighted_shrink_with_norm {E W : Type*} + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : E → W} {s P C : ℝ} {m : ℕ} (hs : 0 ≤ s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hp : WeightedEstimates.WeightedBound univ 1 0 P f) + (hc : WeightedEstimates.WeightedBound univ 1 m C f) : + WeightedEstimates.WeightedBound univ s m (P+s*C) f := by + intro j hj x hx + by_cases hz : j = 0 + · subst j + have h := hp 0 le_rfl x hx + simp only [pow_zero,one_mul] at h ⊢ + exact h.trans (le_add_of_nonneg_right (mul_nonneg hs hC)) + · have h := hc j hj x hx + simp only [one_pow,one_mul] at h + calc + _ ≤ s^j*C := mul_le_mul_of_nonneg_left h (pow_nonneg hs _) + _ ≤ s*C := mul_le_mul_of_nonneg_right + (by simpa only [pow_one] using pow_le_pow_of_le_one hs hs1 (show 1 ≤ j by omega)) hC + _ ≤ P+s*C := le_add_of_nonneg_left (by + exact le_trans (norm_nonneg (f x)) (hp.norm_le (mem_univ x))) + +local instance inputRecurrenceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputRecurrenceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma weighted_to_shifted {F : M → V} {s C : ℝ} {q m : ℕ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hb : A.WeightedBound s (q+m) C F) : A.ShiftedBound q m s (C/s^q) F := + fun i => shiftedBound_of_weighted hs hs1 hC (hb i) + +omit [CompactSpace M] in +lemma tensor_shrink_with_norm {T : ∀ p : M, CovariantTwoTensor p} {s P C : ℝ} {m : ℕ} + (hs : 0 ≤ s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hp : A.TensorWeightedBound 1 0 P T) (hc : A.TensorWeightedBound 1 m C T) : + A.TensorWeightedBound s m (P+s*C) T := + fun i => weighted_shrink_with_norm hs hs1 hC (hp i) (hc i) + +theorem next_input_bound {target : ∀ p : M, CovariantTwoTensor p} + (htarget : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p))) + {F U : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hU : ContMDiff planeModel spaceModel ∞ U) + {t τ P P₀ Pm C K B δ' : ℝ} {m : ℕ} + (ht : 0 < t) (hτ : 0 < τ) (hτt : τ ≤ t) (hτ1 : τ ≤ 1) + (hP : 0 ≤ P) (hP₀ : 0 ≤ P₀) (hPm : 0 ≤ Pm) + (hC : 0 ≤ C) (hK : 0 ≤ K) (hB : 0 ≤ B) + (hp : A.ShiftedBound 2 0 t P F) (hc : A.ShiftedBound 2 m t C F) + (hu : A.WeightedBound τ (2+m) K U) + (ht₀ : A.TensorWeightedBound 1 0 P₀ target) + (htm : A.TensorWeightedBound 1 m Pm target) + (hb : A.TensorWeightedBound τ m B (normalizedTensorDefect target δ' (F+U)-target)) : + A.InputBound τ m (P+P₀+τ*Pm+(τ/t)*C+K/τ^2+B) + (F+U) (normalizedTensorDefect target δ' (F+U)) := by + have hmap := A.shifted_map_recurrence hF hU hp hc + (A.weighted_to_shifted hτ hτ1 hK hu) ht hτ.le hτt hP hC + have htargetBound := A.tensor_shrink_with_norm hτ.le hτ1 hPm ht₀ htm + have hdiff := (A.normalizedTensorDefect_smooth htarget δ' (hF.add hU)).sub_section htarget + have htensor := A.tensorWeightedBound_add htarget hdiff hτ.le htargetBound hb + have he : target+(normalizedTensorDefect target δ' (F+U)-target) = + normalizedTensorDefect target δ' (F+U) := by abel + rw [he] at htensor + constructor + · intro i j hj x + exact (hmap i j hj x).trans (by + have hq : 0 ≤ τ*Pm := mul_nonneg hτ.le hPm + linarith) + · intro i + exact (htensor i).mono_const (by + have hq : 0 ≤ (τ/t)*C := mul_nonneg (div_nonneg hτ.le ht.le) hC + have hk : 0 ≤ K/τ^2 := div_nonneg hK (sq_nonneg τ) + linarith) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalLinearMetricBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalLinearMetricBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..457b0d99040b57f43eb3e206ce1210380a263f0b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalLinearMetricBound.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalCubicRemainder + +namespace OAI + +/-! The true global mixed metric is bilinear in its two weighted input bounds. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance linearBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance linearBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance linearBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance linearBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance linearBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance linearBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem global_linear_metric_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (τ a b : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ a → 0 ≤ b → + ∀ (U V : M → Space), ContMDiff planeModel spaceModel ∞ U → + ContMDiff planeModel spaceModel ∞ V → + A.WeightedBound τ (m+1) a U → A.WeightedBound τ (m+1) b V → + A.TensorWeightedBound τ m (D*(a*b/τ^2)) (linearMetricTensor U V) := by + classical + choose E hE he using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i (m+1) + choose Q hQ hq using fun i : A.centers => A.planeWeight_square_bound i m + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + let C := fun i : A.centers => L*E i + let B := fun i : A.centers => 8*2^m*(C i)^2 + let K := fun i : A.centers => 2^m*Q i*B i + have hC (i) : 0 ≤ C i := mul_nonneg (norm_nonneg _) (hE i) + have hB (i) : 0 ≤ B i := by dsimp [B]; positivity + have hK (i) : 0 ≤ K i := by + have hbi := hB i + have hqi := hQ i + dsimp [K] + positivity + have hsum : 0 ≤ ∑ i, K i := Finset.sum_nonneg (fun i _ => hK i) + refine ⟨D*∑ i, K i,mul_nonneg hD hsum,?_⟩ + intro τ a b hτ hτ1 ha hb U V hU hV hbU hbV + have hread (X : M → Space) (hX : ContMDiff planeModel spaceModel ∞ X) + (c : ℝ) (hc : 0 ≤ c) (hx : A.WeightedBound τ (m+1) c X) (i : A.centers) : + WeightedEstimates.WeightedBound univ τ (m+1) (C i*c) (spaceCoordinates ∘ A.vectorPlaneRead i X) := by + have hh := (he i X τ c hτ hτ1 hc hX hx).linear uniqueDiffOn_univ hτ.le + (A.vectorPlaneRead_smooth i hX).contDiffOn spaceCoordinates.toContinuousLinearMap + convert hh using 1 <;> dsimp [C,L] + all_goals ring + let T := fun i => RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i U) (spaceCoordinates ∘ A.vectorPlaneRead i V) + have hT (i) : ContDiff ℝ ∞ (T i) := contDiffOn_univ.mp + (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU)).contDiffOn + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV)).contDiffOn) + have hbT (i) : WeightedEstimates.WeightedBound univ τ m (B i*(a*b/τ^2)) (T i) := by + have hh := RealModes.weighted_realLinearizedTensor isOpen_univ hτ + (mul_nonneg (hC i) ha) (mul_nonneg (hC i) hb) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU)).contDiffOn + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV)).contDiffOn + (hread U hU a ha hbU i) (hread V hV b hb hbV i) + have heq : 2*((4:ℕ):ℝ)*(2^m*(C i*a/τ)*(C i*b/τ)) = B i*(a*b/τ^2) := by + dsimp [B] + field_simp + ring + rw [heq] at hh + exact hh + have hprod (i) : WeightedEstimates.WeightedBound univ τ m + ((∑ j, K j)*(a*b/τ^2)) (fun x => (A.planeWeight i x)^2 • T i x) := by + have hh := (hq i τ hτ hτ1).smul_real uniqueDiffOn_univ hτ.le (hQ i) + (mul_nonneg (hB i) (by positivity)) + ((A.planeWeight_smooth i).pow 2).contDiffOn (hT i).contDiffOn (hbT i) + apply hh.mono_const + calc + 2^m*Q i*(B i*(a*b/τ^2)) = K i*(a*b/τ^2) := by dsimp [K]; ring + _ ≤ (∑ j, K j)*(a*b/τ^2) := mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hK j) (Finset.mem_univ i)) (by positivity) + have hout := hd (fun i x => (A.planeWeight i x)^2 • T i x) τ + ((∑ i, K i)*(a*b/τ^2)) hτ hτ1 (by positivity) + (fun i => ((A.planeWeight_smooth i).pow 2).smul (hT i)) hprod + have heq : A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • T i x) = linearMetricTensor U V := + A.linearMetric_from_chart_reads hU hV + rw [heq] at hout + convert hout using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..acb78730e653634ca5d0e9d4a9c8e97804cea91b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStep.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds + +namespace OAI + +/-! Exact normalized-defect identity for the unsmoothed global map update. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +local instance metricStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +local instance metricStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +lemma linearMetricTensor_sub_left {F G : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) + (U : M → Space) : linearMetricTensor (F-G) U = linearMetricTensor F U - linearMetricTensor G U := by + funext p + ext v w + change linearMetricForm (F-G) U p v w = linearMetricForm F U p v w - linearMetricForm G U p v w + have hd : surfaceDifferential (F-G) p = surfaceDifferential F p - surfaceDifferential G p := + mfderiv_sub ((hF p).mdifferentiableAt (by simp)) ((hG p).mdifferentiableAt (by simp)) + simp only [linearMetricForm,hd,sub_apply,inner_sub_left,inner_sub_right] + ring + +lemma metric_increment_difference {F G U : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) + (hU : ContMDiff planeModel spaceModel ∞ U) : + (inducedTensor (F+U)-inducedTensor F) - (inducedTensor (G+U)-inducedTensor G) = + linearMetricTensor (F-G) U := by + rw [inducedTensor_add hF hU,inducedTensor_add hG hU,linearMetricTensor_sub_left hF hG] + abel + +def normalizedTensorDefect (target : ∀ p : M, CovariantTwoTensor p) (δ : ℝ) (F : M → Space) : + ∀ p : M, CovariantTwoTensor p := (δ^2)⁻¹ • (target - inducedTensor F) + +def realizedTensorError (target Hs : ∀ p : M, CovariantTwoTensor p) + (δ δ' : ℝ) (G U : M → Space) : ∀ p : M, CovariantTwoTensor p := + inducedTensor (G+U)-inducedTensor G-(δ^2 • Hs-δ'^2 • target) + +lemma square_smul_normalizedTensorDefect (target : ∀ p : M, CovariantTwoTensor p) + {δ : ℝ} (hδ : δ ≠ 0) (F : M → Space) : + δ^2 • normalizedTensorDefect target δ F = target - inducedTensor F := by + rw [normalizedTensorDefect,smul_smul,mul_inv_cancel₀ (pow_ne_zero 2 hδ),one_smul] + +/-- The smoothing tail enters only through the mixed term with the increment. -/ +theorem global_normalized_defect_identity + (target Hs : ∀ p : M, CovariantTwoTensor p) {δ δ' : ℝ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + {F G U : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hG : ContMDiff planeModel spaceModel ∞ G) (hU : ContMDiff planeModel spaceModel ∞ U) : + δ'^2 • (normalizedTensorDefect target δ' (F+U)-target) = + δ^2 • (normalizedTensorDefect target δ F-Hs) - realizedTensorError target Hs δ δ' G U - + linearMetricTensor (F-G) U := by + rw [smul_sub,smul_sub,square_smul_normalizedTensorDefect target hδ', + square_smul_normalizedTensorDefect target hδ] + rw [← metric_increment_difference hF hG hU] + unfold realizedTensorError + abel + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStepBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStepBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab3a9a1b827c6463f994ec9085ad9f743865df73 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalMetricStepBound.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalMetricStep +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Global weighted estimate for the concrete unsmoothed normalized-defect update. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +local instance stepBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance stepBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance stepBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance stepBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance stepBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance stepBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorWeightedBound_sub {T S : ∀ p : M, CovariantTwoTensor p} + (hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p))) + (hS : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (S p))) + {s C D : ℝ} {m : ℕ} (hs : 0 ≤ s) + (hbT : A.TensorWeightedBound s m C T) (hbS : A.TensorWeightedBound s m D S) : + A.TensorWeightedBound s m (C+D) (T-S) := by + intro i + have he : A.bundleLocalize A.tensorTriv i (T-S) = + A.bundleLocalize A.tensorTriv i T - A.bundleLocalize A.tensorTriv i S := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> + simp [bundleLocalize,localize,bundleComponent,hx,smul_sub] + change WeightedEstimates.WeightedBound univ s m (C+D) (A.bundleLocalize A.tensorTriv i (T-S)) + rw [he] + exact (hbT i).sub uniqueDiffOn_univ hs + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hT).contDiffOn + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hS).contDiffOn (hbS i) + +include A in +lemma normalizedTensorDefect_smooth {target : ∀ p : M, CovariantTwoTensor p} + (ht : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p))) + (δ : ℝ) {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (normalizedTensorDefect target δ F p)) := + (ht.sub_section (A.inducedTensor_smooth hF)).const_smul_section + +include A in +lemma realizedTensorError_smooth {target Hs : ∀ p : M, CovariantTwoTensor p} + (ht : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p))) + (hs : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (Hs p))) + (δ δ' : ℝ) {G U : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (hU : ContMDiff planeModel spaceModel ∞ U) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (realizedTensorError target Hs δ δ' G U p)) := + ((A.inducedTensor_smooth (hG.add hU)).sub_section (A.inducedTensor_smooth hG)).sub_section + (hs.const_smul_section.sub_section ht.const_smul_section) + +theorem global_normalized_metric_step_bound {target Hs : ∀ p : M, CovariantTwoTensor p} + (ht : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p))) + (hs : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (Hs p))) + {δ δ' τ BH BE BC : ℝ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) (hτ : 0 ≤ τ) (m : ℕ) + {F G U : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hG : ContMDiff planeModel spaceModel ∞ G) (hU : ContMDiff planeModel spaceModel ∞ U) + (hbH : A.TensorWeightedBound τ m BH (normalizedTensorDefect target δ F-Hs)) + (hbE : A.TensorWeightedBound τ m BE (realizedTensorError target Hs δ δ' G U)) + (hbC : A.TensorWeightedBound τ m BC (linearMetricTensor (F-G) U)) : + A.TensorWeightedBound τ m ((δ'^2)⁻¹*(δ^2*BH+BE+BC)) + (normalizedTensorDefect target δ' (F+U)-target) := by + have hHs := (A.normalizedTensorDefect_smooth ht δ hF).sub_section hs + have hEs := A.realizedTensorError_smooth ht hs δ δ' hG hU + have hCs := A.linearMetricTensor_smooth (hF.sub hG) hU + have h₁ := A.tensorWeightedBound_const_smul hHs hbH (δ^2) + rw [abs_of_nonneg (sq_nonneg δ)] at h₁ + have h₂ := A.tensorWeightedBound_sub hHs.const_smul_section hEs hτ h₁ hbE + have h₃ := A.tensorWeightedBound_sub (hHs.const_smul_section.sub_section hEs) hCs hτ h₂ hbC + have h₄ := A.tensorWeightedBound_const_smul + ((hHs.const_smul_section.sub_section hEs).sub_section hCs) h₃ ((δ'^2)⁻¹) + rw [abs_inv,abs_of_nonneg (sq_nonneg δ')] at h₄ + have heq : normalizedTensorDefect target δ' (F+U)-target = (δ'^2)⁻¹ • + (δ^2 • (normalizedTensorDefect target δ F-Hs) - realizedTensorError target Hs δ δ' G U - + linearMetricTensor (F-G) U) := by + rw [← global_normalized_defect_identity target Hs hδ hδ' hF hG hU, + smul_smul,inv_mul_cancel₀ (pow_ne_zero 2 hδ'),one_smul] + rw [heq] + exact h₄ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalScaleGain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalScaleGain.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9348b8b3ba42ce2706a9ee5357dc9086bdd5384 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalScaleGain.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalShiftedSmoothing +import OAI.Geometry.SurfaceImmersion.Geometry.ShiftedScaleGain + +namespace OAI + +/-! The inherited-map part of the all-order correction recurrence. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +/-- Shrinking the scale gains one ratio in every positive weighted order. -/ +theorem shifted_shrink_with_prefix {q m : ℕ} {t τ P C : ℝ} {f : M → V} + (hb : A.ShiftedBound q 0 t P f) (hc : A.ShiftedBound q m t C f) + (ht : 0 < t) (hτ : 0 ≤ τ) (hτt : τ ≤ t) (hP : 0 ≤ P) (hC : 0 ≤ C) : + A.ShiftedBound q m τ (P + (τ / t) * C) f := + fun i => (hb i).shrink_with_prefix (hc i) ht hτ hτt hP hC + +/-- The new map keeps the old low-derivative baseline; its inherited high +orders contract, and the actual increment contributes its own budget. -/ +theorem shifted_map_recurrence {q m : ℕ} {t τ P C D : ℝ} {f u : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) ∞ f) + (hu : ContMDiff planeModel 𝓘(ℝ, V) ∞ u) + (hb : A.ShiftedBound q 0 t P f) (hc : A.ShiftedBound q m t C f) + (hd : A.ShiftedBound q m τ D u) + (ht : 0 < t) (hτ : 0 ≤ τ) (hτt : τ ≤ t) (hP : 0 ≤ P) (hC : 0 ≤ C) : + A.ShiftedBound q m τ (P + (τ / t) * C + D) (f + u) := by + have hsh := A.shifted_shrink_with_prefix hb hc ht hτ hτt hP hC + intro i + rw [localize_add] + exact (hsh i).add + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hu) hτ (hd i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalShiftedLinearMetricBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalShiftedLinearMetricBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e472d93ae90834cfbce2e8543b18ab52034b0db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GlobalShiftedLinearMetricBound.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalCubicRemainder +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadPrefixBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LinearMetricDerivativeBounds + +namespace OAI + +/-! The mixed metric uses the unweighted derivative prefix of its first input. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance shiftedLinearBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance shiftedLinearBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance shiftedLinearBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance shiftedLinearBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance shiftedLinearBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance shiftedLinearBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem global_shifted_linear_metric_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (τ a b : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ a → 0 ≤ b → + ∀ (U V : M → Space), ContMDiff planeModel spaceModel ∞ U → + ContMDiff planeModel spaceModel ∞ V → + A.ShiftedBound 1 m τ a U → A.WeightedBound τ (m+1) b V → + A.TensorWeightedBound τ m (D*(a*b/τ)) (linearMetricTensor U V) := by + classical + choose E hE he using fun i : A.centers => A.vectorPlaneRead_prefix_bounds (V := Space) i 1 m + choose E' hE' he' using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i (m+1) + choose Q hQ hq using fun i : A.centers => A.planeWeight_square_bound i m + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + let C := fun i : A.centers => L*E i + let C' := fun i : A.centers => L*E' i + let B := fun i : A.centers => 8*2^m*C i*C' i + let K := fun i : A.centers => 2^m*Q i*B i + have hC (i) : 0 ≤ C i := mul_nonneg (norm_nonneg _) (hE i) + have hC' (i) : 0 ≤ C' i := mul_nonneg (norm_nonneg _) (hE' i) + have hB (i) : 0 ≤ B i := by + have hc := hC i + have hc' := hC' i + dsimp [B] + positivity + have hK (i) : 0 ≤ K i := by + have hbi := hB i + have hqi := hQ i + dsimp [K] + positivity + have hsum : 0 ≤ ∑ i, K i := Finset.sum_nonneg (fun i _ => hK i) + refine ⟨D*∑ i, K i,mul_nonneg hD hsum,?_⟩ + intro τ a b hτ hτ1 ha hb U V hU hV hbU hbV + have hread (X : M → Space) (hX : ContMDiff planeModel spaceModel ∞ X) + (c : ℝ) (hc : 0 ≤ c) (hx : A.WeightedBound τ (m+1) c X) (i : A.centers) : + WeightedEstimates.WeightedBound univ τ (m+1) (C' i*c) (spaceCoordinates ∘ A.vectorPlaneRead i X) := by + have hh := (he' i X τ c hτ hτ1 hc hX hx).linear uniqueDiffOn_univ hτ.le + (A.vectorPlaneRead_smooth i hX).contDiffOn spaceCoordinates.toContinuousLinearMap + convert hh using 1 <;> dsimp [C',L] + all_goals ring + have hreadU (i : A.centers) (v : SmallModes.Base) (hv : ‖v‖ ≤ 1) : + WeightedEstimates.WeightedBound univ τ m (C i*a) + (SmallModes.coordDeriv v (spaceCoordinates ∘ A.vectorPlaneRead i U)) := by + apply prefix_directional_bound + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU)) hτ (mul_nonneg (hC i) ha) + (v := v) (hv := hv) + intro j hj + have hh := (he i U τ a hτ hτ1 ha hU hbU j (by omega)).linear + uniqueDiffOn_univ (by norm_num : (0:ℝ) ≤ 1) + (A.vectorPlaneRead_smooth i hU).contDiffOn spaceCoordinates.toContinuousLinearMap + convert hh using 1 <;> dsimp [C,L] + all_goals ring + let T := fun i => RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i U) (spaceCoordinates ∘ A.vectorPlaneRead i V) + have hT (i) : ContDiff ℝ ∞ (T i) := contDiffOn_univ.mp + (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU)).contDiffOn + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV)).contDiffOn) + have hbT (i) : WeightedEstimates.WeightedBound univ τ m (B i*(a*b/τ)) (T i) := by + have hc' := hC' i + have hreadV (v : SmallModes.Base) (hv : ‖v‖ ≤ 1) : + WeightedEstimates.WeightedBound univ τ m (C' i*b/τ) + (SmallModes.coordDeriv v (spaceCoordinates ∘ A.vectorPlaneRead i V)) := by + exact ((hread V hV b hb hbV i).directional isOpen_univ hτ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV)).contDiffOn v).mono_const + (mul_le_of_le_one_left (by positivity) hv) + have hh := RealModes.weighted_realLinearizedTensor_of_derivatives isOpen_univ hτ + (mul_nonneg (hC i) ha) (by positivity : 0 ≤ C' i*b/τ) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hU)).contDiffOn + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hV)).contDiffOn + (hreadU i) hreadV + have heq : 2*((4:ℕ):ℝ)*(2^m*(C i*a)*(C' i*b/τ)) = B i*(a*b/τ) := by + dsimp [B] + field_simp + ring + rw [heq] at hh + exact hh + have hprod (i) : WeightedEstimates.WeightedBound univ τ m + ((∑ j, K j)*(a*b/τ)) (fun x => (A.planeWeight i x)^2 • T i x) := by + have hh := (hq i τ hτ hτ1).smul_real uniqueDiffOn_univ hτ.le (hQ i) + (mul_nonneg (hB i) (by positivity)) + ((A.planeWeight_smooth i).pow 2).contDiffOn (hT i).contDiffOn (hbT i) + apply hh.mono_const + calc + 2^m*Q i*(B i*(a*b/τ)) = K i*(a*b/τ) := by dsimp [K]; ring + _ ≤ (∑ j, K j)*(a*b/τ) := mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hK j) (Finset.mem_univ i)) (by positivity) + have hout := hd (fun i x => (A.planeWeight i x)^2 • T i x) τ + ((∑ i, K i)*(a*b/τ)) hτ hτ1 (by positivity) + (fun i => ((A.planeWeight_smooth i).pow 2).smul (hT i)) hprod + have heq : A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • T i x) = linearMetricTensor U V := + A.linearMetric_from_chart_reads hU hV + rw [heq] at hout + convert hout using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GradientSeedEstimates.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GradientSeedEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..979fe30379b64433937604af61f812930774f749 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GradientSeedEstimates.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.Immersion.ClosedSurface.MeanError + +namespace OAI + +/-! Gradient and quadratic-mean estimates from an actual amplitude's +size and its distance to the normal seed. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.SmallModes +open WeightedEstimates + +lemma weighted_gradient_seed_error {n : ℕ} {τ s C E : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hC : 0 ≤ C) (hE : 0 ≤ E) {Z V : Field n} + (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hbZ : WeightedBound U s (m + 1) C Z) + (he : WeightedBound U s m E (fun p => Z p - V p)) + (v : Base) (hv : ‖v‖ ≤ 1) : + WeightedBound U s m (C / s + E / τ) + (fun p => gradientAmplitude τ Z v p - leadingDerivative τ V v p) := by + have hd := hbZ.directional hU hs hZ v + have hd' : WeightedBound U s m (C / s) (coordDeriv v Z) := by + apply hd.mono_const + exact mul_le_of_le_one_left (div_nonneg hC hs.le) hv + have hl := weighted_leadingDerivative hτ hU.uniqueDiffOn hs hE (hZ.sub hV) he v hv + have hh := hd'.add hU.uniqueDiffOn hs.le (contDiffOn_coordDeriv_vector hU hZ v) + (contDiffOn_leadingDerivative τ (hZ.sub hV) v) hl + apply hh.congr + intro p _ + exact gradientAmplitude_sub_leading τ Z V v p + +lemma weighted_gradient_from_seed {n : ℕ} {τ s C E D : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hC : 0 ≤ C) (hE : 0 ≤ E) (hD : 0 ≤ D) {Z V : Field n} + (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hbZ : WeightedBound U s (m + 1) C Z) + (he : WeightedBound U s m E (fun p => Z p - V p)) + (hbV : WeightedBound U s m D V) + (v : Base) (hv : ‖v‖ ≤ 1) : + WeightedBound U s m (C / s + E / τ + D / τ) (gradientAmplitude τ Z v) := by + have he' := weighted_gradient_seed_error hU hτ hs hC hE hZ hV hbZ he v hv + have hl := weighted_leadingDerivative hτ hU.uniqueDiffOn hs hD hV hbV v hv + have hh := he'.add hU.uniqueDiffOn hs.le + ((contDiffOn_gradientAmplitude hU hZ τ v).sub (contDiffOn_leadingDerivative τ hV v)) + (contDiffOn_leadingDerivative τ hV v) hl + exact hh.congr (fun _ _ => (sub_add_cancel _ _).symm) + +lemma weighted_mean_from_seed {n : ℕ} {τ s C E D C' E' D' : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hC : 0 ≤ C) (hE : 0 ≤ E) (hD : 0 ≤ D) + (hC' : 0 ≤ C') (hE' : 0 ≤ E') (hD' : 0 ≤ D') {Z V W Y : Field n} + (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hW : ContDiffOn ℝ ∞ W U) (hY : ContDiffOn ℝ ∞ Y U) + (hbZ : WeightedBound U s (m + 1) C Z) + (heZ : WeightedBound U s m E (fun p => Z p - V p)) + (hbV : WeightedBound U s m D V) + (hbW : WeightedBound U s (m + 1) C' W) + (heW : WeightedBound U s m E' (fun p => W p - Y p)) + (hbY : WeightedBound U s m D' Y) + (v w : Base) (hv : ‖v‖ ≤ 1) (hw : ‖w‖ ≤ 1) : + WeightedBound U s m ((n : ℝ) * 2 ^ m * + ((C / s + E / τ) * (C' / s + E' / τ + D' / τ) + D / τ * (C' / s + E' / τ))) + (fun p => QuadraticMean.zeroPair (gradientAmplitude τ Z v p) (gradientAmplitude τ W w p) - + QuadraticMean.zeroPair (leadingDerivative τ V v p) (leadingDerivative τ Y w p)) := by + have hgZ := weighted_gradient_seed_error hU hτ hs hC hE hZ hV hbZ heZ v hv + have hgW := weighted_gradient_seed_error hU hτ hs hC' hE' hW hY hbW heW w hw + have hbGW := weighted_gradient_from_seed hU hτ hs hC' hE' hD' hW hY hbW heW hbY w hw + have hbLV := weighted_leadingDerivative hτ hU.uniqueDiffOn hs hD hV hbV v hv + exact QuadraticMean.weighted_zeroPair_error hU.uniqueDiffOn hs + (div_nonneg hD hτ.le) + (add_nonneg (add_nonneg (div_nonneg hC' hs.le) (div_nonneg hE' hτ.le)) (div_nonneg hD' hτ.le)) + (add_nonneg (div_nonneg hC hs.le) (div_nonneg hE hτ.le)) + (add_nonneg (div_nonneg hC' hs.le) (div_nonneg hE' hτ.le)) + (contDiffOn_leadingDerivative τ hV v) (contDiffOn_leadingDerivative τ hY w) + (contDiffOn_gradientAmplitude hU hZ τ v) (contDiffOn_gradientAmplitude hU hW τ w) + hbLV hbGW hgZ hgW + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/GraphBlendBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GraphBlendBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..09411fb250fb06694c7124419dff406db722376d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/GraphBlendBounds.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RoundedReturnArc +import OAI.Geometry.SurfaceImmersion.Whitney.GraphJoinArc + +namespace OAI + +/-! The explicit roundings stay between their two graph branches. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma convex_height_bounds {t u v l h : ℝ} (ht : t ∈ Icc (0:ℝ) 1) + (hu : u ∈ Icc l h) (hv : v ∈ Icc l h) : + (1-t)*u+t*v ∈ Icc l h := by + have ht' : 0 ≤ 1-t := sub_nonneg.mpr ht.2 + constructor + · calc + l = (1-t)*l+t*l := by ring + _ ≤ (1-t)*u+t*v := add_le_add (mul_le_mul_of_nonneg_left hu.1 ht') + (mul_le_mul_of_nonneg_left hv.1 ht.1) + · calc + (1-t)*u+t*v ≤ (1-t)*h+t*h := add_le_add (mul_le_mul_of_nonneg_left hu.2 ht') + (mul_le_mul_of_nonneg_left hv.2 ht.1) + _ = h := by ring + +lemma roundedReturnCurve_height_bounds {f g : ℝ → ℝ} {a b t l h : ℝ} + (hf : f (a+b*t^2) ∈ Icc l h) (hg : g (a+b*t^2) ∈ Icc l h) : + (roundedReturnCurve f g a b t) 1 ∈ Icc l h := + convex_height_bounds (centeredSmoothStep_bounds t) hf hg + +lemma graphJoinCurve_height_bounds {f g : ℝ → ℝ} {t l h : ℝ} + (hf : f t ∈ Icc l h) (hg : g t ∈ Icc l h) : + (graphJoinCurve f g t) 1 ∈ Icc l h := + convex_height_bounds (centeredSmoothStep_bounds t) hf hg + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/HalfLinePuncturedNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/HalfLinePuncturedNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..6441ad272481ed65109ff95c80e13aebae15ef7d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/HalfLinePuncturedNeighborhood.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.HalfLineCompactArc +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcClosure + +namespace OAI + +/-! A boundary chart admits a connected punctured neighborhood avoiding +all other vertices of a prescribed finite set. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem half_line_punctured_neighborhood + (c : OpenPartialHomeomorph X (Ici (0:ℝ))) {p : X} + (hp : p ∈ c.source) (hzero : c p = ⟨0,by simp⟩) + (V : Set X) (hV : V.Finite) : + ∃ W : Set X, IsOpen W ∧ p ∈ W ∧ IsConnected (W \ {p}) ∧ + W \ {p} ⊆ Vᶜ ∧ p ∈ closure (W \ {p}) := by + have hD : IsClosed (V \ {p}) := (hV.subset sdiff_subset).isClosed + let U : Set X := (V \ {p})ᶜ + have hU : IsOpen U := hD.isOpen_compl + have hpU : p ∈ U := by + rintro ⟨_,hn⟩ + exact hn rfl + let e := c.restrOpen U hU + have hpe : p ∈ e.source := ⟨hp,hpU⟩ + have he0 : e p = ⟨0,by simp⟩ := hzero + obtain ⟨A,W,hW,hpW,_,hleft,hWS,hWe⟩ := half_line_compact_arc_data e hpe he0 + refine ⟨W,hW,hpW,?_,?_,?_⟩ + · rw [hWS] + exact A.subarc_connected le_rfl le_rfl A.ordered + · rintro x ⟨hxW,hxp⟩ hxV + exact (hWe hxW).2 ⟨hxV,hxp⟩ + · rw [hWS,A.subarc_closure le_rfl le_rfl A.ordered] + exact ⟨⟨A.left,le_rfl,A.ordered.le⟩,⟨le_rfl,A.ordered.le⟩,hleft⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/HigherJetMonomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/HigherJetMonomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..73cc72103d0742d10f379f7ae6a1beee40f8eb3e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/HigherJetMonomial.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.DirectionalJetBounds + +namespace OAI + +/-! Weighted bounds for a smooth low-jet coefficient times a finite product +of higher-jet components, the monomials of paper 094-01, equation (polynomial-jet-monomial). -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.WeightedEstimates + +variable {A J E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup J] [NormedSpace ℝ J] [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Compact control of the low jets, together with finite weighted control +of the second jets, gives a fixed scale loss for each higher-jet monomial. -/ +theorem compact_higher_jet_monomial {ι : Type*} {U : Set A} {V K : Set J} + (hU : IsOpen U) (hV : IsOpen V) (hK : IsCompact K) (hKV : K ⊆ V) + {c : J → E} (hc : ContDiffOn ℝ ∞ c V) (a : Finset ι) (vs : ι → List A) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ + ∀ (Q : A → J) (f : ι → A → ℝ) (s B : ℝ) (C : ι → ℝ), + 0 < s → 1 ≤ B → (∀ i ∈ a, 0 ≤ C i) → + (∀ i ∈ a, ∀ v ∈ vs i, ‖v‖ ≤ 1) → + ContDiffOn ℝ ∞ Q U → Set.MapsTo Q U K → WeightedBound U s m B Q → + (∀ i ∈ a, ContDiffOn ℝ ∞ (f i) U) → + (∀ i ∈ a, WeightedBound U s (m + (vs i).length) (C i) (f i)) → + WeightedBound U s m + ((2 ^ m * ((2 ^ m) ^ a.card * ∏ i ∈ a, C i) * + ((m.factorial : ℝ) * D * B ^ m)) / s ^ (∑ i ∈ a, (vs i).length)) + (fun x => (∏ i ∈ a, iteratedDirectional (vs i) (f i) x) • c (Q x)) := by + obtain ⟨D, hD, hd⟩ := smooth_compact_weighted_bound hU.uniqueDiffOn hV.uniqueDiffOn hK hKV hc m + refine ⟨D, hD, ?_⟩ + intro Q f s B C hs hB hC hv hQ hQK hbQ hf hbf + have hp := weighted_higher_jet_monomial hU hs a C vs f m hC hv hf hbf + have hcs := hc.comp hQ (fun x hx => hKV (hQK hx)) + have hcb := hd Q s B hs hB hQ hQK hbQ + have hps : ContDiffOn ℝ ∞ (fun x => ∏ i ∈ a, iteratedDirectional (vs i) (f i) x) U := + contDiffOn_prod (fun i hi => contDiffOn_iteratedDirectional hU (hf i hi) (vs i)) + have hCn : 0 ≤ (2 ^ m) ^ a.card * ∏ i ∈ a, C i := + mul_nonneg (by positivity) (Finset.prod_nonneg hC) + have hDn : 0 ≤ (m.factorial : ℝ) * D * B ^ m := by positivity + have h := hp.smul_real hU.uniqueDiffOn hs.le + (div_nonneg hCn (pow_nonneg hs.le _)) hDn hps hcs hcb + convert h using 1 <;> (first | rfl | ring) + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ImmersionLocalInjectivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ImmersionLocalInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e05e76acae7ee42c16043b6497f005a09ee47410 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ImmersionLocalInjectivity.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartGermImmersion +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A regular point of a smooth surface map has a neighborhood on which +the map is injective. Only the two-to-three-dimensional case is needed. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma euclidean_surface_local_injective {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (p : Base) (hp : Function.Injective (fderiv ℝ f p)) : + ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ U.InjOn f := by + obtain ⟨L,hL⟩ := (fderiv ℝ f p).toLinearMap.exists_leftInverse_of_injective + (LinearMap.ker_eq_bot.mpr hp) + let R := L.toContinuousLinearMap + let g : Base → Base := R ∘ f + have hg : ContDiff ℝ ∞ g := R.contDiff.comp hf + have hcomp : R.comp (fderiv ℝ f p) = ContinuousLinearMap.id ℝ Base := by + apply ContinuousLinearMap.ext + intro v + exact LinearMap.congr_fun hL v + have hd : HasFDerivAt g (ContinuousLinearEquiv.refl ℝ Base).toContinuousLinearMap p := by + have h := R.hasFDerivAt.comp p (hf.differentiable (by simp) p).hasFDerivAt + rw [hcomp] at h + exact h + let e := hg.contDiffAt.toOpenPartialHomeomorph g hd (by simp) + refine ⟨e.source,e.open_source,hg.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),?_⟩ + intro x hx y hy hxy + exact e.injOn hx hy (congrArg R hxy) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem surface_immersion_local_injective {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) (p : M) + (hp : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ U.InjOn f := by + let a := chart p p + have hps : p ∈ (chart p).source := by simpa only [chart_source] using mem_chart_source Plane p + have haT : a ∈ (chart p).target := (chart p).map_source hps + have hlocal : ContDiffOn ℝ ∞ (f ∘ (chart p).symm) (chart p).target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + obtain ⟨W,hW,haW,_hWT,φ,hφ,hmatch⟩ := + CollarVelocity.compact_smooth_extension (isCompact_singleton : IsCompact ({a} : Set Base)) + (chart p).open_target (by simpa using haT) hlocal + have hpmodel : f =ᶠ[𝓝 p] φ ∘ chart p := by + have ho := (chart p).isOpen_inter_preimage hW + have haW' : chart p p ∈ W := haW (by rfl) + filter_upwards [ho.mem_nhds ⟨hps,haW'⟩] with x hx + have hm := (hmatch hx.2).symm + change f ((chart p).symm (chart p x)) = φ (chart p x) at hm + simpa only [Function.comp_apply,(chart p).left_inv hx.1] using hm + have hi : Function.Injective (fderiv ℝ φ a) := + (chart_germ_immersion_iff p hps hφ hpmodel).mp hp + obtain ⟨O,hO,haO,hφI⟩ := euclidean_surface_local_injective hφ a hi + let U := (chart p).source ∩ (chart p) ⁻¹' (O ∩ W) + refine ⟨U,(chart p).isOpen_inter_preimage (hO.inter hW),⟨hps,haO,haW (by rfl)⟩,?_⟩ + intro x hx y hy hxy + have hxφ : f x = φ (chart p x) := by + have hh := hmatch hx.2.2 + simpa only [Function.comp_apply,(chart p).left_inv hx.1] using hh.symm + have hyφ : f y = φ (chart p y) := by + have hh := hmatch hy.2.2 + simpa only [Function.comp_apply,(chart p).left_inv hy.1] using hh.symm + apply (chart p).injOn hx.1 hy.1 + apply hφI hx.2.1 hy.2.1 + exact hxφ.symm.trans (hxy.trans hyφ) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGeometricNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGeometricNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8adb098ca3dc6eacae6f94aa87dfe2ab386e372 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGeometricNormal.lean @@ -0,0 +1,187 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentPreservingNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PreservingCircularNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_geometricCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_geometricCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_geometricCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_geometricCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_geometricCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_geometricCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_geometric_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, A₀.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := A₀.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := A₀.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + (∃ U₀ : Set SmallModes.Base, IsOpen U₀ ∧ baseEquiv '' C ⊆ U₀ ∧ + ∃ ν : SmallModes.Base → NormalFrame.Vec, ContDiffOn ℝ ∞ ν U₀ ∧ + (∀ p ∈ U₀, ν p ⬝ᵥ ν p = 1) ∧ + (∀ p ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A₀.phaseRealChartMap i e.symm W) p ⬝ᵥ ν p = 0) ∧ + (∀ p ∈ U₀, p ∉ V → ν p = + profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z p)) ∧ + (∀ j p, p ∈ Curves j → ν p ≠ -normalize + (realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j p,c j p) (b j p,c j p) p)) ∧ + ∀ j, + let H := A₀.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ ν (x j) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ ν (x j)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + have hs : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (A₀.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x)*(b j x)^2 := by + intro j x hx hz + have hcx := hCurveC j x hx + have hd := RealModes.gramDet_ne_zero_of_injective _ (hI x (hTU (hCurvesT j hx))) + rw [← A₀.phase_primitive_boundary_crossing i e he hi hFiso h hχ ha htarget + (hCS hcx).2 (hactiveC _ hcx) hz (Filter.Eventually.of_forall ha0) hd + (hboundary x (hCurvesT j hx) hz).1 (b j x) (c j x)] + exact hold j x hx hz + exact data.independent_preserving_circular_primitive_normal A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess (fun p _ => ha0 p) hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hs left right x hxinj hxE + hV hxV honly hfirst hslopes + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGlobalNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGlobalNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..93138b81df32cb2c9d1746e9be94beff57f2cc54 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentGlobalNormal.lean @@ -0,0 +1,225 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentGeometricNormal +import OAI.Geometry.SurfaceImmersion.Primitive.GeometricCircularNormal +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricNormalExtension +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_globalCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_globalCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_globalCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_globalCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_globalCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_globalCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_global_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, A₀.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := A₀.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) (B : SmoothingAtlas M) (curves : ι → PhaseBoundaryCurve B) + (n₀ : PreferredNormal F) + (hglobal : ∀ j p, p ∈ (curves j).carrier → (curves j).second F p ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize ((curves j).second F p)) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, A₀.weight i p ≠ 0) + (E₀ : Set M) (hE₀ : E₀.Finite) (hE₀f : Disjoint E₀ (frontier D)) + (hsupport : A₀.phaseSurfaceSupport i e K = closure D) + (hDC : ∀ p ∈ closure D, e (chart (i : M) p) ∈ C) + (hcurveChart : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + baseEquiv (e (chart (i : M) p)) ∈ Curves j) + (hvector : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) = + fderiv ℝ (surfacePhaseTransition ((curves j).index : M) (curves j).phase (i : M) e) + ((curves j).coordinate p) SmallModes.dy) + (hworldBoundary : ∀ p ∈ frontier D, + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) + SmallModes.dy SmallModes.dy (baseEquiv (e (chart (i : M) p))))) + (haFrontier : ∀ p ∈ frontier D, a (baseEquiv (e (chart (i : M) p))) = 0) + (hpositive : ∀ j p, p ∈ (curves j).carrier → p ∈ frontier D → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) + (hVfrontier : ∀ p ∈ frontier D, baseEquiv (e (chart (i : M) p)) ∉ V) + (hσD : ∀ j, (surfacePhaseChart (i : M) e).symm (x j) ∈ E₀ ∩ D) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + (∀ j p, p ∈ (curves j).carrier → (curves j).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves j).second W p)) ∧ + (∀ p ∈ E₀, p ∉ D → N.vector p = A₀.unitProjectedNormalField W n₀.vector p) ∧ + (∀ j, + let H := A₀.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + let p := (surfacePhaseChart (i : M) e).symm (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ spaceCoordinates (N.vector p) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ spaceCoordinates (N.vector p)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + classical + have : Fintype ι := Fintype.ofFinite ι + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + obtain ⟨ρ,hρ,hextend⟩ := A₀.geometric_normal_extension B hFiso n₀ houter + curves hglobal i e he hi hD hDr hDs hDe hDw E₀ hE₀ hE₀f + (fun j p => (b j p,c j p)) (fun j => (hb j).continuous.prodMk (hc j).continuous) + hvector hworldBoundary hpositive (fun j p hp hpf => + hold j _ (hcurveChart j p hp (frontier_subset_closure hpf)) (haFrontier p hpf)) + intro ε hε ζ hζ + let ε₀ := min ε (ρ/4) + let ζ₀ := min ζ (ρ/4) + have hε₀ : 0 < ε₀ := lt_min hε (by positivity) + have hζ₀ : 0 < ζ₀ := lt_min hζ (by positivity) + obtain ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,hlocal,hrest⟩ := + data.independent_geometric_circular_primitive_normal A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess ha0 hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hold left right x hxinj hxE + hV hxV honly hfirst hslopes ε₀ hε₀ ζ₀ hζ₀ + obtain ⟨U₀,hU₀,hCU₀,ν,hν,hunit,hnormal,hcanonical,hνavoid,hνcross⟩ := hlocal + obtain ⟨G,hG,hGF,V₀,hV₀,hWV,hVouter,hVsupport⟩ := hrest + have hsmall : ε₀+z^8 < ρ := by + have hz8 : z^8 ≤ z := calc + z^8 = z*z^7 := by ring + _ ≤ z*1 := mul_le_mul_of_nonneg_left (pow_le_one₀ hz.le hz1) hz.le + _ = z := mul_one _ + have heps : ε₀ ≤ ρ/4 := min_le_right _ _ + have hzz : z < ρ/4 := hzζ.trans_le (min_le_right _ _) + linarith + have hGF₂ : A₀.WeightedBound 1 2 ε₀ (G-F) := fun j => (hGF j).mono_order (by decide) + obtain ⟨N,hNav,hNmatch⟩ := hextend G V₀ W hG hV₀ h hW ε₀ (z^8) hε₀.le + (pow_nonneg hz.le _) hsmall hGF₂ hWV + (fun p hp => hVsupport p (by rwa [hsupport])) z U₀ hU₀ ν hν hunit hnormal + (fun p hp => hCU₀ ⟨e (chart (i : M) p),hDC p hp,rfl⟩) + (fun p hp => hcanonical _ (hCU₀ ⟨e (chart (i : M) p),hDC p (frontier_subset_closure hp),rfl⟩) + (hVfrontier p hp)) + (fun j p hp hpD => ⟨(havoid j _ (hcurveChart j p hp (subset_closure hpD))).1, + hνavoid j _ (hcurveChart j p hp (subset_closure hpD))⟩) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hdata,N,hNav, + (fun p hp hpD => (hNmatch p hp).2 hpD),?_,G,hG,?_,V₀,hV₀,hWV,hVouter,hVsupport⟩ + · intro j + have hxT : x j ∈ (surfacePhaseChart (i : M) e).target := by + constructor + · change baseEquiv.symm (x j) ∈ e.target + exact (hCS (hEC _ (hxE j))).2 + · change e.symm (baseEquiv.symm (x j)) ∈ (chart (i : M)).target + have ha := hactiveC _ (hEC _ (hxE j)) + by_contra hh + simp only [SmoothingAtlas.chartWeight,indicator_of_notMem hh] at ha + exact ha rfl + have heq : spaceCoordinates (N.vector ((surfacePhaseChart (i : M) e).symm (x j))) = ν (x j) := by + rw [(hNmatch _ (hσD j).1).1 (hσD j).2,A₀.phaseNormalLift_coordinates] + exact congrArg ν ((surfacePhaseChart (i : M) e).right_inv hxT) + dsimp only + rw [heq] + exact hνcross j + · exact fun j => (hGF j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPrefixBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPrefixBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3eca22502bc84b4828d093cff4b948b3bd126f36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPrefixBounds.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularCycleMetrics +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCycleBounds + +namespace OAI + +/-! Bounds for ordered prefixes in the original atlas, independently of +the atlas that describes the geometric primitive disks. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem independent_prefix_bounds (m : ℕ) (D : ℝ) (hD : 0 ≤ D) : + ∃ N : ℕ, 0 < N ∧ ∀ (B : SmoothingAtlas M) (g g₀ : SmoothMetric M) + (c C : ℝ), (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) → + ∀ (u : ∀ p : M, CovariantTwoTensor p) + (f : Fin N → SmoothPrimitiveFamily (Fin m) u), + (∀ k a, A.TensorWeightedBound 1 1 D ((f k).term a)) → + (∀ k : Fin N, A.TensorWeightedBound 1 1 C (g₀.inner+((k.val : ℝ)/(N : ℝ)) • u)) → + ∀ d : CircularPrimitiveFamily B (Fin (N*m)), + (∀ a p, d.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) → + (∀ a, d.phase a = (f a.divNat).phase a.modNat) → + ∀ a : Fin (N*m), A.TensorWeightedBound 1 1 (C+1) (d.prefixMetric g₀ a.castSucc).inner ∧ + ∀ p v, c*g.inner p v v ≤ (d.prefixMetric g₀ a.castSucc).inner p v v := by + obtain ⟨N,hN,hcount⟩ := SmoothPrimitiveFamily.exists_cycle_count (ι := Fin m) D + refine ⟨N,hN,?_⟩ + intro B g g₀ c C hlower u f hb hpath d ha hp a + obtain ⟨⟨k,j⟩,rfl⟩ := finProdFinEquiv.surjective a + rw [d.prefixMetric_cycle f ha hp g₀ k j] + have he : (f k).cycleMetric B g₀ N k.val (CircularPrimitiveFamily.prefixIndices j.castSucc) = + (f k).cycleMetric A g₀ N k.val (CircularPrimitiveFamily.prefixIndices j.castSucc) := + metric_eq_of_inner_eq rfl + rw [he] + refine ⟨?_,?_⟩ + · have hh := (f k).cycleMetric_bound A hD 1 (hb k) g₀ N k.val + (CircularPrimitiveFamily.prefixIndices j.castSucc) (hpath k) + intro i + apply (hh i).mono_const + simpa only [Fintype.card_fin] using add_le_add_right hcount C + · intro p v + exact (hlower p v).trans ((f k).cycleMetric_lower A g₀ N k.val + (CircularPrimitiveFamily.prefixIndices j.castSucc) p v) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPreservingNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPreservingNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..86511352e8ed9a23ffd4d56108af65b55112e30f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentPreservingNormal.lean @@ -0,0 +1,193 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentPreservingCircular +import OAI.Geometry.SurfaceImmersion.Primitive.PreservingCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_preservingCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_preservingCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_preservingCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_preservingCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_preservingCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_preservingCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_preserving_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, A₀.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (A₀.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x)*(b j x)^2) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := A₀.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + (∃ U₀ : Set SmallModes.Base, IsOpen U₀ ∧ baseEquiv '' C ⊆ U₀ ∧ + ∃ ν : SmallModes.Base → NormalFrame.Vec, ContDiffOn ℝ ∞ ν U₀ ∧ + (∀ p ∈ U₀, ν p ⬝ᵥ ν p = 1) ∧ + (∀ p ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A₀.phaseRealChartMap i e.symm W) p ⬝ᵥ ν p = 0) ∧ + (∀ p ∈ U₀, p ∉ V → ν p = + profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z p)) ∧ + (∀ j p, p ∈ Curves j → ν p ≠ -normalize + (realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j p,c j p) (b j p,c j p) p)) ∧ + ∀ j, + let H := A₀.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ ν (x j) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ ν (x j)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + classical + let _ : Fintype ι := Fintype.ofFinite ι + intro ε hε ζ hζ + obtain ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,hrest⟩ := + data.independent_preserving_circular_primitive_boundary A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess haT hboundary hCurves hCurvesT hP hlocal hE hET haE + slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff ℓ hℓx hℓy + h htarget hC hCS hCurveC hactiveC hEC hold ε hε ζ hζ + let H := A₀.phaseRealChartMap i e.symm W + let Y : ι → SmallModes.Base → SmallModes.Base := fun j p => (b j p,c j p) + have hmem (j : ι) (p : SmallModes.Base) (hp : p ∈ Curves j) : p ∈ baseEquiv '' C := + ⟨baseEquiv.symm p,hCurveC j p hp,baseEquiv.apply_symm_apply p⟩ + obtain ⟨U₀,hU₀,hCU₀,ν,hν,hνunit,hνnormal,hνout,hνavoid,hνcross⟩ := + compact_slope_crossing_normal (T := baseEquiv '' C) (A₀.phaseRealChartMap_smooth i hi hW.1) z hV + (by rintro _ ⟨p,hp,rfl⟩; exact hreg p hp) Y (fun j => (hb j).prodMk (hc j)) + left right x hxinj + (fun j => ⟨baseEquiv.symm (x j),hEC _ (hxE j),baseEquiv.apply_symm_apply _⟩) + hxV Curves (fun j => (hCurves j).isClosed) honly + (fun j p _ hp => (havoid j p hp).2) hfirst slopeBound hslopes + (coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy)) + (fun j => hcross (x j) (hxE j)) + refine ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,?_,hrest⟩ + exact ⟨U₀,hU₀,hCU₀,ν,hν,hνunit,hνnormal,hνout, + (fun j p hp => hνavoid j p (hmem j p hp) hp),hνcross⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusBox.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusBox.lean new file mode 100644 index 0000000000000000000000000000000000000000..964da0fa0f06579613f800fca83cc934bbf491ec --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusBox.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentShrinkingWeights +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingAtlasWeightBounds + +namespace OAI + +/-! A fixed open radius box with uniform bounds for every independent +choice. The box and its derivative constants precede all later cycle counts. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] +variable {ι : Type*} [Fintype ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- All radii may be varied independently inside the displayed nonempty +open box. The actual weights remain uniformly close to their reference and +have one common finite-order atlas bound. -/ +theorem independent_radius_box (index : ι → A.centers) (r0 : ι → ℝ) + (hnon : ∀ a x, 0 ≤ A.weight (index a) x) (hr0 : ∀ a, 0 < r0 a) + (hreg : ∀ a, circularCoordinateRegion (index a : M) (r0 a) ⊆ + (coordinateChart (index a : M)).target) + (hpos : ∀ a x, 0 < A.weight (index a) x ↔ + x ∈ circularCoordinateDisk (index a : M) (r0 a)) + {eps : ℝ} (heps : 0 < eps) : + ∃ (delta : ℝ) (C : ℕ → ℝ), 0 < delta ∧ (∀ a, delta ≤ r0 a/2) ∧ + (∀ m, 0 ≤ C m) ∧ ∀ r : ι → ℝ, + (∀ a, r0 a-delta < r a ∧ r a < r0 a-delta/2) → + (∀ a, 0 < r a) ∧ + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ + (shrinkingCircularWeight (index a : M) (A.weight (index a)) (r0 a) (r a))) ∧ + (∀ a x, 0 < shrinkingCircularWeight (index a : M) (A.weight (index a)) (r0 a) (r a) x ↔ + x ∈ circularCoordinateDisk (index a : M) (r a)) ∧ + (∀ a, tsupport (shrinkingCircularWeight (index a : M) (A.weight (index a)) (r0 a) (r a)) ⊆ + circularDiskClosure (index a : M) (r a)) ∧ + (∀ a x, |shrinkingCircularWeight (index a : M) (A.weight (index a)) (r0 a) (r a) x- + A.weight (index a) x| < eps) ∧ + ∀ a m, A.WeightedBound 1 m (C m) + (shrinkingCircularWeight (index a : M) (A.weight (index a)) (r0 a) (r a)) := by + classical + obtain ⟨delta,hdelta,hdeltaR,hnear⟩ := independent_shrinking_weights + (fun a => (index a : M)) (fun a => A.weight (index a)) r0 + (fun a => A.weight_smooth (index a)) hnon hr0 hreg hpos heps + have hR (a : ι) : (r0 a-delta/2)^2 < (r0 a)^2 := by + have := hdeltaR a + have := hr0 a + nlinarith + choose B hB hb using fun a => A.shrinking_weight_atlas_bounds (index a) (hreg a) (hR a) + refine ⟨delta,fun m => ∑ a : ι, B a m,hdelta,hdeltaR, + (fun m => Finset.sum_nonneg (fun a _ => hB a m)),?_⟩ + intro r hr + have hr' : ∀ a, r0 a-delta < r a ∧ r a < r0 a := by + intro a + exact ⟨(hr a).1,lt_trans (hr a).2 (by linarith)⟩ + obtain ⟨hrpos,hsmooth,hpositive,hsupport,hclose⟩ := hnear r hr' + refine ⟨hrpos,hsmooth,hpositive,hsupport,hclose,?_⟩ + intro a m + have hr2 : (r a)^2 ≤ (r0 a-delta/2)^2 := by + have := hrpos a + have := (hr a).2 + nlinarith + intro i + exact (hb a (r a) hr2 m i).mono_const + (Finset.single_le_sum (fun b _ => hB b m) (Finset.mem_univ a)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusProjections.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusProjections.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1fa71224298939285ebf000153d831cd5dbc2ec --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IndependentRadiusProjections.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericRadiusParameters + +namespace OAI + +/-! The pair and triple projections used for independently perturbed disk +radii are actual surjective bounded linear maps. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PublishedInputs +variable {ι : Type*} [DecidableEq ι] + +def radiusPairProjection (i j : ι) : (ι → ℝ) →L[ℝ] Plane := + (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Fin 2 => ℝ)).symm.toContinuousLinearMap.comp + (ContinuousLinearMap.pi (fun a : Fin 2 => ContinuousLinearMap.proj (if a = 0 then i else j))) + +omit [DecidableEq ι] in +@[simp] lemma radiusPairProjection_apply_zero (i j : ι) (t : ι → ℝ) : + radiusPairProjection i j t 0 = t i := by + simp [radiusPairProjection] + +omit [DecidableEq ι] in +@[simp] lemma radiusPairProjection_apply_one (i j : ι) (t : ι → ℝ) : + radiusPairProjection i j t 1 = t j := by + simp [radiusPairProjection] + +lemma radiusPairProjection_surjective {i j : ι} (hij : i ≠ j) : + Function.Surjective (radiusPairProjection i j) := by + intro y + refine ⟨Function.update (Function.update (fun _ => 0) i (y 0)) j (y 1),?_⟩ + apply (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Fin 2 => ℝ)).injective + funext a + fin_cases a + · simp [hij] + · simp + +def radiusTripleProjection (i j k : ι) : (ι → ℝ) →L[ℝ] (Plane × ℝ) := + (radiusPairProjection i j).prod (ContinuousLinearMap.proj k) + +lemma radiusTripleProjection_surjective {i j k : ι} + (hij : i ≠ j) (hik : i ≠ k) (hjk : j ≠ k) : + Function.Surjective (radiusTripleProjection i j k) := by + intro y + refine ⟨Function.update + (Function.update (Function.update (fun _ => 0) i (y.1 0)) j (y.1 1)) k y.2,?_⟩ + apply Prod.ext + · change radiusPairProjection i j _ = y.1 + apply (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Fin 2 => ℝ)).injective + funext a + fin_cases a + · simp [hij,hik] + · simp [hjk] + · simp [radiusTripleProjection] + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InducedMetricDifferenceBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InducedMetricDifferenceBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..6726a47c3fac3c82bdef64289a06f178aa9c3a43 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InducedMetricDifferenceBound.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalLinearMetricBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Quantitative continuity of the induced metric in a fixed atlas norm. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma inducedTensor_sub_eq_half_linear {F G : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) : + inducedTensor G-inducedTensor F = (1/2 : ℝ) • linearMetricTensor (G+F) (G-F) := by + funext p + ext v w + have ha := mfderiv_add ((hG p).mdifferentiableAt (by simp)) ((hF p).mdifferentiableAt (by simp)) + have hs := mfderiv_sub ((hG p).mdifferentiableAt (by simp)) ((hF p).mdifferentiableAt (by simp)) + change inducedForm G p v w-inducedForm F p v w = (1/2 : ℝ)*linearMetricForm (G+F) (G-F) p v w + simp only [inducedForm,linearMetricForm,surfaceDifferential,ha,hs] + let DG : TangentSpace planeModel p →L[ℝ] Space := mfderiv planeModel spaceModel G p + let DF : TangentSpace planeModel p →L[ℝ] Space := mfderiv planeModel spaceModel F p + change inner ℝ (DG v) (DG w) - + inner ℝ (DF v) (DF w) = + (1/2 : ℝ)*(inner ℝ + (DG v+DF v) + (DG w-DF w) + + inner ℝ (DG v-DF v) + (DG w+DF w)) + rw [inner_add_left,inner_sub_right,inner_sub_right,inner_sub_left,inner_add_right,inner_add_right] + ring + +variable [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem induced_metric_difference_bound (m : ℕ) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (D eps : ℝ), 0 ≤ D → 0 ≤ eps → + ∀ F G : M → Space, ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 (m+1) D F → A.WeightedBound 1 (m+1) D G → + A.WeightedBound 1 (m+1) eps (G-F) → + A.TensorWeightedBound 1 m (E*D*eps) (inducedTensor G-inducedTensor F) := by + obtain ⟨E,hE,hbound⟩ := A.global_linear_metric_bound m + refine ⟨E,hE,?_⟩ + intro D eps hD heps F G hF hG hbF hbG hbDiff + have hbSum := A.weightedBound_add hG hF zero_le_one hbG hbF + have hb := hbound 1 (D+D) eps zero_lt_one le_rfl (add_nonneg hD hD) heps + (G+F) (G-F) (hG.add hF) (hG.sub hF) hbSum hbDiff + rw [inducedTensor_sub_eq_half_linear hF hG] + have hs := A.tensorWeightedBound_const_smul (A.linearMetricTensor_smooth (hG.add hF) (hG.sub hF)) + hb (1/2 : ℝ) + convert hs using 1 + norm_num + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitialInputBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitialInputBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..08e0fe726b47459e446dafbc02f302953d62a42f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitialInputBounds.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap +import OAI.Geometry.SurfaceImmersion.Correction.PreparedCorrection +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalInputRecurrence + +namespace OAI + +/-! Finite initial input estimates for the scalar-contracted map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +local instance initialBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance initialBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance initialBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance initialBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance initialBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance initialBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma space_smul_contMDiff {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (a : ℝ) : + ContMDiff planeModel spaceModel ∞ (a • F) := + (a • ContinuousLinearMap.id ℝ Space).contDiff.contMDiff.comp hF + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma weightedBound_const_smul {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {s C : ℝ} {m : ℕ} + (hb : A.WeightedBound s m C F) (a : ℝ) : + A.WeightedBound s m (|a| * C) (a • F) := by + intro i + rw [localize_smul] + exact (hb i).const_smul uniqueDiffOn_univ + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).contDiffOn a + +lemma shiftedBound_smul_of_abs_le_one {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {s C a : ℝ} {q m : ℕ} + (_hs : 0 ≤ s) (hC : 0 ≤ C) (ha : |a| ≤ 1) + (hb : A.ShiftedBound q m s C F) : A.ShiftedBound q m s C (a • F) := by + intro i j hj x + have hf := localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF + change s^(j-q)*‖iteratedFDeriv ℝ j (localize (i : M) (A.weight i) (a • F)) x‖ ≤ C + rw [localize_smul,iteratedFDeriv_const_smul_apply (hf.of_le (by simp)).contDiffAt, + norm_smul,Real.norm_eq_abs] + calc + _ = |a| * (s^(j-q)*‖iteratedFDeriv ℝ j (localize (i : M) (A.weight i) F) x‖) := by ring + _ ≤ |a| * C := mul_le_mul_of_nonneg_left (hb i j hj x) (abs_nonneg a) + _ ≤ C := by nlinarith + +omit [CompactSpace M] in +lemma shifted_zero_to_weighted {F : M → Space} {P : ℝ} {q : ℕ} + (hb : A.ShiftedBound q 0 1 P F) : A.WeightedBound 1 q P F := by + intro i j hj x _ + have hh := hb i j (by omega) x + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hh + +/-- The contracted initial map has the required two-derivative prefix and +finite high-order input bound. -/ +theorem contracted_initial_input_scaled + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + {g : SmoothMetric M} {δ s σ P Q C D e B : ℝ} {m : ℕ} + (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) (hs : 0 ≤ s) (hs1 : s ≤ 1) (hσ : 0 < σ) (hsσ : s ≤ σ) + (hP : 0 ≤ P) (hC : 0 ≤ C) (hD : 0 ≤ D) (he : 0 ≤ e) + (hmap0 : A.ShiftedBound 2 0 σ P F) (hmap : A.ShiftedBound 2 m σ C F) + (hmetric0 : A.TensorWeightedBound 1 0 Q g.inner) + (hmetric : A.TensorWeightedBound 1 m D g.inner) + (herror : A.TensorWeightedBound s m (δ^2*e) (inducedTensor F-g.inner)) + (hMB : P+(s/σ)*C ≤ B) (hHB : Q+s*D+e ≤ B) : + A.InputBound s m B (Real.sqrt (1-δ^2) • F) + (normalizedTensorDefect g.inner δ (Real.sqrt (1-δ^2) • F)) := by + have hsqrt : |Real.sqrt (1-δ^2)| ≤ 1 := by + rw [abs_of_nonneg (Real.sqrt_nonneg _)] + nlinarith [Real.sq_sqrt (sub_nonneg.mpr hδ1),Real.sqrt_nonneg (1-δ^2),sq_nonneg δ] + have hbF := A.shiftedBound_smul_of_abs_le_one hF hs + (add_nonneg hP (mul_nonneg (div_nonneg hs hσ.le) hC)) hsqrt + (A.shifted_shrink_with_prefix hmap0 hmap hσ hs hsσ hP hC) + have hbH := A.normalized_initial_error_bound hF g.contMDiff hδ hδ1 he herror + have hh := A.tensorWeightedBound_add g.contMDiff + ((A.normalizedTensorDefect_smooth g.contMDiff δ (space_smul_contMDiff hF (Real.sqrt (1-δ^2)))).sub_section g.contMDiff) + hs (A.tensor_shrink_with_norm hs hs1 hD hmetric0 hmetric) hbH + have hid : g.inner+(normalizedTensorDefect g.inner δ (Real.sqrt (1-δ^2) • F)-g.inner) = + normalizedTensorDefect g.inner δ (Real.sqrt (1-δ^2) • F) := by abel + rw [hid] at hh + exact ⟨fun i j hj x => (hbF i j hj x).trans hMB,fun i => (hh i).mono_const hHB⟩ + +/-- The contracted initial map has the required two-derivative prefix and +finite high-order input bound. -/ +theorem contracted_initial_input + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + {g : SmoothMetric M} {δ s P Q C D e B : ℝ} {m : ℕ} + (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) (hs : 0 ≤ s) (hs1 : s ≤ 1) + (hP : 0 ≤ P) (hC : 0 ≤ C) (hD : 0 ≤ D) (he : 0 ≤ e) + (hmap0 : A.ShiftedBound 2 0 1 P F) (hmap : A.ShiftedBound 2 m 1 C F) + (hmetric0 : A.TensorWeightedBound 1 0 Q g.inner) + (hmetric : A.TensorWeightedBound 1 m D g.inner) + (herror : A.TensorWeightedBound s m (δ^2*e) (inducedTensor F-g.inner)) + (hMB : P+s*C ≤ B) (hHB : Q+s*D+e ≤ B) : + A.InputBound s m B (Real.sqrt (1-δ^2) • F) + (normalizedTensorDefect g.inner δ (Real.sqrt (1-δ^2) • F)) := by + exact A.contracted_initial_input_scaled hF hδ hδ1 hs hs1 zero_lt_one hs1 + hP hC hD he hmap0 hmap hmetric0 hmetric herror + (by simpa only [div_one] using hMB) hHB + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitializationPowers.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitializationPowers.lean new file mode 100644 index 0000000000000000000000000000000000000000..81f1c9883c094786b262e7ce4a90b9ade4ca3e8f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InitializationPowers.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold + +namespace OAI + +/-! The strict powers needed by the initialization in exact-correction.tex. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection + +/-- With the paper's initial amplitude `δ = z^(10*μ)`, contraction of a +map of C² size `O(z⁻²)` is smaller than the radius `z⁴`. An input metric +error of order `N > 20*μ` becomes small after normalization by `δ²`. -/ +theorem initialization_power_threshold {μ N C a : ℝ} (hμ : 1 < μ) + (hN : 20*μ < N) (ha : 0 < a) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ z : ℝ, 0 < z → z < η → + C*z^(20*μ-2) ≤ z^4/8 ∧ C*z^(N-20*μ) < a := by + obtain ⟨η₁,hη₁,hη₁1,h₁⟩ := positive_power_threshold C (20*μ-6) (1/8) + (by linarith) (by norm_num) + obtain ⟨η₂,hη₂,_,h₂⟩ := positive_power_threshold C (N-20*μ) a + (by linarith) ha + refine ⟨min η₁ η₂,lt_min hη₁ hη₂,(min_le_left _ _).trans hη₁1,?_⟩ + intro z hz hzη + refine ⟨?_,h₂ z hz (hzη.trans_le (min_le_right _ _))⟩ + have hh := mul_le_mul_of_nonneg_right (h₁ z hz (hzη.trans_le (min_le_left _ _))).le + (pow_nonneg hz.le 4) + have he : C*z^(20*μ-2) = (C*z^(20*μ-6))*z^4 := by + rw [show 20*μ-2 = (20*μ-6)+4 by ring,Real.rpow_add hz,Real.rpow_ofNat] + ring + rw [he] + linarith + +/-- The finite first-block input budget in the paper's original weighted +scale. No loss proportional to the differentiation order is introduced. -/ +theorem initialization_budget_threshold {μ N C D e : ℝ} (hμ : 1 < μ) + (hN : 20*μ < N) (hC : 0 ≤ C) (hD : 0 ≤ D) (he : 0 < e) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1/32 ∧ ∀ z : ℝ, 0 < z → z < η → + z^μ ≤ z ∧ z^μ ≤ 1/32 ∧ + C/z^2+(z^μ/z)*(C/z^2) ≤ 1/z^4 ∧ + D+z^μ*D+e ≤ 1/z^4 ∧ + z^(20*μ)*(C/z^2) ≤ z^4/8 ∧ + C*z^N ≤ z^(20*μ)*e := by + obtain ⟨η₀,hη₀,_,hp⟩ := initialization_power_threshold (C := C) hμ hN he + obtain ⟨η₁,hη₁,_,h₁⟩ := positive_power_threshold (2*C) 2 1 (by norm_num) zero_lt_one + obtain ⟨η₂,hη₂,_,h₂⟩ := positive_power_threshold (2*D+e) 4 1 (by norm_num) zero_lt_one + let η := min (1/32) (min η₀ (min η₁ η₂)) + refine ⟨η,lt_min (by norm_num) (lt_min hη₀ (lt_min hη₁ hη₂)),min_le_left _ _,?_⟩ + intro z hz hzη + have hz32 : z ≤ 1/32 := hzη.le.trans (min_le_left _ _) + have hz1 : z ≤ 1 := by linarith + have hη := hzη.trans_le (min_le_right _ _) + have hz₀ : z < η₀ := hη.trans_le (min_le_left _ _) + have hη' := hη.trans_le (min_le_right _ _) + have hz₁ : z < η₁ := hη'.trans_le (min_le_left _ _) + have hz₂ : z < η₂ := hη'.trans_le (min_le_right _ _) + have ht : z^μ ≤ z := by + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hμ.le + have hratio : z^μ/z ≤ 1 := (div_le_one hz).mpr ht + have hsmall₁ : (2*C)*z^2 ≤ 1 := by + simpa only [Real.rpow_ofNat] using (h₁ z hz hz₁).le + have hsmall₂ : (2*D+e)*z^4 ≤ 1 := by + simpa only [Real.rpow_ofNat] using (h₂ z hz hz₂).le + have hbudget : 2*C/z^2 ≤ 1/z^4 := by + apply (div_le_div_iff₀ (pow_pos hz 2) (pow_pos hz 4)).mpr + nlinarith [mul_nonneg (sub_nonneg.mpr hsmall₁) (sq_nonneg z)] + have hmetric : 2*D+e ≤ 1/z^4 := (le_div_iff₀ (pow_pos hz 4)).mpr hsmall₂ + obtain ⟨hdisp,herr⟩ := hp z hz hz₀ + have hpower : z^(20*μ)*(C/z^2) = C*z^(20*μ-2) := by + rw [Real.rpow_sub hz,Real.rpow_ofNat] + ring + have herror : C*z^N = (C*z^(N-20*μ))*z^(20*μ) := by + rw [mul_assoc,← Real.rpow_add hz] + congr 2 + ring + refine ⟨ht,ht.trans hz32,?_,?_,?_,?_⟩ + · calc + C/z^2+(z^μ/z)*(C/z^2) ≤ C/z^2+1*(C/z^2) := + add_le_add le_rfl (mul_le_mul_of_nonneg_right hratio (div_nonneg hC (sq_nonneg z))) + _ = 2*C/z^2 := by ring + _ ≤ 1/z^4 := hbudget + · exact (by nlinarith [mul_le_mul_of_nonneg_right (ht.trans hz1) hD] : + D+z^μ*D+e ≤ 2*D+e).trans hmetric + · rwa [hpower] + · rw [herror] + exact (mul_le_mul_of_nonneg_right herr.le (Real.rpow_nonneg hz.le _)).trans_eq (mul_comm _ _) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InjectivePathConcatenation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InjectivePathConcatenation.lean new file mode 100644 index 0000000000000000000000000000000000000000..42ba2a3a070d9420eae79b9645f45ec7928df384 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InjectivePathConcatenation.lean @@ -0,0 +1,53 @@ +import Mathlib.Topology.Path + +namespace OAI + +/-! Concatenating two embedded arcs meeting only at their common endpoint. -/ +noncomputable section +open Set unitInterval +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] {x y z : X} + +theorem path_trans_injective (γ : Path x y) (δ : Path y z) + (hγ : Function.Injective γ) (hδ : Function.Injective δ) + (hsep : ∀ s t, γ s = δ t → s = 1 ∧ t = 0) : Function.Injective (γ.trans δ) := by + intro s t h + apply Subtype.ext + rw [Path.trans_apply,Path.trans_apply] at h + split_ifs at h with hs ht ht + · have hv := congrArg (fun u : I => (u:ℝ)) (hγ h) + dsimp only at hv + linarith + · obtain ⟨ha,hb⟩ := hsep _ _ h + have ha' := congrArg (fun u : I => (u:ℝ)) ha + have hb' := congrArg (fun u : I => (u:ℝ)) hb + dsimp only at ha' hb' + norm_num at ha' hb' + linarith + · obtain ⟨ha,hb⟩ := hsep _ _ h.symm + have ha' := congrArg (fun u : I => (u:ℝ)) ha + have hb' := congrArg (fun u : I => (u:ℝ)) hb + dsimp only at ha' hb' + norm_num at ha' hb' + linarith + · have hv := congrArg (fun u : I => (u:ℝ)) (hδ h) + dsimp only at hv + linarith + +theorem path_trans_injective_of_range (γ : Path x y) (δ : Path y z) + (hγ : Function.Injective γ) (hδ : Function.Injective δ) + (hmeet : range γ ∩ range δ ⊆ {y}) : Function.Injective (γ.trans δ) := by + apply path_trans_injective γ δ hγ hδ + intro s t h + have hy : γ s = y := mem_singleton_iff.mp (hmeet ⟨mem_range_self s,⟨t,h.symm⟩⟩) + constructor + · apply hγ + simpa only [Path.target] using hy + · apply hδ + simpa only [Path.source] using h.symm.trans hy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..81d2b7abd994d8277f979c54cced4454502e7852 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputQuadraticCancellation.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasInputPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticSolverInputBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseReadBounds + +namespace OAI + +/-! Uniform cancellation of the actual quadratic oscillations at a nearby map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputQuadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputQuadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputQuadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputQuadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputQuadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputQuadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem input_global_quadratic_cancellation_all_profiles + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (hφ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (φ i)) + (S : ι → Set M) (hS : ∀ i, IsClosed (S i)) + (hImm : ∀ k l x, x ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) x)) + (hgood : ∀ k l x, x ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) x)) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (P a : ℕ → ℝ), + (∀ m, 0 ≤ P m) → (∀ m, 0 ≤ a m) → ∀ q : ℕ, + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → ∀ B : ℝ, + 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + ∀ (τ δ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → + (∀ m, A.ShiftedBound 2 m s (P m) G) → + ∀ (Z : ι → M → Fin 4 → ℂ) (_hZ : ∀ i, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z i)), + (∀ i, tsupport (Z i) ⊆ S i) → + (∀ k i m, WeightedEstimates.WeightedBound univ s (m+1) (a m*(δ*τ)) (A.vectorPlaneRead k (Z i))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2*Cv m) W) ∧ + (∀ m, A.TensorWeightedBound τ m (δ^2*(τ/s)^(q+1)*Ct m) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun i => A.vectorPlaneRead k (φ i)) + (fun i => A.vectorPlaneRead k (Z i)) x))) := by + classical + choose R hR hr using fun m => A.phase_read_gradient_bound φ hφ m + obtain ⟨ρ,hρ,hall⟩ := A.atlas_input_phase_cancellation_all_profiles F hF + (A.globalQuadraticPhase φ) (A.globalQuadraticPhase_smooth φ hφ) + (A.quadraticOverlapCompact S hS) + (fun k l => Set.image_mono (A.quadraticOverlapCompact_subset S hS k l)) + hImm hgood + refine ⟨ρ,hρ,?_⟩ + intro P a hP ha q + choose T hT ht using fun k m => A.globalQuadraticTarget_bound (ι := ι) k m (a m) (R m) + obtain ⟨C,D,hC,hD,hcancel⟩ := hall P hP q + let N := PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q + let Cv := fun m => ∑ k : A.centers, ∑ l, C k l m*T k (N m) + let Ct := fun m => ∑ k : A.centers, ∑ l, D k l m*T k (N m) + have hCv (m) : 0 ≤ Cv m := Finset.sum_nonneg fun k _ => + Finset.sum_nonneg fun l _ => mul_nonneg (hC k l m) (hT k (N m)) + have hCt (m) : 0 ≤ Ct m := Finset.sum_nonneg fun k _ => + Finset.sum_nonneg fun l _ => mul_nonneg (hD k l m) (hT k (N m)) + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ δ s hτ hs hτs hs1 hδ hp Z hZ hSZ hz + let target := A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ + have htarget (k l m) : supportedWeightedSeminorm + (modeSupport (A.quadraticOverlapCompact S hS k l)) s m (target k l) ≤ T k m*δ^2 := by + apply supportedSeminorm_le_of_weightedBound hs (mul_nonneg (hT k m) (sq_nonneg δ)) + exact ht k m τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ (ha m) (hR m) + (fun i => hz k i m) (fun i v hv => hr m k i s hs.le hs1 v hv) l + obtain ⟨W,hW,hsize,hres⟩ := hcancel G hG B hB hBρ hb τ s hτ hs hτs hs1 hp target + have hsum (E : (k : A.centers) → RealModes.QuadraticLabel ι → ℝ) + (hE : ∀ k l, 0 ≤ E k l) (m : ℕ) : + (∑ k : A.centers, ∑ l, E k l*supportedWeightedSeminorm + (modeSupport (A.quadraticOverlapCompact S hS k l)) s m (target k l)) ≤ + δ^2*∑ k : A.centers, ∑ l, E k l*T k m := by + calc + _ ≤ ∑ k : A.centers, ∑ l, E k l*(T k m*δ^2) := + Finset.sum_le_sum fun k _ => Finset.sum_le_sum fun l _ => + mul_le_mul_of_nonneg_left (htarget k l m) (hE k l) + _ = _ := by + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro k _ + apply Finset.sum_congr rfl + intro l _ + ring + refine ⟨W,hW,?_,?_⟩ + · intro m k + exact (hsize m k).mono_const (hsum (fun k l => C k l m) (fun k l => hC k l m) (N m)) + · intro m k + have hh := (hres m k).mono_const + (mul_le_mul_of_nonneg_left (hsum (fun k l => D k l m) (fun k l => hD k l m) (N m)) + (pow_nonneg (div_nonneg hτ.le hs.le) _)) + have he : (τ/s)^(q+1)*(δ^2*Ct m) = δ^2*(τ/s)^(q+1)*Ct m := by ring + rw [he] at hh + rw [A.globalQuadraticTarget_expansion τ φ Z hφ hZ] + exact hh + +theorem input_global_quadratic_cancellation + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (hφ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (φ i)) + (S : ι → Set M) (hS : ∀ i, IsClosed (S i)) + (hImm : ∀ k l x, x ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) x)) + (hgood : ∀ k l x, x ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) x)) + (P a : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) (ha : ∀ m, 0 ≤ a m) (q : ℕ) : + ∃ (ρ : ℝ) (Cv Ct : ℕ → ℝ), 0 < ρ ∧ (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → ∀ B : ℝ, + 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + ∀ (τ δ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → + (∀ m, A.ShiftedBound 2 m s (P m) G) → + ∀ (Z : ι → M → Fin 4 → ℂ) (_hZ : ∀ i, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z i)), + (∀ i, tsupport (Z i) ⊆ S i) → + (∀ k i m, WeightedEstimates.WeightedBound univ s (m+1) (a m*(δ*τ)) (A.vectorPlaneRead k (Z i))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2*Cv m) W) ∧ + (∀ m, A.TensorWeightedBound τ m (δ^2*(τ/s)^(q+1)*Ct m) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun i => A.vectorPlaneRead k (φ i)) + (fun i => A.vectorPlaneRead k (Z i)) x))) := by + obtain ⟨ρ,hρ,hall⟩ := A.input_global_quadratic_cancellation_all_profiles F hF φ hφ S hS hImm hgood + obtain ⟨Cv,Ct,hCv,hCt,hcancel⟩ := hall P a hP ha q + exact ⟨ρ,Cv,Ct,hρ,hCv,hCt,hcancel⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputSize.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..7695c9633dc139c56fbb07b8498317af957985cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InputSize.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds +import OAI.Geometry.SurfaceImmersion.Correction.CoupledSmoothing + +namespace OAI + +/-! Finite joint input norms for the adaptive correction iteration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +local instance inputSizeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputSizeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputSizeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputSizeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputSizeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputSizeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma inputBound_mono_const {t C D : ℝ} {m : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} (hb : A.InputBound t m C G H) + (hCD : C ≤ D) : A.InputBound t m D G H := by + constructor + · intro i j hj x + exact (hb.1 i j hj x).trans hCD + · intro i + exact (hb.2 i).mono_const hCD + +omit [CompactSpace M] in +lemma inputBound_mono_order {t C : ℝ} {m r : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} (hb : A.InputBound t m C G H) + (hr : r ≤ m) : A.InputBound t r C G H := by + constructor + · intro i j hj x + exact hb.1 i j (hj.trans (Nat.add_le_add_left hr 2)) x + · intro i + exact (hb.2 i).mono_order hr + +/-- The least nonnegative bound for the joint map/metric input. -/ +def inputSize (t : ℝ) (m : ℕ) (G : M → Space) + (H : ∀ p : M, CovariantTwoTensor p) : ℝ := + sInf {C : ℝ | 0 ≤ C ∧ A.InputBound t m C G H} + +omit [CompactSpace M] in +lemma inputSize_nonneg {t : ℝ} {m : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} + (hex : ∃ C : ℝ, 0 ≤ C ∧ A.InputBound t m C G H) : + 0 ≤ A.inputSize t m G H := by + apply le_csInf hex + intro C hC + exact hC.1 + +omit [CompactSpace M] in +lemma inputSize_le {t C : ℝ} {m : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} + (hC : 0 ≤ C) (hb : A.InputBound t m C G H) : + A.inputSize t m G H ≤ C := by + exact csInf_le ⟨0,fun _ h => h.1⟩ ⟨hC,hb⟩ + +omit [CompactSpace M] in +lemma inputSize_bound {t : ℝ} {m : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} + (hex : ∃ C : ℝ, 0 ≤ C ∧ A.InputBound t m C G H) : + A.InputBound t m (A.inputSize t m G H) G H := by + constructor + · intro i j hj x + exact le_csInf hex (fun C hC => hC.2.1 i j hj x) + · intro i j hj x hx + exact le_csInf hex (fun C hC => hC.2.2 i j hj x hx) + +omit [CompactSpace M] in +lemma inputSize_le_iff {t C : ℝ} {m : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} + (hex : ∃ D : ℝ, 0 ≤ D ∧ A.InputBound t m D G H) (hC : 0 ≤ C) : + A.inputSize t m G H ≤ C ↔ A.InputBound t m C G H := by + exact ⟨fun h => A.inputBound_mono_const (A.inputSize_bound hex) h, + A.inputSize_le hC⟩ + +omit [CompactSpace M] in +lemma inputSize_mono_order {t : ℝ} {m r : ℕ} {G : M → Space} + {H : ∀ p : M, CovariantTwoTensor p} + (hex : ∃ C : ℝ, 0 ≤ C ∧ A.InputBound t m C G H) (hr : r ≤ m) : + A.inputSize t r G H ≤ A.inputSize t m G H := + A.inputSize_le (A.inputSize_nonneg hex) + (A.inputBound_mono_order (A.inputSize_bound hex) hr) + +/-- Every finite-stage smooth input has a finite joint norm, without any +uniform bound on its higher derivatives. -/ +theorem exists_input_bound {t : ℝ} (ht : 0 ≤ t) (ht1 : t ≤ 1) (m : ℕ) + {G : M → Space} {H : ∀ p : M, CovariantTwoTensor p} + (hG : ContMDiff planeModel spaceModel ∞ G) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p))) : + ∃ C : ℝ, 0 ≤ C ∧ A.InputBound t m C G H := by + obtain ⟨CG,hCG,hGb⟩ := A.exists_shifted_bound 2 m hG + obtain ⟨CH,hCH,hHb⟩ := A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain m hH + refine ⟨CG+CH,add_nonneg hCG hCH,?_,?_⟩ + · intro i j hj x + have hh := hGb i j hj x + simp only [one_pow,one_mul] at hh + calc + _ ≤ 1*‖iteratedFDeriv ℝ j (localize (i : M) (A.weight i) G) x‖ := + mul_le_mul_of_nonneg_right (pow_le_one₀ ht ht1) (norm_nonneg _) + _ ≤ CG+CH := by simpa only [one_mul] using hh.trans (le_add_of_nonneg_right hCH) + · intro i + exact ((hHb i).shrink_scale ht ht1).mono_const (le_add_of_nonneg_left hCG) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntegratedCovariance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntegratedCovariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ae2960905d9292f4f6786cdb12021d519ecd2ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntegratedCovariance.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JointCovarianceParameter +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicSubspace + +namespace OAI + +/-! The normal component of the periodic correction, including its actual +primitive, parameter smoothness, normalization, and support preservation. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.CovarianceCorrector + +open PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +def integratedCorrector (V : P → C(Period, E)) (r : P → C(Period, ℝ)) + (q : P → ℝ) (p : P) (t : ℝ) : E := + primitive (fun s : ℝ => parameterCorrector V r q p (s : Period)) t + +theorem contDiff_integratedCorrector {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) : + ContDiff ℝ ∞ (fun p : P × ℝ => integratedCorrector V r q p.1 p.2) := + contDiff_primitive_joint (contDiff_parameterCorrector_joint hV hr hq hqpos hcircle) + +theorem integratedCorrector_spec {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) (p : P) : + Function.Periodic (integratedCorrector V r q p) 1 ∧ + (∫ t in 0..1, integratedCorrector V r q p t) = 0 ∧ + ∀ t : ℝ, HasDerivAt (integratedCorrector V r q p) + (parameterCorrector V r q p (t : Period)) t := by + have hs := (contDiff_parameterCorrector_joint hV hr hq hqpos hcircle).comp + (contDiff_const.prodMk contDiff_id : ContDiff ℝ ∞ (fun t : ℝ => (p, t))) + have hp : Function.Periodic (fun t : ℝ => parameterCorrector V r q p (t : Period)) 1 := by + intro t + change parameterCorrector V r q p ((t + 1 : ℝ) : Period) = _ + rw [AddCircle.coe_add_period] + have hm : (∫ t in 0..1, parameterCorrector V r q p (t : Period)) = 0 := by + rw [integral_lift_eq_haar] + exact parameterCorrector_average hqpos hcircle p + exact ⟨primitive_periodic hs.continuous hp hm, primitive_mean_zero hs.continuous, + primitive_hasDerivAt hs.continuous⟩ + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + [FiniteDimensional ℝ E] in +/-- A zero prescribed fluctuation gives the zero explicit corrector. -/ +theorem parameterCorrector_zero {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} {p : P} + (hr : ∀ t, r p t = 0) (t : Period) : parameterCorrector V r q p t = 0 := by + have hz : r p = 0 := by ext s; exact hr s + have hm : covarianceSolution (V p) (r p) (q p) = 0 := by + rw [covarianceSolution] + have hw : weightedAverage (V p) (r p) = 0 := by + rw [weightedAverage_apply] + simp only [hr, zero_smul] + exact average_const 0 + rw [hw, map_zero] + simp only [parameterCorrector, correctedVector, correctedScalar, hm, hr, + inner_zero_right, zero_div, add_zero, zero_smul, sub_zero, smul_zero] + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + [FiniteDimensional ℝ E] in +/-- Vanishing input outside the active patch gives a vanishing primitive +there, including all derivatives by the joint smoothness theorem. -/ +theorem integratedCorrector_zero {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} {p : P} + (hr : ∀ t, r p t = 0) (t : ℝ) : integratedCorrector V r q p t = 0 := by + unfold integratedCorrector + simp only [parameterCorrector_zero hr] + exact primitive_zero t + +theorem integratedCorrector_mem_submodule {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} (S : P → Submodule ℝ E) + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) + (hmem : ∀ p t, V p t ∈ S p) (p : P) (t : ℝ) : + integratedCorrector V r q p t ∈ S p := by + have hs := (contDiff_parameterCorrector_joint hV hr hq hqpos hcircle).comp + (contDiff_const.prodMk contDiff_id : ContDiff ℝ ∞ (fun t : ℝ => (p, t))) + exact primitive_mem_submodule (S p) hs.continuous + (fun s => parameterCorrector_mem_submodule S V r q hmem hqpos hcircle p (s : Period)) t + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..86ccbe69049313e9df05a67c527bbcdc5d98cd5e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityCompact.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.InteriorDensityLocal +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityPatching +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! Smooth positive interior densities uniformly near a compact parameter set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +/-- The full compact-parameter interior averaging construction. -/ +theorem interior_positive_density_compact {A h : B → ℝ} {c : B → Plane} + (hA : ContDiff ℝ ∞ A) (hh : ContDiff ℝ ∞ h) (hc : ContDiff ℝ ∞ c) + {K : Set B} (hK : IsCompact K) + (hmargin : ∀ b ∈ K, Real.pi + |h b| < A b) + (hinside : ∀ b ∈ K, c b 0 ^ 2 + c b 1 ^ 2 < 1) : + ∃ V : Set B, IsOpen V ∧ K ⊆ V ∧ ∃ σ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ σ (V ×ˢ univ) ∧ + (∀ b ∈ V, ∀ t, 0 < σ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => σ (b, t)) 1) ∧ + ∀ b ∈ V, (∫ t in 0..1, σ (b, t) • augment (interiorPath (A b) (h b) t)) = augment (c b) := by + classical + have hl (b : K) := interior_positive_density_near hA hh hc + (hmargin b b.property) (hinside b b.property) + choose U hU hb ρ hs hpos hper hmom using hl + have hcover : K ⊆ ⋃ b : K, U b := by + intro b hbk + exact mem_iUnion.mpr ⟨⟨b, hbk⟩, hb ⟨b, hbk⟩⟩ + obtain ⟨J, hJ⟩ := hK.elim_finite_subcover U hU hcover + have hcJ : K ⊆ ⋃ i : J, U i.val := by + intro b hbk + obtain ⟨i, hi, hbi⟩ := mem_iUnion₂.mp (hJ hbk) + exact mem_iUnion.mpr ⟨⟨i, hi⟩, hbi⟩ + obtain ⟨ψ, hψsub⟩ := SmoothPartitionOfUnity.exists_isSubordinate (𝓘(ℝ, B)) + hK.isClosed (fun i : J => U i.val) (fun i => hU i.val) hcJ + have hψ (i : J) : ContDiff ℝ ∞ (ψ i) := (ψ i).contMDiff.contDiff + let S : B → ℝ := fun b => ∑ i : J, ψ i b + have hS : ContDiff ℝ ∞ S := ContDiff.sum (fun i _ => hψ i) + have hone (b : B) (hbk : b ∈ K) : S b = 1 := by + simpa only [S, finsum_eq_sum_of_fintype] using ψ.sum_eq_one hbk + let V : Set B := {b | 0 < S b} + have hV : IsOpen V := isOpen_lt continuous_const hS.continuous + have hKV : K ⊆ V := by + intro b hbk + change 0 < S b + rw [hone b hbk] + exact zero_lt_one + obtain ⟨σ, hσ, hpσ, hperσ, hmσ, _⟩ := patch_densities (interiorPath_smooth hA hh) + (fun i : J => U i.val) (fun i => hU i.val) (fun i => ρ i.val) + (fun i => hs i.val) (fun i => hpos i.val) (fun i => hper i.val) (fun i => hmom i.val) + (fun i b => ψ i b) hψ (fun i b => ψ.nonneg i b) hψsub + exact ⟨V, hV, hKV, σ, hσ, hpσ, hperσ, hmσ⟩ + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityLocal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityLocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b78d7291bc63fb44aee86cfe55d8d5185beff05 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InteriorDensityLocal.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.InteriorVelocityPath + +namespace OAI + +/-! Smooth local positive averaging densities for the interior velocity path. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +/-- Circle coverage and a target in the open disk suffice for the local density construction. -/ +theorem positive_density_near_of_circle_coverage + {p : B → ℝ → Plane} {c : B → Plane} + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) (hc : ContDiff ℝ ∞ c) + {b₀ : B} (hc₀ : c b₀ 0 ^ 2 + c b₀ 1 ^ 2 < 1) + (hcover : ∀ e : Plane, e 0 ^ 2 + e 1 ^ 2 = 1 → ∃ t ∈ Ioo (0 : ℝ) 1, p b₀ t = e) : + ∃ U : Set B, IsOpen U ∧ b₀ ∈ U ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (U ×ˢ univ) ∧ + (∀ b ∈ U, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • augment (p b t)) = augment (c b) := by + obtain ⟨r, e, hr, hr1, he, hce⟩ := radial_representation hc₀ + choose t ht hpt using fun i : Fin 3 => hcover (triangle e i) (triangle_unit he i) + have hcols : (fun i => augment (p b₀ (t i))) = fun i => augment (triangle e i) := by + funext i + rw [hpt i] + have hM : (columnOperator (fun i => augment (p b₀ (t i)))).IsInvertible := by + rw [hcols] + exact triangle_invertible he + have hbary : columnOperator (fun i => augment (p b₀ (t i))) (triangleWeights r) = augment (c b₀) := by + rw [hcols, triangle_barycenter, ← hce] + have hp₀ : Continuous (p b₀) := hp.continuous.comp (continuous_const.prodMk continuous_id) + obtain ⟨ψ, hψ, hper, hn, _hm, ε, hε, hMψ, hw⟩ := + select_positive_moment_bumps hp₀ ht hM (triangleWeights_pos hr hr1) hbary + exact exists_positive_density_near hp hc hψ hn hper hε hMψ hw + +omit [FiniteDimensional ℝ B] in +lemma interiorPath_smooth {A h : B → ℝ} (hA : ContDiff ℝ ∞ A) (hh : ContDiff ℝ ∞ h) : + ContDiff ℝ ∞ (fun z : B × ℝ => interiorPath (A z.1) (h z.1) z.2) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun z : B × ℝ => + Real.cos (h z.1 + A z.1 * Real.cos (2 * Real.pi * z.2))) + exact ((hh.comp contDiff_fst).add ((hA.comp contDiff_fst).mul + (contDiff_const.mul contDiff_snd).cos)).cos + · change ContDiff ℝ ∞ (fun z : B × ℝ => + Real.sin (h z.1 + A z.1 * Real.cos (2 * Real.pi * z.2))) + exact ((hh.comp contDiff_fst).add ((hA.comp contDiff_fst).mul + (contDiff_const.mul contDiff_snd).cos)).sin + +/-- The full local interior density statement has no assumed moment matrix or bump selection. -/ +theorem interior_positive_density_near {A h : B → ℝ} {c : B → Plane} + (hA : ContDiff ℝ ∞ A) (hh : ContDiff ℝ ∞ h) (hc : ContDiff ℝ ∞ c) + {b₀ : B} (hmargin : Real.pi + |h b₀| < A b₀) + (hc₀ : c b₀ 0 ^ 2 + c b₀ 1 ^ 2 < 1) : + ∃ U : Set B, IsOpen U ∧ b₀ ∈ U ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (U ×ˢ univ) ∧ + (∀ b ∈ U, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • augment (interiorPath (A b) (h b) t)) = augment (c b) := by + exact positive_density_near_of_circle_coverage (interiorPath_smooth hA hh) hc hc₀ + (fun e he => interiorPath_covers hmargin he) + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalDerivativeZero.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalDerivativeZero.lean new file mode 100644 index 0000000000000000000000000000000000000000..d790b05eda0143f2de2a8777a662e65337780644 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalDerivativeZero.lean @@ -0,0 +1,23 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCompactArc + +namespace OAI + +/-! A smooth scalar coordinate vanishing on a one-sided interval has +zero derivative at its endpoint as well. -/ +noncomputable section +open Set Filter +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem deriv_zero_of_interval_germ {g : ℝ → ℝ} {a b t : ℝ} + (hab : a < b) (ht : t ∈ Icc a b) (hg : DifferentiableAt ℝ g t) + (he : g =ᶠ[𝓝[Icc a b] t] fun _ => 0) : deriv g t = 0 := by + have hz : HasDerivWithinAt g 0 (Icc a b) t := + (hasDerivWithinAt_const t (Icc a b) (0:ℝ)).congr_of_eventuallyEq_of_mem he ht + exact ((uniqueDiffOn_Icc hab) t ht).eq_deriv (Icc a b) hg.hasDerivAt.hasDerivWithinAt hz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalNoInteriorExtremum.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalNoInteriorExtremum.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbe74fc868cb2bf1353d202f572a8253b266d6ef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/IntervalNoInteriorExtremum.lean @@ -0,0 +1,39 @@ +import Mathlib.Topology.Order.IntermediateValue +import Mathlib.Tactic + +namespace OAI + +/-! An injective continuous real function on an interval has no interior +minimum or maximum. This excludes identifying the two local branches of +a curve vertex with a single endpoint of an embedded interval. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem injective_interval_no_minimum {f : ℝ → ℝ} {a b x : ℝ} + (hx : x ∈ Ioo a b) (hf : ContinuousOn f (Ioo a b)) (hi : InjOn f (Ioo a b)) + (hm : ∀ y ∈ Ioo a b, f x ≤ f y) : False := by + rcases hf.strictMonoOn_of_injOn_Ioo (hx.1.trans hx.2) hi with hmono | hanti + · let y := (a+x)/2 + have hy : y ∈ Ioo a b := by constructor <;> dsimp [y] <;> linarith [hx.1,hx.2] + have hyx : y < x := by dsimp [y]; linarith [hx.1] + exact (not_lt_of_ge (hm y hy)) (hmono hy hx hyx) + · let y := (x+b)/2 + have hy : y ∈ Ioo a b := by constructor <;> dsimp [y] <;> linarith [hx.1,hx.2] + have hxy : x < y := by dsimp [y]; linarith [hx.2] + exact (not_lt_of_ge (hm y hy)) (hanti hx hy hxy) + +theorem injective_interval_no_maximum {f : ℝ → ℝ} {a b x : ℝ} + (hx : x ∈ Ioo a b) (hf : ContinuousOn f (Ioo a b)) (hi : InjOn f (Ioo a b)) + (hm : ∀ y ∈ Ioo a b, f y ≤ f x) : False := by + apply injective_interval_no_minimum (f := -f) hx hf.neg + · intro y hy z hz he + exact hi hy hz (neg_injective he) + · intro y hy + exact neg_le_neg (hm y hy) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/InverseTensorPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InverseTensorPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..0628bddf23919211e45d2f6e9d715800dd2b1884 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/InverseTensorPullback.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorPullback + +namespace OAI + +/-! Tensor pullback cancels along the actual local phase inverse. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.JetPolynomial + +lemma tensorCoordinatePullback_inverse + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : Base} (hp : p ∈ e.target) (H : PhaseMean.Tensor) : + tensorCoordinatePullbackValue e.symm p (tensorCoordinatePullbackValue e (e.symm p) H) = H := by + have hinv : e ∘ e.symm =ᶠ[𝓝 p] id := by + filter_upwards [e.open_target.mem_nhds hp] with q hq + exact e.right_inv hq + have hchain : (fderiv ℝ e (e.symm p)).comp (fderiv ℝ e.symm p) = + ContinuousLinearMap.id ℝ Base := by + rw [← fderiv_comp p (he.differentiable (by simp) _) (hi.differentiable (by simp) _), + hinv.fderiv_eq,fderiv_id] + have hcancel (v : SmallModes.Base) : + tensorCoordinateDerivative e (e.symm p) (tensorCoordinateDerivative e.symm p v) = v := by + change planeCoordinateIsometry + ((fderiv ℝ e (e.symm p)) (planeCoordinateIsometry.symm + (planeCoordinateIsometry ((fderiv ℝ e.symm p) (planeCoordinateIsometry.symm v))))) = v + rw [LinearIsometryEquiv.symm_apply_apply] + change planeCoordinateIsometry (((fderiv ℝ e (e.symm p)).comp + (fderiv ℝ e.symm p)) (planeCoordinateIsometry.symm v)) = v + rw [hchain,ContinuousLinearMap.id_apply,LinearIsometryEquiv.apply_symm_apply] + funext j + change PhaseMean.evaluate (PhaseMean.pullback (tensorCoordinateDerivative e (e.symm p)) H) + (tensorCoordinateDerivative e.symm p (PhaseMean.firstDirection j)) + (tensorCoordinateDerivative e.symm p (PhaseMean.secondDirection j)) = H j + rw [PhaseMean.evaluate_pullback,hcancel,hcancel] + fin_cases j <;> simp [PhaseMean.evaluate,PhaseMean.firstDirection,PhaseMean.secondDirection,SmallModes.dx,SmallModes.dy] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetPullbackExpressions.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetPullbackExpressions.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d493226edac196c69df2ebfb052631d55350348 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetPullbackExpressions.lean @@ -0,0 +1,182 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialDerivative + +namespace OAI + +/-! Coordinate derivatives in a second chart, expressed by finite jet +polynomials in the first chart. Only the surface and four-space dimensions +used in the primitive construction are considered. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators Topology +namespace ClosedSurfaceR4.JetPolynomial + +/-- The position stored in a positional two-jet. -/ +def lowPosition : LowJet →L[ℝ] Base := + ContinuousLinearMap.pi (fun i => ContinuousLinearMap.proj (.inl i)) + +@[simp] lemma lowPosition_lowJet (G : Base → Space) (x : Base) : + lowPosition (lowJet G x) = x := rfl + +def inverseCoordinateCoefficient (T S : Base → Base) (i k : Fin 2) : LowJet × ℝ → ℝ := + fun z => (fderiv ℝ S (T (lowPosition z.1)) (coordinateVector i)) k + +lemma inverseCoordinateCoefficient_smooth {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (i k : Fin 2) : + ContDiff ℝ ∞ (inverseCoordinateCoefficient T S i k) := by + have hs : ContDiff ℝ ∞ (fun x => (fderiv ℝ S x (coordinateVector i)) k) := + contDiff_pi.mp ((hS.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const) k + exact hs.comp (hT.comp (lowPosition.contDiff.comp contDiff_fst)) + +def jetPullback (T S : Base → Base) : List (Fin 2) → Fin 4 → Expression + | [],a => .coeff (fun z => z.1 (.inr (0,a))) + | i::w,a => Expression.sumList Finset.univ.toList (fun k : Fin 2 => + (Expression.coeff (inverseCoordinateCoefficient T S i k)).mul ((jetPullback T S w a).slow k)) + +lemma jetPullback_smooth {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (w : List (Fin 2)) (a : Fin 4) : + (jetPullback T S w a).SmoothCoeffs univ := by + induction w with + | nil => + change ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => z.1 (.inr (0,a))) (univ ×ˢ univ) + exact ((ContinuousLinearMap.proj (.inr (0,a)) : LowJet →L[ℝ] ℝ).contDiff.comp + (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : LowJet × ℝ → LowJet))).contDiffOn + | cons i w ih => + apply Expression.smoothCoeffs_sumList + intro k _ + exact Expression.smoothCoeffs_mul (inverseCoordinateCoefficient_smooth hT hS i k).contDiffOn + (Expression.smoothCoeffs_slow isOpen_univ k ih) + +lemma jetPullback_order (T S : Base → Base) (w : List (Fin 2)) (a : Fin 4) : + (jetPullback T S w a).order ≤ w.length+2 := by + induction w with + | nil => exact le_rfl + | cons i w ih => + apply Expression.order_sumList_le _ _ _ (by simp) + intro k _ + apply (Expression.order_mul_le _ _).trans + apply max_le + · simp [Expression.order] + · exact (Expression.order_slow_le k _).trans (by + simp only [List.length_cons] + omega) + +lemma jetPullback_loss (T S : Base → Base) (w : List (Fin 2)) (a : Fin 4) : + (jetPullback T S w a).loss ≤ w.length := by + induction w with + | nil => exact Nat.zero_le _ + | cons i w ih => + apply Expression.loss_sumList_le + intro k _ + apply (Expression.loss_mul_le _ _).trans + simp only [Expression.loss,zero_add,List.length_cons] + exact (Expression.loss_slow_le k _).trans (Nat.add_le_add_right ih 1) + +lemma coordinate_basis_expansion (v : Base) : + (∑ k : Fin 2, v k • coordinateVector k) = v := by + ext i + simp [coordinateVector,Pi.single_apply] + +/-- The polynomial is the actual ordered coordinate derivative in the +other chart. The inverse differential condition is local and exact. -/ +theorem jetPullback_eval {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hinv : ∀ x ∈ U, (fderiv ℝ T x).comp (fderiv ℝ S (T x)) = ContinuousLinearMap.id ℝ Base) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) + (w : List (Fin 2)) (a : Fin 4) (t : ℝ) : + ∀ x ∈ U, (jetPullback T S w a).eval H (x,t) = jet G w a (T x) := by + induction w with + | nil => + intro x hx + change H x a = G (T x) a + exact congrFun (hrel x hx) a + | cons i w ih => + intro x hx + have heq : (fun y => (jetPullback T S w a).eval H (y,t)) =ᶠ[𝓝 x] + (fun y => jet G w a (T y)) := by + filter_upwards [hU.mem_nhds hx] with y hy + exact ih y hy + have hs := jet_smooth hG w a + have hd : fderiv ℝ (fun y => (jetPullback T S w a).eval H (y,t)) x = + (fderiv ℝ (jet G w a) (T x)).comp (fderiv ℝ T x) := by + rw [heq.fderiv_eq] + exact fderiv_comp x (hs.differentiable (by simp) _) (hT.differentiable (by simp) x) + rw [jetPullback,Expression.eval_sumList,← List.sum_toFinset _ Finset.univ.nodup_toList, + Finset.toList_toFinset] + simp only [Expression.eval_mul,Expression.eval,inverseCoordinateCoefficient,lowPosition_lowJet] + simp_rw [Expression.eval_slow isOpen_univ hU hH (mapsTo_univ _ _) _ + (jetPullback_smooth hT hS w a) hx,hd,ContinuousLinearMap.comp_apply] + have hsum : (∑ k : Fin 2, (fderiv ℝ S (T x) (coordinateVector i)) k * + fderiv ℝ (jet G w a) (T x) (fderiv ℝ T x (coordinateVector k))) = + fderiv ℝ (jet G w a) (T x) + (fderiv ℝ T x (fderiv ℝ S (T x) (coordinateVector i))) := by + conv_rhs => rw [← coordinate_basis_expansion (fderiv ℝ S (T x) (coordinateVector i))] + simp only [map_sum,map_smul,smul_eq_mul] + rw [hsum] + have hi := congrArg (fun L : Base →L[ℝ] Base => L (coordinateVector i)) (hinv x hx) + rw [ContinuousLinearMap.comp_apply,ContinuousLinearMap.id_apply] at hi + rw [hi] + rfl + + +namespace Expression + +/-- Pull back a finite expression through a fixed coordinate change. The +low-jet substitution is supplied by the finite-dimensional chain rule. -/ +def coordinatePullback (T S : Base → Base) (K : LowJet → LowJet) : Expression → Expression + | .coeff c => .coeff (fun z => c (K z.1,z.2)) + | .atom w a e => (jetPullback T S w a).mul (coordinatePullback T S K e) + | .add e f => .add (coordinatePullback T S K e) (coordinatePullback T S K f) + +lemma coordinatePullback_order (T S : Base → Base) (K : LowJet → LowJet) + (e : Expression) : (e.coordinatePullback T S K).order ≤ e.order+2 := by + induction e with + | coeff c => simp [coordinatePullback,order] + | atom w a e ih => + apply (order_mul_le _ _).trans + simp only [order] + exact max_le + ((jetPullback_order T S w a).trans (by omega)) (ih.trans (by omega)) + | add e f ihe ihf => simp only [coordinatePullback,order] at *; omega + +lemma coordinatePullback_smooth {T S : Base → Base} {K : LowJet → LowJet} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (hK : ContDiff ℝ ∞ K) + {e : Expression} (he : e.SmoothCoeffs univ) : + (e.coordinatePullback T S K).SmoothCoeffs univ := by + induction e with + | coeff c => + have hc : ContDiff ℝ ∞ c := contDiffOn_univ.mp (by simpa only [SmoothCoeffs,univ_prod_univ] using he) + exact (hc.comp ((hK.comp contDiff_fst).prodMk contDiff_snd)).contDiffOn + | atom w a e ih => exact smoothCoeffs_mul (jetPullback_smooth hT hS w a) (ih he) + | add e f ihe ihf => exact ⟨ihe he.1,ihf he.2⟩ + +lemma coordinatePullback_eval {T S : Base → Base} {K : LowJet → LowJet} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hinv : ∀ x ∈ U, (fderiv ℝ T x).comp (fderiv ℝ S (T x)) = ContinuousLinearMap.id ℝ Base) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) + (hjet : ∀ x ∈ U, lowJet G (T x) = K (lowJet H x)) + (e : Expression) (t : ℝ) {x : Base} (hx : x ∈ U) : + (e.coordinatePullback T S K).eval H (x,t) = e.eval G (T x,t) := by + induction e with + | coeff c => + change c (K (lowJet H x),t) = c (lowJet G (T x),t) + rw [hjet x hx] + | atom w a e ih => + rw [coordinatePullback,eval_mul,jetPullback_eval hT hS hU hinv hG hH hrel w a t x hx,ih] + rfl + | add e f ihe ihf => + change (e.coordinatePullback T S K).eval H (x,t)+ + (f.coordinatePullback T S K).eval H (x,t) = _ + rw [ihe,ihf] + rfl + +end Expression + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..b56a5b6d344bc8aa0b98101b6a46226934996bcc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationLinearity.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVariation + +namespace OAI + +/-! The actual polynomial first variation is linear in its smooth direction. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +lemma variationLowJet_add {H K : Base → Space} + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) (p : Base) : + variationLowJet (fun q => H q + K q) p = variationLowJet H p + variationLowJet K p := by + funext i + cases i with + | inl i => simp [variationLowJet] + | inr i => exact jet_add hH hK (lowWord i.1) i.2 p + +lemma variationLowJet_smul {H : Base → Space} (hH : ContDiff ℝ ∞ H) + (c : ℝ) (p : Base) : + variationLowJet (fun q => c • H q) p = c • variationLowJet H p := by + funext i + cases i with + | inl i => simp [variationLowJet] + | inr i => exact jet_smul hH c (lowWord i.1) i.2 p + +namespace Expression + +lemma variation_add (e : Expression) (G : Base → Space) {H K : Base → Space} + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) (z : Base × ℝ) : + e.variation G (fun q => H q + K q) z = e.variation G H z + e.variation G K z := by + induction e with + | coeff c => + simp only [variation, variationLowJet_add hH hK] + have hp : (variationLowJet H z.1 + variationLowJet K z.1, (0 : ℝ)) = + (variationLowJet H z.1, 0) + (variationLowJet K z.1, 0) := by simp + rw [hp, map_add] + | atom w a e ih => + simp only [variation, jet_add hH hK, ih] + ring + | add e f ihe ihf => + simp only [variation, ihe, ihf] + ring + +lemma variation_smul (e : Expression) (G : Base → Space) {H : Base → Space} + (hH : ContDiff ℝ ∞ H) (c : ℝ) (z : Base × ℝ) : + e.variation G (fun q => c • H q) z = c * e.variation G H z := by + induction e with + | coeff d => + simp only [variation, variationLowJet_smul hH] + have hp : (c • variationLowJet H z.1, (0 : ℝ)) = c • (variationLowJet H z.1, (0 : ℝ)) := by simp + rw [hp, map_smul] + rfl + | atom w a e ih => + simp only [variation, jet_smul hH, ih] + ring + | add e f ihe ihf => + simp only [variation, ihe, ihf] + ring + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..492f34c8a8980ecdac1311c99c4f3c2a974fd76d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariationSupport.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVariation + +namespace OAI + +/-! Linearized polynomial operators preserve the support of the varying +field, even when the coefficients are only smooth near that support. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma tsupport_iteratedDirectional {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] (w : List A) (f : A → E) : + tsupport (iteratedDirectional w f) ⊆ tsupport f := by + induction w with + | nil => exact Set.Subset.rfl + | cons v w ih => exact (tsupport_fderiv_apply_subset ℝ v).trans ih + +lemma tsupport_jet (H : Base → Space) (w : List (Fin 2)) (a : Fin 4) : + tsupport (jet H w a) ⊆ tsupport H := + (tsupport_iteratedDirectional (w.map coordinateVector) (fun p => H p a)).trans + (tsupport_comp_subset (g := fun v : Space => v a) rfl H) + +lemma variationLowJet_zero_of_notMem {H : Base → Space} {p : Base} (hp : p ∉ tsupport H) : + variationLowJet H p = 0 := by + funext i + cases i with + | inl i => rfl + | inr i => + change jet H (lowWord i.1) i.2 p = 0 + exact image_eq_zero_of_notMem_tsupport (fun h => hp (tsupport_jet H (lowWord i.1) i.2 h)) + +namespace Expression + +lemma variation_zero_of_notMem (e : Expression) (G : Base → Space) {H : Base → Space} + {p : Base} (hp : p ∉ tsupport H) (t : ℝ) : e.variation G H (p, t) = 0 := by + induction e with + | coeff c => + simp only [variation, variationLowJet_zero_of_notMem hp] + change fderiv ℝ c (lowJet G p, t) (0 : LowJet × ℝ) = 0 + exact map_zero _ + | atom w a e ih => + have hj : jet H w a p = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hp (tsupport_jet H w a h)) + simp only [variation, hj, ih, zero_mul, mul_zero, add_zero] + | add e f ihe ihf => simp only [variation, ihe, ihf, add_zero] + +lemma tsupport_variation (e : Expression) (G H : Base → Space) (t : ℝ) : + tsupport (fun p => e.variation G H (p, t)) ⊆ tsupport H := by + apply closure_minimal _ (isClosed_tsupport H) + intro p hp + by_contra h + exact hp (e.variation_zero_of_notMem G h t) + +theorem variation_smooth_global {O : Set LowJet} (hO : IsOpen O) {U K : Set Base} + (hU : IsOpen U) (hK : IsClosed K) (hKU : K ⊆ U) {e : Expression} + (he : e.SmoothCoeffs O) {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hQ : Set.MapsTo (lowJet G) U O) (hHsupp : tsupport H ⊆ K) (t : ℝ) : + ContDiff ℝ ∞ (fun p => e.variation G H (p, t)) := by + have hlocal := (variation_smooth hO hG hH hQ he).comp + (contDiffOn_id.prodMk contDiffOn_const) (fun _ hp => ⟨hp, Set.mem_univ t⟩) + apply contDiff_iff_contDiffAt.mpr + intro p + by_cases hp : p ∈ U + · exact (hlocal p hp).contDiffAt (hU.mem_nhds hp) + · have hpk : p ∉ K := fun hk => hp (hKU hk) + have heq : (fun q => e.variation G H (q, t)) =ᶠ[nhds p] (fun _ => 0) := by + filter_upwards [hK.isOpen_compl.mem_nhds hpk] with q hq + exact e.variation_zero_of_notMem G (fun hs => hq (hHsupp hs)) t + exact contDiffAt_const.congr_of_eventuallyEq heq + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariations.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariations.lean new file mode 100644 index 0000000000000000000000000000000000000000..51f8b4d00e4bef84b1c1ee0dba95cd832ba929f0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetVariations.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedActualJets + +namespace OAI + +/-! Actual variations of the ordered coordinate jets. The position entries +do not vary, and a second-jet variation costs at most two short-scale powers. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma directional_add {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] {f g : A → E} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (w : List A) : + iteratedDirectional w (fun x => f x + g x) = + fun x => iteratedDirectional w f x + iteratedDirectional w g x := by + induction w with + | nil => rfl + | cons v w ih => + simp only [iteratedDirectional, ih] + funext x + have hfs := contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hf.contDiffOn w) + have hgs := contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hg.contDiffOn w) + rw [fderiv_fun_add (hfs.differentiable (by simp) x) (hgs.differentiable (by simp) x), + add_apply] + +lemma directional_smul {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] {f : A → E} + (hf : ContDiff ℝ ∞ f) (c : ℝ) (w : List A) : + iteratedDirectional w (fun x => c • f x) = fun x => c • iteratedDirectional w f x := by + induction w with + | nil => rfl + | cons v w ih => + simp only [iteratedDirectional, ih] + funext x + have hfs := contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hf.contDiffOn w) + exact congrArg (fun L : A →L[ℝ] E => L v) + (((hfs.differentiable (by simp) x).hasFDerivAt.const_smul c).fderiv) + +lemma jet_add {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (w : List (Fin 2)) (a : Fin 4) (p : Base) : + jet (fun q => G q + H q) w a p = jet G w a p + jet H w a p := + congrFun (directional_add (contDiff_pi.mp hG a) (contDiff_pi.mp hH a) + (w.map coordinateVector)) p + +lemma jet_smul {H : Base → Space} (hH : ContDiff ℝ ∞ H) + (c : ℝ) (w : List (Fin 2)) (a : Fin 4) (p : Base) : + jet (fun q => c • H q) w a p = c * jet H w a p := + congrFun (directional_smul (contDiff_pi.mp hH a) c (w.map coordinateVector)) p + +def variationLowJet (H : Base → Space) (p : Base) : LowJet + | .inl _ => 0 + | .inr (i, a) => jet H (lowWord i) a p + +lemma variationLowJet_smooth {H : Base → Space} (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (variationLowJet H) := by + apply contDiff_pi.mpr + intro i + cases i with + | inl i => exact contDiff_const + | inr i => exact jet_smooth hH (lowWord i.1) i.2 + +lemma lowJet_affine {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (t : ℝ) (p : Base) : + lowJet (fun q => G q + t • H q) p = lowJet G p + t • variationLowJet H p := by + funext i + cases i with + | inl i => simp [lowJet, variationLowJet] + | inr i => + change jet (fun q => G q + t • H q) (lowWord i.1) i.2 p = _ + rw [jet_add (H := fun q => t • H q) hG (ContDiff.const_smul t hH), jet_smul hH] + rfl + +lemma lowJet_affine_hasDerivAt {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (p : Base) (t : ℝ) : + HasDerivAt (fun s : ℝ => lowJet (fun q => G q + s • H q) p) (variationLowJet H p) t := by + have he : (fun s : ℝ => lowJet (fun q => G q + s • H q) p) = + (fun s : ℝ => lowJet G p + s • variationLowJet H p) := + funext (fun s => lowJet_affine hG hH s p) + rw [he] + simpa only [one_smul, id_eq] using + ((hasDerivAt_id t).smul_const (variationLowJet H p)).const_add (lowJet G p) + +theorem weighted_variationLowJet {U : Set Base} (hU : IsOpen U) + {H : Base → Space} (hH : ContDiff ℝ ∞ H) {s C : ℝ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) (m : ℕ) + (hb : WeightedBound U s (m + 2) C H) : + WeightedBound U s m (C / s ^ 2) (variationLowJet H) := by + apply WeightedBound.pi hU.uniqueDiffOn hs (div_nonneg hC (sq_nonneg s)) + (fun i => (contDiff_pi.mp (variationLowJet_smooth hH) i).contDiffOn) + intro i + cases i with + | inl i => + change WeightedBound U s m (C / s ^ 2) (fun _ => (0 : ℝ)) + exact (weightedBound_const U s m (0 : ℝ)).mono_const + (by simpa only [norm_zero] using div_nonneg hC (sq_nonneg s)) + | inr i => + obtain ⟨w, a⟩ := i + have hlen : (lowWord w).length ≤ 2 := by fin_cases w <;> simp [lowWord] + have hc := hb.component hU.uniqueDiffOn hs.le hC hH.contDiffOn a + have hbc : WeightedBound U s (m + ((lowWord w).map coordinateVector).length) C + (fun p => H p a) := by + simpa only [List.length_map] using hc.mono_order (Nat.add_le_add_left hlen m) + have hd := hbc.iteratedDirectional hU hs hC + (contDiff_pi.mp hH a).contDiffOn ((lowWord w).map coordinateVector) + (fun v hv => by + obtain ⟨j, _, rfl⟩ := List.mem_map.mp hv + exact norm_coordinateVector_le j) m + apply hd.mono_const + apply div_le_div_of_nonneg_left hC (pow_pos hs 2) + exact pow_le_pow_of_le_one hs.le hs1 (by simpa only [List.length_map] using hlen) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetWordDecomposition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetWordDecomposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..55e3c782248e492969fa6f02bc35fd8ee7eece0d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JetWordDecomposition.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule + +namespace OAI + +/-! Every ordered coordinate jet is a derivative of a component of the +actual second jet, with precisely the excess derivative count. -/ +noncomputable section + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma exists_lowWord (w : List (Fin 2)) (hw : w.length ≤ 2) : + ∃ i : Fin 7, lowWord i = w := by + cases w with + | nil => exact ⟨0, rfl⟩ + | cons a w => + cases w with + | nil => + fin_cases a + · exact ⟨1, rfl⟩ + · exact ⟨2, rfl⟩ + | cons b w => + have he : w = [] := List.eq_nil_of_length_eq_zero (by + simp only [List.length_cons] at hw + omega) + subst w + fin_cases a <;> fin_cases b + · exact ⟨3, rfl⟩ + · exact ⟨4, rfl⟩ + · exact ⟨5, rfl⟩ + · exact ⟨6, rfl⟩ + +lemma split_lowWord (w : List (Fin 2)) : + ∃ v : List (Fin 2), ∃ i : Fin 7, w = v ++ lowWord i ∧ v.length = w.length - 2 := by + obtain ⟨i, hi⟩ := exists_lowWord (w.drop (w.length - 2)) (by + rw [List.length_drop] + omega) + refine ⟨w.take (w.length - 2), i, ?_, ?_⟩ + · rw [hi, List.take_append_drop] + · rw [List.length_take, Nat.min_eq_left (Nat.sub_le _ _)] + +lemma iteratedDirectional_append {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] (v w : List A) (f : A → E) : + iteratedDirectional (v ++ w) f = iteratedDirectional v (iteratedDirectional w f) := by + induction v with + | nil => rfl + | cons a v ih => + simp only [List.cons_append, iteratedDirectional, ih] + +/-- The scale loss of an ordered jet factor is its derivative order minus two. -/ +lemma jet_as_lowJet_derivative (w : List (Fin 2)) (a : Fin 4) : + ∃ v : List (Fin 2), ∃ i : Fin 7, v.length = w.length - 2 ∧ + ∀ (G : Base → Space), jet G w a = + iteratedDirectional (v.map coordinateVector) (fun p => lowJet G p (Sum.inr (i, a))) := by + obtain ⟨v, i, hw, hv⟩ := split_lowWord w + refine ⟨v, i, hv, ?_⟩ + intro G + change iteratedDirectional (w.map coordinateVector) (fun p => G p a) = _ + rw [hw, List.map_append, iteratedDirectional_append] + rfl + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/JointCovarianceParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JointCovarianceParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..f28a4715bdfda80bc4ff1448beeab6f6bf1a8cd2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/JointCovarianceParameter.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CovarianceParameter +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicPrimitive + +namespace OAI + +/-! Smoothness of the covariance solve from the joint position-angle data. -/ + +noncomputable section +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.CovarianceCorrector + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ E] in +theorem contDiff_average_joint {V : P → C(Period, E)} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) : + ContDiff ℝ ∞ (fun p => average (V p)) := by + have hi := SmoothParameterIntegral.contDiff_integral hV 0 1 + simpa only [PeriodicPrimitive.integral_lift_eq_haar, average] using hi + +theorem contDiff_covarianceCLM_joint {V : P → C(Period, E)} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) : + ContDiff ℝ ∞ (fun p => covarianceCLM (V p)) := by + have hc := hV.sub ((contDiff_average_joint hV).comp contDiff_fst) + rw [contDiff_clm_apply_iff] + intro m + simp_rw [covarianceCLM_apply] + have hi := SmoothParameterIntegral.contDiff_integral + ((hc.inner ℝ (contDiff_const (c := m))).smul hc) 0 1 + convert hi using 1 + funext p + exact (PeriodicPrimitive.integral_lift_eq_haar + (fun t => inner ℝ (V p t - average (V p)) m • (V p t - average (V p)))).symm + +omit [FiniteDimensional ℝ E] in +theorem contDiff_weightedAverage_joint {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) : + ContDiff ℝ ∞ (fun p => weightedAverage (V p) (r p)) := by + have hi := SmoothParameterIntegral.contDiff_integral (hr.smul hV) 0 1 + convert hi using 1 + funext p + exact (PeriodicPrimitive.integral_lift_eq_haar (fun t => r p t • V p t)).symm + +theorem contDiff_covarianceSolution_joint {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) : + ContDiff ℝ ∞ (fun p => covarianceSolution (V p) (r p) (q p)) := by + have hM : ContDiff ℝ ∞ (fun p => meanCLM (V p) (q p)) := + contDiff_const.sub ((hq.inv (fun p => (hqpos p).ne')).smul + (contDiff_covarianceCLM_joint hV)) + have hi : ContDiff ℝ ∞ (fun p => (meanCLM (V p) (q p)).inverse) := by + rw [contDiff_iff_contDiffAt] + intro p + exact (meanCLM_isInvertible (hqpos p) (hcircle p)).contDiffAt_map_inverse.comp p hM.contDiffAt + exact hi.clm_apply (contDiff_weightedAverage_joint hV hr) + +/-- Joint smoothness of the explicitly defined periodic corrector on the +finite-dimensional family of geometric data. -/ +theorem contDiff_parameterCorrector_joint {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} + (hV : ContDiff ℝ ∞ (fun p : P × ℝ => V p.1 (p.2 : Period))) + (hr : ContDiff ℝ ∞ (fun p : P × ℝ => r p.1 (p.2 : Period))) + (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) : + ContDiff ℝ ∞ (fun p : P × ℝ => parameterCorrector V r q p.1 (p.2 : Period)) := by + have hm : ContDiff ℝ ∞ (fun p : P × ℝ => + covarianceSolution (V p.1) (r p.1) (q p.1)) := + (contDiff_covarianceSolution_joint hV hr hq hqpos hcircle).comp contDiff_fst + have hv : ContDiff ℝ ∞ (fun p : P × ℝ => average (V p.1)) := + (contDiff_average_joint hV).comp contDiff_fst + have hi : ContDiff ℝ ∞ (fun p : P × ℝ => (q p.1)⁻¹) := + (hq.comp contDiff_fst).inv (fun p => (hqpos p.1).ne') + have hs : ContDiff ℝ ∞ (fun p : P × ℝ => + correctedScalar (V p.1) (average (V p.1)) (q p.1) (r p.1) + (covarianceSolution (V p.1) (r p.1) (q p.1)) (p.2 : Period)) := by + simpa only [correctedScalar, div_eq_mul_inv] using + hr.add (((hV.sub hv).inner ℝ hm).mul hi) + exact hi.smul ((hs.smul hV).sub hm) + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LeadingInputStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LeadingInputStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c02c54386de82f49b04a7fc1d8b0a91def508cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LeadingInputStability.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileIdentification +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations + +namespace OAI + +/-! C3 closeness controls the finite data used by the leading-profile map, +with no loss in the fast phase parameter. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates SurfaceVelocityFamily.Loop + +lemma lowJet_sub_variation {F G : Base → Space} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + (fun p => lowJet G p-lowJet F p) = variationLowJet (fun x => G x-F x) := by + funext p + have he := lowJet_affine hF (hG.sub hF) 1 p + have hf : (fun q => F q+(1 : ℝ) • (G q-F q)) = G := by + funext q + simp only [one_smul] + abel + rw [hf,one_smul] at he + rw [he] + abel + +lemma lowDerivative_sub_variation {F G : Base → Space} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (i : Fin 2) (p : Base) : + lowDerivative G i p-lowDerivative F i p = + fderiv ℝ (variationLowJet (fun x => G x-F x)) p (coordinateVector i) := by + rw [← lowJet_derivative hG,← lowJet_derivative hF] + have he := congrArg (fun L : Base →L[ℝ] LowJet => L (coordinateVector i)) + (fderiv_fun_sub ((lowJet_smooth hG).differentiable (by simp) p) + ((lowJet_smooth hF).differentiable (by simp) p)) + have hh : (fderiv ℝ (fun q => lowJet G q-lowJet F q) p) (coordinateVector i) = + (fderiv ℝ (lowJet G) p) (coordinateVector i)- + (fderiv ℝ (lowJet F) p) (coordinateVector i) := he + rw [lowJet_sub_variation hF hG] at hh + exact hh.symm + +lemma leadingInput_sub_bound {F G : Base → Space} {U : Set Base} + (hU : IsOpen U) (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + {C : ℝ} (hC : 0 ≤ C) (hb : WeightedBound U 1 3 C (fun x => G x-F x)) + {p : Base} (hp : p ∈ U) (t : ℝ) : + ‖(((lowJet G p,t),lowDerivative G 1 p) : LeadingProfileInput)- + ((lowJet F p,t),lowDerivative F 1 p)‖ ≤ C := by + have hv : WeightedBound U 1 1 C (variationLowJet (fun x => G x-F x)) := by + simpa using weighted_variationLowJet hU (hG.sub hF) zero_lt_one le_rfl hC 1 hb + have hlow : ‖lowJet G p-lowJet F p‖ ≤ C := by + rw [show lowJet G p-lowJet F p = variationLowJet (fun x => G x-F x) p from + congrFun (lowJet_sub_variation hF hG) p] + exact hv.norm_le hp + have hd := hv.directional hU zero_lt_one (variationLowJet_smooth (hG.sub hF)).contDiffOn + (coordinateVector 1) + have hder : ‖lowDerivative G 1 p-lowDerivative F 1 p‖ ≤ C := by + rw [lowDerivative_sub_variation hF hG] + apply (hd.norm_le hp).trans + simpa only [div_one] using mul_le_of_le_one_left hC (norm_coordinateVector_le 1) + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,sub_self,norm_zero] using + (max_le (max_le hlow hC) hder) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinePuncturedNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinePuncturedNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..8aeea64e1c6f4050a1ceec6b5ed4ebddc9ac98fb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinePuncturedNeighborhood.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcClosure + +namespace OAI + +/-! At an ordinary curve point, deleting the point from a sufficiently +small vertex-free neighborhood leaves two connected sides. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem line_punctured_neighborhood + (c : OpenPartialHomeomorph X ℝ) {p : X} (hp : p ∈ c.source) + (V : Set X) (hV : V.Finite) : + ∃ W S T : Set X, IsOpen W ∧ p ∈ W ∧ IsConnected S ∧ IsConnected T ∧ + Disjoint S T ∧ W \ {p} = S ∪ T ∧ S ∪ T ⊆ Vᶜ ∧ + p ∈ closure S ∧ p ∈ closure T := by + have hD : IsClosed (V \ {p}) := (hV.subset sdiff_subset).isClosed + let U : Set X := (V \ {p})ᶜ + have hU : IsOpen U := hD.isOpen_compl + have hpU : p ∈ U := by rintro ⟨_,hn⟩; exact hn rfl + let e := c.restrOpen U hU + obtain ⟨A,W,hW,hpW,_,t,hlt,htr,htp,heq,hWe⟩ := line_chart_compact_arc_data e ⟨hp,hpU⟩ + let S := A.openSubarc A.left t.val + let T := A.openSubarc t.val A.right + have hsplit : W \ {p} = S ∪ T := by + rw [heq] + apply Subset.antisymm + · rintro x ⟨⟨u,hu,rfl⟩,hne⟩ + have hut : u ≠ t := by intro h; apply hne; rw [h,htp]; rfl + have hval : (u:ℝ) ≠ (t:ℝ) := fun h => hut (Subtype.ext h) + rcases lt_or_gt_of_ne hval with h | h + · exact Or.inl ⟨u,⟨hu.1,h⟩,rfl⟩ + · exact Or.inr ⟨u,⟨h,hu.2⟩,rfl⟩ + · intro x hx + rcases hx with ⟨u,hu,rfl⟩ | ⟨u,hu,rfl⟩ + · refine ⟨⟨u,⟨hu.1,hu.2.trans htr⟩,rfl⟩,?_⟩ + intro he + have he' : A.map u = A.map t := by simpa only [mem_singleton_iff, htp] using he + have hu' := congrArg Subtype.val (A.embedding.injective he') + exact (ne_of_lt hu.2) hu' + · refine ⟨⟨u,⟨hlt.trans hu.1,hu.2⟩,rfl⟩,?_⟩ + intro he + have he' : A.map u = A.map t := by simpa only [mem_singleton_iff, htp] using he + have hu' := congrArg Subtype.val (A.embedding.injective he') + exact (ne_of_gt hu.1) hu' + have hdis : Disjoint S T := by + apply disjoint_left.mpr + rintro x ⟨s,hs,rfl⟩ ⟨u,hu,he⟩ + have heq := congrArg Subtype.val (A.embedding.injective he) + linarith [hs.2,hu.1] + refine ⟨W,S,T,hW,hpW,A.subarc_connected le_rfl htr.le hlt, + A.subarc_connected hlt.le le_rfl htr,hdis,hsplit,?_,?_,?_⟩ + · intro x hx hxV + have hxW := hsplit.symm ▸ hx + exact (hWe hxW.1).2 ⟨hxV,hxW.2⟩ + · rw [show S = A.openSubarc A.left t.val from rfl,A.subarc_closure le_rfl htr.le hlt] + exact ⟨t,⟨t.property.1,le_rfl⟩,htp⟩ + · rw [show T = A.openSubarc t.val A.right from rfl,A.subarc_closure hlt.le le_rfl htr] + exact ⟨t,⟨le_rfl,t.property.2⟩,htp⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearEquivNullImage.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearEquivNullImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4cada79572832538a5196d00cd153b7f9dcb4ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearEquivNullImage.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FlatFirstNull + +namespace OAI + +/-! Linear coordinate changes preserve null sets, including between the +finite-dimensional models used in the Sard argument. -/ +noncomputable section +open Set MeasureTheory +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] + [MeasurableSpace E] [BorelSpace E] + [MeasurableSpace F] [BorelSpace F] + +theorem linear_equiv_null_image (e : E ≃L[ℝ] F) + (μ : Measure E) [Measure.IsAddHaarMeasure μ] + (ν : Measure F) [Measure.IsAddHaarMeasure ν] + {s : Set E} (hs : μ s = 0) : ν (e '' s) = 0 := by + have hm : ν.map e.symm ≪ μ := + Measure.absolutelyContinuous_isAddHaarMeasure (ν.map e.symm) μ + have hz := hm hs + have he : MeasurableEmbedding (e.symm : F → E) := e.symm.toHomeomorph.measurableEmbedding + rw [he.map_apply] at hz + simpa only [e.image_eq_preimage_symm] using hz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearFrameJetBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearFrameJetBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..493c1e44a292d4314e81f04680206936268370bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearFrameJetBound.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseTwoJetBounds +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseFrameMargins + +namespace OAI + +/-! Explicit two-jet bounds in linear coordinates, without compact-range +constants depending on the chosen phase. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4 + +namespace WeightedEstimates +open SmallModes + +theorem WeightedBound.comp_linear_equiv {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {U : Set Base} (hU : UniqueDiffOn ℝ U) + {f : Base → E} {s C D : ℝ} {m : ℕ} (hs : 0 ≤ s) (hC : 0 ≤ C) + (L : Base ≃L[ℝ] Base) (hD : 1 ≤ D) (hL : ‖L.toContinuousLinearMap‖ ≤ D) + (hb : WeightedBound U s m C f) : + WeightedBound (L ⁻¹' U) s m (C*D^m) (f ∘ L) := by + intro j hj x hx + rw [L.iteratedFDerivWithin_comp_right f hU hx j] + have hn := (iteratedFDerivWithin ℝ j f U (L x)).norm_compContinuousLinearMap_le + (fun _ => L.toContinuousLinearMap) + simp only [Finset.prod_const,Finset.card_univ,Fintype.card_fin] at hn + calc + _ ≤ s^j*(‖iteratedFDerivWithin ℝ j f U (L x)‖*‖L.toContinuousLinearMap‖^j) := + mul_le_mul_of_nonneg_left hn (pow_nonneg hs _) + _ = (s^j*‖iteratedFDerivWithin ℝ j f U (L x)‖)*‖L.toContinuousLinearMap‖^j := by ring + _ ≤ C*D^m := mul_le_mul (hb j hj (L x) hx) + ((pow_le_pow_left₀ (norm_nonneg _) hL j).trans (pow_le_pow_right₀ hD hj)) + (pow_nonneg (norm_nonneg _) _) hC + +end WeightedEstimates + +namespace RealModes +open SmallModes WeightedEstimates + +theorem realTwoJet_linear_prefix_bound {U : Set Base} (hU : IsOpen U) + {F : RField 4} (hF : ContDiff ℝ ∞ F) {s C D : ℝ} {m : ℕ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (L : Base ≃L[ℝ] Base) (hD : 1 ≤ D) (hL : ‖L.toContinuousLinearMap‖ ≤ D) + (hb : ∀ j ≤ m+2, WeightedBound U 1 j (C/s^(j-2)) F) : + WeightedBound (L ⁻¹' U) s m (C*D^(m+2)) (realTwoJet (F ∘ L)) := by + apply realTwoJet_prefix_bound_on (hU.preimage L.continuous) (hF.comp L.contDiff) hs hs1 + (mul_nonneg hC (pow_nonneg (zero_le_one.trans hD) _)) + intro j hj + have hh := (hb j hj).comp_linear_equiv hU.uniqueDiffOn zero_le_one + (div_nonneg hC (pow_nonneg hs.le _)) L hD hL + apply hh.mono_const + calc + C/s^(j-2)*D^j = (C*D^j)/s^(j-2) := by ring + _ ≤ (C*D^(m+2))/s^(j-2) := by + gcongr + +end RealModes +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearGeometricLocalStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearGeometricLocalStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..4385d0533b65ba13f26bcc76b3ae689f9a5cc1a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearGeometricLocalStep.lean @@ -0,0 +1,162 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearPerturbedMeanFamily +import OAI.Geometry.SurfaceImmersion.Geometry.UniformLinearQuadraticSolvers +import OAI.Geometry.SurfaceImmersion.Primitive.LinearPhaseDerivativeProfiles +import OAI.Geometry.SurfaceImmersion.Correction.LinearMeanReconstruction +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseTwoJetBounds +import OAI.Geometry.SurfaceImmersion.Geometry.UniformPerturbedLocalStep + +namespace OAI + +/-! A local increment constructed from fixed geometric phase neighborhoods. +The actual free and quadratic solvers are constructed inside the proof. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseMean PhaseGeometry FiniteMean + +/-- Compactly controlled geometry for one fixed linear phase. -/ +structure LinearPhaseNeighborhood (F : Base → Space) (ξ : SmallModes.Base) + (S : Compacts Base) where + nonzero : ξ ≠ 0 + Ω : Set SmallModes.Base + U : Set SmallModes.Base + K : Set SmallModes.Base + openΩ : IsOpen Ω + openU : IsOpen U + compactK : IsCompact K + subsetK : U ⊆ K + subsetΩ : K ⊆ Ω + supportU : (modeSupport S : Set SmallModes.Base) ⊆ U + immersion : ∀ x ∈ Ω, Function.Injective (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x) + good : ∀ x ∈ Ω, Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) ξ + +def LinearPhaseNeighborhood.chart {F : Base → Space} {ξ : SmallModes.Base} + {S : Compacts Base} (g : LinearPhaseNeighborhood F ξ S) := + linearPhaseChart ξ g.nonzero g.U g.openU + +theorem linear_geometric_local_step {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + {U₀ D : Set Base} (hU₀ : IsOpen U₀) (hD : IsOpen D) (hDU : D ⊆ U₀) + (K₀ : Compacts Base) (hU₀K : U₀ ⊆ K₀) + (Q : PhaseBasis) (w : Fin 3 → ℝ) (hw : ∀ j, w j ≠ 0) + (S : Fin 3 → Compacts Base) + (g : ∀ j, LinearPhaseNeighborhood F (w j • Q.ξ j) (S j)) + (ξq : QuadraticLabel (Fin 3) → SmallModes.Base) + (gq : ∀ l, LinearPhaseNeighborhood F (ξq l) (quadraticCompacts S l)) + (hinto : ∀ j x, x ∈ (g j).U → planeCoordinateIsometry.symm x ∈ U₀) + (hintoq : ∀ l x, x ∈ (gq l).U → planeCoordinateIsometry.symm x ∈ U₀) + (hSU₀ : ∀ j, (S j : Set Base) ⊆ U₀) + (hSqU₀ : ∀ l, (quadraticCompacts S l : Set Base) ⊆ U₀) + (φ : Fin 3 → Base → ℝ) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hphase : ∀ j, coordinatePhase (φ j) = phaseLinear (w j • Q.ξ j)) + (hphaseq : ∀ l, coordinatePhase (quadraticFamilyPhase φ l) = phaseLinear (ξq l)) + (ψ : ∀ j, SupportedField (F := ℝ) (chartSupport (g j).chart (modeSupport (S j)) (g j).supportU)) + (χ : SmallModes.Base → ℝ) + (htransport : ∀ j x, x ∈ (g j).U → ψ j ((g j).chart x) = χ x / w j) + (hsupport : ∀ j, tsupport χ ⊆ (g j).U) + (hχ : ∀ x ∈ planeCoordinateIsometry.symm ⁻¹' D, χ x = 1) + {r r₀ ρ R : ℝ} (hρ : 0 < ρ) (hgap : r₀ < r) + (reference : SmallModes.Base → Tensor) + (hmargin : ∀ j x, x ∈ (g j).U → + ρ + ‖Q.Q j‖ * r ≤ Q.Q j (reference x) ∧ + Q.Q j (reference x) ≤ R - ‖Q.Q j‖ * r) : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ (Pjet C : ℕ → ℝ), + (∀ m, 0 ≤ Pjet m) → (∀ m, 1 ≤ C m) → ∀ q : ℕ, + ∃ ν η₀ : ℝ, 0 < ν ∧ 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∃ Sb Eb : ℕ → ℝ, (∀ m, 0 ≤ Sb m) ∧ (∀ m, 0 ≤ Eb m) ∧ + ∀ (G : Base → Space) (_hG : ContDiff ℝ ∞ G) (C₀ : ℝ), + 0 ≤ C₀ → C₀ < ρ₀ → + WeightedBound univ 1 2 C₀ + ((G ∘ planeCoordinateIsometry.symm)-(F ∘ planeCoordinateIsometry.symm)) → + ∀ s : ℝ≥0, 0 < (s : ℝ) → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j (Pjet m/(s : ℝ)^(j-2)) G) → + ∀ (H : SmallModes.Base → Tensor), ContDiff ℝ ∞ H → + (∀ x, ‖H x-reference x‖ ≤ r₀) → + (∀ m, WeightedBound univ s m (C m) H) → + ∀ τ ε δ : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + 0 < δ → δ ≤ τ → δ/τ ≤ ν → τ/s+ε/τ^tensorLoss P ≤ η₀ → + ∃ W : RField 4, ContDiff ℝ ∞ W ∧ + tsupport W ⊆ ⋃ j, (modeSupport (S j) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound univ τ m (Sb m*δ*τ) W) ∧ + (∀ m, WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (Eb m*(δ*(τ/s+ε/τ^tensorLoss P)^(q+1)+δ^3/τ)) + (coordinateMetricMap P ε (fun x => G x+W (planeCoordinateIsometry x))- + coordinateMetricMap P ε G-δ^2 • H)) := by + classical + obtain ⟨ρf,hρf,hf⟩ := uniform_linear_perturbed_mean_family_all_profiles P hP hF + (fun j => (g j).Ω) (fun j => (g j).U) (fun j => (g j).K) + (fun j => (g j).openΩ) (fun j => (g j).openU) (fun j => (g j).compactK) + (fun j => (g j).subsetK) (fun j => (g j).subsetΩ) + (fun j => w j • Q.ξ j) (fun j => (g j).nonzero) + (fun j => (g j).immersion) (fun j => (g j).good) + S (fun j => (g j).supportU) hU₀ K₀ hU₀K hSU₀ φ hφ hphase ψ Q.Q hmargin + obtain ⟨ρq,hρq,hq⟩ := uniform_linear_quadratic_solvers P hP hF φ hφ S + (fun l => (gq l).Ω) (fun l => (gq l).U) (fun l => (gq l).K) + (fun l => (gq l).openΩ) (fun l => (gq l).openU) (fun l => (gq l).compactK) + (fun l => (gq l).subsetK) (fun l => (gq l).subsetΩ) ξq + (fun l => (gq l).nonzero) (fun l => (gq l).immersion) (fun l => (gq l).good) + (fun l => (gq l).supportU) hU₀ K₀ hU₀K hSqU₀ hphaseq + refine ⟨min ρf ρq,lt_min hρf hρq,?_⟩ + intro Pjet C hPjet hC q + obtain ⟨Hf,hHf,hjetf⟩ := linear_phase_twoJet_profiles + (fun j => w j • Q.ξ j) (fun j => (g j).nonzero) + (fun j => (g j).U) (fun j => (g j).openU) + (fun j => ⟨(g j).K,(g j).compactK⟩) (fun j => (g j).subsetK) + hU₀ hinto Pjet hPjet + obtain ⟨Hq,hHq,hjetq⟩ := linear_phase_twoJet_profiles + ξq (fun l => (gq l).nonzero) + (fun l => (gq l).U) (fun l => (gq l).openU) + (fun l => ⟨(gq l).K,(gq l).compactK⟩) (fun l => (gq l).subsetK) + hU₀ hintoq Pjet hPjet + obtain ⟨p,_,_,_,hp⟩ := hf Hf Pjet hHf hPjet + obtain ⟨Cq,Dq,Jq,Iq,hCq,_,hJq,hIq,hcq⟩ := hq Hq Pjet hHq hPjet + obtain ⟨Qjet,hQjet,hQrange⟩ := bounded_lowJet_range hU₀ K₀ hU₀K (hPjet 0) + choose B₀ hB₀ hb using fun m => bounded_lowJet_prefix hU₀ K₀ hU₀K (m+tensorOrder P) + let B : ℕ → ℝ := fun m => B₀ m+Pjet (m+tensorOrder P) + have hB (m : ℕ) : 1 ≤ B m := (hB₀ m).trans (le_add_of_nonneg_right (hPjet _)) + obtain ⟨Fp,Mp,hFp,hMp,hφb,hφm⟩ := linear_phase_derivative_profiles φ + (fun j => w j • Q.ξ j) hphase + obtain ⟨ν,η₀,hν,hη₀,hη₁,Sb,Eb,hSb,hEb,hstep⟩ := + uniform_perturbed_local_step hU₀ hD hDU hQjet P hP p hρ hgap q + B Fp Mp C hB (fun m => zero_le_one.trans (hFp m)) + (fun m => zero_le_one.trans (hMp m)) hC Cq Dq Jq Iq hCq hJq hIq + refine ⟨ν,η₀,hν,hη₀,hη₁,Sb,Eb,hSb,hEb,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hpref H hH hHref hHb + τ ε δ hτ hτs hε hε1 hδ hδτ hδν hsmall + obtain ⟨d,hfit,heG,heφ,heS,heChart,heCut,heForm⟩ := hp G hG C₀ hC₀ + (hCρ.trans_le (min_le_left _ _)) hclose s hs hs1 (hjetf G hG s hs hs1 hpref) hpref τ ε r le_rfl hτ hτs hε hε1 + obtain ⟨cq,hcqC,hcqD,hcqJ,hcqI⟩ := hcq G hG C₀ hC₀ + (hCρ.trans_le (min_le_right _ _)) hclose s hs hs1 (fun l m => hjetq G hG s hs hs1 hpref l (m+1)) hpref τ ε hτ hτs hε hε1 + have hleading := linear_mean_reconstruction_on d hρ Q w hw χ (fun j => ψ j) + (by simpa only [heφ] using hphase) heCut + (by simpa only [heChart,LinearPhaseNeighborhood.chart,linearPhaseChart_source] using htransport) heForm + (by simpa only [heChart,LinearPhaseNeighborhood.chart,linearPhaseChart_source] using hsupport) + (planeCoordinateIsometry.symm ⁻¹' D) hχ + subst G + subst φ + subst S + apply hstep s hs hs1 reference H hH hHref hHb d.smoothG d.phase hφ d.support + ε τ δ hτ hτs hε hε1 hδ hδτ hδν hsmall + · apply hQrange d.G d.smoothG + simpa only [Nat.sub_self,pow_zero,div_one] using hpref 0 2 (by omega) + · intro m + exact hb m d.G d.smoothG s (Pjet (m+tensorOrder P)) hs hs1 (hPjet _) (hpref _) + · intro j m v + exact hφb U₀ s m (tensorOrder P) j v + · exact fun j m v hv => hφm s m j v hv + · exact hSqU₀ + · exact hfit + · exact hleading + · exact hcqC + · exact hcqD + · exact hcqJ + · exact hcqI + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMapHomotopy.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMapHomotopy.lean new file mode 100644 index 0000000000000000000000000000000000000000..138f6db2cf61791acc1a730c17de1277996ae68e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMapHomotopy.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RulingDirectionJet + +namespace OAI + +/-! Differential formulas for the actual straight-line homotopy of maps. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +def linearMapHomotopy (f g : E → V) (t : ℝ) (x : E) : V := (1-t) • f x + t • g x + +lemma linearMapHomotopy_smooth {f g : E → V} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (t : ℝ) : ContDiff ℝ ∞ (linearMapHomotopy f g t) := + (hf.const_smul _).add (hg.const_smul _) + +lemma linearMapHomotopy_fderiv {f g : E → V} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (t : ℝ) (x : E) : + fderiv ℝ (linearMapHomotopy f g t) x = + (1-t) • fderiv ℝ f x + t • fderiv ℝ g x := by + exact (((hf.differentiable (by simp) x).hasFDerivAt.const_smul (1-t)).add + ((hg.differentiable (by simp) x).hasFDerivAt.const_smul t)).fderiv + +lemma linearMapHomotopy_fderiv_continuous {f g : E → V} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) : + Continuous (fun z : ℝ × E => fderiv ℝ (linearMapHomotopy f g z.1) z.2) := by + have he : (fun z : ℝ × E => fderiv ℝ (linearMapHomotopy f g z.1) z.2) = + (fun z => (1-z.1) • fderiv ℝ f z.2 + z.1 • fderiv ℝ g z.2) := + funext fun z => linearMapHomotopy_fderiv hf hg _ _ + rw [he] + exact ((continuous_const.sub continuous_fst).smul + ((hf.continuous_fderiv (by simp)).comp continuous_snd)).add + (continuous_fst.smul ((hg.continuous_fderiv (by simp)).comp continuous_snd)) + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma linearMapHomotopy_fix {f g : E → V} {x : E} (h : g x = f x) (t : ℝ) : + linearMapHomotopy f g t x = f x := by + unfold linearMapHomotopy + rw [h,← add_smul] + simp + +lemma linearMapHomotopy_direction {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (t : ℝ) (b : Bool) : + surfaceDirection (linearMapHomotopy f g t) b = + linearMapHomotopy (surfaceDirection f b) (surfaceDirection g b) t := by + funext z + rw [surfaceDirection,linearMapHomotopy_fderiv hf hg] + simp [linearMapHomotopy,surfaceDirection] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMetricDerivativeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMetricDerivativeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..a22c13b02e7cbc51af0c7c397b8b7d3575fcb377 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearMetricDerivativeBounds.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.Immersion.ClosedSurface.TensorBounds + +namespace OAI + +/-! Mixed metric bounds from the actual first derivatives of the two inputs. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates PhaseMean + +lemma weighted_realLinearizedTensor_of_derivatives {n : ℕ} {U : Set Base} + (hU : IsOpen U) {X Y : RField n} {s C D : ℝ} {m : ℕ} + (hs : 0 < s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hbX : ∀ v : Base, ‖v‖ ≤ 1 → WeightedBound U s m C (coordDeriv v X)) + (hbY : ∀ v : Base, ‖v‖ ≤ 1 → WeightedBound U s m D (coordDeriv v Y)) : + WeightedBound U s m (2*(n:ℝ)*(2^m*C*D)) (realLinearizedTensor X Y) := by + have hdot (v w : Base) (hv : ‖v‖ ≤ 1) (hw : ‖w‖ ≤ 1) := + (hbX v hv).dot_real hU.uniqueDiffOn hs.le hC hD + (contDiffOn_coordDeriv_vector hU hX v) (contDiffOn_coordDeriv_vector hU hY w) (hbY w hw) + apply WeightedBound.pi hU.uniqueDiffOn hs (by positivity) + · exact contDiffOn_pi.mp (contDiffOn_realLinearizedTensor hU hX hY) + · intro i + have hh := (hdot _ _ (norm_firstDirection i) (norm_secondDirection i)).add hU.uniqueDiffOn hs.le + (contDiffOn_realDot (contDiffOn_coordDeriv_vector hU hX _) (contDiffOn_coordDeriv_vector hU hY _)) + (contDiffOn_realDot (contDiffOn_coordDeriv_vector hU hX _) (contDiffOn_coordDeriv_vector hU hY _)) + (hdot _ _ (norm_secondDirection i) (norm_firstDirection i)) + simp only [Fintype.card_fin] at hh + have he : (n:ℝ)*(2^m*C*D)+(n:ℝ)*(2^m*C*D) = 2*(n:ℝ)*(2^m*C*D) := by ring + rw [he] at hh + simpa only [realLinearizedTensor_apply,realLinearized] using hh + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearProjectionImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearProjectionImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4a97f3f5f3889957fb01e2d3d7b04fbbdbf2f59 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LinearProjectionImmersion.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericProjectionParameter +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionApproximation + +namespace OAI + +/-! A smooth compact surface immersion in E × R projects to an immersion +in E when E is a Euclidean space of dimension at least four. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma weightedJet_comp {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] + (L : V →L[ℝ] W) (w : Base → ℝ) {l : Base → V} {x : Base} + (hl : DifferentiableAt ℝ l x) : + weightedJet w (L ∘ l) x = L.comp (weightedJet w l x) := by + unfold weightedJet + rw [fderiv_comp x L.differentiableAt hl,L.fderiv] + ext v + simp only [ContinuousLinearMap.comp_apply,sub_apply, + smul_apply,ContinuousLinearMap.smulRight_apply, + Function.comp_apply,map_sub,map_smul] + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +theorem SmoothingAtlas.exists_projected_immersion (A : SmoothingAtlas M) + {n : ℕ} (hn : 4 ≤ n) + {F : M → ProjectionTarget n × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget n × ℝ) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget n × ℝ) F p)) : + ∃ a : ProjectionTarget n, + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget n) ∞ (graphProjection a ∘ F) ∧ + ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget n) (graphProjection a ∘ F) p) := by + classical + let H (i : A.centers) : Base → Base →L[ℝ] ProjectionTarget n × ℝ := + weightedJet (localizedWeight (i : M) (A.weight i)) + (localize (i : M) (A.weight i) F) + have hH (i : A.centers) : ContDiff ℝ ∞ (H i) := + weightedJet_smooth + (localizedWeight_smooth (i : M) (A.weight_smooth i) (A.weight_support i)) + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF) + obtain ⟨a,_ha,ha⟩ := exists_common_projection_parameter hn H hH univ isOpen_univ + (Set.univ_nonempty : (univ : Set (ProjectionTarget n)).Nonempty) + have hg : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget n) ∞ (graphProjection a ∘ F) := + (graphProjection a).contDiff.contMDiff.comp hF + refine ⟨a,hg,?_⟩ + intro p + obtain ⟨i,hi⟩ := A.mem_some_weightCore p + let x := chart (i : M) p + have hx : x ∈ A.coordinateCore i := mem_image_of_mem _ hi + have hxT := A.coordinateCore_target i hx + have hw := A.coordinateCore_weight_nonzero i hx + have hf' := hF.of_le (show (1 : ℕ∞ω) ≤ ∞ by simp) + have hHinj : Function.Injective (H i x) := + (localized_weightedJet_injective_iff hf' (i : M) (A.weight_smooth i) + (A.weight_support i) hxT hw).mpr (hI _) + have hproj := ha i x hHinj + have hnew : Function.Injective (weightedJet (localizedWeight (i : M) (A.weight i)) + (localize (i : M) (A.weight i) (graphProjection a ∘ F)) x) := by + rw [localize_clm,weightedJet_comp _ _ + ((localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).differentiable + (by simp) x)] + exact hproj + have hgI := (localized_weightedJet_injective_iff (hg.of_le (by simp)) (i : M) + (A.weight_smooth i) (A.weight_support i) hxT hw).mp hnew + change Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget n) + (graphProjection a ∘ F) ((chart (i : M)).symm (chart (i : M) p))) at hgI + rwa [(chart (i : M)).left_inv (A.weightCore_source i hi)] at hgI + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzNormalGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzNormalGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..277bccb9a0dd8c46d68cfd0813fd1946cde3c1c9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzNormalGeometry.lean @@ -0,0 +1,155 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalAnsatzProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityIdentities +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicNormalStability + +namespace OAI + +/-! Nonzero normal geometry for the actual supported finite periodic ansatz. -/ + +noncomputable section +open Set +open scoped ContDiff Topology Matrix + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates CovarianceCorrector +open LocalPeriodicExpansion NormalFrame +local notation "ι" => JetVelocityCoordinates.toEuclidean + +private lemma coordinate_sub_bound (u v : Euclidean) : + ‖spaceCoordinates u-spaceCoordinates v‖ ≤ + ‖spaceCoordinates.toContinuousLinearMap‖*‖u-v‖ := by + rw [← map_sub] + exact spaceCoordinates.toContinuousLinearMap.le_opNorm _ + +namespace Loop +variable {O : TopologicalSpace.Opens LowJet} (l : Loop O) + {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) + +private lemma geometry_leading_tangent {p : JetPolynomial.Base} (hp : p ∈ S) + (t : Period) : + spaceCoordinates ((l.geometry G hG hGO).longitudinal.val p t) = + VelocityFrame.leadingTangent (slot 1 (lowJet G p)) (slot 2 (lowJet G p)) + (slot 6 (lowJet G p)) + (spaceCoordinates ((l.geometry G hG hGO).V.val p t)) := by + rw [LocalPeriodicExpansion.Geometry.longitudinal,Family.add_apply, + Family.constant_apply _ _ hp,map_add] + change spaceCoordinates (ι (tangent (lowJet G p)))+ + spaceCoordinates ((l.geometry G hG hGO).V.val p t) = _ + simp only [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply, + tangent,normal,VelocityFrame.leadingTangent] + +/-- The compact normal margin applies to the same finite ansatz whose +coefficients and metric were constructed. Its fast xx derivative need not be +bounded: the geometry is already detected by x, y and yy. -/ +theorem compact_ansatz_normal_geometry + (U : ℕ → Family S Euclidean) + (hU : ∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => + (U i).val y.1 (y.2 : Period))) + (hinit : U 0 = (l.geometry G hG hGO).initial) + {Q : Set JetPolynomial.Base} (hQ : IsCompact Q) (hQS : Q ⊆ S) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) (n : ℕ) : + ∃ η c : ℝ, 0 < η ∧ 0 < c ∧ ∀ z : ℝ, 0 < z → z < η → ∀ p ∈ Q, + let f := finiteAnsatz (fun q => ι (G q)) U ℓ (n+1) z + let x := spaceCoordinates (fderiv ℝ f p (coordinateVector 0)) + let y := spaceCoordinates (fderiv ℝ f p (coordinateVector 1)) + let b := spaceCoordinates (fderiv ℝ + (fun q => fderiv ℝ f q (coordinateVector 1)) p (coordinateVector 1)) + NormalFrame.gramDet x y ≠ 0 ∧ c < ‖realNormalPart x y b‖ := by + let g := l.geometry G hG hGO + let F : JetPolynomial.Base → Euclidean := fun p => ι (G p) + have hF : ContDiff ℝ ∞ F := JetVelocityCoordinates.toEuclidean.contDiff.comp hG + obtain ⟨N,hN,hn⟩ := g.compact_initial_ansatz_profiles hF U hU hinit hQ hQS + ℓ (coordinateVector 0) hx hy + (fun p hp => l.geometry_dx hG hGO hp) + (fun p _ => l.geometry_dy hG hGO p) n + let : CompactSpace Q := isCompact_iff_compactSpace.mp hQ + let X : Q → NormalFrame.Vec := fun p => slot 1 (lowJet G p) + let Y : Q → NormalFrame.Vec := fun p => slot 2 (lowJet G p) + let C : Q → NormalFrame.Vec := fun p => slot 6 (lowJet G p) + let V : Q → C(Period,NormalFrame.Vec) := fun p => + ⟨fun t => spaceCoordinates (g.V.val p t), + spaceCoordinates.continuous.comp (g.V.val p).continuous⟩ + have hX : Continuous X := + ((slot_smooth 1).comp (lowJet_smooth hG)).continuous.comp continuous_subtype_val + have hY : Continuous Y := + ((slot_smooth 2).comp (lowJet_smooth hG)).continuous.comp continuous_subtype_val + have hC : Continuous C := + ((slot_smooth 6).comp (lowJet_smooth hG)).continuous.comp continuous_subtype_val + have hYval (p : Q) : Y p = spaceCoordinates (g.Y p) := by + change slot 2 (lowJet G p) = spaceCoordinates (ι (slot 2 (lowJet G p))) + simp only [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + have hCval (p : Q) : C p = spaceCoordinates (g.C p) := by + change slot 6 (lowJet G p) = spaceCoordinates (ι (slot 6 (lowJet G p))) + simp only [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + have hV : Continuous (fun p : Q × ℝ => V p.1 (p.2 : Period)) := by + have hi : Continuous (fun p : Q × ℝ => ((p.1 : JetPolynomial.Base),p.2)) := + (continuous_subtype_val.comp continuous_fst).prodMk continuous_snd + have hm : ∀ p : Q × ℝ, ((p.1 : JetPolynomial.Base),p.2) ∈ + (S : Set JetPolynomial.Base) ×ˢ (univ : Set ℝ) := + fun p => ⟨hQS p.1.property,mem_univ _⟩ + exact spaceCoordinates.continuous.comp (g.V.smooth.continuousOn.comp_continuous hi hm) + have hD : ∀ p ∈ (univ : Set Q), NormalFrame.gramDet (Y p) (C p) ≠ 0 := by + intro p _ + exact l.gram_ne _ (hGO (hQS p.property)) + have hYV : ∀ p ∈ (univ : Set Q), ∀ t : Period, Y p ⬝ᵥ V p t = 0 := by + intro p _ t + rw [hYval p] + change spaceCoordinates (g.Y p) ⬝ᵥ spaceCoordinates (g.V.val p t) = 0 + rw [spaceCoordinates_dot] + exact g.perpY p (hQS p.property) _ (g.V_mem p (hQS p.property) t) + have hCV : ∀ p ∈ (univ : Set Q), ∀ t : Period, C p ⬝ᵥ V p t = 0 := by + intro p _ t + rw [hCval p] + change spaceCoordinates (g.C p) ⬝ᵥ spaceCoordinates (g.V.val p t) = 0 + rw [spaceCoordinates_dot] + exact g.perpC p (hQS p.property) _ (g.V_mem p (hQS p.property) t) + have hV0 : ∀ p ∈ (univ : Set Q), ∀ t : Period, V p t ≠ 0 := by + intro p _ t hz + change spaceCoordinates (g.V.val p t) = 0 at hz + have hv : g.V.val p t = 0 := spaceCoordinates.injective (by simpa only [map_zero] using hz) + have he := g.circle p (hQS p.property) t + rw [hv,inner_zero_left] at he + exact (ne_of_gt (g.q_pos p (hQS p.property))) he.symm + let D : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖*N + have hD0 : 0 ≤ D := mul_nonneg (norm_nonneg _) hN + obtain ⟨η,c,hη,hc,hh⟩ := VelocityFrame.periodic_normal_stability_of_linear_error + (isCompact_univ : IsCompact (univ : Set Q)) hX hY hC V hV hD hYV hCV hV0 D hD0 + refine ⟨min 1 η,c,lt_min zero_lt_one hη,hc,?_⟩ + intro z hz hzsmall p hp + let pQ : Q := ⟨p,hp⟩ + have hz1 : z ≤ 1 := (lt_of_lt_of_le hzsmall (min_le_left _ _)).le + obtain ⟨hyerr,hberr,hxerr,_,_⟩ := hn z hz hz1 p hp + let f := finiteAnsatz F U ℓ (n+1) z + let x := spaceCoordinates (fderiv ℝ f p (coordinateVector 0)) + let y := spaceCoordinates (fderiv ℝ f p (coordinateVector 1)) + let b := spaceCoordinates (fderiv ℝ + (fun q => fderiv ℝ f q (coordinateVector 1)) p (coordinateVector 1)) + have hbnd {u v : Euclidean} (huv : ‖u-v‖ ≤ N*z) : + ‖spaceCoordinates u-spaceCoordinates v‖ ≤ D*z := by + exact (coordinate_sub_bound u v).trans + ((mul_le_mul_of_nonneg_left huv (norm_nonneg _)).trans_eq (by dsimp [D]; ring)) + have hx' : ‖x-VelocityFrame.leadingTangent (X pQ) (Y pQ) (C pQ) + (V pQ ((ℓ p/z : ℝ) : Period))‖ ≤ D*z := by + change ‖x-VelocityFrame.leadingTangent (slot 1 (lowJet G p)) + (slot 2 (lowJet G p)) (slot 6 (lowJet G p)) + (spaceCoordinates ((l.geometry G hG hGO).V.val p ((ℓ p/z : ℝ) : Period)))‖ ≤ D*z + rw [← l.geometry_leading_tangent hG hGO (hQS hp)] + exact hbnd hxerr + have hy' : ‖y-Y pQ‖ ≤ D*z := by + rw [hYval] + exact hbnd hyerr + have hb' : ‖b-C pQ‖ ≤ D*z := by + rw [hCval] + exact hbnd hberr + exact hh z hz (lt_of_lt_of_le hzsmall (min_le_right _ _)) pQ (mem_univ _) + (ℓ p/z) x y b hx' hy' hb' + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..cccf7ab396c2486d4c559a8e16d43de20edcecdf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalAnsatzSupport.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicGlobalization + +namespace OAI + +/-! Compact support and exact boundary jets of the actual finite ansatz. -/ + +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {O : TopologicalSpace.Opens A} + +/-- A zero-coefficient collar gives equality with the baseline on a whole +neighborhood, not just at the selected point. -/ +lemma finiteAnsatz_eventuallyEq_on_zero (F : A → E) (U : ℕ → Family O E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {Z : Set A} (hZ : IsOpen Z) + (hzero : ∀ i p, p ∈ Z → (U i).val p = 0) {p : A} (hp : p ∈ Z) : + finiteAnsatz F U ℓ L z =ᶠ[𝓝 p] F := by + filter_upwards [hZ.mem_nhds hp] with q hq + simp only [finiteAnsatz,Family.fastValue,hzero _ q hq, + ContinuousMap.zero_apply,smul_zero,Finset.sum_const_zero,add_zero] + +lemma finiteAnsatz_eventuallyEq_off_support (F : A → E) (U : ℕ → Family O E) + {K : Set A} (hK : IsClosed K) (hzero : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {p : A} (hp : p ∉ K) : + finiteAnsatz F U ℓ L z =ᶠ[𝓝 p] F := + finiteAnsatz_eventuallyEq_on_zero F U ℓ L z hK.isOpen_compl hzero hp + +/-- All jets agree exactly away from the fixed closed coefficient support. -/ +lemma finiteAnsatz_jets_eq_off_support (F : A → E) (U : ℕ → Family O E) + {K : Set A} (hK : IsClosed K) (hzero : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L m : ℕ) (z : ℝ) {p : A} (hp : p ∉ K) : + iteratedFDeriv ℝ m (finiteAnsatz F U ℓ L z) p = iteratedFDeriv ℝ m F p := + ((finiteAnsatz_eventuallyEq_off_support F U hK hzero ℓ L z hp).iteratedFDeriv ℝ m).eq_of_nhds + +lemma finiteAnsatz_tsupport_sub (F : A → E) (U : ℕ → Family O E) + {K : Set A} (hK : IsClosed K) (hzero : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + tsupport (fun p => finiteAnsatz F U ℓ L z p-F p) ⊆ K := by + apply closure_minimal _ hK + intro p hp + by_contra hpK + apply (Function.mem_support.mp hp) + rw [finiteAnsatz_eq_off_support F U hzero ℓ L z hpK,sub_self] + +/-- The same compact set supports each actual jet correction. -/ +lemma finiteAnsatz_tsupport_jets_sub (F : A → E) (U : ℕ → Family O E) + {K : Set A} (hK : IsClosed K) (hzero : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L m : ℕ) (z : ℝ) : + tsupport (fun p => iteratedFDeriv ℝ m (finiteAnsatz F U ℓ L z) p- + iteratedFDeriv ℝ m F p) ⊆ K := by + apply closure_minimal _ hK + intro p hp + by_contra hpK + apply (Function.mem_support.mp hp) + rw [finiteAnsatz_jets_eq_off_support F U hK hzero ℓ L m z hpK,sub_self] + +/-- Compact coefficient support gives one globally smooth perturbation with +compactly supported corrections in every derivative order. -/ +theorem finiteAnsatz_compact_support {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family O E) {K : Set A} (hK : IsCompact K) (hKO : K ⊆ O) + (hzero : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + ContDiff ℝ ∞ (finiteAnsatz F U ℓ L z) ∧ + HasCompactSupport (fun p => finiteAnsatz F U ℓ L z p-F p) ∧ + tsupport (fun p => finiteAnsatz F U ℓ L z p-F p) ⊆ K ∧ + (∀ m, HasCompactSupport (fun p => + iteratedFDeriv ℝ m (finiteAnsatz F U ℓ L z) p-iteratedFDeriv ℝ m F p)) ∧ + ∀ p, p ∉ K → finiteAnsatz F U ℓ L z =ᶠ[𝓝 p] F := by + have hs := finiteAnsatz_tsupport_sub F U hK.isClosed hzero ℓ L z + refine ⟨finiteAnsatz_smooth_global hF U hK.isClosed hKO + (fun i p _ hp => hzero i p hp) ℓ L z, + hK.of_isClosed_subset (isClosed_tsupport _) hs,hs,?_,?_⟩ + · intro m + exact hK.of_isClosed_subset (isClosed_tsupport _) + (finiteAnsatz_tsupport_jets_sub F U hK.isClosed hzero ℓ L m z) + · intro p hp + exact finiteAnsatz_eventuallyEq_off_support F U hK.isClosed hzero ℓ L z hp + +namespace Geometry +variable [FiniteDimensional ℝ A] [CompleteSpace E] + {dy : A} (g : Geometry (E := E) O dy) + +/-- The support conclusion of the proved coefficient recursion immediately +gives exact boundary germs wherever its initial primitive vanishes. -/ +lemma finiteAnsatz_eventuallyEq_on_initial_zero (F : A → E) (U : ℕ → Family O E) + (hcoeff : ∀ Z : Set A, IsOpen Z → Z ⊆ O → + (∀ p ∈ Z, g.initial.val p = 0) → ∀ i p, p ∈ Z → (U i).val p = 0) + {Z : Set A} (hZ : IsOpen Z) (hZO : Z ⊆ O) + (hzero : ∀ p ∈ Z, g.initial.val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {p : A} (hp : p ∈ Z) : + finiteAnsatz F U ℓ L z =ᶠ[𝓝 p] F := + finiteAnsatz_eventuallyEq_on_zero F U ℓ L z hZ (hcoeff Z hZ hZO hzero) hp + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalCovarianceParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalCovarianceParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..70c73c39c034648f8c8ebe873d663cb61f5a8664 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalCovarianceParameter.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalParameterIntegral +import OAI.Geometry.SurfaceImmersion.Geometry.JointCovarianceParameter + +namespace OAI + +/-! The covariance correction is smooth on the open admissible geometric domain. -/ + +noncomputable section +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.CovarianceCorrector + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ E] in +lemma contDiffOn_average_joint {V : P → C(Period, E)} {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun p => average (V p)) S := by + have hi := SmoothParameterIntegral.contDiffOn_integral hS hV 0 1 + simpa only [PeriodicPrimitive.integral_lift_eq_haar, average] using hi + +lemma contDiffOn_covarianceCLM_joint {V : P → C(Period, E)} {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun p => covarianceCLM (V p)) S := by + have hc := hV.sub ((contDiffOn_average_joint hS hV).comp contDiffOn_fst (fun _ hz => hz.1)) + rw [contDiffOn_clm_apply] + intro m + simp_rw [covarianceCLM_apply] + have hi := SmoothParameterIntegral.contDiffOn_integral hS + ((hc.inner ℝ (contDiffOn_const (c := m))).smul hc) 0 1 + convert hi using 1 + funext p + exact (PeriodicPrimitive.integral_lift_eq_haar + (fun t => inner ℝ (V p t - average (V p)) m • (V p t - average (V p)))).symm + +omit [FiniteDimensional ℝ E] in +lemma contDiffOn_weightedAverage_joint {V : P → C(Period, E)} {r : P → C(Period, ℝ)} + {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hr : ContDiffOn ℝ ∞ (fun z : P × ℝ => r z.1 (z.2 : Period)) (S ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun p => weightedAverage (V p) (r p)) S := by + have hi := SmoothParameterIntegral.contDiffOn_integral hS (hr.smul hV) 0 1 + convert hi using 1 + funext p + exact (PeriodicPrimitive.integral_lift_eq_haar (fun t => r p t • V p t)).symm + +lemma contDiffOn_covarianceSolution_joint {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hr : ContDiffOn ℝ ∞ (fun z : P × ℝ => r z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q S) (hqpos : ∀ p ∈ S, 0 < q p) + (hcircle : ∀ p ∈ S, ∀ t, inner ℝ (V p t) (V p t) = q p) : + ContDiffOn ℝ ∞ (fun p => covarianceSolution (V p) (r p) (q p)) S := by + have hM : ContDiffOn ℝ ∞ (fun p => meanCLM (V p) (q p)) S := + contDiffOn_const.sub ((hq.inv (fun p hp => (hqpos p hp).ne')).smul + (contDiffOn_covarianceCLM_joint hS hV)) + have hi : ContDiffOn ℝ ∞ (fun p => (meanCLM (V p) (q p)).inverse) S := by + apply hS.contDiffOn_iff.mpr + intro p hp + exact (meanCLM_isInvertible (hqpos p hp) (hcircle p hp)).contDiffAt_map_inverse.comp p + (hM.contDiffAt (hS.mem_nhds hp)) + exact hi.clm_apply (contDiffOn_weightedAverage_joint hS hV hr) + +lemma contDiffOn_parameterCorrector_joint {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hr : ContDiffOn ℝ ∞ (fun z : P × ℝ => r z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q S) (hqpos : ∀ p ∈ S, 0 < q p) + (hcircle : ∀ p ∈ S, ∀ t, inner ℝ (V p t) (V p t) = q p) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => parameterCorrector V r q z.1 (z.2 : Period)) + (S ×ˢ Set.univ) := by + have hm : ContDiffOn ℝ ∞ (fun z : P × ℝ => + covarianceSolution (V z.1) (r z.1) (q z.1)) (S ×ˢ Set.univ) := + (contDiffOn_covarianceSolution_joint hS hV hr hq hqpos hcircle).comp + contDiffOn_fst (fun _ hz => hz.1) + have hv : ContDiffOn ℝ ∞ (fun z : P × ℝ => average (V z.1)) (S ×ˢ Set.univ) := + (contDiffOn_average_joint hS hV).comp contDiffOn_fst (fun _ hz => hz.1) + have hi : ContDiffOn ℝ ∞ (fun z : P × ℝ => (q z.1)⁻¹) (S ×ˢ Set.univ) := + (hq.comp contDiffOn_fst (fun _ hz => hz.1)).inv (fun z hz => (hqpos z.1 hz.1).ne') + have hs : ContDiffOn ℝ ∞ (fun z : P × ℝ => + correctedScalar (V z.1) (average (V z.1)) (q z.1) (r z.1) + (covarianceSolution (V z.1) (r z.1) (q z.1)) (z.2 : Period)) (S ×ˢ Set.univ) := by + simpa only [correctedScalar, div_eq_mul_inv] using + hr.add (((hV.sub hv).inner ℝ hm).mul hi) + exact hi.smul ((hs.smul hV).sub hm) + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalDefiningFunction.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalDefiningFunction.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b2e1ed8bfce91ba141ad4f1f7ea69b057ac6d91 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalDefiningFunction.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteExceptionalTransverse + +namespace OAI + +/-! Extend a local transverse defining function smoothly before applying the +compact correction construction. -/ +noncomputable section +open Set Metric Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.TransverseSmallFunction + +lemma localize_defining_function {K U : Set Base} {p : Base} {f : Base → ℝ} + (hU : IsOpen U) (hp : p ∈ U) (hf : ContDiffOn ℝ ∞ f U) + (hz : ∀ x ∈ K ∩ U, f x = 0) (hd : fderiv ℝ f p (0, 1) ≠ 0) : + ∃ W : Set Base, IsOpen W ∧ p ∈ W ∧ + ∃ F : Base → ℝ, ContDiff ℝ ∞ F ∧ (∀ x ∈ K ∩ W, F x = 0) ∧ + ∀ x ∈ W, fderiv ℝ F x (0, 1) ≠ 0 := by + obtain ⟨r, hr, hrU⟩ := Metric.isOpen_iff.mp hU p hp + let φ : ContDiffBump p := ⟨r / 4, r / 2, by positivity, by linarith⟩ + have hs : tsupport φ ⊆ U := by + rw [φ.tsupport_eq] + exact fun x hx => hrU (lt_of_le_of_lt hx (by change r / 2 < r; linarith)) + let F : Base → ℝ := fun x => φ x * f x + have hF : ContDiff ℝ ∞ F := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport φ + · exact φ.contDiff.contDiffAt.mul (hf.contDiffAt (hU.mem_nhds (hs hx))) + · apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy + change φ y * f y = 0 + rw [show φ y = 0 from hy, zero_mul] + have he : F =ᶠ[𝓝 p] f := by + filter_upwards [φ.eventuallyEq_one_of_mem_ball (mem_ball_self φ.rIn_pos)] with x hx + change φ x * f x = f x + rw [show φ x = 1 from hx, one_mul] + have hFp : fderiv ℝ F p (0, 1) ≠ 0 := by rw [he.fderiv_eq]; exact hd + let N : Set Base := {x | fderiv ℝ F x (0, 1) ≠ 0} + have hdF : ContDiff ℝ ∞ (fun x => fderiv ℝ F x (0, 1)) := + (hF.fderiv_right (by simp)).clm_apply contDiff_const + have hN : IsOpen N := isOpen_ne.preimage hdF.continuous + refine ⟨ball p φ.rIn ∩ N, isOpen_ball.inter hN, ⟨mem_ball_self φ.rIn_pos, hFp⟩, + F, hF, ?_, fun x hx => hx.2⟩ + intro x hx + have hxU : x ∈ U := hrU (lt_trans hx.2.1 (by change r / 4 < r; linarith)) + change φ x * f x = 0 + rw [hz x ⟨hx.1, hxU⟩, mul_zero] + +/-- The small-value derivative construction with local smooth curve equations. +This is the local analytic content of manuscript Lemma `small-value-derivative`. -/ +theorem small_value_prescribed_derivative {K O P : Set Base} + (hK : IsCompact K) (hO : IsOpen O) (hKO : K ⊆ O) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f U ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + (B : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ H : Base → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ O ∧ + (∀ x, |H x| < ε) ∧ ∀ x ∈ K, fderiv ℝ H x (0, 1) = B := by + apply finite_exceptional_transverse_correction hK hO hKO hP hPK _ B hε + intro p hp + obtain ⟨U, hU, hpU, f, hf, hz, hd⟩ := hlocal p hp + exact localize_defining_function hU hpU hf hz hd + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalFlatExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalFlatExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..113c626857bb82bf4c290b5a7686921f472d3513 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalFlatExtension.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FlatExtension + +namespace OAI + +/-! Boundary flatness only needs smoothness on the admissible neighborhood. -/ +noncomputable section +open Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4 + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem iteratedFDeriv_zero_on_local_closure {F : A → E} {O U : Set A} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) + (hO : IsOpen O) (hOU : O ⊆ U) (hz : ∀ p ∈ O, F p = 0) (n : ℕ) : + EqOn (iteratedFDeriv ℝ n F) (fun _ => 0) (closure O ∩ U) := by + have he : EqOn (iteratedFDeriv ℝ n F) (fun _ => 0) O := by + intro p hp + have hg : F =ᶠ[𝓝 p] (fun _ : A => (0 : E)) := by + filter_upwards [hO.mem_nhds hp] with q hq + exact hz q hq + have hd := (hg.iteratedFDeriv ℝ n).eq_of_nhds + simpa only [iteratedFDeriv_fun_zero, Pi.zero_apply] using hd + have hc : ContinuousOn (iteratedFDeriv ℝ n F) U := by + apply (hF.continuousOn_iteratedFDerivWithin (m := n) (by simp) hU.uniqueDiffOn).congr + intro p hp + exact (iteratedFDerivWithin_of_isOpen n hU hp).symm + exact he.of_subset_closure (hc.mono inter_subset_right) continuousOn_const + (fun p hp => ⟨subset_closure hp, hOU hp⟩) inter_subset_left + +theorem fderiv_eq_on_local_closure {F G : A → E} {O U : Set A} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) (hG : ContDiffOn ℝ ∞ G U) + (hO : IsOpen O) (hOU : O ⊆ U) (heq : EqOn F G O) : + EqOn (fderiv ℝ F) (fderiv ℝ G) (closure O ∩ U) := by + have he : EqOn (fderiv ℝ F) (fderiv ℝ G) O := by + intro p hp + have hg : F =ᶠ[𝓝 p] G := by + filter_upwards [hO.mem_nhds hp] with q hq + exact heq hq + exact hg.fderiv_eq + have hcF := (hF.fderiv_of_isOpen hU (m := ∞) (by simp)).continuousOn + have hcG := (hG.fderiv_of_isOpen hU (m := ∞) (by simp)).continuousOn + exact he.of_subset_closure (hcF.mono inter_subset_right) (hcG.mono inter_subset_right) + (fun p hp => ⟨subset_closure hp, hOU hp⟩) inter_subset_left + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIntegratedCovariance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIntegratedCovariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c18ee733fc280c19325527427d5d074abf2f460 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIntegratedCovariance.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalCovarianceParameter +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Geometry.IntegratedCovariance + +namespace OAI + +/-! Integrated covariance correction on an open parameter domain. -/ + +noncomputable section +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.CovarianceCorrector + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +/-- The explicit primitive is smooth wherever the geometric data are admissible. -/ +theorem contDiffOn_integratedCorrector {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} {S : Set P} (hS : IsOpen S) + (hV : ContDiffOn ℝ ∞ (fun z : P × ℝ => V z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hr : ContDiffOn ℝ ∞ (fun z : P × ℝ => r z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q S) (hqpos : ∀ p ∈ S, 0 < q p) + (hcircle : ∀ p ∈ S, ∀ t, inner ℝ (V p t) (V p t) = q p) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => integratedCorrector V r q z.1 z.2) + (S ×ˢ Set.univ) := + PeriodicPrimitive.contDiffOn_primitive_joint hS + (contDiffOn_parameterCorrector_joint hS hV hr hq hqpos hcircle) + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + [CompleteSpace E] [FiniteDimensional ℝ E] in +/-- The fluctuation equation uses the constant-speed hypotheses only at this parameter. -/ +theorem parameterCorrector_projection_at {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} (p : P) + (hr : average (r p) = 0) (hq : 0 < q p) + (hcircle : ∀ t, inner ℝ (V p t) (V p t) = q p) : + fluctuation (fun t => inner ℝ (V p t) (parameterCorrector V r q p t)) = r p := + corrected_projection (V p) (average (V p)) (r p).continuous hr hq.ne' hcircle _ + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] in +/-- The zero mean equation uses invertibility only at this parameter. -/ +theorem parameterCorrector_average_at {V : P → C(Period, E)} + {r : P → C(Period, ℝ)} {q : P → ℝ} (p : P) (hq : 0 < q p) + (hcircle : ∀ t, inner ℝ (V p t) (V p t) = q p) : + average (parameterCorrector V r q p) = 0 := + average_correctedVector (V p).continuous rfl (r p).continuous (q p) + (covarianceSolution (V p) (r p) (q p)) + (covarianceSolution_equation (r p) hq hcircle) + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + [CompleteSpace E] in +lemma parameterCorrector_mem_submodule_at (N : Submodule ℝ E) + (V : P → C(Period, E)) (r : P → C(Period, ℝ)) (q : P → ℝ) (p : P) + (hmem : ∀ t, V p t ∈ N) (hq : 0 < q p) + (hcircle : ∀ t, inner ℝ (V p t) (V p t) = q p) (t : Period) : + parameterCorrector V r q p t ∈ N := by + apply N.smul_mem + apply N.sub_mem + · exact N.smul_mem _ (hmem t) + · exact covarianceSolution_mem_submodule N (V p) (r p) hmem hq hcircle + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIsometryBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIsometryBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..5afe32e3bffb7abec6034a356e5a53634db3129d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalIsometryBounds.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedCoordinateChange + +namespace OAI + +/-! Isometric coordinate transport on the open domains used by the local +polynomial estimates. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma weightedBound_comp_isometry_on {A B F : Type*} + [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup B] [NormedSpace ℝ B] + [NormedAddCommGroup F] [NormedSpace ℝ F] + (e : A ≃ₗᵢ[ℝ] B) {U : Set B} (hU : IsOpen U) {f : B → F} + (hf : ContDiff ℝ ∞ f) {s C : ℝ} {m : ℕ} + (hb : WeightedBound U s m C f) : + WeightedBound (e ⁻¹' U) s m C (f ∘ e) := by + intro j hj x hx + rw [iteratedFDerivWithin_of_isOpen j (hU.preimage e.continuous) hx] + change s ^ j * ‖iteratedFDeriv ℝ j + (f ∘ (e.toContinuousLinearEquiv.toContinuousLinearMap : A → B)) x‖ ≤ C + rw [e.toContinuousLinearEquiv.toContinuousLinearMap.iteratedFDeriv_comp_right hf x (by simp), + ContinuousMultilinearMap.norm_compContinuous_linearIsometryEquiv] + change s ^ j * ‖iteratedFDeriv ℝ j f (e x)‖ ≤ C + have hh := hb j hj (e x) hx + rw [iteratedFDerivWithin_of_isOpen j hU hx] at hh + exact hh + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMetricExpansionWitness.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMetricExpansionWitness.lean new file mode 100644 index 0000000000000000000000000000000000000000..b69af40570779aa39cce064958b7aa7e09e96196 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMetricExpansionWitness.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalFinitePeriodicExpansion + +namespace OAI + +/-! The finite metric expansion for a specified cancelling coefficient +sequence, allowing the quantitative estimates to use the same witness. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector +open ClosedSurfaceR4.PeriodicExpansion (weighted_sum_split_zero) + +private lemma split_constant (n : ℕ) (c e : ℕ → ℝ) (q z : ℝ) + (hzero : c 0 = q) (h : ∀ r, 0 < r → r < n + 1 → c r = e r) : + (∑ r ∈ Finset.range (n + 1), c r * z ^ r) = + q + ∑ r ∈ Finset.Ico 1 (n + 1), e r * z ^ r := by + have hs := weighted_sum_split_zero z c n + simp only [smul_eq_mul, mul_comm] at hs + rw [hs, hzero] + congr 1 + apply Finset.sum_congr rfl + intro r hr + obtain ⟨hr, hrn⟩ := Finset.mem_Ico.mp hr + rw [h r (by omega) hrn] + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] {O : TopologicalSpace.Opens A} {dy : A} + +namespace Geometry + +omit [CompleteSpace E] in +lemma angle_independent_of_cancellation (g : Geometry (E := E) O dy) + (dx : A) (U : ℕ → Family O E) (n : ℕ) + (hy₁ : (g.yyCoefficient U 1).fluct = 0) + (hc : ∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient dx U r).fluct = 0 ∧ + (g.xyCoefficient dx U r).fluct = 0 ∧ (g.yyCoefficient U (r + 1)).fluct = 0) + {r : ℕ} (hr : 0 < r) (hrn : r < n + 1) (p : A) (t : Period) : + (g.xxRemainder dx U (n + 1) r).val p t = average ((g.xxCoefficient dx U r).val p) ∧ + (g.xyRemainder dx U (n + 1) r).val p t = average ((g.xyCoefficient dx U r).val p) ∧ + (g.yyRemainder U (n + 1) r).val p t = average ((g.yyCoefficient U r).val p) := by + obtain ⟨hx, hxy, _⟩ := hc r hr (by omega) + have hy : (g.yyCoefficient U r).fluct = 0 := by + by_cases he : r = 1 + · simpa only [he] using hy₁ + · simpa only [Nat.sub_add_cancel (by omega : 1 ≤ r)] using + (hc (r - 1) (by omega) (by omega)).2.2 + have mean_eq (f : Family O ℝ) (hf : f.fluct = 0) : f.val p t = average (f.val p) := by + have ht := congrArg (fun w : Family O ℝ => w.val p t) hf + simp only [Family.fluct_apply, fluctuation, Family.zero_apply] at ht + exact sub_eq_zero.mp ht + change (metricCoefficientFamily (n + 1) r _ _).val p t = _ ∧ + (metricCoefficientFamily (n + 1) r _ _).val p t = _ ∧ + (metricCoefficientFamily (n + 1) r _ _).val p t = _ + simp only [metricCoefficientFamily_apply] + exact ⟨(g.xxPolynomial_coeff dx U hr hrn p t).trans (mean_eq _ hx), + (g.xyPolynomial_coeff dx U hr hrn p t).trans (mean_eq _ hxy), + (g.yyPolynomial_coeff U hr (by omega) p t).trans (mean_eq _ hy)⟩ + +/-- The exact expansion retains a given coefficient witness, rather than +choosing a new sequence without its proved estimates. -/ +theorem finite_expansion_of_cancellation (g : Geometry (E := E) O dy) + {F : A → E} (hF : ContDiffOn ℝ ∞ F O) (U : ℕ → Family O E) + (hinit : U 0 = g.initial) (n : ℕ) (dx : A) + (hy₁ : (g.yyCoefficient U 1).fluct = 0) + (hc : ∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient dx U r).fluct = 0 ∧ + (g.xyCoefficient dx U r).fluct = 0 ∧ (g.yyCoefficient U (r + 1)).fluct = 0) + (ℓ : A →L[ℝ] ℝ) (hℓx : ℓ dx = 1) (hℓy : ℓ dy = 0) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (hY : ∀ p ∈ O, fderiv ℝ F p dy = g.Y p) + (z : ℝ) (hz : z ≠ 0) {p : A} (hp : p ∈ O) : + let f := finiteAnsatz F U ℓ (n + 1) z + let t : Period := ((ℓ p / z : ℝ) : Period) + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx) = + (inner ℝ (g.X₀ p) (g.X₀ p) + g.q p) + + (∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xxCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico (n + 1) (2 * (n + 1) + 1), + (g.xxRemainder dx U (n + 1) r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy) = + inner ℝ (g.X₀ p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xyCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico (n + 1) (2 * (n + 1) + 1), + (g.xyRemainder dx U (n + 1) r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy) = + inner ℝ (g.Y p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 (n + 1), average ((g.yyCoefficient U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico (n + 1) (2 * (n + 1) + 1), + (g.yyRemainder U (n + 1) r).val p t * z ^ r) := by + dsimp only + let t : Period := ((ℓ p / z : ℝ) : Period) + obtain ⟨hxx, hxy, hyy⟩ := g.finite_metric_identity hF U hinit ℓ dx hℓx hℓy hX hY n z hz hp + obtain ⟨hxx₀, hxy₀, hyy₀⟩ := g.polynomial_zero_coefficients dx U (n + 1) hp t + have hcoeff := fun (r : ℕ) (hr : 0 < r) (hn : r < n + 1) => + g.angle_independent_of_cancellation dx U n hy₁ hc hr hn p t + rw [split_constant n _ _ _ z hxx₀ (fun r hr hn => (hcoeff r hr hn).1)] at hxx + rw [split_constant n _ _ _ z hxy₀ (fun r hr hn => (hcoeff r hr hn).2.1)] at hxy + rw [split_constant n _ _ _ z hyy₀ (fun r hr hn => (hcoeff r hr hn).2.2)] at hyy + exact ⟨hxx, hxy, hyy⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMonotoneTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMonotoneTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..da210ea7656871be3a4b6b390d0e58d94b3e0420 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalMonotoneTransition.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MonotoneGermDiffeomorphism + +namespace OAI + +/-! A smooth oriented transition on an open real interval extends to a +global smooth change of parameter while retaining its germ. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem local_increasing_diffeomorphism {h : ℝ → ℝ} {U : Set ℝ} + (hU : IsOpen U) (hh : ContDiffOn ℝ ∞ h U) {a : ℝ} + (haU : a ∈ U) (ha : 0 < deriv h a) : + ∃ e : ℝ ≃ₜ ℝ, ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + StrictMono e ∧ e =ᶠ[𝓝 a] h := by + obtain ⟨W,hW,haW,hWU,H,hH,heq⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := a)) hU (singleton_subset_iff.mpr haU) hh + have he : H =ᶠ[𝓝 a] h := heq.eventuallyEq_of_mem (hW.mem_nhds (haW (by simp))) + have hd : 0 < deriv H a := by rw [he.deriv_eq]; exact ha + obtain ⟨e,hes,hei,hem,hee⟩ := increasing_smooth_germ_diffeomorphism hH a hd + exact ⟨e,hes,hei,hem,hee.trans he⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalNullImage.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalNullImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..b38dc8edeb5a54e8b25a7ab14ea37891177c060f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalNullImage.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarFlatCriticalValues +import Mathlib.Topology.Compactness.Lindelof + +namespace OAI + +/-! Local null-image statements glue over a second countable domain. -/ +noncomputable section +open Set MeasureTheory +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem null_image_of_locally_null {X Y : Type*} [TopologicalSpace X] + [SecondCountableTopology X] [MeasurableSpace Y] (μ : Measure Y) + (f : X → Y) (s : Set X) + (h : ∀ x ∈ s, ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ μ (f '' (s ∩ U)) = 0) : + μ (f '' s) = 0 := by + choose U ho hm hn using fun x : s => h x x.property + have hcover : s ⊆ ⋃ x : s, U x := fun x hx => mem_iUnion.mpr ⟨⟨x,hx⟩,hm ⟨x,hx⟩⟩ + obtain ⟨A,hAc,hA⟩ := (HereditarilyLindelofSpace.isLindelof s).elim_countable_subcover U ho hcover + have hsub : f '' s ⊆ ⋃ x ∈ A, f '' (s ∩ U x) := by + rintro y ⟨x,hx,rfl⟩ + obtain ⟨i,hi,hxi⟩ := mem_iUnion₂.mp (hA hx) + exact mem_iUnion₂.mpr ⟨i,hi,⟨x,⟨hx,hxi⟩,rfl⟩⟩ + exact measure_mono_null hsub ((measure_biUnion_null_iff hAc).mpr fun x _ => hn x) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterIntegral.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..691934744e17f5baea0fea436a9f0b1103e1f48f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterIntegral.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension + +namespace OAI + +/-! Parameter integration on an open admissible domain, localized by a smooth cutoff. -/ + +noncomputable section +open MeasureTheory Set Filter Metric +open scoped ContDiff Topology + +universe u + +namespace ClosedSurfaceR4.SmoothParameterIntegral + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +/-- A cutoff supported inside the parameter domain turns a locally smooth +family into a globally smooth family without changing its values near the center. -/ +lemma contDiff_supported_smul {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ univ)) {χ : P → ℝ} + (hχ : ContDiff ℝ ∞ χ) (hsupp : tsupport χ ⊆ S) : + ContDiff ℝ ∞ (fun z : P × ℝ => χ z.1 • F z) := by + rw [contDiff_iff_contDiffAt] + intro z + by_cases hz : z.1 ∈ S + · exact (hχ.comp contDiff_fst).contDiffAt.smul + ((hF z ⟨hz, mem_univ z.2⟩).contDiffAt ((hS.prod isOpen_univ).mem_nhds ⟨hz, mem_univ z.2⟩)) + · have hn : z.1 ∉ tsupport χ := fun h => hz (hsupp h) + have he : χ =ᶠ[𝓝 z.1] fun _ => 0 := by + filter_upwards [(isClosed_tsupport χ).isOpen_compl.mem_nhds hn] with p hp + exact image_eq_zero_of_notMem_tsupport hp + have he' := he.comp_tendsto (continuous_fst.continuousAt : + Tendsto Prod.fst (𝓝 z) (𝓝 z.1)) + apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [he'] with w hw + exact (congrArg (fun a : ℝ => a • F w) hw).trans (zero_smul ℝ (F w)) + +omit [CompleteSpace E] in +lemma exists_smooth_extension_near {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ univ)) {p : P} (hp : p ∈ S) : + ∃ G : P × ℝ → E, ContDiff ℝ ∞ G ∧ + ∀ᶠ q in 𝓝 p, ∀ t : ℝ, G (q, t) = F (q, t) := by + obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.mp hS p hp + let χ : ContDiffBump p := ⟨ε / 4, ε / 2, by positivity, by linarith⟩ + have hsupp : tsupport (χ : P → ℝ) ⊆ S := by + rw [χ.tsupport_eq] + exact (closedBall_subset_ball (by change ε / 2 < ε; linarith)).trans hball + refine ⟨fun z => χ z.1 • F z, contDiff_supported_smul hS hF χ.contDiff hsupp, ?_⟩ + filter_upwards [χ.eventuallyEq_one] with q hq + intro t + rw [show χ q = 1 from hq, one_smul] + +/-- Smooth parameter integrals require smoothness only over the open parameter +region where the geometric data are admissible. -/ +theorem contDiffOn_integral {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ univ)) (a b : ℝ) : + ContDiffOn ℝ ∞ (fun p => ∫ t in a..b, F (p, t)) S := by + apply hS.contDiffOn_iff.mpr + intro p hp + obtain ⟨G, hG, he⟩ := exists_smooth_extension_near hS hF hp + apply (contDiff_integral hG a b).contDiffAt.congr_of_eventuallyEq + filter_upwards [he] with q hq + exact intervalIntegral.integral_congr (fun t _ => (hq t).symm) + +omit [CompleteSpace E] in +/-- Differentiation under the integral at an admissible parameter. -/ +theorem hasFDerivAt_integral_on {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ univ)) (a b : ℝ) {p : P} (hp : p ∈ S) : + HasFDerivAt (fun q => ∫ t in a..b, F (q, t)) + (∫ t in a..b, partialDerivative F (p, t)) p := by + obtain ⟨G, hG, he⟩ := exists_smooth_extension_near hS hF hp + have hd : (fun t => partialDerivative G (p, t)) = + fun t => partialDerivative F (p, t) := by + funext t + have he' : G =ᶠ[𝓝 (p, t)] F := by + filter_upwards [(continuous_fst.continuousAt : + Tendsto Prod.fst (𝓝 (p, t)) (𝓝 p)).eventually he] with z hz + exact hz z.2 + simp only [partialDerivative, he'.fderiv_eq] + have h := hasFDerivAt_integral hG a b p + rw [hd] at h + apply h.congr_of_eventuallyEq + filter_upwards [he] with q hq + exact intervalIntegral.integral_congr (fun t _ => (hq t).symm) + +end ClosedSurfaceR4.SmoothParameterIntegral + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9b96d9b7fe71525024b6aff5e4e3a6195988bea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalParameterTransition.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.OrientedDoubleTransition + +namespace OAI + +/-! Two regular smooth real parameters admit a local smooth change of +parameter, constructed using the proved global extension of an oriented germ. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem local_parameter_transition {h k : ℝ → ℝ} {U V : Set ℝ} {a b : ℝ} + (hU : IsOpen U) (hV : IsOpen V) (ha : a ∈ U) (hb : b ∈ V) + (hh : ContDiffOn ℝ ∞ h U) (hk : ContDiffOn ℝ ∞ k V) + (hhn : deriv h a ≠ 0) (hkn : deriv k b ≠ 0) (heq : h a = k b) : + ∃ H : ℝ → ℝ, ContDiffOn ℝ ∞ H U ∧ H a = b ∧ deriv H a ≠ 0 ∧ + h =ᶠ[𝓝 a] k ∘ H := by + have hs : ∃ s : ℝ, (s = 1 ∨ s = -1) ∧ 0 < deriv (fun t => s*k t) b := by + by_cases hp : 0 < deriv k b + · exact ⟨1,Or.inl rfl,by simpa only [one_mul] using hp⟩ + · refine ⟨-1,Or.inr rfl,?_⟩ + have hn := lt_of_le_of_ne (le_of_not_gt hp) hkn + simpa only [neg_one_mul,deriv.fun_neg] using neg_pos.mpr hn + obtain ⟨s,hs,hpos⟩ := hs + have hs0 : s ≠ 0 := by rcases hs with rfl | rfl <;> norm_num + obtain ⟨e,hes,hei,hem,heg⟩ := local_increasing_diffeomorphism hV + (contDiffOn_const.mul hk) hb hpos + have heb : e b = s*k b := heg.eq_of_nhds + let H : ℝ → ℝ := fun t => e.symm (s*h t) + have hHs : ContDiffOn ℝ ∞ H U := hei.comp_contDiffOn (contDiffOn_const.mul hh) + have hHa : H a = b := by + change e.symm (s*h a) = b + rw [heq,← heb,e.symm_apply_apply] + have hD := ((hei.differentiable (by simp) (s*h a)).hasDerivAt.comp a + (((hh.contDiffAt (hU.mem_nhds ha)).differentiableAt (by simp)).hasDerivAt.const_mul s)).deriv + dsimp only [Function.comp_def] at hD + have hHn : deriv H a ≠ 0 := by + rw [hD] + exact mul_ne_zero (smooth_real_homeomorph_deriv_ne_zero e.symm hei hes (s*h a)) + (mul_ne_zero hs0 hhn) + have hHt : Tendsto H (𝓝 a) (𝓝 b) := hHa ▸ (hHs.continuousOn.continuousAt (hU.mem_nhds ha)) + have hcomp := heg.comp_tendsto hHt + refine ⟨H,hHs,hHa,hHn,?_⟩ + filter_upwards [hcomp] with t ht + change h t = k (H t) + apply mul_left_cancel₀ hs0 + exact (e.apply_symm_apply (s*h t)).symm.trans ht + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalQuadraticReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalQuadraticReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..243aa19d9addc2453685336a3b867b58c681192f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalQuadraticReplacement.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CutoffFlatJetBound +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceQuadraticTaylor + +namespace OAI + +/-! A smooth surface map can be made equal to its actual quadratic jet +near the origin by an arbitrarily small supported C2 change. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance firstJetNormed : NormedAddCommGroup (Base →L[ℝ] ProjectionTarget 3) := inferInstance +local instance firstJetSpace : NormedSpace ℝ (Base →L[ℝ] ProjectionTarget 3) := inferInstance +local instance secondJetNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) := inferInstance +local instance secondJetSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) := inferInstance + +theorem exists_local_quadratic_replacement {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) {ε ρ : ℝ} (hε : 0 < ε) (hρ : 0 < ρ) : + ∃ g : Base → ProjectionTarget 3, ContDiff ℝ ∞ g ∧ + g =ᶠ[𝓝 (0 : Base)] surfaceTaylorTwo f ∧ + (∀ x, ρ ≤ ‖x‖ → g x = f x) ∧ + tsupport (g-f) ⊆ closedBall (0 : Base) (ρ/2) ∧ + ∀ j ≤ 2, ∀ x, ‖iteratedFDeriv ℝ j (g-f) x‖ ≤ ε := by + obtain ⟨C,hC,hbound⟩ := cutoff_flat_jet_bound + let R := f-surfaceTaylorTwo f + have hR : ContDiff ℝ ∞ R := hf.sub (surfaceTaylorTwo_smooth f) + obtain ⟨h0,hD0,hD20⟩ := surfaceTaylorTwo_remainder_jets hf + let M := ε/(C+1) + have hM : 0 < M := by dsimp [M]; positivity + have hCM : C*M ≤ ε := by + dsimp [M] + rw [← mul_div_assoc] + apply (div_le_iff₀ (by positivity)).mpr + nlinarith + have hc : ContinuousAt (fderiv ℝ (fderiv ℝ R)) 0 := + ((hR.fderiv_right (m := ∞) (by simp)).continuous_fderiv (by simp)).continuousAt + have hevent : ∀ᶠ x in 𝓝 (0 : Base), ‖fderiv ℝ (fderiv ℝ R) x‖ < M := by + change fderiv ℝ (fderiv ℝ R) 0 = 0 at hD20 + have hn : ‖fderiv ℝ (fderiv ℝ R) 0‖ < M := by simpa only [hD20,norm_zero] using hM + exact hc.norm.eventually (isOpen_Iio.mem_nhds hn) + obtain ⟨η,hη,hηbound⟩ := Metric.eventually_nhds_iff.mp hevent + let r := min ρ (min 1 (η/2)) + have hr : 0 < r := lt_min hρ (lt_min zero_lt_one (half_pos hη)) + have hrρ : r ≤ ρ := min_le_left _ _ + have hr1 : r ≤ 1 := (min_le_right _ _).trans (min_le_left _ _) + have hrη : r < η := by + have h := (min_le_right ρ (min 1 (η/2))).trans (min_le_right 1 (η/2)) + linarith + have hsecond : ∀ x ∈ closedBall (0 : Base) r, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ M := by + intro x hx + exact (hηbound ((mem_closedBall.mp hx).trans_lt hrη)).le + let Q : Base → ProjectionTarget 3 := fun x => shrinkingJetCutoff r x • R x + have hQ : ContDiff ℝ ∞ Q := (shrinkingJetCutoff_smooth r).smul hR + have hqbound := hbound R hR h0 hD0 r M hr hr1 hM.le hsecond + let g := f-Q + refine ⟨g,hf.sub hQ,?_,?_,?_,?_⟩ + · filter_upwards [shrinkingJetCutoff_germ r] with x hx + change f x-shrinkingJetCutoff r x • (f x-surfaceTaylorTwo f x) = surfaceTaylorTwo f x + rw [hx] + change f x-(1 : ℝ) • (f x-surfaceTaylorTwo f x) = surfaceTaylorTwo f x + rw [one_smul] + abel + · intro x hx + have hnot : x ∉ tsupport (shrinkingJetCutoff r) := by + intro hs + have hm := shrinkingJetCutoff_tsupport hr hs + have hl : ‖x‖ ≤ r/2 := by simpa only [mem_closedBall,dist_zero_right] using hm + linarith + change f x-shrinkingJetCutoff r x • R x = f x + rw [image_eq_zero_of_notMem_tsupport hnot,zero_smul,sub_zero] + · have he : g-f = -Q := by + funext y + change (f y-Q y)-f y = -Q y + abel + rw [he,tsupport_neg] + exact ((tsupport_smul_subset_left _ _).trans (shrinkingJetCutoff_tsupport hr)).trans + (closedBall_subset_closedBall (div_le_div_of_nonneg_right hrρ (by norm_num))) + · intro j hj x + have he : g-f = -Q := by + funext y + change (f y-Q y)-f y = -Q y + abel + rw [he,iteratedFDeriv_neg_apply,norm_neg] + exact (hqbound j hj x).trans hCM + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSardTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSardTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..edf2d148ea60b296d261c863a8f8442603027295 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSardTransfer.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarNonflatCriticalValues +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A global critical-value theorem also applies to smooth maps on open +coordinate domains, by a compactly supported local extension. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] + [MeasurableSpace F] + +theorem local_critical_values_null (μ : Measure F) + (hglobal : ∀ f : E → F, ContDiff ℝ ∞ f → + μ (f '' {x | ¬ Function.Surjective (fderiv ℝ f x)}) = 0) + {f : E → F} {U : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) : + μ (f '' {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + apply null_image_of_locally_null + intro p hp + obtain ⟨W,hW,hpW,hWU,g,hg,hgf⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := p)) hU (singleton_subset_iff.mpr hp.1) hf + refine ⟨W,hW,hpW (mem_singleton p),measure_mono_null ?_ (hglobal g hg)⟩ + rintro y ⟨x,⟨hx,hxW⟩,rfl⟩ + have he : g =ᶠ[𝓝 x] f := Filter.eventuallyEq_iff_exists_mem.mpr ⟨W,hW.mem_nhds hxW,hgf⟩ + refine ⟨x,?_,hgf hxW⟩ + change ¬ Function.Surjective (fderiv ℝ g x) + rw [he.fderiv_eq (𝕜 := ℝ)] + exact hx.2 + +theorem scalar_surface_local_critical_values_null {f : JetPolynomial.Base → ℝ} + {U : Set JetPolynomial.Base} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + apply local_critical_values_null volume ?_ hU hf + intro g hg + apply measure_mono_null (image_mono ?_) (scalar_surface_critical_values_null hg) + intro x hx + by_contra hn + exact hx (surjective_of_nonzero_of_finrank_eq_one + (by simp : Module.finrank ℝ ℝ = 1) + (show (fderiv ℝ g x).toLinearMap ≠ 0 from fun h => hn (by ext v; exact congrArg (fun L => L v) h))) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSecondFormNaturality.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSecondFormNaturality.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4615ce3584eac42cc014406665992e3f9205781 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSecondFormNaturality.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartSecondFormBounds +import OAI.Geometry.SurfaceImmersion.Geometry.PureRadialGauss + +namespace OAI + +/-! Exact second-form identities through a local smooth coordinate change. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry + +lemma pure_radial_comp_on {F : RField 4} {φ : Base → Base} + {U V : Set Base} (hU : IsOpen U) (hV : IsOpen V) + (hF : ContDiffOn ℝ ∞ F V) (hφ : ContDiffOn ℝ ∞ φ U) + {p : Base} (hp : p ∈ U) (hφp : φ p ∈ V) + (hD : NormalFrame.gramDet (coordDeriv dx F (φ p)) (coordDeriv dy F (φ p)) ≠ 0) + (hdet : coordDet (fderiv ℝ φ p) ≠ 0) (n : RVec 4) (r : ℝ) + (hB : ∀ v w, realSecondForm F v w (φ p) = + (r⁻¹*(coordDeriv v F (φ p) ⬝ᵥ coordDeriv w F (φ p))) • n) + (v w : Base) : + realSecondForm (F ∘ φ) v w p = + (r⁻¹*(coordDeriv v (F ∘ φ) p ⬝ᵥ coordDeriv w (F ∘ φ) p)) • n := by + rw [realSecondForm_comp_on hU hV hF hφ hp hφp v w hD hdet,hB] + have hf := ((hF _ hφp).contDiffAt (hV.mem_nhds hφp)).differentiableAt (by simp) + have hg := ((hφ _ hp).contDiffAt (hU.mem_nhds hp)).differentiableAt (by simp) + simp only [coordDeriv,fderiv_comp p hf hg,ContinuousLinearMap.comp_apply] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSingleTensorRestoreBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSingleTensorRestoreBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..d996db416a730f1951d4577f79a7baf25c4e967a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalSingleTensorRestoreBound.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SingleTensorRestoreBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorLocalBounds + +namespace OAI + +/-! Bounds on an open neighborhood of the outer support suffice for the +single tensor patch in the primitive construction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +local instance localSingleTensorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance localSingleTensorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance localSingleTensorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance localSingleTensorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance localSingleTensorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance localSingleTensorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem single_tensor_restore_bound_on_outer (i : A.centers) + {U : Set JetPolynomial.Base} (hU : IsOpen U) + (houter : (chart (i : M)) '' tsupport (A.outer i) ⊆ U) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : SmallModes.Base → PhaseMean.Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → + WeightedEstimates.WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) s m C f → + A.TensorWeightedBound s m (D*C) + (A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (f (planeCoordinateIsometry y)))) := by + classical + let V : A.centers → Set JetPolynomial.Base := fun j => if j = i then U else univ + have hV : ∀ j, IsOpen (V j) := by + intro j + by_cases hji : j = i <;> simp [V,hji,hU] + have hout : ∀ j : A.centers, (chart (j : M)) '' tsupport (A.outer j) ⊆ V j := by + intro j + by_cases hji : j = i + · subst j + simpa only [V,ite_true] using houter + · simp only [V,ite_eq_right hji] + exact subset_univ _ + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound_on_outer V hV hout m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hb + rw [← A.tensorPlaneRestore_single i f] + apply hd _ (by intro j; split_ifs; exact hf; exact contDiff_const) s C hs hs1 hC + intro j + by_cases hji : j = i + · subst j + simpa only [V,ite_true] using hb + · simp only [ite_eq_right hji] + exact (weightedBound_zero _ s m).mono_const hC + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalTensorTarget.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalTensorTarget.lean new file mode 100644 index 0000000000000000000000000000000000000000..19a3c8370ced5862e4683963642425ac0cde6c10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalTensorTarget.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport +import OAI.Geometry.SurfaceImmersion.Correction.PrimitiveMeanStep + +namespace OAI + +/-! Extend the local primitive target around its reference tensor. The +cutoff keeps both the global trial ball and the slow derivative bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open WeightedEstimates PhaseMean + +def localTensorTarget (χ : SmallModes.Base → ℝ) + (reference target : SmallModes.Base → Tensor) : SmallModes.Base → Tensor := + fun x => reference x+χ x • (target x-reference x) + +lemma localTensorTarget_smooth {χ : SmallModes.Base → ℝ} + {reference target : SmallModes.Base → Tensor} + (hχ : ContDiff ℝ ∞ χ) (hr : ContDiff ℝ ∞ reference) (ht : ContDiff ℝ ∞ target) : + ContDiff ℝ ∞ (localTensorTarget χ reference target) := hr.add (hχ.smul (ht.sub hr)) + +lemma localTensorTarget_eq {χ : SmallModes.Base → ℝ} + {reference target : SmallModes.Base → Tensor} {x : SmallModes.Base} (hχ : χ x = 1) : + localTensorTarget χ reference target x = target x := by + simp only [localTensorTarget,hχ,one_smul,add_sub_cancel] + +lemma localTensorTarget_distance {U : Set SmallModes.Base} {χ : SmallModes.Base → ℝ} + {reference target : SmallModes.Base → Tensor} {r : ℝ} (hr : 0 ≤ r) + (hχ : ∀ x, |χ x| ≤ 1) (hsp : tsupport χ ⊆ U) + (ht : ∀ x ∈ U, ‖target x-reference x‖ ≤ r) (x : SmallModes.Base) : + ‖localTensorTarget χ reference target x-reference x‖ ≤ r := by + simp only [localTensorTarget,add_sub_cancel_left,norm_smul,Real.norm_eq_abs] + by_cases hz : χ x = 0 + · simpa only [hz,abs_zero,zero_mul] using hr + · have hx : x ∈ U := hsp (subset_tsupport χ (Function.mem_support.mpr hz)) + exact (mul_le_of_le_one_left (norm_nonneg _) (hχ x)).trans (ht x hx) + +lemma localTensorTarget_bound {U : Set SmallModes.Base} (hU : IsOpen U) + {χ : SmallModes.Base → ℝ} {reference target : SmallModes.Base → Tensor} + (hχ : ContDiff ℝ ∞ χ) (hr : ContDiff ℝ ∞ reference) (ht : ContDiff ℝ ∞ target) + (hsp : tsupport χ ⊆ U) {s A B C : ℝ} {m : ℕ} + (hs : 0 ≤ s) (hs1 : s ≤ 1) (hB : 0 ≤ B) (hC : 0 ≤ C) + (hχb : WeightedBound univ 1 m C χ) + (hrb : WeightedBound univ s m A reference) + (htb : WeightedBound U s m B (target-reference)) : + WeightedBound univ s m (A+2^m*C*B) (localTensorTarget χ reference target) := by + have hχU := ((hχb.shrink_scale hs hs1).restrict_open hU) + have hb := hχU.smul_real hU.uniqueDiffOn hs hC hB hχ.contDiffOn (ht.sub hr).contDiffOn htb + have hb' := hb.extend_support hU ((tsupport_smul_subset_left χ (target-reference)).trans hsp) + (by positivity) + exact hrb.add isOpen_univ.uniqueDiffOn hs hr.contDiffOn (hχ.smul (ht.sub hr)).contDiffOn hb' + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalUniformConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalUniformConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..1be8cd70f8f5cb363c77f878bf982c81bc71a7c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalUniformConvexity.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformAtlasConvexPhases +import OAI.Geometry.SurfaceImmersion.Atlas.PrescribedAtlasPatch +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds + +namespace OAI + +/-! Local phase convexity chosen from a fixed background norm, before the +finite circular atlas is selected. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem local_uniform_convexity (g : SmoothMetric M) {c C K : ℝ} + (hc : 0 < c) (hC : 0 ≤ C) (hK : 0 ≤ K) (p : M) : + ∃ (L : ℝ) (U : Set M), 0 < L ∧ IsOpen U ∧ p ∈ U ∧ + U ⊆ (coordinateChart p).source ∧ + ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 C h.inner → + (∀ q v, c*g.inner q v v ≤ h.inner q v v) → + ∀ q ∈ U, ∀ ell : Base, ‖ell‖ ≤ K → ∀ v : Base, + (L/2)*(v.1^2+v.2^2) ≤ coordinateMetricHessian (coordinateMetric h p) + (centeredConvexPhase ell L (coordinateChart p p)) (coordinateChart p q) v v := by + obtain ⟨B,i,hip,hpos,_hsupport,_hnon,houter⟩ := + exists_smoothingAtlas_prescribed_patch p (isCompact_singleton : IsCompact ({p} : Set M)) + (mem_singleton p) (chart p).open_source + (singleton_subset_iff.mpr (by rw [chart_source]; exact mem_chart_source Plane p)) + (Subset.refl _) + obtain ⟨D,hD,hchange⟩ := A.tensorWeightedBound_change_atlas B 1 + obtain ⟨L,r,hL,hr,hconvex⟩ := B.uniform_atlas_convex_phases g hc + (mul_nonneg hD hC) hK houter + let U : Set M := {q | 0 < B.weight i q} ∩ + ((coordinateChart p).source ∩ (coordinateChart p) ⁻¹' Metric.ball (coordinateChart p p) r) + have hU : IsOpen U := + (isOpen_lt continuous_const (B.weight_smooth i).continuous).inter + ((coordinateChart p).isOpen_inter_preimage Metric.isOpen_ball) + have hp : p ∈ U := by + refine ⟨hpos p (mem_singleton p),?_,?_⟩ + · rw [coordinateChart_source]; exact mem_chart_source Plane p + · exact Metric.mem_ball_self hr + refine ⟨L,U,hL,hU,hp,fun q hq => hq.2.1,?_⟩ + intro h hb hlower q hq ell hell v + have hb' := hchange h.inner 1 C zero_lt_one le_rfl hC h.contMDiff hb + have hqi : q ∈ tsupport (B.weight i) := subset_tsupport _ hq.1.ne' + have hsmall : ‖coordinateChart (i : M) q-coordinateChart (i : M) (i : M)‖ ≤ r := by + rw [hip] + have hs : coordinateChart p q ∈ Metric.ball (coordinateChart p p) r := hq.2.2 + exact (by simpa only [Metric.mem_ball,dist_eq_norm] using hs : + ‖coordinateChart p q-coordinateChart p p‖ < r).le + have hh := hconvex h hb' hlower i q hqi hsmall ell hell v + simpa only [hip] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedBundleBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedBundleBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..45681280b49dd9ee99be44e5126945aea135a978 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedBundleBounds.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedCompositionBounds + +namespace OAI + +/-! Weighted bounds for localized vector-bundle transition operators. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set WeightedEstimates +open JetPolynomial (Base) + +variable {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] + +private lemma restricted_weighted_bound {U O : Set Base} (hU : IsOpen U) + (hO : IsOpen O) (hUO : closure U ⊆ O) {f : Base → V} + (hf : ContDiffOn ℝ ∞ f O) {m : ℕ} {A : ℝ} + (hb : ∀ j ≤ m, ∀ x ∈ closure U, ‖iteratedFDerivWithin ℝ j f O x‖ ≤ A) + {s : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) : WeightedBound U s m A f := by + intro j hj x hx + have ht : ContDiffAt ℝ (j : ℕ∞ω) f x := + (hf.of_le (by simp)).contDiffAt (hO.mem_nhds (hUO (subset_closure hx))) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] + have h := hb j hj x (subset_closure hx) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn ht + (hUO (subset_closure hx))] at h + exact (mul_le_of_le_one_left (norm_nonneg _) (pow_le_one₀ hs.le hs1)).trans h + +/-- Smooth changes of fiber coordinates and base coordinates together cost +only a fixed constant in each weighted norm. -/ +theorem compact_localized_clm_composition_bound {O K : Set Base} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) (hχK : tsupport χ ⊆ K) + {L : Base → V →L[ℝ] W} (hL : ContDiffOn ℝ ∞ L O) + {T : Base → Base} (hT : ContDiffOn ℝ ∞ T O) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → + WeightedBound Set.univ s m C f → + WeightedBound Set.univ s m (D * C) (fun x => χ x • L x (f (T x))) := by + obtain ⟨U, hU, hKU, hUO, hUc⟩ := exists_open_between_and_isCompact_closure hK hO hKO + have hsub : U ⊆ O := subset_closure.trans hUO + obtain ⟨A, hA, hbA⟩ := compact_coefficient_bound hO.uniqueDiffOn hUc hUO hχ.contDiffOn m + obtain ⟨B, hB, hbB⟩ := compact_coefficient_bound hO.uniqueDiffOn hUc hUO hL m + obtain ⟨E, hE, hbE⟩ := compact_coefficient_bound hO.uniqueDiffOn hUc hUO hT m + refine ⟨2 ^ m * A * (2 ^ m * B * ((m.factorial : ℝ) * E ^ m)), by positivity, ?_⟩ + intro f s C hs hs1 hC hf hb + have hTj : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ U, + ‖iteratedFDerivWithin ℝ j T U x‖ ≤ E := by + intro j _ hj x hx + have ht : ContDiffAt ℝ (j : ℕ∞ω) T x := + (hT.of_le (by simp)).contDiffAt (hO.mem_nhds (hsub hx)) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] + have h := hbE j hj x (subset_closure hx) + rwa [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn ht (hsub hx)] at h + have hχb := restricted_weighted_bound hU hO hUO hχ.contDiffOn hbA hs hs1 + have hLb := restricted_weighted_bound hU hO hUO hL hbB hs hs1 + have hc := hb.comp_coordinates hU.uniqueDiffOn uniqueDiffOn_univ hs hs1 hE hC + (hT.mono hsub) hf.contDiffOn (fun _ _ => mem_univ _) hTj + have hcomp : ContDiffOn ℝ ∞ (fun x => f (T x)) U := + hf.contDiffOn.comp (hT.mono hsub) (fun _ _ => mem_univ _) + have hlc := hLb.clm_apply hU.uniqueDiffOn hs.le (zero_le_one.trans hB) + (by positivity) (hL.mono hsub) hcomp hc + have hlcs : ContDiffOn ℝ ∞ (fun x => L x (f (T x))) U := + (hL.mono hsub).clm_apply hcomp + have hp := hχb.smul_real hU.uniqueDiffOn hs.le (zero_le_one.trans hA) + (by positivity) hχ.contDiffOn hlcs hlc + have hlocal := hχ.contDiffOn.smul hlcs + intro j hj x _ + rw [iteratedFDerivWithin_univ] + by_cases hx : x ∈ U + · have ht : ContDiffAt ℝ (j : ℕ∞ω) (fun x => χ x • L x (f (T x))) x := + (hlocal.of_le (by simp)).contDiffAt (hU.mem_nhds hx) + have h := hp j hj x hx + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] at h + convert h using 1 + ring + · have hxχ : x ∉ tsupport χ := fun h => hx (hKU (hχK h)) + have heq : (fun y => χ y • L y (f (T y))) =ᶠ[𝓝 x] (fun _ => (0 : W)) := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hxχ] with y hy + simp only [Pi.zero_apply] at hy + rw [hy, zero_smul] + rw [(heq.iteratedFDeriv ℝ j).self_of_nhds] + simp only [iteratedFDeriv_fun_zero, Pi.zero_apply, norm_zero, mul_zero] + positivity + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedCompositionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedCompositionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfba8e30c23f0574cc0bafc1095817c6f0cf9e55 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedCompositionBounds.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Fixed smooth cutoff and chart transition operators preserve weighted +norms with constants independent of the input and its scale. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set WeightedEstimates +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- A compactly supported coordinate change costs a fixed constant in each +weighted derivative norm; it introduces no additional scale loss. -/ +theorem compact_localized_composition_bound {O K : Set Base} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) (hχK : tsupport χ ⊆ K) + {T : Base → Base} (hT : ContDiffOn ℝ ∞ T O) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → + WeightedBound Set.univ s m C f → + WeightedBound Set.univ s m (D * C) (fun x => χ x • f (T x)) := by + obtain ⟨U, hU, hKU, hUO, hUc⟩ := exists_open_between_and_isCompact_closure hK hO hKO + have hsub : U ⊆ O := subset_closure.trans hUO + obtain ⟨A, hA, hbA⟩ := compact_coefficient_bound hO.uniqueDiffOn hUc hUO hχ.contDiffOn m + obtain ⟨B, hB, hbB⟩ := compact_coefficient_bound hO.uniqueDiffOn hUc hUO hT m + refine ⟨2 ^ m * A * ((m.factorial : ℝ) * B ^ m), by positivity, ?_⟩ + intro f s C hs hs1 hC hf hb + have hTj : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ U, + ‖iteratedFDerivWithin ℝ j T U x‖ ≤ B := by + intro j _ hj x hx + have ht : ContDiffAt ℝ (j : ℕ∞ω) T x := + (hT.of_le (by simp)).contDiffAt (hO.mem_nhds (hsub hx)) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] + have h := hbB j hj x (subset_closure hx) + rwa [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn ht (hsub hx)] at h + have hχb : WeightedBound U s m A χ := by + intro j hj x hx + have ht : ContDiffAt ℝ (j : ℕ∞ω) χ x := (hχ.of_le (by simp)).contDiffAt + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] + have h := hbA j hj x (subset_closure hx) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn ht (hsub hx)] at h + exact (mul_le_of_le_one_left (norm_nonneg _) (pow_le_one₀ hs.le hs1)).trans h + have hc := hb.comp_coordinates hU.uniqueDiffOn uniqueDiffOn_univ hs hs1 hB hC + (hT.mono hsub) hf.contDiffOn (fun _ _ => mem_univ _) hTj + have hcomp : ContDiffOn ℝ ∞ (fun x => f (T x)) U := + hf.contDiffOn.comp (hT.mono hsub) (fun _ _ => mem_univ _) + have hp := hχb.smul_real hU.uniqueDiffOn hs.le (zero_le_one.trans hA) + (by positivity) hχ.contDiffOn hcomp hc + have hlocal : ContDiffOn ℝ ∞ (fun x => χ x • f (T x)) U := hχ.contDiffOn.smul hcomp + intro j hj x _ + rw [iteratedFDerivWithin_univ] + by_cases hx : x ∈ U + · have ht : ContDiffAt ℝ (j : ℕ∞ω) (fun x => χ x • f (T x)) x := + (hlocal.of_le (by simp)).contDiffAt (hU.mem_nhds hx) + have h := hp j hj x hx + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn ht hx] at h + convert h using 1 + ring + · have hxK : x ∉ K := fun hk => hx (hKU hk) + have hxχ : x ∉ tsupport χ := fun hx' => hxK (hχK hx') + have heq : (fun y => χ y • f (T y)) =ᶠ[𝓝 x] (fun _ => (0 : V)) := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hxχ] with y hy + simp only [Pi.zero_apply] at hy + rw [hy, zero_smul] + have hd := (heq.iteratedFDeriv ℝ j).self_of_nhds + rw [hd] + simp only [iteratedFDeriv_fun_zero, Pi.zero_apply, norm_zero, mul_zero] + positivity + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedMetricDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedMetricDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea16613026379e01c93706daa16a99c78ea647e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedMetricDefect.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.JetMetricCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Correction.CutoffTensorPolynomial +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedTensorPullbackBound + +namespace OAI + +/-! Exact localized metric defect in a nonlinear chart. The cutoff is +one on the actual map increment, so no boundary metric term is discarded. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open RealModes + +lemma coordinateMetric_eq_of_sub_notMem_tsupport {H W : Base → Space} {x : Base} + (hx : x ∉ tsupport (W-H)) : + realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) = + realMetricTensor (H ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) := by + have he : W =ᶠ[𝓝 x] H := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy + exact sub_eq_zero.mp hy + have hh : W ∘ planeCoordinateIsometry.symm =ᶠ[𝓝 (planeCoordinateIsometry x)] + H ∘ planeCoordinateIsometry.symm := + he.comp_tendsto (by simpa only [LinearIsometryEquiv.symm_apply_apply] using + (planeCoordinateIsometry.symm.continuous.tendsto (planeCoordinateIsometry x))) + ext k + simp only [realMetricTensor_apply,realMetric,SmallModes.coordDeriv,hh.fderiv_eq] + +namespace Perturbation + +theorem localized_metric_defect {n : ℕ} (P : Fin 3 → Fin n → Expression) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) + (hi : ContDiff ℝ ∞ e.symm) {χ : Base → ℝ} + (hχ : tsupport χ ⊆ e.source) + {G H V W : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hV : ContDiff ℝ ∞ V) + (hbase : ∀ x ∈ e.source, H x = G (e x)) + (hvalue : ∀ x ∈ e.source, W x = V (e x)) + (hone : ∀ x ∈ tsupport (W-H), χ x = 1) + (B : Base → PhaseMean.Tensor) (z : ℝ) (x : Base) : + realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + realMetricTensor (H ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + coordinatePolynomialValue + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback P e e.symm)) + z H 0 (planeCoordinateIsometry x) - localizedTensorPullback e χ B x = + localizedTensorPullback e χ + (fun y => realMetricTensor (V ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry y) - + coordinateMetricMap P z G (planeCoordinateIsometry y) - B y) x := by + rw [cutoffTensorPolynomial_eval] + have hfix : χ x • + (realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + realMetricTensor (H ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x)) = + realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + realMetricTensor (H ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) := by + by_cases hx : x ∈ tsupport (W-H) + · rw [hone x hx,one_smul] + · rw [coordinateMetric_eq_of_sub_notMem_tsupport hx,sub_self,smul_zero] + by_cases hzero : χ x = 0 + · rw [hzero,zero_smul] at hfix + simp only [localizedTensorPullback,hzero,zero_smul,sub_zero] + exact hfix.symm + have hx : x ∈ e.source := hχ (subset_tsupport χ hzero) + have hTS : ∀ y ∈ e.source, e ∘ e.symm =ᶠ[𝓝 (e y)] id := by + intro y hy + filter_upwards [e.open_target.mem_nhds (e.map_source hy)] with q hq + exact e.right_inv hq + have hr := coordinate_remainder_pullback P he hi e.open_source + (fun _ hx => e.left_inv hx) hTS hG hH hV hbase hvalue B z hx + have hp := congrArg (fun a : PhaseMean.Tensor => χ x • a) hr + simp only [coordinateMetricMap,Pi.add_apply,smul_sub,smul_add] at hp + dsimp only [localizedTensorPullback] + rw [← hfix] + simpa only [smul_sub,sub_add_eq_sub_sub,coordinateMetricMap,Pi.add_apply] using hp + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedTensorPullbackBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedTensorPullbackBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..01f690103acb676253fecb00e3190e14283d0482 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LocalizedTensorPullbackBound.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorCoordinatePullbackBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedCompositionBounds + +namespace OAI + +/-! The supported tensor pullback has a fixed weighted norm on each finite order. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +def localizedTensorPullback (T : Base → Base) (χ : Base → ℝ) + (f : Base → PhaseMean.Tensor) (x : Base) : PhaseMean.Tensor := + χ x • tensorCoordinatePullbackValue T x (f (T x)) + +lemma localizedTensorPullback_smooth {T : Base → Base} {χ : Base → ℝ} + {f : Base → PhaseMean.Tensor} (hT : ContDiff ℝ ∞ T) (hχ : ContDiff ℝ ∞ χ) + (hf : ContDiff ℝ ∞ f) : ContDiff ℝ ∞ (localizedTensorPullback T χ f) := + hχ.smul ((tensorCoordinatePullbackValue_smooth hT).clm_apply (hf.comp hT)) + +theorem localized_tensor_pullback_bound {T : Base → Base} (hT : ContDiff ℝ ∞ T) + {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) (hc : HasCompactSupport χ) + {O W : Set Base} (hO : IsOpen O) (hW : IsOpen W) + (hχO : tsupport χ ⊆ O) (hTW : MapsTo T O W) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → PhaseMean.Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → + WeightedBound W s m C f → + WeightedBound univ s m (D*C) (localizedTensorPullback T χ f) := by + obtain ⟨V,hV,hχV,hVO,hVc⟩ := exists_open_between_and_isCompact_closure hc hO hχO + have hsub : V ⊆ O := subset_closure.trans hVO + obtain ⟨D,hD,hd⟩ := fixed_tensor_coordinate_bound hT hV hVc hW (hTW.mono_left hsub) m + obtain ⟨A,hA,ha⟩ := compact_local_weighted_bound hV isOpen_univ hVc + subset_closure (subset_univ _) hχ.contDiffOn m + refine ⟨2^m*A*D,by positivity,?_⟩ + intro f s C hs hs1 hC hf hb + have hp := (ha s hs.le hs1).smul_real hV.uniqueDiffOn hs.le (zero_le_one.trans hA) + (mul_nonneg hD hC) hχ.contDiffOn + (((tensorCoordinatePullbackValue_smooth hT).clm_apply (hf.comp hT)).contDiffOn) + (hd f s C hs hs1 hC hf.contDiffOn hb) + have hg := localizedTensorPullback_smooth hT hχ hf + intro j hj x _ + rw [iteratedFDerivWithin_univ] + by_cases hx : x ∈ V + · have ht : ContDiffAt ℝ (j : ℕ∞ω) (localizedTensorPullback T χ f) x := + (hg.of_le (by simp)).contDiffAt + have hh := hp j hj x hx + change s^j * ‖iteratedFDerivWithin ℝ j (localizedTensorPullback T χ f) V x‖ ≤ _ at hh + rw [iteratedFDerivWithin_eq_iteratedFDeriv hV.uniqueDiffOn ht hx] at hh + convert hh using 1 + first | rfl | ring + · have hz : x ∉ tsupport χ := fun hx' => hx (hχV hx') + have heq : localizedTensorPullback T χ f =ᶠ[𝓝 x] (fun _ => 0) := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hz] with y hy + simp only [Pi.zero_apply] at hy + simp only [localizedTensorPullback,hy,zero_smul] + rw [(heq.iteratedFDeriv ℝ j).self_of_nhds] + simp only [iteratedFDeriv_fun_zero,Pi.zero_apply,norm_zero,mul_zero] + positivity + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalNormalChoice.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalNormalChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9c493849dace49705f8518b6a6e827dc179600b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalNormalChoice.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingNormalPath + +namespace OAI + +/-! Away from turns, the two pure normal directions have positive pairing and +lie in the same open half-plane. This supplies the crossing normal path. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma mixed_difference_norm_bound {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) + {S D N L k t u sHi d T : ℝ} (hS : 0 < S) (hShi : S ≤ sHi) + (hD : |D| ≤ d) (ht : |t| ≤ T) (hu : |u| ≤ T) : + ‖frameVector n m (slopeMixed S D N L k t u)- + frameVector n m (slopePure S D N L k t)‖ ≤ 2*T*(d+sHi*T+|N|) := by + rw [← frameVector_sub,mixed_sub_left hS.ne',frameVector_smul,norm_smul,Real.norm_eq_abs] + exact (mul_le_mul_of_nonneg_left (frameVector_norm_le hn hm _) (abs_nonneg _)).trans + (crossing_slope_bound hS.le hShi hD ht hu) + +lemma slopeMixed_symm (S D N L k t u : ℝ) : + slopeMixed S D N L k t u = slopeMixed S D N L k u t := by + ext <;> dsimp [slopeMixed] <;> ring + +lemma pure_difference_norm_bound {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) + {S D N L k t u sHi d T : ℝ} (hS : 0 < S) (hShi : S ≤ sHi) + (hD : |D| ≤ d) (ht : |t| ≤ T) (hu : |u| ≤ T) : + ‖frameVector n m (slopePure S D N L k u)- + frameVector n m (slopePure S D N L k t)‖ ≤ 4*T*(d+sHi*T+|N|) := by + let P := frameVector n m (slopePure S D N L k t) + let Q := frameVector n m (slopePure S D N L k u) + let Z := frameVector n m (slopeMixed S D N L k t u) + have hP : ‖Z-P‖ ≤ 2*T*(d+sHi*T+|N|) := mixed_difference_norm_bound hn hm hS hShi hD ht hu + have hQ : ‖Z-Q‖ ≤ 2*T*(d+sHi*T+|N|) := by + dsimp [Z,Q] + rw [slopeMixed_symm] + exact mixed_difference_norm_bound hn hm hS hShi hD hu ht + have hsplit : Q-P = (Q-Z)+(Z-P) := by abel + have hh := norm_add_le (Q-Z) (Z-P) + rw [← hsplit,norm_sub_rev Q Z] at hh + change ‖Q-P‖ ≤ _ + linarith + +lemma inner_pos_of_difference_lt_norm {P Q : E} (h : ‖Q-P‖ < ‖P‖) : + 0 < inner ℝ P Q := by + have hP : P ≠ 0 := by intro hz; rw [hz,norm_zero] at h; exact (not_lt_of_ge (norm_nonneg _) h) + have hb := mixed_projection_lower (Z := Q) hP + have hp : 0 < inner ℝ Q (‖P‖⁻¹ • P) := by linarith + rw [real_inner_smul_right] at hp + have hi : 0 < ‖P‖⁻¹ := inv_pos.mpr (norm_pos_iff.mpr hP) + rw [real_inner_comm] + nlinarith + +lemma double_product_bound {N t B T : ℝ} (hB : 0 ≤ B) (hN : |N| ≤ B) (ht : |t| ≤ T) : + |2*N*t| ≤ 2*B*T := by + simp only [abs_mul,show |(2 : ℝ)| = 2 by norm_num] + exact mul_le_mul (mul_le_mul_of_nonneg_left hN (by norm_num)) ht + (abs_nonneg _) (by positivity) + +theorem longitudinal_normal_choice (sHi d B T : ℝ) (hsHi : 0 ≤ sHi) + (hd : 0 ≤ d) (hB : 0 ≤ B) (hT : 0 ≤ T) : + ∃ J : ℝ, 0 < J ∧ ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, 0 < S → S ≤ sHi → |D| ≤ d → |N| ≤ B → + |t| ≤ T → |u| ≤ T → J < |L| → + let P := frameVector n m (slopePure S D N L k t) + let Q := frameVector n m (slopePure S D N L k u) + 0 < inner ℝ P Q ∧ ∃ w : E, inner ℝ n w = 0 ∧ 0 < inner ℝ P w ∧ 0 < inner ℝ Q w := by + let J := 2*B*T+4*T*(d+sHi*T+B)+1 + have hJ : 0 < J := by dsimp [J]; positivity + refine ⟨J,hJ,?_⟩ + intro n m hn hm hmn S D N L k t u hS hShi hD hN ht hu hL + dsimp only + let P := frameVector n m (slopePure S D N L k t) + let Q := frameVector n m (slopePure S D N L k u) + have hpn := longitudinal_norm_lower (S := S) (D := D) (N := N) (L := L) (k := k) hm hmn hB hN ht + have hdiff := pure_difference_norm_bound (N := N) (L := L) (k := k) hn hm hS hShi hD ht hu + have hdiff' : ‖Q-P‖ ≤ 4*T*(d+sHi*T+B) := hdiff.trans + (mul_le_mul_of_nonneg_left (add_le_add le_rfl hN) (by positivity)) + have hnear : ‖Q-P‖ < ‖P‖ := by dsimp [J] at hL; linarith + refine ⟨inner_pos_of_difference_lt_norm hnear,?_⟩ + have htm : inner ℝ P m = L+2*N*t := frameVector_inner_second hm hmn _ + have hum : inner ℝ Q m = L+2*N*u := frameVector_inner_second hm hmn _ + have htb := abs_le.mp (double_product_bound hB hN ht) + have hub := abs_le.mp (double_product_bound hB hN hu) + have hbig : 2*B*T < |L| := by + dsimp [J] at hL + have hh : 0 ≤ 4*T*(d+sHi*T+B) := by positivity + linarith + have hnm : inner ℝ n m = 0 := by rw [real_inner_comm]; exact hmn + by_cases hL0 : 0 ≤ L + · refine ⟨m,hnm,?_,?_⟩ + · change 0 < inner ℝ P m + change inner ℝ P m = L+2*N*t at htm + rw [abs_of_nonneg hL0] at hbig + linarith + · change 0 < inner ℝ Q m + change inner ℝ Q m = L+2*N*u at hum + rw [abs_of_nonneg hL0] at hbig + linarith + · refine ⟨-m,by simp [hnm],?_,?_⟩ + · change 0 < inner ℝ P (-m) + change inner ℝ P m = L+2*N*t at htm + rw [inner_neg_right] + rw [abs_of_neg (lt_of_not_ge hL0)] at hbig + linarith + · change 0 < inner ℝ Q (-m) + change inner ℝ Q m = L+2*N*u at hum + rw [inner_neg_right] + rw [abs_of_neg (lt_of_not_ge hL0)] at hbig + linarith + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalSurfaceTwist.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalSurfaceTwist.lean new file mode 100644 index 0000000000000000000000000000000000000000..8400c4b9b2f238cdc7d4b5b0504a16f2fbac63aa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LongitudinalSurfaceTwist.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualRuledTwist +import OAI.Geometry.SurfaceImmersion.Primitive.LocalizedTwistAngle +import OAI.Geometry.SurfaceImmersion.Geometry.TwistedAxisDerivative + +namespace OAI + +/-! Every smooth compact longitudinal angle is realized by an actual + supported surface twist, with the same singular set and exact axis germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} +variable {S : CrosscapCoordinateStrip A} {c d : ℝ} + +theorem ActualRuledRectangle.longitudinal_twist (R : ActualRuledRectangle S c d) + (hac : A.arc.start < c) (hcd : c ≤ d) (hdb : d < A.arc.finish) : + ∃ T : Base × ℝ → Fin 3 → ℝ, ContDiff ℝ ∞ T ∧ + ∀ α : ℝ → ℝ, ContDiff ℝ ∞ α → HasCompactSupport α → tsupport α ⊆ Ioo c d → + ∃ (g : M → ProjectionTarget 3) (K : Set M), + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ IsCompact K ∧ K ⊆ S.chart.source ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + (∀ x ∉ K, g =ᶠ[𝓝 x] R.replacement) ∧ + ∀ t ∈ Ioo c d, g =ᶠ[𝓝 (A.arc.curve t)] + (twistedTubeSurface T (fun x => α (x 1))) ∘ S.chart := by + obtain ⟨T,ε,hT,hε,htwist⟩ := R.twist_family hac hcd hdb + refine ⟨T,hT,?_⟩ + intro α hα hc hs + let θ := localizedTwistAngle (ε/2) α + have hθ : ContDiff ℝ ∞ θ := localizedTwistAngle_smooth _ hα + have hθc : HasCompactSupport θ := localizedTwistAngle_compact (half_pos hε) hc + have hθs : tsupport θ ⊆ {x | |x 0| < ε ∧ x 1 ∈ Ioo c d} := by + intro x hx + obtain ⟨h0,h1⟩ := localizedTwistAngle_support (half_pos hε) α hx + exact ⟨h0.trans_lt (half_lt_self hε),hs h1⟩ + obtain ⟨g,K,hg,hK,hKS,hreg,hout,hin⟩ := htwist θ hθ hθc hθs + refine ⟨g,K,hg,hK,hKS,hreg,hout,?_⟩ + intro t ht + have htab : t ∈ Icc A.arc.start A.arc.finish := + ⟨hac.le.trans ht.1.le,ht.2.le.trans hdb.le⟩ + have hsource := (S.axis t htab).1 + have hcoord : S.chart (A.arc.curve t) = crosscapAxis t := + (S.axis t htab).2.trans (crosscapAxis_apply t).symm + have h0 : |S.chart (A.arc.curve t) 0| < ε := by + simpa [hcoord,crosscapAxis_apply] using hε + have h1 : S.chart (A.arc.curve t) 1 ∈ Ioo c d := by + simpa [hcoord,crosscapAxis_apply] using ht + have he : twistedTubeSurface T θ =ᶠ[𝓝 (crosscapAxis t)] + twistedTubeSurface T (fun x => α (x 1)) := by + filter_upwards [localizedTwistAngle_germ (ε/2) t α] with x hx + simp only [twistedTubeSurface,Function.comp_apply,twistedRuledCoordinates] + change θ x = α (x 1) at hx + rw [hx] + rw [← hcoord] at he + exact (hin _ hsource h0 h1).trans (coordinate_replacement_germ S.chart hsource he) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetChainRule.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetChainRule.lean new file mode 100644 index 0000000000000000000000000000000000000000..af25ccf8f652e4c88ee85fa6b944de702102e449 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetChainRule.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.DirectionalJetBounds + +namespace OAI + +/-! The chain rule for coefficients depending on position and the actual +second jet of a map from a surface chart into four-space. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +abbrev Base := Fin 2 → ℝ +abbrev Space := Fin 4 → ℝ +abbrev LowIndex := Fin 2 ⊕ (Fin 7 × Fin 4) +abbrev LowJet := LowIndex → ℝ + +def coordinateVector (v : Fin 2) : Base := Pi.single v 1 + +def lowWord : Fin 7 → List (Fin 2) := + ![[], [0], [1], [0, 0], [0, 1], [1, 0], [1, 1]] + +/-- Actual ordered coordinate derivatives; no symmetry convention is needed. -/ +def jet (G : Base → Space) (w : List (Fin 2)) (a : Fin 4) (p : Base) : ℝ := + iteratedDirectional (w.map coordinateVector) (fun q => G q a) p + +def lowJet (G : Base → Space) (p : Base) : LowJet + | Sum.inl i => p i + | Sum.inr (w, a) => jet G (lowWord w) a p + +def lowBasis (i : LowIndex) : LowJet := Pi.single i 1 + +def lowDerivative (G : Base → Space) (v : Fin 2) (p : Base) : LowJet + | Sum.inl i => coordinateVector v i + | Sum.inr (w, a) => jet G (v :: lowWord w) a p + +lemma jet_smooth {G : Base → Space} (hG : ContDiff ℝ ∞ G) (w : List (Fin 2)) (a : Fin 4) : + ContDiff ℝ ∞ (jet G w a) := by + have h := contDiffOn_iteratedDirectional isOpen_univ (contDiff_pi.mp hG a).contDiffOn + (w.map coordinateVector) + exact contDiffOn_univ.mp h + +lemma lowJet_smooth {G : Base → Space} (hG : ContDiff ℝ ∞ G) : ContDiff ℝ ∞ (lowJet G) := by + apply contDiff_pi.mpr + intro i + cases i with + | inl i => exact (ContinuousLinearMap.proj i : Base →L[ℝ] ℝ).contDiff + | inr i => exact jet_smooth hG (lowWord i.1) i.2 + +lemma jet_cons (G : Base → Space) (v : Fin 2) (w : List (Fin 2)) (a : Fin 4) (p : Base) : + jet G (v :: w) a p = fderiv ℝ (jet G w a) p (coordinateVector v) := rfl + +lemma lowJet_coordinate_derivative (G : Base → Space) (v : Fin 2) (i : LowIndex) (p : Base) : + fderiv ℝ (fun q => lowJet G q i) p (coordinateVector v) = lowDerivative G v p i := by + cases i with + | inl i => + change fderiv ℝ (ContinuousLinearMap.proj i : Base →L[ℝ] ℝ) p (coordinateVector v) = _ + rw [(ContinuousLinearMap.proj i : Base →L[ℝ] ℝ).fderiv] + rfl + | inr i => rfl + +lemma lowJet_derivative {G : Base → Space} (hG : ContDiff ℝ ∞ G) (v : Fin 2) (p : Base) : + fderiv ℝ (lowJet G) p (coordinateVector v) = lowDerivative G v p := by + ext i + have h := congrArg (fun L : Base →L[ℝ] ℝ => L (coordinateVector v)) + (fderiv_apply ((lowJet_smooth hG).differentiable (by simp) p) i) + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.proj_apply, + lowJet_coordinate_derivative] using h.symm + +lemma lowBasis_expansion (J : LowJet) : J = ∑ i : LowIndex, J i • lowBasis i := by + ext i + simp [lowBasis, Pi.single_apply] + +/-- Differentiating a low-jet coefficient introduces only the next coordinate +jet, linearly, with new smooth low-jet coefficients. -/ +theorem coefficient_chain_rule {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {G : Base → Space} (hG : ContDiff ℝ ∞ G) {c : LowJet → E} + (v : Fin 2) (p : Base) (hc : DifferentiableAt ℝ c (lowJet G p)) : + fderiv ℝ (fun q => c (lowJet G q)) p (coordinateVector v) = + ∑ i : LowIndex, (lowDerivative G v p i) • fderiv ℝ c (lowJet G p) (lowBasis i) := by + have hQ := (lowJet_smooth hG).differentiable (by simp) p + change fderiv ℝ (c ∘ lowJet G) p (coordinateVector v) = _ + rw [fderiv_comp p hc hQ, ContinuousLinearMap.comp_apply, lowJet_derivative hG] + conv_lhs => rw [lowBasis_expansion (lowDerivative G v p), map_sum] + simp only [map_smul] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetCompactRange.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetCompactRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3545a54f377dcf8aa54d885e84d954158d0c58b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetCompactRange.lean @@ -0,0 +1,27 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetPrefixBounds + +namespace OAI + +/-! One compact positional-jet range for all maps in a bounded C2 family. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +theorem bounded_lowJet_range {U : Set Base} (hU : IsOpen U) + (K : Compacts Base) (hUK : U ⊆ K) {C : ℝ} (hC : 0 ≤ C) : + ∃ Q : Set LowJet, IsCompact Q ∧ ∀ (G : Base → Space), ContDiff ℝ ∞ G → + WeightedBound U 1 2 C G → MapsTo (lowJet G) U Q := by + obtain ⟨D,_,hd⟩ := bounded_lowJet_prefix hU K hUK 0 + refine ⟨Metric.closedBall 0 (D+C),isCompact_closedBall _ _,?_⟩ + intro G hG hb p hp + have hj := hd G hG 1 C zero_lt_one le_rfl hC (fun j hj => by + simpa only [one_pow,div_one] using hb.mono_order (by omega : j ≤ 2)) + simpa only [Metric.mem_closedBall,dist_zero_right] using hj.norm_le hp + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetPrefixBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetPrefixBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..484f671b6136b757ecfc5a21360b09e4de4496a3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetPrefixBounds.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds + +namespace OAI + +/-! Bounds on the actual positional two-jet on a fixed bounded domain. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.WeightedEstimates +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem directional_of_prefix {U : Set E} (hU : IsOpen U) + {f : E → V} (hf : ContDiff ℝ ∞ f) {s C : ℝ} {m : ℕ} + (hs : 0 < s) (hC : 0 ≤ C) + (hb : ∀ j ≤ m+1, WeightedBound U 1 j (C/s^(j-1)) f) + (v : E) (hv : ‖v‖ ≤ 1) : + WeightedBound U s m C (fun x => fderiv ℝ f x v) := by + intro j hj x hx + have hh := ((hb (j+1) (by omega)).directional hU zero_lt_one hf.contDiffOn v) + j le_rfl x hx + simp only [one_pow,one_mul,div_one,Nat.add_sub_cancel] at hh + calc + _ ≤ s^j*(‖v‖*(C/s^j)) := mul_le_mul_of_nonneg_left hh (pow_nonneg hs.le _) + _ = ‖v‖*C := by field_simp + _ ≤ C := mul_le_of_le_one_left hC hv + +end ClosedSurfaceR4.WeightedEstimates + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +theorem jet_lowWord_bound {U : Set Base} (hU : IsOpen U) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) {s C : ℝ} {m : ℕ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hb : ∀ j ≤ m+2, WeightedBound U 1 j (C/s^(j-2)) G) + (w : Fin 7) (a : Fin 4) : + WeightedBound U s m C (fun p => jet G (lowWord w) a p) := by + let f : Base → ℝ := fun p => G p a + have hf : ContDiff ℝ ∞ f := contDiff_pi.mp hG a + have hp (j : ℕ) (hj : j ≤ m+2) : WeightedBound U 1 j (C/s^(j-2)) f := + (hb j hj).component hU.uniqueDiffOn zero_le_one + (div_nonneg hC (pow_nonneg hs.le _)) hG.contDiffOn a + have hzero : WeightedBound U s m C f := by + intro j hj x hx + have hh := hp j (by omega) j le_rfl x hx + simp only [one_pow,one_mul] at hh + calc + _ ≤ s^j*(C/s^(j-2)) := mul_le_mul_of_nonneg_left hh (pow_nonneg hs.le _) + _ ≤ s^j*(C/s^j) := mul_le_mul_of_nonneg_left + (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (Nat.sub_le _ _))) (pow_nonneg hs.le _) + _ = C := by field_simp + have hunit (v : Fin 2) : ‖coordinateVector v‖ = 1 := by + simp only [coordinateVector,Pi.norm_single,norm_one] + have hfirst (v : Fin 2) (j : ℕ) (hj : j ≤ m+1) : + WeightedBound U 1 j (C/s^(j-1)) (fun x => fderiv ℝ f x (coordinateVector v)) := by + have hh := (hp (j+1) (by omega)).directional hU zero_lt_one hf.contDiffOn (coordinateVector v) + have he : j+1-2 = j-1 := by omega + simpa only [hunit,one_mul,div_one,he] using hh + have hone (v : Fin 2) : + WeightedBound U s m C (fun x => fderiv ℝ f x (coordinateVector v)) := by + apply directional_of_prefix hU hf hs hC _ (coordinateVector v) (hunit v).le + intro j hj + apply (hp j (by omega)).mono_const + exact div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (by omega)) + have htwo (v v' : Fin 2) : WeightedBound U s m C + (fun x => fderiv ℝ (fun y => fderiv ℝ f y (coordinateVector v')) x (coordinateVector v)) := + directional_of_prefix hU + ((hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const) + hs hC (hfirst v') (coordinateVector v) (hunit v).le + fin_cases w + · exact hzero + · exact hone 0 + · exact hone 1 + · exact htwo 0 0 + · exact htwo 0 1 + · exact htwo 1 0 + · exact htwo 1 1 + +theorem bounded_lowJet_prefix {U : Set Base} (hU : IsOpen U) + (K : Compacts Base) (hUK : U ⊆ K) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (G : Base → Space), ContDiff ℝ ∞ G → ∀ s C : ℝ, + 0 < s → s ≤ 1 → 0 ≤ C → + (∀ j ≤ m+2, WeightedBound U 1 j (C/s^(j-2)) G) → + WeightedBound U s m (D+C) (lowJet G) := by + obtain ⟨D,hD,hd⟩ := compact_local_weighted_bound hU isOpen_univ K.isCompact hUK + (subset_univ _) (contDiff_id : ContDiff ℝ ∞ (id : Base → Base)).contDiffOn m + refine ⟨D,hD,?_⟩ + intro G hG s C hs hs1 hC hb + apply WeightedBound.pi hU.uniqueDiffOn hs (by linarith) + · intro i + exact (contDiff_pi.mp (lowJet_smooth hG) i).contDiffOn + · intro i + cases i with + | inl i => + exact ((hd s hs.le hs1).component hU.uniqueDiffOn hs.le + (zero_le_one.trans hD) contDiff_id.contDiffOn i).mono_const (by linarith) + | inr i => + exact (jet_lowWord_bound hU hG hs hs1 hC hb i.1 i.2).mono_const (by linarith) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegment.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegment.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7aad9cdd73bfcd7c382f235d257f99a5ef5a5b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegment.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Compact low-jet margins and uniform bounds along the actual Taylor +segment, obtained from the second derivatives of the displacement. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma lowJet_segment_bound {U : Set Base} (hU : IsOpen U) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {s B C : ℝ} {m : ℕ} (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hGb : WeightedBound U s m B (lowJet G)) + (hHb : WeightedBound U s (m + 2) C H) {t : ℝ} (ht : t ∈ Set.Icc 0 1) : + WeightedBound U s m (B + C / s ^ 2) (lowJet (fun p => G p + t • H p)) := by + have hv := weighted_variationLowJet hU hH hs hs1 hC m hHb + have hscl := hv.const_smul hU.uniqueDiffOn (variationLowJet_smooth hH).contDiffOn t + have ht1 : |t| ≤ 1 := by rw [abs_of_nonneg ht.1]; exact ht.2 + have hb := hscl.mono_const (mul_le_of_le_one_left (div_nonneg hC (sq_nonneg s)) ht1) + have ha := hGb.add hU.uniqueDiffOn hs.le (lowJet_smooth hG).contDiffOn + ((variationLowJet_smooth hH).const_smul t).contDiffOn hb + exact ha.congr (fun p _ => lowJet_affine hG hH t p) + +lemma lowJet_segment_dist {U : Set Base} (hU : IsOpen U) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {s C : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hHb : WeightedBound U s 2 C H) {t : ℝ} (ht : t ∈ Set.Icc 0 1) + {p : Base} (hp : p ∈ U) : + dist (lowJet (fun q => G q + t • H q) p) (lowJet G p) ≤ C / s ^ 2 := by + have hv := weighted_variationLowJet hU hH hs hs1 hC 0 hHb + rw [lowJet_affine hG hH t p, dist_eq_norm, add_sub_cancel_left, norm_smul, Real.norm_eq_abs] + have ht1 : |t| ≤ 1 := by rw [abs_of_nonneg ht.1]; exact ht.2 + exact (mul_le_of_le_one_left (norm_nonneg _) ht1).trans (hv.norm_le hp) + +theorem exists_lowJet_segment_margin {Q O : Set LowJet} + (hQ : IsCompact Q) (hO : IsOpen O) (hQO : Q ⊆ O) : + ∃ (ρ : ℝ) (Q' : Set LowJet), 0 < ρ ∧ IsCompact Q' ∧ Q ⊆ Q' ∧ Q' ⊆ O ∧ + ∀ {U : Set Base}, IsOpen U → ∀ {G H : Base → Space}, + ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → Set.MapsTo (lowJet G) U Q → + ∀ {s C : ℝ}, 0 < s → s ≤ 1 → 0 ≤ C → C / s ^ 2 ≤ ρ → + WeightedBound U s 2 C H → ∀ t ∈ Set.Icc (0 : ℝ) 1, + Set.MapsTo (lowJet (fun p => G p + t • H p)) U Q' := by + obtain ⟨ρ,hρ,hsub⟩ := hQ.exists_cthickening_subset_open hO hQO + refine ⟨ρ,Metric.cthickening ρ Q,hρ,hQ.cthickening,Metric.self_subset_cthickening Q,hsub,?_⟩ + intro U hU G H hG hH hGQ s C hs hs1 hC hsmall hHb t ht p hp + exact Metric.mem_cthickening_of_dist_le _ (lowJet G p) ρ Q (hGQ hp) + ((lowJet_segment_dist hU hG hH hs hs1 hC hHb ht hp).trans hsmall) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegmentEnlargement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegmentEnlargement.lean new file mode 100644 index 0000000000000000000000000000000000000000..b14293e8e1f7c7c50888dee14d90a2bb8064e8a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowJetSegmentEnlargement.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetSegment + +namespace OAI + +/-! A fixed compact enlargement contains the jets of every small correction segment. -/ +noncomputable section +open Set +open scoped ContDiff Pointwise +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma lowJet_segment_mem_add_closedBall {U : Set Base} (hU : IsOpen U) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {K : Set LowJet} (hmap : MapsTo (lowJet G) U K) + {τ δ C : ℝ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hC : 0 ≤ C) + (hHb : WeightedBound U τ 2 (C*δ*τ) H) {t : ℝ} (ht : t ∈ Icc (0:ℝ) 1) : + MapsTo (lowJet (fun x => G x+t • H x)) U (K+Metric.closedBall 0 C) := by + have hc : (C*δ*τ)/τ^2 ≤ C := by + apply (div_le_iff₀ (sq_pos_of_pos hτ)).2 + nlinarith only [mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right hδτ hτ.le) hC] + have hv := weighted_variationLowJet hU hH hτ hτ1 + (mul_nonneg (mul_nonneg hC hδ) hτ.le) 0 hHb + intro x hx + rw [lowJet_affine hG hH t x] + apply Set.add_mem_add (hmap hx) + rw [Metric.mem_closedBall,dist_zero_right,norm_smul,Real.norm_eq_abs] + have ht1 : |t| ≤ 1 := by rw [abs_of_nonneg ht.1]; exact ht.2 + exact (mul_le_of_le_one_left (norm_nonneg _) ht1).trans ((hv.norm_le hx).trans hc) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalImage.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe0f5e0b21cec8e3108dfefe331aa6070ef2a377 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalImage.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteRegularFibers + +namespace OAI + +/-! The triple-radius exceptional set is null. Extend a map from two to +three coordinates constantly in the final coordinate and apply the proved +fixed-dimensional Jacobian null-image theorem. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff +namespace ClosedSurfaceR4.PublishedInputs + +local instance tripleVolumeHaar : (volume : Measure (Plane × ℝ)).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +theorem smooth_surface_image_volume_zero (f : Plane → Plane × ℝ) + (hf : ContDiff ℝ ∞ f) : volume (Set.range f) = 0 := by + let g : Plane × ℝ → Plane × ℝ := fun x => f x.1 + have hg : ContDiff ℝ ∞ g := hf.comp contDiff_fst + have hdet (x : Plane × ℝ) : LinearMap.det (fderiv ℝ g x).toLinearMap = 0 := by + rw [LinearMap.det_eq_zero_iff_ker_ne_bot, ne_eq, LinearMap.ker_eq_bot] + intro hinj + have hd : fderiv ℝ g x = (fderiv ℝ f x.1).comp (ContinuousLinearMap.fst ℝ Plane ℝ) := by + change fderiv ℝ (f ∘ (Prod.fst : Plane × ℝ → Plane)) x = _ + rw [fderiv_comp x (hf.differentiable (by simp) x.1) differentiableAt_fst, fderiv_fst] + have hzero : fderiv ℝ g x (0,1) = fderiv ℝ g x 0 := by + rw [hd] + simp + have he := congrArg Prod.snd (hinj hzero) + exact one_ne_zero he + have hnull : volume (g '' (univ : Set (Plane × ℝ))) = 0 := by + apply addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun x => fderiv ℝ g x) + · intro x _ + exact (hg.differentiable (by simp) x).hasFDerivAt.hasFDerivWithinAt + · intro x _ + exact hdet x + have he : g '' (univ : Set (Plane × ℝ)) = Set.range f := by + ext y + constructor + · rintro ⟨x,_,rfl⟩ + exact ⟨x.1,rfl⟩ + · rintro ⟨x,rfl⟩ + exact ⟨(x,0),mem_univ _,rfl⟩ + rwa [he] at hnull + +/-- On a compact chart set, parameters avoiding a triple intersection form +an open dense set. -/ +theorem compact_surface_image_open_dense (f : Plane → Plane × ℝ) + (hf : ContDiff ℝ ∞ f) {K : Set Plane} (hK : IsCompact K) : + IsOpen (f '' K)ᶜ ∧ Dense (f '' K)ᶜ := by + refine ⟨(hK.image hf.continuous).isClosed.isOpen_compl,?_⟩ + have hnull : volume (f '' K) = 0 := measure_mono_null (image_subset_range _ _) + (smooth_surface_image_volume_zero f hf) + apply Measure.dense_of_ae (μ := (volume : Measure (Plane × ℝ))) + simpa only [ae_iff,mem_compl_iff,not_not,Set.ofPred_mem_eq] using hnull + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalRange.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb5f5640d688d1fcb19049dae83e799561c506bd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/LowerDimensionalRange.lean @@ -0,0 +1,117 @@ +import Mathlib + +namespace OAI + +/-! A smooth three-parameter family has zero volume in dimension at least four. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff +namespace ClosedSurfaceR4.PublishedInputs + +/-- Extend the map constantly in a complementary coordinate and apply the +same-dimensional zero-Jacobian image theorem. -/ +theorem smooth_lower_dimensional_image_null {n : ℕ} (hn : 4 ≤ n) + (f : EuclideanSpace ℝ (Fin 3) → EuclideanSpace ℝ (Fin n)) + (U : Set (EuclideanSpace ℝ (Fin 3))) (hU : IsOpen U) + (hf : ContDiffOn ℝ ∞ f U) : volume (f '' U) = 0 := by + let : ContinuousSMul ℝ (EuclideanSpace ℝ (Fin 3)) := inferInstance + let : ContinuousSMul ℝ (EuclideanSpace ℝ (Fin (n - 3))) := inferInstance + let : ContinuousSMul ℝ + (EuclideanSpace ℝ (Fin 3) × EuclideanSpace ℝ (Fin (n - 3))) := + Prod.continuousSMul + let L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] + EuclideanSpace ℝ (Fin 3) × EuclideanSpace ℝ (Fin (n - 3)) := + ContinuousLinearEquiv.ofFinrankEq (by simp; omega) + let P : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin 3) := + (ContinuousLinearMap.fst ℝ _ _).comp L.toContinuousLinearMap + let g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n) := f ∘ P + have hfd (x : EuclideanSpace ℝ (Fin n)) (hx : P x ∈ U) : + DifferentiableAt ℝ f (P x) := + (hf.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) + have hg (x : EuclideanSpace ℝ (Fin n)) (hx : P x ∈ U) : + DifferentiableAt ℝ g x := (hfd x hx).comp x P.differentiableAt + let k : Fin (n - 3) := ⟨0, by omega⟩ + let v : EuclideanSpace ℝ (Fin (n - 3)) := PiLp.single 2 k 1 + have hv : v ≠ 0 := by + intro he + have he' := congrArg (fun z : EuclideanSpace ℝ (Fin (n - 3)) => z k) he + exact one_ne_zero (by simpa only [v, PiLp.single_apply, ite_true, PiLp.zero_apply] using he') + have hP : P (L.symm (0,v)) = 0 := by + change (L (L.symm (0,v))).1 = 0 + rw [L.apply_symm_apply] + have hdet (x : EuclideanSpace ℝ (Fin n)) (hx : P x ∈ U) : + LinearMap.det (fderiv ℝ g x).toLinearMap = 0 := by + rw [LinearMap.det_eq_zero_iff_ker_ne_bot, ne_eq, LinearMap.ker_eq_bot] + intro hi + have hd : fderiv ℝ g x = (fderiv ℝ f (P x)).comp P := by + change fderiv ℝ (f ∘ P) x = _ + rw [fderiv_comp x (hfd x hx) P.differentiableAt, + P.fderiv] + have he : fderiv ℝ g x (L.symm (0,v)) = fderiv ℝ g x 0 := by + rw [hd] + simp only [ContinuousLinearMap.comp_apply, hP, map_zero] + have hz : L.symm (0,v) = 0 := hi he + have he' := congrArg (fun z => (L z).2) hz + exact hv (by simpa using he') + have hnull : volume (g '' (P ⁻¹' U)) = 0 := by + apply addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun x => fderiv ℝ g x) + · intro x hx + exact (hg x hx).hasFDerivAt.hasFDerivWithinAt + · intro x hx + exact hdet x hx + have he : g '' (P ⁻¹' U) = f '' U := by + ext y + constructor + · rintro ⟨x,hx,rfl⟩ + exact ⟨P x,hx,rfl⟩ + · rintro ⟨x,hx,rfl⟩ + refine ⟨L.symm (x,0),?_,?_⟩ + · simpa [P] using hx + · change f (P (L.symm (x,0))) = f x + congr 1 + simp [P] + rwa [he] at hnull + +/-- A smooth three-parameter family has zero volume in any Euclidean target +of dimension at least four. -/ +theorem smooth_lower_dimensional_range_null {n : ℕ} (hn : 4 ≤ n) + (f : EuclideanSpace ℝ (Fin 3) → EuclideanSpace ℝ (Fin n)) + (hf : ContDiff ℝ ∞ f) : volume (Set.range f) = 0 := by + simpa only [Set.image_univ] using + smooth_lower_dimensional_image_null hn f Set.univ isOpen_univ hf.contDiffOn + +/-- The same null-image fact in the plane-coordinate parameter space used +for a tangent vector and one scalar coefficient. -/ +theorem smooth_coordinate_parameter_image_null {n : ℕ} (hn : 4 ≤ n) + (f : ((Fin 2 → ℝ) × ℝ) → EuclideanSpace ℝ (Fin n)) + (U : Set ((Fin 2 → ℝ) × ℝ)) (hU : IsOpen U) + (hf : ContDiffOn ℝ ∞ f U) : volume (f '' U) = 0 := by + let : ContinuousSMul ℝ ((Fin 2 → ℝ) × ℝ) := Prod.continuousSMul + let L : EuclideanSpace ℝ (Fin 3) ≃L[ℝ] ((Fin 2 → ℝ) × ℝ) := + ContinuousLinearEquiv.ofFinrankEq (by simp) + have hc : ContDiffOn ℝ ∞ (f ∘ L) (L ⁻¹' U) := + hf.comp L.contDiff.contDiffOn (fun _ hx => hx) + have hnull := smooth_lower_dimensional_image_null hn (f ∘ L) (L ⁻¹' U) + (hU.preimage L.continuous) hc + have he : (f ∘ L) '' (L ⁻¹' U) = f '' U := by + ext y + constructor + · rintro ⟨x,hx,rfl⟩ + exact ⟨L x,hx,rfl⟩ + · rintro ⟨x,hx,rfl⟩ + exact ⟨L.symm x,by simpa using hx,by simp⟩ + rwa [he] at hnull + +/-- Global version in the coordinate parameter space. -/ +theorem smooth_coordinate_parameter_range_null {n : ℕ} (hn : 4 ≤ n) + (f : ((Fin 2 → ℝ) × ℝ) → EuclideanSpace ℝ (Fin n)) + (hf : ContDiff ℝ ∞ f) : volume (Set.range f) = 0 := by + simpa only [Set.image_univ] using + smooth_coordinate_parameter_image_null hn f Set.univ isOpen_univ hf.contDiffOn + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c48be02c22934592a64d2a2e9f4fef8b20454c9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricCalculus.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricModel + +namespace OAI + +/-! Exact metric identities for actual smooth maps on the surface. The +finite-sum identity retains every cross term between distinct chart modes. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4 +section +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +abbrev surfaceDifferential (F : M → V) (p : M) : TangentSpace planeModel p →L[ℝ] V := + mfderiv planeModel 𝓘(ℝ,V) F p + +end +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +def inducedForm (F : M → V) (p : M) (v w : TangentSpace planeModel p) : ℝ := + inner ℝ (surfaceDifferential F p v) (surfaceDifferential F p w) + +def linearMetricForm (F U : M → V) (p : M) (v w : TangentSpace planeModel p) : ℝ := + inner ℝ (surfaceDifferential F p v) (surfaceDifferential U p w) + + inner ℝ (surfaceDifferential U p v) (surfaceDifferential F p w) + +lemma surfaceDifferential_add {F U : M → V} {p : M} + (hF : MDifferentiableAt planeModel 𝓘(ℝ,V) F p) + (hU : MDifferentiableAt planeModel 𝓘(ℝ,V) U p) : + surfaceDifferential (F+U) p = surfaceDifferential F p + surfaceDifferential U p := + mfderiv_add hF hU + +lemma inducedForm_add {F U : M → V} {p : M} + (hF : MDifferentiableAt planeModel 𝓘(ℝ,V) F p) + (hU : MDifferentiableAt planeModel 𝓘(ℝ,V) U p) (v w : TangentSpace planeModel p) : + inducedForm (F+U) p v w - inducedForm F p v w = + linearMetricForm F U p v w + inducedForm U p v w := by + unfold inducedForm linearMetricForm + rw [surfaceDifferential_add hF hU] + simp only [add_apply,inner_add_left,inner_add_right] + ring + +lemma mfderiv_finite_sum {ι : Type*} (s : Finset ι) (f : ι → M → V) {p : M} + (hf : ∀ i ∈ s, MDifferentiableAt planeModel 𝓘(ℝ,V) (f i) p) : + surfaceDifferential (∑ i ∈ s, f i) p = + ∑ i ∈ s, surfaceDifferential (f i) p := by + exact (HasMFDerivAt.sum (fun i hi => (hf i hi).hasMFDerivAt)).mfderiv + +lemma inducedForm_finite_sum {ι : Type*} [Fintype ι] [DecidableEq ι] + (f : ι → M → V) {p : M} + (hf : ∀ i, MDifferentiableAt planeModel 𝓘(ℝ,V) (f i) p) + (v w : TangentSpace planeModel p) : + inducedForm (∑ i, f i) p v w = (∑ i, inducedForm (f i) p v w) + + ∑ i, ∑ j ∈ Finset.univ.erase i, + inner ℝ (surfaceDifferential (f i) p v) + (surfaceDifferential (f j) p w) := by + unfold inducedForm + rw [mfderiv_finite_sum Finset.univ f (fun i _ => hf i)] + simp only [sum_apply] + rw [sum_inner] + simp_rw [inner_sum] + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i _ + exact (add_comm _ _).trans (Finset.sum_erase_add _ _ (Finset.mem_univ i)) |>.symm + +lemma linearMetricForm_finite_sum {ι : Type*} [Fintype ι] + (F : M → V) (f : ι → M → V) {p : M} + (hf : ∀ i, MDifferentiableAt planeModel 𝓘(ℝ,V) (f i) p) + (v w : TangentSpace planeModel p) : + linearMetricForm F (∑ i, f i) p v w = ∑ i, linearMetricForm F (f i) p v w := by + unfold linearMetricForm + rw [mfderiv_finite_sum Finset.univ f (fun i _ => hf i)] + simp only [sum_apply,inner_sum,sum_inner,Finset.sum_add_distrib] + +lemma inducedForm_free_forced {F U V' : M → V} {p : M} + (hF : MDifferentiableAt planeModel 𝓘(ℝ,V) F p) + (hU : MDifferentiableAt planeModel 𝓘(ℝ,V) U p) + (hV : MDifferentiableAt planeModel 𝓘(ℝ,V) V' p) + (v w : TangentSpace planeModel p) (T : ℝ) : + inducedForm (F+(U+V')) p v w - inducedForm F p v w - T = + linearMetricForm F U p v w + linearMetricForm F V' p v w + + (inducedForm U p v w - T) + linearMetricForm U V' p v w + + inducedForm V' p v w := by + unfold inducedForm linearMetricForm + rw [surfaceDifferential_add hF (hU.add hV), surfaceDifferential_add hU hV] + simp only [add_apply,inner_add_left,inner_add_right] + ring + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..a89f7df5a57f740200107b0a4ed995257c8b2dcf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ManifoldMetricTensor.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasMetric + +namespace OAI + +/-! The actual metric tensors and cross tensors of manifold displacements. +Cross tensors vanish away from the intersection of the two supports. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +local instance metricTensorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricTensorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +local instance metricTangentNormed (p : M) : NormedAddCommGroup (TangentSpace planeModel p) := + inferInstanceAs (NormedAddCommGroup Plane) +local instance metricTangentSpace (p : M) : NormedSpace ℝ (TangentSpace planeModel p) := + inferInstanceAs (NormedSpace ℝ Plane) +local instance metricTensorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricTensorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricTensorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricTensorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +def metricPairTensor (F U : M → Space) (p : M) : CovariantTwoTensor p := + (innerSL ℝ : Space →L[ℝ] Space →L[ℝ] ℝ).bilinearComp + (E' := TangentSpace planeModel p) (F' := TangentSpace planeModel p) + (σ₁' := RingHom.id ℝ) (σ₂' := RingHom.id ℝ) + (σ₁₃' := RingHom.id ℝ) (σ₂₃' := RingHom.id ℝ) + (surfaceDifferential F p) (surfaceDifferential U p) + +def inducedTensor (F : M → Space) (p : M) : CovariantTwoTensor p := metricPairTensor F F p + +def linearMetricTensor (F U : M → Space) (p : M) : CovariantTwoTensor p := + metricPairTensor F U p + metricPairTensor U F p + +lemma metricPairTensor_apply (F U : M → Space) (p : M) (v w : TangentSpace planeModel p) : + metricPairTensor F U p v w = inner ℝ (surfaceDifferential F p v) (surfaceDifferential U p w) := rfl + +lemma inducedTensor_apply (F : M → Space) (p : M) (v w : TangentSpace planeModel p) : + inducedTensor F p v w = inducedForm F p v w := rfl + +lemma linearMetricTensor_apply (F U : M → Space) (p : M) (v w : TangentSpace planeModel p) : + linearMetricTensor F U p v w = linearMetricForm F U p v w := rfl + +lemma inducedTensor_symmetric (F : M → Space) (p : M) (v w : TangentSpace planeModel p) : + inducedTensor F p v w = inducedTensor F p w v := by + change inner ℝ (surfaceDifferential F p v) (surfaceDifferential F p w) = + inner ℝ (surfaceDifferential F p w) (surfaceDifferential F p v) + exact real_inner_comm _ _ + +lemma inducedTensor_add {F U : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hU : ContMDiff planeModel spaceModel ∞ U) : + inducedTensor (F+U) = inducedTensor F + linearMetricTensor F U + inducedTensor U := by + funext p + ext v w + have h := inducedForm_add ((hF p).mdifferentiableAt (by simp)) + ((hU p).mdifferentiableAt (by simp)) v w + change inducedForm (F+U) p v w = inducedForm F p v w + + linearMetricForm F U p v w + inducedForm U p v w + linarith + +lemma inducedTensor_finite_sum {ι : Type*} [Fintype ι] [DecidableEq ι] + (f : ι → M → Space) (hf : ∀ i, ContMDiff planeModel spaceModel ∞ (f i)) : + inducedTensor (∑ i, f i) = (fun p => ∑ i, inducedTensor (f i) p) + + (fun p => ∑ i, ∑ j ∈ Finset.univ.erase i, metricPairTensor (f i) (f j) p) := by + funext p + ext v w + simpa only [Pi.add_apply,add_apply,sum_apply,inducedTensor_apply,metricPairTensor_apply] using + inducedForm_finite_sum f (fun i => ((hf i) p).mdifferentiableAt (by simp)) v w + +lemma metricPairTensor_zero_off_left (F U : M → Space) {p : M} (hp : p ∉ tsupport F) : + metricPairTensor F U p = 0 := by + unfold metricPairTensor + rw [surfaceDifferential_zero_off_support F hp] + exact ContinuousLinearMap.bilinearComp_zero_left + +lemma metricPairTensor_zero_off_right (F U : M → Space) {p : M} (hp : p ∉ tsupport U) : + metricPairTensor F U p = 0 := by + unfold metricPairTensor + rw [surfaceDifferential_zero_off_support U hp] + exact ContinuousLinearMap.bilinearComp_zero_right + +lemma metricPairTensor_zero_off_intersection (F U : M → Space) {p : M} + (hp : p ∉ tsupport F ∩ tsupport U) : metricPairTensor F U p = 0 := by + by_cases hF : p ∈ tsupport F + · exact metricPairTensor_zero_off_right F U (fun hU => hp ⟨hF,hU⟩) + · exact metricPairTensor_zero_off_left F U hF + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MatchedZeroLineData.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MatchedZeroLineData.lean new file mode 100644 index 0000000000000000000000000000000000000000..947f2aef9a56b8f2fdff920e0cf9da970e325d26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MatchedZeroLineData.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ZeroSliceLineChart + +namespace OAI + +/-! Retain the coordinate formulas for the real chart on a matched zero set. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X E : Type*} [TopologicalSpace X] [TopologicalSpace E] [Zero E] + +theorem matched_zero_subset_line_chart_data (e : OpenPartialHomeomorph X (E × ℝ)) + (S : Set X) (p : X) (hp : p ∈ e.source) (hpS : p ∈ S) + (hmatch : ∀ x ∈ e.source, x ∈ S ↔ (e x).1 = 0) : + ∃ c : OpenPartialHomeomorph S ℝ, + (⟨p,hpS⟩ : S) ∈ c.source ∧ + c.source = ((↑) ⁻¹' e.source) ∧ + c.target = {t | (0,t) ∈ e.target} ∧ + (∀ x ∈ c.source, c x = (e x.val).2) ∧ + (∀ t ∈ c.target, (c.symm t).val = e.symm (0,t)) := by + obtain ⟨a,ha,has,hat,haf,hag⟩ := + matched_subset_chart e S {z | z.1 = 0} p hp hpS hmatch + let h := (zeroSliceLineHomeomorph (E := E)).toOpenPartialHomeomorph + let c := a.trans h + have hcs : c.source = a.source := by + ext x + simp [c,h] + have hct : c.target = {t | (0,t) ∈ e.target} := by + ext t + simp [c,h,hat,zeroSliceLineHomeomorph] + refine ⟨c,?_,hcs.trans has,hct,?_,?_⟩ + · rw [hcs] + exact ha + · intro x hx + change (a x).val.2 = (e x.val).2 + rw [haf x (hcs ▸ hx)] + · intro t ht + change (a.symm ⟨(0,t),rfl⟩).val = e.symm (0,t) + apply hag + rw [hat] + change (0,t) ∈ e.target + rw [hct] at ht + exact ht + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricAcceleration.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricAcceleration.lean new file mode 100644 index 0000000000000000000000000000000000000000..75c52fe0820754c0e3f790da1782d778fe60eed9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricAcceleration.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexQuadraticPhase +import OAI.Geometry.SurfaceImmersion.Geometry.RealMetricDerivatives + +namespace OAI + +/-! The negative tangential acceleration required by the velocity plane is +the actual Christoffel coefficient of the induced metric. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame PhaseGeometry + +def inducedCoordinateMetric (F : RField 4) (p : Base) : PhaseMean.Tensor := + ![realMetric F dx dx p,realMetric F dx dy p,realMetric F dy dy p] + +lemma inducedCoordinateMetric_smooth {F : RField 4} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (inducedCoordinateMetric F) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact real_dot_smooth (contDiff_real_coordDeriv hF dx) (contDiff_real_coordDeriv hF dx) + · exact real_dot_smooth (contDiff_real_coordDeriv hF dx) (contDiff_real_coordDeriv hF dy) + · exact real_dot_smooth (contDiff_real_coordDeriv hF dy) (contDiff_real_coordDeriv hF dy) + +lemma inducedCoordinateMetric_derivative {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v : Base) (i : Fin 3) : + fderiv ℝ (inducedCoordinateMetric F) p v i = + coordDeriv v (fun q => inducedCoordinateMetric F q i) p := by + have he := congrArg (fun L : Base →L[ℝ] ℝ => L v) + (fderiv_apply ((inducedCoordinateMetric_smooth hF).differentiable (by simp) p) i) + exact he.symm + +lemma induced_connection_yy {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) : + metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) 2 = + (((coordDeriv dy F p ⬝ᵥ coordDeriv dy F p) * + (coordDeriv dx F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p) - + (coordDeriv dx F p ⬝ᵥ coordDeriv dy F p) * + (coordDeriv dy F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p)) / + gramDet (coordDeriv dx F p) (coordDeriv dy F p), + ((coordDeriv dx F p ⬝ᵥ coordDeriv dx F p) * + (coordDeriv dy F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p) - + (coordDeriv dx F p ⬝ᵥ coordDeriv dy F p) * + (coordDeriv dx F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p)) / + gramDet (coordDeriv dx F p) (coordDeriv dy F p)) := by + have ha : coordDeriv dy (realMetric F dx dy) p - coordDeriv dx (realMetric F dy dy) p/2 = + coordDeriv dx F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p := by + simp only [realMetric_partial hF,real_second_coordDeriv_comm hF p dy dx] + rw [dotProduct_comm (coordDeriv dy F p) (coordDeriv dx (coordDeriv dy F) p)] + ring + have hb : coordDeriv dy (realMetric F dy dy) p/2 = + coordDeriv dy F p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p := by + rw [realMetric_partial hF,dotProduct_comm (coordDeriv dy (coordDeriv dy F) p)] + ring + simp only [metricConnectionAt,Matrix.cons_val_two,inducedCoordinateMetric_derivative hF] + change ((realMetric F dy dy p * + (coordDeriv dy (realMetric F dx dy) p - coordDeriv dx (realMetric F dy dy) p/2) - + realMetric F dx dy p * (coordDeriv dy (realMetric F dy dy) p/2)) / _, + (realMetric F dx dx p * (coordDeriv dy (realMetric F dy dy) p/2) - + realMetric F dx dy p * + (coordDeriv dy (realMetric F dx dy) p - coordDeriv dx (realMetric F dy dy) p/2)) / _) = _ + rw [ha,hb] + rfl + +lemma acceleration_connection_decomposition {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) : + let Gamma := metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) 2 + coordDeriv dy (coordDeriv dy F) p = Gamma.1 • coordDeriv dx F p + + Gamma.2 • coordDeriv dy F p + realSecondForm F dy dy p := by + dsimp only + rw [induced_connection_yy hF p] + unfold realSecondForm realNormalPart + abel + +lemma negative_acceleration_of_positive_hessian {F : RField 4} + (hF : ContDiff ℝ ∞ F) (p : Base) + (hpos : 0 < coordinateMetricHessian (inducedCoordinateMetric F) (Prod.fst : Base → ℝ) p dy dy) : + ∃ μ ν : ℝ, μ < 0 ∧ coordDeriv dy (coordDeriv dy F) p = + μ • coordDeriv dx F p + ν • coordDeriv dy F p + realSecondForm F dy dy p := by + let Gamma := metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) 2 + refine ⟨Gamma.1,Gamma.2,?_,acceleration_connection_decomposition hF p⟩ + rw [coordinateMetricHessian_fst_dy] at hpos + exact neg_pos.mp hpos + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricConnectionNaturality.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricConnectionNaturality.lean new file mode 100644 index 0000000000000000000000000000000000000000..d47182aad815f5bd07651a4ddc88e64dcf67e5a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricConnectionNaturality.lean @@ -0,0 +1,200 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricAcceleration +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartGeometry + +namespace OAI + +/-! The positive intrinsic phase Hessian gives negative first-coordinate +acceleration in the actual nonlinear phase chart. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame PhaseGeometry + +lemma induced_connection_slots {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) + (i : Fin 3) : + metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) i = + let X := coordDeriv dx F p + let Y := coordDeriv dy F p + let C := (![coordDeriv dx (coordDeriv dx F) p, + coordDeriv dx (coordDeriv dy F) p,coordDeriv dy (coordDeriv dy F) p] : Fin 3 → RVec 4) i + (((Y ⬝ᵥ Y)*(X ⬝ᵥ C)-(X ⬝ᵥ Y)*(Y ⬝ᵥ C))/gramDet X Y, + ((X ⬝ᵥ X)*(Y ⬝ᵥ C)-(X ⬝ᵥ Y)*(X ⬝ᵥ C))/gramDet X Y) := by + have hcomm := real_second_coordDeriv_comm hF p dy dx + fin_cases i <;> + simp only [metricConnectionAt, metricJetDet, Matrix.cons_val_zero', Matrix.cons_val_succ'] + all_goals + simp only [inducedCoordinateMetric_derivative hF] + simp only [inducedCoordinateMetric, Matrix.cons_val_zero, Matrix.cons_val_one, + Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons] + simp only [realMetric_partial hF, hcomm] + simp only [realMetric, NormalFrame.gramDet, dotProduct_comm] + congr 1 <;> congr 1 <;> ring + +lemma second_connection_decomposition {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) : + let Gamma := metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) + coordDeriv v (coordDeriv w F) p = + fderiv ℝ F p (connectionContract Gamma v w) + realSecondForm F v w p := by + dsimp only + have hb (i : Fin 3) : + (![coordDeriv dx (coordDeriv dx F) p,coordDeriv dx (coordDeriv dy F) p, + coordDeriv dy (coordDeriv dy F) p] : Fin 3 → RVec 4) i = + fderiv ℝ F p + (metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) i) + + realSecondTensor F p i := by + rw [induced_connection_slots hF p i] + change _ = coordDeriv _ F p + _ + conv_rhs => lhs; rw [coordDeriv_eq_basis] + fin_cases i <;> simp only [realSecondTensor,Matrix.cons_val_zero',Matrix.cons_val_succ', + realSecondForm,realNormalPart] <;> abel + have h0 := hb 0 + have h1 := hb 1 + have h2 := hb 2 + change coordDeriv dx (coordDeriv dx F) p = _ at h0 + change coordDeriv dx (coordDeriv dy F) p = _ at h1 + change coordDeriv dy (coordDeriv dy F) p = _ at h2 + rw [second_coordDeriv_bilinear hF,h0,h1,h2,connectionContract,map_add,map_add, + map_smul,map_smul,map_smul,realSecondForm_bilinear hF] + simp only [realSecondTensor] + module + +lemma scalar_second_coordDeriv_comp {phi : Base → ℝ} {f : Base → Base} + (hphi : ContDiff ℝ ∞ phi) (hf : ContDiff ℝ ∞ f) (v w p : Base) : + coordDeriv v (coordDeriv w (phi ∘ f)) p = + coordDeriv (fderiv ℝ f p v) (coordDeriv (fderiv ℝ f p w) phi) (f p) + + fderiv ℝ phi (f p) (coordDeriv v (coordDeriv w f) p) := by + have hDF : ContDiff ℝ ∞ (fderiv ℝ phi) := hphi.fderiv_right (m := ∞) (by simp) + have hD1 := ((hDF.differentiable (by simp)) (f p)).hasFDerivAt.comp p + ((hf.differentiable (by simp)) p).hasFDerivAt + have hD2 := (((hf.fderiv_right (m := ∞) (by simp)).clm_apply + (show ContDiff ℝ ∞ (fun _ : Base => w) from contDiff_const)).differentiable + (by simp) p).hasFDerivAt + have hp := hD1.clm_apply hD2 + have he : (fun q => (fderiv ℝ phi ∘ f) q (coordDeriv w f q)) = coordDeriv w (phi ∘ f) := by + funext q + simp only [coordDeriv,fderiv_comp q (hphi.differentiable (by simp) _) (hf.differentiable (by simp) _), + ContinuousLinearMap.comp_apply,Function.comp_apply] + change HasFDerivAt (fun q => (fderiv ℝ phi ∘ f) q (coordDeriv w f q)) _ p at hp + rw [he] at hp + have heval := congrArg (fun L => L v) hp.fderiv + have hsecond := (((hDF.differentiable (by simp)) (f p)).hasFDerivAt.clm_apply + (hasFDerivAt_const (fderiv ℝ f p w) (f p))).fderiv + change fderiv ℝ (fun q => fderiv ℝ phi q (fderiv ℝ f p w)) (f p) = _ at hsecond + change fderiv ℝ (coordDeriv (fderiv ℝ f p w) phi) (f p) = _ at hsecond + change fderiv ℝ (coordDeriv w (phi ∘ f)) p v = + fderiv ℝ (coordDeriv (fderiv ℝ f p w) phi) (f p) (fderiv ℝ f p v) + + fderiv ℝ phi (f p) (fderiv ℝ (fun x => fderiv ℝ f x w) p v) + rw [hsecond] + simpa only [coordDeriv,add_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.flip_apply, + zero_apply,map_zero,zero_add,add_zero,Function.comp_apply,add_comm] using heval + +lemma phase_chart_connection_identity {F : RField 4} {f : Base → Base} + (hF : ContDiff ℝ ∞ F) (hf : ContDiff ℝ ∞ f) (p : Base) + (hImm : Function.Injective (fderiv ℝ F (f p))) + (hdet : coordDet (fderiv ℝ f p) ≠ 0) : + let oldGamma := metricConnectionAt (inducedCoordinateMetric F (f p), + fderiv ℝ (inducedCoordinateMetric F) (f p)) + let newGamma := metricConnectionAt (inducedCoordinateMetric (F ∘ f) p, + fderiv ℝ (inducedCoordinateMetric (F ∘ f)) p) 2 + fderiv ℝ f p newGamma = coordDeriv dy (coordDeriv dy f) p + + connectionContract oldGamma (fderiv ℝ f p dy) (fderiv ℝ f p dy) := by + dsimp only + apply hImm + have hD := gramDet_ne_zero_of_injective _ hImm + have hs := second_coordDeriv_comp_smooth hF hf dy dy p + rw [second_connection_decomposition hF] at hs + have hn := second_connection_decomposition (hF.comp hf) p dy dy + simp only [connectionContract,dy,zero_mul,one_mul,mul_zero,add_zero,zero_add, + zero_smul,one_smul] at hn + change coordDeriv dy (coordDeriv dy (F ∘ f)) p = + fderiv ℝ (F ∘ f) p + (metricConnectionAt (inducedCoordinateMetric (F ∘ f) p, + fderiv ℝ (inducedCoordinateMetric (F ∘ f)) p) 2) + + realSecondForm (F ∘ f) dy dy p at hn + rw [realSecondForm_comp_smooth hF hf dy dy p hD hdet] at hn + have he := hn.symm.trans hs + rw [fderiv_comp p (hF.differentiable (by simp) _) (hf.differentiable (by simp) _), + ContinuousLinearMap.comp_apply] at he + rw [map_add] + apply add_right_cancel (b := realSecondForm F (fderiv ℝ f p dy) (fderiv ℝ f p dy) (f p)) + exact he.trans (by abel) + +lemma phase_chart_hessian_dy {F : RField 4} {phi : Base → ℝ} {f : Base → Base} + (hF : ContDiff ℝ ∞ F) (hphi : ContDiff ℝ ∞ phi) (hf : ContDiff ℝ ∞ f) + (p : Base) (hphase : phi ∘ f =ᶠ[𝓝 p] Prod.fst) + (hImm : Function.Injective (fderiv ℝ F (f p))) + (hdet : coordDet (fderiv ℝ f p) ≠ 0) : + coordinateMetricHessian (inducedCoordinateMetric (F ∘ f)) Prod.fst p dy dy = + coordinateMetricHessian (inducedCoordinateMetric F) phi (f p) + (fderiv ℝ f p dy) (fderiv ℝ f p dy) := by + let a := fderiv ℝ f p dy + let oldGamma := metricConnectionAt (inducedCoordinateMetric F (f p), + fderiv ℝ (inducedCoordinateMetric F) (f p)) + let newGamma := metricConnectionAt (inducedCoordinateMetric (F ∘ f) p, + fderiv ℝ (inducedCoordinateMetric (F ∘ f)) p) 2 + have hd : (fderiv ℝ phi (f p)).comp (fderiv ℝ f p) = ContinuousLinearMap.fst ℝ ℝ ℝ := by + rw [← fderiv_comp p (hphi.differentiable (by simp) _) (hf.differentiable (by simp) _), + hphase.fderiv_eq,fderiv_fst] + have hs : coordDeriv dy (coordDeriv dy (phi ∘ f)) p = 0 := by + have he : coordDeriv dy (phi ∘ f) =ᶠ[𝓝 p] coordDeriv dy Prod.fst := by + filter_upwards [hphase.eventuallyEq_nhds] with x hx + exact congrArg (fun L : Base →L[ℝ] ℝ => L dy) hx.fderiv_eq + rw [coordDeriv,he.fderiv_eq] + change coordDeriv dy (coordDeriv dy Prod.fst) p = 0 + have he : coordDeriv dy (Prod.fst : Base → ℝ) = fun _ => 0 := by + funext q + simp [coordDeriv,fderiv_fst,dy] + rw [he] + simp [coordDeriv] + rw [scalar_second_coordDeriv_comp hphi hf] at hs + have hc := phase_chart_connection_identity hF hf p hImm hdet + change fderiv ℝ f p newGamma = _ + connectionContract oldGamma a a at hc + have hp := congrArg (fderiv ℝ phi (f p)) hc + rw [map_add] at hp + have hn : fderiv ℝ phi (f p) (fderiv ℝ f p newGamma) = newGamma.1 := by + change ((fderiv ℝ phi (f p)).comp (fderiv ℝ f p)) newGamma = _ + rw [hd] + rfl + rw [hn] at hp + rw [coordinateMetricHessian_fst_dy,coordinateMetricHessian, + phaseLinear_phaseDerivative] + change -newGamma.1 = coordDeriv a (coordDeriv a phi) (f p) - + fderiv ℝ phi (f p) (connectionContract oldGamma a a) + change coordDeriv a (coordDeriv a phi) (f p) + _ = 0 at hs + linarith + +/-- A convex phase gives the negative tangential coefficient required by +`exists_projected_collar_frame`, in the actual smooth inverse phase chart. -/ +theorem negative_acceleration_in_phase_chart {F : RField 4} {phi : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (hphi : ContDiff ℝ ∞ phi) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = phi x) + (hImm : ∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) + (hHess : ∀ x ∈ e.source, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (inducedCoordinateMetric F) phi x v v) + {p : Base} (hp : p ∈ e.target) : + ∃ mu nu : ℝ, mu < 0 ∧ coordDeriv dy (coordDeriv dy (F ∘ e.symm)) p = + mu • coordDeriv dx (F ∘ e.symm) p + nu • coordDeriv dy (F ∘ e.symm) p + + realSecondForm (F ∘ e.symm) dy dy p := by + have hcomp : phi ∘ e.symm =ᶠ[𝓝 p] Prod.fst := by + filter_upwards [e.open_target.mem_nhds hp] with x hx + change phi (e.symm x) = x.1 + rw [← hphase,e.right_inv hx] + have hdet : coordDet (fderiv ℝ e.symm p) ≠ 0 := + coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source + hi.contDiffOn he.contDiffOn (fun _ hx => e.map_target hx) (fun x hx => e.right_inv hx) hp + apply negative_acceleration_of_positive_hessian (hF.comp hi) p + rw [phase_chart_hessian_dy hF hphi hi p hcomp (hImm _ (e.map_target hp)) hdet] + apply hHess _ (e.map_target hp) + intro hz + have hzero := inverse_chart_derivative_injective e he hi hp + (hz.trans (map_zero (fderiv ℝ e.symm p)).symm) + have hy : (dy : Base) ≠ 0 := by simp [dy] + exact hy hzero + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricForcedFactorBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricForcedFactorBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a574d0b9bc773fb4ab03bf4817f8e876f44512e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricForcedFactorBudgets.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricForcedBudgets +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors +import OAI.Geometry.Immersion.ClosedSurface.QuadraticSupport + +namespace OAI + +/-! Polynomial geometric factors and the number of actual quadratic labels. -/ +noncomputable section +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.RealModes + +theorem card_quadraticLabel_le (ι : Type*) [Fintype ι] [DecidableEq ι] : + Fintype.card (QuadraticLabel ι) ≤ Fintype.card ι + 2*(Fintype.card ι)^2 := by + change Fintype.card (ι ⊕ (Σ i : ι, {j : ι // j ≠ i} × Bool)) ≤ _ + rw [Fintype.card_sum,Fintype.card_sigma] + apply Nat.add_le_add_left + calc + (∑ i : ι, Fintype.card ({j : ι // j ≠ i} × Bool)) ≤ + ∑ _i : ι, Fintype.card ι*2 := by + apply Finset.sum_le_sum + intro i _ + rw [Fintype.card_prod,Fintype.card_bool] + exact Nat.mul_le_mul_right 2 (Fintype.card_subtype_le _) + _ = 2*(Fintype.card ι)^2 := by simp; ring + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open SmallModes RealModes +variable {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : TopologicalSpace.Compacts Base} {τ : ℝ} {s : ℝ≥0} + +lemma metric_sizeFactor_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) (q m : ℕ) : + c.sizeFactor q m = metricForcedSizeBudget c.C c.J (fun _ => 1) q m := by + have hD' : c.D = (fun _ => 0) := funext hD + simp only [sizeFactor,metricForcedSizeBudget,tensorOrder_emptyMetricPolynomial,hD',mul_one] + ring + +lemma metric_residualFactor_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) (q m : ℕ) : + c.residualFactor q m = metricForcedResidualBudget c.C c.J (fun _ => 1) q m := by + have hκ : c.κ = fun r => errorConstant r (c.C r) := by + funext r + simp only [κ,hD r,zero_mul,max_eq_left (errorConstant_nonneg r (c.nonnegC r))] + simp only [residualFactor,metricForcedResidualBudget,hκ,tensorOrder_emptyMetricPolynomial, + Nat.zero_add,mul_one] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a008d1c5391e376f8620e9cb551e48bc26d3a91 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussBound.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussInvariance + +namespace OAI + +/-! A bound fixed by the prescribed metric before any oscillatory loop is +selected; it applies to every exact local realization of that metric. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes + +private lemma scalar_partial_smooth {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) (v : Base) : + ContDiff ℝ ∞ (coordDeriv v f) := + (hf.fderiv_right (by simp)).clm_apply contDiff_const + +private lemma inverseMetricPair_continuousOn {U : Set Base} + {E F G a b c d : Base → ℝ} (hE : ContinuousOn E U) (hF : ContinuousOn F U) + (hG : ContinuousOn G U) (ha : ContinuousOn a U) (hb : ContinuousOn b U) + (hc : ContinuousOn c U) (hd : ContinuousOn d U) + (hdet : ∀ x ∈ U, E x*G x-(F x)^2 ≠ 0) : + ContinuousOn (fun x => inverseMetricPair (E x) (F x) (G x) (a x) (b x) (c x) (d x)) U := + ((((hG.mul ha).mul hc).sub (hF.mul ((ha.mul hd).add (hb.mul hc)))).add + ((hE.mul hb).mul hd)).div ((hE.mul hG).sub (hF.pow 2)) hdet + +lemma coordinateGauss_continuousOn {U : Set Base} {E F G : Base → ℝ} + (hE : ContDiff ℝ ∞ E) (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (hdet : ∀ x ∈ U, E x*G x-(F x)^2 ≠ 0) : + ContinuousOn (coordinateGauss E F G) U := by + have he₁ := (scalar_partial_smooth hE dx).continuous.continuousOn (s := U) + have he₂ := (scalar_partial_smooth hE dy).continuous.continuousOn (s := U) + have hf₁ := (scalar_partial_smooth hF dx).continuous.continuousOn (s := U) + have hf₂ := (scalar_partial_smooth hF dy).continuous.continuousOn (s := U) + have hg₁ := (scalar_partial_smooth hG dx).continuous.continuousOn (s := U) + have hg₂ := (scalar_partial_smooth hG dy).continuous.continuousOn (s := U) + have hraw : ContinuousOn (fun p => (2*coordDeriv dx (coordDeriv dy F) p- + coordDeriv dy (coordDeriv dy E) p-coordDeriv dx (coordDeriv dx G) p)/2) U := by + exact ((continuousOn_const.mul + (scalar_partial_smooth (scalar_partial_smooth hF dy) dx).continuous.continuousOn).sub + (scalar_partial_smooth (scalar_partial_smooth hE dy) dy).continuous.continuousOn |>.sub + (scalar_partial_smooth (scalar_partial_smooth hG dx) dx).continuous.continuousOn).div_const 2 + exact (hraw.sub (inverseMetricPair_continuousOn hE.continuous.continuousOn + hF.continuous.continuousOn hG.continuous.continuousOn (he₁.div_const 2) + (hf₁.sub (he₂.div_const 2)) (hf₂.sub (hg₁.div_const 2)) (hg₂.div_const 2) hdet)).add + (inverseMetricPair_continuousOn hE.continuous.continuousOn + hF.continuous.continuousOn hG.continuous.continuousOn (he₂.div_const 2) + (hg₁.div_const 2) (he₂.div_const 2) (hg₁.div_const 2) hdet) + +theorem compact_metric_gauss_bound {C : Set Base} (hC : IsCompact C) + {E F G : Base → ℝ} (hE : ContDiff ℝ ∞ E) (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (hdet : ∀ x ∈ C, E x*G x-(F x)^2 ≠ 0) : + ∃ K : ℝ, 1 ≤ K ∧ ∀ H : RField 4, ContDiff ℝ ∞ H → ∀ p ∈ C, + NormalFrame.gramDet (coordDeriv dx H p) (coordDeriv dy H p) ≠ 0 → + realMetric H dx dx =ᶠ[𝓝 p] E → realMetric H dx dy =ᶠ[𝓝 p] F → + realMetric H dy dy =ᶠ[𝓝 p] G → + |realSecondForm H dx dx p ⬝ᵥ realSecondForm H dy dy p- + realSecondForm H dx dy p ⬝ᵥ realSecondForm H dx dy p| ≤ K := by + have hc := coordinateGauss_continuousOn hE hF hG hdet + obtain ⟨B,hB⟩ := (hC.image_of_continuousOn hc.abs).bddAbove + refine ⟨max 1 B,le_max_left _ _,?_⟩ + intro H hH p hp hD he hf hg + rw [gauss_of_metric_germ hH p hD he hf hg] + exact (hB (mem_image_of_mem _ hp)).trans (le_max_right _ _) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussInvariance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussInvariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..3af21c5443d5802bf9796fee8b5151ce3f5b8e3b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricGaussInvariance.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateGauss + +namespace OAI + +/-! The Gauss scalar of an exact realization is fixed by the prescribed metric +in a neighborhood, independent of the choice of immersion. -/ +noncomputable section +open Filter +open scoped Topology ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes + +lemma coordDeriv_germ {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {f g : Base → E} {p : Base} (h : f =ᶠ[𝓝 p] g) (v : Base) : + coordDeriv v f =ᶠ[𝓝 p] coordDeriv v g := + h.fderiv.mono (fun _ he => congrArg (fun L : Base →L[ℝ] E => L v) he) + +lemma coordinateGauss_germ {E F G E' F' G' : Base → ℝ} {p : Base} + (hE : E =ᶠ[𝓝 p] E') (hF : F =ᶠ[𝓝 p] F') (hG : G =ᶠ[𝓝 p] G') : + coordinateGauss E F G p = coordinateGauss E' F' G' p := by + simp only [coordinateGauss,hE.eq_of_nhds,hF.eq_of_nhds,hG.eq_of_nhds, + (coordDeriv_germ hE dx).eq_of_nhds,(coordDeriv_germ hE dy).eq_of_nhds, + (coordDeriv_germ hF dx).eq_of_nhds,(coordDeriv_germ hF dy).eq_of_nhds, + (coordDeriv_germ hG dx).eq_of_nhds,(coordDeriv_germ hG dy).eq_of_nhds, + (coordDeriv_germ (coordDeriv_germ hF dy) dx).eq_of_nhds, + (coordDeriv_germ (coordDeriv_germ hE dy) dy).eq_of_nhds, + (coordDeriv_germ (coordDeriv_germ hG dx) dx).eq_of_nhds] + +theorem gauss_of_metric_germ {H : RField 4} (hH : ContDiff ℝ ∞ H) (p : Base) + (hD : NormalFrame.gramDet (coordDeriv dx H p) (coordDeriv dy H p) ≠ 0) + {E F G : Base → ℝ} (hE : realMetric H dx dx =ᶠ[𝓝 p] E) + (hF : realMetric H dx dy =ᶠ[𝓝 p] F) (hG : realMetric H dy dy =ᶠ[𝓝 p] G) : + realSecondForm H dx dx p ⬝ᵥ realSecondForm H dy dy p- + realSecondForm H dx dy p ⬝ᵥ realSecondForm H dx dy p = coordinateGauss E F G p := + (gauss_metric_identity hH p hD).trans (coordinateGauss_germ hE hF hG) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricJetMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricJetMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..e53a7461c856b579d14c2254c6fd1cded4ee1004 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricJetMargins.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricBounds +import OAI.Geometry.Immersion.ClosedSurface.ProjectionStability +import OAI.Geometry.Immersion.ClosedSurface.ForcedModes + +namespace OAI + +/-! Compact metric positivity controls the first jets of all sufficiently +accurate approximate isometries. -/ +noncomputable section +open Set +open scoped Topology BigOperators Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes + +lemma norm_le_one_add_dot_self (X : RVec 4) : ‖X‖ ≤ 1+X ⬝ᵥ X := by + have hsum : 0 ≤ X ⬝ᵥ X := Finset.sum_nonneg (fun j _ => mul_self_nonneg (X j)) + apply (pi_norm_le_iff_of_nonneg (by linarith : 0 ≤ 1+X ⬝ᵥ X)).mpr + intro i + have hi : X i*X i ≤ X ⬝ᵥ X := + Finset.single_le_sum (fun j _ => mul_self_nonneg (X j)) (Finset.mem_univ i) + rw [Real.norm_eq_abs] + nlinarith [sq_nonneg (|X i|-1/2),sq_abs (X i)] + +lemma firstJetPair_norm_le_metric (F : RField 4) (p : Base) : + ‖firstJetPair F p‖ ≤ 1+‖realMetricTensor F p‖ := by + apply (max_le_iff).mpr + constructor + · have h := (le_abs_self (realMetricTensor F p 0)).trans + (norm_le_pi_norm (realMetricTensor F p) (0 : Fin 3)) + exact (norm_le_one_add_dot_self _).trans (by + change 1+realMetricTensor F p 0 ≤ _ + linarith) + · have h := (le_abs_self (realMetricTensor F p 2)).trans + (norm_le_pi_norm (realMetricTensor F p) (2 : Fin 3)) + exact (norm_le_one_add_dot_self _).trans (by + change 1+realMetricTensor F p 2 ≤ _ + linarith) + +lemma gramDet_firstJetPair (F : RField 4) (p : Base) : + NormalFrame.gramDet (firstJetPair F p).1 (firstJetPair F p).2 = + realMetricTensor F p 0*realMetricTensor F p 2-(realMetricTensor F p 1)^2 := rfl + +/-- Only the compact set of prescribed positive metrics is fixed. The +approximate immersion and all its higher derivatives remain arbitrary. -/ +theorem compact_metric_firstJet_margin {T : Set PhaseMean.Tensor} (hT : IsCompact T) + (hpos : ∀ H ∈ T, 0 < H 0*H 2-(H 1)^2) : + ∃ ε R c : ℝ, 0 < ε ∧ 0 < R ∧ 0 < c ∧ + ∀ (F : RField 4) (p : Base) (H : PhaseMean.Tensor), H ∈ T → + ‖realMetricTensor F p-H‖ < ε → + ‖firstJetPair F p‖ ≤ R ∧ c ≤ NormalFrame.gramDet + (firstJetPair F p).1 (firstJetPair F p).2 := by + let det : PhaseMean.Tensor → ℝ := fun H => H 0*H 2-(H 1)^2 + have hd : Continuous det := by unfold det; fun_prop + by_cases hne : T.Nonempty + · obtain ⟨H₀,hH₀,hmin⟩ := hT.exists_isMinOn hne hd.continuousOn + let c := det H₀/2 + have hc : 0 < c := half_pos (hpos H₀ hH₀) + have hs : T ⊆ {H | c < det H} := by + intro H hH + exact (half_lt_self (hpos H₀ hH₀)).trans_le (hmin hH) + obtain ⟨ε,hε,hthick⟩ := hT.exists_thickening_subset_open + (isOpen_lt continuous_const hd) hs + obtain ⟨B,hB⟩ := hT.exists_bound_of_continuousOn continuousOn_id + let R := |B|+2 + have hR : 0 < R := by dsimp [R]; positivity + refine ⟨min ε 1,R,c,lt_min hε zero_lt_one,hR,hc,?_⟩ + intro F p H hH hclose + have hclose1 : ‖realMetricTensor F p-H‖ ≤ 1 := + (hclose.trans_le (min_le_right _ _)).le + have hmetric : ‖realMetricTensor F p‖ ≤ |B|+1 := by + calc + ‖realMetricTensor F p‖ = ‖(realMetricTensor F p-H)+H‖ := by congr 1; abel + _ ≤ ‖realMetricTensor F p-H‖+‖H‖ := norm_add_le _ _ + _ ≤ 1+B := add_le_add hclose1 (hB H hH) + _ ≤ |B|+1 := by linarith [le_abs_self B] + refine ⟨(firstJetPair_norm_le_metric F p).trans (by dsimp [R]; linarith),?_⟩ + rw [gramDet_firstJetPair] + exact (hthick (Metric.mem_thickening_iff.mpr + ⟨H,hH,by simpa only [dist_eq_norm] using hclose.trans_le (min_le_left _ _)⟩)).le + · refine ⟨1,1,1,zero_lt_one,zero_lt_one,zero_lt_one,?_⟩ + intro F p H hH _ + exact False.elim (hne ⟨H,hH⟩) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricRadiusSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricRadiusSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d4f166de503e509951b5300876b7536a7e3bea4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricRadiusSmallIncrement.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactRadiusSmallIncrement +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! An actual metric-adapted immersion supplies all the small-increment geometry. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance metricRadiusSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricRadiusSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricRadiusSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricRadiusSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricRadiusSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricRadiusSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- All geometric and mean-solver inputs are constructed from the metric and +immersion. Only the nearby map's explicit analytic bounds remain. -/ +theorem uniform_radius_small_increment (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ r ρ₀ : ℝ, 0 < r ∧ 0 < ρ₀ ∧ + ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → ∀ q : ℕ, + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → + ∃ (η₀ : ℝ) (B T : ℕ → ℝ), 0 < η₀ ∧ η₀ ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → ∀ b : ℝ, + 0 ≤ b → b < ρ₀ → d.A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, d.A.ShiftedBound 2 m s (P m) G) → + ∀ (H : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ x v v', H x v v' = H x v' v) → + (∀ x, ‖d.A.tensorEncode H x - d.A.tensorEncode g.inner x‖ ≤ r/2) → + (∀ m, d.A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (G+X) - inducedTensor G - δ^2 • H)) := by + exact d.A.compact_radius_small_increment F hF d.Q d.w + (fun i j => (d.weight_pos i j).ne') d.immersion d.pure_good g.inner + g.contMDiff d.metric_positive d.quadratic_good + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..6dbcd9e878f509cdeef82316053cadba6f765814 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MetricSmallIncrement.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactGeometrySmallIncrement +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! An actual metric-adapted immersion supplies all the small-increment geometry. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance metricSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- All geometric and mean-solver inputs are constructed from the metric and +immersion. Only the nearby map's explicit analytic bounds remain. -/ +theorem small_increment (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) + (hPF : ∀ m, d.A.ShiftedBound 2 m 1 (P m) F) (q : ℕ) : + ∃ r : ℝ, 0 < r ∧ ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → + ∃ (ρ₀ η₀ : ℝ) (B T : ℕ → ℝ), 0 < ρ₀ ∧ 0 < η₀ ∧ η₀ ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → ∀ b : ℝ, + 0 ≤ b → b < ρ₀ → d.A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, d.A.ShiftedBound 2 m s (P m) G) → + ∀ (H : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ x v v', H x v v' = H x v' v) → + (∀ x, ‖d.A.tensorEncode H x - d.A.tensorEncode g.inner x‖ ≤ r/2) → + (∀ m, d.A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (G+X) - inducedTensor G - δ^2 • H)) := by + exact d.A.compact_geometry_small_increment F hF d.Q d.w + (fun i j => (d.weight_pos i j).ne') d.immersion d.pure_good g.inner + g.contMDiff d.metric_positive d.quadratic_good P hP hPF q + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfa406ff222d13482e06780432c6c8de783179a1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetCalculus.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Correction.MixedJetPolynomial + +namespace OAI + +/-! The coefficient part of the mixed polynomial variation is the actual +low-jet chain rule, with the position coordinates held fixed. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial + +lemma variationLowJet_expansion (H : Base → Space) (p : Base) : + variationLowJet H p = ∑ i : Fin 7 × Fin 4, + jet H (lowWord i.1) i.2 p • lowBasis (.inr i) := by + funext k + cases k with + | inl k => simp [variationLowJet, lowBasis] + | inr k => simp [variationLowJet, lowBasis, Pi.single_apply] + +lemma coefficient_variation_sum (c : LowJet × ℝ → ℝ) (G H : Base → Space) (z : Base × ℝ) : + fderiv ℝ c (lowJet G z.1, z.2) (variationLowJet H z.1, 0) = + ∑ i : Fin 7 × Fin 4, jet H (lowWord i.1) i.2 z.1 * + fderiv ℝ c (lowJet G z.1, z.2) (lowBasis (.inr i), 0) := by + let L : LowJet →L[ℝ] ℝ := + (fderiv ℝ c (lowJet G z.1, z.2)).comp (ContinuousLinearMap.inl ℝ LowJet ℝ) + change L (variationLowJet H z.1) = _ + rw [variationLowJet_expansion, map_sum] + simp only [map_smul, smul_eq_mul] + rfl + +namespace MixedExpression + +lemma sumList_eval {ι : Type*} (l : List ι) (f : ι → MixedExpression) + (G : Fin 4 → Base → Space) (z : Base × ℝ) : + (sumList l f).eval G z = (l.map (fun i => (f i).eval G z)).sum := by + induction l with + | nil => rfl + | cons i l ih => simp only [sumList, eval, List.map_cons, List.sum_cons, ih] + +lemma differentiate_coeff_eval (c : LowJet × ℝ → ℝ) (j : Fin 3) + (G : Fin 4 → Base → Space) (z : Base × ℝ) : + ((coeff c).differentiate j).eval G z = + fderiv ℝ c (lowJet (G 0) z.1, z.2) (variationLowJet (G j.succ) z.1, 0) := by + rw [coefficient_variation_sum] + simp only [differentiate, sumList_eval, eval, coefficientDerivative] + exact Finset.sum_map_toList _ _ + +lemma smoothCoeffs_sumList {ι : Type*} {O : Set LowJet} (l : List ι) (f : ι → MixedExpression) + (h : ∀ i ∈ l, (f i).SmoothCoeffs O) : (sumList l f).SmoothCoeffs O := by + induction l with + | nil => exact contDiffOn_const + | cons i l ih => exact ⟨h i (List.mem_cons_self ..), + ih (fun j hj => h j (List.mem_cons_of_mem _ hj))⟩ + +theorem differentiate_smoothCoeffs {O : Set LowJet} (hO : IsOpen O) (j : Fin 3) + {e : MixedExpression} (he : e.SmoothCoeffs O) : (e.differentiate j).SmoothCoeffs O := by + induction e with + | coeff c => + apply smoothCoeffs_sumList + intro i _ + exact (he.fderiv_of_isOpen (hO.prod isOpen_univ) (m := ∞) (by simp)).clm_apply contDiffOn_const + | atom i w a e ih => + by_cases hi : i = 0 + · simpa only [differentiate, hi, ↓reduceIte, SmoothCoeffs] using And.intro he (ih he) + · simpa only [differentiate, hi, ↓reduceIte, SmoothCoeffs] using ih he + | add e f ihe ihf => exact ⟨ihe he.1, ihf he.2⟩ + +end MixedExpression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..fadb655a7f113ff4332a50cc9d999ec2699d969f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetDerivatives.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetCalculus + +namespace OAI + +/-! Actual differentiation of mixed jet polynomials in the base-map slot. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +lemma jet_affine_hasDerivAt {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (w : List (Fin 2)) (a : Fin 4) (p : Base) (t : ℝ) : + HasDerivAt (fun s : ℝ => jet (fun q => G q + s • H q) w a p) + (jet H w a p) t := by + have hpath : (fun s : ℝ => jet (fun q => G q + s • H q) w a p) = + (fun s : ℝ => jet G w a p + s * jet H w a p) := by + funext s + rw [jet_add (H := fun q => s • H q) hG (ContDiff.const_smul s hH), jet_smul hH] + rw [hpath] + simpa only [one_mul, id_eq] using + ((hasDerivAt_id t).mul_const (jet H w a p)).const_add (jet G w a p) + +namespace MixedExpression + +def varyBase (G : Fin 4 → Base → Space) (H : Base → Space) (s : ℝ) : Fin 4 → Base → Space := + fun i p => if i = 0 then G 0 p + s • H p else G i p + +lemma varyBase_zero (G : Fin 4 → Base → Space) (H : Base → Space) : varyBase G H 0 = G := by + funext i p + by_cases hi : i = 0 <;> simp [varyBase, hi] + +lemma varyBase_base (G : Fin 4 → Base → Space) (H : Base → Space) (s : ℝ) : + varyBase G H s 0 = fun p => G 0 p + s • H p := by + funext p + simp only [varyBase, ↓reduceIte] + +lemma varyBase_other (G : Fin 4 → Base → Space) (H : Base → Space) (s : ℝ) + {i : Fin 4} (hi : i ≠ 0) : varyBase G H s i = G i := by + funext p + simp only [varyBase, hi, ↓reduceIte] + +/-- The syntactic derivative evaluates to the actual derivative, while the +three direction slots remain fixed. -/ +theorem differentiate_hasDerivAt {O : Set LowJet} (hO : IsOpen O) + {G : Fin 4 → Base → Space} (hG : ∀ i, ContDiff ℝ ∞ (G i)) + {e : MixedExpression} (he : e.SmoothCoeffs O) (j : Fin 3) (z : Base × ℝ) + (hQ : lowJet (G 0) z.1 ∈ O) : + HasDerivAt (fun s : ℝ => e.eval (varyBase G (G j.succ) s) z) + ((e.differentiate j).eval G z) 0 := by + induction e with + | coeff c => + have hd := Expression.variation_hasDerivAt hO (hG 0) (hG j.succ) + (e := .coeff c) he z hQ + simpa only [eval, varyBase_base, Expression.eval, Expression.variation, + differentiate_coeff_eval] using hd + | atom i w a e ih => + by_cases hi : i = 0 + · subst i + have hj := jet_affine_hasDerivAt (hG 0) (hG j.succ) w a z.1 0 + have hd := hj.fun_mul (ih he) + simpa only [eval, varyBase_base, varyBase_zero, differentiate, ↓reduceIte, + Pi.mul_apply, zero_smul, add_zero] using hd + · have hj := (hasDerivAt_const (0 : ℝ) (jet (G i) w a z.1)).fun_mul (ih he) + simpa only [eval, varyBase_other G (G j.succ) _ hi, varyBase_zero, + differentiate, hi, ↓reduceIte, zero_mul, zero_add, Pi.mul_apply] using hj + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +end MixedExpression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetHomogeneity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetHomogeneity.lean new file mode 100644 index 0000000000000000000000000000000000000000..296f9ec942680e865f1100f524a855c2bde86f3a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetHomogeneity.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetCalculus + +namespace OAI + +/-! Homogeneity in each variation slot, including the zero polynomial. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression + +inductive DegreeIn (j : Fin 3) : MixedExpression → ℕ → Prop + | coeff (c) : DegreeIn j (.coeff c) 0 + | zero (n) : DegreeIn j (.coeff (fun _ => 0)) n + | other {e n} (i w a) (hi : i ≠ j.succ) (h : DegreeIn j e n) : + DegreeIn j (.atom i w a e) n + | same {e n} (w a) (h : DegreeIn j e n) : DegreeIn j (.atom j.succ w a e) (n + 1) + | add {e f n} (he : DegreeIn j e n) (hf : DegreeIn j f n) : DegreeIn j (.add e f) n + +lemma degree_sumList {ι : Type*} (j : Fin 3) (n : ℕ) (l : List ι) (f : ι → MixedExpression) + (h : ∀ i ∈ l, DegreeIn j (f i) n) : DegreeIn j (sumList l f) n := by + induction l with + | nil => exact DegreeIn.zero n + | cons i l ih => + exact DegreeIn.add (h i (List.mem_cons_self ..)) + (ih (fun a ha => h a (List.mem_cons_of_mem _ ha))) + +lemma degree_ofExpression (j : Fin 3) (e : Expression) : DegreeIn j (ofExpression e) 0 := by + induction e with + | coeff c => exact DegreeIn.coeff c + | atom w a e ih => exact DegreeIn.other 0 w a (Ne.symm (Fin.succ_ne_zero j)) ih + | add e f ihe ihf => exact DegreeIn.add ihe ihf + +lemma coefficientDerivative_zero (i : Fin 7 × Fin 4) : + coefficientDerivative (fun _ => 0) i = fun _ => 0 := by + funext z + simp [coefficientDerivative] + +/-- Differentiating the base map adds exactly one occurrence of the chosen +variation slot to each monomial. -/ +theorem DegreeIn.differentiate {j : Fin 3} {e : MixedExpression} {n : ℕ} + (h : DegreeIn j e n) (k : Fin 3) : + DegreeIn j (e.differentiate k) (n + if k = j then 1 else 0) := by + induction h with + | coeff c => + apply degree_sumList + intro i _ + by_cases hk : k = j + · subst k + simpa only [↓reduceIte, Nat.zero_add] using + DegreeIn.same (j := j) (lowWord i.1) i.2 (DegreeIn.coeff (coefficientDerivative c i)) + · simpa only [hk, ↓reduceIte, Nat.zero_add] using + DegreeIn.other k.succ (lowWord i.1) i.2 (by simpa using hk) + (DegreeIn.coeff (coefficientDerivative c i)) + | zero n => + apply degree_sumList + intro i _ + rw [coefficientDerivative_zero] + by_cases hk : k = j + · subst k + simpa only [↓reduceIte] using + DegreeIn.same (j := j) (lowWord i.1) i.2 (DegreeIn.zero n) + · simpa only [hk, ↓reduceIte, Nat.add_zero] using + DegreeIn.other k.succ (lowWord i.1) i.2 (by simpa using hk) (DegreeIn.zero n) + | @other e n i w a hi h ih => + by_cases hi0 : i = 0 + · subst i + simp only [MixedExpression.differentiate, ↓reduceIte] + apply DegreeIn.add + · by_cases hk : k = j + · subst k + simpa only [↓reduceIte] using DegreeIn.same w a h + · simpa only [hk, ↓reduceIte, Nat.add_zero] using + DegreeIn.other k.succ w a (by simpa using hk) h + · exact DegreeIn.other 0 w a hi ih + · simpa only [MixedExpression.differentiate, hi0, ↓reduceIte] using DegreeIn.other i w a hi ih + | @same e n w a h ih => + simpa only [MixedExpression.differentiate, Fin.succ_ne_zero, ↓reduceIte, Nat.add_right_comm n 1] + using DegreeIn.same w a ih + | add he hf ihe ihf => exact DegreeIn.add ihe ihf + +def scaleSlot (G : Fin 4 → Base → Space) (j : Fin 3) (c : ℝ) : Fin 4 → Base → Space := + fun i p => if i = j.succ then c • G i p else G i p + +lemma scaleSlot_base (G : Fin 4 → Base → Space) (j : Fin 3) (c : ℝ) : + scaleSlot G j c 0 = G 0 := by + funext p + simp only [scaleSlot, Ne.symm (Fin.succ_ne_zero j), ↓reduceIte] + +lemma scaleSlot_smooth {G : Fin 4 → Base → Space} (hG : ∀ i, ContDiff ℝ ∞ (G i)) + (j : Fin 3) (c : ℝ) : ∀ i, ContDiff ℝ ∞ (scaleSlot G j c i) := by + intro i + change ContDiff ℝ ∞ (fun p => if i = j.succ then c • G i p else G i p) + by_cases hi : i = j.succ + · simpa only [scaleSlot, hi, ↓reduceIte] using ContDiff.const_smul c (hG j.succ) + · simpa only [scaleSlot, hi, ↓reduceIte] using hG i + +theorem DegreeIn.eval_scaleSlot {j : Fin 3} {e : MixedExpression} {n : ℕ} + (h : DegreeIn j e n) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (c : ℝ) (z : Base × ℝ) : + e.eval (scaleSlot G j c) z = c ^ n * e.eval G z := by + induction h with + | coeff d => simp only [eval, scaleSlot_base, pow_zero, one_mul] + | zero n => simp only [eval, mul_zero] + | other i w a hi h ih => + have he : scaleSlot G j c i = G i := by + funext p + simp only [scaleSlot, hi, ↓reduceIte] + simp only [eval, he, ih] + ring + | same w a h ih => + have he : scaleSlot G j c j.succ = fun p => c • G j.succ p := by + funext p + simp only [scaleSlot, ↓reduceIte] + simp only [eval, he, jet_smul (hG j.succ), ih, pow_succ] + ring + | add he hf ihe ihf => simp only [eval, ihe, ihf, mul_add] + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..71407c98df5a5bc9791ce9d78c9724d349f9f63f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MixedJetRegularity.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.MixedJetPolynomial + +namespace OAI + +/-! Spatial order and smoothness of mixed jet expressions. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression + +def order : MixedExpression → ℕ + | .coeff _ => 2 + | .atom _ w _ e => max w.length e.order + | .add e f => max e.order f.order + +lemma order_ge_two (e : MixedExpression) : 2 ≤ e.order := by + induction e with + | coeff => rfl + | atom _ _ _ _ ih => exact ih.trans (le_max_right _ _) + | add _ _ ih _ => exact ih.trans (le_max_left _ _) + +lemma order_sumList_le {ι : Type*} (l : List ι) (f : ι → MixedExpression) (N : ℕ) + (hN : 2 ≤ N) (h : ∀ i ∈ l, (f i).order ≤ N) : (sumList l f).order ≤ N := by + induction l with + | nil => exact hN + | cons i l ih => + exact max_le (h i (List.mem_cons_self ..)) + (ih (fun j hj => h j (List.mem_cons_of_mem _ hj))) + +lemma order_differentiate (j : Fin 3) (e : MixedExpression) : + (e.differentiate j).order ≤ e.order := by + induction e with + | coeff c => + apply order_sumList_le _ _ 2 (le_refl 2) + intro i _ + have hl : (lowWord i.1).length ≤ 2 := by + obtain ⟨i, a⟩ := i + fin_cases i <;> simp [lowWord] + exact max_le hl (le_refl 2) + | atom i w a e ih => + by_cases hi : i = 0 + · simp only [differentiate, hi, ↓reduceIte, order] + omega + · simp only [differentiate, hi, ↓reduceIte, order] + omega + | add e f ihe ihf => + simp only [differentiate, order] + omega + +lemma order_ofExpression (e : Expression) : (ofExpression e).order = e.order := by + induction e with + | coeff => rfl + | atom _ _ _ ih => simp only [ofExpression, order, Expression.order, ih] + | add _ _ ihe ihf => simp only [ofExpression, order, Expression.order, ihe, ihf] + +lemma smoothCoeffs_ofExpression {O : Set LowJet} {e : Expression} (he : e.SmoothCoeffs O) : + (ofExpression e).SmoothCoeffs O := by + induction e with + | coeff => exact he + | atom _ _ _ ih => exact ih he + | add _ _ ihe ihf => exact ⟨ihe he.1, ihf he.2⟩ + +theorem eval_smooth {O : Set LowJet} {U : Set Base} {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (hQ : Set.MapsTo (lowJet (G 0)) U O) + {e : MixedExpression} (he : e.SmoothCoeffs O) : + ContDiffOn ℝ ∞ (e.eval G) (U ×ˢ Set.univ) := by + induction e with + | coeff c => + exact he.comp (((lowJet_smooth (hG 0)).comp contDiff_fst).prodMk contDiff_snd).contDiffOn + (fun z hz => ⟨hQ hz.1, hz.2⟩) + | atom i w a e ih => + exact (((jet_smooth (hG i) w a).comp contDiff_fst).contDiffOn.mul (ih he)) + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +lemma parameter_smooth {O : Set LowJet} {U : Set Base} {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (hQ : Set.MapsTo (lowJet (G 0)) U O) + {e : MixedExpression} (he : e.SmoothCoeffs O) (t : ℝ) : + ContDiffOn ℝ ∞ (fun p => e.eval G (p, t)) U := + (eval_smooth hG hQ he).comp (contDiffOn_id.prodMk contDiffOn_const) + (fun _ hp => ⟨hp, Set.mem_univ t⟩) + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetDataBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetDataBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..efd86e2c37466982d2cb6fe3056a5edc8826443e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetDataBounds.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ModulatedPolynomialJets + +namespace OAI + +/-! A uniform finite-order budget for all demodulated jet slots. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates MixedExpression + +def amplitudeBudget (N m : ℕ) (B P : ℝ) : ℝ := + 1 + B + ∑ r ∈ Finset.range (N + 1), jetConstant P m r + +lemma amplitudeBudget_ge_one {N m : ℕ} {B P : ℝ} (hB : 0 ≤ B) (hP : 0 ≤ P) : + 1 ≤ amplitudeBudget N m B P := by + have hsum := Finset.sum_nonneg (s := Finset.range (N + 1)) + (fun r _ => jetConstant_nonneg hP m r) + dsimp only [amplitudeBudget] + linarith + +lemma le_amplitudeBudget {N m : ℕ} {B P : ℝ} (hP : 0 ≤ P) : + B ≤ amplitudeBudget N m B P := by + have hsum := Finset.sum_nonneg (s := Finset.range (N + 1)) + (fun r _ => jetConstant_nonneg hP m r) + dsimp only [amplitudeBudget] + linarith + +lemma jetConstant_le_amplitudeBudget {N m r : ℕ} {B P : ℝ} + (hB : 0 ≤ B) (hP : 0 ≤ P) (hr : r ≤ N) : + jetConstant P m r ≤ amplitudeBudget N m B P := by + have h := Finset.single_le_sum (fun a _ => jetConstant_nonneg hP m a) + (show r ∈ Finset.range (N + 1) from Finset.mem_range.mpr (by omega)) + dsimp only [amplitudeBudget] + linarith + +theorem weighted_amplitudeData {U : Set Base} (hU : IsOpen U) + {G : Base → Space} {φ : Fin 3 → Base → ℝ} {H : DirectionFields} + (hG : ContDiff ℝ ∞ G) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) {τ s B P : ℝ} + (hτ : 0 < τ) (hs : 0 < s) (hτs : τ ≤ s) (hB : 0 ≤ B) (hP : 0 ≤ P) + (m N : ℕ) (hGb : WeightedBound U s (m + N) B (lowJet G)) + (hHb : ∀ j, WeightedBound U s (m + N) 1 (H j)) + (hφb : ∀ j v, WeightedBound U s (m + N) P (fun p => fderiv ℝ (φ j) p (coordinateVector v))) + (i : Fin 4) (w : List (Fin 2)) (a : Fin 4) (hw : w.length ≤ N) : + WeightedBound U s m (amplitudeBudget N m B P / τ ^ slotLoss i w) + (amplitudeData G φ H τ i w a) := by + refine Fin.cases ?_ (fun j => ?_) i + · have hj := weighted_actual_jet hU hG hs hB m w a (hGb.mono_order (by omega)) + have hc := weighted_complexify hU.uniqueDiffOn hs.le (by positivity) + (jet_smooth hG w a).contDiffOn hj + apply hc.mono_const + calc + B / s ^ (w.length - 2) ≤ B / τ ^ (w.length - 2) := + div_le_div_of_nonneg_left hB (pow_pos hτ _) (pow_le_pow_left₀ hτ.le hτs _) + _ ≤ _ := div_le_div_of_nonneg_right (le_amplitudeBudget hP) (pow_nonneg hτ.le _) + · have hcomp := (hHb j).component hU.uniqueDiffOn hs.le zero_le_one (hH j).contDiffOn a + have hc := weighted_amplitudeJet hU hτ hs hτs zero_le_one hP + (hφ j) (contDiff_pi.mp (hH j) a) (w.map coordinateVector) + (fun v hv => by + obtain ⟨v, _, rfl⟩ := List.mem_map.mp hv + exact norm_coordinateVector_le v) m + (hcomp.mono_order (by simp only [List.length_map]; omega)) + (fun v hv => by + obtain ⟨v, _, rfl⟩ := List.mem_map.mp hv + exact (hφb j v).mono_order (by simp only [List.length_map]; omega)) + simp only [List.length_map, mul_one] at hc + apply hc.mono_const + exact div_le_div_of_nonneg_right (jetConstant_le_amplitudeBudget hB hP hw) + (pow_nonneg hτ.le _) + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetScaling.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetScaling.lean new file mode 100644 index 0000000000000000000000000000000000000000..9634a5dd0abf20e3f58d475acf393e80000edf64 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJetScaling.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConjugatedVariationBounds + +namespace OAI + +/-! Scaling each oscillatory amplitude independently. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates MixedExpression + +lemma amplitudeDerivative_real_smul {Z : Base → ℂ} (hZ : ContDiff ℝ ∞ Z) + (φ : Base → ℝ) (τ c : ℝ) (v : Base) : + amplitudeDerivative τ φ v (fun p => c • Z p) = + fun p => c • amplitudeDerivative τ φ v Z p := by + funext p + have hd := congrArg (fun L : Base →L[ℝ] ℂ => L v) + (((hZ.differentiable (by simp) p).hasFDerivAt.const_smul c).fderiv) + change fderiv ℝ (fun q => c • Z q) p v = c • fderiv ℝ Z p v at hd + change fderiv ℝ (fun q => c • Z q) p v + _ = _ + rw [hd] + simp only [amplitudeDerivative, Complex.real_smul] + ring + +lemma amplitudeJet_real_smul {φ : Base → ℝ} {Z : Base → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) (τ c : ℝ) (w : List Base) : + amplitudeJet τ φ w (fun p => c • Z p) = fun p => c • amplitudeJet τ φ w Z p := by + induction w with + | nil => rfl + | cons v w ih => + simp only [amplitudeJet, ih] + exact amplitudeDerivative_real_smul (amplitudeJet_smooth hφ hZ τ w) φ τ c v + +def scaleDirections (H : DirectionFields) (c : Fin 3 → ℝ) : DirectionFields := + fun j p => c j • H j p + +lemma scaleDirections_smooth {H : DirectionFields} (hH : ∀ j, ContDiff ℝ ∞ (H j)) + (c : Fin 3 → ℝ) : ∀ j, ContDiff ℝ ∞ (scaleDirections H c j) := + fun j => ContDiff.const_smul (c j) (hH j) + +lemma amplitudeData_scale (G : Base → Space) {φ : Fin 3 → Base → ℝ} + {H : DirectionFields} (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (τ : ℝ) (c : Fin 3 → ℝ) : + amplitudeData G φ (scaleDirections H c) τ = + scaleJets (amplitudeData G φ H τ) (fun j _ => (c j : ℂ)) := by + funext i w a p + refine Fin.cases ?_ (fun j => ?_) i + · exact (scaleJets_base (amplitudeData G φ H τ) (fun j _ => (c j : ℂ)) w a p).symm + · rw [scaleJets_succ] + change amplitudeJet τ (φ j) (w.map coordinateVector) (fun q => c j • H j q a) p = _ + rw [amplitudeJet_real_smul (hφ j) (contDiff_pi.mp (hH j) a)] + rfl + +lemma conjugatedVariation_scale (e : Expression) (G : Base → Space) + {φ : Fin 3 → Base → ℝ} {H : DirectionFields} + (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) (hH : ∀ j, ContDiff ℝ ∞ (H j)) + (τ : ℝ) (c : Fin 3 → ℝ) (i : Fin 3) (z : Base × ℝ) : + conjugatedVariation e G φ (scaleDirections H c) τ i z = + (c 0 * (if 1 ≤ i then c 1 else 1) * (if 2 ≤ i then c 2 else 1)) • + conjugatedVariation e G φ H τ i z := by + rw [conjugatedVariation_eq e G hφ (scaleDirections_smooth hH c), + conjugatedVariation_eq e G hφ hH, amplitudeData_scale G hφ hH τ c] + have h := evalComplex_scaleJets (fun j => e.variations_degree i j) G + (amplitudeData G φ H τ) (fun j _ => (c j : ℂ)) z + fin_cases i <;> simpa [Complex.real_smul] using h + +lemma scaleDirections_inverse (H : DirectionFields) (C : Fin 3 → ℝ) (hC : ∀ j, C j ≠ 0) : + scaleDirections (scaleDirections H (fun j => (C j)⁻¹)) C = H := by + funext j p + simp only [scaleDirections, smul_smul, mul_inv_cancel₀ (hC j), one_smul] + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..3db74d424013844ec92bb6f0e3c4c674cb025150 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ModulatedJets.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations + +namespace OAI + +/-! Exact removal of the fast phase from arbitrary ordered directional jets. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates + +def phase (τ : ℝ) (φ : Base → ℝ) (p : Base) : ℂ := + Complex.exp (Complex.I / (τ : ℂ) * (φ p : ℂ)) + +def amplitudeDerivative (τ : ℝ) (φ : Base → ℝ) (v : Base) (Z : Base → ℂ) : Base → ℂ := + fun p => fderiv ℝ Z p v + (Complex.I / (τ : ℂ) * (fderiv ℝ φ p v : ℂ)) * Z p + +def amplitudeJet (τ : ℝ) (φ : Base → ℝ) : List Base → (Base → ℂ) → Base → ℂ + | [], Z => Z + | v :: w, Z => amplitudeDerivative τ φ v (amplitudeJet τ φ w Z) + +lemma phase_smooth {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) : + ContDiff ℝ ∞ (phase τ φ) := + ((contDiff_const.mul (Complex.ofRealCLM.contDiff.comp hφ)).cexp) + +lemma amplitudeDerivative_smooth {φ : Base → ℝ} {Z : Base → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) (τ : ℝ) (v : Base) : + ContDiff ℝ ∞ (amplitudeDerivative τ φ v Z) := by + have hdZ := (hZ.fderiv_right (m := ∞) (by simp)).clm_apply (contDiff_const (c := v)) + have hdφ := (hφ.fderiv_right (m := ∞) (by simp)).clm_apply (contDiff_const (c := v)) + exact hdZ.add ((contDiff_const.mul (Complex.ofRealCLM.contDiff.comp hdφ)).mul hZ) + +lemma amplitudeJet_smooth {φ : Base → ℝ} {Z : Base → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) (τ : ℝ) (w : List Base) : + ContDiff ℝ ∞ (amplitudeJet τ φ w Z) := by + induction w with + | nil => exact hZ + | cons v w ih => exact amplitudeDerivative_smooth hφ ih τ v + +lemma derivative_phase_product {φ : Base → ℝ} {Z : Base → ℂ} {p : Base} + (hφ : DifferentiableAt ℝ φ p) (hZ : DifferentiableAt ℝ Z p) (τ : ℝ) (v : Base) : + fderiv ℝ (fun q => phase τ φ q * Z q) p v = + phase τ φ p * amplitudeDerivative τ φ v Z p := by + have hp := ((Complex.ofRealCLM.hasFDerivAt.comp p hφ.hasFDerivAt).const_mul + (Complex.I / (τ : ℂ))).cexp + have h := hp.mul hZ.hasFDerivAt + have hfun : ((fun x => Complex.exp (Complex.I / (τ : ℂ) * + (Complex.ofRealCLM ∘ φ) x)) * Z) = (fun q => phase τ φ q * Z q) := rfl + rw [← hfun, h.fderiv] + simp only [amplitudeDerivative, phase, add_apply, smul_apply, + ContinuousLinearMap.comp_apply, Complex.ofRealCLM_apply, smul_eq_mul, + Function.comp_def] + ring + +/-- Differentiating the oscillation changes its amplitude but preserves the +single phase factor, in every ordered coordinate word. -/ +theorem iterated_phase_product {φ : Base → ℝ} {Z : Base → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) (τ : ℝ) (w : List Base) : + iteratedDirectional w (fun p => phase τ φ p * Z p) = + fun p => phase τ φ p * amplitudeJet τ φ w Z p := by + induction w with + | nil => rfl + | cons v w ih => + rw [iteratedDirectional, ih] + funext p + exact derivative_phase_product (hφ.differentiable (by simp) p) + ((amplitudeJet_smooth hφ hZ τ w).differentiable (by simp) p) τ v + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermDiffeomorphism.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermDiffeomorphism.lean new file mode 100644 index 0000000000000000000000000000000000000000..f564d1679778b41e33aac5c9d5a26cf05768df9b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermDiffeomorphism.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MonotoneGermExtension + +namespace OAI + +/-! The increasing extensions are global diffeomorphisms, allowing local +arc coordinates to be joined without changing their germs. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma affine_tails_of_deriv_one {g : ℝ → ℝ} (hg : ContDiff ℝ ∞ g) + {K : Set ℝ} (hK : IsCompact K) (hd : ∀ x ∉ K, deriv g x = 1) : + ∃ R cPos cNeg : ℝ, (∀ x, R < x → g x = x+cPos) ∧ + ∀ x, x < -R → g x = x+cNeg := by + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn (continuous_id : Continuous (id : ℝ → ℝ)).continuousOn + let R := |C|+1 + have hout : ∀ x, R < |x| → x ∉ K := by + intro x hx hin + have hb := hC x hin + change ‖x‖ ≤ C at hb + rw [Real.norm_eq_abs] at hb + have hc := le_abs_self C + dsimp [R] at hx + linarith + have hplus : EqOn g (fun x => x+(g (R+1)-(R+1))) (Ioi R) := by + apply isOpen_Ioi.eqOn_of_deriv_eq (convex_Ioi R).isPreconnected + (hg.differentiable (by simp)).differentiableOn + (differentiable_id.add_const _).differentiableOn + · intro x hx + rw [hd x (hout x (lt_of_lt_of_le hx (le_abs_self x)))] + simp + · change R < R+1 + linarith + · dsimp only [id] + ring + have hminus : EqOn g (fun x => x+(g (-R-1)-(-R-1))) (Iio (-R)) := by + apply isOpen_Iio.eqOn_of_deriv_eq (convex_Iio (-R)).isPreconnected + (hg.differentiable (by simp)).differentiableOn + (differentiable_id.add_const _).differentiableOn + · intro x hx + have hxr : x < -R := hx + have habs : R < |x| := by linarith [neg_le_abs x] + rw [hd x (hout x habs)] + simp + · change -R-1 < -R + linarith + · dsimp only [id] + ring + exact ⟨R,g (R+1)-(R+1),g (-R-1)-(-R-1),fun x hx => hplus hx,fun x hx => hminus hx⟩ + +lemma surjective_of_deriv_one_off_compact {g : ℝ → ℝ} (hg : ContDiff ℝ ∞ g) + {K : Set ℝ} (hK : IsCompact K) (hd : ∀ x ∉ K, deriv g x = 1) : + Function.Surjective g := by + obtain ⟨R,cPos,cNeg,hplus,hminus⟩ := affine_tails_of_deriv_one hg hK hd + have htop : Tendsto g atTop atTop := by + apply (tendsto_atTop_add_const_right atTop cPos tendsto_id).congr' + filter_upwards [eventually_gt_atTop R] with x hx + exact (hplus x hx).symm + have hbot : Tendsto g atBot atBot := by + apply (tendsto_atBot_add_const_right atBot cNeg tendsto_id).congr' + filter_upwards [eventually_lt_atBot (-R)] with x hx + exact (hminus x hx).symm + exact hg.continuous.surjective htop hbot + +theorem increasing_smooth_germ_diffeomorphism {h : ℝ → ℝ} (hh : ContDiff ℝ ∞ h) + (a : ℝ) (ha : 0 < deriv h a) : + ∃ e : ℝ ≃ₜ ℝ, ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + StrictMono e ∧ e =ᶠ[𝓝 a] h := by + obtain ⟨g,K,hg,hmono,he,hpos,hK,hd⟩ := increasing_smooth_germ_extension hh a ha + have hsurj := surjective_of_deriv_one_off_compact hg hK hd + let e := (hmono.orderIsoOfSurjective g hsurj).toHomeomorph + have heq : (e : ℝ → ℝ) = g := rfl + refine ⟨e,by simpa only [heq] using hg,?_,by simpa only [heq] using hmono,by simpa only [heq] using he⟩ + apply e.contDiff_symm_deriv (f' := deriv g) + · intro x + exact ne_of_gt (hpos x) + · intro x + change HasDerivAt g (deriv g x) x + exact (hg.differentiable (by simp) x).hasDerivAt + · simpa only [heq] using hg + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a5d406fbbedcd1b8f90972b0a398603c0368c7b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/MonotoneGermExtension.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicPrimitive + +namespace OAI + +/-! Extending an oriented smooth coordinate germ to a globally increasing +smooth real function, with derivative one outside a compact set. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem increasing_smooth_germ_extension {h : ℝ → ℝ} (hh : ContDiff ℝ ∞ h) + (a : ℝ) (ha : 0 < deriv h a) : + ∃ (g : ℝ → ℝ) (K : Set ℝ), ContDiff ℝ ∞ g ∧ StrictMono g ∧ + g =ᶠ[𝓝 a] h ∧ (∀ x, 0 < deriv g x) ∧ IsCompact K ∧ + ∀ x ∉ K, deriv g x = 1 := by + have hd : ContDiff ℝ ∞ (deriv h) := (contDiff_infty_iff_deriv.mp hh).2 + let U := {x | 0 < deriv h x} + have hU : IsOpen U := isOpen_lt continuous_const hd.continuous + obtain ⟨W,hW,haW,hWU,φ,χ,hφ,hχ,hφc,hχc,hφr,hχr,hχs,hφs,hφone,hχone⟩ := + CollarVelocity.nested_compact_cutoffs (isCompact_singleton (x := a)) hU + (singleton_subset_iff.mpr ha) + let v : ℝ → ℝ := fun x => φ x * deriv h x + (1-φ x) + have hv : ContDiff ℝ ∞ v := (hφ.mul hd).add (contDiff_const.sub hφ) + have hvpos : ∀ x, 0 < v x := by + intro x + by_cases hx : x ∈ U + · have hdpos : 0 < deriv h x := hx + have hφnonneg := (hφr x).1 + have hφle := (hφr x).2 + by_cases hzero : φ x = 0 + · simp [v,hzero] + · have hφpos : 0 < φ x := lt_of_le_of_ne hφnonneg (Ne.symm hzero) + have hmul := mul_pos hφpos hdpos + dsimp [v] + linarith + · have hz : φ x = 0 := image_eq_zero_of_notMem_tsupport (fun hin => hx (hφs hin)) + simp [v,hz] + let g : ℝ → ℝ := fun x => h a + + PeriodicPrimitive.rawPrimitive v x - PeriodicPrimitive.rawPrimitive v a + have hg : ContDiff ℝ ∞ g := + (contDiff_const.add (PeriodicPrimitive.rawPrimitive_contDiff hv)).sub contDiff_const + have hgder : ∀ x, deriv g x = v x := by + intro x + exact (((PeriodicPrimitive.rawPrimitive_hasDerivAt hv.continuous x).const_add (h a)).sub_const _).deriv + have hag : g a = h a := by dsimp [g]; ring + obtain ⟨r,hr,hrW⟩ := Metric.isOpen_iff.mp hW a (haW (by simp)) + have heq : EqOn g h (Metric.ball a r) := by + apply isOpen_ball.eqOn_of_deriv_eq (convex_ball a r).isPreconnected + (hg.differentiable (by simp)).differentiableOn (hh.differentiable (by simp)).differentiableOn + · intro x hx + rw [hgder] + dsimp [v] + rw [hφone x (hrW hx)] + ring + · exact Metric.mem_ball_self hr + · exact hag + refine ⟨g,tsupport φ,hg,strictMono_of_deriv_pos (fun x => (hgder x) ▸ hvpos x), + heq.eventuallyEq_of_mem (isOpen_ball.mem_nhds (Metric.mem_ball_self hr)), + fun x => (hgder x) ▸ hvpos x,hφc,?_⟩ + intro x hx + rw [hgder] + have hz := image_eq_zero_of_notMem_tsupport hx + simp [v,hz] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonlinearLowJetNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonlinearLowJetNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..50e072ee886a3ac7499ec65f7e2ee4c6f42fb710 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonlinearLowJetNeighborhood.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCompositionPrefix +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetReadBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetSegment + +namespace OAI + +/-! A fixed compact admissible neighborhood for the primitive's slow maps, +obtained from the global C2 displacement estimate. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem nonlinear_lowJet_neighborhood_of_C2 (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {Q O : Set LowJet} (hQ : IsCompact Q) (hO : IsOpen O) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A.jetChartMap i F ∘ T)) S Q) : + ∃ (ρ : ℝ) (Q' : Set LowJet), 0 < ρ ∧ IsCompact Q' ∧ Q' ⊆ O ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 2 ρ (G-F) → MapsTo (lowJet (A.jetChartMap i G ∘ T)) S Q' := by + obtain ⟨r,Q',hr,hQ',_,hQ'O,hnear⟩ := exists_lowJet_segment_margin hQ hO hQO + obtain ⟨Dr,hDr,hd⟩ := A.jetPlaneRead_bound i 2 + obtain ⟨Dc,hDc,hc⟩ := compact_composition_prefix hT hS hSc 0 + let ρ := r/(1+Dc*Dr) + have hDc0 : 0 ≤ Dc := zero_le_one.trans hDc + have hρ : 0 < ρ := div_pos hr (by positivity) + refine ⟨ρ,Q',hρ,hQ',hQ'O,?_⟩ + intro G hG hclose + have hdiff := hd (G-F) (hG.sub hF) 1 ρ zero_lt_one le_rfl hρ.le hclose + have hglobal := weightedBound_comp_isometry planeCoordinateIsometry + ((A.jetChartMap_smooth i (hG.sub hF)).comp planeCoordinateIsometry.symm.contDiff) hdiff + have heq : (A.jetChartMap i (G-F) ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i (G-F) := by funext x; simp + change WeightedEstimates.WeightedBound univ 1 2 (Dr*ρ) + ((A.jetChartMap i (G-F) ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry) at hglobal + rw [heq] at hglobal + have hcomp := hc (A.jetChartMap i (G-F)) 1 (Dr*ρ) zero_lt_one (by positivity) + (A.jetChartMap_smooth i (hG.sub hF)) (fun j hj => by + simpa only [one_pow,div_one] using hglobal.mono_order (by omega : j ≤ 2)) 2 (by omega) + have hsmall : Dc*(Dr*ρ)/1^2 ≤ r := by + simp only [one_pow,div_one] + calc + Dc*(Dr*ρ) ≤ (1+Dc*Dr)*ρ := by nlinarith [hρ.le] + _ = r := by dsimp [ρ]; field_simp + have hh := hnear hS ((A.jetChartMap_smooth i hF).comp hT) + ((A.jetChartMap_smooth i (hG.sub hF)).comp hT) hFQ zero_lt_one le_rfl + (show 0 ≤ Dc*(Dr*ρ) by positivity) hsmall + (by simpa only [one_pow,div_one,Pi.sub_def] using hcomp) 1 ⟨by norm_num,le_rfl⟩ + have hsum : (fun p => (A.jetChartMap i F ∘ T) p+ + (1 : ℝ) • (A.jetChartMap i (G-F) ∘ T) p) = A.jetChartMap i G ∘ T := by + have had := A.jetChartMap_add i F (G-F) + have hfg : F+(G-F) = G := by abel + rw [hfg] at had + funext p + simpa only [one_smul,Pi.add_apply,Function.comp_apply] using congrFun had.symm (T p) + change MapsTo (lowJet (fun p => (A.jetChartMap i F ∘ T) p+ + (1 : ℝ) • (A.jetChartMap i (G-F) ∘ T) p)) S Q' at hh + rw [hsum] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonzeroGermDiffeomorphism.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonzeroGermDiffeomorphism.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cc2221e14816609ed1147477902788fc51617a9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NonzeroGermDiffeomorphism.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalMonotoneTransition + +namespace OAI + +/-! A scalar smooth coordinate with nonzero derivative has a global smooth +homeomorphism representative of either orientation. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem nonzero_smooth_germ_diffeomorphism {h : ℝ → ℝ} (hh : ContDiff ℝ ∞ h) + (a : ℝ) (ha : deriv h a ≠ 0) : + ∃ e : ℝ ≃ₜ ℝ, ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + (StrictMono e ∨ StrictAnti e) ∧ e =ᶠ[𝓝 a] h := by + rcases lt_or_gt_of_ne ha with hneg | hpos + · have hn : ContDiff ℝ ∞ (fun x => -h x) := hh.neg + have hd : 0 < deriv (fun x => -h x) a := by + rw [show (fun x => -h x) = -h from rfl, deriv.neg] + exact neg_pos.mpr hneg + obtain ⟨e,hes,hei,hem,he⟩ := increasing_smooth_germ_diffeomorphism hn a hd + let E := e.trans (Homeomorph.neg ℝ) + have hEs : ContDiff ℝ ∞ E := contDiff_neg.comp hes + have hEi : ContDiff ℝ ∞ E.symm := hei.comp contDiff_neg + have hEm : StrictAnti E := by + intro x y hxy + exact neg_lt_neg (hem hxy) + refine ⟨E,hEs,hEi,Or.inr hEm,?_⟩ + filter_upwards [he] with x hx + change -e x = h x + rw [hx,neg_neg] + · obtain ⟨e,hes,hei,hem,he⟩ := increasing_smooth_germ_diffeomorphism hh a hpos + exact ⟨e,hes,hei,Or.inl hem,he⟩ + +theorem nonzero_local_germ_diffeomorphism {h : ℝ → ℝ} {U : Set ℝ} + (hU : IsOpen U) (hh : ContDiffOn ℝ ∞ h U) {a : ℝ} + (haU : a ∈ U) (ha : deriv h a ≠ 0) : + ∃ e : ℝ ≃ₜ ℝ, ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + (StrictMono e ∨ StrictAnti e) ∧ e =ᶠ[𝓝 a] h := by + obtain ⟨W,hW,haW,_,H,hH,hEH⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := a)) hU (singleton_subset_iff.mpr haU) hh + have he : H =ᶠ[𝓝 a] h := hEH.eventuallyEq_of_mem (hW.mem_nhds (haW (by simp))) + have hd : deriv H a ≠ 0 := by rw [he.deriv_eq]; exact ha + obtain ⟨e,hes,hei,hem,hee⟩ := nonzero_smooth_germ_diffeomorphism hH a hd + exact ⟨e,hes,hei,hem,hee.trans he⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalAxisFactor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalAxisFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..f94060215e00893cdde6e2caa57b1050fc274355 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalAxisFactor.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TwoZeroAxisFactor +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneComplexFrame +import OAI.Geometry.SurfaceImmersion.Whitney.NondegenerateCrosscapDefect +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Normalizing the actual two-zero defect along its connecting axis. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem two_zero_axis_factor {N : Base → Base} {U : Set Base} (hU : IsOpen U) + (hN : ContDiffOn ℝ ∞ N U) {p q : ℝ} (hpq : p < q) + (haxis : ∀ t ∈ Icc p q, crosscapAxis t ∈ U) + (hz : ∀ x ∈ U, N x = 0 ↔ x = crosscapAxis p ∨ x = crosscapAxis q) + (hDp : Function.Bijective (fderiv ℝ N (crosscapAxis p))) + (hDq : Function.Bijective (fderiv ℝ N (crosscapAxis q))) : + ∃ (d : ℝ → Base) (W : Set ℝ), ContDiff ℝ ∞ d ∧ IsOpen W ∧ Icc p q ⊆ W ∧ + (∀ t ∈ Icc p q, d t ≠ 0) ∧ + ∀ t ∈ W, N (crosscapAxis t) = ((t-p)*(t-q)) • d t := by + let V := crosscapAxis ⁻¹' U + have hV : IsOpen V := hU.preimage crosscapAxis.continuous + have hfV : ContDiffOn ℝ ∞ (N ∘ crosscapAxis) V := + hN.comp crosscapAxis.contDiff.contDiffOn (fun _ hx => hx) + obtain ⟨W,hW,hKW,_hWV,g,hg,hge⟩ := CollarVelocity.compact_smooth_extension + (isCompact_Icc : IsCompact (Icc p q)) hV haxis hfV + have hgevent (t : ℝ) (ht : t ∈ Icc p q) : g =ᶠ[𝓝 t] N ∘ crosscapAxis := + hge.eventuallyEq_of_mem (hW.mem_nhds (hKW ht)) + have hder (t : ℝ) (ht : t ∈ Icc p q) : + deriv g t = fderiv ℝ N (crosscapAxis t) (![0,1] : Base) := by + rw [(hgevent t ht).deriv_eq] + have hd := ((hN.contDiffAt (hU.mem_nhds (haxis t ht))).differentiableAt + (by simp)).hasFDerivAt.comp_hasDerivAt t crosscapAxis.hasFDerivAt.hasDerivAt + simpa only [crosscapAxis_apply] using hd.deriv + have hp : g p = 0 := by + rw [(hgevent p (left_mem_Icc.mpr hpq.le)).self_of_nhds] + exact (hz _ (haxis p (left_mem_Icc.mpr hpq.le))).mpr (Or.inl rfl) + have hq : g q = 0 := by + rw [(hgevent q (right_mem_Icc.mpr hpq.le)).self_of_nhds] + exact (hz _ (haxis q (right_mem_Icc.mpr hpq.le))).mpr (Or.inr rfl) + have hdp : deriv g p ≠ 0 := by + rw [hder p (left_mem_Icc.mpr hpq.le)] + intro he + have h := hDp.1 (he.trans (map_zero _).symm) + have h1 := congrFun h 1 + norm_num at h1 + have hdq : deriv g q ≠ 0 := by + rw [hder q (right_mem_Icc.mpr hpq.le)] + intro he + have h := hDq.1 (he.trans (map_zero _).symm) + have h1 := congrFun h 1 + norm_num at h1 + have hzero : ∀ t ∈ Icc p q, g t = 0 → t = p ∨ t = q := by + intro t ht he + rw [(hgevent t ht).self_of_nhds] at he + rcases (hz _ (haxis t ht)).mp he with h | h + · exact Or.inl (congrFun h 1) + · exact Or.inr (congrFun h 1) + obtain ⟨d,hd,he,hn,_hdp,_hdq⟩ := nonzero_two_zero_factor hg hpq.ne hp hq hdp hdq hzero + refine ⟨d,W,hd,hW,hKW,hn,?_⟩ + intro t ht + exact (hge ht).symm.trans (he t) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e6d0ba3687356679ec6362653fc2b68f3cda1f0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectDomain.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NormalDefectCoordinates + +namespace OAI + +/-! The normal-defect coordinates exist on a genuine open neighborhood +of the entire compact crosscap strip axis. -/ +noncomputable section +open Set Filter Matrix Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def normalFrameDomain (φ : Base → ProjectionTarget 3) (a : Fin 3 → ℝ) : Set Base := + {x | transverseDerivative φ x ⨯₃ a ≠ 0} + +lemma normalFrameDomain_open {φ : Base → ProjectionTarget 3} (hφ : ContDiff ℝ ∞ φ) + (a : Fin 3 → ℝ) : IsOpen (normalFrameDomain φ a) := by + have hu : Continuous (transverseDerivative φ) := (transverseDerivative_smooth hφ).continuous + have hcross : Continuous (fun x => transverseDerivative φ x ⨯₃ a) := by + apply continuous_pi + intro i + fin_cases i <;> dsimp [cross_apply] <;> fun_prop + exact isOpen_ne.preimage hcross + +lemma normalFrameDomain_nonzero {φ : Base → ProjectionTarget 3} {a : Fin 3 → ℝ} + {x : Base} (hx : x ∈ normalFrameDomain φ a) : transverseDerivative φ x ≠ 0 := by + intro hz + apply hx + rw [hz] + simp + +lemma normalFrameDomain_transverse {φ : Base → ProjectionTarget 3} {a : Fin 3 → ℝ} + {x : Base} (hx : x ∈ normalFrameDomain φ a) : + ∀ r : ℝ, r • transverseDerivative φ x ≠ a := by + exact (LinearIndependent.pair_iff' (normalFrameDomain_nonzero hx)).mp + (crossProduct_ne_zero_iff_linearIndependent.mp hx) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +omit [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] in +lemma CrosscapCoordinateStrip.transverseDerivative_axis (S : CrosscapCoordinateStrip A) (t : ℝ) : + transverseDerivative S.model (![0,t] : Base) = S.transverseVector t := by + simp only [transverseDerivative,coordinateDifferential, + CrosscapCoordinateStrip.transverseVector,crosscapAxis_apply,ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe] + +omit [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] in +theorem CrosscapCoordinateStrip.normal_defect_rectangle (S : CrosscapCoordinateStrip A) : + ∃ (a : Fin 3 → ℝ) (δ : ℝ) (U : Set Base), 0 < δ ∧ IsOpen U ∧ U ⊆ S.domain ∧ + (∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (A.arc.start-δ) (A.arc.finish+δ), (![x,t] : Base) ∈ U) ∧ + ContDiffOn ℝ ∞ (normalDefect S.model a) U ∧ + ∀ x ∈ U, Function.Injective (fderiv ℝ S.model x) ↔ normalDefect S.model a x ≠ 0 := by + obtain ⟨a,ha⟩ := exists_curve_transverse_vector S.transverseVector S.transverseVector_smooth + let U := S.domain ∩ normalFrameDomain S.model a + have hU : IsOpen U := S.domain_open.inter (normalFrameDomain_open S.model_smooth a) + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := by + intro t ht + constructor + · apply S.rectangle 0 ⟨by linarith [S.width_pos],by linarith [S.width_pos]⟩ t + constructor <;> linarith [S.width_pos,ht.1,ht.2] + · change transverseDerivative S.model (![0,t] : Base) ⨯₃ a ≠ 0 + rw [S.transverseDerivative_axis] + exact curve_transverse_cross_ne_zero (S.transverseVector_ne_zero ht) (ha t) + obtain ⟨δ,hδ,hrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hU haxis + refine ⟨a,δ,U,hδ,hU,inter_subset_left,hrect,?_,?_⟩ + · exact normalDefect_smooth S.model_smooth (fun _ hx => normalFrameDomain_nonzero hx.2) + (fun _ hx => normalFrameDomain_transverse hx.2) + · intro x hx + exact normalDefect_immersion_iff S.model a x (normalFrameDomain_nonzero hx.2) + (normalFrameDomain_transverse hx.2) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..1627722856d16eeb80d01ec2bbc7d8100923bc02 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDefectJet.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalFrameJet +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionJet + +namespace OAI + +/-! Differentiating the genuine normal defect at a singular point. +The derivative of the moving frame cancels because the vertical column is zero. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma normalDefect_fderiv_at_zero {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (a : Fin 3 → ℝ) (p : Base) + (hu : transverseDerivative φ p ≠ 0) + (ha : ∀ r : ℝ, r • transverseDerivative φ p ≠ a) + (hz : fderiv ℝ φ p (![0,1] : Base) = 0) : + fderiv ℝ (normalDefect φ a) p = (ContinuousLinearMap.fst ℝ Base ℝ).comp + ((curveNormalLinear (transverseDerivative φ p) a).inverse.comp + (fderiv ℝ (fun x => coordinateDifferential φ x (![0,1] : Base)) p)) := by + let J := fun x => (curveNormalLinear (transverseDerivative φ x) a).inverse + let W := fun x => coordinateDifferential φ x (![0,1] : Base) + have hU := transverseDerivative_smooth hφ + have hcross : ContDiff ℝ ∞ (fun x => transverseDerivative φ x ⨯₃ a) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [cross_apply] <;> fun_prop + have hframe : ContDiff ℝ ∞ (fun x => curveNormalLinear (transverseDerivative φ x) a) := + ((contDiff_const.smulRight hU).add contDiff_const).add (contDiff_const.smulRight hcross) + have hJ : ContDiffAt ℝ ∞ J p := by + change ContDiffAt ℝ ∞ (ContinuousLinearMap.inverse ∘ + (fun x => curveNormalLinear (transverseDerivative φ x) a)) p + exact (curveNormalLinear_invertible hu ha).contDiffAt_map_inverse.comp p hframe.contDiffAt + have hW : ContDiff ℝ ∞ W := (coordinateDifferential_smooth hφ).clm_apply contDiff_const + have hWp : W p = 0 := by simp [W,coordinateDifferential,hz] + have hd := (hJ.differentiableAt (by simp)).hasFDerivAt.clm_apply + (hW.differentiable (by simp) p).hasFDerivAt + have he := hd.fst.fderiv + have hfun : (fun x => (J x (W x)).1) = normalDefect φ a := rfl + rw [hfun] at he + apply ContinuousLinearMap.ext + intro v + have hev := congrArg (fun L => L v) he + simpa [J,W,hWp,ContinuousLinearMap.comp_apply,ContinuousLinearMap.flip_apply] using hev + +lemma normalDefect_jet_bijective {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (a : Fin 3 → ℝ) (p : Base) + (hu : transverseDerivative φ p ≠ 0) + (ha : ∀ r : ℝ, r • transverseDerivative φ p ≠ a) + (hz : fderiv ℝ φ p (![0,1] : Base) = 0) + (hK : Function.Bijective (directionBlock + (fderiv ℝ (fun x => coordinateDifferential φ x (![0,1] : Base)) p) + (transverseDerivative φ p))) : + Function.Bijective (fderiv ℝ (normalDefect φ a) p) := by + rw [normalDefect_fderiv_at_zero hφ a p hu ha hz] + exact normal_frame_jet_bijective hu ha _ hK + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDenominatorMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDenominatorMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fa50f02c219c93a5df3b5ca167527ebd9861148 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalDenominatorMargins.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFrameEnvelope + +namespace OAI + +/-! Convert geometric lower margins into the reciprocal bounds used by the +quantitative reconstruction and normal-frame estimates. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +lemma norm_le_sqrt_dot_self (V : RVec 4) : ‖V‖ ≤ Real.sqrt (V ⬝ᵥ V) := by + have hd : 0 ≤ V ⬝ᵥ V := Finset.sum_nonneg fun i _ => mul_self_nonneg (V i) + apply (pi_norm_le_iff_of_nonneg (Real.sqrt_nonneg _)).mpr + intro i + apply (sq_le_sq₀ (norm_nonneg _) (Real.sqrt_nonneg _)).mp + rw [Real.sq_sqrt hd,Real.norm_eq_abs,sq_abs] + simpa only [pow_two,dotProduct] using + (Finset.single_le_sum (fun j _ => mul_self_nonneg (V j)) (Finset.mem_univ i)) + +lemma norm_inv_dot_self_le {V : RVec 4} {b : ℝ} (hb : 0 < b) (hV : b ≤ ‖V‖) : + ‖(V ⬝ᵥ V)⁻¹‖ ≤ (b^2)⁻¹ := by + have hd : 0 ≤ V ⬝ᵥ V := Finset.sum_nonneg fun i _ => mul_self_nonneg (V i) + have hs : b ≤ Real.sqrt (V ⬝ᵥ V) := hV.trans (norm_le_sqrt_dot_self V) + have hsq : b^2 ≤ V ⬝ᵥ V := by + nlinarith [Real.sq_sqrt hd] + rw [Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr hd)] + exact (inv_le_inv₀ ((sq_pos_of_pos hb).trans_le hsq) (sq_pos_of_pos hb)).mpr hsq + +theorem frame_bounds_of_geometric_margins (m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {U : Set Base} {F : RField 4}, ContDiff ℝ ∞ F → RealModeDomain F U → + ∀ {s B c b : ℝ}, 0 < s → 1 ≤ B → 0 < c → 0 < b → + c⁻¹ ≤ B → (b^2)⁻¹ ≤ B → WeightedBound U s m B (realTwoJet F) → + (∀ x ∈ U, c ≤ NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x)) → + (∀ x ∈ U, b ≤ ‖realSecond F x‖) → + ReconstructionCoefficientBound (fun x => complexify (F x)) U s m (A*B^d) ∧ + WeightedBound U s m (A*B^d) (freeNormal F) := by + obtain ⟨d,A,hA,hbound⟩ := polynomial_frame_envelope m + refine ⟨d,A,hA,?_⟩ + intro U F hF hU s B c b hs hB hc hb hcB hbB hjet hG hN + apply hbound hF hU hs hB hjet + · intro x hx + have hg := hc.trans_le (hG x hx) + rw [Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hg)] + exact ((inv_le_inv₀ hg hc).mpr (hG x hx)).trans hcB + · intro x hx + exact (norm_inv_dot_self_le hb (hN x hx)).trans hbB + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFormDirectionRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFormDirectionRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a0d329dde6267de3d6b89c086627f17d78f747b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFormDirectionRegularity.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapComposedDirection + +namespace OAI + +/-! Smooth source and target coordinates preserve the nondegenerate +derivative-direction zero of an actual standard crosscap. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma axisDirectionJet_congr_germ {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + {f g : Base → V} {p : Base} (h : f =ᶠ[𝓝 p] g) : + axisDirectionJet f p = axisDirectionJet g p := by + simp only [axisDirectionJet,h.fderiv_eq,h.fderiv.fderiv_eq] + +lemma normal_form_direction_regularity {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) {g : Base → Base} (hg : ContDiff ℝ ∞ g) + {H : Base × ℝ → ProjectionTarget 3} (hH : ContDiff ℝ ∞ H) (p : Base) + (hp : g p = 0) (hgD : Function.Bijective (fderiv ℝ g p)) + (hHD : Function.Bijective (fderiv ℝ H 0)) + (hEq : φ =ᶠ[𝓝 p] H ∘ (standardCrosscap ∘ g)) + (hv : fderiv ℝ φ p (![0,1] : Base) = 0) : + Function.Bijective (fderiv ℝ (surfaceDirection φ true) (p,0)) := by + let G := standardCrosscap ∘ g + have hG : ContDiff ℝ ∞ G := standardCrosscap_smooth.comp hg + have hstd0 : standardCrosscap (0:Base) = 0 := by + apply Prod.ext + · ext i; fin_cases i <;> simp [standardCrosscap] + · simp [standardCrosscap] + have hGp : G p = 0 := by change standardCrosscap (g p) = 0; rw [hp,hstd0] + have hfirst : fderiv ℝ φ p (![0,1] : Base) = fderiv ℝ H 0 + (standardCrosscapDerivative 0 (fderiv ℝ g p (![0,1] : Base))) := by + rw [hEq.fderiv_eq,fderiv_comp p (hH.differentiable (by simp) _) (hG.differentiable (by simp) p)] + change fderiv ℝ H (G p) (fderiv ℝ (standardCrosscap ∘ g) p (![0,1] : Base)) = _ + rw [hGp,fderiv_comp p (standardCrosscap_smooth.differentiable (by simp) _) (hg.differentiable (by simp) p), + hp,(standardCrosscap_hasFDerivAt 0).fderiv] + rfl + have hy : fderiv ℝ g p (![0,1] : Base) 0 = 0 := by + have hh := hHD.1 (hfirst.symm.trans (hv.trans (map_zero _).symm)) + simpa [standardCrosscapDerivative] using congrArg Prod.snd hh + have hGv : fderiv ℝ G p (![0,1] : Base) = 0 := by + change fderiv ℝ (standardCrosscap ∘ g) p (![0,1] : Base) = 0 + rw [fderiv_comp p (standardCrosscap_smooth.differentiable (by simp) _) (hg.differentiable (by simp) p), + hp,(standardCrosscap_hasFDerivAt 0).fderiv] + apply Prod.ext + · ext i; fin_cases i <;> simp [standardCrosscapDerivative] + · simpa [standardCrosscapDerivative] using hy + rw [axisDirectionJet_surfaceDirection hφ,axisDirectionJet_congr_germ hEq, + axisDirectionJet_postcompose hG hH p hGv,hGp] + exact hHD.comp (crosscap_composed_direction_bijective hg p hp hgD hy) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..7310a61c3fd71757eccb0108235d6b064f3d52b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameJet.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NormalDefectCoordinates + +namespace OAI + +/-! A regular three-dimensional direction jet induces a regular +normal-defect jet in the transverse two-plane. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def directionBlock (K : Base →L[ℝ] (Fin 3 → ℝ)) (u : Fin 3 → ℝ) : + (Base × ℝ) →L[ℝ] (Fin 3 → ℝ) := + K.comp (ContinuousLinearMap.fst ℝ Base ℝ) + (ContinuousLinearMap.snd ℝ Base ℝ).smulRight u + +lemma directionBlock_apply (K : Base →L[ℝ] (Fin 3 → ℝ)) (u : Fin 3 → ℝ) (z : Base × ℝ) : + directionBlock K u z = K z.1 + z.2 • u := rfl + +lemma normal_frame_jet_bijective {u a : Fin 3 → ℝ} (hu : u ≠ 0) + (ha : ∀ r : ℝ, r • u ≠ a) (K : Base →L[ℝ] (Fin 3 → ℝ)) + (hK : Function.Bijective (directionBlock K u)) : + Function.Bijective ((ContinuousLinearMap.fst ℝ Base ℝ).comp + ((curveNormalLinear u a).inverse.comp K)) := by + let F := curveNormalLinear u a + let J := F.inverse + let P := (ContinuousLinearMap.fst ℝ Base ℝ).comp (J.comp K) + have hI : F.IsInvertible := curveNormalLinear_invertible hu ha + have hJu : J u = ((0:Base),1) := curveNormalLinear_inverse_velocity hu ha + have hJinj : Function.Injective J := by + intro v w he + have hh := congrArg F he + change F (F.inverse v) = F (F.inverse w) at hh + simpa only [hI.self_apply_inverse] using hh + have hnormal : ∀ z : Base × ℝ, (J (directionBlock K u z)).1 = P z.1 := by + intro z + rw [directionBlock_apply,map_add,map_smul,hJu] + simp [P] + change Function.Bijective P + constructor + · intro v w he + have hz : P (v-w) = 0 := by rw [map_sub,he,sub_self] + let z : Base × ℝ := (v-w,-(J (K (v-w))).2) + have hzero : directionBlock K u z = 0 := by + apply hJinj + rw [map_zero,directionBlock_apply,map_add,map_smul,hJu] + apply Prod.ext + · simpa [P,z] using hz + · simp [z] + have hzz := hK.1 (hzero.trans (map_zero _).symm) + have hdiff : v-w = 0 := congrArg Prod.fst hzz + exact sub_eq_zero.mp hdiff + · intro v + obtain ⟨z,hz⟩ := hK.2 (F (v,0)) + refine ⟨z.1,?_⟩ + rw [← hnormal,hz,hI.inverse_apply_self] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..0da88b241b813d032fd372aaa51ad9c0fedaf470 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalFrameTransport.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RelativeFramePatching +import OAI.Geometry.SurfaceImmersion.Atlas.NormalDefectCoordinates +import OAI.Geometry.SurfaceImmersion.Whitney.NormalizedFramedAxis + +namespace OAI + +/-! Exact algebra transporting a filled normalized frame to the derivative +of the original surface map. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def longitudinalShear (c : ℝ) : Base →L[ℝ] Base := + ContinuousLinearMap.id ℝ Base+(ContinuousLinearMap.proj 1).smulRight (![c,0] : Base) + +lemma longitudinalShear_injective (c : ℝ) : Function.Injective (longitudinalShear c) := by + intro u v he + have h1 : u 1 = v 1 := by simpa [longitudinalShear] using congrFun he 1 + have h0 : u 0+u 1*c = v 0+v 1*c := congrFun he 0 + rw [h1] at h0 + ext i + fin_cases i + · exact add_right_cancel h0 + · exact h1 + +lemma longitudinalShear_smooth : ContDiff ℝ ∞ longitudinalShear := by + have h : ContDiff ℝ ∞ (fun c : ℝ => (![c,0] : Base)) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp <;> fun_prop + exact contDiff_const.add (contDiff_const.smulRight h) + +lemma defectFrame_shear_apply (N : Base → Base) (x : Base) (c : ℝ) (v : Base) : + defectFrame N x (longitudinalShear c v) = ![v 0+v 1*c,v 1*N x 0,v 1*N x 1] := by + ext i + fin_cases i <;> simp [defectFrame,axisNormalFrame,longitudinalShear,Matrix.vecHead,Matrix.vecTail] + +def normalOutput (d : Base) : FrameTarget →L[ℝ] (Base × ℝ) := + (ContinuousLinearMap.proj 0).smulRight ((0:Base),1)+ + (ContinuousLinearMap.proj 1).smulRight (planeComplexFrame d (![1,0] : Base),0)+ + (ContinuousLinearMap.proj 2).smulRight (planeComplexFrame d (![0,1] : Base),0) + +lemma normalOutput_apply (d : Base) (v : FrameTarget) : + normalOutput d v = (planeComplexFrame d ![v 1,v 2],v 0) := by + apply Prod.ext + · ext i + fin_cases i <;> simp [normalOutput,planeComplexFrame_apply] <;> ring + · simp [normalOutput] + +lemma normalOutput_injective {d : Base} (hd : d ≠ 0) : Function.Injective (normalOutput d) := by + intro u v he + rw [normalOutput_apply,normalOutput_apply] at he + have h12 := (planeComplexFrame_invertible hd).injective (congrArg Prod.fst he) + ext i + fin_cases i + · exact congrArg Prod.snd he + · exact congrFun h12 0 + · exact congrFun h12 1 + +lemma normalOutput_smooth : ContDiff ℝ ∞ normalOutput := by + exact (contDiff_const.add (contDiff_const.smulRight + ((planeComplexFrame_smooth.clm_apply contDiff_const).prodMk contDiff_const))).add + (contDiff_const.smulRight + ((planeComplexFrame_smooth.clm_apply contDiff_const).prodMk contDiff_const)) + +lemma frameTarget_plane_columns (L : Base →L[ℝ] FrameTarget) : + L = (ContinuousLinearMap.proj 0).smulRight (L (![1,0] : Base))+ + (ContinuousLinearMap.proj 1).smulRight (L (![0,1] : Base)) := by + ext v : 1 + have hv : v = v 0 • (![1,0] : Base)+v 1 • (![0,1] : Base) := by + ext i + fin_cases i <;> simp + conv_lhs => rw [hv] + rw [map_add,map_smul,map_smul] + rfl + +def longitudinalCoefficient (φ : Base → ProjectionTarget 3) (a : FrameTarget) (x : Base) : ℝ := + ((curveNormalLinear (transverseDerivative φ x) a).inverse + (coordinateDifferential φ x (![0,1] : Base))).2 + +def transportedNormalFrame (φ : Base → ProjectionTarget 3) (a : FrameTarget) + (d : ℝ → Base) (B : Base → Base →L[ℝ] FrameTarget) (x : Base) : + Base →L[ℝ] FrameTarget := + (curveNormalLinear (transverseDerivative φ x) a).comp + ((normalOutput (d (x 1))).comp ((B x).comp (longitudinalShear (longitudinalCoefficient φ a x)))) + +lemma transportedNormalFrame_injective {φ : Base → ProjectionTarget 3} {a : FrameTarget} + {d : ℝ → Base} {B : Base → Base →L[ℝ] FrameTarget} {x : Base} + (hu : transverseDerivative φ x ≠ 0) (ha : ∀ r : ℝ, r • transverseDerivative φ x ≠ a) + (hd : d (x 1) ≠ 0) (hB : Function.Injective (B x)) : + Function.Injective (transportedNormalFrame φ a d B x) := + (curveNormalLinear_bijective hu ha).1.comp ((normalOutput_injective hd).comp + (hB.comp (longitudinalShear_injective _))) + +lemma transportedNormalFrame_exact (φ : Base → ProjectionTarget 3) (a : FrameTarget) + (d : ℝ → Base) (x : Base) (hu : transverseDerivative φ x ≠ 0) + (ha : ∀ r : ℝ, r • transverseDerivative φ x ≠ a) (hd : d (x 1) ≠ 0) : + transportedNormalFrame φ a d (defectFrame (axisNormalizedDefect d (normalDefect φ a))) x = + coordinateDifferential φ x := by + let T := curveNormalLinear (transverseDerivative φ x) a + have hT := curveNormalLinear_invertible hu ha + have hP := planeComplexFrame_invertible hd + have hL := frameTarget_plane_columns (coordinateDifferential φ x) + rw [hL] + ext v : 1 + change T (normalOutput (d (x 1)) + (defectFrame (axisNormalizedDefect d (normalDefect φ a)) x (longitudinalShear (longitudinalCoefficient φ a x) v))) = _ + rw [defectFrame_shear_apply,normalOutput_apply] + have he : planeComplexFrame (d (x 1)) (axisNormalizedDefect d (normalDefect φ a) x) = normalDefect φ a x := + hP.self_apply_inverse _ + have hz : (![v 1 * axisNormalizedDefect d (normalDefect φ a) x 0, + v 1 * axisNormalizedDefect d (normalDefect φ a) x 1] : Base) = + v 1 • axisNormalizedDefect d (normalDefect φ a) x := by ext i; fin_cases i <;> rfl + change T (planeComplexFrame (d (x 1)) + ![v 1 * axisNormalizedDefect d (normalDefect φ a) x 0, + v 1 * axisNormalizedDefect d (normalDefect φ a) x 1], + v 0+v 1*longitudinalCoefficient φ a x) = _ + rw [hz,map_smul,he] + have hepair : (v 1 • normalDefect φ a x,v 0+v 1*longitudinalCoefficient φ a x) = + v 0 • ((0:Base),1)+v 1 • T.inverse (coordinateDifferential φ x ![0,1]) := by + apply Prod.ext + · simp [normalDefect,T] + · simp [longitudinalCoefficient,T] + rw [hepair,map_add,map_smul,map_smul,hT.self_apply_inverse] + have hvel : T ((0:Base),1) = coordinateDifferential φ x ![1,0] := by + simp [T,curveNormalLinear_apply,transverseDerivative] + rw [hvel] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalInterpolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e52a898ce092856a67f9c23f028f5b3d6b88998 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalInterpolation.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityFrame + +namespace OAI + +/-! Convex interpolation of unit normals on the exterior collar retains +normality and every strictly positive pairing along the later curves. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +lemma dot_gt_neg_one_of_ne_antipode {u v : Vec} + (hu : u ⬝ᵥ u = 1) (hv : v ⬝ᵥ v = 1) (hne : u ≠ -v) : -1 < u ⬝ᵥ v := by + have hsum : u+v ≠ 0 := by + intro hz + exact hne (eq_neg_of_add_eq_zero_left hz) + have hp := dot_self_pos hsum + simp only [add_dotProduct,dotProduct_add,hu,hv,dotProduct_comm v u] at hp + linarith + +lemma first_pairing_pos {u v w : Vec} {t : ℝ} + (ht : t ∈ Icc (0 : ℝ) 1) (hu : 0 < w ⬝ᵥ u) (hv : 0 < w ⬝ᵥ v) : + 0 < w ⬝ᵥ first u v t := by + have hp : 0 < w ⬝ᵥ blend u v t := by + simp only [blend,dotProduct_add,dotProduct_smul,smul_eq_mul] + by_cases ht0 : t = 0 + · simpa only [ht0,sub_zero,one_mul,zero_mul,add_zero] using hu + · exact add_pos_of_nonneg_of_pos + (mul_nonneg (sub_nonneg.mpr ht.2) hu.le) (mul_pos (lt_of_le_of_ne ht.1 (Ne.symm ht0)) hv) + have hn : blend u v t ≠ 0 := by + intro hz + rw [hz,dotProduct_zero] at hp + exact lt_irrefl 0 hp + change 0 < w ⬝ᵥ normalize (blend u v t) + rw [normalize,dotProduct_smul] + exact mul_pos (inv_pos.mpr (Real.sqrt_pos.mpr (dot_self_pos hn))) hp + +theorem normal_interpolation {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {U : Set E} (hU : IsOpen U) {u v : E → Vec} {t : E → ℝ} + (hu : ContDiffOn ℝ ∞ u U) (hv : ContDiffOn ℝ ∞ v U) (ht : ContDiffOn ℝ ∞ t U) + (hu1 : ∀ x ∈ U, u x ⬝ᵥ u x = 1) (hv1 : ∀ x ∈ U, v x ⬝ᵥ v x = 1) + (hne : ∀ x ∈ U, u x ≠ -v x) (htr : ∀ x ∈ U, t x ∈ Icc (0 : ℝ) 1) : + let n := fun x => first (u x) (v x) (t x) + ContDiffOn ℝ ∞ n U ∧ (∀ x ∈ U, n x ⬝ᵥ n x = 1) ∧ + (∀ x ∈ U, t x = 0 → n x = u x) ∧ + (∀ x ∈ U, t x = 1 → n x = v x) ∧ + (∀ x ∈ U, ∀ w : Vec, w ⬝ᵥ u x = 0 → w ⬝ᵥ v x = 0 → w ⬝ᵥ n x = 0) ∧ + (∀ x ∈ U, ∀ w : Vec, 0 < w ⬝ᵥ u x → 0 < w ⬝ᵥ v x → 0 < w ⬝ᵥ n x) := by + dsimp only + have hdot (x : E) (hx : x ∈ U) : -1 < u x ⬝ᵥ v x := + dot_gt_neg_one_of_ne_antipode (hu1 x hx) (hv1 x hx) (hne x hx) + refine ⟨?_,?_,?_,?_,?_,?_⟩ + · intro x hx + exact (first_smoothAt (hu.contDiffAt (hU.mem_nhds hx)) + (hv.contDiffAt (hU.mem_nhds hx)) (ht.contDiffAt (hU.mem_nhds hx)) + (hu1 x hx) (hv1 x hx) (hdot x hx) (htr x hx)).contDiffWithinAt + · intro x hx + exact first_unit (hu1 x hx) (hv1 x hx) (hdot x hx) (htr x hx) + · intro x hx hzero + rw [hzero,first_zero (hu1 x hx)] + · intro x hx hone + rw [hone,first_one (hv1 x hx)] + · intro x _ w hwu hwv + exact first_perp hwu hwv _ + · intro x hx w hwu hwv + exact first_pairing_pos (htr x hx) hwu hwv + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalPlaneFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalPlaneFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fd87aa921e4ad579f336512ff250f24acc710e9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalPlaneFrame.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapFrameHomotopy + +namespace OAI + +/-! The reduced crosscap frame and its positive rescalings in the normal plane. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def normalPlaneFrame (w : Base) : Base →L[ℝ] (Base × ℝ) := + (ContinuousLinearMap.proj 0).smulRight ((0,1) : Base × ℝ) + + (ContinuousLinearMap.proj 1).smulRight (w,0) + +lemma normalPlaneFrame_apply (w v : Base) : + normalPlaneFrame w v = (v 1 • w,v 0) := by + apply Prod.ext <;> simp [normalPlaneFrame] + +lemma normalPlaneFrame_smooth : ContDiff ℝ ∞ normalPlaneFrame := by + exact contDiff_const.add (contDiff_const.smulRight (contDiff_id.prodMk contDiff_const)) + +lemma normalPlaneFrame_injective_iff (w : Base) : + Function.Injective (normalPlaneFrame w) ↔ w ≠ 0 := by + constructor + · intro hi hw + have he : normalPlaneFrame w (![0,1] : Base) = normalPlaneFrame w 0 := by + simp [hw,normalPlaneFrame_apply] + have hh := congrFun (hi he) 1 + norm_num at hh + · intro hw u v he + have h0 : u 0 = v 0 := by simpa only [normalPlaneFrame_apply] using congrArg Prod.snd he + have hn : (u 1-v 1) • w = 0 := by + rw [sub_smul,sub_eq_zero] + simpa only [normalPlaneFrame_apply] using congrArg Prod.fst he + have h1 : u 1 = v 1 := sub_eq_zero.mp ((smul_eq_zero.mp hn).resolve_right hw) + ext i + fin_cases i + · exact h0 + · exact h1 + +lemma crosscapFrameHomotopy_zero_frame (x : Base) : + crosscapFrameHomotopy 0 x = normalPlaneFrame ![x 0,2*x 1] := by + ext v : 1 + rw [crosscapFrameHomotopy_zero,normalPlaneFrame_apply] + +def positiveNormalFrame (k : ℝ) (x : Base) : Base →L[ℝ] (Base × ℝ) := + normalPlaneFrame ![x 0,k*x 1] + +lemma positiveNormalFrame_injective {k : ℝ} (hk : 0 < k) (x : Base) : + Function.Injective (positiveNormalFrame k x) ↔ x ≠ 0 := by + rw [positiveNormalFrame,normalPlaneFrame_injective_iff] + constructor + · intro hn hx + apply hn + subst x + ext i + fin_cases i <;> simp + · intro hx hn + apply hx + have h0 : x 0 = 0 := congrFun hn 0 + have h1 : k*x 1 = 0 := congrFun hn 1 + have hx1 : x 1 = 0 := (mul_eq_zero.mp h1).resolve_left hk.ne' + ext i + fin_cases i + · exact h0 + · exact hx1 + +lemma positiveNormalFrame_homotopy (s : ℝ) (hs : s ∈ Icc (0:ℝ) 1) (x : Base) : + Function.Injective (positiveNormalFrame (2-s) x) ↔ x ≠ 0 := + positiveNormalFrame_injective (by linarith [hs.2]) x + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3a37269cd4dbea888aeab6b453983912d0abb3d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationBounds.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Normalization preserves a uniform C2 budget when the image stays in a +fixed compact set separated from the origin. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SphericalJets +open WeightedEstimates + +theorem compact_normalization_C2_bound {K : Set Space} (hK : IsCompact K) + (hK0 : ∀ x ∈ K, x ≠ 0) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (U : Set Plane), UniqueDiffOn ℝ U → + ∀ (F : Plane → Space) (C : ℝ), 1 ≤ C → ContDiffOn ℝ ∞ F U → + MapsTo F U K → WeightedBound U 1 2 C F → + WeightedBound U 1 2 (2*D*C^2) (radialNormalize ∘ F) := by + let V : Set Space := {x | x ≠ 0} + have hV : IsOpen V := isOpen_ne_fun continuous_id continuous_const + have hn : ContDiffOn ℝ ∞ radialNormalize V := + fun x hx => (radialNormalize_smoothAt hx).contDiffWithinAt + obtain ⟨D,hD,hb⟩ := compact_coefficient_bound hV.uniqueDiffOn hK hK0 hn 2 + refine ⟨D,hD,?_⟩ + intro U hU F C hC hF hFK hFC + have hc := hFC.comp hU hV.uniqueDiffOn zero_lt_one hC (zero_le_one.trans hD) + hF hn (fun x hx => hK0 _ (hFK hx)) (fun j hj x hx => hb j hj (F x) (hFK hx)) + simpa using hc + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..6039d948dc74d5ae2d9a36a17f76c5283af261c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizationStability.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Uniform C1 stability of radial normalization along a compact family +of spherical first jets. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +abbrev FirstJet := Space × (Plane →L[ℝ] Space) + +def normalizeFirstJet (J : FirstJet) : FirstJet := + (radialNormalize J.1,(fderiv ℝ radialNormalize J.1).comp J.2) + +lemma normalizeFirstJet_continuousAt {J : FirstJet} (hJ : J.1 ≠ 0) : + ContinuousAt normalizeFirstJet J := by + have h := radialNormalize_smoothAt hJ + exact (h.continuousAt.comp continuousAt_fst).prodMk + (((h.fderiv_right (m := ∞) (by simp)).continuousAt.comp continuousAt_fst).clm_comp + continuousAt_snd) + +lemma normalizeFirstJet_fixed {J : FirstJet} (hu : ‖J.1‖ = 1) + (ht : ∀ v, inner ℝ J.1 (J.2 v) = 0) : normalizeFirstJet J = J := by + apply Prod.ext + · simp [normalizeFirstJet,radialNormalize,hu] + · apply ContinuousLinearMap.ext + intro v + change fderiv ℝ radialNormalize J.1 (J.2 v) = J.2 v + rw [radialNormalize_fderiv_unit hu,ht v,zero_smul,sub_zero] + +theorem compact_normalization_C1_stability {X : Type*} [TopologicalSpace X] [CompactSpace X] + (F : X → Space) (L : X → Plane →L[ℝ] Space) (hF : Continuous F) (hL : Continuous L) + (hu : ∀ x, ‖F x‖ = 1) (ht : ∀ x v, inner ℝ (F x) (L x v) = 0) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x, ∀ (Y : Space) (A : Plane →L[ℝ] Space), + ‖Y-F x‖ < δ → ‖A-L x‖ < δ → + Y ≠ 0 ∧ ‖radialNormalize Y-F x‖ < ε ∧ + ‖(fderiv ℝ radialNormalize Y).comp A-L x‖ < ε := by + let J : X → FirstJet := fun x => (F x,L x) + have hJ : Continuous J := hF.prodMk hL + let U : Set FirstJet := {J | J.1 ≠ 0} + have hU : IsOpen U := isOpen_ne_fun continuous_fst continuous_const + have hJU : range J ⊆ U := by + rintro _ ⟨x,rfl⟩ + change F x ≠ 0 + intro hz + have hh := hu x + simp [hz] at hh + have hK := isCompact_range hJ + obtain ⟨r,hr,hrs⟩ := hK.exists_cthickening_subset_open hU hJU + have hc : ContinuousOn normalizeFirstJet (Metric.cthickening r (range J)) := + fun z hz => (normalizeFirstJet_continuousAt (hrs hz)).continuousWithinAt + obtain ⟨d,hd,hclose⟩ := Metric.uniformContinuousOn_iff.mp + (hK.cthickening.uniformContinuousOn_of_continuous hc) ε hε + refine ⟨min r d,lt_min hr hd,?_⟩ + intro x Y A hY hA + let H : FirstJet := (Y,A) + have hHJ : ‖H-J x‖ < min r d := by + change max ‖Y-F x‖ ‖A-L x‖ < min r d + exact max_lt hY hA + have hH : H ∈ Metric.cthickening r (range J) := + Metric.thickening_subset_cthickening r (range J) + (Metric.mem_thickening_iff.mpr ⟨J x,mem_range_self x,by + simpa only [dist_eq_norm] using hHJ.trans_le (min_le_left r d)⟩) + have hh := hclose H hH (J x) + (Metric.self_subset_cthickening (range J) (mem_range_self x)) (by + simpa only [dist_eq_norm] using hHJ.trans_le (min_le_right r d)) + have hfix : normalizeFirstJet (J x) = J x := normalizeFirstJet_fixed (hu x) (ht x) + rw [hfix,dist_eq_norm] at hh + change ‖(radialNormalize Y-F x,(fderiv ℝ radialNormalize Y).comp A-L x)‖ < ε at hh + exact ⟨hrs hH,(norm_fst_le _).trans_lt hh,(norm_snd_le _).trans_lt hh⟩ + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizeFrameColumn.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizeFrameColumn.lean new file mode 100644 index 0000000000000000000000000000000000000000..46ef0e474046b7f30a64dd18f702b78801a4406c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizeFrameColumn.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ShiftedRotationFrame + +namespace OAI + +/-! Positive normalization of the first column of a smooth rank-two frame. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def scaleFirstInput (r : ℝ) : Base →L[ℝ] Base := + (ContinuousLinearMap.proj 0).smulRight (![r,0] : Base)+ + (ContinuousLinearMap.proj 1).smulRight (![0,1] : Base) + +lemma scaleFirstInput_apply (r : ℝ) (v : Base) : + scaleFirstInput r v = ![r*v 0,v 1] := by + ext i + fin_cases i <;> simp [scaleFirstInput,mul_comm] + +lemma scaleFirstInput_injective {r : ℝ} (hr : r ≠ 0) : + Function.Injective (scaleFirstInput r) := by + intro u v he + rw [scaleFirstInput_apply,scaleFirstInput_apply] at he + have h0 : u 0 = v 0 := mul_left_cancel₀ hr (congrFun he 0) + have h1 : u 1 = v 1 := congrFun he 1 + ext i + fin_cases i + · exact h0 + · exact h1 + +lemma scaleFirstInput_smooth : ContDiff ℝ ∞ scaleFirstInput := by + have hV : ContDiff ℝ ∞ (fun r : ℝ => (![r,0] : Base)) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact contDiff_id + · exact contDiff_const + exact (contDiff_const.smulRight hV).add contDiff_const + +def firstColumnLength (L : Base →L[ℝ] FrameTarget) : ℝ := + Real.sqrt ((L (![1,0] : Base) 0)^2+(L (![1,0] : Base) 1)^2+(L (![1,0] : Base) 2)^2) + +def normalizeFrameColumn (L : Base →L[ℝ] FrameTarget) : Base →L[ℝ] FrameTarget := + L.comp (scaleFirstInput (firstColumnLength L)⁻¹) + +lemma firstColumnLength_pos {L : Base →L[ℝ] FrameTarget} (hL : Function.Injective L) : + 0 < firstColumnLength L := by + apply Real.sqrt_pos.mpr + by_contra hn + have hs : (L (![1,0] : Base) 0)^2+(L (![1,0] : Base) 1)^2+(L (![1,0] : Base) 2)^2 ≤ 0 := + le_of_not_gt hn + have h0 : L (![1,0] : Base) 0 = 0 := by nlinarith [sq_nonneg (L ![1,0] 0),sq_nonneg (L ![1,0] 1),sq_nonneg (L ![1,0] 2)] + have h1 : L (![1,0] : Base) 1 = 0 := by nlinarith [sq_nonneg (L ![1,0] 0),sq_nonneg (L ![1,0] 1),sq_nonneg (L ![1,0] 2)] + have h2 : L (![1,0] : Base) 2 = 0 := by nlinarith [sq_nonneg (L ![1,0] 0),sq_nonneg (L ![1,0] 1),sq_nonneg (L ![1,0] 2)] + have hz : L (![1,0] : Base) = L 0 := by + rw [map_zero] + ext i + fin_cases i + · exact h0 + · exact h1 + · exact h2 + have he := congrFun (hL hz) 0 + norm_num at he + +lemma normalizeFrameColumn_injective {L : Base →L[ℝ] FrameTarget} (hL : Function.Injective L) : + Function.Injective (normalizeFrameColumn L) := + hL.comp (scaleFirstInput_injective (inv_ne_zero (firstColumnLength_pos hL).ne')) + +lemma firstColumnLength_smooth {A : Base → Base →L[ℝ] FrameTarget} (hA : ContDiff ℝ ∞ A) + (hI : ∀ x, Function.Injective (A x)) : ContDiff ℝ ∞ (fun x => firstColumnLength (A x)) := by + have hv := hA.clm_apply (contDiff_const (c := (![1,0] : Base))) + have h0 : ContDiff ℝ ∞ (fun x => (A x) (![1,0] : Base) 0) := (contDiff_apply ℝ ℝ 0).comp hv + have h1 : ContDiff ℝ ∞ (fun x => (A x) (![1,0] : Base) 1) := (contDiff_apply ℝ ℝ 1).comp hv + have h2 : ContDiff ℝ ∞ (fun x => (A x) (![1,0] : Base) 2) := (contDiff_apply ℝ ℝ 2).comp hv + apply ((h0.pow 2).add (h1.pow 2) |>.add (h2.pow 2)).sqrt + intro x + exact (Real.sqrt_pos.mp (firstColumnLength_pos (hI x))).ne' + +lemma normalizeFrameColumn_smooth {A : Base → Base →L[ℝ] FrameTarget} (hA : ContDiff ℝ ∞ A) + (hI : ∀ x, Function.Injective (A x)) : ContDiff ℝ ∞ (fun x => normalizeFrameColumn (A x)) := + hA.clm_comp (scaleFirstInput_smooth.comp + ((firstColumnLength_smooth hA hI).inv (fun x => (firstColumnLength_pos (hI x)).ne'))) + +lemma firstColumnLength_axisNormalFrame (r y z : ℝ) (hr : 0 ≤ r) : + firstColumnLength (axisNormalFrame r y z) = r := by + simp [firstColumnLength,axisNormalFrame,Real.sqrt_sq hr] + +lemma normalizeFrameColumn_axisNormalFrame (r y z : ℝ) (hr : 0 < r) : + normalizeFrameColumn (axisNormalFrame r y z) = axisNormalFrame 1 y z := by + rw [normalizeFrameColumn,firstColumnLength_axisNormalFrame r y z hr.le] + ext v i + fin_cases i <;> simp [ContinuousLinearMap.comp_apply,scaleFirstInput_apply,axisNormalFrame, + hr.ne',mul_comm,mul_left_comm] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedPerturbedDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedPerturbedDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..f35074dc67b3e42e5c54a13c5b1adc24d0838052 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedPerturbedDifference.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPerturbedMean + +namespace OAI + +/-! The normalized metric mean has the finite-loss difference estimate +needed for repeated substitution of trial amplitudes. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates +open JetPolynomial (SupportedField supportedWeightedSeminorm) + +variable {F : RField 4} {U : Set Base} + +lemma supportedFreeSeed_sub (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (b c : SupportedField (F := ℝ) K) : + supportedFreeSeed δ τ hF h K hKU (b - c) = + supportedFreeSeed δ τ hF h K hKU b - supportedFreeSeed δ τ hF h K hKU c := by + apply DFunLike.ext + intro p + exact congrFun (freeSeed_sub δ τ b c F) p + +theorem normalizedPerturbedMean_difference (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {ε : ℝ} {p L : ℕ} + (hδ : 0 < δ) (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ p ≤ 1) + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (hc : ∀ m, ReconstructionCoefficientBound (fun p => complexify (F p)) U s (m + 1) (B m)) + (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (hR : ∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) + (q m : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hbN : WeightedBound U s (m + 1 + (q + 1) * (L + 1)) N (freeNormal F)) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (b c : SupportedField (F := ℝ) K) (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) b ≤ A → + supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) c ≤ A → + supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) (b - c) ≤ d → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m (C * (τ / s + ε / τ ^ p) * d) + (fun x => normalizedPerturbedMean δ τ hF h K hKU R q b v w x - + normalizedPerturbedMean δ τ hF h K hKU R q c v w x) := by + obtain ⟨C, hC, hm⟩ := perturbedFreeLM_mean_difference τ (contDiff_complexify hF) (h.complexDomain hF) + K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q m + let r := m + 1 + (q + 1) * (L + 1) + let S := Real.sqrt 2 * 2 ^ r * N + have hS : 0 ≤ S := by dsimp [S]; positivity + refine ⟨C * S ^ 2 * A, mul_nonneg (mul_nonneg hC (sq_nonneg S)) hA, ?_⟩ + intro b c d hd hb hc' hbc v w hv hw + let V := supportedFreeSeed δ τ hF h K hKU b + let W := supportedFreeSeed δ τ hF h K hKU c + have hV := supportedFreeSeed_isFree δ τ hF h K hKU b + have hW := supportedFreeSeed_isFree δ τ hF h K hKU c + have hvn := supportedFreeSeed_bound hF h K hKU b hδ.le hτ.le hs hA hN r hb hbN + have hwn := supportedFreeSeed_bound hF h K hKU c hδ.le hτ.le hs hA hN r hc' hbN + have hdn := supportedFreeSeed_bound hF h K hKU (b - c) hδ.le hτ.le hs hd hN r hbc hbN + rw [supportedFreeSeed_sub] at hdn + have hva : supportedWeightedSeminorm K s r V ≤ S * A * (δ * τ) := by + convert hvn using 1 + dsimp [S] + ring + have hwa : supportedWeightedSeminorm K s r W ≤ S * A * (δ * τ) := by + convert hwn using 1 + dsimp [S] + ring + have hda : supportedWeightedSeminorm K s r (V - W) ≤ S * d * (δ * τ) := by + convert hdn using 1 + dsimp [S] + ring + have hh := hm V W hV hW (S * A * (δ * τ)) (S * d * (δ * τ)) + (by positivity) (by positivity) hva hwa hda v w hv hw + let T := perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q + have hsm := (seedMeanError_smooth τ T V V v w).sub (seedMeanError_smooth τ T W W v w) + have hh' := hh.const_smul isOpen_univ.uniqueDiffOn hsm.contDiffOn (δ⁻¹ ^ 2) + have hcongr := hh'.congr (fun x _ => show + normalizedPerturbedMean δ τ hF h K hKU R q b v w x - + normalizedPerturbedMean δ τ hF h K hKU R q c v w x = + δ⁻¹ ^ 2 • (seedMeanError τ T V V v w x - seedMeanError τ T W W v w x) by + change δ⁻¹ ^ 2 * _ - δ⁻¹ ^ 2 * _ = δ⁻¹ ^ 2 * (_ - _) + ring) + convert hcongr using 1 + rw [abs_of_nonneg (sq_nonneg δ⁻¹)] + field_simp [hδ.ne', hτ.ne'] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedSphericalGerm.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedSphericalGerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..e60595591d512df4a8fcca96c5c5d4e41aa7995c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedSphericalGerm.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalJetGerms + +namespace OAI + +/-! The local normalization calculation in a chart representative. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +theorem normalized_spherical_flattening {F Q : Plane → Space} + (hF : ContDiff ℝ ∞ F) (hQ : ContDiff ℝ ∞ Q) {p : Plane} + (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) + (hq0 : Q p = 0) (hq1 : fderiv ℝ Q p = 0) + (hq2 : ∀ v w, fderiv ℝ (fderiv ℝ Q) p v w = -sphericalSecondForm F p v w) : + let G := radialNormalize ∘ (F+Q) + G p = F p ∧ fderiv ℝ G p = fderiv ℝ F p ∧ + ∀ v w, sphericalSecondForm G p v w = 0 := by + let H := F+Q + let G := radialNormalize ∘ H + have hp : ‖F p‖ = 1 := Filter.EventuallyEq.eq_of_nhds hunit + have hH : ContDiff ℝ ∞ H := hF.add hQ + have hH0 : H p = F p := by change F p + Q p = F p; rw [hq0,add_zero] + have hH1 : fderiv ℝ H p = fderiv ℝ F p := by + rw [show H = F+Q from rfl, fderiv_add (hF.differentiable (by simp) p) + (hQ.differentiable (by simp) p),hq1,add_zero] + have hn : F p ≠ 0 := by intro hz; simp [hz] at hp + have hG0 : G p = F p := by simp [G,Function.comp_apply,hH0,radialNormalize,hp] + have hG1 : fderiv ℝ G p = fderiv ℝ F p := by + apply ContinuousLinearMap.ext + intro v + rw [show G = radialNormalize ∘ H from rfl, + fderiv_comp p ((radialNormalize_smoothAt (by rw [hH0]; exact hn)).differentiableAt + (by simp)) (hH.differentiable (by simp) p)] + simp only [ContinuousLinearMap.comp_apply,hH0,hH1, + radialNormalize_fderiv_unit hp,radial_first_of_germ hF hunit,zero_smul,sub_zero] + have hN : normalSpace G p = normalSpace F p := by unfold normalSpace; rw [hG1] + have hrad : radialNormalize ∘ F =ᶠ[𝓝 p] F := by + filter_upwards [hunit] with x hx + simp [radialNormalize,Function.comp_apply,hx] + have hG2 (v w : Plane) : fderiv ℝ (fderiv ℝ G) p v w = + fderiv ℝ (fderiv ℝ F) p v w - sphericalSecondForm F p v w := by + have hd := radialNormalize_second_jet_difference hF hH p v w hp hH0 hH1 + rw [hrad.fderiv.fderiv_eq,secondDerivative_add hF hQ,hq2] at hd + have hc : fderiv ℝ (fderiv ℝ F) p v w + -sphericalSecondForm F p v w - + fderiv ℝ (fderiv ℝ F) p v w = -sphericalSecondForm F p v w := by abel + have ho : inner ℝ (F p) (sphericalSecondForm F p v w) = 0 := by + rw [real_inner_comm] + exact sphericalSecondForm_radial_orthogonal_of_germ hF hunit v w + rw [hc,inner_neg_right,ho,neg_zero,zero_smul,sub_zero] at hd + exact sub_eq_iff_eq_add.mp hd |>.trans (by abel) + refine ⟨hG0,hG1,?_⟩ + intro v w + change (normalSpace G p).starProjection (fderiv ℝ (fderiv ℝ G) p v w) + + inner ℝ (fderiv ℝ G p v) (fderiv ℝ G p w) • G p = 0 + simp only [hN,hG2,map_sub,hG1,hG0] + rw [Submodule.starProjection_eq_self_iff.mpr (sphericalSecondForm_mem_of_germ hF hunit v w)] + change secondForm F p v w - sphericalSecondForm F p v w + _ = 0 + unfold sphericalSecondForm + abel + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedStepEnvelope.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedStepEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..3801a224c3519bbfe371c4699d4ff8e6935b3dfc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedStepEnvelope.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionErrorEnvelope + +namespace OAI + +/-! The actual normalized one-step error has the six powers in the +correction table, with linear dependence on both input bounds. -/ +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +theorem normalized_step_envelope {t k B C D E U T : ℝ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hB : 0 ≤ B) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hE : 0 ≤ E) (hU : 0 ≤ U) (hT : 0 ≤ T) : + ((t ^ ((6/5 : ℝ)*(k+1))) ^ (2 : ℕ))⁻¹ * + (((t^k)^(2 : ℕ) + E*U*t^k) * D * + (B*(t^(11/10 : ℝ)/t)^(40*(k+1)) + C*(t^(6/5 : ℝ)/t)^(40*(k+1))) + + T*(t^k*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1)) + (t^k)^(3 : ℕ)/t^(6/5 : ℝ))) ≤ + (D+E*U*D+2*T)*(1+B+C)*t^(1/5 : ℝ) := by + have he : ((t ^ ((6/5 : ℝ)*(k+1))) ^ (2 : ℕ))⁻¹ * + (((t^k)^(2 : ℕ) + E*U*t^k) * D * + (B*(t^(11/10 : ℝ)/t)^(40*(k+1)) + C*(t^(6/5 : ℝ)/t)^(40*(k+1))) + + T*(t^k*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1)) + (t^k)^(3 : ℕ)/t^(6/5 : ℝ))) = + D * (B * (((t^k)^(2 : ℕ)*(t^(11/10 : ℝ)/t)^(40*(k+1))) / + (t^((6/5 : ℝ)*(k+1)))^(2 : ℕ)) + + C * (((t^k)^(2 : ℕ)*(t^(6/5 : ℝ)/t)^(40*(k+1))) / + (t^((6/5 : ℝ)*(k+1)))^(2 : ℕ))) + + T * ((t^k*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1))) / + (t^((6/5 : ℝ)*(k+1)))^(2 : ℕ) + + ((t^k)^(3 : ℕ)/t^(6/5 : ℝ)) /(t^((6/5 : ℝ)*(k+1)))^(2 : ℕ)) + + (E*U*D) * (B * ((t^k*(t^(11/10 : ℝ)/t)^(40*(k+1))) / + (t^((6/5 : ℝ)*(k+1)))^(2 : ℕ)) + + C * ((t^k*(t^(6/5 : ℝ)/t)^(40*(k+1))) / + (t^((6/5 : ℝ)*(k+1)))^(2 : ℕ))) := by ring + rw [he,(normalized_defect_tail_scales ht k).1,(normalized_defect_tail_scales ht k).2, + normalized_mode_scale ht k,normalized_cubic_scale ht k, + (normalized_cross_tail_scales ht k).1,(normalized_cross_tail_scales ht k).2] + calc + _ ≤ (D+2*T+E*U*D)*(1+B+C)*t^(1/5 : ℝ) := + normalized_error_envelope ht ht1 hk hB hC hD hT (mul_nonneg (mul_nonneg hE hU) hD) + _ = _ := by ring + +/-- The same estimate with the integer smoothing order used by the +scheduled correction sequence. -/ +theorem normalized_step_envelope_nat {t B C D E U T : ℝ} {k : ℕ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hB : 0 ≤ B) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hE : 0 ≤ E) (hU : 0 ≤ U) (hT : 0 ≤ T) : + ((t ^ ((6/5 : ℝ)*((k : ℝ)+1))) ^ (2 : ℕ))⁻¹ * + (((t^(k : ℝ))^(2 : ℕ) + E*U*t^(k : ℝ)) * D * + (B*(t^(11/10 : ℝ)/t)^(40*(k+1)) + C*(t^(6/5 : ℝ)/t)^(40*(k+1))) + + T*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1)) + + (t^(k : ℝ))^(3 : ℕ)/t^(6/5 : ℝ))) ≤ + (D+E*U*D+2*T)*(1+B+C)*t^(1/5 : ℝ) := by + have hk' : (10 : ℝ) ≤ k := by exact_mod_cast hk + have h := normalized_step_envelope ht ht1 hk' hB hC hD hE hU hT + simpa only [← Real.rpow_natCast, Nat.cast_mul, Nat.cast_add, Nat.cast_ofNat, Nat.cast_one] using h + +/-- The actual finite-mode residual has one extra power of the frequency +ratio, which only improves the same normalized envelope. -/ +theorem normalized_step_envelope_nat_succ {t B C D E U T : ℝ} {k : ℕ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hB : 0 ≤ B) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hE : 0 ≤ E) (hU : 0 ≤ U) (hT : 0 ≤ T) : + ((t ^ ((6/5 : ℝ)*((k : ℝ)+1))) ^ (2 : ℕ))⁻¹ * + (((t^(k : ℝ))^(2 : ℕ) + E*U*t^(k : ℝ)) * D * + (B*(t^(11/10 : ℝ)/t)^(40*(k+1)) + C*(t^(6/5 : ℝ)/t)^(40*(k+1))) + + T*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1)+1) + + (t^(k : ℝ))^(3 : ℕ)/t^(6/5 : ℝ))) ≤ + (D+E*U*D+2*T)*(1+B+C)*t^(1/5 : ℝ) := by + have hs : 0 < t^(11/10 : ℝ) := Real.rpow_pos_of_pos ht _ + have hratio : 0 ≤ t^(6/5 : ℝ)/t^(11/10 : ℝ) := + div_nonneg (Real.rpow_nonneg ht.le _) hs.le + have hratio1 : t^(6/5 : ℝ)/t^(11/10 : ℝ) ≤ 1 := by + apply (div_le_one hs).mpr + exact Real.rpow_le_rpow_of_exponent_ge ht ht1 (by norm_num) + have hp := pow_le_pow_of_le_one hratio hratio1 (Nat.le_succ (40*(k+1))) + calc + _ ≤ ((t ^ ((6/5 : ℝ)*((k : ℝ)+1))) ^ (2 : ℕ))⁻¹ * + (((t^(k : ℝ))^(2 : ℕ) + E*U*t^(k : ℝ)) * D * + (B*(t^(11/10 : ℝ)/t)^(40*(k+1)) + C*(t^(6/5 : ℝ)/t)^(40*(k+1))) + + T*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(40*(k+1)) + + (t^(k : ℝ))^(3 : ℕ)/t^(6/5 : ℝ))) := by + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (sq_nonneg _)) + apply add_le_add le_rfl + apply mul_le_mul_of_nonneg_left _ hT + exact add_le_add (mul_le_mul_of_nonneg_left hp (Real.rpow_nonneg ht.le _)) le_rfl + _ ≤ _ := normalized_step_envelope_nat ht ht1 hk hB hC hD hE hU hT + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedTwoZeroAxis.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedTwoZeroAxis.lean new file mode 100644 index 0000000000000000000000000000000000000000..08aedd5a92d554739bf45d51f14ca676b45a135c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/NormalizedTwoZeroAxis.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisDefectJet + +namespace OAI + +/-! A common normal coordinate system for the two actual simple zeros. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem normalized_two_zero_axis {N : Base → Base} {U : Set Base} (hU : IsOpen U) + (hN : ContDiffOn ℝ ∞ N U) {p q : ℝ} (hpq : p < q) + (haxis : ∀ t ∈ Icc p q, crosscapAxis t ∈ U) + (hz : ∀ x ∈ U, N x = 0 ↔ x = crosscapAxis p ∨ x = crosscapAxis q) + (hDp : Function.Bijective (fderiv ℝ N (crosscapAxis p))) + (hDq : Function.Bijective (fderiv ℝ N (crosscapAxis q))) : + ∃ (d : ℝ → Base) (O : Set Base) (W : Set ℝ), ContDiff ℝ ∞ d ∧ + IsOpen O ∧ O ⊆ U ∧ IsOpen W ∧ Icc p q ⊆ W ∧ (∀ t ∈ W, crosscapAxis t ∈ O) ∧ + ContDiffOn ℝ ∞ (axisNormalizedDefect d N) O ∧ + (∀ t ∈ W, axisNormalizedDefect d N (crosscapAxis t) = ![(t-p)*(t-q),0]) ∧ + (∀ x ∈ O, axisNormalizedDefect d N x = 0 ↔ x = crosscapAxis p ∨ x = crosscapAxis q) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis p)) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis q)) ∧ + (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis p) (![1,0] : Base)) 1 ≠ 0 ∧ + (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis q) (![1,0] : Base)) 1 ≠ 0 := by + obtain ⟨d,V,hd,hV,hKV,hn,he⟩ := two_zero_axis_factor hU hN hpq haxis hz hDp hDq + let O := U ∩ {x : Base | d (x 1) ≠ 0} + have hO : IsOpen O := hU.inter + (isOpen_ne.preimage (hd.continuous.comp (continuous_apply 1))) + let W := V ∩ crosscapAxis ⁻¹' O + have hW : IsOpen W := hV.inter (hO.preimage crosscapAxis.continuous) + have hKW : Icc p q ⊆ W := by + intro t ht + refine ⟨hKV ht,haxis t ht,?_⟩ + simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using hn t ht + have hGO : ContDiffOn ℝ ∞ (axisNormalizedDefect d N) O := by + intro x hx + exact (axisNormalizedDefect_smoothAt hd (hN.contDiffAt (hU.mem_nhds hx.1)) hx.2).contDiffWithinAt + have hGa : ∀ t ∈ W, axisNormalizedDefect d N (crosscapAxis t) = ![(t-p)*(t-q),0] := by + intro t ht + apply axisNormalizedDefect_axis + · simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using ht.2.2 + · exact he t ht.1 + have hpW := hKW (left_mem_Icc.mpr hpq.le) + have hqW := hKW (right_mem_Icc.mpr hpq.le) + have hGp := hGO.contDiffAt (hO.mem_nhds hpW.2) + have hGq := hGO.contDiffAt (hO.mem_nhds hqW.2) + have hDpG : Function.Bijective (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis p)) := + axisNormalizedDefect_derivative_bijective hd + (hN.contDiffAt (hU.mem_nhds hpW.2.1)) hpW.2.2 + ((hz _ hpW.2.1).mpr (Or.inl rfl)) hDp + have hDqG : Function.Bijective (fderiv ℝ (axisNormalizedDefect d N) (crosscapAxis q)) := + axisNormalizedDefect_derivative_bijective hd + (hN.contDiffAt (hU.mem_nhds hqW.2.1)) hqW.2.2 + ((hz _ hqW.2.1).mpr (Or.inr rfl)) hDq + refine ⟨d,O,W,hd,hO,inter_subset_left,hW,hKW,fun _ ht => ht.2,hGO,hGa,?_,hDpG,hDqG, + normalized_axis_transverse_nonzero hGp hW hpW hGa hDpG, + normalized_axis_transverse_nonzero hGq hW hqW hGa hDqG⟩ + intro x hx + change (planeComplexFrame (d (x 1))).inverse (N x) = 0 ↔ _ + rw [←(map_zero (planeComplexFrame (d (x 1))).inverse)] + exact (planeComplexFrame_invertible hx.2).inverse.injective.eq_iff.trans (hz x hx.1) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OneFiberAugmentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OneFiberAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..16054b48234621012489b022679d2c77b21c4881 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OneFiberAugmentation.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticDoubleTransverse +import Mathlib.LinearAlgebra.Projection + +namespace OAI + +/-! A surjective linear map with a one-dimensional kernel admits one +additional linear coordinate with invertible derivative. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [FiniteDimensional ℝ E] [FiniteDimensional ℝ F] + +theorem one_fiber_linear_augmentation (hdimEF : Module.finrank ℝ E = Module.finrank ℝ F + 1) + (K : E →L[ℝ] F) + (hK : Function.Surjective K) : + ∃ ℓ : E →L[ℝ] ℝ, Function.Bijective (K.prod ℓ) := by + have hdim : Module.finrank ℝ K.ker = 1 := by + have h := K.toLinearMap.finrank_range_add_finrank_ker + rw [LinearMap.range_eq_top.mpr hK,finrank_top] at h + omega + let e : K.ker ≃L[ℝ] ℝ := ContinuousLinearEquiv.ofFinrankEq (by simpa using hdim) + obtain ⟨P,hP⟩ := K.ker.exists_isCompl + let π : E →L[ℝ] K.ker := (K.ker.projectionOnto P hP).toContinuousLinearMap + let ℓ : E →L[ℝ] ℝ := e.toContinuousLinearMap.comp π + have hzero (x : E) (hx : K x = 0) (hℓ : ℓ x = 0) : x = 0 := by + have hmem : x ∈ K.ker := hx + have hπ : π x = ⟨x,hmem⟩ := by + exact Submodule.projectionOnto_apply_of_mem_left hP hmem + have he : e (⟨x,hmem⟩ : K.ker) = e 0 := by + simpa only [ℓ,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,hπ,map_zero] using hℓ + exact congrArg Subtype.val (e.injective he) + have hi : Function.Injective (K.prod ℓ) := by + intro x y hxy + apply sub_eq_zero.mp + apply hzero + · rw [map_sub] + exact sub_eq_zero.mpr (congrArg Prod.fst hxy) + · rw [map_sub] + exact sub_eq_zero.mpr (congrArg Prod.snd hxy) + refine ⟨ℓ,hi,?_⟩ + apply (LinearMap.injective_iff_surjective_of_finrank_eq_finrank (f := (K.prod ℓ).toLinearMap) _).mp hi + simpa using hdimEF + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OpenIntervalExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OpenIntervalExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..6988cc1657a67f370af1f3a91f7e3f67644673b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OpenIntervalExtension.lean @@ -0,0 +1,60 @@ +import Mathlib.Topology.ContinuousOn +import Mathlib.Topology.UnitInterval + +namespace OAI + +/-! Extend a map on the open unit interval by prescribed endpoint +values. Continuity in the interior is independent of endpoint limits. -/ +noncomputable section +open Set Topology unitInterval +attribute [local instance] Classical.propDecidable +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} + +def intervalInteriorPoint (t : I) (h0 : t ≠ 0) (h1 : t ≠ 1) : Ioo (0:ℝ) 1 := + ⟨t.val,by + constructor + · apply lt_of_le_of_ne t.property.1 + intro h + exact h0 (Subtype.ext h.symm) + · apply lt_of_le_of_ne t.property.2 + intro h + exact h1 (Subtype.ext h)⟩ + +def openIntervalExtension (F : Ioo (0:ℝ) 1 → X) (x y : X) (t : I) : X := + if h0 : t = 0 then x else if h1 : t = 1 then y else F (intervalInteriorPoint t h0 h1) + +@[simp] lemma openIntervalExtension_zero (F : Ioo (0:ℝ) 1 → X) (x y : X) : + openIntervalExtension F x y 0 = x := by simp [openIntervalExtension] + +@[simp] lemma openIntervalExtension_one (F : Ioo (0:ℝ) 1 → X) (x y : X) : + openIntervalExtension F x y 1 = y := by simp [openIntervalExtension] + +lemma openIntervalExtension_interior (F : Ioo (0:ℝ) 1 → X) (x y : X) + (t : I) (ht : 0 < (t:ℝ) ∧ (t:ℝ) < 1) : + openIntervalExtension F x y t = F ⟨t.val,ht⟩ := by + have h0 : t ≠ 0 := by intro h; subst t; norm_num at ht + have h1 : t ≠ 1 := by intro h; subst t; norm_num at ht + simp only [openIntervalExtension,h0,h1,↓reduceDIte] + rfl + +variable [TopologicalSpace X] + +lemma openIntervalExtension_continuousOn (F : Ioo (0:ℝ) 1 → X) (hF : Continuous F) + (x y : X) : ContinuousOn (openIntervalExtension F x y) {t : I | 0 < (t:ℝ) ∧ (t:ℝ) < 1} := by + apply continuousOn_iff_continuous_domRestrict.mpr + let k : {t : I | 0 < (t:ℝ) ∧ (t:ℝ) < 1} → Ioo (0:ℝ) 1 := + fun t => ⟨t.val.val,t.property⟩ + have hk : Continuous k := + (continuous_subtype_val.comp continuous_subtype_val).subtype_mk _ + have he : {t : I | 0 < (t:ℝ) ∧ (t:ℝ) < 1}.domRestrict (openIntervalExtension F x y) = F ∘ k := by + funext t + exact openIntervalExtension_interior F x y t.val t.property + rw [he] + exact hF.comp hk + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedBoundaryInvariant.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedBoundaryInvariant.lean new file mode 100644 index 0000000000000000000000000000000000000000..58b6fad471dbeaa225fc6eebe5a984238cf73d98 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedBoundaryInvariant.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData +import OAI.Geometry.Immersion.ClosedSurface.SecondForms + +namespace OAI + +/-! The manuscript's ordered crossing expression in coordinates adapted to +the boundary curve, for the actual second fundamental form. -/ +noncomputable section +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes SmallModes + +def orderedCrossing (F : RField 4) (v w p : Base) (κ : ℝ) : ℝ := + (realSecondForm F v w p ⬝ᵥ normalize (realSecondForm F v v p)) ^ 2 + + κ * gramDet (coordDeriv v F p) (coordDeriv w F p) + +theorem orderedCrossing_dy {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : realSecondForm F dy dy p ≠ 0) (b c κ : ℝ) : + orderedCrossing F dy (b, c) p κ = + (b * (coordDeriv dy (coordDeriv dx F) p ⬝ᵥ normalize (realSecondForm F dy dy p)) + + c * Real.sqrt (realSecondForm F dy dy p ⬝ᵥ realSecondForm F dy dy p)) ^ 2 + + (κ * gramDet (coordDeriv dx F p) (coordDeriv dy F p)) * b ^ 2 := by + let B := realSecondForm F dy dy p + let n := normalize B + have hp := realNormalPart_perp (coordDeriv dx F p) (coordDeriv dy F p) + (coordDeriv dy (coordDeriv dy F) p) hD + have hXn : n ⬝ᵥ coordDeriv dx F p = 0 := + (dotProduct_comm _ _).trans (dot_normalize_zero hp.1) + have hYn : n ⬝ᵥ coordDeriv dy F p = 0 := + (dotProduct_comm _ _).trans (dot_normalize_zero hp.2) + have hm : realSecondForm F dx dy p ⬝ᵥ n = coordDeriv dy (coordDeriv dx F) p ⬝ᵥ n := by + rw [realSecondForm, dotProduct_comm, dot_normalPart_eq hXn hYn, dotProduct_comm, + real_second_coordDeriv_comm hF p dx dy] + have hs : B ⬝ᵥ n = Real.sqrt (B ⬝ᵥ B) := dot_normalize_self hB + have hBvw : realSecondForm F dy (b, c) p = b • realSecondForm F dx dy p + c • B := by + rw [realSecondForm_bilinear hF] + simp [dy, realSecondTensor, B] + have hW : coordDeriv (b, c) F p = b • coordDeriv dx F p + c • coordDeriv dy F p := + coordDeriv_eq_basis F (b, c) p + have hg : gramDet (coordDeriv dy F p) (coordDeriv (b, c) F p) = + b ^ 2 * gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + rw [hW] + convert gramDet_change_basis (coordDeriv dx F p) (coordDeriv dy F p) 0 1 b c using 1 <;> + simp + change (realSecondForm F dy (b, c) p ⬝ᵥ n) ^ 2 + _ = _ + rw [hBvw, add_dotProduct, smul_dotProduct, smul_dotProduct, hm, hs, hg] + change (b * _ + c * _) ^ 2 + _ = _ + ring + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedNodeIntervals.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedNodeIntervals.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6aac1eb8bdbb3710218ab3709ac7e26271025a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrderedNodeIntervals.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.OrderedCornerBridges + +namespace OAI + +/-! Consecutive ordered corner parameters leave genuine regular open +intervals of the original path between them. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma not_mem_range_before_first {n : ℕ} (T : Fin (n+1) → ℝ) (hT : StrictMono T) + {t : ℝ} (ht : t < T 0) : t ∉ range T := by + rintro ⟨k,rfl⟩ + exact (not_lt_of_ge (hT.monotone (show (0:Fin (n+1)) ≤ k from bot_le))) ht + +lemma not_mem_range_between_successive {n : ℕ} (T : Fin n → ℝ) (hT : StrictMono T) + {i j : Fin n} (hij : j.val = i.val+1) {t : ℝ} (hi : T i < t) (hj : t < T j) : + t ∉ range T := by + rintro ⟨k,rfl⟩ + have hik := hT.lt_iff_lt.mp hi + have hkj := hT.lt_iff_lt.mp hj + change i.val < k.val at hik + change k.val < j.val at hkj + omega + +lemma not_mem_range_after_last {n : ℕ} (T : Fin (n+1) → ℝ) (hT : StrictMono T) + {t : ℝ} (ht : T (Fin.last n) < t) : t ∉ range T := by + rintro ⟨k,rfl⟩ + have hk : k ≤ Fin.last n := k.le_last + exact (not_lt_of_ge (hT.monotone hk)) ht + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrdinaryDegreeTwo.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrdinaryDegreeTwo.lean new file mode 100644 index 0000000000000000000000000000000000000000..9af1bb8f4ed2e06c25c27eb91b34e44a8c9a01ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrdinaryDegreeTwo.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LinePuncturedNeighborhood +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeParametrization + +namespace OAI + +/-! Ordinary vertices of the interval decomposition have exactly two incident edges. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +omit [T2Space X] in +private theorem connected_subset_piece (V : Set X) (P : Finset (Set X)) + (hP : ∀ E ∈ P, IsOpen E ∧ Disjoint E V ∧ closure E \ E ⊆ V) + (hcover : Vᶜ = ⋃ E ∈ P, E) {S : Set X} (hS : IsConnected S) + (hSV : S ⊆ Vᶜ) : ∃ E ∈ P, S ⊆ E := by + obtain ⟨x,hx⟩ := hS.nonempty + have hxV := hSV hx + rw [hcover] at hxV + obtain ⟨E,hE,hxE⟩ := mem_iUnion₂.mp hxV + refine ⟨E,hE,hS.isPreconnected.subset_of_closure_inter_subset (hP E hE).1 + ⟨x,hx,hxE⟩ ?_⟩ + intro y hy + by_contra hn + exact hSV hy.2 ((hP E hE).2.2 ⟨hy.1,hn⟩) + +theorem ordinary_vertex_degree_two (V : Set X) (hV : V.Finite) (P : Finset (Set X)) + (hP : ∀ E ∈ P, IsOpen E ∧ Disjoint E V ∧ closure E \ E ⊆ V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (hcover : Vᶜ = ⋃ E ∈ P, E) + (hwitness : ∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) + {p : X} (hp : p ∈ V) (c : OpenPartialHomeomorph X ℝ) (hc : p ∈ c.source) : + ∃ E ∈ P, ∃ F ∈ P, E ≠ F ∧ p ∈ closure E ∧ p ∈ closure F ∧ + ∀ G ∈ P, p ∈ closure G → G = E ∨ G = F := by + classical + obtain ⟨W,S,T,hW,hpW,hS,hT,_,hsplit,hSV,hpS,hpT⟩ := + line_punctured_neighborhood c hc V hV + obtain ⟨E,hE,hSE⟩ := connected_subset_piece V P hP hcover hS + (fun _ hx => hSV (Or.inl hx)) + obtain ⟨F,hF,hTF⟩ := connected_subset_piece V P hP hcover hT + (fun _ hx => hSV (Or.inr hx)) + have hpE : p ∈ closure E := closure_mono hSE hpS + have hpF : p ∈ closure F := closure_mono hTF hpT + have hEF : E ≠ F := by + intro heq + have hWE : W ⊆ closure E := by + intro x hx + by_cases hxp : x = p + · simpa only [hxp] using hpE + · have hxs : x ∈ W \ {p} := ⟨hx,by simpa only [mem_singleton_iff] using hxp⟩ + rw [hsplit] at hxs + rcases hxs with hs | ht + · exact subset_closure (hSE hs) + · exact subset_closure (heq.symm ▸ hTF ht) + have hpInt : p ∈ interior (closure E) := interior_maximal hWE hW hpW + have hpnot : p ∉ E := fun h => disjoint_left.mp (hP E hE).2.1 h hp + exact (Classical.choice (hwitness E hE)).frontier_not_interior_closure c hc + ⟨hpE,hpnot⟩ hpInt + refine ⟨E,hE,F,hF,hEF,hpE,hpF,?_⟩ + intro G hG hpG + obtain ⟨x,hxW,hxG⟩ := (mem_closure_iff.mp hpG) W hW hpW + have hxp : x ≠ p := by + intro heq + exact disjoint_left.mp (hP G hG).2.1 hxG (heq ▸ hp) + have hxST : x ∈ S ∪ T := hsplit ▸ ⟨hxW,by simpa only [mem_singleton_iff] using hxp⟩ + rcases hxST with hxS | hxT + · left + by_contra hGE + exact disjoint_left.mp (hdis G hG E hE hGE) hxG (hSE hxS) + · right + by_contra hGF + exact disjoint_left.mp (hdis G hG F hF hGF) hxG (hTF hxT) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrientedTimeTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrientedTimeTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a379db3f756823b96461970df06bb0eb43d1911 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OrientedTimeTransition.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseReflection + +namespace OAI + +/-! The transverse orientation of the next time chart can always be +chosen to give a positive derivative at the attachment point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} + +namespace SurfaceTimeChart + +theorem positive_transition (c d : SurfaceTimeChart F) (x : M) + (hxc : x ∈ c.coord.source) (hxd : x ∈ d.coord.source) : + ∃ e : SurfaceTimeChart F, e.coord.source = d.coord.source ∧ + (∀ y t, d.coord y = ![0,t] → e.coord y = ![0,t]) ∧ + 0 < fderiv ℝ (e.coord ∘ c.coord.symm) (c.coord x) ![1,0] 0 := by + have hn := (time_coordinate_transition c.coord d.coord c.smooth c.inverse_smooth + d.smooth d.inverse_smooth c.time d.time hxc hxd).2.2 + rcases lt_or_gt_of_ne hn with hneg | hpos + · have hci := c.inverse_smooth.contMDiffAt + (c.coord.open_target.mem_nhds (c.coord.map_source hxc)) + have hds : ContMDiffAt planeModel 𝓘(ℝ,Base) ∞ d.coord (c.coord.symm (c.coord x)) := + (c.coord.left_inv hxc).symm ▸ d.smooth.contMDiffAt (d.coord.open_source.mem_nhds hxd) + have hd : DifferentiableAt ℝ (d.coord ∘ c.coord.symm) (c.coord x) := + (hds.comp (c.coord x) hci).contDiffAt.differentiableAt (by simp) + refine ⟨d.reflect,rfl,fun y t h => d.reflect_axis h,?_⟩ + rw [reflect_transition c d x hd] + change 0 < -(fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord x) ![1,0] 0) + exact neg_pos.mpr hneg + · exact ⟨d,rfl,fun _ _ h => h,hpos⟩ + +end SurfaceTimeChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OriginalRegularSegment.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OriginalRegularSegment.lean new file mode 100644 index 0000000000000000000000000000000000000000..e5cc0bfdbf5afcead992c3a2bfb34d39810b94c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OriginalRegularSegment.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteRegularPathSmooth +import OAI.Geometry.SurfaceImmersion.Whitney.PathCornerNeighborhood + +namespace OAI + +/-! Compact unchanged portions of the path between its exceptional +parameters are actual smooth regular embedded arcs. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} + +theorem original_regular_segment (hi : Function.Injective γ) + {U : Set ℝ} (hU : IsOpen U) (hU01 : U ⊆ Ioo (0:ℝ) 1) + (hreg : ∀ t ∈ U, ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t)) + {a b : ℝ} (hab : a < b) (hsub : Icc a b ⊆ U) : + ∃ P : SmoothCompactArc planeModel M, + P.start = a ∧ P.finish = b ∧ P.curve = γ.extend := by + have hs : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ.extend U := + fun t ht => (hreg t ht).1.contMDiffWithinAt + have hsub01 : Icc a b ⊆ Icc (0:ℝ) 1 := + fun t ht => ⟨(hU01 (hsub ht)).1.le,(hU01 (hsub ht)).2.le⟩ + have hinj : InjOn γ.extend (Icc a b) := (embeddedPath_extend_injOn γ hi).mono hsub01 + exact ⟨⟨γ.extend,a,b,hab,U,hU,hsub,hs,fun t ht => (hreg t ht).2,hinj⟩,rfl,rfl,rfl⟩ + +theorem original_segment_outside_finite (hi : Function.Injective γ) + {S : Set ℝ} (hS : S.Finite) + (hreg : ∀ t ∈ Ioo (0:ℝ) 1, t ∉ S → + ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t)) + {a b : ℝ} (ha : 0 < a) (hb : b < 1) (hab : a < b) + (havoid : Disjoint (Icc a b) S) : + ∃ P : SmoothCompactArc planeModel M, + P.start = a ∧ P.finish = b ∧ P.curve = γ.extend := by + apply original_regular_segment hi (isOpen_Ioo.sdiff hS.isClosed) sdiff_subset + (fun t ht => hreg t ht.1 ht.2) hab + intro t ht + exact ⟨⟨ha.trans_le ht.1,ht.2.trans_lt hb⟩,fun hs => disjoint_left.mp havoid ht hs⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/OverlapQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OverlapQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7f3141df009d9ba18fdc589f207288f395eabe0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/OverlapQuadraticCancellation.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports + +namespace OAI + +/-! Finite cancellation using actual compact support intersections. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance overlapCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance overlapCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance overlapCancellationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance overlapCancellationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance overlapCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance overlapCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem global_quadratic_cancellation_on + {n : A.centers → ℕ} + (P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression) : + ∃ Dv Dt : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a) + {τ : ℝ} {s : ℝ≥0} + (c : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → ∀ q : ℕ, + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (Dv m * ∑ k : A.centers, ∑ l, (c k l).size (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ k : A.centers, ∑ l, (c k l).residual (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) x))) := by + classical + obtain ⟨Dv,Dt,hDv,hDt,h⟩ := A.atlas_finite_cancellation + (ι := fun _ => RealModes.QuadraticLabel ι) P + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro F hF φ Z hφ hZ S hS hSZ τ s c hτ hs hτs hs1 q + obtain ⟨W,hW,hsize,hres⟩ := h F hF (A.globalQuadraticPhase φ) + (A.quadraticOverlapCompact S hS) c hτ hs hτs hs1 + (fun k l => Set.image_mono (A.quadraticOverlapCompact_subset S hS k l)) + (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ) q + refine ⟨W,hW,hsize,?_⟩ + intro m + rw [A.globalQuadraticTarget_expansion τ φ Z hφ hZ] + exact hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairCurveParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairCurveParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..098ca3df79657ffb5b8e68f302e30e890142e0c4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairCurveParameter.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.LocalDoubleCurveLift +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveParameter + +namespace OAI + +/-! A smooth regular pair curve locally contained in the double locus +has the actual chart parameter, with nonzero derivative. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothDoubleChart +variable {f : M → ProjectionTarget 3} + +theorem pair_curve_parameter (c : SmoothDoubleChart f) {C : ℝ → M × M} {x : ℝ} + (p : surfaceDoublePairs f) (hp : p.val = C x) (hpc : p ∈ c.coord.source) + (hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ (fun t => (C t).1) x) + (hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ (fun t => (C t).2) x) + (hpair : Function.Injective + ((mfderiv 𝓘(ℝ) planeModel (fun t => (C t).1) x).prod + (mfderiv 𝓘(ℝ) planeModel (fun t => (C t).2) x))) + (hgood : ∀ᶠ t in 𝓝 x, C t ∈ surfaceDoublePairs f) : + ∃ h : ℝ → ℝ, ContDiffAt ℝ ∞ h x ∧ deriv h x ≠ 0 ∧ + h x = c.coord p ∧ C =ᶠ[𝓝 x] (fun t => (c.coord.symm (h t)).val) := by + have hC : ContinuousAt C x := hA.continuousAt.prodMk hB.continuousAt + obtain ⟨γ,hγ,hγx,he⟩ := local_double_curve_lift hC p hp hgood + have heA : (fun t => (γ t).val.1) =ᶠ[𝓝 x] (fun t => (C t).1) := + he.mono fun _ ht => congrArg Prod.fst ht + have heB : (fun t => (γ t).val.2) =ᶠ[𝓝 x] (fun t => (C t).2) := + he.mono fun _ ht => congrArg Prod.snd ht + have hγA := hA.congr_of_eventuallyEq heA + have hγB := hB.congr_of_eventuallyEq heB + have hDA := ((hA.mdifferentiableAt (by simp)).hasMFDerivAt.congr_of_eventuallyEq_abuse heA).mfderiv + have hDB := ((hB.mdifferentiableAt (by simp)).hasMFDerivAt.congr_of_eventuallyEq_abuse heB).mfderiv + have hγpair : Function.Injective + ((mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.1) x).prod + (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.2) x)) := by + rw [hDA,hDB] + exact hpair + obtain ⟨h,hhs,hhn,hval,hinv⟩ := c.curve_parameter hγ (hγx ▸ hpc) hγA hγB hγpair + refine ⟨h,hhs,hhn,by simpa only [hγx] using hval,?_⟩ + filter_upwards [he,hinv] with t ht ht' + exact ht.symm.trans (congrArg Subtype.val ht') + +end SmoothDoubleChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairedMapDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairedMapDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..65420f21fae0810751ac91e4eb9b64fa0290993e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PairedMapDerivatives.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveVelocities + +namespace OAI + +/-! Derivatives of a pair of maps with equal images under a surface map. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {N : Type*} [TopologicalSpace N] [ChartedSpace ℝ N] +variable {f : M → ProjectionTarget 3} {A B : N → M} + +theorem regular_paired_map_derivatives + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hleft : ContMDiff 𝓘(ℝ) planeModel ∞ A) + (hright : ContMDiff 𝓘(ℝ) planeModel ∞ B) + (heq : ∀ q, f (A q) = f (B q)) (p : N) + (hpair : Function.Injective ((mfderiv 𝓘(ℝ) planeModel A p).prod + (mfderiv 𝓘(ℝ) planeModel B p))) + (hA : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A p))) + (hB : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B p))) : + Function.Injective (mfderiv 𝓘(ℝ) planeModel A p) ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel B p) ∧ + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,ProjectionTarget 3) (f ∘ A) p) := by + have heq' : (fun q : N => f (A q)) = + (fun q : N => f (B q)) := by + funext q + exact heq q + have hDA := mfderiv_comp p (hf.mdifferentiable (by simp)).mdifferentiableAt + (hleft.mdifferentiable (by simp)).mdifferentiableAt + have hDB := mfderiv_comp p (hf.mdifferentiable (by simp)).mdifferentiableAt + (hright.mdifferentiable (by simp)).mdifferentiableAt + have hrel : + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A p)).comp + (mfderiv 𝓘(ℝ) planeModel A p) = + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B p)).comp + (mfderiv 𝓘(ℝ) planeModel B p) := by + have hev : (fun q : N => f (A q)) =ᶠ[𝓝 p] + (fun q : N => f (B q)) := Filter.Eventually.of_forall (congrFun heq') + have hd := hev.mfderiv_eq (I := 𝓘(ℝ)) (I' := 𝓘(ℝ,ProjectionTarget 3)) + apply ContinuousLinearMap.ext + intro v + have hdv := congrArg (fun L => L v) hd + change (mfderiv 𝓘(ℝ) 𝓘(ℝ,ProjectionTarget 3) + (f ∘ fun q : N => A q) p) v = + (mfderiv 𝓘(ℝ) 𝓘(ℝ,ProjectionTarget 3) + (f ∘ fun q : N => B q) p) v at hdv + rw [hDA,hDB] at hdv + exact hdv + have hLA : Function.Injective (mfderiv 𝓘(ℝ) planeModel A p) := by + intro u v huv + apply hpair + apply Prod.ext huv + change (mfderiv 𝓘(ℝ) planeModel B p) u = (mfderiv 𝓘(ℝ) planeModel B p) v + apply hB + have hh := congrArg (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A p)) huv + change ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A p)).comp + (mfderiv 𝓘(ℝ) planeModel A p)) u = + ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A p)).comp + (mfderiv 𝓘(ℝ) planeModel A p)) v at hh + rw [hrel] at hh + exact hh + have hLB : Function.Injective (mfderiv 𝓘(ℝ) planeModel B p) := by + intro u v huv + apply hpair + apply Prod.ext _ huv + change (mfderiv 𝓘(ℝ) planeModel A p) u = (mfderiv 𝓘(ℝ) planeModel A p) v + apply hA + have hh := congrArg (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B p)) huv + change ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B p)).comp + (mfderiv 𝓘(ℝ) planeModel B p)) u = + ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B p)).comp + (mfderiv 𝓘(ℝ) planeModel B p)) v at hh + rw [← hrel] at hh + exact hh + refine ⟨hLA,hLB,?_⟩ + rw [hDA] + exact hA.comp hLA + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterIntegralDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterIntegralDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..11c0e730e448fef7a8291c938cfbeca8bbe6524d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterIntegralDerivatives.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Every parameter derivative commutes with a compact interval integral. +This supplies the weighted bounds for periodic means and primitives. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u +namespace ClosedSurfaceR4.SmoothParameterIntegral + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +def partialIterated (n : ℕ) (F : P × ℝ → E) (z : P × ℝ) : P [×n]→L[ℝ] E := + iteratedFDeriv ℝ n (fun p => F (p, z.2)) z.1 + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +lemma partialIterated_succ {F : P × ℝ → E} (n : ℕ) + (h : ContDiff ℝ ∞ (partialIterated n F)) : + partialIterated (n + 1) F = fun z => + (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n + 1) => P) E).symm + (partialDerivative (partialIterated n F) z) := by + funext z + change (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n + 1) => P) E).symm + (fderiv ℝ (fun p => partialIterated n F (p, z.2)) z.1) = _ + rw [(partial_hasFDerivAt h z.1 z.2).fderiv] + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +lemma contDiff_partialIterated {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (n : ℕ) : + ContDiff ℝ ∞ (partialIterated n F) := by + induction n with + | zero => + exact (continuousMultilinearCurryFin0 ℝ P E).symm.contDiff.comp hF + | succ n ih => + rw [partialIterated_succ n ih] + exact (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n + 1) => P) E).symm.contDiff.comp + (contDiff_partialDerivative ih) + +/-- The actual all-order derivative formula, with no separate derivative +interchange hypothesis. -/ +theorem iteratedFDeriv_integral {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + (a b : ℝ) (n : ℕ) (p : P) : + iteratedFDeriv ℝ n (fun q => ∫ t in a..b, F (q, t)) p = + ∫ t in a..b, partialIterated n F (p, t) := by + induction n generalizing p with + | zero => + let L : E →L[ℝ] (P [×0]→L[ℝ] E) := + (continuousMultilinearCurryFin0 ℝ P E).symm.toContinuousLinearEquiv.toContinuousLinearMap + change L (∫ t in a..b, F (p, t)) = ∫ t in a..b, L (F (p, t)) + exact (L.intervalIntegral_comp_comm + ((hF.continuous.comp (continuous_const.prodMk continuous_id)).intervalIntegrable a b)).symm + | succ n ih => + let L : (P →L[ℝ] P [×n]→L[ℝ] E) →L[ℝ] (P [×(n + 1)]→L[ℝ] E) := + (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n + 1) => P) E).symm.toContinuousLinearEquiv.toContinuousLinearMap + have hFn := contDiff_partialIterated hF n + have he : iteratedFDeriv ℝ n (fun q => ∫ t in a..b, F (q, t)) = + fun q => ∫ t in a..b, partialIterated n F (q, t) := funext ih + change L (fderiv ℝ (iteratedFDeriv ℝ n (fun q => ∫ t in a..b, F (q, t))) p) = _ + rw [he, (hasFDerivAt_integral hFn a b p).fderiv] + have hInt : IntervalIntegrable (fun t => partialDerivative (partialIterated n F) (p, t)) + volume a b := ((contDiff_partialDerivative hFn).continuous.comp + (continuous_const.prodMk continuous_id)).intervalIntegrable a b + rw [← L.intervalIntegral_comp_comm hInt] + apply intervalIntegral.integral_congr + intro t _ + exact (congrFun (partialIterated_succ n hFn) (p, t)).symm + +end ClosedSurfaceR4.SmoothParameterIntegral +namespace ClosedSurfaceR4.WeightedEstimates +open SmoothParameterIntegral + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Parameter integration preserves every weighted derivative bound, with +only the length of the integration interval as an operator bound. -/ +theorem weighted_parameter_integral {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + {U : Set P} (hU : IsOpen U) {s C : ℝ} (hs : 0 < s) (m : ℕ) (a b : ℝ) + (hb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Set.uIcc a b, + s ^ j * ‖partialIterated j F (p, t)‖ ≤ C) : + WeightedBound U s m (C * |b - a|) (fun p => ∫ t in a..b, F (p, t)) := by + have hI := contDiff_integral hF a b + intro j hj p hp + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn + ((hI.of_le (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) hp, + iteratedFDeriv_integral hF] + have hn : ‖∫ t in a..b, partialIterated j F (p, t)‖ ≤ C / s ^ j * |b - a| := by + apply intervalIntegral.norm_integral_le_of_norm_le_const + intro t ht + exact (le_div_iff₀ (pow_pos hs j)).mpr (by + simpa only [mul_comm] using hb j hj p hp t (Set.uIoc_subset_uIcc ht)) + calc + s ^ j * ‖∫ t in a..b, partialIterated j F (p, t)‖ ≤ + s ^ j * (C / s ^ j * |b - a|) := + mul_le_mul_of_nonneg_left hn (pow_nonneg hs.le j) + _ = C * |b - a| := by field_simp [hs.ne'] + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterTaylorRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterTaylorRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..e391e456c166f60b92b964a493805e1c1596441b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ParameterTaylorRemainder.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CubicTaylorRemainder +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Geometry.ParameterIntegralDerivatives + +namespace OAI + +/-! Cubic Taylor remainders retain all weighted spatial derivative bounds +under integration in the variation parameter. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff + +universe u +namespace ClosedSurfaceR4.ParameterTaylor +open SmoothPeriodicCalculus SmoothParameterIntegral WeightedEstimates + +variable {A E : Type u} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +def parameterJet : ℕ → (A × ℝ → E) → A × ℝ → E + | 0, F => F + | j + 1, F => angleDerivative (parameterJet j F) + +lemma parameterJet_smooth {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (j : ℕ) : + ContDiff ℝ ∞ (parameterJet j F) := by + induction j with + | zero => exact hF + | succ j ih => exact contDiff_angleDerivative ih + +lemma parameterJet_apply {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (j : ℕ) (p : A) (t : ℝ) : + parameterJet j F (p, t) = iteratedDeriv j (fun r => F (p, r)) t := by + induction j generalizing t with + | zero => rfl + | succ j ih => + change angleDerivative (parameterJet j F) (p, t) = _ + rw [← (angle_hasDerivAt (parameterJet_smooth hF j) p t).deriv] + have he : (fun r => parameterJet j F (p, r)) = iteratedDeriv j (fun r => F (p, r)) := funext ih + rw [he, ← iteratedDeriv_succ] + +def cubicRemainder (F : A × ℝ → E) (p : A) : E := + F (p, 1) - F (p, 0) - parameterJet 1 F (p, 0) - (1 / 2 : ℝ) • parameterJet 2 F (p, 0) + +lemma cubicRemainder_smooth {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (cubicRemainder F) := + (((hF.comp (contDiff_id.prodMk contDiff_const)).sub + (hF.comp (contDiff_id.prodMk contDiff_const))).sub + ((parameterJet_smooth hF 1).comp (contDiff_id.prodMk contDiff_const))).sub + (((parameterJet_smooth hF 2).comp (contDiff_id.prodMk contDiff_const)).const_smul (1 / 2 : ℝ)) + +variable [CompleteSpace E] + +lemma cubicRemainder_eq_integral {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (p : A) : + cubicRemainder F p = ∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / 2) • parameterJet 3 F (p, t) := by + have hslice : ContDiff ℝ ∞ (fun t => F (p, t)) := hF.comp (contDiff_const.prodMk contDiff_id) + simp only [cubicRemainder, parameterJet_apply hF, iteratedDeriv_one] + exact cubicTaylor_remainder hslice + +variable [FiniteDimensional ℝ A] + +/-- A uniform weighted estimate for the third variation gives the same +weighted estimate for the actual nonlinear Taylor remainder. -/ +theorem weighted_cubicRemainder {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) + {U : Set A} (hU : IsOpen U) {s M : ℝ} (hs : 0 < s) (hM : 0 ≤ M) (m : ℕ) + (hb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j (parameterJet 3 F) (p, t)‖ ≤ M) : + WeightedBound U s m (M / 2) (cubicRemainder F) := by + let R : A × ℝ → E := fun z => ((1 - z.2) ^ 2 / 2) • parameterJet 3 F z + have hJ := parameterJet_smooth hF 3 + have hR : ContDiff ℝ ∞ R := + (((contDiff_const.sub contDiff_snd).pow 2).div_const 2).smul hJ + have hi := weighted_parameter_integral (C := M / 2) hR hU hs m 0 1 + have hbound : WeightedBound U s m ((M / 2) * |1 - 0|) (fun p => ∫ t in (0 : ℝ)..1, R (p, t)) := by + apply hi + intro j hj p hp t ht + have htp : t ∈ Icc (0 : ℝ) 1 := by simpa using ht + have hpart : partialIterated j R (p, t) = + ((1 - t) ^ 2 / 2) • partialIterated j (parameterJet 3 F) (p, t) := by + change iteratedFDeriv ℝ j (fun q => ((1 - t) ^ 2 / 2) • parameterJet 3 F (q, t)) p = _ + exact iteratedFDeriv_const_smul_apply' + (((hJ.comp (contDiff_id.prodMk contDiff_const)).of_le + (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) + rw [hpart, norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ (1 - t) ^ 2 / 2)] + have hw : (1 - t) ^ 2 / 2 ≤ (1 / 2 : ℝ) := by nlinarith [htp.1, htp.2] + calc + _ = ((1 - t) ^ 2 / 2) * (s ^ j * ‖partialIterated j (parameterJet 3 F) (p, t)‖) := by ring + _ ≤ ((1 - t) ^ 2 / 2) * M := mul_le_mul_of_nonneg_left (hb j hj p hp t htp) (by positivity) + _ ≤ (1 / 2 : ℝ) * M := mul_le_mul_of_nonneg_right hw hM + _ = M / 2 := by ring + have he : (fun p => ∫ t in (0 : ℝ)..1, R (p, t)) = cubicRemainder F := by + funext p + exact (cubicRemainder_eq_integral hF p).symm + simpa only [he, sub_zero, abs_one, mul_one] using hbound + +end ClosedSurfaceR4.ParameterTaylor + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PathLastIntersection.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PathLastIntersection.lean new file mode 100644 index 0000000000000000000000000000000000000000..102bc2a683a7525033f89ec6923c90ca65ce3af7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PathLastIntersection.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactArcLastIntersection +import OAI.Geometry.SurfaceImmersion.Geometry.InjectivePathConcatenation +import Mathlib.Topology.Subpath + +namespace OAI + +/-! Loop removal at the last intersection of two compact embedded arcs. -/ +noncomputable section +open Set unitInterval +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] {x y z : X} + +omit [T2Space X] in +lemma injective_subpath (γ : Path x y) (hi : Function.Injective γ) + {s t : I} (hst : s ≠ t) : Function.Injective (γ.subpath s t) := by + intro u v huv + have h := congrArg (fun w : I => (w:ℝ)) (hi huv) + change (1-(u:ℝ))*(s:ℝ)+(u:ℝ)*(t:ℝ) = + (1-(v:ℝ))*(s:ℝ)+(v:ℝ)*(t:ℝ) at h + have hst' : (s:ℝ) ≠ (t:ℝ) := fun he => hst (Subtype.ext he) + apply Subtype.ext + have hz : ((u:ℝ)-(v:ℝ))*((t:ℝ)-(s:ℝ)) = 0 := by nlinarith [h] + rcases mul_eq_zero.mp hz with huv0 | hts0 + · exact sub_eq_zero.mp huv0 + · exact False.elim (hst' (sub_eq_zero.mp hts0).symm) + +lemma path_last_intersection (γ : Path x y) (δ : Path y z) + (hend : z ∉ range γ) (hstart : x ∉ range δ) : + ∃ s m : I, 0 < s ∧ m < 1 ∧ γ s = δ m ∧ + ∀ u v : I, u ≤ s → m < v → γ u ≠ δ v := by + let K := δ ⁻¹' range γ + have hK : IsCompact K := + ((isCompact_range γ.continuous).isClosed.preimage δ.continuous).isCompact + have hne : K.Nonempty := ⟨0,by + change δ 0 ∈ range γ + exact ⟨1,by simp⟩⟩ + obtain ⟨m,hm,hmax⟩ := hK.exists_isGreatest hne + obtain ⟨s,hsm⟩ := hm + have hs : 0 < s := by + refine lt_of_le_of_ne (unitInterval.nonneg s) ?_ + intro he + apply hstart + refine ⟨m,?_⟩ + simpa only [← he,Path.source] using hsm.symm + have hm1 : m < 1 := by + refine lt_of_le_of_ne (unitInterval.le_one m) ?_ + intro he + apply hend + exact ⟨s,by simpa only [he,Path.target] using hsm⟩ + refine ⟨s,m,hs,hm1,hsm,?_⟩ + intro u v _ hmv huv + have hv : v ∈ K := ⟨u,huv⟩ + exact (not_le_of_gt hmv) (hmax hv) + +theorem embedded_path_last_join (γ : Path x y) (δ : Path y z) + (hγ : Function.Injective γ) (hδ : Function.Injective δ) + (hend : z ∉ range γ) (hstart : x ∉ range δ) : + ∃ s m : I, 0 < s ∧ m < 1 ∧ ∃ hsm : γ s = δ m, + let P := ((γ.subpath 0 s).cast (show x = γ 0 from γ.source.symm) hsm.symm).trans + ((δ.subpath m 1).cast rfl (show z = δ 1 from δ.target.symm)) + Function.Injective P ∧ range P ⊆ range γ ∪ range δ := by + obtain ⟨s,m,hs,hm,hsm,hsep⟩ := path_last_intersection γ δ hend hstart + refine ⟨s,m,hs,hm,hsm,?_,?_⟩ + · apply path_trans_injective + · exact injective_subpath γ hγ (ne_of_lt hs) + · exact injective_subpath δ hδ (ne_of_lt hm) + · intro u v huv + have hu : Icc.convexComb 0 s u ≤ s := by + change (1-(u:ℝ)) * 0 + (u:ℝ)*(s:ℝ) ≤ (s:ℝ) + nlinarith [unitInterval.le_one u,unitInterval.nonneg s] + have hv : m ≤ Icc.convexComb m 1 v := by + change (m:ℝ) ≤ (1-(v:ℝ))*(m:ℝ)+(v:ℝ)*1 + nlinarith [unitInterval.nonneg v,unitInterval.le_one m] + have hev : Icc.convexComb m 1 v = m := by + by_contra hn + exact hsep _ _ hu (lt_of_le_of_ne hv (Ne.symm hn)) huv + have he0 : v = 0 := by + have he := congrArg (fun w : I => (w:ℝ)) hev + change (1-(v:ℝ))*(m:ℝ)+(v:ℝ)*1 = (m:ℝ) at he + apply Subtype.ext + change (v:ℝ) = 0 + have hm' : (m:ℝ) < 1 := hm + nlinarith + have he1 : u = 1 := by + have heγ : (γ.subpath 0 s) u = (γ.subpath 0 s) 1 := by + have huv' : γ (Icc.convexComb 0 s u) = δ (Icc.convexComb m 1 v) := huv + rw [he0,Icc.convexComb_zero] at huv' + change γ (Icc.convexComb 0 s u) = γ (Icc.convexComb 0 s 1) + rw [Icc.convexComb_one] + exact huv'.trans hsm.symm + exact injective_subpath γ hγ (ne_of_lt hs) heγ + exact ⟨he1,he0⟩ + · rw [Path.trans_range] + apply union_subset + · intro w hw + change w ∈ range (γ.subpath 0 s) at hw + rw [Path.range_subpath] at hw + exact Or.inl (image_subset_range _ _ hw) + · intro w hw + change w ∈ range (δ.subpath m 1) at hw + rw [Path.range_subpath] at hw + exact Or.inr (image_subset_range _ _ hw) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedForcedSize.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedForcedSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7f0d6013936b86772a12b6efa3cca72659a41c3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedForcedSize.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeOrderBounds + +namespace OAI + +/-! The same finite forced correction has a scale-independent amplitude +budget. Only the finite number of required input derivatives grows. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +def forcedModeBudget (n L : ℕ) (B D : ℕ → ℝ) (q m : ℕ) : ℝ := + initialConstant n m (B m) + + ∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) + (fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + (fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + i (m + (L + 1)) + +lemma forcedModeBudget_nonneg (n L : ℕ) (B D : ℕ → ℝ) + (hB : ∀ m, 0 ≤ B m) (q m : ℕ) : 0 ≤ forcedModeBudget n L B D q m := by + apply add_nonneg (initialConstant_nonneg _ _ (hB m)) + apply Finset.sum_nonneg + intro i hi + apply mul_nonneg (initialConstant_nonneg _ _ (hB m)) + exact FiniteParametrix.boundProfile_nonneg + (fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _)) + (fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _)) _ _ + +theorem perturbedMode_size (τ : ℝ) {n : ℕ} {G : Field n} {U : Set Base} + (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {ε : ℝ} {p L : ℕ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ p ≤ 1) + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (hc : ∀ m, ReconstructionCoefficientBound G U s (m + 1) (B m)) + (R : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (hR : ∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) + (f : SupportedField (F := Fin 3 → ℂ) K) (q m : ℕ) : + supportedWeightedSeminorm K s m (perturbedMode τ hG h K hKU R f q) ≤ + forcedModeBudget n L B D q m * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) f := by + let A := (conjugatedDLM τ hG K).restrictScalars ℝ + R + let S := (forcedModeLM τ hG h K hKU 0).restrictScalars ℝ + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let N := fun r => κ r * supportedWeightedSeminorm K s (r + (L + 1)) f + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hκ : ∀ r, 0 ≤ κ r := fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _) + have hd := perturbed_geometric_defect_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR + have hS : ∀ r g, supportedWeightedSeminorm K s r (S g) ≤ + initialConstant n r (B r) * supportedWeightedSeminorm K s (r + (L + 1)) g := by + intro r g + exact (forcedModeLM_zero_bound τ hG h K hKU hτ hs hτs hs1 (hB r) r (hc r) g).trans + (mul_le_mul_of_nonneg_left (supportedWeightedSeminorm_mono s (by omega) g) + (initialConstant_nonneg _ _ (hB r))) + have hdev := FiniteParametrix.improve_sub_initial_small A S f (S f) + (fun r => supportedWeightedSeminorm K s r) (fun r => supportedWeightedSeminorm K s r) + (L + 1) κ N (fun r => initialConstant n r (B r)) hη hsmall hκ + (fun r => mul_nonneg (hκ r) (apply_nonneg _ _)) + (fun r => initialConstant_nonneg _ _ (hB r)) hd hS (by + intro r + simpa only [A, S, N, κ, FiniteParametrix.defect, LinearMap.sub_apply, + LinearMap.comp_apply, LinearMap.id_apply, mul_assoc] using hd r f) q m + have hsum := finite_deviation_budget K s (L + 1) q m + (fun r => initialConstant n r (B r)) κ κ + (fun r => initialConstant_nonneg _ _ (hB r)) hκ hκ f + have hsum0 : 0 ≤ ∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) κ N i (m + (L + 1)) := by + exact Finset.sum_nonneg fun i _ => mul_nonneg (initialConstant_nonneg _ _ (hB m)) + (FiniteParametrix.boundProfile_nonneg hκ (fun r => mul_nonneg (hκ r) (apply_nonneg _ _)) _ _) + have hdev' : supportedWeightedSeminorm K s m + (perturbedMode τ hG h K hKU R f q - S f) ≤ + (∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) κ κ i (m + (L + 1))) * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) f := by + exact hdev.trans ((mul_le_of_le_one_left hsum0 hsmall).trans hsum) + have hinit : supportedWeightedSeminorm K s m (S f) ≤ + initialConstant n m (B m) * supportedWeightedSeminorm K s + (m + (q + 1) * (L + 1)) f := (hS m f).trans (mul_le_mul_of_nonneg_left + (supportedWeightedSeminorm_mono s (by + have hm := Nat.mul_le_mul_right (L + 1) (show 1 ≤ q + 1 by omega) + omega) f) (initialConstant_nonneg _ _ (hB m))) + calc + _ = supportedWeightedSeminorm K s m + ((perturbedMode τ hG h K hKU R f q - S f) + S f) := by rw [sub_add_cancel] + _ ≤ supportedWeightedSeminorm K s m (perturbedMode τ hG h K hKU R f q - S f) + + supportedWeightedSeminorm K s m (S f) := map_add_le_add _ _ _ + _ ≤ _ := add_le_add hdev' hinit + _ = _ := by dsimp only [forcedModeBudget, κ]; ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedIncrementEstimate.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedIncrementEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd0945e4d0d934c0899e1b4619cfaf0398ea3959 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedIncrementEstimate.lean @@ -0,0 +1,186 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FreeForcedIncrementIdentity +import OAI.Geometry.SurfaceImmersion.Correction.FreeForcedSegment +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanCoefficient + +namespace OAI + +/-! Combine the actual polynomial metric expansion and its finite free and +forced cancellations. The polynomial loss is fixed before the accuracy order. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +lemma coordinateFullLinearized_smooth_global {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs univ) + {G : Base → Space} {X : RField 4} (hG : ContDiff ℝ ∞ G) + (hX : ContDiff ℝ ∞ X) (ε : ℝ) : + ContDiff ℝ ∞ (coordinateFullLinearized P ε G X) := by + apply (contDiffOn_univ.mp (contDiffOn_realLinearizedTensor isOpen_univ + (hG.comp planeCoordinateIsometry.symm.contDiff).contDiffOn hX.contDiffOn)).add + apply contDiff_pi.mpr + intro k + change ContDiff ℝ ∞ (fun p => ∑ l, ε^(l.val+1) * + (P k l).variation G (X ∘ planeCoordinateIsometry) (planeCoordinateIsometry.symm p,0)) + apply ContDiff.sum + intro l _ + apply contDiff_const.mul + have hs := (P k l).variation_smooth (U := univ) isOpen_univ hG + (hX.comp planeCoordinateIsometry.contDiff) (fun _ _ => mem_univ _) (hP k l) + have hs' : ContDiff ℝ ∞ ((P k l).variation G (X ∘ planeCoordinateIsometry)) := by + apply contDiffOn_univ.mp + simpa only [univ_prod_univ] using hs + exact hs'.comp (planeCoordinateIsometry.symm.contDiff.prodMk contDiff_const) + +lemma combinedQuadraticMean_smooth_global {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs univ) + {G : Base → Space} {φ : ι → Base → ℝ} {H : ι → Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) (ε τ : ℝ) : + ContDiff ℝ ∞ (combinedQuadraticMean P ε G φ H τ 0) := by + have hs : ContDiff ℝ ∞ (RealModes.zeroPhaseSum τ + (fun i => coordinatePhase (φ i)) (fun i => coordinateAmplitude (H i))) := by + apply contDiffOn_univ.mp + apply ContDiffOn.sum + intro i _ + apply contDiffOn_pi.mpr + intro k + exact QuadraticMean.contDiffOn_zeroPair + (QuadraticMean.contDiffOn_derivativeAmplitude isOpen_univ + ((hφ i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + ((hH i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn τ _) + (QuadraticMean.contDiffOn_derivativeAmplitude isOpen_univ + ((hφ i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + ((hH i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn τ _) + apply hs.add + apply contDiff_pi.mpr + intro k + apply ContDiff.sum + intro i _ + exact (contDiffOn_univ.mp (quadraticMeanCoefficient_smooth isOpen_univ (hP k) + hG (hφ i) (hH i) (fun _ _ => mem_univ _) ε τ 0)).comp + planeCoordinateIsometry.symm.contDiff + +lemma coordinateQuadraticInteraction_smooth_global {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs univ) + {G : Base → Space} {X Y : RField 4} (hG : ContDiff ℝ ∞ G) + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) (ε : ℝ) : + ContDiff ℝ ∞ (coordinateQuadraticInteraction P ε G X Y) := by + rw [coordinateQuadraticInteraction_eq_cross] + exact (((contDiffOn_univ.mp (contDiffOn_realLinearizedTensor isOpen_univ + hX.contDiffOn hY.contDiffOn)).add + (contDiffOn_univ.mp (contDiffOn_realMetricTensor isOpen_univ hY.contDiffOn))).add + ((tensorQuadraticCross_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) ε 0).comp + planeCoordinateIsometry.symm.contDiff)).add + (coordinateQuadraticPolynomial_smooth hP hG hY ε 0) + +/-- The three finite cancellation errors and the nonlinear error control the +same metric operator. The constants for the cubic part precede the map and +scales; no existence of an improved map is assumed. -/ +theorem perturbed_increment_estimate {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + {D : Set Base} {Q : Set LowJet} (hD : IsOpen D) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs univ) + (m : ℕ) (B₀ A B : ℝ) (hB₀ : 1 ≤ B₀) (hA : 0 < A) (hB : 0 < B) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (G : Base → Space) (φ : ι → Base → ℝ) + (H : ι → Base → Fin 4 → ℂ) (Y : RField 4) (T : SmallModes.Base → PhaseMean.Tensor), + ContDiff ℝ ∞ G → (∀ i, ContDiff ℝ ∞ (φ i)) → + (∀ i, ContDiff ℝ ∞ (H i)) → ContDiff ℝ ∞ Y → ContDiff ℝ ∞ T → + ∀ (τ ε δ η F E M : ℝ) (q : ℕ), + 0 < τ → τ ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < δ → δ ≤ τ → 0 ≤ η → + 0 ≤ F → 0 ≤ E → 0 ≤ M → ε/τ^tensorLoss P ≤ 1 → + let X := QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + MapsTo (lowJet G) D Q → WeightedBound D τ (m+tensorOrder P) B₀ (lowJet G) → + (∀ t ∈ Icc (0 : ℝ) 1, MapsTo + (lowJet (fun p => G p+t • (X+Y) (planeCoordinateIsometry p))) D Q) → + (∀ t ∈ Icc (0 : ℝ) 1, WeightedBound D τ (m+tensorOrder P) B₀ + (lowJet (fun p => G p+t • (X+Y) (planeCoordinateIsometry p)))) → + WeightedBound univ τ (m+tensorOrder P+1) (A*δ*τ) X → + WeightedBound univ τ (m+tensorOrder P+1) (B*δ^2) Y → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (F*(δ*τ)*η^(q+1)) (coordinateFullLinearized P ε G X) → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (E*δ^2*η^(q+1)) + (coordinateFullLinearized P ε G Y+combinedNonzeroQuadratic P ε G φ H τ) → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (M*δ^2*η^(q+1)) (combinedQuadraticMean P ε G φ H τ 0-T) → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + ((F+E+M+C)*(δ*η^(q+1)+δ^3/τ)) + (coordinateMetricMap P ε (fun p => G p+(X+Y) (planeCoordinateIsometry p))- + coordinateMetricMap P ε G-T) := by + obtain ⟨C₁,hC₁,h₁⟩ := scaled_coordinate_interaction_bound hD hQ P hP m B₀ hB₀ + obtain ⟨C₂,hC₂,h₂⟩ := scaled_coordinate_taylor_bound hD hQ P hP m B₀ hB₀ + let C := 4*2^m*(2*A*B+B^2)+C₁*(A*B+B^2)+C₂*(A+B)^3 + have hC : 0 ≤ C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro G φ H Y T hG hφ hH hY hT τ ε δ η F E M q + hτ hτ1 hε hε1 hδ hδτ hη hF hE hM hsmall X hGQ hGb hseg hsegb hXb hYb hlin hforced hmean + have hX : ContDiff ℝ ∞ X := by + apply ContDiff.sum + intro i _ + exact contDiffOn_univ.mp (contDiffOn_displacement + ((hφ i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + ((hH i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn τ) + let V := planeCoordinateIsometry.symm ⁻¹' D + have hV : IsOpen V := hD.preimage planeCoordinateIsometry.symm.continuous + have hsmX := coordinateFullLinearized_smooth_global hP hG hX ε + have hsmY := coordinateFullLinearized_smooth_global hP hG hY ε + have hsmMean := combinedQuadraticMean_smooth_global hP hG hφ hH ε τ + have hsmNonzero : ContDiff ℝ ∞ (combinedNonzeroQuadratic P ε G φ H τ) := by + have he := combined_quadratic_expansion P ε G φ H hφ hH τ 0 + have hs := ((contDiffOn_univ.mp (contDiffOn_realMetricTensor isOpen_univ hX.contDiffOn)).add + (coordinateQuadraticPolynomial_smooth hP hG hX ε 0)).sub hsmMean + have heq : combinedNonzeroQuadratic P ε G φ H τ = + (realMetricTensor X + coordinateQuadraticPolynomial P ε G X 0) - + combinedQuadraticMean P ε G φ H τ 0 := by + ext p k + have hh := congrArg (fun f => f p k) he + change realMetricTensor X p k + coordinateQuadraticPolynomial P ε G X 0 p k = + combinedQuadraticMean P ε G φ H τ 0 p k + + combinedNonzeroQuadratic P ε G φ H τ p k at hh + change combinedNonzeroQuadratic P ε G φ H τ p k = + realMetricTensor X p k + coordinateQuadraticPolynomial P ε G X 0 p k - + combinedQuadraticMean P ε G φ H τ 0 p k + linarith only [hh] + rw [heq] + exact hs + have hint := h₁ G X Y τ ε δ A B hτ hτ1 hε hε1 hδ hδτ hA hB hsmall + hG hX hY hGQ hGb hXb hYb + have hsum := free_forced_size hX hY hτ hδ.le hδτ hB.le hXb hYb + have htaylor := h₂ G (X+Y) τ ε δ (A+B) hτ hτ1 hε hε1 hδ + (add_pos hA hB) hsmall hG (hX.add hY) hseg hsegb (hsum.mono_order (by omega)) + have hsInt := coordinateQuadraticInteraction_smooth_global hP hG hX hY ε + have hsTaylor : ContDiff ℝ ∞ (coordinateTaylorRemainder P ε G (X+Y)) := + (tensorTaylorRemainder_smooth hP hG + ((hX.add hY).comp planeCoordinateIsometry.contDiff) ε 0).comp + planeCoordinateIsometry.symm.contDiff + have hb := (((hlin.add hV.uniqueDiffOn hτ.le hsmX.contDiffOn + (hsmY.add hsmNonzero).contDiffOn hforced).add hV.uniqueDiffOn hτ.le + (hsmX.add (hsmY.add hsmNonzero)).contDiffOn (hsmMean.sub hT).contDiffOn hmean).add + hV.uniqueDiffOn hτ.le ((hsmX.add (hsmY.add hsmNonzero)).add (hsmMean.sub hT)).contDiffOn + hsInt.contDiffOn hint).add hV.uniqueDiffOn hτ.le + (((hsmX.add (hsmY.add hsmNonzero)).add (hsmMean.sub hT)).add hsInt).contDiffOn + hsTaylor.contDiffOn htaylor + have hi := free_forced_metric_increment_identity P ε hG φ H hφ hH τ hY T + have hb' := hb.congr (fun p _ => congrFun hi p) + apply hb'.mono_const + have hd1 : δ ≤ 1 := hδτ.trans hτ1 + have hdt : δ*τ ≤ δ := mul_le_of_le_one_right hδ.le hτ1 + have hd2 : δ^2 ≤ δ := by nlinarith + have hp : 0 ≤ η^(q+1) := pow_nonneg hη _ + have hx : 0 ≤ δ^3/τ := by positivity + have hf := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hdt hF) hp + have he := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 hE) hp + have hm := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 hM) hp + change _ ≤ (F+E+M+C)*(δ*η^(q+1)+δ^3/τ) + dsimp [C] + nlinarith [mul_nonneg (add_nonneg (add_nonneg hF hE) hM) hx, + mul_nonneg hC (mul_nonneg hδ.le hp)] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedParametrix.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedParametrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..e68ac727d676e652408bef4886b9c399eaa98b08 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedParametrix.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrix + +namespace OAI + +/-! Adding a differential perturbation to a finite parametrix: the two error +parameters add, while the prescribed finite derivative loss stays explicit. -/ +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.FiniteParametrix + +variable {E F : Type*} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] + +lemma defect_add (A R : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (f : F) : + defect (A + R) S f = defect A S f + R (S f) := by + simp only [defect, LinearMap.sub_apply, LinearMap.add_apply, LinearMap.comp_apply, + LinearMap.id_apply] + abel + +theorem perturbed_defect_bound (A R : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) + (p : ℕ → Seminorm ℝ F) (L : ℕ) (K₀ K₁ : ℕ → ℝ) {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) + (h₀ : ∀ m f, p m (defect A S f) ≤ a * K₀ m * p (m + L) f) + (h₁ : ∀ m f, p m (R (S f)) ≤ b * K₁ m * p (m + L) f) + (m : ℕ) (f : F) : + p m (defect (A + R) S f) ≤ (a + b) * max (K₀ m) (K₁ m) * p (m + L) f := by + rw [defect_add] + calc + _ ≤ p m (defect A S f) + p m (R (S f)) := map_add_le_add _ _ _ + _ ≤ a * K₀ m * p (m + L) f + b * K₁ m * p (m + L) f := add_le_add (h₀ m f) (h₁ m f) + _ ≤ a * max (K₀ m) (K₁ m) * p (m + L) f + + b * max (K₀ m) (K₁ m) * p (m + L) f := by + apply add_le_add + · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (le_max_left _ _) ha) + (apply_nonneg _ _) + · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (le_max_right _ _) hb) + (apply_nonneg _ _) + _ = _ := by ring + +/-- The same finite algorithm improves the perturbed operator to every fixed +accuracy. The number of required input derivatives grows with that accuracy. -/ +theorem perturbed_residual_bound (A R : E →ₗ[ℝ] F) (S : F →ₗ[ℝ] E) (f : F) (z : E) + (p : ℕ → Seminorm ℝ F) (L : ℕ) (K₀ K₁ C : ℕ → ℝ) {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (hK : ∀ m, 0 ≤ K₀ m) + (h₀ : ∀ m g, p m (defect A S g) ≤ a * K₀ m * p (m + L) g) + (h₁ : ∀ m g, p m (R (S g)) ≤ b * K₁ m * p (m + L) g) + (hinit : ∀ m, p m ((A + R) z - f) ≤ C m) (j m : ℕ) : + p m (residual (A + R) S f z j) ≤ + (a + b) ^ j * boundProfile L (fun r => max (K₀ r) (K₁ r)) C j m := by + exact residual_bound (A + R) S f z p L _ C (add_nonneg ha hb) + (fun m => (hK m).trans (le_max_left _ _)) + (perturbed_defect_bound A R S p L K₀ K₁ ha hb h₀ h₁) hinit j m + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedSolverTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedSolverTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..2488dc560dc07125f247fc2fa72c0ab663480852 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PerturbedSolverTransfer.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds + +namespace OAI + +/-! Add a fixed polynomial perturbation to an existing geometric solver. +The polynomial bound is obtained uniformly from a fixed compact jet range +and fixed coordinate profiles, before the map and scales are supplied. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +namespace PolynomialSolveData + +/-- Reuse all geometric and reconstruction data. The uniform theorem below +provides the polynomial estimate required by this constructor. -/ +def withPolynomial {n : ℕ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + (c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (P : Fin 3 → Fin n → Expression) (ε : ℝ) {O : Set LowJet} + (hO : IsOpen O) (hP : ∀ k j, (P k j).SmoothCoeffs O) + (hGO : Set.MapsTo (lowJet G) c₀.U O) (D : ℕ → ℝ) (hD : ∀ m, 0 ≤ D m) + (hpoly : ∀ m Z, supportedWeightedSeminorm + (chartSupport c₀.e (modeSupport K) c₀.supportChart) s m + (phaseChartPolynomialOperator hO c₀.openU P hP hG hGO K c₀.supportU + c₀.smoothPhase τ ε c₀.e c₀.smoothForward c₀.smoothInverse c₀.supportChart Z) ≤ + ε / τ ^ tensorLoss P * D m * supportedWeightedSeminorm + (chartSupport c₀.e (modeSupport K) c₀.supportChart) s (m + tensorOrder P) Z) : + PolynomialSolveData P ε G hG φ K τ s where + U := c₀.U + O := O + openU := c₀.openU + openO := hO + smoothP := hP + mapsG := hGO + supportU := c₀.supportU + smoothPhase := c₀.smoothPhase + e := c₀.e + smoothForward := c₀.smoothForward + smoothInverse := c₀.smoothInverse + supportChart := c₀.supportChart + phase := c₀.phase + smoothMap := c₀.smoothMap + domain := c₀.domain + C := c₀.C + D := D + J := c₀.J + nonnegC := c₀.nonnegC + nonnegD := hD + oneLEJ := c₀.oneLEJ + coordinates := c₀.coordinates + coefficients := c₀.coefficients + polynomial := hpoly + +end PolynomialSolveData + +theorem uniform_perturbed_solver_transfer {n : ℕ} {U : Set Base} + {O Q : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + (hKe : (modeSupport K : Set SmallModes.Base) ⊆ e.source) + (B F J I : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hF : ∀ m, 0 ≤ F m) + (hJ : ∀ m, 1 ≤ J m) (hI : ∀ m, 1 ≤ I m) + (hebound : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m) + (hibound : ∀ m j, 1 ≤ j → j ≤ m + 1 → ∀ x ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I m) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) (φ : Base → ℝ) + (τ ε : ℝ) (s : ℝ≥0), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + Set.MapsTo (lowJet G) U Q → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + (∀ m v, WeightedBound U s (m + tensorOrder P) (F m) + (fun x => fderiv ℝ φ x (coordinateVector v))) → + ∀ (c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s), + c₀.U = U → c₀.e = e → + ∃ c : PolynomialSolveData P ε G hG φ K τ s, + c.U = U ∧ c.O = O ∧ c.e = e ∧ c.C = c₀.C ∧ c.D = D ∧ c.J = c₀.J := by + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds hU hO hQ hQO + P hP K hKU e he hi hKe B F J I hB hF hJ hI hebound hibound + refine ⟨D,hD,?_⟩ + intro G hG φ τ ε s hτ hs hτs hs1 hε hε1 hGQ hGb hφb c₀ hU₀ he₀ + subst U + subst e + let c := c₀.withPolynomial P ε hO hP (fun _ hx => hQO (hGQ hx)) D hD + (hd G φ hG c₀.smoothPhase hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb) + exact ⟨c,rfl,rfl,rfl,rfl,rfl,rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneAdjugate.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneAdjugate.lean new file mode 100644 index 0000000000000000000000000000000000000000..4891b6814076fe8e3e61d94b5b6aecc18ef36565 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneAdjugate.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.Immersion.ClosedSurface.JacobianBounds + +namespace OAI + +/-! The explicit two-dimensional inverse matrix used for phase charts. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes + +def planeAdjugate (A : Base →L[ℝ] Base) : Base →L[ℝ] Base := + (((A dy).2 • ContinuousLinearMap.fst ℝ ℝ ℝ - + (A dy).1 • ContinuousLinearMap.snd ℝ ℝ ℝ).prod + (-(A dx).2 • ContinuousLinearMap.fst ℝ ℝ ℝ + + (A dx).1 • ContinuousLinearMap.snd ℝ ℝ ℝ)) + +lemma planeAdjugate_apply (A : Base →L[ℝ] Base) (v : Base) : + planeAdjugate A v = ((A dy).2*v.1-(A dy).1*v.2, + -(A dx).2*v.1+(A dx).1*v.2) := rfl + +lemma planeAdjugate_comp (A : Base →L[ℝ] Base) : + (planeAdjugate A).comp A = coordDet A • ContinuousLinearMap.id ℝ Base := by + apply ContinuousLinearMap.ext + intro v + change planeAdjugate A (A v) = coordDet A • v + rw [planeAdjugate_apply,linear_apply_basis A v] + apply Prod.ext <;> + simp only [Prod.fst_add,Prod.snd_add,Prod.smul_fst,Prod.smul_snd,smul_eq_mul,coordDet] <;> ring + +lemma planeAdjugate_norm_le (A : Base →L[ℝ] Base) : ‖planeAdjugate A‖ ≤ 2*‖A‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro v + rw [planeAdjugate_apply,Prod.norm_def,Real.norm_eq_abs,Real.norm_eq_abs,max_le_iff] + have hdx : ‖A dx‖ ≤ ‖A‖ := by simpa [dx] using A.le_opNorm dx + have hdy : ‖A dy‖ ≤ ‖A‖ := by simpa [dy] using A.le_opNorm dy + have ha := (norm_fst_le (A dx)).trans hdx + have hb := (norm_snd_le (A dx)).trans hdx + have hc := (norm_fst_le (A dy)).trans hdy + have hd := (norm_snd_le (A dy)).trans hdy + have hv1 := norm_fst_le v + have hv2 := norm_snd_le v + simp only [Real.norm_eq_abs] at ha hb hc hd hv1 hv2 + constructor + · calc + _ ≤ |(A dy).2*v.1|+|(A dy).1*v.2| := abs_sub _ _ + _ ≤ ‖A‖*‖v‖+‖A‖*‖v‖ := by rw [abs_mul,abs_mul]; gcongr + _ = _ := by ring + · calc + _ ≤ |-(A dx).2*v.1|+|(A dx).1*v.2| := abs_add_le _ _ + _ ≤ ‖A‖*‖v‖+‖A‖*‖v‖ := by rw [abs_mul,abs_neg,abs_mul]; gcongr + _ = _ := by ring + +def planeAdjugateOperator : (Base →L[ℝ] Base) →L[ℝ] (Base →L[ℝ] Base) := + LinearMap.mkContinuous + { toFun := planeAdjugate + map_add' := by + intro A B + apply ContinuousLinearMap.ext + intro v + change planeAdjugate (A+B) v = planeAdjugate A v + planeAdjugate B v + simp only [planeAdjugate_apply,add_apply,Prod.fst_add,Prod.snd_add] + ext <;> dsimp <;> ring + map_smul' := by + intro c A + apply ContinuousLinearMap.ext + intro v + change planeAdjugate (c • A) v = c • planeAdjugate A v + simp only [planeAdjugate_apply,smul_apply,Prod.smul_fst, + Prod.smul_snd,smul_eq_mul,Prod.smul_mk] + ext <;> dsimp <;> ring } + 2 planeAdjugate_norm_le + +lemma planeAdjugateOperator_norm_le : ‖planeAdjugateOperator‖ ≤ 2 := + ContinuousLinearMap.opNorm_le_bound _ (by norm_num) planeAdjugate_norm_le + +lemma inverse_matrix_comp (A : Base →L[ℝ] Base) (hA : coordDet A ≠ 0) : + ((coordDet A)⁻¹ • planeAdjugate A).comp A = ContinuousLinearMap.id ℝ Base := by + rw [ContinuousLinearMap.smul_comp,planeAdjugate_comp,smul_smul,inv_mul_cancel₀ hA,one_smul] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneComplexFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneComplexFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d9ad98faa3ea32cc5c766e52516d237b06b1e38 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneComplexFrame.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalPlaneFrame + +namespace OAI + +/-! A real coordinate frame from a nonzero vector in the normal plane. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def planeComplexFrame (w : Base) : Base →L[ℝ] Base := + (ContinuousLinearMap.proj 0).smulRight w+ + (ContinuousLinearMap.proj 1).smulRight ![-w 1,w 0] + +lemma planeComplexFrame_apply (w v : Base) : + planeComplexFrame w v = ![w 0*v 0-w 1*v 1,w 1*v 0+w 0*v 1] := by + ext i + fin_cases i <;> simp [planeComplexFrame] <;> ring + +lemma planeComplexFrame_smooth : ContDiff ℝ ∞ planeComplexFrame := by + have hJ : ContDiff ℝ ∞ (fun w : Base => (![-w 1,w 0] : Base)) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact (contDiff_apply ℝ ℝ 1).neg + · exact contDiff_apply ℝ ℝ 0 + exact (contDiff_const.smulRight contDiff_id).add (contDiff_const.smulRight hJ) + +lemma planeComplexFrame_injective {w : Base} (hw : w ≠ 0) : + Function.Injective (planeComplexFrame w) := by + have hs : (w 0)^2+(w 1)^2 ≠ 0 := by + intro hz + have h0 : w 0 = 0 := by nlinarith [sq_nonneg (w 0),sq_nonneg (w 1)] + have h1 : w 1 = 0 := by nlinarith [sq_nonneg (w 0),sq_nonneg (w 1)] + apply hw + ext i + fin_cases i + · exact h0 + · exact h1 + intro u v he + have h0 : w 0*u 0-w 1*u 1 = w 0*v 0-w 1*v 1 := by + simpa only [planeComplexFrame_apply,Matrix.cons_val_zero] using congrFun he 0 + have h1 : w 1*u 0+w 0*u 1 = w 1*v 0+w 0*v 1 := by + simpa only [planeComplexFrame_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using congrFun he 1 + have hd0 : ((w 0)^2+(w 1)^2)*(u 0-v 0) = 0 := by + linear_combination w 0*h0+w 1*h1 + have hd1 : ((w 0)^2+(w 1)^2)*(u 1-v 1) = 0 := by + linear_combination w 0*h1-w 1*h0 + ext i + fin_cases i + · exact sub_eq_zero.mp ((mul_eq_zero.mp hd0).resolve_left hs) + · exact sub_eq_zero.mp ((mul_eq_zero.mp hd1).resolve_left hs) + +lemma planeComplexFrame_bijective {w : Base} (hw : w ≠ 0) : + Function.Bijective (planeComplexFrame w) := by + have hi := planeComplexFrame_injective hw + exact ⟨hi,(LinearMap.injective_iff_surjective_of_finrank_eq_finrank + (f := (planeComplexFrame w).toLinearMap) rfl).mp hi⟩ + +lemma planeComplexFrame_axis (w : Base) (r : ℝ) : + planeComplexFrame w ![r,0] = r • w := by + ext i + fin_cases i <;> simp [planeComplexFrame_apply,mul_comm] + +lemma planeComplexFrame_invertible {w : Base} (hw : w ≠ 0) : + (planeComplexFrame w).IsInvertible := by + have hb := planeComplexFrame_bijective hw + exact ⟨ContinuousLinearEquiv.ofBijective (planeComplexFrame w) + (LinearMap.ker_eq_bot.mpr hb.1) (LinearMap.range_eq_top.mpr hb.2),rfl⟩ + +lemma planeComplexFrame_inverse_axis {w : Base} (hw : w ≠ 0) (r : ℝ) : + (planeComplexFrame w).inverse (r • w) = ![r,0] := by + apply ((planeComplexFrame_invertible hw).inverse_apply_eq).mpr + exact (planeComplexFrame_axis w r).symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..2825cc5e8093b313f2f9736204eb5d7d5d50e0f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveFrame.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapLinearCoordinates + +namespace OAI + +/-! A transverse linear coordinate for a regular curve in the surface plane. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def planeCurveLinear (v w : Base) : Base →L[ℝ] Base := + (ContinuousLinearMap.proj (0 : Fin 2)).smulRight v + + (ContinuousLinearMap.proj (1 : Fin 2)).smulRight w + +lemma planeCurveLinear_apply (v w x : Base) : + planeCurveLinear v w x = x 0 • v+x 1 • w := rfl + +theorem exists_plane_curve_frame {w : Base} (hw : w ≠ 0) : + ∃ v : Base, Function.Bijective (planeCurveLinear v w) := by + obtain ⟨v,hli⟩ := exists_linearIndependent_pair_of_one_lt_finrank + (R := ℝ) (M := Base) (by simp [Base]) hw + refine ⟨v,?_⟩ + have hz : ∀ x, planeCurveLinear v w x = 0 → x = 0 := by + intro x hx + have he : x 1 • w+x 0 • v = 0 := by + rw [add_comm] + exact hx + obtain ⟨h1,h0⟩ := (LinearIndependent.pair_iff.mp hli) (x 1) (x 0) he + ext i + fin_cases i + · exact h0 + · exact h1 + have hi : Function.Injective (planeCurveLinear v w) := by + intro x y he + apply sub_eq_zero.mp + apply hz + rw [map_sub,he,sub_self] + exact ⟨hi,(LinearMap.injective_iff_surjective_of_finrank_eq_finrank + (f := (planeCurveLinear v w).toLinearMap) rfl).mp hi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveGraph.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b74bdc0f8b15222872f68c5c6479834856e8057 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneCurveGraph.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MonotoneGermDiffeomorphism +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCurveCoordinates + +namespace OAI + +/-! A regular coordinate projection gives an actual local graph of a smooth +plane curve, with a globally smooth graph function available for cutoff gluing. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem plane_curve_graph {γ : ℝ → Base} (hγ : ContDiff ℝ ∞ γ) (t : ℝ) + (h0 : deriv (fun u => γ u 0) t ≠ 0) : + ∃ (g : ℝ → ℝ) (U : Set ℝ), ContDiff ℝ ∞ g ∧ IsOpen U ∧ t ∈ U ∧ + ∀ u ∈ U, γ u = ![γ u 0,g (γ u 0)] := by + let d := deriv (fun u => γ u 0) t + let s : ℝ := if 0 < d then 1 else -1 + have hd : 0 < s*d := by + dsimp only [s] + split_ifs with hp + · simpa using hp + · have hn : d < 0 := lt_of_le_of_ne (not_lt.mp hp) h0 + simpa using hn + let h : ℝ → ℝ := fun u => s*γ u 0 + have hγ0 : ContDiff ℝ ∞ (fun u => γ u 0) := (contDiff_apply ℝ ℝ 0).comp hγ + have hh : ContDiff ℝ ∞ h := contDiff_const.mul hγ0 + have hdt : deriv h t = s*d := (hγ0.differentiable (by simp) t |>.hasDerivAt.const_mul s).deriv + obtain ⟨e,_,hei,_,he⟩ := increasing_smooth_germ_diffeomorphism hh t (hdt ▸ hd) + let g : ℝ → ℝ := fun x => γ (e.symm (s*x)) 1 + have hg : ContDiff ℝ ∞ g := (contDiff_apply ℝ ℝ 1).comp + (hγ.comp (hei.comp (contDiff_const.mul contDiff_id))) + obtain ⟨U,hU,htU,hsub⟩ := mem_nhds_iff.mp he + refine ⟨g,U,hg,htU,hsub,?_⟩ + intro u hu + have heu : e u = s*γ u 0 := hU hu + have hu' : e.symm (s*γ u 0) = u := by rw [← heu,e.symm_apply_apply] + ext i + fin_cases i + · rfl + · change γ u 1 = γ (e.symm (s*γ u 0)) 1 + rw [hu'] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDefectInterpolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDefectInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5786f77d7deddfe901846793520b4c581123821 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDefectInterpolation.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.DiagonalDefectModel + +namespace OAI + +/-! Convex interpolation with matching transverse signs retains the simple +axial zeros on one common rectangle. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def planeDefectInterpolation (F G : Base → Base) (s : ℝ) (x : Base) : Base := + (1-s) • F x+s • G x + +lemma planeDefectInterpolation_smooth {F G : Base → Base} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + ContDiff ℝ ∞ (fun z : ℝ × Base => planeDefectInterpolation F G z.1 z.2) := + ((contDiff_const.sub contDiff_fst).smul (hF.comp contDiff_snd)).add + (contDiff_fst.smul (hG.comp contDiff_snd)) + +lemma planeDefectInterpolation_fderiv {F G : Base → Base} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (s : ℝ) (x : Base) : + fderiv ℝ (planeDefectInterpolation F G s) x = + (1-s) • fderiv ℝ F x+s • fderiv ℝ G x := + (((hF.differentiable (by simp) x).hasFDerivAt.const_smul (1-s)).add + ((hG.differentiable (by simp) x).hasFDerivAt.const_smul s)).fderiv + +lemma planeDefectInterpolation_axis {F G : Base → Base} {p q t : ℝ} + (hF : F (crosscapAxis t) = ![(t-p)*(t-q),0]) + (hG : G (crosscapAxis t) = ![(t-p)*(t-q),0]) (s : ℝ) : + planeDefectInterpolation F G s (crosscapAxis t) = ![(t-p)*(t-q),0] := by + rw [planeDefectInterpolation,hF,hG,←add_smul] + simp + +theorem planeDefectInterpolation_two_zeros {F G : Base → Base} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + {p q : ℝ} (hpq : p < q) {W : Set ℝ} (hW : IsOpen W) (hKW : Icc p q ⊆ W) + (hFa : ∀ t ∈ W, F (crosscapAxis t) = ![(t-p)*(t-q),0]) + (hGa : ∀ t ∈ W, G (crosscapAxis t) = ![(t-p)*(t-q),0]) + (hsp : 0 < (fderiv ℝ F (crosscapAxis p) ![1,0] 1)* + (fderiv ℝ G (crosscapAxis p) ![1,0] 1)) + (hsq : 0 < (fderiv ℝ F (crosscapAxis q) ![1,0] 1)* + (fderiv ℝ G (crosscapAxis q) ![1,0] 1)) : + ∃ (r : ℝ) (O : Set Base), 0 < r ∧ IsOpen O ∧ + (∀ x ∈ Icc (-r) r, ∀ t ∈ Icc (p-r) (q+r), (![x,t] : Base) ∈ O) ∧ + ∀ s ∈ Icc (0:ℝ) 1, ∀ x ∈ O, planeDefectInterpolation F G s x = 0 ↔ + x = crosscapAxis p ∨ x = crosscapAxis q := by + have hsm := planeDefectInterpolation_smooth hF hG + have hFs : ∀ s ∈ Icc (0:ℝ) 1, ContDiff ℝ ∞ (planeDefectInterpolation F G s) := by + intro s _ + exact hsm.comp (contDiff_const.prodMk contDiff_id) + have hD : Continuous (fun z : ℝ × Base => fderiv ℝ (planeDefectInterpolation F G z.1) z.2) := by + simp_rw [planeDefectInterpolation_fderiv hF hG] + exact ((continuous_const.sub continuous_fst).smul + ((hF.continuous_fderiv (by simp)).comp continuous_snd)).add + (continuous_fst.smul ((hG.continuous_fderiv (by simp)).comp continuous_snd)) + apply compact_two_zero_rectangle isCompact_Icc _ hFs hsm.continuous hD hpq + · intro s _ t ht + exact planeDefectInterpolation_axis (hFa t (hKW ht)) (hGa t (hKW ht)) s + · intro s hs + rw [planeDefectInterpolation_fderiv hF hG] + apply convex_plane_jets_bijective _ _ (c := (p-p)+(p-q)) (by linarith) + (normalized_axis_derivative hF.contDiffAt hW (hKW (left_mem_Icc.mpr hpq.le)) hFa) + (normalized_axis_derivative hG.contDiffAt hW (hKW (left_mem_Icc.mpr hpq.le)) hGa) hsp hs + · intro s hs + rw [planeDefectInterpolation_fderiv hF hG] + apply convex_plane_jets_bijective _ _ (c := (q-p)+(q-q)) (by linarith) + (normalized_axis_derivative hF.contDiffAt hW (hKW (right_mem_Icc.mpr hpq.le)) hFa) + (normalized_axis_derivative hG.contDiffAt hW (hKW (right_mem_Icc.mpr hpq.le)) hGa) hsq hs + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDerivativeInjectivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDerivativeInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dbf99c8e25f30f82c87ffb9d07553921c49322e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PlaneDerivativeInjectivity.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactFixedJet + +namespace OAI + +/-! Quantitative local injectivity for a two-dimensional map. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma near_plane_equiv_derivative_injOn (L : Base ≃L[ℝ] Base) + {g : Base → Base} {S : Set Base} (hg : ∀ x ∈ S, DifferentiableAt ℝ g x) + (hS : Convex ℝ S) {c : ℝ} + (hsmall : ‖L.symm.toContinuousLinearMap‖*c < 1) + (hbound : ∀ x ∈ S, ‖fderiv ℝ g x-L.toContinuousLinearMap‖ ≤ c) : + S.InjOn g := by + intro x hx y hy heq + have hd : ∀ z ∈ S, DifferentiableAt ℝ (fun z => g z-L z) z := + fun z hz => (hg z hz).sub L.differentiableAt + have hb : ∀ z ∈ S, ‖fderiv ℝ (fun z => g z-L z) z‖ ≤ c := by + intro z hz + rw [fderiv_fun_sub (hg z hz) L.differentiableAt,L.fderiv] + exact hbound z hz + have herr := hS.norm_image_sub_le_of_norm_fderiv_le hd hb hx hy + have hL : ‖L (y-x)‖ ≤ c*‖y-x‖ := by + have he : (g y-L y)-(g x-L x) = -L (y-x) := by + rw [←heq,map_sub] + abel + rw [he,norm_neg] at herr + exact herr + have hback : ‖y-x‖ ≤ ‖L.symm.toContinuousLinearMap‖*‖L (y-x)‖ := by + simpa only [ContinuousLinearEquiv.coe_coe,L.symm_apply_apply] using + L.symm.toContinuousLinearMap.le_opNorm (L (y-x)) + have hn : ‖y-x‖ = 0 := by + have hh := hback.trans (mul_le_mul_of_nonneg_left hL (norm_nonneg _)) + nlinarith [norm_nonneg (y-x)] + exact (sub_eq_zero.mp (norm_eq_zero.mp hn)).symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityClock.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityClock.lean new file mode 100644 index 0000000000000000000000000000000000000000..32e7a3b35099c9cb666d4f7ffffba3fa3ea61387 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityClock.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicCalculus + +namespace OAI + +/-! The angular clock associated to a positive periodic density of mass one. -/ +noncomputable section +open Filter Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PositiveDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] + {ρ : B × ℝ → ℝ} {U : Set B} + +def clock (ρ : B × ℝ → ℝ) (b : B) (t : ℝ) : ℝ := ∫ s in 0..t, ρ (b, s) + +lemma clock_smoothOn [FiniteDimensional ℝ B] (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) : + ContDiffOn ℝ ∞ (fun z : B × ℝ => clock ρ z.1 z.2) (U ×ˢ univ) := by + apply (hU.prod isOpen_univ).contDiffOn_iff.mpr + intro z hz + obtain ⟨G, hG, he⟩ := SmoothParameterIntegral.exists_smooth_extension_near hU hρ hz.1 + apply (PeriodicPrimitive.contDiff_rawPrimitive_joint hG).contDiffAt.congr_of_eventuallyEq + have he' := (continuous_fst.continuousAt : Tendsto Prod.fst (𝓝 z) (𝓝 z.1)).eventually he + filter_upwards [he'] with w hw + change (∫ s in 0..w.2, ρ (w.1, s)) = ∫ s in 0..w.2, G (w.1, s) + congr 1 + funext s + exact (hw s).symm + +lemma hasDerivAt_clock (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + {b : B} (hb : b ∈ U) (t : ℝ) : HasDerivAt (clock ρ b) (ρ (b, t)) t := + ((LocalPeriodicCalculus.smooth_slice hU hρ hb).continuous.integral_hasStrictDerivAt 0 t).hasDerivAt + +lemma clock_strictMono (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) {b : B} (hb : b ∈ U) : + StrictMono (clock ρ b) := by + apply strictMono_of_deriv_pos + intro t + rw [(hasDerivAt_clock hU hρ hb t).deriv] + exact hpos b hb t + +lemma clock_continuous (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + {b : B} (hb : b ∈ U) : Continuous (clock ρ b) := + (show Differentiable ℝ (clock ρ b) from + fun t => (hasDerivAt_clock hU hρ hb t).differentiableAt).continuous + +lemma clock_period (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {b : B} (hb : b ∈ U) (t : ℝ) : clock ρ b (t + 1) = clock ρ b t + 1 := by + rw [clock, (hper b hb).intervalIntegral_add_eq_add 0 t + (fun x y => (LocalPeriodicCalculus.smooth_slice hU hρ hb).continuous.intervalIntegrable x y)] + simp only [zero_add, hmass b hb, clock] + +omit [NormedAddCommGroup B] [NormedSpace ℝ B] in +@[simp] lemma clock_zero (ρ : B × ℝ → ℝ) (b : B) : clock ρ b 0 = 0 := by simp [clock] + +lemma clock_surjective (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {b : B} (hb : b ∈ U) : Function.Surjective (clock ρ b) := by + exact (clock_continuous hU hρ hb).surjective + ((hper b hb).tendsto_atTop_intervalIntegral_of_pos (by rw [hmass b hb]; norm_num) zero_lt_one) + ((hper b hb).tendsto_atBot_intervalIntegral_of_pos (by rw [hmass b hb]; norm_num) zero_lt_one) + +end ClosedSurfaceR4.PositiveDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..330f6c9ee827a30e4b7b0b116e4b87e8d9037333 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityInverse.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveDensityClock + +namespace OAI + +/-! A positive density's circle diffeomorphism has a jointly smooth inverse. -/ +noncomputable section +open Filter Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PositiveDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + {ρ : B × ℝ → ℝ} {U : Set B} + +def inverseClock (ρ : B × ℝ → ℝ) (b : B) (θ : ℝ) : ℝ := + Function.invFun (clock ρ b) θ + +omit [FiniteDimensional ℝ B] in +lemma clock_inverseClock (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) {b : B} (hb : b ∈ U) (θ : ℝ) : + clock ρ b (inverseClock ρ b θ) = θ := + Function.rightInverse_invFun (clock_surjective hU hρ hper hmass hb) θ + +omit [FiniteDimensional ℝ B] in +lemma inverseClock_clock (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) {b : B} (hb : b ∈ U) (t : ℝ) : + inverseClock ρ b (clock ρ b t) = t := + Function.leftInverse_invFun (clock_strictMono hU hρ hpos hb).injective t + +omit [FiniteDimensional ℝ B] in +lemma inverseClock_period (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) {b : B} (hb : b ∈ U) (θ : ℝ) : + inverseClock ρ b (θ + 1) = inverseClock ρ b θ + 1 := by + apply (clock_strictMono hU hρ hpos hb).injective + rw [clock_inverseClock hU hρ hper hmass hb, clock_period hU hρ hper hmass hb, + clock_inverseClock hU hρ hper hmass hb] + +private def equation (ρ : B × ℝ → ℝ) (z : (B × ℝ) × ℝ) : ℝ := + clock ρ z.1.1 z.2 - z.1.2 + +private lemma equation_smoothOn (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) : + ContDiffOn ℝ ∞ (equation ρ) ((U ×ˢ univ) ×ˢ univ) := by + exact ((clock_smoothOn hU hρ).comp + (contDiffOn_fst.fst.prodMk contDiffOn_snd) (fun z hz => ⟨hz.1.1, mem_univ _⟩)).sub + contDiffOn_fst.snd + +private lemma equation_partial (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + {b : B} (hb : b ∈ U) (θ t : ℝ) : + fderiv ℝ (equation ρ) ((b, θ), t) ∘L ContinuousLinearMap.inr ℝ (B × ℝ) ℝ = + ContinuousLinearMap.toSpanSingleton ℝ (ρ (b, t)) := by + have hc : ContDiffAt ℝ ∞ (equation ρ) ((b, θ), t) := + (equation_smoothOn hU hρ).contDiffAt + (((hU.prod isOpen_univ).prod isOpen_univ).mem_nhds ⟨⟨hb, mem_univ θ⟩, mem_univ t⟩) + have hi : HasFDerivAt (fun s : ℝ => ((b, θ), s)) + (ContinuousLinearMap.inr ℝ (B × ℝ) ℝ) t := hasFDerivAt_prodMk_right (b, θ) t + have hcomp := (hc.differentiableAt (by simp)).hasFDerivAt.comp t hi + exact hcomp.unique ((hasDerivAt_clock hU hρ hb t).sub_const θ).hasFDerivAt + +private lemma equation_partial_invertible (hU : IsOpen U) + (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) {b : B} (hb : b ∈ U) (θ t : ℝ) : + (fderiv ℝ (equation ρ) ((b, θ), t) ∘L ContinuousLinearMap.inr ℝ (B × ℝ) ℝ).IsInvertible := by + rw [equation_partial hU hρ hb] + apply ContinuousLinearMap.IsInvertible.of_inverse + (g := ContinuousLinearMap.toSpanSingleton ℝ (ρ (b, t))⁻¹) + · ext + simp [ContinuousLinearMap.toSpanSingleton_apply, (hpos b hb t).ne'] + · ext + simp [ContinuousLinearMap.toSpanSingleton_apply, (hpos b hb t).ne'] + +/-- No regularity of the inverse is assumed: it follows from positivity and the IFT. -/ +theorem inverseClock_smoothOn (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) : + ContDiffOn ℝ ∞ (fun z : B × ℝ => inverseClock ρ z.1 z.2) (U ×ˢ univ) := by + apply (hU.prod isOpen_univ).contDiffOn_iff.mpr + intro z hz + let u : (B × ℝ) × ℝ := (z, inverseClock ρ z.1 z.2) + have hu : u ∈ (U ×ˢ univ) ×ˢ univ := ⟨hz, mem_univ _⟩ + have hc := (equation_smoothOn hU hρ).contDiffAt + (((hU.prod isOpen_univ).prod isOpen_univ).mem_nhds hu) + have hn : (∞ : ℕ∞ω) ≠ 0 := by simp + have hi := equation_partial_invertible hU hρ hpos hz.1 z.2 (inverseClock ρ z.1 z.2) + have hs := hc.contDiffAt_implicitFunction hn hi + have he := hc.eventually_apply_implicitFunction hn hi + have hnear : ∀ᶠ w : B × ℝ in 𝓝 z, w.1 ∈ U := + continuous_fst.continuousAt.eventually (hU.mem_nhds hz.1) + have heq : (fun w : B × ℝ => inverseClock ρ w.1 w.2) =ᶠ[𝓝 z] + hc.implicitFunction hn hi := by + filter_upwards [he, hnear] with w hw hwu + apply (clock_strictMono hU hρ hpos hwu).injective + rw [clock_inverseClock hU hρ hper hmass hwu] + change clock ρ w.1 (hc.implicitFunction hn hi w) - w.2 = + clock ρ z.1 (inverseClock ρ z.1 z.2) - z.2 at hw + rw [clock_inverseClock hU hρ hper hmass hz.1, sub_self] at hw + exact (sub_eq_zero.mp hw).symm + exact hs.congr_of_eventuallyEq heq + +end ClosedSurfaceR4.PositiveDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..945bf0b99f8467e4fd67ad2b608171e5559c696a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityPullback.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveDensityReparam + +namespace OAI + +/-! Reparametrization commutes exactly with pulling back the parameter family. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PositiveDensity + +variable {B E F : Type} + +def pullbackDensity (ρ : B × ℝ → ℝ) (σ : E → B) : E × ℝ → ℝ := + fun z => ρ (σ z.1, z.2) + +lemma clock_pullback (ρ : B × ℝ → ℝ) (σ : E → B) (x : E) (t : ℝ) : + clock (pullbackDensity ρ σ) x t = clock ρ (σ x) t := rfl + +lemma inverseClock_pullback (ρ : B × ℝ → ℝ) (σ : E → B) (x : E) (t : ℝ) : + inverseClock (pullbackDensity ρ σ) x t = inverseClock ρ (σ x) t := rfl + +lemma reparametrize_pullback (ρ : B × ℝ → ℝ) (σ : E → B) (f : B × ℝ → F) + (z : E × ℝ) : + reparametrize (pullbackDensity ρ σ) (fun w => f (σ w.1, w.2)) z = + reparametrize ρ f (σ z.1, z.2) := rfl + +variable [NormedAddCommGroup B] [NormedSpace ℝ B] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma pullbackDensity_smoothOn {ρ : B × ℝ → ℝ} {σ : E → B} {U : Set E} {W : Set B} + (hρ : ContDiffOn ℝ ∞ ρ (W ×ˢ univ)) (hσ : ContDiffOn ℝ ∞ σ U) + (hσW : MapsTo σ U W) : + ContDiffOn ℝ ∞ (pullbackDensity ρ σ) (U ×ˢ univ) := by + exact hρ.comp ((hσ.comp contDiffOn_fst (fun z hz => hz.1)).prodMk contDiffOn_snd) + (fun z hz => ⟨hσW hz.1, mem_univ _⟩) + +end ClosedSurfaceR4.PositiveDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityReparam.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityReparam.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae8fbe608e0d9796edfe74aaeac669cd265dc107 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveDensityReparam.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveDensityInverse + +namespace OAI + +/-! Reparametrization converts an exact positive weighted mean into the uniform mean. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PositiveDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + {ρ : B × ℝ → ℝ} {F : B × ℝ → E} {U : Set B} + +def reparametrize (ρ : B × ℝ → ℝ) (F : B × ℝ → E) (z : B × ℝ) : E := + F (z.1, inverseClock ρ z.1 z.2) + +omit [CompleteSpace E] in +lemma reparametrize_smoothOn (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + (hF : ContDiffOn ℝ ∞ F (U ×ˢ univ)) : + ContDiffOn ℝ ∞ (reparametrize ρ F) (U ×ˢ univ) := + hF.comp (contDiffOn_fst.prodMk (inverseClock_smoothOn hU hρ hpos hper hmass)) + (fun _ hz => ⟨hz.1, mem_univ _⟩) + +omit [FiniteDimensional ℝ B] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] in +lemma reparametrize_periodic (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + (hFper : ∀ b ∈ U, Function.Periodic (fun t => F (b, t)) 1) + {b : B} (hb : b ∈ U) : Function.Periodic (fun t => reparametrize ρ F (b, t)) 1 := by + intro t + simp only [reparametrize, inverseClock_period hU hρ hpos hper hmass hb] + exact hFper b hb _ + +omit [CompleteSpace E] in +/-- The exact change of variables, for the actual vector-valued velocity. -/ +theorem reparametrize_mean (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + (hF : ContDiffOn ℝ ∞ F (U ×ˢ univ)) {b : B} (hb : b ∈ U) : + (∫ θ in 0..1, reparametrize ρ F (b, θ)) = ∫ t in 0..1, ρ (b, t) • F (b, t) := by + have hri := reparametrize_smoothOn hU hρ hpos hper hmass hF + have hsub := intervalIntegral.integral_deriv_smul_comp + (a := 0) (b := 1) (f := clock ρ b) (f' := fun t => ρ (b, t)) + (g := fun θ => reparametrize ρ F (b, θ)) + (fun t _ => hasDerivAt_clock hU hρ hb t) + (LocalPeriodicCalculus.smooth_slice hU hρ hb).continuous.continuousOn + (LocalPeriodicCalculus.smooth_slice hU hri hb).continuous + have h1 : clock ρ b 1 = 1 := hmass b hb + simpa only [Function.comp_apply, reparametrize, inverseClock_clock hU hρ hpos hb, + clock_zero, h1] using hsub.symm + +end ClosedSurfaceR4.PositiveDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..43760e84c172784d1462ed31e5df30f9ed6bc67d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorMetric.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds + +namespace OAI + +/-! On the two-dimensional tangent model, a smooth positive symmetric +bilinear tensor is an actual smooth Riemannian metric. -/ +noncomputable section +open Set Metric Manifold Bundle Bornology +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma positive_bilinear_unitBall_bounded (B : Plane →L[ℝ] Plane →L[ℝ] ℝ) + (hB : ∀ v : Plane, v ≠ 0 → 0 < B v v) : + IsVonNBounded ℝ {v : Plane | B v v < 1} := by + have hcpt : IsCompact (sphere (0 : Plane) 1) := isCompact_sphere _ _ + have hf : Continuous (fun v : Plane => B v v) := by fun_prop + have hp : ∀ v ∈ sphere (0 : Plane) 1, 0 < B v v := by + intro v hv + apply hB + intro hz + rw [hz] at hv + norm_num [mem_sphere] at hv + obtain ⟨c,hc,hbound⟩ := hcpt.exists_forall_le' hf.continuousOn hp + have hlower (v : Plane) : c*‖v‖^2 ≤ B v v := by + by_cases hv : v = 0 + · simp [hv] + have hn : 0 < ‖v‖ := norm_pos_iff.mpr hv + have hu : ‖‖v‖⁻¹ • v‖ = 1 := by + simp only [norm_smul,Real.norm_eq_abs,abs_inv,abs_norm] + exact inv_mul_cancel₀ hn.ne' + have hh := hbound (‖v‖⁻¹ • v) (by simpa only [mem_sphere,dist_zero_right] using hu) + have he : B (‖v‖⁻¹ • v) (‖v‖⁻¹ • v)*‖v‖^2 = B v v := by + simp only [map_smul,smul_apply,smul_eq_mul] + field_simp + exact (mul_le_mul_of_nonneg_right hh (sq_nonneg _)).trans_eq he + apply (NormedSpace.isVonNBounded_ball ℝ Plane (2+c⁻¹)).subset + intro v hv + rw [mem_ball,dist_zero_right] + have hcv : c*‖v‖^2 < 1 := (hlower v).trans_lt hv + have hinv : 0 < c⁻¹ := inv_pos.mpr hc + by_cases hn : ‖v‖ ≤ 1 + · linarith + · have hn1 : 1 < ‖v‖ := lt_of_not_ge hn + have hsq : ‖v‖ ≤ ‖v‖^2 := by nlinarith + have hcn : c*‖v‖ < 1 := (mul_le_mul_of_nonneg_left hsq hc.le).trans_lt hcv + have hnorm : ‖v‖ < c⁻¹ := by + rw [← one_div] + exact (lt_div_iff₀ hc).mpr (by simpa [mul_comm] using hcn) + linarith + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance ptFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance ptFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance ptDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance ptDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance ptSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance ptSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +def positiveTensorMetric (T : ∀ p : M, CovariantTwoTensor p) + (hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p))) + (hsymm : ∀ p v w, T p v w = T p w v) + (hpos : ∀ p v, v ≠ 0 → 0 < T p v v) : SmoothMetric M where + inner := T + symm := hsymm + pos := hpos + isVonNBounded p := positive_bilinear_unitBall_bounded (T p) (hpos p) + contMDiff := hT + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def immersionMetric {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : SmoothMetric M := + positiveTensorMetric (inducedTensor F) (A.inducedTensor_smooth hF) + (by + intro p v w + change inner ℝ (show Space from mfderiv planeModel spaceModel F p v) + (show Space from mfderiv planeModel spaceModel F p w) = _ + exact real_inner_comm _ _) + (by + intro p v hv + change 0 < inner ℝ (show Space from mfderiv planeModel spaceModel F p v) + (show Space from mfderiv planeModel spaceModel F p v) + apply real_inner_self_pos.mpr + intro hz + apply hv + apply hI p + rw [map_zero] + exact hz) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..87c790cb26a341f877650bb1353284d4da5ad90d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTensorPullback.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback +import OAI.Geometry.Immersion.ClosedSurface.MetricPullback + +namespace OAI + +noncomputable section +open scoped Matrix +namespace ClosedSurfaceR4.PhaseMean +open SmallModes + +lemma evaluate_pullback (L : Base →L[ℝ] Base) (H : Tensor) (v w : Base) : + evaluate (pullback L H) v w = evaluate H (L v) (L w) := by + have hL (u : Base) : L u = u.1 • L dx + u.2 • L dy := by + rw [← map_smul,← map_smul,← map_add] + congr 1 + ext <;> simp [dx,dy] + change evaluate H (L dx) (L dx) * v.1 * w.1 + + evaluate H (L dx) (L dy) * (v.1*w.2+v.2*w.1) + + evaluate H (L dy) (L dy) * v.2 * w.2 = evaluate H (L v) (L w) + rw [hL v,hL w] + simp only [evaluate,Prod.fst_add,Prod.snd_add,Prod.smul_fst,Prod.smul_snd,smul_eq_mul] + ring + +lemma positive_pullback (L : Base →L[ℝ] Base) (hL : Function.Injective L) {H : Tensor} + (hH : 0 < H 0 ∧ 0 < H 0*H 2-(H 1)^2) : + 0 < pullback L H 0 ∧ 0 < pullback L H 0*pullback L H 2-(pullback L H 1)^2 := by + apply (tensor_positive_iff _).mp + intro v hv + rw [evaluate_pullback] + apply (tensor_positive_iff H).mpr hH + intro hz + exact hv (hL (by simpa using hz)) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeLinearBlend.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeLinearBlend.lean new file mode 100644 index 0000000000000000000000000000000000000000..a217e4a6d6f71fcb5e8edf87ce05c2005e49658f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeLinearBlend.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TimeCoordinateTransition + +namespace OAI + +/-! Positive transverse coordinate changes can be blended while keeping +the common time differential and an invertible derivative. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma time_linear_bijective (L : Base →L[ℝ] Base) + (hsecond : ∀ v, L v 1 = v 1) (hfirst : L ![1,0] 0 ≠ 0) : Function.Bijective L := by + have hi : Function.Injective L := by + apply (LinearMap.ker_eq_bot).mp + apply le_antisymm + · intro v hv + have hv1 : v 1 = 0 := (hsecond v).symm.trans (congrFun hv 1) + have he : v = (v 0) • (![1,0] : Base) := by + ext i + fin_cases i <;> simp [hv1] + have hv0 : v 0 = 0 := by + have hh := congrFun hv 0 + rw [he,map_smul] at hh + change v 0 * L ![1,0] 0 = 0 at hh + exact (mul_eq_zero.mp hh).resolve_right hfirst + show v = 0 + ext i + fin_cases i + · exact hv0 + · exact hv1 + · exact bot_le + exact ⟨hi,(LinearMap.injective_iff_surjective_of_finrank_eq_finrank (f := L.toLinearMap) rfl).mp hi⟩ + +theorem positive_time_linear_blend (L : Base →L[ℝ] Base) + (hsecond : ∀ v, L v 1 = v 1) (hfirst : 0 < L ![1,0] 0) + {θ : ℝ} (hθ : θ ∈ Icc (0:ℝ) 1) : + Function.Bijective ((1-θ) • ContinuousLinearMap.id ℝ Base + θ • L) := by + let D := (1-θ) • ContinuousLinearMap.id ℝ Base + θ • L + apply time_linear_bijective D + · intro v + change (1-θ)*v 1+θ*(L v 1) = v 1 + rw [hsecond] + ring + · have ha : 0 < 1-θ+θ*(L ![1,0] 0) := by + by_cases hzero : θ = 0 + · rw [hzero]; norm_num + · have hpos : 0 < θ := lt_of_le_of_ne hθ.1 (Ne.symm hzero) + have hprod := mul_pos hpos hfirst + linarith [hθ.2] + have he : D ![1,0] 0 = 1-θ+θ*(L ![1,0] 0) := by + change (1-θ)*1+θ*(L ![1,0] 0) = _ + ring + rw [he] + exact ne_of_gt ha + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeOverlap.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..58f6b962327565dbb66160a938eedbbdd0b8d2ce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PositiveTimeOverlap.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.OrientedTimeTransition + +namespace OAI + +/-! Positivity of the actual transverse transition persists on an open +surface neighborhood of the chosen attachment point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} +namespace SurfaceTimeChart + +theorem positive_overlap (c d : SurfaceTimeChart F) (x : M) + (hxc : x ∈ c.coord.source) (hxd : x ∈ d.coord.source) + (hpos : 0 < fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord x) ![1,0] 0) : + ∃ U : Set M, IsOpen U ∧ x ∈ U ∧ U ⊆ c.coord.source ∩ d.coord.source ∧ + ∀ y ∈ U, 0 < fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord y) ![1,0] 0 := by + have hc := c.inverse_smooth.contMDiffAt + (c.coord.open_target.mem_nhds (c.coord.map_source hxc)) + have hd : ContMDiffAt planeModel 𝓘(ℝ,Base) ∞ d.coord (c.coord.symm (c.coord x)) := + (c.coord.left_inv hxc).symm ▸ d.smooth.contMDiffAt (d.coord.open_source.mem_nhds hxd) + have hD := (hd.comp (c.coord x) hc).contDiffAt.continuousAt_fderiv (by simp) + have hv : ContinuousAt (fun z : Base => fderiv ℝ (d.coord ∘ c.coord.symm) z (![1,0] : Base) 0) + (c.coord x) := (continuous_apply (0:Fin 2)).continuousAt.comp + (hD.clm_apply continuousAt_const) + have hvalue : ∀ᶠ y in 𝓝 x, 0 < fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord y) ![1,0] 0 := + (hv.comp (c.coord.continuousAt hxc)).eventually (isOpen_Ioi.mem_nhds hpos) + have hall : ∀ᶠ y in 𝓝 x, y ∈ c.coord.source ∧ y ∈ d.coord.source ∧ + 0 < fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord y) ![1,0] 0 := by + filter_upwards [c.coord.open_source.mem_nhds hxc,d.coord.open_source.mem_nhds hxd,hvalue] with y hyc hyd hy + exact ⟨hyc,hyd,hy⟩ + obtain ⟨U,hU,hUopen,hxU⟩ := eventually_nhds_iff.mp hall + exact ⟨U,hUopen,hxU,fun y hy => ⟨(hU y hy).1,(hU y hy).2.1⟩, + fun y hy => (hU y hy).2.2⟩ + +end SurfaceTimeChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..b064162961769fcf673ed66a3cff27628ddab124 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetDomain.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredJetGeometry + +namespace OAI + +/-! An open domain of genuine second jets carrying the normal-frame geometry. +The preferred normal is projected from the original spatial normal field. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry + +def preferredJetDomain (U : Set Base) (n : Base → Vec) : Set GeometricJet := + {j | j.1 ∈ U ∧ jetTangentGram j ≠ 0 ∧ + (jetAccelerationCoefficients j).1 < 0 ∧ jetProjectedPreferred n j ≠ 0} + +lemma preferredJetDomain_open {U : Set Base} (hU : IsOpen U) {n : Base → Vec} + (hn : ContDiffOn ℝ ∞ n U) : IsOpen (preferredJetDomain U n) := by + rw [isOpen_iff_mem_nhds] + intro j hj + have hp := hn.contDiffAt (hU.mem_nhds hj.1) + have hu := (hU.preimage continuous_fst).mem_nhds hj.1 + have hD := jetTangentGram_smooth.continuous.continuousAt.eventually_ne hj.2.1 + have hmu := (jetAccelerationCoefficients_smoothAt hj.2.1).fst.continuousAt.eventually + (gt_mem_nhds hj.2.2.1) + have hproj := (jetProjectedPreferred_smoothAt hp hj.2.1).continuousAt.eventually_ne hj.2.2.2 + filter_upwards [hu,hD,hmu,hproj] with k hk hd hm hp + exact ⟨hk,hd,hm,hp⟩ + +lemma preferredJetDomain_geometry {U : Set Base} {n : Base → Vec} + {j : GeometricJet} (hj : j ∈ preferredJetDomain U n) : + gramDet (j.2 0) (j.2 1) ≠ 0 ∧ (jetAccelerationCoefficients j).1 < 0 ∧ + j.2 0 ⬝ᵥ jetSecondNormal j = 0 ∧ j.2 1 ⬝ᵥ jetSecondNormal j = 0 ∧ + j.2 4 = (jetAccelerationCoefficients j).1 • j.2 0 + + (jetAccelerationCoefficients j).2 • j.2 1 + jetSecondNormal j ∧ + j.2 0 ⬝ᵥ jetPreferred n j = 0 ∧ j.2 1 ⬝ᵥ jetPreferred n j = 0 ∧ + jetPreferred n j ⬝ᵥ jetPreferred n j = 1 := by + have hB := realNormalPart_perp (j.2 0) (j.2 1) (j.2 4) hj.2.1 + have hN := realNormalPart_perp (j.2 0) (j.2 1) (n j.1) hj.2.1 + exact ⟨hj.2.1,hj.2.2.1,hB.1,hB.2,jetAcceleration_decomposition j, + dot_normalize_zero hN.1,dot_normalize_zero hN.2,normalize_unit hj.2.2.2⟩ + +lemma actual_jet_mem_preferred_domain {F n : Base → Vec} + (hF : ContDiff ℝ ∞ F) {U : Set Base} {p : Base} (hp : p ∈ U) + (hI : Function.Injective (fderiv ℝ F p)) + (hN : coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) : + CollarVelocity.jetSection F p ∈ preferredJetDomain U n := by + have hmu : (jetAccelerationCoefficients (CollarVelocity.jetSection F p)).1 < 0 := by + rw [jetAccelerationCoefficients_on_section hF] + rw [coordinateMetricHessian_fst_dy] at hHess + exact neg_pos.mp hHess + have hpN : jetProjectedPreferred n (CollarVelocity.jetSection F p) = n p := by + exact realNormalPart_eq_self hN.1 hN.2.1 + refine ⟨hp,gramDet_ne_zero_of_injective _ hI,hmu,?_⟩ + rw [hpN] + intro hz + have hh := hN.2.2 + rw [hz] at hh + norm_num at hh + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf6504968934ee26f2ca4159777ee1babb4b79be --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetFrame.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredJetDomain + +namespace OAI + +/-! A smooth velocity frame on an open neighborhood of the actual second +jets, equal to the projected tangent frame near the selected boundary. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry + +lemma preferredJetDomain_velocity_gram {U : Set Base} {n : Base → Vec} + {j : GeometricJet} (hj : j ∈ preferredJetDomain U n) : + gramDet (j.2 1) (j.2 4) ≠ 0 := by + obtain ⟨hD,hmu,hXB,hYB,hC,_,_,_⟩ := preferredJetDomain_geometry hj + exact (velocity_gram_pos hD hmu.ne hXB hYB hC).ne' + +theorem exists_preferred_jet_frame {F n : Base → Vec} + (hF : ContDiff ℝ ∞ F) {U C₀ : Set Base} (hU : IsOpen U) + (hn : ContDiffOn ℝ ∞ n U) (hC₀ : IsCompact C₀) (hCU : C₀ ⊆ U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (hboundary : ∀ p ∈ C₀, realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) : + ∃ W : Set GeometricJet, IsOpen W ∧ CollarVelocity.jetSection F '' C₀ ⊆ W ∧ + W ⊆ preferredJetDomain U n ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ (preferredJetDomain U n) ∧ + ContDiffOn ℝ ∞ e₂ (preferredJetDomain U n) ∧ + (∀ j ∈ preferredJetDomain U n, + e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ + j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + (∀ j ∈ W, jetNormal j ≠ 0 ∧ e₁ j = normalize (jetNormal j)) := by + let Ω := preferredJetDomain U n + have hΩ : IsOpen Ω := preferredJetDomain_open hU hn + have hmem (p : Base) (hp : p ∈ U) : CollarVelocity.jetSection F p ∈ Ω := + actual_jet_mem_preferred_domain hF hp (hI p hp) (hN p hp) (hHess p hp) + have hK : IsCompact (CollarVelocity.jetSection F '' C₀) := + hC₀.image (CollarVelocity.jetSection_smooth hF).continuous + have hKΩ : CollarVelocity.jetSection F '' C₀ ⊆ Ω := by + rintro _ ⟨p,hp,rfl⟩ + exact hmem p (hCU hp) + have hBn : ContDiffOn ℝ ∞ jetSecondNormal Ω := + fun j hj => (jetSecondNormal_smoothAt hj.2.1).contDiffWithinAt + have hNn : ContDiffOn ℝ ∞ (jetPreferred n) Ω := by + intro j hj + exact (jetPreferred_smoothAt (hn.contDiffAt (hU.mem_nhds hj.1)) hj.2.1 hj.2.2.2).contDiffWithinAt + have hb : ∀ j ∈ CollarVelocity.jetSection F '' C₀, + jetSecondNormal j ≠ 0 ∧ normalize (jetSecondNormal j) ≠ -jetPreferred n j := by + rintro _ ⟨p,hp,rfl⟩ + have he : jetSecondNormal (CollarVelocity.jetSection F p) = realSecondForm F dy dy p := rfl + rw [he,jetPreferred_on_section (hN p (hCU hp)).1 (hN p (hCU hp)).2.1 (hN p (hCU hp)).2.2] + exact hboundary p hp + obtain ⟨W,hW,hKW,hWΩ,e₁,e₂,he₁,he₂,hframe,hfirst⟩ := exists_projected_collar_frame + hK hΩ hKΩ (jetSlot_smooth 0).contDiffOn (jetSlot_smooth 1).contDiffOn + (jetSlot_smooth 4).contDiffOn hBn hNn + (fun j hj => preferredJetDomain_geometry hj) hb + refine ⟨W,hW,hKW,hWΩ,e₁,e₂,he₁,he₂,hframe,?_⟩ + intro j hj + have he : e₁ j = normalize (jetNormal j) := hfirst j hj + refine ⟨?_,he⟩ + intro hz + have hu := (hframe j (hWΩ hj)).1 + rw [he,hz] at hu + norm_num [VelocityFrame.normalize] at hu + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b25a030c96a6635684e72348dd1b77c1f2a235d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredJetGeometry.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedSurfaceLoop +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectedFrameConstruction +import OAI.Geometry.SurfaceImmersion.Geometry.MetricAcceleration + +namespace OAI + +/-! Extend a preferred normal to nearby second jets by orthogonal projection. +All coefficients and normal vectors are explicit functions of the jet. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry + +abbrev GeometricJet := CollarVelocity.JetBase + +def jetTangentGram (j : GeometricJet) : ℝ := gramDet (j.2 0) (j.2 1) + +def jetAccelerationCoefficients (j : GeometricJet) : Base := + (((j.2 1 ⬝ᵥ j.2 1)*(j.2 0 ⬝ᵥ j.2 4)-(j.2 0 ⬝ᵥ j.2 1)*(j.2 1 ⬝ᵥ j.2 4))/jetTangentGram j, + ((j.2 0 ⬝ᵥ j.2 0)*(j.2 1 ⬝ᵥ j.2 4)-(j.2 0 ⬝ᵥ j.2 1)*(j.2 0 ⬝ᵥ j.2 4))/jetTangentGram j) + +def jetSecondNormal (j : GeometricJet) : Vec := realNormalPart (j.2 0) (j.2 1) (j.2 4) + +def jetProjectedPreferred (n : Base → Vec) (j : GeometricJet) : Vec := + realNormalPart (j.2 0) (j.2 1) (n j.1) + +def jetPreferred (n : Base → Vec) (j : GeometricJet) : Vec := + normalize (jetProjectedPreferred n j) + +private lemma jetDot_smooth (a b : Fin 5) : + ContDiff ℝ ∞ (fun j : GeometricJet => j.2 a ⬝ᵥ j.2 b) := by + unfold dotProduct + apply ContDiff.sum + intro k _ + exact ((contDiff_apply ℝ ℝ k).comp (jetSlot_smooth a)).mul + ((contDiff_apply ℝ ℝ k).comp (jetSlot_smooth b)) + +lemma jetTangentGram_smooth : ContDiff ℝ ∞ jetTangentGram := by + exact ((jetDot_smooth 0 0).mul + (jetDot_smooth 1 1)).sub + ((jetDot_smooth 0 1).pow 2) + +lemma jetAccelerationCoefficients_smoothAt {j : GeometricJet} + (hj : jetTangentGram j ≠ 0) : ContDiffAt ℝ ∞ jetAccelerationCoefficients j := by + have hd (a b : Fin 5) : ContDiffAt ℝ ∞ (fun z : GeometricJet => z.2 a ⬝ᵥ z.2 b) j := + (jetDot_smooth a b).contDiffAt + exact (((hd 1 1).mul (hd 0 4)).sub ((hd 0 1).mul (hd 1 4))).div + jetTangentGram_smooth.contDiffAt hj |>.prodMk + ((((hd 0 0).mul (hd 1 4)).sub ((hd 0 1).mul (hd 0 4))).div + jetTangentGram_smooth.contDiffAt hj) + +lemma jetSecondNormal_smoothAt {j : GeometricJet} (hj : jetTangentGram j ≠ 0) : + ContDiffAt ℝ ∞ jetSecondNormal j := + contDiffAt_realNormalPart (jetSlot_smooth 0).contDiffAt (jetSlot_smooth 1).contDiffAt + (jetSlot_smooth 4).contDiffAt hj + +lemma jetProjectedPreferred_smoothAt {n : Base → Vec} {j : GeometricJet} + (hn : ContDiffAt ℝ ∞ n j.1) (hj : jetTangentGram j ≠ 0) : + ContDiffAt ℝ ∞ (jetProjectedPreferred n) j := + contDiffAt_realNormalPart (jetSlot_smooth 0).contDiffAt (jetSlot_smooth 1).contDiffAt + (hn.comp j contDiffAt_fst) hj + +lemma jetPreferred_smoothAt {n : Base → Vec} {j : GeometricJet} + (hn : ContDiffAt ℝ ∞ n j.1) (hj : jetTangentGram j ≠ 0) + (hproj : jetProjectedPreferred n j ≠ 0) : + ContDiffAt ℝ ∞ (jetPreferred n) j := + normalize_smoothAt (jetProjectedPreferred_smoothAt hn hj) hproj + +lemma jetAcceleration_decomposition (j : GeometricJet) : + j.2 4 = (jetAccelerationCoefficients j).1 • j.2 0 + + (jetAccelerationCoefficients j).2 • j.2 1 + jetSecondNormal j := by + unfold jetAccelerationCoefficients jetSecondNormal realNormalPart jetTangentGram + abel + +lemma realNormalPart_eq_self {X Y n : Vec} (hX : X ⬝ᵥ n = 0) (hY : Y ⬝ᵥ n = 0) : + realNormalPart X Y n = n := by + simp [realNormalPart,hX,hY] + +lemma jetPreferred_on_section {F n : Base → Vec} {p : Base} + (hX : coordDeriv dx F p ⬝ᵥ n p = 0) (hY : coordDeriv dy F p ⬝ᵥ n p = 0) + (hn : n p ⬝ᵥ n p = 1) : jetPreferred n (CollarVelocity.jetSection F p) = n p := by + change normalize (realNormalPart (coordDeriv dx F p) (coordDeriv dy F p) (n p)) = n p + rw [realNormalPart_eq_self hX hY,normalize_of_unit hn] + +lemma jetAccelerationCoefficients_on_section {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : Base) : jetAccelerationCoefficients (CollarVelocity.jetSection F p) = + metricConnectionAt (inducedCoordinateMetric F p,fderiv ℝ (inducedCoordinateMetric F) p) 2 := by + rw [induced_connection_yy hF p] + rfl + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bf51da837ada95cf72b1aa69fdbc7f0a3b19ad0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormal.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricModel + +namespace OAI + +/-! The global object carried by the primitive induction is a smooth unit +section of the normal bundle. A spherical starting immersion supplies one. -/ +noncomputable section +open Manifold Filter +open scoped Topology +open scoped ContDiff +namespace ClosedSurfaceR4 +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +structure PreferredNormal (F : M → Space) where + vector : M → Space + smooth : ContMDiff planeModel spaceModel ∞ vector + unit : ∀ p, ‖vector p‖ = 1 + normal : ∀ p (v : TangentSpace planeModel p), + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (vector p) = 0 + +lemma spherical_inward_normal {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) + (p : M) (v : TangentSpace planeModel p) : + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (-F p) = 0 := by + let q : Space → ℝ := fun y => inner ℝ y y + have hq : ContDiff ℝ ∞ q := contDiff_id.inner ℝ contDiff_id + have he : q ∘ F = fun _ => (1 : ℝ) := by + funext x + change inner ℝ (F x) (F x) = 1 + rw [real_inner_self_eq_norm_sq,hunit] + norm_num + have heq : q ∘ F =ᶠ[𝓝 p] (fun _ => (1 : ℝ)) := Filter.Eventually.of_forall (congrFun he) + have hd := heq.mfderiv_eq (I := planeModel) (I' := 𝓘(ℝ)) + rw [mfderiv_comp p (hq.contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hF.mdifferentiable (by simp)).mdifferentiableAt,mfderiv_eq_fderiv] at hd + have hv := congrArg (fun L : TangentSpace planeModel p →L[ℝ] ℝ => L v) hd + let w : Space := mfderiv planeModel spaceModel F p v + simp only [mfderiv_const] at hv + change fderiv ℝ q (F p) w = 0 at hv + have hderiv : fderiv ℝ q (F p) w = 2 * inner ℝ w (F p) := by + change fderiv ℝ (fun y : Space => inner ℝ y y) (F p) w = _ + rw [fderiv_inner_apply ℝ (f := fun y : Space => y) (g := fun y : Space => y) + differentiableAt_id differentiableAt_id] + simp only [fderiv_fun_id,ContinuousLinearMap.id_apply] + change inner ℝ (F p) w + inner ℝ w (F p) = _ + rw [real_inner_comm (F p) w] + ring + change inner ℝ w (-F p) = 0 + rw [inner_neg_right] + linarith + +/-- The inward radial section is a global preferred normal, without an +orientation or a global choice of a second normal vector. -/ +def sphericalPreferredNormal {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) : + PreferredNormal F where + vector p := -F p + smooth := hF.neg + unit p := by simpa only [norm_neg] using hunit p + normal := spherical_inward_normal hF hunit + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalAvoidanceGlue.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalAvoidanceGlue.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5be8a47bcb2bf970906d5f3ae07c048bbc0edef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalAvoidanceGlue.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalGluing +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingNormalPath + +namespace OAI + +/-! Collar gluing retains full-curve antipode avoidance. Only the transition +region requires positive pairings; the exact endpoint fields cover the rest. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4 +open VelocityFrame NormalFrame +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma ne_neg_normalize_of_pairing_pos {w n : Vec} (hp : 0 < w ⬝ᵥ n) : + n ≠ -normalize w := by + have hw : w ≠ 0 := nonzero_of_dot_pos hp + have hs : 0 < normalize w ⬝ᵥ w := normalize_dot_pos (dot_self_pos hw) + intro he + rw [he,dotProduct_neg,dotProduct_comm w (normalize w)] at hp + linarith + +theorem preferredNormal_collar_avoidance {F a b : M → Space} {U V : Set M} + (hU : IsOpen U) (hV : IsOpen V) + (ha : ContMDiffOn planeModel spaceModel ∞ a U) + (hb : ContMDiffOn planeModel spaceModel ∞ b V) + (ha1 : ∀ p ∈ U, ‖a p‖ = 1) (hb1 : ∀ p ∈ V, ‖b p‖ = 1) + (haN : ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (a p) = 0) + (hbN : ∀ p ∈ V, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (b p) = 0) + (hne : ∀ p ∈ U ∩ V, b p ≠ -a p) + {χ : M → ℝ} (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + (hχU : tsupport χ ⊆ U) (hχV : tsupport (fun p => 1-χ p) ⊆ V) + (hχ01 : ∀ p, χ p ∈ Icc (0 : ℝ) 1) + (C : κ → Set M) (B : κ → M → Vec) + (haAvoid : ∀ k p, p ∈ C k → p ∈ U → spaceCoordinates (a p) ≠ -normalize (B k p)) + (hbAvoid : ∀ k p, p ∈ C k → p ∈ V → spaceCoordinates (b p) ≠ -normalize (B k p)) + (hpositive : ∀ k p, p ∈ C k → 0 < χ p → χ p < 1 → + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (a p) ∧ + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (b p)) : + ∃ N : PreferredNormal F, + (∀ p, χ p = 1 → N.vector p = a p) ∧ + (∀ p, χ p = 0 → N.vector p = b p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨N,hNa,hNb,hNp⟩ := preferredNormal_collar hU hV ha hb ha1 hb1 haN hbN hne + hχ hχU hχV hχ01 + refine ⟨N,hNa,hNb,?_⟩ + intro k p hp + by_cases h0 : χ p = 0 + · rw [hNb p h0] + apply hbAvoid k p hp + apply hχV + apply subset_tsupport + change 1-χ p ≠ 0 + simp only [h0,sub_zero,ne_eq,one_ne_zero,not_false_eq_true] + by_cases h1 : χ p = 1 + · rw [hNa p h1] + exact haAvoid k p hp (hχU (subset_tsupport χ (by change χ p ≠ 0; rw [h1]; exact one_ne_zero))) + have hpos := hpositive k p hp (lt_of_le_of_ne (hχ01 p).1 (Ne.symm h0)) + (lt_of_le_of_ne (hχ01 p).2 h1) + have hglobal := hNp p (spaceCoordinates.symm (B k p)) (fun _ => hpos.1) (fun _ => hpos.2) + apply ne_neg_normalize_of_pairing_pos + simpa only [← spaceCoordinates_dot,spaceCoordinates.apply_symm_apply] using hglobal + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalDiskGluing.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalDiskGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..48d595b440bcdacaaddd5f387de3c47d64b71e26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalDiskGluing.lean @@ -0,0 +1,151 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.NormalBoundaryCollar + +namespace OAI + +/-! Construct the global normal from interior/exterior fields and strict +conditions on the disk boundary. The transition collar is derived. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4 +open VelocityFrame NormalFrame +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype κ] + +theorem preferredNormal_disk_gluing_within {F a b : M → Space} {D U V : Set M} + (O : Set M) (hO : IsOpen O) (hfO : frontier D ⊆ O) + (hD : IsOpen D) (hU : IsOpen U) (hV : IsOpen V) + (hDU : closure D ⊆ U) (hDV : Dᶜ ⊆ V) + (ha : ContMDiffOn planeModel spaceModel ∞ a U) + (hb : ContMDiffOn planeModel spaceModel ∞ b V) + (ha1 : ∀ p ∈ U, ‖a p‖ = 1) (hb1 : ∀ p ∈ V, ‖b p‖ = 1) + (haN : ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (a p) = 0) + (hbN : ∀ p ∈ V, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (b p) = 0) + (hne : ∀ p ∈ frontier D, b p ≠ -a p) + (C : κ → Set M) (hC : ∀ k, IsClosed (C k)) (B : κ → M → Vec) + (hB : ∀ k, ContinuousOn (B k) (U ∩ V)) + (haAvoid : ∀ k p, p ∈ C k → p ∈ D → spaceCoordinates (a p) ≠ -normalize (B k p)) + (hbAvoid : ∀ k p, p ∈ C k → p ∉ closure D → spaceCoordinates (b p) ≠ -normalize (B k p)) + (hpositive : ∀ k p, p ∈ C k → p ∈ frontier D → + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (a p) ∧ + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (b p)) : + ∃ W : Set M, IsOpen W ∧ frontier D ⊆ W ∧ W ⊆ O ∧ ∃ N : PreferredNormal F, + (∀ p ∈ D \ W, N.vector p = a p) ∧ + (∀ p ∈ (closure D)ᶜ \ W, N.vector p = b p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨W₀,hW₀,hfW₀,hW₀UV,hneW₀,hposW₀⟩ := normal_boundary_collar hD hU hV hDU hDV + ha.continuousOn hb.continuousOn hne C hC (fun k p => spaceCoordinates.symm (B k p)) + (fun k => spaceCoordinates.symm.continuous.comp_continuousOn (hB k)) hpositive + let W := W₀ ∩ O + have hW : IsOpen W := hW₀.inter hO + have hfW : frontier D ⊆ W := fun _ hp => ⟨hfW₀ hp,hfO hp⟩ + have hWUV : W ⊆ U ∩ V := fun _ hp => hW₀UV hp.1 + have hneW : ∀ p ∈ W, b p ≠ -a p := fun p hp => hneW₀ p hp.1 + have hposW : ∀ k p, p ∈ C k → p ∈ W → + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (a p) ∧ + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (b p) := + fun k p hpC hpW => hposW₀ k p hpC hpW.1 + let U' := D ∪ W + let V' := (closure D)ᶜ ∪ W + have hU' : IsOpen U' := hD.union hW + have hV' : IsOpen V' := isClosed_closure.isOpen_compl.union hW + have hUU : U' ⊆ U := by + intro p hp + rcases hp with hp | hp + · exact hDU (subset_closure hp) + · exact (hWUV hp).1 + have hVV : V' ⊆ V := by + intro p hp + rcases hp with hp | hp + · exact hDV (fun h => hp (subset_closure h)) + · exact (hWUV hp).2 + have hcover : U' ∪ V' = univ := by + apply eq_univ_of_forall + intro p + by_cases hp : p ∈ D + · exact Or.inl (Or.inl hp) + by_cases hpc : p ∈ closure D + · have hf : p ∈ frontier D := by + rw [hD.frontier_eq] + exact ⟨hpc,hp⟩ + exact Or.inl (Or.inr (hfW hf)) + · exact Or.inr (Or.inl hpc) + have hUV' : U' ∩ V' ⊆ W := by + intro p hp + rcases hp.1 with hpD | hpW + · rcases hp.2 with hpcl | hpW + · exact False.elim (hpcl (subset_closure hpD)) + · exact hpW + · exact hpW + have havoidW (k : κ) (p : M) (hpC : p ∈ C k) (hpW : p ∈ W) : + spaceCoordinates (a p) ≠ -normalize (B k p) ∧ + spaceCoordinates (b p) ≠ -normalize (B k p) := by + have hh := hposW k p hpC hpW + have hid (t : Space) : B k p ⬝ᵥ spaceCoordinates t = inner ℝ (spaceCoordinates.symm (B k p)) t := by + rw [← spaceCoordinates_dot,ContinuousLinearEquiv.apply_symm_apply] + exact ⟨ne_neg_normalize_of_pairing_pos (by rw [hid]; exact hh.1), + ne_neg_normalize_of_pairing_pos (by rw [hid]; exact hh.2)⟩ + obtain ⟨N,hNa,hNb,havoid⟩ := preferredNormal_from_cover hU' hV' (ha.mono hUU) (hb.mono hVV) + (fun p hp => ha1 p (hUU hp)) (fun p hp => hb1 p (hVV hp)) + (fun p hp => haN p (hUU hp)) (fun p hp => hbN p (hVV hp)) + (fun p hp => hneW p (hUV' hp)) hcover C B + (by + intro k p hpC hpU + rcases hpU with hpD | hpW + · exact haAvoid k p hpC hpD + · exact (havoidW k p hpC hpW).1) + (by + intro k p hpC hpV + rcases hpV with hpcl | hpW + · exact hbAvoid k p hpC hpcl + · exact (havoidW k p hpC hpW).2) + (fun k p hpC hpUV => hposW k p hpC (hUV' hpUV)) + refine ⟨W,hW,hfW,inter_subset_right,N,?_,?_,havoid⟩ + · intro p hp + exact hNa p ⟨Or.inl hp.1,by + intro h + rcases h with hcl | hW + · exact hcl (subset_closure hp.1) + · exact hp.2 hW⟩ + · intro p hp + exact hNb p ⟨Or.inl hp.1,by + intro h + rcases h with hD | hW + · exact hp.1 (subset_closure hD) + · exact hp.2 hW⟩ + + +theorem preferredNormal_disk_gluing {F a b : M → Space} {D U V : Set M} + (hD : IsOpen D) (hU : IsOpen U) (hV : IsOpen V) + (hDU : closure D ⊆ U) (hDV : Dᶜ ⊆ V) + (ha : ContMDiffOn planeModel spaceModel ∞ a U) + (hb : ContMDiffOn planeModel spaceModel ∞ b V) + (ha1 : ∀ p ∈ U, ‖a p‖ = 1) (hb1 : ∀ p ∈ V, ‖b p‖ = 1) + (haN : ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (a p) = 0) + (hbN : ∀ p ∈ V, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (b p) = 0) + (hne : ∀ p ∈ frontier D, b p ≠ -a p) + (C : κ → Set M) (hC : ∀ k, IsClosed (C k)) (B : κ → M → Vec) + (hB : ∀ k, ContinuousOn (B k) (U ∩ V)) + (haAvoid : ∀ k p, p ∈ C k → p ∈ D → spaceCoordinates (a p) ≠ -normalize (B k p)) + (hbAvoid : ∀ k p, p ∈ C k → p ∉ closure D → spaceCoordinates (b p) ≠ -normalize (B k p)) + (hpositive : ∀ k p, p ∈ C k → p ∈ frontier D → + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (a p) ∧ + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (b p)) : + ∃ W : Set M, IsOpen W ∧ frontier D ⊆ W ∧ ∃ N : PreferredNormal F, + (∀ p ∈ D \ W, N.vector p = a p) ∧ + (∀ p ∈ (closure D)ᶜ \ W, N.vector p = b p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨W,hW,hfW,_,N,hNa,hNb,havoid⟩ := preferredNormal_disk_gluing_within + univ isOpen_univ (subset_univ _) hD hU hV hDU hDV ha hb ha1 hb1 haN hbN hne + C hC B hB haAvoid hbAvoid hpositive + exact ⟨W,hW,hfW,N,hNa,hNb,havoid⟩ + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalFromCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalFromCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..465bb2bb820b5c50b620432d2c2668470b88a77d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalFromCover.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalAvoidanceGlue +import OAI.Geometry.SurfaceImmersion.Correction.SmoothCoverCutoff + +namespace OAI + +/-! The global preferred normal is constructed from the two local fields; +its smooth cutoff is obtained from the open cover, not assumed. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4 +open VelocityFrame NormalFrame +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem preferredNormal_from_cover {F a b : M → Space} {U V : Set M} + (hU : IsOpen U) (hV : IsOpen V) + (ha : ContMDiffOn planeModel spaceModel ∞ a U) + (hb : ContMDiffOn planeModel spaceModel ∞ b V) + (ha1 : ∀ p ∈ U, ‖a p‖ = 1) (hb1 : ∀ p ∈ V, ‖b p‖ = 1) + (haN : ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (a p) = 0) + (hbN : ∀ p ∈ V, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (b p) = 0) + (hne : ∀ p ∈ U ∩ V, b p ≠ -a p) + (hcover : U ∪ V = univ) + (C : κ → Set M) (B : κ → M → Vec) + (haAvoid : ∀ k p, p ∈ C k → p ∈ U → spaceCoordinates (a p) ≠ -normalize (B k p)) + (hbAvoid : ∀ k p, p ∈ C k → p ∈ V → spaceCoordinates (b p) ≠ -normalize (B k p)) + (hpositive : ∀ k p, p ∈ C k → p ∈ U ∩ V → + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (a p) ∧ + 0 < inner ℝ (spaceCoordinates.symm (B k p)) (b p)) : + ∃ N : PreferredNormal F, + (∀ p ∈ U \ V, N.vector p = a p) ∧ + (∀ p ∈ V \ U, N.vector p = b p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨χ,hχ,hχU,hχV,hχ01⟩ := smooth_cover_cutoff hU hV hcover + obtain ⟨N,hNa,hNb,havoid⟩ := preferredNormal_collar_avoidance hU hV ha hb ha1 hb1 haN hbN hne + hχ hχU hχV hχ01 C B haAvoid hbAvoid (by + intro k p hp h0 h1 + apply hpositive k p hp + constructor + · exact hχU (subset_tsupport χ (by change χ p ≠ 0; exact h0.ne')) + · apply hχV + apply subset_tsupport + change 1-χ p ≠ 0 + linarith) + refine ⟨N,?_,?_,havoid⟩ + · intro p hp + apply hNa + have hz : 1-χ p = 0 := image_eq_zero_of_notMem_tsupport (f := fun q : M => (1:ℝ)-χ q) (fun h => hp.2 (hχV h)) + linarith + · intro p hp + exact hNb p (image_eq_zero_of_notMem_tsupport (fun h => hp.2 (hχU h))) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalGluing.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5680294d1d15f6cf9ddc1dce1dbcebb60b45c13a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreferredNormalGluing.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormal +import OAI.Geometry.Immersion.ClosedSurface.ChartModel +import OAI.Geometry.SurfaceImmersion.Whitney.NormalCollarGluing +import OAI.Geometry.SurfaceImmersion.Geometry.ManifoldMetricCalculus + +namespace OAI + +/-! The collar construction produces the actual global preferred normal +carried by the finite primitive induction. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma coordinate_dot_self_of_unit {v : Space} (hv : ‖v‖ = 1) : + spaceCoordinates v ⬝ᵥ spaceCoordinates v = 1 := by + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,hv] + norm_num + +lemma norm_coordinate_inverse_of_dot_self {v : NormalFrame.Vec} (hv : v ⬝ᵥ v = 1) : + ‖spaceCoordinates.symm v‖ = 1 := by + have he : ‖spaceCoordinates.symm v‖^2 = (1 : ℝ)^2 := by + rw [← real_inner_self_eq_norm_sq,← spaceCoordinates_dot, + ContinuousLinearEquiv.apply_symm_apply,hv,one_pow] + exact (sq_eq_sq₀ (norm_nonneg _) zero_le_one).mp he + +/-- Glue an interior normal to an exterior normal, retaining all positive +pairings needed on the later primitive boundaries. -/ +theorem preferredNormal_collar {F a b : M → Space} {U V : Set M} + (hU : IsOpen U) (hV : IsOpen V) + (ha : ContMDiffOn planeModel spaceModel ∞ a U) + (hb : ContMDiffOn planeModel spaceModel ∞ b V) + (ha1 : ∀ p ∈ U, ‖a p‖ = 1) (hb1 : ∀ p ∈ V, ‖b p‖ = 1) + (haN : ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (a p) = 0) + (hbN : ∀ p ∈ V, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (b p) = 0) + (hne : ∀ p ∈ U ∩ V, b p ≠ -a p) + {chi : M → ℝ} (hchi : ContMDiff planeModel 𝓘(ℝ) ∞ chi) + (hchiu : tsupport chi ⊆ U) (hchiv : tsupport (fun p => 1-chi p) ⊆ V) + (hchi01 : ∀ p, chi p ∈ Icc (0 : ℝ) 1) : + ∃ N : PreferredNormal F, + (∀ p, chi p = 1 → N.vector p = a p) ∧ + (∀ p, chi p = 0 → N.vector p = b p) ∧ + (∀ p (w : Space), (p ∈ U → 0 < inner ℝ w (a p)) → + (p ∈ V → 0 < inner ℝ w (b p)) → 0 < inner ℝ w (N.vector p)) := by + let ac := spaceCoordinates ∘ a + let bc := spaceCoordinates ∘ b + have hac : ContMDiffOn planeModel 𝓘(ℝ,NormalFrame.Vec) ∞ ac U := + spaceCoordinates.contDiff.contMDiff.comp_contMDiffOn ha + have hbc : ContMDiffOn planeModel 𝓘(ℝ,NormalFrame.Vec) ∞ bc V := + spaceCoordinates.contDiff.contMDiff.comp_contMDiffOn hb + have hne' : ∀ p ∈ U ∩ V, bc p ≠ -ac p := by + intro p hp hh + apply hne p hp + apply spaceCoordinates.injective + simpa only [ac,bc,Function.comp_apply,map_neg] using hh + obtain ⟨hsmooth,hunit,h1,h0,hperp,hpos⟩ := normal_collar_gluing hU hV hac hbc hchi hchiu hchiv + hchi01 (fun p hp => coordinate_dot_self_of_unit (ha1 p hp)) + (fun p hp => coordinate_dot_self_of_unit (hb1 p hp)) hne' + let n : M → Space := fun p => spaceCoordinates.symm (first (bc p) (ac p) (chi p)) + let hn : PreferredNormal F := { + vector := n + smooth := spaceCoordinates.symm.contDiff.contMDiff.comp hsmooth + unit := fun p => norm_coordinate_inverse_of_dot_self (hunit p) + normal := by + intro p v + change inner ℝ (surfaceDifferential F p v) (n p) = 0 + rw [← spaceCoordinates_dot] + change spaceCoordinates (surfaceDifferential F p v) ⬝ᵥ first (bc p) (ac p) (chi p) = 0 + apply hperp + · intro hp + exact (spaceCoordinates_dot _ _).trans (haN p hp v) + · intro hp + exact (spaceCoordinates_dot _ _).trans (hbN p hp v) + } + refine ⟨hn,?_,?_,?_⟩ + · intro p hp + change spaceCoordinates.symm (first (bc p) (ac p) (chi p)) = a p + exact (congrArg spaceCoordinates.symm (h1 p hp)).trans + (spaceCoordinates.symm_apply_apply (a p)) + · intro p hp + change spaceCoordinates.symm (first (bc p) (ac p) (chi p)) = b p + exact (congrArg spaceCoordinates.symm (h0 p hp)).trans + (spaceCoordinates.symm_apply_apply (b p)) + · intro p w hwa hwb + change inner ℝ w (n p) > 0 + rw [← spaceCoordinates_dot] + change 0 < spaceCoordinates w ⬝ᵥ first (bc p) (ac p) (chi p) + apply hpos + · intro hp + simpa only [ac,Function.comp_apply,spaceCoordinates_dot] using hwa hp + · intro hp + simpa only [bc,Function.comp_apply,spaceCoordinates_dot] using hwb hp + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedBoundaryStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedBoundaryStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ab82e6dfead99d6f8920e1c322631aa0595cdbd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedBoundaryStartingFamily.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedPointCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalInitialBoundary + +namespace OAI + +/-! The uniform initial family with the actual crossing geometry needed by +the finite primitive induction. Its constants precede the finite crossing set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes SphericalJets VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem small_metric_boundary_family (g : SmoothMetric M) {I : M → Space} + (hI : ContMDiff planeModel spaceModel ∞ I) (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) + {η : ℝ} (hη : 0 < η) : + ∃ r D c : ℝ, 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (G : M → Space) (n : PreferredNormal (r • G)), + ContMDiff planeModel spaceModel ∞ G ∧ (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) ∧ + n.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • G)) ∧ + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + (∀ p (v : Base), v ≠ 0 → + 0 < realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p) ⬝ᵥ + spaceCoordinates (n.vector p) ∧ + realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p) ≠ 0 ∧ + normalize (realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p)) ≠ + -spaceCoordinates (n.vector p)) ∧ + ∀ p : P, G p = I p ∧ ∀ q : M, (p : M) ∈ (coordinateChart q).source → + coordinateGaussianCurvature (realMetric (coordinateMap (r • G) q) dx dx) + (realMetric (coordinateMap (r • G) q) dx dy) + (realMetric (coordinateMap (r • G) q) dy dy) (coordinateChart q p) = (r⁻¹)^2 ∧ + ∀ v w : Base, v ≠ 0 → w ≠ 0 → + 0 < orderedCrossing (coordinateMap (r • G) q) v w (coordinateChart q p) + (coordinateGaussianCurvature (realMetric (coordinateMap (r • G) q) dx dx) + (realMetric (coordinateMap (r • G) q) dx dy) + (realMetric (coordinateMap (r • G) q) dy dy) (coordinateChart q p)) := by + obtain ⟨r,D,c,hr,hr1,hD,hc,hprep⟩ := A.small_metric_prepared_family g hI hunit hImm hη + refine ⟨r,D,c,hr,hr1,hD,hc,?_⟩ + intro P ε hε + obtain ⟨a,G,n,ha,hG,hu,hGI,hn,hclose,hbound,hlower,hmetric,hshort,hflat⟩ := hprep P ε hε + refine ⟨G,n,hG,hu,hGI,hn,hclose,hbound,hlower,hmetric,hshort,?_,?_⟩ + · intro p v hv + rw [hn] + exact spherical_initial_boundary_geometry hG hu hr hGI p hv + · intro p + refine ⟨(hflat p).1,?_⟩ + intro q hq + exact (A.prepared_point_crossings hG hu hr hGI (a p) (ha p) (hflat p).2.2 q hq).2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedRadialSecondForm.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedRadialSecondForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb8f06be0ba13aae21bde55f08c78554aa25544b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedRadialSecondForm.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SphericalCoordinateSecondForm +import OAI.Geometry.SurfaceImmersion.Primitive.PureRadialCrossing +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets + +namespace OAI + +/-! The exact pure-radial second form at a prepared spherical point, in +the same coordinates used by the ordered boundary invariant. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4 +open RealModes SmallModes SphericalJets + +def scaledSphereCoordinates (F : Plane → Space) (r : ℝ) : RField 4 := + spaceCoordinates ∘ (fun y => r • F y) ∘ planeCoordinates.symm + +lemma sphereCoordinates_firstDerivative {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) (x v : SmallModes.Base) : + coordDeriv v (spaceCoordinates ∘ F ∘ planeCoordinates.symm) x = + spaceCoordinates (fderiv ℝ F (planeCoordinates.symm x) (planeCoordinates.symm v)) := by + simp only [coordDeriv,fderiv_comp x spaceCoordinates.differentiableAt + ((hF.differentiable (by simp) _).comp _ planeCoordinates.symm.differentiableAt), + spaceCoordinates.fderiv,fderiv_comp x (hF.differentiable (by simp) _) + planeCoordinates.symm.differentiableAt,planeCoordinates.symm.fderiv, + ContinuousLinearMap.comp_apply] + rfl + +lemma scaled_flat_spherical_secondForm {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) {r : ℝ} (hr : r ≠ 0) (x : SmallModes.Base) + (hflat : ∀ v w, sphericalSecondForm F (planeCoordinates.symm x) v w = 0) + (hD : NormalFrame.gramDet (coordDeriv dx (scaledSphereCoordinates F r) x) + (coordDeriv dy (scaledSphereCoordinates F r) x) ≠ 0) (v w : SmallModes.Base) : + realSecondForm (scaledSphereCoordinates F r) v w x = + (r⁻¹*(coordDeriv v (scaledSphereCoordinates F r) x ⬝ᵥ + coordDeriv w (scaledSphereCoordinates F r) x)) • + spaceCoordinates (-F (planeCoordinates.symm x)) := by + have hs : ContDiff ℝ ∞ (fun y => r • F y) := hF.const_smul r + have hd : ∀ u, coordDeriv u (scaledSphereCoordinates F r) x = + spaceCoordinates (fderiv ℝ (fun y => r • F y) (planeCoordinates.symm x) (planeCoordinates.symm u)) := + fun u => sphereCoordinates_firstDerivative hs x u + have hD' := hD + rw [hd dx,hd dy] at hD' + change realSecondForm (spaceCoordinates ∘ (fun y => r • F y) ∘ planeCoordinates.symm) v w x = _ + rw [spherical_secondForm_coordinates hs x v w hD',scaled_spherical_radial_form hF hr, + hflat,smul_zero,zero_add,map_smul,hd v,hd w,spaceCoordinates_dot] + +lemma scaled_flat_spherical_crossing {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) {r : ℝ} (hr : 0 < r) (x : SmallModes.Base) + (hunit : ‖F (planeCoordinates.symm x)‖ = 1) + (hflat : ∀ v w, sphericalSecondForm F (planeCoordinates.symm x) v w = 0) + (hI : Function.Injective (fderiv ℝ (scaledSphereCoordinates F r) x)) + {v w : SmallModes.Base} (hv : v ≠ 0) (hw : w ≠ 0) : + 0 < VelocityFrame.orderedCrossing (scaledSphereCoordinates F r) v w x ((r⁻¹)^2) := by + have hn : spaceCoordinates (-F (planeCoordinates.symm x)) ⬝ᵥ + spaceCoordinates (-F (planeCoordinates.symm x)) = 1 := by + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,norm_neg,hunit] + norm_num + have hD := gramDet_ne_zero_of_injective _ hI + have hnv : coordDeriv v (scaledSphereCoordinates F r) x ≠ 0 := by + intro hz + exact hv (hI (by simpa only [coordDeriv,map_zero] using hz)) + have hnw : coordDeriv w (scaledSphereCoordinates F r) x ≠ 0 := by + intro hz + exact hw (hI (by simpa only [coordDeriv,map_zero] using hz)) + exact (VelocityFrame.orderedCrossing_pure_radial x v w _ hr hn hnv hnw + (scaled_flat_spherical_secondForm hF hr.ne' x hflat hD v v) + (scaled_flat_spherical_secondForm hF hr.ne' x hflat hD v w)).2 + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSphericalImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSphericalImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..8476e6eeccd09de3c476fed306fcab4967f008a6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSphericalImmersion.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSurfacePreparation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalizationStability + +namespace OAI + +/-! The finite-point preparation on a closed surface: a spherical immersion +can be flattened at any finite set, with fixed C2 bounds and arbitrary C1 accuracy. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem prepared_spherical_immersion {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (c : P → A.centers) (G : M → Space), + (∀ p, A.weight (c p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel G p)) ∧ + A.WeightedBound 1 1 ε (G-F) ∧ A.WeightedBound 1 2 D G ∧ + ∀ p : P, G p = F p ∧ + fderiv ℝ (G ∘ (chartAt Plane (c p : M)).symm) (chartAt Plane (c p : M) p) = + fderiv ℝ (F ∘ (chartAt Plane (c p : M)).symm) (chartAt Plane (c p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (c p : M)).symm) + (chartAt Plane (c p : M) p) v w = 0 := by + obtain ⟨Dq,hDq,hprep⟩ := A.finite_spherical_preparation_correction hF hunit + obtain ⟨Cf,hCf,hFb⟩ := A.exists_weighted_bound 2 hF + let C := max 1 (Cf+Dq) + have hC : 1 ≤ C := le_max_left _ _ + obtain ⟨D,hD,hDb⟩ := A.radial_normalization_C2_budget C hC + obtain ⟨εi,hεi,hIi⟩ := A.weighted_immersion_tolerance hF hImm + refine ⟨D,hD,?_⟩ + intro P ε hε + obtain ⟨δ,hδ,hstable⟩ := A.radial_normalization_C1_stability hF hunit (lt_min hε hεi) + obtain ⟨c,Q,hc,hQ,hQ1,hQ2,hjets⟩ := hprep P δ hδ + obtain ⟨hnorm,hclose⟩ := hstable Q hQ hQ1 + let G := radialNormalize ∘ (F+Q) + have hG : ContMDiff planeModel spaceModel ∞ G := radial_normalization_smooth (hF.add hQ) hnorm + have hunitG (p : M) : ‖G p‖ = 1 := by + have hn : F p+Q p ≠ 0 := by + intro hz + have := hnorm p + norm_num [hz] at this + change ‖‖F p+Q p‖⁻¹ • (F p+Q p)‖ = 1 + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_norm,inv_mul_cancel₀ (norm_ne_zero_iff.mpr hn)] + have hHbound : A.WeightedBound 1 2 C (F+Q) := by + intro i + have hb := (hFb i).add uniqueDiffOn_univ zero_le_one + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).contDiffOn + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hQ).contDiffOn (hQ2 i) + have he : (fun x => localize (i : M) (A.weight i) F x+localize (i : M) (A.weight i) Q x) = + localize (i : M) (A.weight i) (F+Q) := (localize_add _ _ _ _).symm + rw [he] at hb + exact hb.mono_const (le_max_right _ _) + refine ⟨c,G,hc,hG,hunitG,?_,?_,hDb (F+Q) (hF.add hQ) hnorm hHbound,hjets⟩ + · exact hIi G hG (fun i => (hclose i).mono_const (min_le_right _ _)) + · exact fun i => (hclose i).mono_const (min_le_left _ _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSurfaceFiniteFibers.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSurfaceFiniteFibers.lean new file mode 100644 index 0000000000000000000000000000000000000000..f76fdb02c44a1401ef8d5adaf9c9736c9326945d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PreparedSurfaceFiniteFibers.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceImmersionLocalInjective +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapFiberIsolation + +namespace OAI + +/-! Every fiber of the actual prepared map is finite: regular points are +locally injective, and the prepared crosscaps are isolated in their fibers. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +theorem prepared_surface_finite_fiber {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) + (y : ProjectionTarget 3) : {p | f p = y}.Finite := by + classical + have hcompact : IsCompact {p | f p = y} := + (isClosed_eq hf.continuous continuous_const).isCompact + apply hcompact.finite + rw [isDiscrete_iff_forall_mem_exists_isOpen] + intro p hp + have hlocal : ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ ∀ x ∈ U, f x = f p → x = p := by + by_cases hreg : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) + · obtain ⟨U,hU,hpU,hinj⟩ := surface_immersion_locally_injective hf p hreg + exact ⟨U,hU,hpU,fun x hx h => hinj hx hpU h⟩ + · obtain ⟨q,φ,b,t,hpq,hφ,he,hz,hR⟩ := hrep p hreg + exact prepared_crosscap_isolated_fiber p q hpq hφ he b t hz hR + obtain ⟨U,hU,hpU,hiso⟩ := hlocal + refine ⟨U,hU,?_⟩ + ext x + constructor + · rintro ⟨hxU,hx⟩ + exact mem_singleton_iff.mpr (hiso x hxU (hx.trans hp.symm)) + · rintro rfl + exact ⟨hpU,hp⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PrescribedTransverseDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PrescribedTransverseDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e3350ef8f8f3ed509821f323aab34f39c6c900f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PrescribedTransverseDerivative.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseFinitePatching +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedScalarQuotient + +namespace OAI + +/-! Prescribe a transverse derivative using actual defining functions and smooth cutoffs. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.TransverseSmallFunction + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {ι : Type*} [Fintype ι] + +theorem exists_prescribed_transverse_derivative + {f χ : ι → E → ℝ} {T : E → ℝ} {K : Set E} (v : E) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) (hχ : ∀ i, ContDiff ℝ ∞ (χ i)) + (hχc : ∀ i, HasCompactSupport (χ i)) (hT : ContDiff ℝ ∞ T) + (hden : ∀ i x, x ∈ tsupport (χ i) → fderiv ℝ (f i) x v ≠ 0) + (hzero : ∀ i x, x ∈ K → x ∈ tsupport (χ i) → f i x = 0) + (hpartition : ∀ x ∈ K, T x ≠ 0 → (∑ i, χ i x) = 1) + {ε : ℝ} (hε : 0 < ε) : + ∃ H : E → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ + tsupport H ⊆ ⋃ i, tsupport (χ i) ∧ (∀ x, |H x| < ε) ∧ + ∀ x ∈ K, fderiv ℝ H x v = T x := by + let d : ι → E → ℝ := fun i x => fderiv ℝ (f i) x v + let g : ι → E → ℝ := fun i x => (χ i x * T x) / d i x + have hd (i : ι) : ContDiff ℝ ∞ (d i) := + ((hf i).fderiv_right (by simp)).clm_apply contDiff_const + have hsupp (i : ι) : tsupport (g i) ⊆ tsupport (χ i) := by + exact (supported_quotient_support (fun x => χ i x * T x) (d i)).trans + tsupport_mul_subset_left + have hg (i : ι) : ContDiff ℝ ∞ (g i) := by + apply supported_quotient_smooth ((hχ i).mul hT) (hd i) + intro x hx + exact hden i x (tsupport_mul_subset_left hx) + have hgc (i : ι) : HasCompactSupport (g i) := + supported_quotient_compact (hχc i |>.mul_right) + have hcoef (i : ι) (x : E) : g i x * d i x = χ i x * T x := by + exact supported_quotient_cancel (χ := fun y => χ i y * T y) (d := d i) + (fun y hy => hden i y (tsupport_mul_subset_left hy)) x + obtain ⟨H, hH, hHc, hHs, hHsmall, hHd⟩ := finite_small_correction hf hg hgc + (fun i x hx hs => hzero i x hx (hsupp i hs)) hε + refine ⟨H, hH, hHc, hHs.trans (iUnion_mono hsupp), hHsmall, ?_⟩ + intro x hx + rw [hHd x hx] + simp only [sum_apply, smul_apply, smul_eq_mul] + change (∑ i, g i x * d i x) = T x + simp_rw [hcoef] + rw [← Finset.sum_mul] + by_cases hTx : T x = 0 + · simp [hTx] + · rw [hpartition x hx hTx, one_mul] + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedFrameConstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedFrameConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..63f09224b22386eb492f51a021e262f9d1472a04 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedFrameConstruction.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProjectedVelocityFrame +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Construct the collar interpolation of the velocity frame from boundary +non-antipodality, with no interpolation function assumed. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ E] in +lemma nonopposite_region_open {Ω : Set E} (hΩ : IsOpen Ω) {B n : E → Vec} + (hB : ContDiffOn ℝ ∞ B Ω) (hn : ContDiffOn ℝ ∞ n Ω) : + IsOpen {x | x ∈ Ω ∧ B x ≠ 0 ∧ normalize (B x) ≠ -n x} := by + rw [isOpen_iff_mem_nhds] + intro x hx + have hb := hB.contDiffAt (hΩ.mem_nhds hx.1) + have hn' := hn.contDiffAt (hΩ.mem_nhds hx.1) + have hanti := ((normalize_smoothAt hb hx.2.1).continuousAt.ne_iff_eventually_ne + hn'.continuousAt.neg).mp hx.2.2 + filter_upwards [hΩ.mem_nhds hx.1, hb.continuousAt.eventually_ne hx.2.1, hanti] with y hy hb' ha' + exact ⟨hy, hb', ha'⟩ + +theorem exists_projected_collar_frame {K Ω : Set E} + (hK : IsCompact K) (hΩ : IsOpen Ω) (hKΩ : K ⊆ Ω) + {X Y C B n : E → Vec} {μ ν : E → ℝ} + (hX : ContDiffOn ℝ ∞ X Ω) (hY : ContDiffOn ℝ ∞ Y Ω) + (hC : ContDiffOn ℝ ∞ C Ω) (hB : ContDiffOn ℝ ∞ B Ω) + (hn : ContDiffOn ℝ ∞ n Ω) + (hgeom : ∀ x ∈ Ω, gramDet (X x) (Y x) ≠ 0 ∧ μ x < 0 ∧ + X x ⬝ᵥ B x = 0 ∧ Y x ⬝ᵥ B x = 0 ∧ + C x = μ x • X x + ν x • Y x + B x ∧ + X x ⬝ᵥ n x = 0 ∧ Y x ⬝ᵥ n x = 0 ∧ n x ⬝ᵥ n x = 1) + (hboundary : ∀ x ∈ K, B x ≠ 0 ∧ normalize (B x) ≠ -n x) : + ∃ W : Set E, IsOpen W ∧ K ⊆ W ∧ W ⊆ Ω ∧ + ∃ e₁ e₂ : E → Vec, ContDiffOn ℝ ∞ e₁ Ω ∧ ContDiffOn ℝ ∞ e₂ Ω ∧ + (∀ x ∈ Ω, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ + Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) ∧ + (∀ x ∈ W, e₁ x = normalize (RealModes.realNormalPart (Y x) (C x) (X x))) := by + let U : Set E := {x | x ∈ Ω ∧ B x ≠ 0 ∧ normalize (B x) ≠ -n x} + have hU : IsOpen U := nonopposite_region_open hΩ hB hn + have hKU : K ⊆ U := fun x hx => ⟨hKΩ hx, hboundary x hx⟩ + obtain ⟨W, hW, hKW, hWU, χ, ψ, hχ, _, _, _, hχr, _, _, hχs, hχone, _⟩ := + CollarVelocity.nested_compact_cutoffs hK hU hKU + let t : E → ℝ := fun x => 1 - χ x + have ht : ContDiff ℝ ∞ t := contDiff_const.sub hχ + have hDt (x : E) (hx : x ∈ Ω) : gramDet (Y x) (C x) ≠ 0 := by + obtain ⟨hd, hm, hxb, hyb, hc, _, _, _⟩ := hgeom x hx + exact (velocity_gram_pos hd hm.ne hxb hyb hc).ne' + have hblend (x : E) (hx : x ∈ Ω) : + blend (RealModes.realNormalPart (Y x) (C x) (X x)) + (RealModes.realNormalPart (Y x) (C x) (n x)) (t x) ≠ 0 := by + obtain ⟨hd, hm, hxb, hyb, hc, hxn, hyn, hn1⟩ := hgeom x hx + have htr : t x ∈ Icc (0 : ℝ) 1 := by + obtain ⟨hl, hu⟩ := hχr x + exact ⟨by dsimp [t]; linarith, by dsimp [t]; linarith⟩ + have htu : t x < 1 → x ∈ U := by + intro hlt + apply hχs + apply subset_tsupport χ + apply Function.mem_support.mpr + intro hz + dsimp [t] at hlt + linarith + exact projected_blend_nonzero hd hm hxb hyb hc hxn hyn hn1 htr + (fun h => (htu h).2.1) (fun h => (htu h).2.2) + obtain ⟨he₁, he₂⟩ := projected_frame_smoothOn hΩ hX hY hC hn ht.contDiffOn hDt hblend + refine ⟨W, hW, hKW, hWU.trans (fun _ hx => hx.1), + (fun x => projectedFirst (X x) (Y x) (C x) (n x) (t x)), + (fun x => projectedSecond (X x) (Y x) (C x) (n x) (t x)), + he₁, he₂, ?_, ?_⟩ + · exact fun x hx => projected_frame_orthonormal (hDt x hx) (hblend x hx) + · intro x hx + have ht0 : t x = 0 := by simp [t, hχone x hx] + simpa only [ht0] using projectedFirst_zero (X x) (Y x) (C x) (n x) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedNormalLocal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedNormalLocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf6a423e848ad3ed7ce803b4f89d098523b3fa7d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectedNormalLocal.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalProjectionBounds +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection + +namespace OAI + +/-! Quantitative normalization of the atlas projection on an exterior open set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4.SphericalJets + +lemma radialNormalize_unit {u : Space} (hu : u ≠ 0) : ‖radialNormalize u‖ = 1 := by + rw [radialNormalize,norm_smul,Real.norm_eq_abs,abs_inv,abs_norm, + inv_mul_cancel₀ (norm_ne_zero_iff.mpr hu)] + +lemma radialNormalize_sub_unit_bound {u v : Space} (hu : u ≠ 0) (hv : ‖v‖ = 1) : + ‖radialNormalize u-v‖ ≤ 2*‖u-v‖ := by + have hn : 0 < ‖u‖ := norm_pos_iff.mpr hu + have he : ‖radialNormalize u-u‖ = |1-‖u‖| := by + have he : ‖u‖⁻¹ • u-u = (‖u‖⁻¹-1) • u := by rw [sub_smul,one_smul] + rw [radialNormalize,he,norm_smul,Real.norm_eq_abs] + calc + |‖u‖⁻¹-1| *‖u‖ = |(‖u‖⁻¹-1)*‖u‖| := by rw [abs_mul,abs_of_nonneg hn.le] + _ = |1-‖u‖| := by congr 1; field_simp + have habs : |1-‖u‖| ≤ ‖u-v‖ := by + rw [abs_sub_comm,← hv] + exact abs_norm_sub_norm_le u v + calc + ‖radialNormalize u-v‖ ≤ ‖radialNormalize u-u‖+‖u-v‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ 2*‖u-v‖ := by rw [he]; linarith + +end ClosedSurfaceR4.SphericalJets +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def unitProjectedNormalField (F n : M → Space) : M → Space := + SphericalJets.radialNormalize ∘ A.projectedNormalField F n + +theorem unitProjectedNormalField_properties {F n : M → Space} {U : Set M} + (hF : ContMDiff planeModel spaceModel ∞ F) (hn : ContMDiff planeModel spaceModel ∞ n) + (hD : ∀ i x, x ∈ tsupport (A.planeWeight i) → + gramDet (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ≠ 0) + (hne : ∀ p ∈ U, A.projectedNormalField F n p ≠ 0) : + ContMDiffOn planeModel spaceModel ∞ (A.unitProjectedNormalField F n) U ∧ + (∀ p ∈ U, ‖A.unitProjectedNormalField F n p‖ = 1) ∧ + (∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (A.unitProjectedNormalField F n p) = 0) := by + have hP := A.projectedNormalField_smooth hF hn hD + refine ⟨?_,?_,?_⟩ + · intro p hp + exact ((SphericalJets.radialNormalize_smoothAt (hne p hp)).contMDiffAt.comp p (hP p)).contMDiffWithinAt + · intro p hp + exact SphericalJets.radialNormalize_unit (hne p hp) + · intro p hp v + change inner ℝ (surfaceDifferential F p v) + (‖A.projectedNormalField F n p‖⁻¹ • A.projectedNormalField F n p) = 0 + have hh := A.projectedNormalField_normal hF n hD p v + change inner ℝ (surfaceDifferential F p v) (A.projectedNormalField F n p) = 0 at hh + rw [real_inner_smul_right,hh,mul_zero] + +omit [CompactSpace M] in +theorem unitProjectedNormalField_sub_bound {F n : M → Space} {p : M} {δ : ℝ} + (hn : ‖n p‖ = 1) (hδ : δ < 1) + (hlocal : ∀ i : A.centers, A.weight i p ≠ 0 → + ‖A.chartProjectedNormal i F n p - n p‖ ≤ δ) : + A.projectedNormalField F n p ≠ 0 ∧ + ‖A.unitProjectedNormalField F n p-n p‖ ≤ 2*δ := by + have hb := A.projectedNormalField_sub_bound F n p hlocal + have hne := A.projectedNormalField_ne_zero F n p hn (hb.trans_lt hδ) + exact ⟨hne,(SphericalJets.radialNormalize_sub_unit_bound hne hn).trans + (mul_le_mul_of_nonneg_left hb (by norm_num))⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionDirections.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..962e80e69b7a4df780b8344777523564fabbe386 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionDirections.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! Two affine charts for the tangent directions of a surface, and the +kernel criterion for a linear projection along a graph direction. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def tangentRay (b : Bool) (t : ℝ) : Base := + if b then ![t,1] else ![1,t] + +lemma tangentRay_ne_zero (b : Bool) (t : ℝ) : tangentRay b t ≠ 0 := by + cases b <;> intro h + · have hh := congrFun h 0 + norm_num [tangentRay] at hh + · have hh := congrFun h 1 + norm_num [tangentRay] at hh + +lemma tangentRay_smooth (b : Bool) : ContDiff ℝ ∞ (tangentRay b) := by + cases b <;> apply contDiff_pi.mpr <;> intro i <;> fin_cases i <;> + first | exact contDiff_id | exact contDiff_const + +lemma exists_tangentRay {v : Base} (hv : v ≠ 0) : + ∃ (b : Bool) (t c : ℝ), c ≠ 0 ∧ v = c • tangentRay b t := by + by_cases h0 : v 0 = 0 + · have h1 : v 1 ≠ 0 := by + intro h1 + apply hv + ext i + fin_cases i <;> simp [h0,h1] + refine ⟨true,v 0 / v 1,v 1,h1,?_⟩ + ext i + fin_cases i + · change v 0 = v 1 * (v 0 / v 1) + field_simp + · change v 1 = v 1 * 1 + rw [mul_one] + · refine ⟨false,v 1 / v 0,v 0,h0,?_⟩ + ext i + fin_cases i + · change v 0 = v 0 * 1 + rw [mul_one] + · change v 1 = v 0 * (v 1 / v 0) + field_simp + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def graphProjection (a : V) : V × ℝ →L[ℝ] V := + ContinuousLinearMap.fst ℝ V ℝ - + (ContinuousLinearMap.snd ℝ V ℝ).smulRight a + +@[simp] lemma graphProjection_apply (a : V) (x : V × ℝ) : + graphProjection a x = x.1 - x.2 • a := rfl + +lemma graphProjection_comp_injective (a : V) (H : Base →L[ℝ] V × ℝ) + (hH : Function.Injective H) + (ha : ∀ b t, (H (tangentRay b t)).2 ≠ 0 → + a ≠ ((H (tangentRay b t)).2)⁻¹ • (H (tangentRay b t)).1) : + Function.Injective ((graphProjection a).comp H) := by + have hker (v : Base) (hv : graphProjection a (H v) = 0) : v = 0 := by + by_contra hn + obtain ⟨b,t,c,hc,he⟩ := exists_tangentRay hn + have hz : graphProjection a (H (tangentRay b t)) = 0 := by + rw [he,map_smul,map_smul] at hv + exact (smul_eq_zero.mp hv).resolve_left hc + have hfst : (H (tangentRay b t)).1 = (H (tangentRay b t)).2 • a := + sub_eq_zero.mp hz + have hlast : (H (tangentRay b t)).2 ≠ 0 := by + intro hlast + have hh : H (tangentRay b t) = H 0 := by + rw [map_zero] + apply Prod.ext + · change (H (tangentRay b t)).1 = 0 + simpa only [hlast,zero_smul] using hfst + · exact hlast + exact tangentRay_ne_zero b t (hH hh) + apply ha b t hlast + rw [hfst,smul_smul,inv_mul_cancel₀ hlast,one_smul] + intro v w h + apply sub_eq_zero.mp + apply hker + change graphProjection a (H v) = graphProjection a (H w) at h + rw [map_sub,map_sub,h,sub_self] + +lemma weightedJet_smooth {w : Base → ℝ} {l : Base → V} + (hw : ContDiff ℝ ∞ w) (hl : ContDiff ℝ ∞ l) : + ContDiff ℝ ∞ (weightedJet w l) := by + exact (hw.smul (hl.fderiv_right (m := ∞) (by simp))).sub + ((hw.fderiv_right (m := ∞) (by simp)).smulRight hl) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionLocalRepresentatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionLocalRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..02c69dcb6846875c993c61bf9390c2059be5ef0d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionLocalRepresentatives.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteSingularProjection +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedProjectionLinearization +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Globally smooth representatives for the original immersion in each +active coordinate core, with the exact weighted-jet germ. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exists_projection_representatives {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) : + ∃ Φ : A.centers → Base → ProjectionTarget 3 × ℝ, + (∀ i, ContDiff ℝ ∞ (Φ i)) ∧ + ∀ i x, x ∈ A.coordinateCore i → + Φ i =ᶠ[𝓝 x] F ∘ (chart (i : M)).symm := by + have hc (i : A.centers) : ContDiffOn ℝ ∞ + (F ∘ (chart (i : M)).symm) (chart (i : M)).target := + (hF.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + choose U hU hKU _ Φ hΦ hEq using fun i => + CollarVelocity.compact_smooth_extension (A.coordinateCore_compact i) + (chart (i : M)).open_target (A.coordinateCore_target i) (hc i) + refine ⟨Φ,hΦ,?_⟩ + intro i x hx + filter_upwards [(hU i).mem_nhds (hKU i hx)] with y hy + exact hEq i hy + +omit [CompactSpace M] in +lemma localizedWeight_ne_zero_on_core (i : A.centers) {x : Base} + (hx : x ∈ A.coordinateCore i) : localizedWeight (i : M) (A.weight i) x ≠ 0 := by + have hxT := A.coordinateCore_target i hx + have hw := A.coordinateCore_weight_nonzero i hx + simpa only [localizedWeight,localize,indicator_of_mem hxT,smul_eq_mul,mul_one] + using pow_ne_zero 2 hw + +theorem projectionJet_representative_germ {F : M → ProjectionTarget 3 × ℝ} + (i : A.centers) {Φ : Base → ProjectionTarget 3 × ℝ} (hΦ : ContDiff ℝ ∞ Φ) + {x : Base} (hx : x ∈ A.coordinateCore i) + (he : Φ =ᶠ[𝓝 x] F ∘ (chart (i : M)).symm) : + A.projectionJet F i =ᶠ[𝓝 x] fun y => + (localizedWeight (i : M) (A.weight i) y)^2 • fderiv ℝ Φ y := by + have hp : localize (i : M) (A.weight i) F =ᶠ[𝓝 x] + fun y => localizedWeight (i : M) (A.weight i) y • Φ y := by + filter_upwards [he,(chart (i : M)).open_target.mem_nhds (A.coordinateCore_target i hx)] + with y hy hyT + simp only [localizedWeight,localize,indicator_of_mem hyT,smul_eq_mul,mul_one,hy] + rfl + exact weightedJet_product_germ + (localizedWeight_smooth (i : M) (A.weight_smooth i) (A.weight_support i)) hΦ hp + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSingularDirection.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSingularDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..41cb3e0de0f9a60bd15f08ce1244b498089b98f6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSingularDirection.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ProjectionCrosscapJet + +namespace OAI + +/-! Every singular point of a regular projection has a compact direction +parameter and the nondegenerate unweighted crosscap jet. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem singular_projection_direction {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) F p)) + (a : ProjectionTarget 3) (p : M) + (hp : ¬ Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (graphProjection a ∘ F) p)) : + ∃ (i : A.centers) (b : Bool) (t : ℝ), p ∈ A.weightCore i ∧ t ∈ Icc (-1 : ℝ) 1 ∧ + (chart (i : M) p,t) ∈ tangentSlopeDomain (A.projectionJet F i) b ∧ + tangentSlope (A.projectionJet F i) b (chart (i : M) p,t) = a := by + classical + have hg : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ (graphProjection a ∘ F) := + (graphProjection a).contDiff.contMDiff.comp hF + obtain ⟨i,hi⟩ := A.mem_some_weightCore p + let x := chart (i : M) p + have hx : x ∈ A.coordinateCore i := mem_image_of_mem _ hi + have hbad : ¬ Function.Injective ((graphProjection a).comp (A.projectionJet F i x)) := by + intro hinj + have hnew : Function.Injective (weightedJet (localizedWeight (i : M) (A.weight i)) + (localize (i : M) (A.weight i) (graphProjection a ∘ F)) x) := by + rw [localize_clm,weightedJet_comp _ _ + ((localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).differentiable + (by simp) x)] + exact hinj + have hImm := (localized_weightedJet_injective_iff (hg.of_le (by simp)) (i : M) + (A.weight_smooth i) (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mp hnew + apply hp + change Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) + (graphProjection a ∘ F) ((chart (i : M)).symm (chart (i : M) p))) at hImm + rwa [(chart (i : M)).left_inv (A.weightCore_source i hi)] at hImm + have hjet : Function.Injective (A.projectionJet F i x) := + (localized_weightedJet_injective_iff (hF.of_le (by simp)) (i : M) + (A.weight_smooth i) (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mpr (hI _) + obtain ⟨b,t,ht,hker⟩ := exists_bounded_tangentRay_in_kernel _ hbad + have hfst : (A.projectionJet F i x (tangentRay b t)).1 = + (A.projectionJet F i x (tangentRay b t)).2 • a := sub_eq_zero.mp hker + have hlast : (A.projectionJet F i x (tangentRay b t)).2 ≠ 0 := by + intro hz + have he0 : A.projectionJet F i x (tangentRay b t) = A.projectionJet F i x 0 := by + rw [map_zero] + apply Prod.ext + · change (A.projectionJet F i x (tangentRay b t)).1 = 0 + simpa only [hz,zero_smul] using hfst + · exact hz + exact tangentRay_ne_zero b t (hjet he0) + refine ⟨i,b,t,hi,ht,hlast,?_⟩ + change (A.projectionJet F i x (tangentRay b t)).2⁻¹ • + (A.projectionJet F i x (tangentRay b t)).1 = a + rw [hfst,smul_smul,inv_mul_cancel₀ hlast,one_smul] + +theorem singular_projection_crosscap_jet {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) F p)) + (a : ProjectionTarget 3) + (hreg : ∀ i b z, z ∈ tangentSlopeDomain (A.projectionJet F i) b → + tangentSlope (A.projectionJet F i) b z = a → + Function.Surjective (fderiv ℝ (tangentSlope (A.projectionJet F i) b) z)) + (p : M) (hp : ¬ Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (graphProjection a ∘ F) p)) : + ∃ (i : A.centers) (b : Bool) (t : ℝ) (Φ : Base → ProjectionTarget 3 × ℝ), + p ∈ A.weightCore i ∧ t ∈ Icc (-1 : ℝ) 1 ∧ ContDiff ℝ ∞ Φ ∧ + Φ =ᶠ[𝓝 (chart (i : M) p)] F ∘ (chart (i : M)).symm ∧ + graphProjection a (fderiv ℝ Φ (chart (i : M) p) (tangentRay b t)) = 0 ∧ + Function.Bijective (projectedCrosscapJet Φ a b (chart (i : M) p) t) := by + obtain ⟨i,b,t,hi,ht,hdom,hval⟩ := A.singular_projection_direction hF hI a p hp + obtain ⟨Φ,hΦ,hgerm⟩ := A.exists_projection_representatives hF + have hx : chart (i : M) p ∈ A.coordinateCore i := mem_image_of_mem _ hi + have hres := A.regular_projection_crosscap_jet hF i (hΦ i) hx (hgerm i _ hx) + a b t hdom hval (hreg i b _ hdom hval) + exact ⟨i,b,t,Φ i,hi,ht,hΦ i,hgerm i _ hx,hres⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSlopeDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSlopeDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..c65641e12e8e4cbca5fa988a21e6bbd671842294 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ProjectionSlopeDifferential.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericProjectionParameter + +namespace OAI + +/-! The derivative of a graph-direction coordinate. At a projection kernel +its derivative is exactly the projected derivative divided by the height. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def tangentRayVelocity (b : Bool) : Base := + if b then ![1,0] else ![0,1] + +lemma tangentRay_hasDerivAt (b : Bool) (t : ℝ) : + HasDerivAt (tangentRay b) (tangentRayVelocity b) t := by + apply hasDerivAt_pi.mpr + intro i + cases b <;> fin_cases i <;> + first | exact hasDerivAt_id t | exact hasDerivAt_const t _ + +lemma tangentRayVelocity_ne_zero (b : Bool) : tangentRayVelocity b ≠ 0 := by + cases b <;> intro h + · have hh := congrFun h 1 + norm_num [tangentRayVelocity] at hh + · have hh := congrFun h 0 + norm_num [tangentRayVelocity] at hh + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma hasFDerivAt_graph_slope {f : E → V × ℝ} {D : E →L[ℝ] V × ℝ} {x : E} + (hf : HasFDerivAt f D x) (a : V) (hn : (f x).2 ≠ 0) + (he : (f x).1 = (f x).2 • a) : + HasFDerivAt (fun y => (f y).2⁻¹ • (f y).1) + ((f x).2⁻¹ • (graphProjection a).comp D) x := by + have h := ((hasFDerivAt_inv hn).comp x hf.snd).smul hf.fst + convert h using 1 + · rfl + ext v + change (f x).2⁻¹ • ((D v).1-(D v).2 • a) = + (f x).2⁻¹ • (D v).1 + ((D v).2 * (-((f x).2 ^ 2)⁻¹)) • (f x).1 + have hc : (D v).2 * (-((f x).2 ^ 2)⁻¹) * (f x).2 = + -((f x).2⁻¹ * (D v).2) := by + field_simp + rw [he,smul_smul,hc,neg_smul,smul_sub,smul_smul,sub_eq_add_neg] + +lemma fderiv_graph_slope {f : E → V × ℝ} {x : E} + (hf : DifferentiableAt ℝ f x) (a : V) (hn : (f x).2 ≠ 0) + (he : (f x).1 = (f x).2 • a) : + fderiv ℝ (fun y => (f y).2⁻¹ • (f y).1) x = + (f x).2⁻¹ • (graphProjection a).comp (fderiv ℝ f x) := + (hasFDerivAt_graph_slope hf.hasFDerivAt a hn he).fderiv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PublishedInputs.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PublishedInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..cff218ac40fe09979d323deda26aa0a51fb3a66b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PublishedInputs.lean @@ -0,0 +1,102 @@ +import Mathlib + +namespace OAI + +/-! +# Whitney immersion and Sard regular-value statements for surfaces + +The compact surface specialization of Whitney's immersion theorem and +the equal-dimensional surface case of Sard's theorem provide the +initial immersion and the regular parameters of the construction. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.PublishedInputs + +open Filter MeasureTheory Set +open scoped ContDiff Manifold Topology + +abbrev Plane := EuclideanSpace ℝ (Fin 2) +abbrev ThreeSpace := EuclideanSpace ℝ (Fin 3) + +/-- Whitney, *The Singularities of a Smooth n-Manifold in (2n-1)-Space*, +Ann. Math. 45 (1944), Theorem 8, p.274, specialized to compact surfaces: +existence of a C1 immersion into Euclidean three-space. -/ +def WhitneySurfaceInput (M : Type*) [TopologicalSpace M] [T2Space M] + [SecondCountableTopology M] [CompactSpace M] + [ChartedSpace Plane M] [IsManifold 𝓘(ℝ, Plane) ∞ M] : Prop := + ∃ f : M → ThreeSpace, ContMDiff 𝓘(ℝ, Plane) 𝓘(ℝ, ThreeSpace) 1 f ∧ + ∀ x, Function.Injective (mfderiv 𝓘(ℝ, Plane) 𝓘(ℝ, ThreeSpace) f x) + +/-- Critical values of a map between two-dimensional coordinate spaces. -/ +def criticalValues (f : Plane → Plane) : Set Plane := + f '' {x | ¬ Function.Surjective (fderiv ℝ f x)} + +/-- Sard, *The measure of the critical values of differentiable maps*, +Bull. AMS 48 (1942), Theorem 4.1, p.885: the smooth equal-dimensional +surface case in coordinates. This is the sole critical-value input needed +for the manuscript's countable coordinate charts. -/ +def SardSurfaceInput : Prop := + ∀ f : Plane → Plane, ContDiff ℝ ∞ f → volume (criticalValues f) = 0 + +/-- The critical values of a smooth map between planes have zero volume. -/ +theorem sardSurfaceInput : SardSurfaceInput := by + intro f hf + apply addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun x => fderiv ℝ f x) + · intro x _ + exact (hf.differentiable (by simp) x).hasFDerivAt.hasFDerivWithinAt + · intro x hx + change ¬ Function.Surjective (fderiv ℝ f x) at hx + change LinearMap.det (fderiv ℝ f x).toLinearMap = 0 + rw [LinearMap.det_eq_zero_iff_ker_ne_bot, ne_eq, LinearMap.ker_eq_bot] + exact fun hinj => hx (LinearMap.injective_iff_surjective.mp hinj) + +lemma not_mem_criticalValues_iff (f : Plane → Plane) (y : Plane) : + y ∉ criticalValues f ↔ ∀ x, f x = y → Function.Surjective (fderiv ℝ f x) := by + simp only [criticalValues, mem_image, mem_ofPred_eq, not_exists, not_and] + constructor + · intro h x hxy + by_contra hn + exact h x hn hxy + · intro h x hn hxy + exact hn (h x hxy) + +/-- Countably many exceptional sets can be avoided densely. This is the +selection step used after applying Sard in the coordinate charts of a +parameter projection. -/ +theorem dense_simultaneous_regular_values (hSard : SardSurfaceInput) + {ι : Type*} [Countable ι] (f : ι → Plane → Plane) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) : + Dense {y | ∀ i x, f i x = y → Function.Surjective (fderiv ℝ (f i) x)} := by + have hnull : volume (⋃ i, criticalValues (f i)) = 0 := + measure_iUnion_null (fun i => hSard (f i) (hf i)) + have hae : ∀ᵐ y ∂volume, y ∉ ⋃ i, criticalValues (f i) := by + simpa only [ae_iff, not_not, ofPred_mem_eq] using hnull + have hd := Measure.dense_of_ae hae + simpa only [mem_iUnion, not_exists, not_mem_criticalValues_iff] using hd + +/-- Countably many smooth plane maps have simultaneous regular values in +every nonempty open parameter set. -/ +theorem exists_simultaneous_regular_value (hSard : SardSurfaceInput) + {ι : Type*} [Countable ι] (f : ι → Plane → Plane) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) (U : Set Plane) + (hU : IsOpen U) (hne : U.Nonempty) : + ∃ y ∈ U, ∀ i x, f i x = y → Function.Surjective (fderiv ℝ (f i) x) := by + obtain ⟨y, hy, hyU⟩ := (dense_simultaneous_regular_values hSard f hf).inter_open_nonempty U hU hne + exact ⟨y, hy, hyU⟩ + +/-- Simultaneous regular-value selection from the fixed-dimensional Sard theorem. -/ +theorem exists_simultaneous_regular_value_unconditional + {ι : Type*} [Countable ι] (f : ι → Plane → Plane) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) (U : Set Plane) + (hU : IsOpen U) (hne : U.Nonempty) : + ∃ y ∈ U, ∀ i x, f i x = y → Function.Surjective (fderiv ℝ (f i) x) := + exists_simultaneous_regular_value sardSurfaceInput f hf U hU hne + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRadialGauss.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRadialGauss.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5ae88f03d0c088c25be87ffb3f0505bb02eb6d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRadialGauss.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateGauss +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedRadialSecondForm + +namespace OAI + +/-! The curvature in the initial ordered crossing invariant is the actual +Gaussian curvature computed from the induced metric, rather than a freely +specified scalar. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame VelocityFrame + +def coordinateGaussianCurvature (E F G : Base → ℝ) (p : Base) : ℝ := + coordinateGauss E F G p/(E p*G p-(F p)^2) + +lemma coordinateGauss_pure_radial {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : Base) (n : RVec 4) {r : ℝ} + (hn : n ⬝ᵥ n = 1) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ v w, realSecondForm F v w p = + (r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv w F p)) • n) : + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + (r⁻¹)^2*gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + rw [← gauss_metric_identity hF p hD,hB dx dx,hB dy dy,hB dx dy] + simp only [smul_dotProduct,dotProduct_smul,smul_eq_mul,hn,mul_one,NormalFrame.gramDet] + ring + +lemma coordinateGaussianCurvature_pure_radial {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : Base) (n : RVec 4) {r : ℝ} (hn : n ⬝ᵥ n = 1) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ v w, realSecondForm F v w p = + (r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv w F p)) • n) : + coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + (r⁻¹)^2 := by + rw [coordinateGaussianCurvature,coordinateGauss_pure_radial hF p n hn hD hB] + change (r⁻¹)^2*gramDet (coordDeriv dx F p) (coordDeriv dy F p)/ + gramDet (coordDeriv dx F p) (coordDeriv dy F p) = _ + exact mul_div_cancel_right₀ _ hD + +theorem orderedCrossing_intrinsic_pure_radial {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) (n : RVec 4) {r : ℝ} (hr : 0 < r) (hn : n ⬝ᵥ n = 1) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ a b, realSecondForm F a b p = + (r⁻¹*(coordDeriv a F p ⬝ᵥ coordDeriv b F p)) • n) + (hv : coordDeriv v F p ≠ 0) (hw : coordDeriv w F p ≠ 0) : + 0 < orderedCrossing F v w p + (coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p) := by + rw [coordinateGaussianCurvature_pure_radial hF p n hn hD hB] + exact (orderedCrossing_pure_radial p v w n hr hn hv hw (hB v v) (hB v w)).2 + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4 +open RealModes SmallModes SphericalJets + +theorem scaled_flat_spherical_intrinsic_crossing {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) {r : ℝ} (hr : 0 < r) (x : SmallModes.Base) + (hunit : ‖F (planeCoordinates.symm x)‖ = 1) + (hflat : ∀ v w, sphericalSecondForm F (planeCoordinates.symm x) v w = 0) + (hI : Function.Injective (fderiv ℝ (scaledSphereCoordinates F r) x)) + {v w : SmallModes.Base} (hv : v ≠ 0) (hw : w ≠ 0) : + 0 < VelocityFrame.orderedCrossing (scaledSphereCoordinates F r) v w x + (coordinateGaussianCurvature (realMetric (scaledSphereCoordinates F r) dx dx) + (realMetric (scaledSphereCoordinates F r) dx dy) + (realMetric (scaledSphereCoordinates F r) dy dy) x) := by + have hn : spaceCoordinates (-F (planeCoordinates.symm x)) ⬝ᵥ + spaceCoordinates (-F (planeCoordinates.symm x)) = 1 := by + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,norm_neg,hunit] + norm_num + have hs : ContDiff ℝ ∞ (scaledSphereCoordinates F r) := + spaceCoordinates.contDiff.comp ((hF.const_smul r).comp planeCoordinates.symm.contDiff) + apply orderedCrossing_intrinsic_pure_radial hs x v w _ hr hn + (gramDet_ne_zero_of_injective _ hI) + (scaled_flat_spherical_secondForm hF hr.ne' x hflat (gramDet_ne_zero_of_injective _ hI)) + · intro hz + exact hv (hI (by simpa only [coordDeriv,map_zero] using hz)) + · intro hz + exact hw (hI (by simpa only [coordDeriv,map_zero] using hz)) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRayAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRayAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e3682902c9cca1d8b90471d2abe4e59838043f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/PureRayAvoidance.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactCrossingPreservation + +namespace OAI + +/-! Quantitative avoidance of the nonpositive first-axis ray for all nonzero +tangent directions, including directions whose first coordinate vanishes. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation + +lemma slope_first_positive {S D N L k t K : ℝ} (hS : 0 < S) + (hk : -K ≤ k) (hN : K < N^2) : 0 < (slopePure S D N L k t).1 := by + change 0 < (N^2+k+(D+S*t)^2)/S + exact div_pos (by nlinarith [sq_nonneg (D+S*t)]) hS + +lemma slope_ray_avoidance_longitudinal {sLo S D N L k t K d B : ℝ} + (hmin : 0 < sLo) (hS : sLo ≤ S) (hK : 0 ≤ K) (hk : -K ≤ k) + (hd : |D| ≤ d) (hB : 0 ≤ B) (hN : |N| ≤ B) + (hL : 2*B*((Real.sqrt K+d)/sLo) < |L|) : + 0 < (slopePure S D N L k t).1 ∨ (slopePure S D N L k t).2 ≠ 0 := by + by_cases hp : 0 < (slopePure S D N L k t).1 + · exact Or.inl hp + · right + intro hz + have hSpos : 0 < S := hmin.trans_le hS + have hnum : N^2+k+(D+S*t)^2 ≤ 0 := by + have hh : (N^2+k+(D+S*t)^2)/S ≤ 0 := le_of_not_gt hp + simpa only [zero_mul] using (div_le_iff₀ hSpos).mp hh + have hsq : (D+S*t)^2 ≤ K := by nlinarith [sq_nonneg N] + have hsqrt := Real.sq_sqrt hK + have habs : |D+S*t| ≤ Real.sqrt K := by + apply (sq_le_sq₀ (abs_nonneg _) (Real.sqrt_nonneg _)).mp + simpa only [sq_abs,hsqrt] using hsq + have hSt : S*|t| ≤ Real.sqrt K+d := by + have hh := abs_sub_le (D+S*t) 0 D + simp only [sub_zero,zero_sub,abs_neg,add_sub_cancel_left,abs_mul,abs_of_pos hSpos] at hh + linarith + have ht : |t| ≤ (Real.sqrt K+d)/sLo := by + apply (le_div_iff₀ hmin).mpr + nlinarith [mul_le_mul_of_nonneg_right hS (abs_nonneg t)] + have hLt : L = -(2*N*t) := by + change L+2*N*t = 0 at hz + linarith + have hprod : |L| ≤ 2*B*((Real.sqrt K+d)/sLo) := by + rw [hLt,abs_neg,abs_mul,abs_mul] + norm_num only [show |(2 : ℝ)| = 2 by norm_num] + exact mul_le_mul (mul_le_mul_of_nonneg_left hN (by norm_num)) ht + (abs_nonneg _) (by positivity) + linarith + +lemma pure_slope_scale {S D N L k b t : ℝ} (hS : S ≠ 0) : + pureComponents S D N L k b (b*t) = b^2 • slopePure S D N L k t := by + ext <;> dsimp [pureComponents,frameXX,frameXY,frameYY,slopePure] <;> + field_simp <;> ring + +lemma pure_vertical_positive {S D N L k c : ℝ} (hS : 0 < S) (hc : c ≠ 0) : + 0 < (pureComponents S D N L k 0 c).1 := by + have h := pure_first_identity (D := D) (N := N) (L := L) (k := k) + (b := 0) (c := c) hS.ne' + have hsq : 0 < (S*c)^2 := sq_pos_of_ne_zero (mul_ne_zero hS.ne' hc) + simp only [mul_zero,zero_add,zero_pow (by norm_num : 2 ≠ 0),mul_zero,add_zero] at h + nlinarith + +lemma pure_ray_avoidance_of_slopes {S D N L k b c : ℝ} (hS : 0 < S) + (hv : b ≠ 0 ∨ c ≠ 0) + (hslopes : ∀ t : ℝ, 0 < (slopePure S D N L k t).1 ∨ + (slopePure S D N L k t).2 ≠ 0) : + 0 < (pureComponents S D N L k b c).1 ∨ + (pureComponents S D N L k b c).2 ≠ 0 := by + by_cases hb : b = 0 + · subst b + exact Or.inl (pure_vertical_positive hS (hv.resolve_left (by simp))) + · have hc : b*(c/b) = c := by field_simp + rw [← hc,pure_slope_scale hS.ne'] + rcases hslopes (c/b) with hp | hz + · exact Or.inl (mul_pos (sq_pos_of_ne_zero hb) hp) + · exact Or.inr (mul_ne_zero (pow_ne_zero 2 hb) hz) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInputBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInputBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f7badfd112c73d28c946c8a9f6676ee8b975bea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInputBudgets.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricForcedFactorBudgets +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargetBudget + +namespace OAI + +/-! The full quadratic solve budgets, with finite derivative loss explicit. -/ +noncomputable section +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open RealModes + +def quadraticInputBudget (m : ℕ) (D I α β : ℕ → ℝ) : ℝ := + tensorChartBudget m (I m) (I (m+1))*quadraticTargetBudget m (D m) (α m) (β m) + +def quadraticSizeBudget (q m : ℕ) (D C J I α β : ℕ → ℝ) : ℝ := + max 1 (metricForcedSizeBudget C J (fun _ => 1) q m) * quadraticInputBudget (m+q+1) D I α β + +def quadraticResidualBudget (q m : ℕ) (D C J I α β : ℕ → ℝ) : ℝ := + max 1 (metricForcedResidualBudget C J (fun _ => 1) q m) * quadraticInputBudget (m+q+1) D I α β + +lemma tensorChartBudget_polynomial (m : ℕ) (I J : ℝ → ℝ) + (hI : HasPolynomialBound I) (hJ : HasPolynomialBound J) : + HasPolynomialBound (fun x => tensorChartBudget m (I x) (J x)) := by + unfold tensorChartBudget + repeat first + | exact hI + | exact hJ + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +lemma quadraticInputBudget_polynomial (m : ℕ) (D I α β : ℕ → ℝ → ℝ) + (hD : ∀ k, HasPolynomialBound (D k)) (hI : ∀ k, HasPolynomialBound (I k)) + (hα : ∀ k, HasPolynomialBound (α k)) (hβ : ∀ k, HasPolynomialBound (β k)) : + HasPolynomialBound (fun x => quadraticInputBudget m + (fun k => D k x) (fun k => I k x) (fun k => α k x) (fun k => β k x)) := + (tensorChartBudget_polynomial m (I m) (I (m+1)) (hI m) (hI (m+1))).mul + (quadraticTargetBudget_polynomial m (D m) (α m) (β m) (hD m) (hα m) (hβ m)) + +lemma quadraticSizeBudget_polynomial (q m : ℕ) (D C J I α β : ℕ → ℝ → ℝ) + (hD : ∀ k, HasPolynomialBound (D k)) (hC : ∀ k, HasPolynomialBound (C k)) + (hJ : ∀ k, HasPolynomialBound (J k)) (hI : ∀ k, HasPolynomialBound (I k)) + (hα : ∀ k, HasPolynomialBound (α k)) (hβ : ∀ k, HasPolynomialBound (β k)) + (hC1 : ∀ k x, 1 ≤ x → 1 ≤ C k x) : + HasPolynomialBound (fun x => quadraticSizeBudget q m + (fun k => D k x) (fun k => C k x) (fun k => J k x) + (fun k => I k x) (fun k => α k x) (fun k => β k x)) := + ((polynomialBound_const zero_le_one).max (metricForcedSizeBudget_polynomial C J (fun _ _ => 1) hC hJ + (fun _ => polynomialBound_const zero_le_one) hC1 q m)).mul + (quadraticInputBudget_polynomial (m+q+1) D I α β hD hI hα hβ) + +lemma quadraticResidualBudget_polynomial (q m : ℕ) (D C J I α β : ℕ → ℝ → ℝ) + (hD : ∀ k, HasPolynomialBound (D k)) (hC : ∀ k, HasPolynomialBound (C k)) + (hJ : ∀ k, HasPolynomialBound (J k)) (hI : ∀ k, HasPolynomialBound (I k)) + (hα : ∀ k, HasPolynomialBound (α k)) (hβ : ∀ k, HasPolynomialBound (β k)) + (hC1 : ∀ k x, 1 ≤ x → 1 ≤ C k x) : + HasPolynomialBound (fun x => quadraticResidualBudget q m + (fun k => D k x) (fun k => C k x) (fun k => J k x) + (fun k => I k x) (fun k => α k x) (fun k => β k x)) := + ((polynomialBound_const zero_le_one).max (metricForcedResidualBudget_polynomial C J (fun _ _ => 1) hC hJ + (fun _ => polynomialBound_const zero_le_one) hC1 q m)).mul + (quadraticInputBudget_polynomial (m+q+1) D I α β hD hI hα hβ) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInteraction.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInteraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..7de7a2b0d5873a6140afc2c85bc246e87c88eef1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticInteraction.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity + +namespace OAI + +/-! Separate the mixed and pure terms introduced by the second, forced +correction from the quadratic tensor of the first, free correction. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def coordinateQuadraticInteraction {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X Y : RealModes.RField 4) : SmallModes.Base → PhaseMean.Tensor := + fun p k => RealModes.realLinearizedTensor X Y p k + RealModes.realMetricTensor Y p k + + (∑ l, ε ^ (l.val + 1) * (1 / 2 : ℝ) * + (((P k l).variations 1).eval ![G, X ∘ planeCoordinateIsometry, Y ∘ planeCoordinateIsometry, 0] + (planeCoordinateIsometry.symm p,0) + + ((P k l).variations 1).eval ![G, Y ∘ planeCoordinateIsometry, X ∘ planeCoordinateIsometry, 0] + (planeCoordinateIsometry.symm p,0))) + + coordinateQuadraticPolynomial P ε G Y 0 p k + +lemma coordinateFullLinearized_add {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) {X Y : RealModes.RField 4} + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) : + coordinateFullLinearized P ε G (X + Y) = + coordinateFullLinearized P ε G X + coordinateFullLinearized P ε G Y := by + have ha : X + Y = (fun x => X x + Y x) := rfl + have hc : (X + Y) ∘ planeCoordinateIsometry = + (fun x => (X ∘ planeCoordinateIsometry) x + (Y ∘ planeCoordinateIsometry) x) := rfl + funext p k + simp only [coordinateFullLinearized, Pi.add_apply, coordinateRealLinearized, + RealModes.realLinearizedTensor_apply] + rw [hc, linearized_add _ ε G (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff), ha, + RealModes.realLinearized_add_right (hX.differentiable (by simp) p) (hY.differentiable (by simp) p)] + ring + +lemma coordinateFullQuadratic_add {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) {X Y : RealModes.RField 4} + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) : + coordinateFullQuadratic P ε G (X + Y) = + coordinateFullQuadratic P ε G X + coordinateQuadraticInteraction P ε G X Y := by + have hx := hX.comp planeCoordinateIsometry.contDiff + have hy := hY.comp planeCoordinateIsometry.contDiff + have ha : X + Y = (fun x => X x + Y x) := rfl + have hc : (X + Y) ∘ planeCoordinateIsometry = + (fun x => (X ∘ planeCoordinateIsometry) x + (Y ∘ planeCoordinateIsometry) x) := rfl + funext p k + simp only [coordinateFullQuadratic, Pi.add_apply, coordinateQuadraticInteraction] + rw [ha, RealModes.realMetricTensor_add (hX.differentiable (by simp) p) (hY.differentiable (by simp) p)] + simp only [Pi.add_apply, coordinateQuadraticPolynomial] + rw [← ha, hc] + simp_rw [real_second_variation_add_left _ G hx hy, + real_second_variation_add_right _ G _ hx hy] + simp only [mul_add, Finset.sum_add_distrib] + ring_nf + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticOverlapSupports.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticOverlapSupports.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff971993e13c310722621cb722afea8e034110b3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticOverlapSupports.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Atlas.ChartReadSupport + +namespace OAI + +/-! Quadratic targets retain the original support intersections on the surface. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance overlapTargetsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance overlapTargetsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance overlapTargetsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance overlapTargetsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance overlapTargetsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance overlapTargetsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +def globalQuadraticSupport {ι : Type*} (S : ι → Set M) : RealModes.QuadraticLabel ι → Set M + | .inl a => S a + | .inr ⟨a,b,_⟩ => S a ∩ S b + +omit [ChartedSpace Plane M] [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma globalQuadraticSupport_closed {ι : Type*} (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) : + ∀ l : RealModes.QuadraticLabel ι, IsClosed (globalQuadraticSupport S l) := by + intro l + rcases l with a | ⟨a,b,c⟩ + · exact hS a + · exact (hS a).inter (hS b) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +def quadraticOverlapCompact (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : TopologicalSpace.Compacts JetPolynomial.Base := + ⟨(chart (k : M)) '' (tsupport (A.weight k) ∩ globalQuadraticSupport S l), + ((isClosed_tsupport _).inter (globalQuadraticSupport_closed S hS l)).isCompact.image_of_continuousOn + ((chart (k : M)).continuousOn.mono (fun _ h => A.weight_support k h.1))⟩ + +omit [Fintype ι] [DecidableEq ι] in +lemma quadraticOverlapCompact_subset (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + (A.quadraticOverlapCompact S hS k l : Set JetPolynomial.Base) ⊆ A.chartWeightCompact k := by + rintro x ⟨p,hp,rfl⟩ + exact ⟨p,hp.1,rfl⟩ + +omit [Fintype ι] [DecidableEq ι] in +lemma globalQuadraticTarget_overlap (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + tsupport (A.globalQuadraticTarget τ φ Z hφ hZ k l) ⊆ + (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) := by + intro x hx + let Q := RealModes.quadraticAmplitude τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) l + have hw : x ∈ tsupport (fun y => (A.planeWeight k y)^2) := + tsupport_smul_subset_left (fun y => (A.planeWeight k y)^2) Q hx + have hw' : x ∈ tsupport (A.planeWeight k) := by + have hs : tsupport (fun y => (A.planeWeight k y)^2) ⊆ tsupport (A.planeWeight k) := by + simpa only [pow_two] using (tsupport_mul_subset_left (f := A.planeWeight k) (g := A.planeWeight k)) + exact hs hw + have hkx : x ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base) := + (A.supportedPlaneWeight k).tsupport_subset hw' + have hq : x ∈ tsupport Q := tsupport_smul_subset_right (fun y => (A.planeWeight k y)^2) Q hx + have hqq := RealModes.quadraticAmplitude_tsupport τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) (fun _ => Subset.rfl) l hq + have hpx : (chart (k : M)).symm (planeCoordinateIsometry.symm x) ∈ globalQuadraticSupport S l := by + rcases l with a | ⟨a,b,c⟩ + · exact hSZ a (A.vectorPlaneRead_support_on_weight k (Z a) hkx hqq) + · exact ⟨hSZ a (A.vectorPlaneRead_support_on_weight k (Z a) hkx hqq.1), + hSZ b (A.vectorPlaneRead_support_on_weight k (Z b) hkx hqq.2)⟩ + obtain ⟨y,⟨p,hp,rfl⟩,rfl⟩ := hkx + have hpS : p ∈ globalQuadraticSupport S l := by + simpa only [LinearIsometryEquiv.symm_apply_apply,(chart (k : M)).left_inv (A.weight_support k hp)] using hpx + exact ⟨chart (k : M) p,⟨p,⟨hp,hpS⟩,rfl⟩,rfl⟩ + +def globalQuadraticTargetRestricted (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + SupportedField (F := ComplexTensor) (modeSupport (A.quadraticOverlapCompact S hS k l)) := + ContDiffMapSupportedIn.of_support_subset (A.globalQuadraticTarget τ φ Z hφ hZ k l).contDiff + (subset_closure.trans (A.globalQuadraticTarget_overlap τ φ Z hφ hZ S hS hSZ k l)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticSolverInputBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticSolverInputBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..72603a9fb82d0d9218f0ba0a7cd218bf0606418c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuadraticSolverInputBounds.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm + +namespace OAI + +/-! Actual supported quadratic targets in the norm used by each phase solver. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance solverInputFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance solverInputFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance solverInputDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance solverInputDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance solverInputSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance solverInputSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {ι : Type*} + +theorem global_quadratic_solver_input_bound (k : A.centers) (m : ℕ) (A₀ P₀ : ℝ) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ (τ δ : ℝ) (s : ℝ≥0) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → 0 ≤ A₀ → 0 ≤ P₀ → + (∀ a, WeightedEstimates.WeightedBound univ s (m+1) (A₀*(δ*τ)) (A.vectorPlaneRead k (Z a))) → + (∀ a v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m P₀ + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∀ (l : RealModes.QuadraticLabel ι) {n : ℕ} {P : Fin 3 → Fin n → JetPolynomial.Expression} + {G : JetPolynomial.Base → JetPolynomial.Space} {hG : ContDiff ℝ ∞ G} + (c : PolynomialSolveData P 0 G hG (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s) + (I : ℕ → ℝ), (∀ j, 1 ≤ I j) → + (∀ a j, 1 ≤ j → j ≤ a → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I a) → + c.norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m ≤ + δ^2 * (tensorChartBudget m (I m) (I (m+1)) * B) := by + obtain ⟨B,hB,hb⟩ := A.globalQuadraticTarget_bound (ι := ι) k m A₀ P₀ + refine ⟨B,hB,?_⟩ + intro τ δ s φ Z hφ hZ S hS hSZ hτ hs hτs hs1 hδ hA hP hz hp l n P G hG c I hI hi + have ht : WeightedEstimates.WeightedBound univ s m (B*δ^2) + (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) := + hb τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ hA hP hz hp l + have hh := c.norm_le_of_weightedBound hs hs1 I hI hi m + (mul_nonneg hB (sq_nonneg δ)) _ ht + calc + _ ≤ tensorChartBudget m (I m) (I (m+1)) * (B*δ^2) := hh + _ = _ := by ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuantitativeMetricExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuantitativeMetricExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..11bb5051531a4ddc6f36cbb0096766d3761604ec --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/QuantitativeMetricExpansion.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TangentMetricBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LocalMetricExpansionWitness + +namespace OAI + +/-! The actual pullback metric, after subtracting its finite mean expansion, +has the fast-scale remainder bound used by the correction iteration. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open LocalPeriodicExpansion WeightedEstimates CovarianceCorrector + +namespace MetricPolynomial + +def metricDirection (dx dy : Base) (b : Bool) : Base := if b then dx else dy + +def meanMetric {S : TopologicalSpace.Opens Base} {dy : Base} + (g : Geometry (E := R4) S dy) (dx : Base) (U : ℕ → Family S R4) + (n : ℕ) (b c : Bool) (z : ℝ) (p : Base) : ℝ := + if b && c then + inner ℝ (g.X₀ p) (g.X₀ p) + g.q p + + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xxCoefficient dx U r).val p) * z ^ r + else if b || c then + inner ℝ (g.X₀ p) (g.Y p) + + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xyCoefficient dx U r).val p) * z ^ r + else + inner ℝ (g.Y p) (g.Y p) + + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.yyCoefficient U r).val p) * z ^ r + +/-- In each metric component, the error of the actual finite oscillatory map +relative to its mean expansion is `O_z(z^(n+1) / s^d)`. The fixed loss is +chosen before the slow map, both scales, or the derivative order. -/ +theorem compact_metric_error {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (X Y : VectorExpression) (R : ℕ → VectorExpression) + (hXs : X.SmoothCoeffs O) (hYs : Y.SmoothCoeffs O) (hRs : ∀ i, (R i).SmoothCoeffs O) + (n : ℕ) (hX : ∀ a, (X a).order ≤ 2) (hY : ∀ a, (Y a).order ≤ 2) + (hR : ∀ j < n + 1, ∀ a, (R j a).order ≤ 2 * j + 2) + (dx dy : Fin 2) (b c : Bool) (ℓ : Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector dx) = 1) (hℓy : ℓ (coordinateVector dy) = 0) : + ∃ d : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : Base → Space) (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) S K → + WeightedBound S s (m + (2 * (n + 1) + 1)) B (lowJet G) → + ∀ (g : Geometry (E := R4) S (coordinateVector dy)) (U : ℕ → Family S R4) + (F : Base → R4), + VectorExpression.Represents G X g.longitudinal → + VectorExpression.Represents G Y g.transverse → + (∀ i, VectorExpression.Represents G (R i) (U i)) → + U 0 = g.initial → (g.yyCoefficient U 1).fluct = 0 → + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector dx) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector dx) U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0) → + ContDiffOn ℝ ∞ F S → + (∀ p ∈ S, fderiv ℝ F p (coordinateVector dx) = g.X₀ p + average (g.V.val p)) → + (∀ p ∈ S, fderiv ℝ F p (coordinateVector dy) = g.Y p) → + WeightedBound S z m (D * z ^ (n + 1) / s ^ d) + (fun p => inner ℝ + (fderiv ℝ (finiteAnsatz F U ℓ (n + 1) z) p + (metricDirection (coordinateVector dx) (coordinateVector dy) b)) + (fderiv ℝ (finiteAnsatz F U ℓ (n + 1) z) p + (metricDirection (coordinateVector dx) (coordinateVector dy) c)) - + meanMetric g (coordinateVector dx) U n b c z p) := by + obtain ⟨d, hd⟩ := compact_tangent_metric_tail hO hK hKO X Y R hXs hYs hRs + (n + 1) (by omega) hX hY hR dx dy (b || c) (b && c) ℓ + refine ⟨d, ?_⟩ + intro m B hB + obtain ⟨D, hD, hb⟩ := hd m B hB + refine ⟨D, hD, ?_⟩ + intro G s z hz hzs hs1 hG hGK hGb g U F hXg hYg hrep hinit hy hc hF hDX hDY + have htail := hb G s z hz hzs hs1 hG hGK hGb g U hXg hYg hrep + apply htail.congr + intro p hp + obtain ⟨hxx, hxy, hyy⟩ := g.finite_expansion_of_cancellation hF U hinit n + (coordinateVector dx) hy hc ℓ hℓx hℓy hDX hDY z hz.ne' hp + cases b <;> cases c + · simp only [metricDirection, meanMetric, tangentFamily, Family.fastValue, + Bool.and, Bool.or, Bool.false_eq_true, ↓reduceIte] + change _ - _ = ∑ r ∈ _, z ^ r * (g.yyRemainder U (n + 1) r).val p _ + rw [hyy] + simp only [add_sub_cancel_left] + exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + · simp only [metricDirection, meanMetric, tangentFamily, Family.fastValue, + Bool.and, Bool.or, Bool.false_eq_true, ↓reduceIte] + rw [real_inner_comm] + change _ - _ = ∑ r ∈ _, z ^ r * (g.xyRemainder (coordinateVector dx) U (n + 1) r).val p _ + rw [hxy] + simp only [add_sub_cancel_left] + exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + · simp only [metricDirection, meanMetric, tangentFamily, Family.fastValue, + Bool.and, Bool.or, Bool.false_eq_true, ↓reduceIte] + change _ - _ = ∑ r ∈ _, z ^ r * (g.xyRemainder (coordinateVector dx) U (n + 1) r).val p _ + rw [hxy] + simp only [add_sub_cancel_left] + exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + · simp only [metricDirection, meanMetric, tangentFamily, Family.fastValue, + Bool.and, Bool.or, ↓reduceIte] + change _ - _ = ∑ r ∈ _, z ^ r * (g.xxRemainder (coordinateVector dx) U (n + 1) r).val p _ + rw [hxx] + simp only [add_sub_cancel_left] + exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + +end MetricPolynomial +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RadialMetricAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RadialMetricAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..1001941dacb7e236f47c20fef031059d54b035bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RadialMetricAlgebra.lean @@ -0,0 +1,297 @@ +import Mathlib + +namespace OAI + +/-! +Pointwise algebra for spherical starting immersions and positive boundary +crossing invariants, as in Section 8.1, equations `spherical-radial-form` and +`initial-crossing-positivity` of paper 094-01. +-/ + +noncomputable section + +open scoped Matrix + +namespace ClosedSurfaceR4.RadialMetricAlgebra + +abbrev Vec := Fin 4 → ℝ + +/-- Euclidean normalization, expressed using the finite-coordinate dot product. -/ +def unitDirection (v : Vec) : Vec := (Real.sqrt (v ⬝ᵥ v))⁻¹ • v + +lemma dot_self_pos {v : Vec} (hv : v ≠ 0) : 0 < v ⬝ᵥ v := by + have hnonneg : 0 ≤ v ⬝ᵥ v := Finset.sum_nonneg fun i _ => mul_self_nonneg (v i) + exact hnonneg.lt_of_ne' ((dotProduct_self_eq_zero).not.mpr hv) + +lemma positive_dot_ne_zero {v n : Vec} (hv : 0 < v ⬝ᵥ n) : v ≠ 0 := by + intro h + simp [h] at hv + +lemma unitDirection_ne_neg_of_dot_pos {v n : Vec} + (hn : n ⬝ᵥ n = 1) (hv : 0 < v ⬝ᵥ n) : unitDirection v ≠ -n := by + have hsq : 0 < v ⬝ᵥ v := dot_self_pos (positive_dot_ne_zero hv) + have hpos : 0 < unitDirection v ⬝ᵥ n := by + simpa only [unitDirection, smul_dotProduct, smul_eq_mul] using + mul_pos (inv_pos.mpr (Real.sqrt_pos.mpr hsq)) hv + intro h + rw [h, neg_dotProduct, hn] at hpos + norm_num at hpos + +lemma unitDirection_pos_smul {n : Vec} (hn : n ⬝ᵥ n = 1) + {c : ℝ} (hc : 0 < c) : unitDirection (c • n) = n := by + have hs : (c • n) ⬝ᵥ (c • n) = c ^ 2 := by + simp only [smul_dotProduct, dotProduct_smul, smul_eq_mul, hn] + ring + rw [unitDirection, hs, Real.sqrt_sq hc.le, smul_smul, inv_mul_cancel₀ hc.ne'] + exact one_smul ℝ n + +/-- A radial component with positive coefficient prevents the second form +from vanishing, independently of its component tangent to the sphere. -/ +theorem spherical_radial_boundary {n b : Vec} {a r : ℝ} + (hn : n ⬝ᵥ n = 1) (hb : b ⬝ᵥ n = 0) (ha : 0 < a) (hr : 0 < r) : + let B := r • b + (r⁻¹ * a) • n + 0 < B ⬝ᵥ n ∧ B ≠ 0 ∧ unitDirection B ≠ -n := by + dsimp only + have hp : 0 < (r • b + (r⁻¹ * a) • n) ⬝ᵥ n := by + simp only [add_dotProduct, smul_dotProduct, smul_eq_mul, hb, hn, + mul_zero, mul_one, zero_add] + exact mul_pos (inv_pos.mpr hr) ha + exact ⟨hp, positive_dot_ne_zero hp, unitDirection_ne_neg_of_dot_pos hn hp⟩ + +/-- At a prepared crossing the spherical component vanishes. This is the +Gauss expression for the remaining radial second fundamental form. -/ +theorem radial_gauss_identity (n : Vec) (hn : n ⬝ᵥ n = 1) (a b c r : ℝ) : + ((r⁻¹ * a) • n) ⬝ᵥ ((r⁻¹ * b) • n) - + ((r⁻¹ * c) • n) ⬝ᵥ ((r⁻¹ * c) • n) = + r⁻¹ ^ 2 * (a * b - c ^ 2) := by + simp only [smul_dotProduct, dotProduct_smul, smul_eq_mul, hn] + ring + +/-- The ordered crossing invariant from equation `crossing-invariant`. +Here `a`, `b`, and `c` are the values of the metric on `(v,v)`, `(w,w)`, +and `(v,w)` respectively, and `K` is the Gauss curvature. -/ +def radialCrossing (n : Vec) (a b c r K : ℝ) : ℝ := + (((r⁻¹ * c) • n) ⬝ᵥ unitDirection ((r⁻¹ * a) • n)) ^ 2 + + K * (a * b - c ^ 2) + +theorem radial_crossing_eq {n : Vec} (hn : n ⬝ᵥ n = 1) + {a r : ℝ} (ha : 0 < a) (hr : 0 < r) (b c : ℝ) : + radialCrossing n a b c r (r⁻¹ ^ 2) = r⁻¹ ^ 2 * a * b := by + unfold radialCrossing + rw [unitDirection_pos_smul hn (mul_pos (inv_pos.mpr hr) ha)] + simp only [smul_dotProduct, smul_eq_mul, hn, mul_one] + ring + +/-- Both ordered inequalities hold even if the two tangent vectors are +proportional; no positive lower bound for their Gram determinant is needed. -/ +theorem radial_crossings_pos {n : Vec} (hn : n ⬝ᵥ n = 1) + {a b r : ℝ} (ha : 0 < a) (hb : 0 < b) (hr : 0 < r) (c : ℝ) : + 0 < radialCrossing n a b c r (r⁻¹ ^ 2) ∧ + 0 < radialCrossing n b a c r (r⁻¹ ^ 2) := by + rw [radial_crossing_eq hn ha hr, radial_crossing_eq hn hb hr] + have hsq : 0 < r⁻¹ ^ 2 := sq_pos_of_pos (inv_pos.mpr hr) + exact ⟨mul_pos (mul_pos hsq ha) hb, mul_pos (mul_pos hsq hb) ha⟩ + +section GeneralCrossing + +/-- Coordinates in an orthonormal frame of the two-dimensional normal plane. +The complex plane is used only as a real inner product space. -/ +def pureNormal (S D N L k t : ℝ) : ℂ := + ⟨(N ^ 2 + k + (D + S * t) ^ 2) / S, L + 2 * N * t⟩ + +def mixedNormal (S D N L k t u : ℝ) : ℂ := + ⟨(N ^ 2 + k + (D + S * t) * (D + S * u)) / S, + L + N * (t + u)⟩ + +theorem mixed_sub_pure {S : ℝ} (hS : S ≠ 0) (D N L k t u : ℝ) : + mixedNormal S D N L k t u - pureNormal S D N L k t = + ⟨(u - t) * (D + S * t), (u - t) * N⟩ := by + apply Complex.ext <;> simp only [mixedNormal, pureNormal, Complex.sub_re, Complex.sub_im] + · field_simp [hS] + ring + · ring + +theorem mixedNormal_comm (S D N L k t u : ℝ) : + mixedNormal S D N L k t u = mixedNormal S D N L k u t := by + apply Complex.ext <;> simp only [mixedNormal] <;> ring + +/-- The estimate used at crossings before inserting uniform geometric bounds. -/ +theorem normalized_projection_lower {E : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] {P : E} (hP : P ≠ 0) (Z : E) : + ‖P‖ - ‖Z - P‖ ≤ inner ℝ Z (‖P‖⁻¹ • P) := by + have hn : ‖P‖ ≠ 0 := norm_ne_zero_iff.mpr hP + have hu : ‖‖P‖⁻¹ • P‖ = 1 := by + rw [norm_smul, Real.norm_eq_abs, abs_inv, abs_norm, inv_mul_cancel₀ hn] + have he : inner ℝ P (‖P‖⁻¹ • P) = ‖P‖ := by + rw [real_inner_smul_right, real_inner_self_eq_norm_mul_norm] + field_simp [hn] + have hz := neg_le_of_abs_le (abs_real_inner_le_norm (Z - P) (‖P‖⁻¹ • P)) + rw [hu, mul_one, inner_sub_left, he] at hz + linarith + +theorem mixed_projection_lower {S D N L k t u : ℝ} (hS : S ≠ 0) + (hP : pureNormal S D N L k t ≠ 0) : + (N ^ 2 + k + (D + S * t) ^ 2) / S - + |u - t| * (|D + S * t| + |N|) ≤ + inner ℝ (mixedNormal S D N L k t u) + (‖pureNormal S D N L k t‖⁻¹ • pureNormal S D N L k t) := by + have hp : (N ^ 2 + k + (D + S * t) ^ 2) / S ≤ + ‖pureNormal S D N L k t‖ := by + simpa only [pureNormal] using Complex.re_le_norm (pureNormal S D N L k t) + have hd : ‖mixedNormal S D N L k t u - pureNormal S D N L k t‖ ≤ + |u - t| * (|D + S * t| + |N|) := by + rw [mixed_sub_pure hS] + calc + _ ≤ |(u - t) * (D + S * t)| + |(u - t) * N| := + Complex.norm_le_abs_re_add_abs_im _ + _ = _ := by rw [abs_mul, abs_mul]; ring + have hn := normalized_projection_lower hP (mixedNormal S D N L k t u) + linarith + +theorem pureNormal_ne_zero {S D N L k t : ℝ} (hS : 0 < S) + (hNk : 0 < N ^ 2 + k) : pureNormal S D N L k t ≠ 0 := by + have hp : 0 < (pureNormal S D N L k t).re := by + exact div_pos (add_pos_of_pos_of_nonneg hNk (sq_nonneg _)) hS + intro h + simp [h] at hp + +/-- The first normal component admits a lower bound which is independent of +the large `xx` component `L`. -/ +theorem pureNormal_re_lower {S D N L k t smin smax K : ℝ} + (hmin : 0 < smin) (hlo : smin ≤ S) (hhi : S ≤ smax) + (hK : 0 ≤ K) (hk : -K ≤ k) : + N ^ 2 / smax - K / smin ≤ (pureNormal S D N L k t).re := by + have hS : 0 < S := lt_of_lt_of_le hmin hlo + have ha : N ^ 2 / smax ≤ N ^ 2 / S := + div_le_div_of_nonneg_left (sq_nonneg N) hS hhi + have hb : K / S ≤ K / smin := div_le_div_of_nonneg_left hK hmin hlo + have hc : -K / S ≤ (k + (D + S * t) ^ 2) / S := by + apply div_le_div_of_nonneg_right _ hS.le + linarith [sq_nonneg (D + S * t)] + simp only [neg_div] at hc + change N ^ 2 / smax - K / smin ≤ + (N ^ 2 + k + (D + S * t) ^ 2) / S + rw [add_assoc, add_div] + linarith + +/-- A fully uniform crossing estimate. Its right-hand side contains no `L`; +therefore the turn threshold is chosen before the fast `xx` derivative. -/ +theorem uniform_mixed_projection_lower + {S D N L k t u smin smax K dmax T : ℝ} + (hmin : 0 < smin) (hlo : smin ≤ S) (hhi : S ≤ smax) + (hK : 0 ≤ K) (hk : -K ≤ k) (hD : |D| ≤ dmax) + (ht : |t| ≤ T) (hu : |u| ≤ T) + (hP : pureNormal S D N L k t ≠ 0) : + N ^ 2 / smax - K / smin - 2 * T * (dmax + smax * T + |N|) ≤ + inner ℝ (mixedNormal S D N L k t u) + (‖pureNormal S D N L k t‖⁻¹ • pureNormal S D N L k t) := by + have hS : 0 < S := lt_of_lt_of_le hmin hlo + have hsmax : 0 ≤ smax := hS.le.trans hhi + have hT : 0 ≤ T := (abs_nonneg t).trans ht + have hdmax : 0 ≤ dmax := (abs_nonneg D).trans hD + have hdiff : |u - t| ≤ 2 * T := by + calc + _ ≤ |u| + |t| := abs_sub u t + _ ≤ 2 * T := by linarith + have hcoef : |D + S * t| ≤ dmax + smax * T := by + calc + _ ≤ |D| + |S * t| := abs_add_le D (S * t) + _ = |D| + S * |t| := by rw [abs_mul, abs_of_pos hS] + _ ≤ dmax + smax * T := by gcongr + have hprod : |u - t| * (|D + S * t| + |N|) ≤ + 2 * T * (dmax + smax * T + |N|) := by gcongr + have hfirst := pureNormal_re_lower (D := D) (N := N) (L := L) (t := t) + hmin hlo hhi hK hk + have hprojection := mixed_projection_lower (u := u) hS.ne' hP + change N ^ 2 / smax - K / smin ≤ + (N ^ 2 + k + (D + S * t) ^ 2) / S at hfirst + linarith + +/-- Once the mixed projection exceeds the possible negative curvature term, +the ordered crossing invariant is strictly positive. -/ +theorem crossing_positive_of_projection_bound {projection k delta : ℝ} + (hp : Real.sqrt (max 0 (-k * delta ^ 2)) < projection) : + 0 < projection ^ 2 + k * delta ^ 2 := by + have hs : 0 ≤ Real.sqrt (max 0 (-k * delta ^ 2)) := Real.sqrt_nonneg _ + have hsq : (Real.sqrt (max 0 (-k * delta ^ 2))) ^ 2 = + max 0 (-k * delta ^ 2) := Real.sq_sqrt (le_max_left _ _) + have hk : -k * delta ^ 2 ≤ max 0 (-k * delta ^ 2) := le_max_right _ _ + nlinarith + +lemma quadratic_dominates_affine {s a c x : ℝ} (hs : 0 < s) + (hx : max 1 (s * (a + |c| + 1)) < x) : + c < x ^ 2 / s - a * x := by + have hx1 : 1 < x := (le_max_left _ _).trans_lt hx + have hx0 : 0 < x := by linarith + have hlinear : s * (a + |c| + 1) < x := (le_max_right _ _).trans_lt hx + have hprod := mul_lt_mul_of_pos_right hlinear hx0 + have hquad : (a + |c| + 1) * x < x ^ 2 / s := by + apply (lt_div_iff₀ hs).mpr + nlinarith only [hprod] + have habs : c ≤ |c| := le_abs_self c + have hmul : 0 ≤ |c| * (x - 1) := mul_nonneg (abs_nonneg c) (by linarith) + nlinarith + +lemma curvature_sqrt_le {K k delta A : ℝ} (hK : 0 ≤ K) (hk : -K ≤ k) + (hdelta : |delta| ≤ A) : + Real.sqrt (max 0 (-k * delta ^ 2)) ≤ A * Real.sqrt K := by + have hA : 0 ≤ A := (abs_nonneg delta).trans hdelta + have hdsq : delta ^ 2 ≤ A ^ 2 := by + simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg delta) hA).mpr hdelta + have hksq : -k * delta ^ 2 ≤ K * A ^ 2 := by + calc + _ ≤ K * delta ^ 2 := mul_le_mul_of_nonneg_right (by linarith) (sq_nonneg _) + _ ≤ K * A ^ 2 := mul_le_mul_of_nonneg_left hdsq hK + apply Real.sqrt_le_iff.mpr + refine ⟨mul_nonneg hA (Real.sqrt_nonneg _), ?_⟩ + rw [mul_pow, Real.sq_sqrt hK] + apply max_le + · positivity + · nlinarith only [hksq] + +/-- There is a single threshold for the large mixed normal coefficient `N`. +It works for every `L`, every crossing with the displayed geometric bounds, +and both ordered invariants (by exchanging `t` and `u`). -/ +theorem exists_uniform_crossing_threshold {smin smax K dmax T : ℝ} + (hmin : 0 < smin) (hmax : 0 < smax) (hK : 0 ≤ K) : + ∃ threshold : ℝ, 0 < threshold ∧ + ∀ (S D N L k t u : ℝ), smin ≤ S → S ≤ smax → -K ≤ k → + |D| ≤ dmax → |t| ≤ T → |u| ≤ T → threshold < |N| → + let P := pureNormal S D N L k t + let Z := mixedNormal S D N L k t u + P ≠ 0 ∧ 0 < (inner ℝ Z (‖P‖⁻¹ • P)) ^ 2 + k * (u - t) ^ 2 := by + let C := K / smin + 2 * T * (dmax + smax * T) + 2 * T * Real.sqrt K + let threshold := max (K + 1) (max 1 (smax * (2 * T + |C| + 1))) + refine ⟨threshold, ?_, ?_⟩ + · have : K + 1 ≤ threshold := le_max_left _ _ + linarith + · intro S D N L k t u hlo hhi hk hD ht hu hN + dsimp only + have hx1 : 1 < |N| := + (le_trans (le_max_left _ _) (le_max_right _ _)).trans_lt hN + have hxK : K + 1 < |N| := (le_max_left _ _).trans_lt hN + have hNsq : K < N ^ 2 := by + have hprod : 0 < |N| * (|N| - 1) := + mul_pos (lt_trans zero_lt_one hx1) (sub_pos.mpr hx1) + nlinarith [sq_abs N] + have hNk : 0 < N ^ 2 + k := by linarith + have hS : 0 < S := hmin.trans_le hlo + have hP := pureNormal_ne_zero (D := D) (L := L) (t := t) hS hNk + refine ⟨hP, ?_⟩ + apply crossing_positive_of_projection_bound + have hdelta : |u - t| ≤ 2 * T := (abs_sub u t).trans (by linarith) + have hroot := curvature_sqrt_le hK hk hdelta + have hdom := quadratic_dominates_affine (a := 2 * T) (c := C) hmax + ((le_max_right _ _).trans_lt hN) + rw [sq_abs] at hdom + have hlower := uniform_mixed_projection_lower hmin hlo hhi hK hk hD ht hu hP + dsimp only [C] at hdom + linarith + +end GeneralCrossing + +end ClosedSurfaceR4.RadialMetricAlgebra + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReadJetBallBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReadJetBallBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..74617601344e4608b0d6dbc6b2fc9f6e8a062bc8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReadJetBallBounds.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AnchoredAtlasPhases +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseC2Stability + +namespace OAI + +/-! An explicit polynomial C2 radius preserves the anchored phase family. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates +lemma first_second_jet_difference_bound {F G : RField 4} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) {C : ℝ} (hC : 0 ≤ C) + (hb : WeightedBound univ 1 2 C (F-G)) (p : Base) : + ‖firstJetPair F p-firstJetPair G p‖ ≤ C ∧ + ‖secondJetTriple F p-secondJetTriple G p‖ ≤ C := by + have hp := norm_realTwoJet_le (hF.sub hG) hC hb p + change ‖realTwoJet (F-G) p‖ ≤ C at hp + rw [realTwoJet_sub hF hG] at hp + have hc (i : Fin 5) : ‖realTwoJet F p i-realTwoJet G p i‖ ≤ C := + (norm_le_pi_norm (realTwoJet F p-realTwoJet G p) i).trans hp + constructor + · change max ‖coordDeriv dx F p-coordDeriv dx G p‖ + ‖coordDeriv dy F p-coordDeriv dy G p‖ ≤ C + exact max_le (hc 0) (hc 1) + · apply (pi_norm_le_iff_of_nonneg hC).mpr + intro i + fin_cases i + · exact hc 2 + · exact hc 3 + · exact hc 4 +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem readJetBall_radius : ∃ D : ℝ, 1 ≤ D ∧ + ∀ z : ℝ, ∀ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 2 (z^4/D) (G-F) → A.ReadJetBall z F G := by + classical + choose E hE hread using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i 2 + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + let D : ℝ := 1+∑ i : A.centers, L*E i + have hD : 1 ≤ D := by + have hh := Finset.sum_nonneg (s := Finset.univ) (fun i _ => mul_nonneg hL (hE i)) + change 1 ≤ 1+∑ i : A.centers, L*E i + linarith + have hED (i : A.centers) : L*E i ≤ D := by + have hh := Finset.single_le_sum (s := Finset.univ) + (fun i _ => mul_nonneg hL (hE i)) (Finset.mem_univ i) + change L*E i ≤ 1+∑ i : A.centers, L*E i + linarith + refine ⟨D,hD,?_⟩ + intro z F G hF hG hb + have hD0 : 0 < D := zero_lt_one.trans_le hD + have hρ : 0 ≤ z^4/D := div_nonneg (by positivity : 0 ≤ z^4) hD0.le + refine ⟨hG,?_⟩ + intro i x _hx + have hr := (hread i (G-F) 1 (z^4/D) zero_lt_one le_rfl hρ (hG.sub hF) hb).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn + spaceCoordinates.toContinuousLinearMap + have heq : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G)-(spaceCoordinates ∘ A.vectorPlaneRead i F) := by + funext y + change spaceCoordinates (localize (i : M) (A.outer i) (G-F) + (planeCoordinateIsometry.symm y)) = _ + simp only [Function.comp_apply,Pi.sub_apply,vectorPlaneRead,vectorChartRead,localize] + by_cases hy : planeCoordinateIsometry.symm y ∈ (chart (i : M)).target + · simp only [indicator_of_mem hy,smul_sub,map_sub] + · simp only [indicator_of_notMem hy,map_zero,sub_self] + change WeightedEstimates.WeightedBound univ 1 2 (L*(E i*(z^4/D))) + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hr + rw [heq] at hr + have hsmall : L*(E i*(z^4/D)) ≤ z^4 := by + calc + _ = (L*E i)*(z^4/D) := by ring + _ ≤ D*(z^4/D) := mul_le_mul_of_nonneg_right (hED i) hρ + _ = z^4 := by field_simp + have hj := first_second_jet_difference_bound + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) + (by positivity : 0 ≤ z^4) (hr.mono_const hsmall) x + simpa only [norm_sub_rev] using hj + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..539cb94196d45561a993cc685a0a1c7b7fa6bc8d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetCoefficients.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialConnectionBounds +import OAI.Geometry.SurfaceImmersion.Correction.UniformRealModeCoefficients + +namespace OAI + +/-! Real formulas for the reconstruction coefficients at an actual real +surface jet; complexification preserves every coefficient exactly. -/ +noncomputable section +open scoped Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes + +def realTangentDualX (X Y : RVec 4) : RVec 4 := + ((Y ⬝ᵥ Y)/NormalFrame.gramDet X Y) • X+(-(X ⬝ᵥ Y)/NormalFrame.gramDet X Y) • Y + +def realTangentDualY (X Y : RVec 4) : RVec 4 := + (-(X ⬝ᵥ Y)/NormalFrame.gramDet X Y) • X+((X ⬝ᵥ X)/NormalFrame.gramDet X Y) • Y + +def realJetNormal (J : RealTwoJet) (i : Fin 5) := realNormalPart (J 0) (J 1) (J i) + +def realScalarCoefficients (J : RealTwoJet) : Fin 8 → ℝ := + ![realConnectionX (J 0) (J 1) (J 2),realConnectionY (J 0) (J 1) (J 2), + realConnectionX (J 0) (J 1) (J 3),realConnectionY (J 0) (J 1) (J 3), + realConnectionX (J 0) (J 1) (J 4),realConnectionY (J 0) (J 1) (J 4), + (realJetNormal J 2 ⬝ᵥ realJetNormal J 4)/(realJetNormal J 4 ⬝ᵥ realJetNormal J 4), + (realJetNormal J 3 ⬝ᵥ realJetNormal J 4)/(realJetNormal J 4 ⬝ᵥ realJetNormal J 4)] + +def realVectorCoefficients (J : RealTwoJet) : Fin 5 → RVec 4 := + ![realJetNormal J 2,realJetNormal J 3,realTangentDualX (J 0) (J 1), + realTangentDualY (J 0) (J 1), + (realJetNormal J 4 ⬝ᵥ realJetNormal J 4)⁻¹ • realJetNormal J 4] + +lemma scalarCoefficients_complexify (J : RealTwoJet) (i : Fin 8) : + LowJet.scalarCoefficients (complexifyJetCLM J) i = (realScalarCoefficients J i : ℂ) := by + change LowJet.scalarCoefficients (fun k => complexify (J k)) i = _ + fin_cases i <;> + simp [LowJet.scalarCoefficients,realScalarCoefficients,realConnectionX, + realConnectionY,liftX,liftY,complexify_dot,complexify_gram, + ← complexify_normalPart,realJetNormal] + +lemma vectorCoefficients_complexify (J : RealTwoJet) (i : Fin 5) (a : Fin 4) : + LowJet.vectorCoefficients (complexifyJetCLM J) i a = (realVectorCoefficients J i a : ℂ) := by + change LowJet.vectorCoefficients (fun k => complexify (J k)) i a = _ + fin_cases i <;> + simp [LowJet.vectorCoefficients,realVectorCoefficients, + realTangentDualX,realTangentDualY,tangentLift,liftX,liftY,complexify_dot,complexify_gram, + ← complexify_normalPart,realJetNormal] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetPrefixBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetPrefixBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..841a74772929ab7e3eb1ae5ef6872272488da241 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealJetPrefixBounds.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadPrefixBounds +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartStability + +namespace OAI + +/-! Two-jet bounds retain the two unscaled derivatives of a smoothed immersion. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates FiniteOrderSmoothing + +theorem realTwoJet_prefix_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hb : ∀ j ≤ m+2, WeightedBound univ 1 j (C/s^(j-2)) F) : + WeightedBound univ s m C (realTwoJet F) := by + have hfirst (v : Base) (hv : ‖v‖ = 1) (j : ℕ) (hj : j ≤ m+1) : + WeightedBound univ 1 j (C/s^(j-1)) (coordDeriv v F) := by + have hh := (hb (j+1) (by omega)).directional isOpen_univ zero_lt_one hF.contDiffOn v + change WeightedBound univ 1 j (C/s^(j-1)) (fun x => fderiv ℝ F x v) + have he : j+1-2 = j-1 := by omega + simpa only [hv,one_mul,div_one,he] using hh + have hfirst' (v : Base) (hv : ‖v‖ = 1) : + WeightedBound univ s m C (coordDeriv v F) := by + apply prefix_directional_bound hF hs hC _ v hv.le + intro j hj + apply (hb j (by omega)).mono_const + exact div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (by omega)) + have hsecond (v w : Base) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) : + WeightedBound univ s m C (coordDeriv v (coordDeriv w F)) := + prefix_directional_bound (contDiff_real_coordDeriv hF w) hs hC (hfirst w hw) v hv.le + have hx : ‖dx‖ = 1 := by simp [dx] + have hy : ‖dy‖ = 1 := by simp [dy] + change WeightedBound univ s m C (fun x i => realTwoJet F x i) + apply WeightedBound.pi uniqueDiffOn_univ hs hC + · intro i + fin_cases i <;> first + | exact (contDiff_real_coordDeriv hF _).contDiffOn + | exact (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF _) _).contDiffOn + · intro i + fin_cases i + · exact hfirst' dx hx + · exact hfirst' dy hy + · exact hsecond dx dx hx hx + · exact hsecond dx dy hx hy + · exact hsecond dy dy hy hy + +/-- Fixed smooth coordinates preserve the shifted two-derivative bound. +The constant is independent of the map and of the smoothing scale. -/ +theorem compact_realTwoJet_comp_prefix_bound {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (K : Compacts Base) {U : Set Base} (hU : IsOpen U) (hUK : U ⊆ K) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (F : RField 4), ContDiff ℝ ∞ F → ∀ s C : ℝ, + 0 < s → s ≤ 1 → 0 ≤ C → + (∀ j ≤ m+2, WeightedBound univ 1 j (C/s^(j-2)) F) → + WeightedBound U s m (D*C) (realTwoJet (F ∘ T)) := by + obtain ⟨B,hB,hb⟩ := compact_local_weighted_bound hU isOpen_univ K.isCompact hUK + (subset_univ _) hT.contDiffOn (m+2) + let D : ℝ := ((m+2).factorial : ℝ)*B^(m+2) + have hD : 1 ≤ D := one_le_mul_of_one_le_of_one_le + (by exact_mod_cast Nat.succ_le_of_lt (Nat.factorial_pos (m+2))) (one_le_pow₀ hB) + refine ⟨D,hD,?_⟩ + intro F hF s C hs hs1 hC hp + have hcomp (j : ℕ) (hj : j ≤ m+2) : + WeightedBound U 1 j (D*C/s^(j-2)) (F ∘ T) := by + have hc (k : ℕ) (_ : 1 ≤ k) (hk : k ≤ j) (x : Base) (hx : x ∈ U) : + ‖iteratedFDerivWithin ℝ k T U x‖ ≤ B := by + simpa only [one_pow,one_mul] using hb 1 zero_le_one le_rfl k (hk.trans hj) x hx + have hh := (hp j hj).comp_coordinates hU.uniqueDiffOn uniqueDiffOn_univ + zero_lt_one le_rfl hB (div_nonneg hC (pow_nonneg hs.le _)) + hT.contDiffOn hF.contDiffOn (mapsTo_univ _ _) hc + apply hh.mono_const + calc + (j.factorial : ℝ)*(C/s^(j-2))*B^j = ((j.factorial : ℝ)*B^j)*C/s^(j-2) := by ring + _ ≤ D*C/s^(j-2) := by + apply div_le_div_of_nonneg_right _ (pow_nonneg hs.le _) + apply mul_le_mul_of_nonneg_right _ hC + dsimp [D] + gcongr + have hfirst (v : Base) (hv : ‖v‖ = 1) (j : ℕ) (hj : j ≤ m+1) : + WeightedBound U 1 j (D*C/s^(j-1)) (coordDeriv v (F ∘ T)) := by + have hh := (hcomp (j+1) (by omega)).directional hU zero_lt_one (hF.comp hT).contDiffOn v + change WeightedBound U 1 j (D*C/s^(j-1)) (fun x => fderiv ℝ (F ∘ T) x v) + have he : j+1-2 = j-1 := by omega + simpa only [hv,one_mul,div_one,he] using hh + have hC' : 0 ≤ D*C := mul_nonneg (zero_le_one.trans hD) hC + have hd (f : RField 4) (hf : ContDiff ℝ ∞ f) + (hf' : ∀ j ≤ m+1, WeightedBound U 1 j (D*C/s^(j-1)) f) + (v : Base) (hv : ‖v‖ = 1) : WeightedBound U s m (D*C) (coordDeriv v f) := by + intro j hj x hx + have hh := ((hf' (j+1) (by omega)).directional hU zero_lt_one hf.contDiffOn v) + j le_rfl x hx + simp only [one_pow,one_mul,div_one,hv,Nat.add_sub_cancel] at hh + calc + _ ≤ s^j*(D*C/s^j) := mul_le_mul_of_nonneg_left hh (pow_nonneg hs.le _) + _ = D*C := by field_simp + have hf (v : Base) (hv : ‖v‖ = 1) : + WeightedBound U s m (D*C) (coordDeriv v (F ∘ T)) := by + apply hd (F ∘ T) (hF.comp hT) _ v hv + intro j hj + apply (hcomp j (by omega)).mono_const + exact div_le_div_of_nonneg_left hC' (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (by omega)) + have hdd (v w : Base) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) : + WeightedBound U s m (D*C) (coordDeriv v (coordDeriv w (F ∘ T))) := + hd _ (contDiff_real_coordDeriv (hF.comp hT) w) (hfirst w hw) v hv + have hx : ‖dx‖ = 1 := by simp [dx] + have hy : ‖dy‖ = 1 := by simp [dy] + change WeightedBound U s m (D*C) (fun x i => realTwoJet (F ∘ T) x i) + apply WeightedBound.pi hU.uniqueDiffOn hs hC' + · intro i + fin_cases i <;> first + | exact (contDiff_real_coordDeriv (hF.comp hT) _).contDiffOn + | exact (contDiff_real_coordDeriv (contDiff_real_coordDeriv (hF.comp hT) _) _).contDiffOn + · intro i + fin_cases i + · exact hf dx hx + · exact hf dy hy + · exact hdd dx dx hx hx + · exact hdd dx dy hx hy + · exact hdd dy dy hy hy + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealMetricDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealMetricDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bc6a281e58f50bc9a7bdb6034eb09e9776ca668 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealMetricDerivatives.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.Immersion.ClosedSurface.SecondForms +import OAI.Geometry.Immersion.ClosedSurface.ForcedModes + +namespace OAI + +/-! Coordinate metric derivatives needed for the intrinsic Gauss expression. +The third derivatives cancel before any estimate is made. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes + +lemma real_partial_dot {n : ℕ} {F G : RField n} {p : Base} + (hF : DifferentiableAt ℝ F p) (hG : DifferentiableAt ℝ G p) (v : Base) : + coordDeriv v (fun q => F q ⬝ᵥ G q) p = + coordDeriv v F p ⬝ᵥ G p+F p ⬝ᵥ coordDeriv v G p := by + have hf (i : Fin n) := ((ContinuousLinearMap.proj i : RVec n →L[ℝ] ℝ).hasFDerivAt.comp p + hF.hasFDerivAt) + have hg (i : Fin n) := ((ContinuousLinearMap.proj i : RVec n →L[ℝ] ℝ).hasFDerivAt.comp p + hG.hasFDerivAt) + have hs := (HasFDerivAt.fun_sum fun i (_ : i ∈ Finset.univ) => (hf i).fun_mul (hg i)).fderiv + simp only [Function.comp_def,ContinuousLinearMap.proj_apply] at hs + unfold coordDeriv dotProduct + rw [hs] + simp only [sum_apply,add_apply,smul_apply,ContinuousLinearMap.comp_apply, + ContinuousLinearMap.proj_apply,smul_eq_mul,← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i hi + ring + +lemma real_dot_smooth {n : ℕ} {F G : RField n} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + ContDiff ℝ ∞ (fun q => F q ⬝ᵥ G q) := + ContDiff.sum (fun i _ => (contDiff_pi.mp hF i).mul (contDiff_pi.mp hG i)) + +lemma realMetric_partial {F : RField 4} (hF : ContDiff ℝ ∞ F) (p d v w : Base) : + coordDeriv d (realMetric F v w) p = + coordDeriv d (coordDeriv v F) p ⬝ᵥ coordDeriv w F p+ + coordDeriv v F p ⬝ᵥ coordDeriv d (coordDeriv w F) p := + real_partial_dot ((contDiff_real_coordDeriv hF v).differentiable (by simp) p) + ((contDiff_real_coordDeriv hF w).differentiable (by simp) p) d + +lemma realMetric_second_partial {F : RField 4} (hF : ContDiff ℝ ∞ F) (p d e v w : Base) : + coordDeriv d (coordDeriv e (realMetric F v w)) p = + coordDeriv d (coordDeriv e (coordDeriv v F)) p ⬝ᵥ coordDeriv w F p+ + coordDeriv e (coordDeriv v F) p ⬝ᵥ coordDeriv d (coordDeriv w F) p+ + (coordDeriv d (coordDeriv v F) p ⬝ᵥ coordDeriv e (coordDeriv w F) p+ + coordDeriv v F p ⬝ᵥ coordDeriv d (coordDeriv e (coordDeriv w F)) p) := by + have hv := contDiff_real_coordDeriv hF v + have hw := contDiff_real_coordDeriv hF w + have hev := contDiff_real_coordDeriv hv e + have hew := contDiff_real_coordDeriv hw e + have he : coordDeriv e (realMetric F v w) = fun q => + coordDeriv e (coordDeriv v F) q ⬝ᵥ coordDeriv w F q+ + coordDeriv v F q ⬝ᵥ coordDeriv e (coordDeriv w F) q := + funext fun q => realMetric_partial hF q e v w + rw [he,partial_add ((real_dot_smooth hev hw).differentiable (by simp) p) + ((real_dot_smooth hv hew).differentiable (by simp) p), + real_partial_dot (hev.differentiable (by simp) p) (hw.differentiable (by simp) p), + real_partial_dot (hv.differentiable (by simp) p) (hew.differentiable (by simp) p)] + +/-- The raw second-derivative Gauss expression only uses second metric jets. -/ +theorem raw_gauss_metric_identity {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) : + coordDeriv dx (coordDeriv dx F) p ⬝ᵥ coordDeriv dy (coordDeriv dy F) p- + coordDeriv dx (coordDeriv dy F) p ⬝ᵥ coordDeriv dx (coordDeriv dy F) p = + (2*coordDeriv dx (coordDeriv dy (realMetric F dx dy)) p- + coordDeriv dy (coordDeriv dy (realMetric F dx dx)) p- + coordDeriv dx (coordDeriv dx (realMetric F dy dy)) p)/2 := by + have hcomm : coordDeriv dy (coordDeriv dx F) = coordDeriv dx (coordDeriv dy F) := + funext fun q => real_second_coordDeriv_comm hF q dy dx + have hthird : coordDeriv dy (coordDeriv dx (coordDeriv dy F)) = + coordDeriv dx (coordDeriv dy (coordDeriv dy F)) := + funext fun q => real_second_coordDeriv_comm (contDiff_real_coordDeriv hF dy) q dy dx + simp only [realMetric_second_partial hF,hcomm,hthird] + rw [dotProduct_comm (coordDeriv dx (coordDeriv dx (coordDeriv dy F)) p), + dotProduct_comm (coordDeriv dx (coordDeriv dy (coordDeriv dy F)) p)] + ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealNormalProjectionBridge.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealNormalProjectionBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe3d2a3f09431f42427cc2b47d0f5f0e9aa3367a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealNormalProjectionBridge.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalJets +import OAI.Geometry.Immersion.ClosedSurface.SecondForms +import OAI.Geometry.Immersion.ClosedSurface.ChartModel + +namespace OAI + +/-! The coordinate normal projection is the Euclidean orthogonal projection +onto the complement of the actual tangent image. -/ +noncomputable section +open Set +open scoped Matrix +namespace ClosedSurfaceR4 +open RealModes SmallModes + +lemma realNormalPart_starProjection (L : SmallModes.Base →L[ℝ] Space) (W : Space) + (hD : NormalFrame.gramDet (spaceCoordinates (L dx)) (spaceCoordinates (L dy)) ≠ 0) : + realNormalPart (spaceCoordinates (L dx)) (spaceCoordinates (L dy)) (spaceCoordinates W) = + spaceCoordinates ((LinearMap.range L.toLinearMap)ᗮ.starProjection W) := by + let X := spaceCoordinates (L dx) + let Y := spaceCoordinates (L dy) + let Z := spaceCoordinates W + let a := ((Y ⬝ᵥ Y)*(X ⬝ᵥ Z)-(X ⬝ᵥ Y)*(Y ⬝ᵥ Z))/NormalFrame.gramDet X Y + let b := ((X ⬝ᵥ X)*(Y ⬝ᵥ Z)-(X ⬝ᵥ Y)*(X ⬝ᵥ Z))/NormalFrame.gramDet X Y + let V := W-a • L dx-b • L dy + have hV : spaceCoordinates V = realNormalPart X Y Z := by + simp only [V,map_sub,map_smul,realNormalPart] + rfl + have hperp := realNormalPart_perp X Y Z hD + have hinnerx : inner ℝ (L dx) V = 0 := by + rw [← spaceCoordinates_dot,hV] + exact hperp.1 + have hinnery : inner ℝ (L dy) V = 0 := by + rw [← spaceCoordinates_dot,hV] + exact hperp.2 + have hm : V ∈ (LinearMap.range L.toLinearMap)ᗮ := by + rw [Submodule.mem_orthogonal] + rintro _ ⟨v,rfl⟩ + change inner ℝ (L v) V = 0 + rw [base_eq_basis v,map_add,map_smul,map_smul,inner_add_left, + real_inner_smul_left,real_inner_smul_left,hinnerx,hinnery] + ring + have ht : W-V ∈ LinearMap.range L.toLinearMap := by + refine ⟨a • dx+b • dy,?_⟩ + change L (a • dx+b • dy) = W-V + simp only [map_add,map_smul,V] + module + have hp : W-V ∈ ((LinearMap.range L.toLinearMap)ᗮ)ᗮ := + (LinearMap.range L.toLinearMap).le_orthogonal_orthogonal ht + have he := Submodule.eq_starProjection_of_mem_orthogonal hm hp + exact hV.symm.trans (congrArg spaceCoordinates he.symm) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealQuadraticVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealQuadraticVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d197e13c11251ccce796c29fda694f36c78fbfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealQuadraticVariation.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexQuadraticVariation +import OAI.Geometry.SurfaceImmersion.Correction.ConjugatedPolynomialOperator + +namespace OAI + +/-! The real quadratic variation is the sum of its zero and double phases. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +def realDirectionJets (J : DirectionJets) : DirectionJets := fun w a p => (J w a p).re + +lemma starDirectionJets_star (J : DirectionJets) : + starDirectionJets (starDirectionJets J) = J := by + funext w a p + exact star_star _ + +lemma realDirectionJets_eq (J : DirectionJets) : + realDirectionJets J = (1 / 2 : ℂ) • (J + starDirectionJets J) := by + funext w a p + apply Complex.ext <;> simp [realDirectionJets, starDirectionJets] + ring + +lemma quadraticComplex_real_jets (e : Expression) (G : Base → Space) + (J : DirectionJets) (z : Base × ℝ) : + quadraticComplex e G (realDirectionJets J) (realDirectionJets J) z = + (((quadraticComplex e G J J z).re + + (quadraticComplex e G J (starDirectionJets J) z).re) / 2 : ℝ) := by + rw [realDirectionJets_eq, quadraticComplex_smul_left, quadraticComplex_smul_right, + quadraticComplex_add_left, quadraticComplex_add_right, quadraticComplex_add_right, + quadraticComplex_star] + have hcross := quadraticComplex_star e G J (starDirectionJets J) z + rw [starDirectionJets_star] at hcross + rw [hcross] + apply Complex.ext <;> simp + ring + +lemma evalComplex_real_jets (e : MixedExpression) (F : Fin 4 → Base → Space) (z : Base × ℝ) : + e.evalComplex (F 0) (fun i w a p => (jet (F i) w a p : ℂ)) z = (e.eval F z : ℂ) := by + induction e with + | coeff c => rfl + | atom i w a e ih => simp only [evalComplex, eval, ih, Complex.ofReal_mul] + | add e f ihe ihf => simp only [evalComplex, eval, ihe, ihf, Complex.ofReal_add] + +lemma jet_zero (w : List (Fin 2)) (a : Fin 4) (p : Base) : + jet (0 : Base → Space) w a p = 0 := by + exact congrFun (iteratedDirectional_zero (w.map coordinateVector)) p + +lemma quadraticComplex_real_fields (e : Expression) (G H K : Base → Space) (z : Base × ℝ) : + quadraticComplex e G (fun w a p => (jet H w a p : ℂ)) (fun w a p => (jet K w a p : ℂ)) z = + ((e.variations 1).eval ![G, H, K, 0] z : ℂ) := by + have he : pairJetData G (fun w a p => (jet H w a p : ℂ)) (fun w a p => (jet K w a p : ℂ)) = + fun i w a p => (jet (![G, H, K, 0] i) w a p : ℂ) := by + funext i w a p + fin_cases i <;> simp [pairJetData, jet_zero] + change (e.variations 1).evalComplex G _ z = _ + rw [he] + exact evalComplex_real_jets (e.variations 1) ![G, H, K, 0] z + +/-- The factor `1/4` includes the Taylor coefficient `1/2` and the real-mode +splitting. The two terms will become the double and zero phases. -/ +theorem half_second_variation_real (e : Expression) (G : Base → Space) + {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (z : Base × ℝ) : + (1 / 2 : ℝ) * (e.variations 1).eval ![G, realField H, realField H, 0] z = + ((quadraticComplex e G (complexJet H) (complexJet H) z).re + + (quadraticComplex e G (complexJet H) (starDirectionJets (complexJet H)) z).re) / 4 := by + have he : (fun w a p => (jet (realField H) w a p : ℂ)) = realDirectionJets (complexJet H) := by + funext w a p + exact congrArg Complex.ofReal (complexJet_re hH w a p).symm + have hh := quadraticComplex_real_jets e G (complexJet H) z + rw [← he, quadraticComplex_real_fields] at hh + have hr := congrArg Complex.re hh + simp only [Complex.ofReal_re] at hr + linarith + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealRestoredMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealRestoredMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cf7e86d418062bb1e8cf43112e862e43d0bb475 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealRestoredMetric.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RestoredMetricTensor + +namespace OAI + +/-! Real-coordinate version of the supported metric restoration identity. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +local instance realRestoredMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance realRestoredMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance realRestoredMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance realRestoredMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance realRestoredMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance realRestoredMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma real_restored_metric (i : A.centers) (f : SmallModes.Base → RealModes.RVec 4) + (hf : ContDiff ℝ ∞ f) + (hsp : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun y => + fiberFromThree (RealModes.realMetricTensor f (planeCoordinateIsometry y))) := by + have hrest := A.restored_metric_tensor i (spaceCoordinates.symm ∘ f) + (spaceCoordinates.symm.contDiff.comp hf) + ((tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) f).trans hsp) + have he : restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ f) ∘ planeCoordinateIsometry) = + spaceCoordinates.symm ∘ restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source <;> + simp [restore,hp,Function.comp_apply,map_smul] + have hcoord : spaceCoordinates ∘ (spaceCoordinates.symm ∘ f) = f := by + funext x + exact spaceCoordinates.apply_symm_apply _ + rw [he,hcoord] at hrest + exact hrest + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealizeTransverseHomotopy.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealizeTransverseHomotopy.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab7a67d67489e1ebf092133106943e836749a075 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RealizeTransverseHomotopy.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SupportedExactCollar +import OAI.Geometry.SurfaceImmersion.Correction.PrescribedTransverseModel + +namespace OAI + +/-! Realization of a transverse-vector homotopy by an actual supported +smooth surface change, retaining the whole original singular set. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem realize_transverse_homotopy {f : Base → W} {V : ℝ × ℝ → W} + (hf : ContDiff ℝ ∞ f) (hV : ContDiff ℝ ∞ V) + (hV0 : ∀ t, V (0,t) = axisTransverse f t) + {a b : ℝ} (hab : a ≤ b) + (hI : ∀ s ∈ Icc (0:ℝ) 1, ∀ t ∈ Icc a b, + Function.Injective (homotopyCollarJet (axisValue f) V s t 0 0)) + (hstation : ∀ t ∉ Ioo a b, ∀ s ∈ Icc (0:ℝ) 1, + V (s,t) = axisTransverse f t) + {U : Set Base} (hU : IsOpen U) + (haxis : ∀ t ∈ Icc a b, crosscapAxis t ∈ U) : + ∃ (F : Base → W) (K : Set Base), ContDiff ℝ ∞ F ∧ IsCompact K ∧ K ⊆ U ∧ + (∀ x, Function.Injective (fderiv ℝ F x) ↔ Function.Injective (fderiv ℝ f x)) ∧ + (∀ x ∉ K, F =ᶠ[𝓝 x] f) ∧ + (∀ t, F =ᶠ[𝓝 (crosscapAxis t)] prescribedTransverseModel f (fun t => V (1,t))) ∧ + ∀ t, F (crosscapAxis t) = f (crosscapAxis t) ∧ + fderiv ℝ F (crosscapAxis t) = fderiv ℝ f (crosscapAxis t) + + (ContinuousLinearMap.proj 0).smulRight (V (1,t)-axisTransverse f t) := by + let b' : ℝ → W := fun t => V (1,t) + have hb' : ContDiff ℝ ∞ b' := hV.comp (contDiff_const.prodMk contDiff_id) + let g := prescribedTransverseModel f b' + have hg : ContDiff ℝ ∞ g := prescribedTransverseModel_smooth hf hb' + have hgc : ∀ t, f (crosscapAxis t) = g (crosscapAxis t) := fun t => + (prescribedTransverseModel_axis f b' t).symm + have hgb : ∀ t, V (1,t) = axisTransverse g t := fun t => + (prescribedTransverseModel_transverse hf hb' t).symm + have hgs : ∀ x : Base, x 1 ∉ Ioo a b → g x = f x ∧ + ∀ s ∈ Icc (0:ℝ) 1, V (s,x 1) = axisTransverse f (x 1) := by + intro x hx + exact ⟨prescribedTransverseModel_eq (hstation (x 1) hx 1 ⟨zero_le_one,le_rfl⟩), + hstation (x 1) hx⟩ + obtain ⟨F,K,hF,hK,hKU,hreg,hout,hinner⟩ := + supported_exact_collar hf hg hV hgc hV0 hgb hab hI hgs hU haxis + refine ⟨F,K,hF,hK,hKU,hreg,hout,hinner,?_⟩ + intro t + constructor + · exact (hinner t).self_of_nhds.trans (prescribedTransverseModel_axis f b' t) + · rw [(hinner t).fderiv_eq] + exact prescribedTransverseModel_first_jet hf hb' t + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..db83076e11189354f7763396c8010aa4ec35324b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeMargin.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ReferenceCoordinateData +import OAI.Geometry.SurfaceImmersion.Primitive.BoundedPrimitiveAmplitude + +namespace OAI + +/-! One fixed parameter derivative bound for all active reference charts. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance amplitudeMarginFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance amplitudeMarginFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem amplitude_parameter_margin : ∃ eps R : ℝ, 0 < eps ∧ 1 ≤ R ∧ + ∀ i p, p ∈ tsupport (d.B.weight i) → ∀ a : d.B.centers × Fin 3, + p ∈ tsupport (d.B.weight a.1) → ∀ z : PrimitiveAmplitudeData (d.B.centers × Fin 3), + ‖z-d.coordinateReference i p‖ < eps → + (primitiveDataOperator z.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient a z ∧ + |primitiveParameterAmplitude a z| ≤ R ∧ + ‖fderiv ℝ (primitiveParameterAmplitude a) z‖ ≤ R := by + classical + obtain ⟨D,hD,hbound⟩ := d.coordinateReference_bound + obtain ⟨k,hk,hlower⟩ := d.coefficient_lower + choose eps R heps hR hnear using fun a : d.B.centers × Fin 3 => + bounded_primitive_amplitude_C1 a D hk + obtain ⟨eta,heta,hle⟩ := finite_positive_lower heps + let Q : ℝ := 1+∑ a, R a + have hsum := Finset.sum_nonneg (s := Finset.univ) (fun a _ => zero_le_one.trans (hR a)) + refine ⟨eta,Q,heta,by dsimp only [Q]; linarith,?_⟩ + intro i p hp a ha z hz + have hcoeff : k ≤ (d.coordinateReference i p).1.1.1 a (d.coordinateReference i p).2 := by + rw [d.coordinateReference_coefficient i a hp ha] + exact hlower a p ha + obtain ⟨hi,hpos,_,_,hv,hd⟩ := hnear a (d.coordinateReference i p) (hbound i p hp) + (d.coordinateReference_identity i hp) hcoeff z (hz.trans_le (hle a)) + have hRQ : R a ≤ Q := by + have hh := Finset.single_le_sum (fun b _ => zero_le_one.trans (hR b)) (Finset.mem_univ a) + dsimp only [Q]; linarith + exact ⟨hi,hpos,hv.trans hRQ,hd.trans hRQ⟩ + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeParameterBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeParameterBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bfb61dcad30442256600ebcbc0ac9fd3f4c77f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceAmplitudeParameterBounds.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceAmplitudeMargin +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateTolerance +import OAI.Geometry.SurfaceImmersion.Geometry.ReferencePerturbationStability + +namespace OAI + +/-! The actual independent circular data remain inside the fixed positive +amplitude neighborhood for every sufficiently close starting map. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance actualParamFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualParamFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance actualParamDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualParamDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualParamSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualParamSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem actual_amplitude_parameter_bound {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) : + ∃ pt wt mt R : ℝ, 0 < pt ∧ 0 < wt ∧ 0 < mt ∧ 1 ≤ R ∧ + ∀ (ell : d.B.centers → Fin 3 → SmallModes.Base) (psi : (d.B.centers × Fin 3) → M → ℝ), + (∀ i j, ‖ell i j-(d.P i).ξ j‖ < pt) → + (∀ a p, |psi a p-d.B.weight a.1 p| < wt) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mt (G-F) → + ∀ i p, p ∈ tsupport (d.B.weight i) → ∀ a : d.B.centers × Fin 3, + p ∈ tsupport (d.B.weight a.1) → + let z := d.B.primitiveCoordinateData d.basis psi (d.perturbedPhases ell) + (g.inner-inducedTensor (r • G)) i {b | p ∈ tsupport (d.B.weight b.1)} (chart (i : M) p) + (primitiveDataOperator z.1).IsInvertible ∧ 0 < primitiveParameterCoefficient a z ∧ + |primitiveParameterAmplitude a z| ≤ R ∧ + ‖fderiv ℝ (primitiveParameterAmplitude a) z‖ ≤ R := by + obtain ⟨eps,R,heps,hR,hmargin⟩ := d.amplitude_parameter_margin + obtain ⟨D,hD,hphase⟩ := d.B.circularPhase_frame_bound + obtain ⟨mt,hmt,hmetric⟩ := d.metric_frame_tolerance hF r href heps + have hDp : 0 < D+1 := by linarith + refine ⟨eps/(D+1),eps,mt,R,div_pos heps hDp,heps,hmt,hR,?_⟩ + intro ell psi hell hw G hG hnear i p hp a ha + apply hmargin i p hp a ha + apply d.B.primitiveCoordinateData_sub_lt d.basis psi (fun b => d.B.weight b.1) + (d.perturbedPhases ell) d.globalPhases (g.inner-inducedTensor (r • G)) gref.inner i + {b | p ∈ tsupport (d.B.weight b.1)} (d.B.weight_support i hp) heps (fun b => hw b p) + · intro b _hb + have hs := d.B.weight_support i hp + have he := (d.B.covectorFrame_mfderiv (d.B.circularPhase b.1 (ell b.1 b.2) (d.L b.1)) + (d.B.circularPhase_smooth _ _ _) i hs) + have he0 := (d.B.covectorFrame_mfderiv (d.B.circularPhase b.1 ((d.P b.1).ξ b.2) (d.L b.1)) + (d.B.circularPhase_smooth _ _ _) i hs) + change ‖d.B.phaseCovectorRead i (d.B.circularPhase b.1 (ell b.1 b.2) (d.L b.1)) (chart (i : M) p)- + d.B.phaseCovectorRead i (d.B.circularPhase b.1 ((d.P b.1).ξ b.2) (d.L b.1)) (chart (i : M) p)‖ < eps + simp only [SmoothingAtlas.phaseCovectorRead] + rw [← he,← he0] + have hb := hphase b.1 i p hp (ell b.1 b.2) ((d.P b.1).ξ b.2) (d.L b.1) + have ht := (lt_div_iff₀ hDp).mp (hell b.1 b.2) + have hn := norm_nonneg (ell b.1 b.2-(d.P b.1).ξ b.2) + exact hb.trans_lt (by nlinarith) + · have h := hmetric G hG hnear i p hp + rw [d.B.tensor_frame_read i gref.inner gref.symm hp] + exact h + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceBoundaryStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceBoundaryStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..489c7a569c8fa445661b1ef535559743a79baba8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceBoundaryStartingFamily.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceStartingFamily +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedBoundaryStartingFamily +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSphericalGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePreparedCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorMetric +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! Reference and finite-point starting immersions with the same scale, +including the actual finite boundary invariant. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem reference_circular_starting_family (g : SmoothMetric M) {I : M → Space} + (hI : ContMDiff planeModel spaceModel ∞ I) (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) + {η : ℝ} (hη : 0 < η) : + ∃ r D c : ℝ, 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + A.WeightedBound 1 2 D I ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • I)) ∧ + (∀ p v, inducedForm (r • I) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + ∀ (n : ℕ) (B : SmoothingAtlas M) (d : CircularFamilyGeometry B (Fin n)) + (ε : ℝ), 0 < ε → + ∃ (G : M → Space) (g₀ : SmoothMetric M) (normal : PreferredNormal (r • G)), + ContMDiff planeModel spaceModel ∞ G ∧ (∀ p, ‖G p‖ = 1) ∧ + IsSmoothIsometricImmersion M g₀ (r • G) ∧ + g₀.inner = inducedTensor (r • G) ∧ Nonempty (MetricGoodPhaseData g₀ (r • G)) ∧ + normal.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) ∧ + A.TensorWeightedBound 1 1 η g₀.inner ∧ + (∀ p v, g₀.inner p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) (r • G) normal := by + obtain ⟨r,D,c,hr,hr1,hD,hc,hIbound,hImetric,hIshort,hprep⟩ := + A.reference_small_metric_prepared_family g hI hunit hImm hη + refine ⟨r,D,r^2*c,hr,hr1,hD,mul_pos (sq_pos_of_pos hr) hc, + hIbound,hImetric,hIshort,?_⟩ + intro n B d ε hε + let E := (boundaryCrossingSet_finite d.curves univ d.pair_finite).toFinset + obtain ⟨a,G,normal,ha,hG,hu,hGI,hn,hclose,hbound,hlower,hmetric,hshort,hflat⟩ := hprep E ε hε + have hbase (p : M) (v : Base) (hv : v ≠ 0) := + spherical_initial_boundary_geometry hG hu hr hGI p hv + have hs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + let g₀ := A.immersionMetric hs hGI + have hF : IsSmoothIsometricImmersion M g₀ (r • G) := ⟨hs,fun _ _ _ => rfl⟩ + have hdata : Nonempty (MetricGoodPhaseData g₀ (r • G)) := + MetricGoodPhaseData.nonempty g₀ hs hGI (fun p => ⟨dy,dy, + (hbase p dy (by simp [dy])).2.1⟩) + have hscaled (p : M) (v : TangentSpace planeModel p) : + (r^2*c)*g.inner p v v ≤ g₀.inner p v v := by + change (r^2*c)*g.inner p v v ≤ inducedTensor (r • G) p v v + rw [inducedTensor_const_smul hG r] + change (r^2*c)*g.inner p v v ≤ r^2*inducedForm G p v v + calc + _ = r^2*(c*g.inner p v v) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (hlower p v) (sq_nonneg r) + refine ⟨G,g₀,normal,hG,hu,hF,rfl,hdata,hn,hclose,hbound,hscaled,hmetric,hshort,?_⟩ + refine ⟨?_,?_,?_,?_⟩ + · intro j p hp + exact ((d.curves j).spherical_second_positive hr hu hF hp).2.1 + · intro j p hp + rw [hn] + exact ((d.curves j).spherical_second_positive hr hu hF hp).2.2 + · intro j k _ p _ hp _ + rw [hn] + exact ((d.curves j).spherical_second_positive hr hu hF hp).1 + · intro j k _ p hp hj hk + apply (d.curves j).crossing_pos_of_coordinate_crossings (d.curves k) hF hj hk + have hsource : p ∈ (coordinateChart ((d.curves j).index : M)).source := by + rw [coordinateChart_source,← chart_source] + exact ((d.curves j).source hj).1 + have hpE : p ∈ E := by simpa only [E,Set.Finite.mem_toFinset] using hp + exact (A.prepared_point_crossings hG hu hr hGI (a ⟨p,hpE⟩) + (ha ⟨p,hpE⟩) (hflat ⟨p,hpE⟩).2.2 ((d.curves j).index : M) hsource).2.2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCoefficientLower.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCoefficientLower.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec350800f8953c14cc2a8df9989e6e1ed9a8b287 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCoefficientLower.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ReferenceCircularMargins +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFrameBounds +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds + +namespace OAI + +/-! A positive coefficient lower bound fixed on the full reference atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance lowerFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance lowerFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance lowerDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance lowerDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem coefficient_lower : ∃ k : ℝ, 0 < k ∧ + ∀ (a : d.B.centers × Fin 3) p, p ∈ tsupport (d.B.weight a.1) → + k ≤ d.B.primitiveCoefficientField d.basis a p (gref.inner p) := by + have hlocal (a : d.B.centers × Fin 3) : ∃ k : ℝ, 0 < k ∧ + ∀ y ∈ (d.B.chartWeightCompact a.1 : Set JetPolynomial.Base), + k ≤ d.chartCoefficient a.1 a.2 y (d.chartReference a.1 y) := by + apply (d.B.chartWeightCompact a.1).isCompact.exists_forall_le' + · exact (d.chartCoefficient_smoothOn a.1 a.2).continuousOn.clm_apply + (d.chartReference_smooth a.1).continuous.continuousOn + · exact fun y hy => d.chartCoefficient_positive a.1 a.2 hy + choose k hk hb using hlocal + obtain ⟨K,hK,hle⟩ := finite_positive_lower hk + refine ⟨K,hK,?_⟩ + intro a p hp + have h := hb a (chart (a.1 : M) p) ⟨p,hp,rfl⟩ + change k a ≤ (d.basis a.1 (chart (a.1 : M) p)).Q a.2 + (fiberToThree (fiberFromThree (d.B.tensorChartRead a.1 gref.inner (chart (a.1 : M) p)))) at h + rw [fiberToThree_fromThree,d.B.tensorChartRead_on_weight a.1 gref.inner hp] at h + exact (hle a).trans h + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCorrectedFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCorrectedFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d0f9fad7d2be28237c5c7aafe640cb24063d908 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceCorrectedFamily.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferencePerturbationStability +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPrimitiveFamily + +namespace OAI + +/-! Actual positive smooth primitive decompositions of every nearby +remainder, using independently perturbed supported weights and phases. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance referenceFamilyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance referenceFamilyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance referenceFamilyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance referenceFamilyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance referenceFamilySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance referenceFamilySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem corrected_smooth_family {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) : + ∃ phaseTol weightTol mapTol : ℝ, 0 < phaseTol ∧ 0 < weightTol ∧ 0 < mapTol ∧ + ∀ (ell : d.B.centers → Fin 3 → SmallModes.Base) (psi : (d.B.centers × Fin 3) → M → ℝ), + (∀ i j, ‖ell i j-(d.P i).ξ j‖ < phaseTol) → + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) → + (∀ a p, 0 ≤ psi a p) → + (∀ a, tsupport (psi a) ⊆ tsupport (d.B.weight a.1)) → + (∀ a p, |psi a p-d.B.weight a.1 p| < weightTol) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mapTol (G-F) → + ∃ f : SmoothPrimitiveFamily (d.B.centers × Fin 3) (g.inner-inducedTensor (r • G)), + f.phase = d.perturbedPhases ell ∧ + f.amplitude = d.B.correctedPrimitiveAmplitude d.basis psi (d.perturbedPhases ell) + (g.inner-inducedTensor (r • G)) ∧ + (∀ a p, 0 ≤ f.amplitude a p) ∧ + (∀ a p, 0 < f.amplitude a p ↔ 0 < psi a p) ∧ + ∀ a, tsupport (f.amplitude a) ⊆ tsupport (psi a) := by + obtain ⟨pt,wt,mt,hpt,hwt,hmt,hstable⟩ := d.circular_operator_metric_stability hF r href + refine ⟨pt,wt,mt,hpt,hwt,hmt,?_⟩ + intro ell psi hell hpsi hnon hs hw G hG hnear + obtain ⟨hinv,hpos⟩ := hstable ell psi hell hs hw G hG hnear + let phi := d.perturbedPhases ell + let u := g.inner-inducedTensor (r • G) + have hphi (a : d.B.centers × Fin 3) : ContMDiff planeModel 𝓘(ℝ) ∞ (phi a) := + d.B.curvedAtlasPhase_smooth (d.B.centeredPhaseFamily ell d.L) + (fun _ _ => PhaseGeometry.centeredConvexPhase_smooth _ _ _) a + have hscaled : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) := + g.contMDiff.sub_section (A.inducedTensor_smooth hscaled) + have hsym : ∀ p v w, u p v w = u p w v := by + intro p v w + change g.inner p v w-inner ℝ (mfderiv planeModel spaceModel (r • G) p v) + (mfderiv planeModel spaceModel (r • G) p w) = + g.inner p w v-inner ℝ (mfderiv planeModel spaceModel (r • G) p w) + (mfderiv planeModel spaceModel (r • G) p v) + rw [g.symm,real_inner_comm] + have hp : ∀ a p, p ∈ tsupport (psi a) → + 0 < d.B.primitiveCoefficientField d.basis a p + (d.B.correctedPrimitiveTensor d.basis psi phi u p) := + fun a p hp => hpos a p (hs a hp) + let amp := d.B.correctedPrimitiveAmplitude d.basis psi phi u + let f : SmoothPrimitiveFamily (d.B.centers × Fin 3) u := { + amplitude := amp + phase := phi + smoothAmplitude := fun a => d.B.correctedPrimitiveAmplitude_smooth_of_data + d.basis psi phi hpsi hphi (fun a => (hs a).trans (d.B.weight_support a.1)) + (fun a p ha => d.basis_smooth a.1 (hs a ha) a.2) d.outer hinv u hu hp a + smoothPhase := hphi + sum_eq := d.B.correctedPrimitiveAmplitude_reconstruct d.basis psi phi hinv u hsym + (fun a p ha => (hp a p ha).le) } + refine ⟨f,rfl,rfl,?_,?_,?_⟩ + · intro a p + exact mul_nonneg (hnon a p) (Real.sqrt_nonneg _) + · exact d.B.correctedPrimitiveAmplitude_pos_iff d.basis psi phi u hp + · intro a + exact tsupport_mul_subset_left + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceMetricStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceMetricStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6043d1626116fc938c6135d1e36b4154f15be80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceMetricStability.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceOperatorStability +import OAI.Geometry.SurfaceImmersion.Atlas.InducedMetricReadTolerance + +namespace OAI + +/-! The actual remainder metric inherits the fixed positive inverse margins +from C1 approximation of the reference immersion. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance refMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance refMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance refMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance refMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensor_frame_read (i : B.centers) (u : ∀ p : M, CovariantTwoTensor p) + (hu : ∀ p v w, u p v w = u p w v) {p : M} (hp : p ∈ tsupport (B.weight i)) : + (B.tensorTriv i).continuousLinearMapAt ℝ p (u p) = + fiberFromThree (B.tensorChartRead i u (chart (i : M) p)) := by + rw [B.tensorChartRead_on_weight i u hp] + apply (fiberFromThree_toThree _ ?_).symm + intro v w + change B.bundleComponent B.tensorTriv i u p v w = B.bundleComponent B.tensorTriv i u p w v + rw [B.tensorComponent_apply i u (B.weight_support i hp), + B.tensorComponent_apply i u (B.weight_support i hp)] + exact hu p _ _ + +end SmoothingAtlas +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem metric_frame_tolerance {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) + {eta : ℝ} (heta : 0 < eta) : + ∃ eps : ℝ, 0 < eps ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → A.WeightedBound 1 1 eps (G-F) → + ∀ i p, p ∈ tsupport (d.B.weight i) → + ‖(d.B.tensorTriv i).continuousLinearMapAt ℝ p + ((g.inner-inducedTensor (r • G)) p)-d.chartReference i (chart (i : M) p)‖ < eta := by + obtain ⟨eps,heps,hnear⟩ := A.induced_metric_read_tolerance d.B hF r + (div_pos heta (show 0 < ‖fiberFromThree‖+1 by positivity)) + refine ⟨eps,heps,?_⟩ + intro G hG hb i p hp + have hsym : ∀ p v w, (g.inner-inducedTensor (r • G)) p v w = + (g.inner-inducedTensor (r • G)) p w v := by + intro p v w + change g.inner p v w-inner ℝ (mfderiv planeModel spaceModel (r • G) p v) + (mfderiv planeModel spaceModel (r • G) p w) = + g.inner p w v-inner ℝ (mfderiv planeModel spaceModel (r • G) p w) + (mfderiv planeModel spaceModel (r • G) p v) + rw [g.symm,real_inner_comm] + rw [d.B.tensor_frame_read i _ hsym hp] + change ‖fiberFromThree (d.B.tensorChartRead i (g.inner-inducedTensor (r • G)) (chart (i : M) p))- + fiberFromThree (d.B.tensorChartRead i gref.inner (chart (i : M) p))‖ < eta + rw [← map_sub] + have hread : d.B.tensorChartRead i (g.inner-inducedTensor (r • G)) (chart (i : M) p)- + d.B.tensorChartRead i gref.inner (chart (i : M) p) = + -d.B.tensorChartRead i (inducedTensor (r • G)-inducedTensor (r • F)) (chart (i : M) p) := by + rw [href] + simp only [d.B.tensorChartRead_on_weight i _ hp, SmoothingAtlas.bundleComponent, + Pi.sub_apply,map_sub] + abel + rw [hread,map_neg,norm_neg] + have h := (fiberFromThree.le_opNorm + (d.B.tensorChartRead i (inducedTensor (r • G)-inducedTensor (r • F)) (chart (i : M) p))) + have hn := hnear G hG hb i (chart (i : M) p) + have hmul : ‖fiberFromThree‖ * ‖d.B.tensorChartRead i + (inducedTensor (r • G)-inducedTensor (r • F)) (chart (i : M) p)‖ < eta := by + have he := (lt_div_iff₀ (show 0 < ‖fiberFromThree‖+1 by positivity)).mp hn + nlinarith [norm_nonneg (d.B.tensorChartRead i + (inducedTensor (r • G)-inducedTensor (r • F)) (chart (i : M) p))] + exact h.trans_lt hmul + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceOperatorStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceOperatorStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f1e5ec1a4fbf6e95894f3f6fe8e3bf9dec345ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceOperatorStability.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ReferenceCircularMargins +import OAI.Geometry.SurfaceImmersion.Geometry.TensorOperatorFrame +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds + +namespace OAI + +/-! Compact chart margins imply invertibility of the actual global tensor +operator and positivity of every active primitive coefficient. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance refOperatorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance refOperatorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance refOperatorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refOperatorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refOperatorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance refOperatorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + + theorem operator_stability : ∃ eps : ℝ, 0 < eps ∧ + ∀ (T : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) + (u : ∀ p : M, CovariantTwoTensor p), + (∀ i p, p ∈ tsupport (d.B.weight i) → + ‖d.B.tensorOperatorFrame i p (T p)-ContinuousLinearMap.id ℝ TensorFiber‖ < eps) → + (∀ i p, p ∈ tsupport (d.B.weight i) → + ‖(d.B.tensorTriv i).continuousLinearMapAt ℝ p (u p)- + d.chartReference i (chart (i : M) p)‖ < eps) → + (∀ p, (T p).IsInvertible) ∧ + ∀ (a : d.B.centers × Fin 3) p, p ∈ tsupport (d.B.weight a.1) → + 0 < d.B.primitiveCoefficientField d.basis a p ((T p).inverse (u p)) := by + choose e he hmargin using fun a : d.B.centers × Fin 3 => d.inverse_margin a.1 a.2 + obtain ⟨eps,heps,hle⟩ := finite_positive_lower he + refine ⟨eps,heps,?_⟩ + intro T u hT hu + have hlocal (a : d.B.centers × Fin 3) (p : M) (hp : p ∈ tsupport (d.B.weight a.1)) := + hmargin a (chart (a.1 : M) p) ⟨p,hp,rfl⟩ (d.B.tensorOperatorFrame a.1 p (T p)) + ((d.B.tensorTriv a.1).continuousLinearMapAt ℝ p (u p)) + ((hT a.1 p hp).trans_le (hle a)) ((hu a.1 p hp).trans_le (hle a)) + constructor + · intro p + obtain ⟨i,hi⟩ := d.B.exists_weight_ne_zero p + have hp := subset_tsupport _ hi + exact (d.B.tensorOperatorFrame_invertible_iff i (d.B.weight_support i hp) (T p)).mp + (hlocal (i,0) p hp).1 + · intro a p hp + rw [d.B.primitiveCoefficient_inverse_in_frame d.basis a.1 (d.B.weight_support a.1 hp) (T p) (u p) a.2] + exact (hlocal a p hp).2 + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferencePerturbationStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferencePerturbationStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..e71bc2852dd6dfae08757cb615fe9fe3331a74f1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferencePerturbationStability.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceMetricStability +import OAI.Geometry.SurfaceImmersion.Geometry.ActualOperatorTolerance +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseTolerance + +namespace OAI + +/-! Genuine independent circular phase and cutoff choices preserve the +fixed reference inverse margins for all sufficiently close starting maps. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +local instance perturbationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance perturbationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance perturbationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance perturbationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance perturbationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance perturbationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +def perturbedPhases (ell : d.B.centers → Fin 3 → Base) := + d.B.curvedAtlasPhase (d.B.centeredPhaseFamily ell d.L) + + theorem circular_operator_metric_stability {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) : + ∃ phaseTol weightTol mapTol : ℝ, 0 < phaseTol ∧ 0 < weightTol ∧ 0 < mapTol ∧ + ∀ (ell : d.B.centers → Fin 3 → Base) (psi : (d.B.centers × Fin 3) → M → ℝ), + (∀ i j, ‖ell i j-(d.P i).ξ j‖ < phaseTol) → + (∀ a, tsupport (psi a) ⊆ tsupport (d.B.weight a.1)) → + (∀ a p, |psi a p-d.B.weight a.1 p| < weightTol) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mapTol (G-F) → + (∀ p, (d.B.primitiveFullOperator d.basis psi (d.perturbedPhases ell) p).IsInvertible) ∧ + ∀ (a : d.B.centers × Fin 3) p, p ∈ tsupport (d.B.weight a.1) → + 0 < d.B.primitiveCoefficientField d.basis a p + ((d.B.primitiveFullOperator d.basis psi (d.perturbedPhases ell) p).inverse + ((g.inner-inducedTensor (r • G)) p)) := by + obtain ⟨eta,heta,hstable⟩ := d.operator_stability + obtain ⟨delta,hdelta,hoperator⟩ := d.B.primitive_operator_tolerance d.basis + (fun a _p hp => d.basis_smooth a.1 hp a.2) d.globalPhases + (fun a => d.B.curvedAtlasPhase_smooth d.localPhases + (fun _ _ => centeredConvexPhase_smooth _ _ _) a) heta + obtain ⟨D,hD,hphase⟩ := d.B.circularPhase_frame_bound + obtain ⟨mapTol,hmapTol,hmetric⟩ := d.metric_frame_tolerance hF r href heta + have hDpos : 0 < D+1 := by linarith + refine ⟨delta/(D+1),delta,mapTol,div_pos hdelta hDpos,hdelta,hmapTol,?_⟩ + intro ell psi hell hs hw G hG hGF + apply hstable _ _ + · intro i p hp + have hdiff : ∀ (j : d.B.centers) (a : d.B.centers × Fin 3) p, p ∈ tsupport (d.B.weight j) → + p ∈ tsupport (d.B.weight a.1) → + ‖d.B.covectorFrame j p (d.B.primitivePhaseCovector (d.perturbedPhases ell) a p)- + d.B.covectorFrame j p (d.B.primitivePhaseCovector d.globalPhases a p)‖ < delta := by + intro j a p hp _ha + change ‖d.B.covectorFrame j p + (mfderiv planeModel 𝓘(ℝ) (d.B.circularPhase a.1 (ell a.1 a.2) (d.L a.1)) p)- + d.B.covectorFrame j p + (mfderiv planeModel 𝓘(ℝ) (d.B.circularPhase a.1 ((d.P a.1).ξ a.2) (d.L a.1)) p)‖ < delta + have hbound := hphase a.1 j p hp (ell a.1 a.2) ((d.P a.1).ξ a.2) (d.L a.1) + have ht := (lt_div_iff₀ hDpos).mp (hell a.1 a.2) + have hn := norm_nonneg (ell a.1 a.2-(d.P a.1).ξ a.2) + exact hbound.trans_lt (by nlinarith) + have hh := hoperator psi (d.perturbedPhases ell) hs hw hdiff i p hp + have hid : d.B.tensorOperatorFrame i p + (d.B.primitiveFullOperator d.basis (fun a => d.B.weight a.1) d.globalPhases p) = + ContinuousLinearMap.id ℝ TensorFiber := by + rw [d.operator_identity] + apply ContinuousLinearMap.ext + intro H + change (d.B.tensorTriv i).continuousLinearMapAt ℝ p + ((d.B.tensorTriv i).symmL ℝ p H) = H + exact (d.B.tensorTriv i).continuousLinearMapAt_symmL + (d.B.tensorTriv_domain i (d.B.weight_support i hp)) H + rw [hid] at hh + exact hh + · exact hmetric G hG hGF + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e73431bcb79582c147542e5936320a2688a3634 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ReferenceStartingFamily.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FixedAtlasStartingFamily + +namespace OAI + +/-! Uniform finite-point spherical preparation on a prescribed atlas. +The same atlas can therefore be used for the circular boundary preparation. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem reference_small_metric_prepared_family (g : SmoothMetric M) {I : M → Space} + (hI : ContMDiff planeModel spaceModel ∞ I) (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) + {η : ℝ} (hη : 0 < η) : + ∃ r D c : ℝ, + 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + A.WeightedBound 1 2 D I ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • I)) ∧ + (∀ p v, inducedForm (r • I) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (a : P → A.centers) (G : M → Space) (n : PreferredNormal (r • G)), + (∀ p, A.weight (a p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) ∧ + n.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • G)) ∧ + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + ∀ p : P, G p = I p ∧ + fderiv ℝ (G ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) = + fderiv ℝ (I ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (a p : M)).symm) + (chartAt Plane (a p : M) p) v w = 0 := by + obtain ⟨D,c,hD,hc,hprep⟩ := A.uniform_prepared_spherical_immersion g hI hunit hImm + obtain ⟨D₀,hD₀,hIbound⟩ := A.exists_weighted_bound 2 hI + let E := D+D₀ + have hE : 0 ≤ E := add_nonneg hD hD₀ + have hIb : A.WeightedBound 1 2 E I := fun i => (hIbound i).mono_const (by dsimp [E]; linarith) + obtain ⟨r,hr,hr1,hsmall⟩ := A.uniform_small_scaled_metric g hE hη + have href := hsmall I hI hIb + refine ⟨r,E,c,hr,hr1,hE,hc,hIb,href.1,href.2,?_⟩ + intro P ε hε + obtain ⟨a,G,ha,hG,hu,hGI,hclose,hbound,hlower,hflat⟩ := hprep P ε hε + have hGb : A.WeightedBound 1 2 E G := fun i => (hbound i).mono_const (by dsimp [E]; linarith) + let n := (sphericalPreferredNormal hG hu).const_smul hG r + have hscaled : ∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p) := by + intro p v w h + have hd := const_smul_mfderiv ((hG p).mdifferentiableAt (by simp)) r + have he := congrArg (fun z : Space => r⁻¹ • z) h + rw [hd] at he + change r⁻¹ • (r • (mfderiv planeModel spaceModel G p v)) = + r⁻¹ • (r • (mfderiv planeModel spaceModel G p w)) at he + simp only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul] at he + exact hGI p he + exact ⟨a,G,n,ha,hG,hu,hscaled,rfl,hclose,hGb,hlower, + (hsmall G hG hGb).1,(hsmall G hG hGb).2,hflat⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurveGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurveGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ccde6af8d16ebdaea2c68e59853ff527b5a7871 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurveGerms.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCurve +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCurveCoordinates + +namespace OAI + +/-! Regularity under smooth reparameterization and actual curve germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma regular_curve_germ {γ δ : ℝ → M} {t : ℝ} + (hγ : ContMDiffAt 𝓘(ℝ) planeModel ∞ γ t) (he : δ =ᶠ[𝓝 t] γ) + (hi : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) : + Function.Injective (mfderiv 𝓘(ℝ) planeModel δ t) := by + have hD := ((hγ.mdifferentiableAt (by simp)).hasMFDerivAt.congr_of_eventuallyEq_abuse he).mfderiv + exact hD.symm ▸ hi + +lemma regular_curve_reparameterization {γ : ℝ → M} (e : ℝ ≃ₜ ℝ) + (hes : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) {t : ℝ} + (hγ : ContMDiffAt 𝓘(ℝ) planeModel ∞ γ (e t)) + (hi : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ (e t))) : + Function.Injective (mfderiv 𝓘(ℝ) planeModel (γ ∘ e) t) := by + have heD : e.toOpenPartialHomeomorph.MDifferentiable 𝓘(ℝ) 𝓘(ℝ) := + ⟨hes.contMDiff.mdifferentiable (by simp) |>.mdifferentiableOn, + hei.contMDiff.mdifferentiable (by simp) |>.mdifferentiableOn⟩ + rw [mfderiv_comp t (hγ.mdifferentiableAt (by simp)) (hes.contMDiff.mdifferentiable (by simp) t)] + exact hi.comp (heD.mfderiv_injective (mem_univ t)) + +variable [IsManifold planeModel ∞ M] + +lemma regular_curve_neighborhood {γ : ℝ → M} {U : Set ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) {t : ℝ} + (ht : t ∈ U) (hi : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) : + ∃ V : Set ℝ, IsOpen V ∧ t ∈ V ∧ V ⊆ U ∧ + ∀ s ∈ V, Function.Injective (mfderiv 𝓘(ℝ) planeModel γ s) := by + obtain ⟨c,V,hV,htV,hVU,hcs,hci,hcoord⟩ := surface_curve_coordinates hU hγ ht hi + have hdif : c.symm.MDifferentiable 𝓘(ℝ,JetPolynomial.Base) planeModel := + ⟨hci.mdifferentiableOn (by simp),hcs.mdifferentiableOn (by simp)⟩ + refine ⟨V,hV,htV,hVU,?_⟩ + intro s hs + have htarget : crosscapAxis s ∈ c.target := by + rw [crosscapAxis_apply,← (hcoord s hs).2] + exact c.map_source (hcoord s hs).1 + let δ : ℝ → M := c.symm ∘ crosscapAxis + have hk : ContMDiff 𝓘(ℝ) 𝓘(ℝ,JetPolynomial.Base) ∞ crosscapAxis := crosscapAxis.contDiff.contMDiff + have hδ : ContMDiffAt 𝓘(ℝ) planeModel ∞ δ s := + (hci.contMDiffAt (c.open_target.mem_nhds htarget)).comp s hk.contMDiffAt + have hδi : Function.Injective (mfderiv 𝓘(ℝ) planeModel δ s) := by + rw [mfderiv_comp s + ((hci.contMDiffAt (c.open_target.mem_nhds htarget)).mdifferentiableAt (by simp)) + (hk.mdifferentiable (by simp) s)] + exact (hdif.mfderiv_injective htarget).comp (crosscapAxis_regular s) + apply regular_curve_germ hδ _ hδi + filter_upwards [hV.mem_nhds hs] with r hr + change γ r = c.symm (crosscapAxis r) + rw [crosscapAxis_apply,← (hcoord r hr).2,c.left_inv (hcoord r hr).1] + +lemma curve_regular_locus_open {γ : ℝ → M} {U : Set ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) : + IsOpen {t | t ∈ U ∧ Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)} := by + apply isOpen_iff_mem_nhds.mpr + intro t ht + obtain ⟨V,hV,htV,hVU,hreg⟩ := regular_curve_neighborhood hU hγ ht.1 ht.2 + apply mem_of_superset (hV.mem_nhds htV) + exact fun s hs => ⟨hVU hs,hreg s hs⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurvePieces.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurvePieces.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f59201160d90cee4ccc21abae2316d70c43d8e8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularCurvePieces.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCurveCoordinates +import OAI.Geometry.SurfaceImmersion.Whitney.RegularArcPaths + +namespace OAI + +/-! A compact regular surface curve is a finite concatenation of actual +smooth embedded pieces. It need not itself be embedded. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma regular_curve_local_injective {γ : ℝ → M} {U : Set ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) + {t : ℝ} (ht : t ∈ U) + (hreg : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) : + ∃ V : Set ℝ, IsOpen V ∧ t ∈ V ∧ V ⊆ U ∧ V.InjOn γ := by + obtain ⟨c,V,hV,htV,hVU,_,_,hcoord⟩ := surface_curve_coordinates hU hγ ht hreg + refine ⟨V,hV,htV,hVU,?_⟩ + intro x hx y hy he + have hc : (![0,x] : Base) = ![0,y] := + (hcoord x hx).2.symm.trans ((congrArg c he).trans (hcoord y hy).2) + have h1 := congrFun hc 1 + simpa only [Matrix.cons_val_one,Matrix.cons_val_zero] using h1 + +theorem regular_curve_finite_pieces {γ : ℝ → M} {U : Set ℝ} {a b : ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) + (hreg : ∀ t ∈ U, Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) + (hab : a ≤ b) (hsub : Icc a b ⊆ U) : + ∃ (τ : ℕ → ℝ) (N : ℕ), τ 0 = a ∧ Monotone τ ∧ + (∀ n, a ≤ τ n ∧ τ n ≤ b) ∧ (∀ n ≥ N, τ n = b) ∧ + ∀ n, τ n < τ (n+1) → ∃ P : SmoothCompactArc planeModel M, + P.curve = γ ∧ P.start = τ n ∧ P.finish = τ (n+1) := by + have hl (t : Icc a b) := regular_curve_local_injective hU hγ + (hsub t.property) (hreg t (hsub t.property)) + choose V hV htV hVU hVi using hl + let C : Icc a b → Set (Icc a b) := fun t => Subtype.val ⁻¹' V t + have hC : ∀ t, IsOpen (C t) := fun t => (hV t).preimage continuous_subtype_val + have hcover : univ ⊆ ⋃ t, C t := by + intro t _ + exact mem_iUnion.mpr ⟨t,htV t⟩ + obtain ⟨τ,hzero,hmono,⟨N,hend⟩,hpieces⟩ := + exists_monotone_Icc_subset_open_cover_Icc hab hC hcover + refine ⟨fun n => (τ n).val,N,hzero,fun _ _ h => hmono h, + fun n => (τ n).property,hend,?_⟩ + intro n hn + obtain ⟨t,ht⟩ := hpieces n + have hinterval : Icc (τ n).val (τ (n+1)).val ⊆ V t := by + intro s hs + have hsab : s ∈ Icc a b := + ⟨(τ n).property.1.trans hs.1,hs.2.trans (τ (n+1)).property.2⟩ + exact ht (show (⟨s,hsab⟩ : Icc a b) ∈ Icc (τ n) (τ (n+1)) from hs) + let P : SmoothCompactArc planeModel M := + ⟨γ,τ n,τ (n+1),hn,V t,hV t,hinterval,hγ.mono (hVU t), + fun s hs => hreg s (hVU t hs),(hVi t).mono hinterval⟩ + exact ⟨P,rfl,rfl,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..af8107099ec30475e70f01c9e109adf59dc6e945 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairAvoidance.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularPairTranslation + +namespace OAI + +/-! A regular translation can simultaneously avoid an additional null set +of parameter values. This refines the proved local Sard selection. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem exists_regular_pair_translation_avoiding_null {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (U V : Set Base) (hU : IsOpen U) (hV : IsOpen V) + (A : Set (ProjectionTarget 3)) (hA : IsOpen A) (hAn : A.Nonempty) + (N : Set (ProjectionTarget 3)) (hN : volume N = 0) : + ∃ a ∈ A, a ∉ N ∧ ∀ x ∈ U, ∀ y ∈ V, f x-g y = a → + Function.Surjective (fderiv ℝ (fun z : Base × Base => f z.1-g z.2) (x,y)) := by + let h : Base × Base → ProjectionTarget 3 := fun z => f z.1-g z.2 + let B := h '' {z | z ∈ U ×ˢ V ∧ ¬ Function.Surjective (fderiv ℝ h z)} + have hh : ContDiff ℝ ∞ h := (hf.comp contDiff_fst).sub (hg.comp contDiff_snd) + have hB : volume B = 0 := pair_chart_local_critical_values_null (hU.prod hV) hh.contDiffOn + have hnull : volume (B ∪ N) = 0 := measure_union_null hB hN + have hae : ∀ᵐ a ∂volume, a ∉ B ∪ N := by + simp only [ae_iff,not_not] + exact hnull + obtain ⟨a,haA,ha⟩ := (Measure.dense_of_ae hae).inter_open_nonempty A hA hAn + refine ⟨a,haA,(fun h => ha (Or.inr h)),?_⟩ + intro x hx y hy he + by_contra hn + exact ha (Or.inl ⟨(x,y),⟨⟨hx,hy⟩,hn⟩,he⟩) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairCovectors.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairCovectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..d1a21573ca82e1d43c3242faa74066156225985c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairCovectors.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CovectorPullbackParameters + +namespace OAI + +/-! A regular pair of real functions on a surface has independent +coordinate covectors. This is the local form of transverse level curves. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma coordDet_ne_of_surjective (A : CurvePlane →L[ℝ] CurvePlane) + (hA : Function.Surjective A) : coordDet A ≠ 0 := by + obtain ⟨x,hx⟩ := hA dx + obtain ⟨y,hy⟩ := hA dy + let B : CurvePlane →L[ℝ] CurvePlane := + (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight x + (ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight y + have he : A.comp B = ContinuousLinearMap.id ℝ CurvePlane := by + apply ContinuousLinearMap.ext + intro v + change A (v.1 • x+v.2 • y) = v + rw [map_add,map_smul,map_smul,hx,hy] + exact (base_eq_basis v).symm + have hd := congrArg coordDet he + rw [coordDet_comp,coordDet_id] at hd + intro hz + rw [hz,zero_mul] at hd + exact zero_ne_one hd + +lemma regular_pair_covectors {f g : CurvePlane → ℝ} {x : CurvePlane} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) + (hreg : Function.Surjective (fderiv ℝ (fun y => (f y,g y)) x)) : + covectorDet (phaseDerivative f x) (phaseDerivative g x) ≠ 0 := by + have h := coordDet_ne_of_surjective _ hreg + have hd : fderiv ℝ (fun y => (f y,g y)) x = (fderiv ℝ f x).prod (fderiv ℝ g x) := + (hf.hasFDerivAt.prodMk hg.hasFDerivAt).fderiv + rw [hd] at h + convert h using 1 + dsimp [coordDet,covectorDet,phaseDerivative] + ring + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairTranslation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d36559a02f95779e271533cf528386a6e20d840 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularPairTranslation.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PairChartSard + +namespace OAI + +/-! Arbitrarily small translations make two smooth surface patches +transverse at every coincidence. This is the local perturbation used in +the finite global double-locus regularization. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem exists_regular_pair_translation {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (U V : Set Base) (hU : IsOpen U) (hV : IsOpen V) + (A : Set (ProjectionTarget 3)) (hA : IsOpen A) (hAn : A.Nonempty) : + ∃ a ∈ A, ∀ x ∈ U, ∀ y ∈ V, f x-g y = a → + Function.Surjective (fderiv ℝ (fun z : Base × Base => f z.1-g z.2) (x,y)) := by + let h : Base × Base → ProjectionTarget 3 := fun z => f z.1-g z.2 + let B := h '' {z | z ∈ U ×ˢ V ∧ ¬ Function.Surjective (fderiv ℝ h z)} + have hh : ContDiff ℝ ∞ h := (hf.comp contDiff_fst).sub (hg.comp contDiff_snd) + have hnull : volume B = 0 := pair_chart_local_critical_values_null (hU.prod hV) hh.contDiffOn + have hae : ∀ᵐ a ∂volume, a ∉ B := by + simp only [ae_iff,not_not] + exact hnull + obtain ⟨a,haA,ha⟩ := (Measure.dense_of_ae hae).inter_open_nonempty A hA hAn + refine ⟨a,haA,?_⟩ + intro x hx y hy he + by_contra hn + exact ha ⟨(x,y),⟨⟨hx,hy⟩,hn⟩,he⟩ + +theorem exists_small_transverse_translation {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (U V : Set Base) (hU : IsOpen U) (hV : IsOpen V) + {ε : ℝ} (hε : 0 < ε) : + ∃ a : ProjectionTarget 3, ‖a‖ < ε ∧ + ∀ x ∈ U, ∀ y ∈ V, f x+a = g y → + Function.Surjective (fderiv ℝ (fun z : Base × Base => f z.1-g z.2) (x,y)) := by + obtain ⟨a,ha,hreg⟩ := exists_regular_pair_translation hf hg U V hU hV + (Metric.ball 0 ε) Metric.isOpen_ball ⟨0,Metric.mem_ball_self hε⟩ + refine ⟨-a,?_,?_⟩ + · simpa only [Metric.mem_ball,dist_zero_right,norm_neg] using ha + · intro x hx y hy he + apply hreg x hx y hy + apply sub_eq_iff_eq_add.mpr + calc + f x = (f x + -a) + a := by abel + _ = g y + a := by rw [he] + _ = a + g y := add_comm _ _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularProjectionParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularProjectionParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ea0fd6d10970d2a34ec2f8a04cd0b48e872f2f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularProjectionParameter.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericProjectionParameter +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateSardThree + +namespace OAI + +/-! Regular graph-projection parameters in dimension three. Unlike the +higher-dimensional avoidance result, this gives finite exceptional +directions on compact coordinate sets. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem exists_regular_projection_parameter {ι : Type*} [Countable ι] + (H : ι → Base → Base →L[ℝ] ProjectionTarget 3 × ℝ) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) + (U : Set (ProjectionTarget 3)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ a ∈ U, ∀ i b z, z ∈ tangentSlopeDomain (H i) b → + tangentSlope (H i) b z = a → + Function.Surjective (fderiv ℝ (tangentSlope (H i) b) z) := by + let bad : Set (ProjectionTarget 3) := ⋃ i, ⋃ b : Bool, + tangentSlope (H i) b '' {z | z ∈ tangentSlopeDomain (H i) b ∧ + ¬ Function.Surjective (fderiv ℝ (tangentSlope (H i) b) z)} + have hbad : volume bad = 0 := measure_iUnion_null (fun i => + measure_iUnion_null (fun b => PublishedInputs.smooth_coordinate_critical_values_null + _ _ (tangentSlopeDomain_open (hH i) b) (tangentSlope_smoothOn (hH i) b))) + have hae : ∀ᵐ a ∂volume, a ∉ bad := by + simp only [ae_iff,not_not] + change volume bad = 0 + exact hbad + obtain ⟨a,haU,ha⟩ := (Measure.dense_of_ae hae).inter_open_nonempty U hU hne + refine ⟨a,haU,?_⟩ + intro i b z hz he + by_contra hn + apply ha + exact mem_iUnion.mpr ⟨i,mem_iUnion.mpr ⟨b,⟨z,⟨hz,hn⟩,he⟩⟩⟩ + +def compactProjectionDirections (a : ProjectionTarget 3) + (H : Base → Base →L[ℝ] ProjectionTarget 3 × ℝ) (K : Set Base) (b : Bool) : + Set (Base × ℝ) := + (K ×ˢ Icc (-1 : ℝ) 1) ∩ {z | graphProjection a (H z.1 (tangentRay b z.2)) = 0} + +theorem finite_compact_projection_directions + {H : Base → Base →L[ℝ] ProjectionTarget 3 × ℝ} + (hH : ContDiff ℝ ∞ H) {K : Set Base} (hK : IsCompact K) + (hI : ∀ x ∈ K, Function.Injective (H x)) (a : ProjectionTarget 3) (b : Bool) + (hreg : ∀ z, z ∈ tangentSlopeDomain H b → tangentSlope H b z = a → + Function.Surjective (fderiv ℝ (tangentSlope H b) z)) : + (compactProjectionDirections a H K b).Finite := by + let C := compactProjectionDirections a H K b + have hcomp : IsCompact C := (hK.prod isCompact_Icc).inter_right + (isClosed_eq ((graphProjection a).continuous.comp + ((hH.comp contDiff_fst).clm_apply + ((tangentRay_smooth b).comp contDiff_snd)).continuous) continuous_const) + have hU : C ⊆ tangentSlopeDomain H b := by + intro z hz + have he : (H z.1 (tangentRay b z.2)).1 = + (H z.1 (tangentRay b z.2)).2 • a := sub_eq_zero.mp hz.2 + intro hs + have he0 : H z.1 (tangentRay b z.2) = H z.1 0 := by + rw [map_zero] + apply Prod.ext + · change (H z.1 (tangentRay b z.2)).1 = 0 + simpa only [hs,zero_smul] using he + · exact hs + exact tangentRay_ne_zero b z.2 (hI z.1 hz.1.1 he0) + have heq (z) (hz : z ∈ C) : tangentSlope H b z = a := by + have he : (H z.1 (tangentRay b z.2)).1 = + (H z.1 (tangentRay b z.2)).2 • a := sub_eq_zero.mp hz.2 + change (H z.1 (tangentRay b z.2)).2⁻¹ • (H z.1 (tangentRay b z.2)).1 = a + rw [he,smul_smul,inv_mul_cancel₀ (hU hz),one_smul] + have hfin := PublishedInputs.finite_compact_coordinate_regular_fiber + (tangentSlopeDomain_open hH b) (tangentSlope_smoothOn hH b) hcomp hU a + (fun z _ he => hreg z (hU ‹z ∈ C›) he) + exact hfin.subset (fun z hz => ⟨hz,heq z hz⟩) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularZeroStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularZeroStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..02f8e24db629cd809257ec737d50335c04b044b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RegularZeroStability.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CriticalSetClosed +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Uniform first-jet stability of regular zero sets on compact domains. +This allows the finite pair-patch construction to preserve earlier patches. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] +local instance zeroJetNormed : NormedAddCommGroup (E →L[ℝ] F) := inferInstance +local instance zeroJetSpace : NormedSpace ℝ (E →L[ℝ] F) := inferInstance + +def regularZeroJets : Set (F × (E →L[ℝ] F)) := + {z | z.1 ≠ 0 ∨ Function.Surjective z.2} + +lemma regularZeroJets_open : IsOpen (regularZeroJets (E := E) (F := F)) := + (isOpen_compl_singleton.preimage continuous_fst).union + (surjective_clm_open.preimage continuous_snd) + +theorem compact_regular_zero_stability {f : E → F} (hf : ContDiff ℝ ∞ f) + {K : Set E} (hK : IsCompact K) + (hreg : ∀ x ∈ K, f x = 0 → Function.Surjective (fderiv ℝ f x)) : + ∃ ε > 0, ∀ g : E → F, + (∀ x ∈ K, ‖g x-f x‖ < ε) → + (∀ x ∈ K, ‖fderiv ℝ g x-fderiv ℝ f x‖ < ε) → + ∀ x ∈ K, g x = 0 → Function.Surjective (fderiv ℝ g x) := by + let J : E → F × (E →L[ℝ] F) := fun x => (f x,fderiv ℝ f x) + have hJ : Continuous J := hf.continuous.prodMk (hf.continuous_fderiv (by simp)) + have hsub : J '' K ⊆ regularZeroJets := by + rintro z ⟨x,hx,rfl⟩ + by_cases h : f x = 0 + · exact Or.inr (hreg x hx h) + · exact Or.inl h + obtain ⟨ε,hε,hεsub⟩ := (hK.image hJ).exists_thickening_subset_open regularZeroJets_open hsub + refine ⟨ε,hε,?_⟩ + intro g hv hd x hx hgx + have hdist : dist (g x,fderiv ℝ g x) (J x) < ε := by + rw [Prod.dist_eq] + exact max_lt (by simpa only [J,dist_eq_norm] using hv x hx) + (by simpa only [J,dist_eq_norm] using hd x hx) + have hm : (g x,fderiv ℝ g x) ∈ thickening ε (J '' K) := + mem_thickening_iff.mpr ⟨J x,⟨x,hx,rfl⟩,hdist⟩ + rcases hεsub hm with h | h + · exact False.elim (h hgx) + · exact h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeDefectFilling.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeDefectFilling.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8aa900a793ac3918eac09ef26cb9c9d6daac9de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeDefectFilling.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.EqualIndexFrameFilling +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneDefectInterpolation + +namespace OAI + +/-! Compact frame fillings are preserved by a homotopy whose only zeros stay +inside the fixed compact core. The pasting retains exact exterior values. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def defectFrame (N : Base → Base) (x : Base) : Base →L[ℝ] FrameTarget := + axisNormalFrame 1 (N x 0) (N x 1) + +lemma defectFrame_smooth {N : Base → Base} (hN : ContDiff ℝ ∞ N) : + ContDiff ℝ ∞ (defectFrame N) := by + have h : ContDiff ℝ ∞ (fun x => (![0,N x 0,N x 1] : FrameTarget)) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact contDiff_const + · exact (contDiff_apply ℝ ℝ 0).comp hN + · exact (contDiff_apply ℝ ℝ 1).comp hN + exact contDiff_const.add (contDiff_const.smulRight h) + +lemma defectFrame_injective {N : Base → Base} {x : Base} (hN : N x ≠ 0) : + Function.Injective (defectFrame N x) := by + apply axisNormalFrame_injective (by norm_num) + by_contra hn + push Not at hn + apply hN + ext i + fin_cases i + · exact hn.1 + · exact hn.2 + +/-- The filling changes the frame only on a compact subset of the prescribed +open set; every point of that open set becomes regular. -/ +def HasRelativeDefectFilling (N : Base → Base) (U : Set Base) : Prop := + ∃ (A : Base → Base →L[ℝ] FrameTarget) (K : Set Base), + ContDiff ℝ ∞ A ∧ IsCompact K ∧ K ⊆ U ∧ + (∀ x ∈ U, Function.Injective (A x)) ∧ + ∀ x ∉ K, A x = defectFrame N x + +theorem relativeDefectFilling_homotopy + {H : ℝ → Base → Base} (hH : ContDiff ℝ ∞ (fun z : ℝ × Base => H z.1 z.2)) + {U Z : Set Base} (hU : IsOpen U) (hZ : IsCompact Z) (hZU : Z ⊆ U) + (hz : ∀ s ∈ Icc (0:ℝ) 1, ∀ x ∈ U, x ∉ Z → H s x ≠ 0) + (hfill : HasRelativeDefectFilling (H 1) U) : + HasRelativeDefectFilling (H 0) U := by + obtain ⟨B,K,hB,hK,hKU,hBI,hBe⟩ := hfill + obtain ⟨χ,hχ,hχc,hχr,hχs,hχone⟩ := + CollarVelocity.compact_cutoff (hK.union hZ) hU (union_subset hKU hZU) + let Q := fun s x => defectFrame (H s) x + let A := fun x => B x+Q (χ x) x-Q 1 x + have hQc : ContDiff ℝ ∞ (fun x => Q (χ x) x) := + defectFrame_smooth (hH.comp (hχ.prodMk contDiff_id)) + have hQ1 : ContDiff ℝ ∞ (Q 1) := + defectFrame_smooth (hH.comp (contDiff_const.prodMk contDiff_id)) + refine ⟨A,K ∪ tsupport χ,(hB.add hQc).sub hQ1,hK.union hχc, + union_subset hKU hχs,?_,?_⟩ + · intro x hx + by_cases he : χ x = 1 + · have hAB : A x = B x := by simp [A,he] + rw [hAB] + exact hBI x hx + · have hxK : x ∉ K := fun hk => he (hχone x (Or.inl hk)) + have hxZ : x ∉ Z := fun hz' => he (hχone x (Or.inr hz')) + have hAQ : A x = Q (χ x) x := by + dsimp only [A] + rw [hBe x hxK] + dsimp [Q] + abel + rw [hAQ] + exact defectFrame_injective (hz (χ x) (hχr x) x hx hxZ) + · intro x hx + have hxK : x ∉ K := fun h => hx (Or.inl h) + have hxχ : x ∉ tsupport χ := fun h => hx (Or.inr h) + have hχ0 : χ x = 0 := image_eq_zero_of_notMem_tsupport hxχ + dsimp only [A] + rw [hχ0,hBe x hxK] + dsimp [Q] + abel + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalCleanPairs.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalCleanPairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..866d2eec2879252b8ad32b4713826bd879d8f170 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalCleanPairs.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.GlobalCleanPairRegularization + +namespace OAI + +/-! Construct the quantitative injectivity cover before regularizing +all double pairs on the surface. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] + +theorem relative_global_clean_pairs + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (A U : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + (hU : ∀ i, IsOpen (U i)) (hUA : ∀ i, U i ⊆ A i) + (hIf : ∀ x, x ∉ ⋃ i, U i → Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (S : Set M) (hS : S.Finite) + (hAclean : ∀ i, ∀ x ∈ A i, ∀ y ∈ A i, x ≠ y → (x,y) ∈ cleanSurfacePairs f S) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + ∀ x y, x ≠ y → (x,y) ∈ cleanSurfacePairs g S := by + classical + let B : Set M := (⋃ i, U i)ᶜ + have hB : IsCompact B := (isOpen_iUnion hU).isClosed_compl.isCompact + obtain ⟨P,s,hs⟩ := finite_injectivity_cover hf hB hIf + let c : s → M := fun j => j.val.val + let Q : ∀ j : s, SurfaceInjectivityPatch f (c j) := fun j => P j.val + have hcover : (⋃ i, U i) ∪ (⋃ j : s, (Q j).region) = univ := by + apply eq_univ_of_forall + intro x + by_cases hx : x ∈ ⋃ i, U i + · exact Or.inl hx + · obtain ⟨j,hj,hxj⟩ := mem_iUnion₂.mp (hs hx) + exact Or.inr (mem_iUnion.mpr ⟨⟨j,hj⟩,hxj⟩) + exact global_clean_pair_regularization_with_cover hf A U hA hdis hU hUA hIf S hS hAclean c Q hcover hε + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalTransversality.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalTransversality.lean new file mode 100644 index 0000000000000000000000000000000000000000..483dfd633ee6b9d3290a14d632cace58fdc4ead0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RelativeGlobalTransversality.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.GlobalPairRegularization + +namespace OAI + +/-! Construct the quantitative injectivity cover before regularizing +all double pairs on the surface. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] + +theorem relative_global_transversality + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (A U : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + (hU : ∀ i, IsOpen (U i)) (hUA : ∀ i, U i ⊆ A i) + (hIf : ∀ x, x ∉ ⋃ i, U i → Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hAreg : ∀ i, ∀ x ∈ A i, ∀ y ∈ A i, x ≠ y → (x,y) ∈ regularSurfacePairs f) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + ∀ x y, x ≠ y → g x = g y → Function.Surjective (surfacePairDerivative g x y) := by + classical + let B : Set M := (⋃ i, U i)ᶜ + have hB : IsCompact B := (isOpen_iUnion hU).isClosed_compl.isCompact + obtain ⟨P,s,hs⟩ := finite_injectivity_cover hf hB hIf + let c : s → M := fun j => j.val.val + let Q : ∀ j : s, SurfaceInjectivityPatch f (c j) := fun j => P j.val + have hcover : (⋃ i, U i) ∪ (⋃ j : s, (Q j).region) = univ := by + apply eq_univ_of_forall + intro x + by_cases hx : x ∈ ⋃ i, U i + · exact Or.inl hx + · obtain ⟨j,hj,hxj⟩ := mem_iUnion₂.mp (hs hx) + exact Or.inr (mem_iUnion.mpr ⟨⟨j,hj⟩,hxj⟩) + exact global_pair_regularization_with_cover hf A U hA hdis hU hUA hIf hAreg c Q hcover hε + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RescaledReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RescaledReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..342753b4bd1b9fc6718178ce7b750537b9912538 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RescaledReadBounds.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold + +namespace OAI + +/-! A square of the fast scale gives a uniform low-order geometric budget. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.WeightedEstimates +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma WeightedBound.square_scale {f : E → V} {z B C : ℝ} {m : ℕ} + (hb : WeightedBound univ z m C f) (hzero : WeightedBound univ 1 0 B f) + (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) (hsmall : C*z ≤ 1) : + WeightedBound univ (z^2) m (B+1) f := by + have hB : 0 ≤ B := (norm_nonneg (f 0)).trans (hzero.norm_le (mem_univ 0)) + intro j hj x hx + by_cases hj0 : j = 0 + · subst j + simpa only [pow_zero,one_mul,norm_iteratedFDerivWithin_zero] using + (hzero.norm_le hx).trans (le_add_of_nonneg_right zero_le_one) + · have hj1 : 1 ≤ j := by omega + have hp : z^j ≤ z := by + simpa only [pow_one] using pow_le_pow_of_le_one hz.le hz1 hj1 + calc + (z^2)^j*‖iteratedFDerivWithin ℝ j f univ x‖ = + z^j*(z^j*‖iteratedFDerivWithin ℝ j f univ x‖) := by rw [pow_two,mul_pow]; ring + _ ≤ z^j*C := mul_le_mul_of_nonneg_left (hb j hj x hx) (pow_nonneg hz.le _) + _ ≤ z*C := mul_le_mul_of_nonneg_right hp hC + _ ≤ 1 := by simpa only [mul_comm] using hsmall + _ ≤ B+1 := by linarith + +end ClosedSurfaceR4.WeightedEstimates +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_rescaled_read_bound (V₀ : ℝ) (hV₀ : 0 ≤ V₀) : + ∃ B : ℝ, 1 ≤ B ∧ ∀ C : ℝ, 0 ≤ C → ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ + ∀ z : ℝ, 0 < z → z < η → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → A.WeightedBound 1 0 V₀ F → + A.WeightedBound z 3 C F → ∀ i, + WeightedEstimates.WeightedBound univ (z^2) 3 B + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + classical + choose D₀ hD₀ hd₀ using fun i => A.vectorPlaneRead_bound (V := Space) i 0 + choose D₃ hD₃ hd₃ using fun i => A.vectorPlaneRead_bound (V := Space) i 3 + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + let B := 1+∑ i : A.centers, L*D₀ i*V₀ + let K := 1+∑ i : A.centers, L*D₃ i + have hL : 0 ≤ L := norm_nonneg _ + have hsum₀ : 0 ≤ ∑ i : A.centers, L*D₀ i*V₀ := + Finset.sum_nonneg (fun i _ => mul_nonneg (mul_nonneg hL (hD₀ i)) hV₀) + have hsum₃ : 0 ≤ ∑ i : A.centers, L*D₃ i := + Finset.sum_nonneg (fun i _ => mul_nonneg hL (hD₃ i)) + refine ⟨B,by change 1 ≤ 1+∑ i : A.centers, L*D₀ i*V₀; linarith,?_⟩ + intro C hC + obtain ⟨η,hη,hη1,hh⟩ := ExactCorrection.positive_power_threshold (K*C) 1 1 + zero_lt_one zero_lt_one + refine ⟨η,hη,hη1,?_⟩ + intro z hz hzη F hF hzero hb i + have hz1 := hzη.le.trans hη1 + have hread0 := (hd₀ i F 1 V₀ zero_lt_one le_rfl hV₀ hF hzero).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hF).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hread3 := (hd₃ i F z C hz hz1 hC hF hb).linear + uniqueDiffOn_univ hz.le (A.vectorPlaneRead_smooth i hF).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hiK : L*D₃ i ≤ K := by + have hi := Finset.single_le_sum (s := Finset.univ) + (fun j _ => mul_nonneg hL (hD₃ j)) (Finset.mem_univ i) + change L*D₃ i ≤ 1+∑ j : A.centers, L*D₃ j + linarith + have hsmall : (L*(D₃ i*C))*z ≤ 1 := by + have hh' : (K*C)*z ≤ 1 := by simpa only [Real.rpow_one] using (hh z hz hzη).le + exact (mul_le_mul_of_nonneg_right + (by nlinarith [mul_le_mul_of_nonneg_right hiK hC] : L*(D₃ i*C) ≤ K*C) hz.le).trans hh' + apply (hread3.square_scale hread0 hz hz1 (mul_nonneg hL (mul_nonneg (hD₃ i) hC)) hsmall).mono_const + have hi := Finset.single_le_sum (s := Finset.univ) + (fun j _ => mul_nonneg (mul_nonneg hL (hD₀ j)) hV₀) (Finset.mem_univ i) + change L*(D₀ i*V₀)+1 ≤ 1+∑ j : A.centers, L*D₀ j*V₀ + nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixAppend.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixAppend.lean new file mode 100644 index 0000000000000000000000000000000000000000..1781d91e97048bd21f35d4c57373f12533d6d70a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixAppend.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ResolvedPrefixImage +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcTail + +namespace OAI + +/-! The two actual induction steps: add a prepared bridge, or add the +unchanged regular segment before the next bridge. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {T : ι → ℝ} {O : Set M} + + theorem append_resolved_bridge (B : ∀ i, LocalCornerBridge γ (T i) O) + {J : Set ι} {k : ι} (hk : k ∉ J) + (hsep : ∀ i, ∀ s ∈ Icc (B i).arc.start (B i).arc.finish, + ∀ u ∈ Ico (0:ℝ) (B i).left ∪ Ioc (B i).right 1, + (B i).arc.curve s ≠ γ.extend u) + (hdis : Pairwise (fun i j => Disjoint + ((B i).arc.curve '' Icc (B i).arc.start (B i).arc.finish) + ((B j).arc.curve '' Icc (B j).arc.start (B j).arc.finish))) + (P : SmoothArcTail γ.extend (B k).left) + (hP : P.arc.curve '' Icc P.arc.start P.arc.finish ⊆ resolvedPrefixImage γ B J (B k).left) : + ∃ R : SmoothArcTail γ.extend (B k).right, + R.arc.curve '' Icc R.arc.start R.arc.finish ⊆ resolvedPrefixImage γ B (insert k J) (B k).right ∧ + R.arc.curve R.arc.start = P.arc.curve P.arc.start := by + have hcross : ∀ s ∈ Icc P.arc.start P.arc.finish, + ∀ t ∈ Ioc (B k).arc.start (B k).arc.finish, P.arc.curve s ≠ (B k).arc.curve t := by + intro s hs t ht + exact resolvedPrefixImage_avoids_bridge B hk hsep hdis _ + (hP (mem_image_of_mem P.arc.curve hs)) t ht + obtain ⟨R,hRi,hRs,_⟩ := P.append (B k).arc (B k).leftParameter (B k).rightParameter + (B k).left_smooth (B k).right_smooth (B k).left_forward (B k).right_forward + (B k).left_value (B k).right_value (B k).left_germ (B k).right_germ hcross + refine ⟨R,?_,hRs⟩ + rw [hRi] + apply union_subset + · exact hP.trans (resolvedPrefixImage_mono B (subset_insert k J) ((B k).left_lt.trans (B k).lt_right).le) + · intro x hx + exact Or.inr (mem_iUnion₂.mpr ⟨k,mem_insert k J,hx⟩) + +theorem append_resolved_segment (B : ∀ i, LocalCornerBridge γ (T i) O) + (hi : Function.Injective γ) {J : Set ι} {a b : ℝ} (ha : 0 ≤ a) (hab : a < b) (hb : b ≤ 1) + (hJ : ∀ i ∈ J, (B i).right ≤ a) + (hsep : ∀ i, ∀ s ∈ Icc (B i).arc.start (B i).arc.finish, + ∀ u ∈ Ico (0:ℝ) (B i).left ∪ Ioc (B i).right 1, + (B i).arc.curve s ≠ γ.extend u) + (P : SmoothArcTail γ.extend a) + (hP : P.arc.curve '' Icc P.arc.start P.arc.finish ⊆ resolvedPrefixImage γ B J a) + (Q : SmoothCompactArc planeModel M) (hQs : Q.start = a) (hQf : Q.finish = b) + (hQc : Q.curve = γ.extend) : + ∃ R : SmoothArcTail γ.extend b, + R.arc.curve '' Icc R.arc.start R.arc.finish ⊆ resolvedPrefixImage γ B J b ∧ + R.arc.curve R.arc.start = P.arc.curve P.arc.start := by + have hcross : ∀ s ∈ Icc P.arc.start P.arc.finish, ∀ t ∈ Ioc Q.start Q.finish, + P.arc.curve s ≠ Q.curve t := by + intro s hs t ht + rw [hQs,hQf] at ht + rw [hQc] + exact resolvedPrefixImage_avoids_future B hi (hab.le.trans hb) hJ hsep _ + (hP (mem_image_of_mem P.arc.curve hs)) t ⟨ht.1,ht.2.trans hb⟩ + have hgL : Q.curve =ᶠ[𝓝 Q.start] γ.extend ∘ id := by rw [hQc]; rfl + have hgR : Q.curve =ᶠ[𝓝 Q.finish] γ.extend ∘ id := by rw [hQc]; rfl + obtain ⟨R,hRi,hRs,_⟩ := P.append Q id id contDiff_id contDiff_id + (by simp) (by simp) hQs hQf hgL hgR hcross + refine ⟨R,?_,hRs⟩ + rw [hRi] + apply union_subset + · exact hP.trans (resolvedPrefixImage_mono B (Subset.refl _) hab.le) + · intro x hx + rw [hQc,hQs,hQf] at hx + exact Or.inl (image_mono (Icc_subset_Icc ha le_rfl) hx) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixImage.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d9d73f99141232e63e17212a01fb2e673bb4313 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ResolvedPrefixImage.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CornerBridgeEmbedding + +namespace OAI + +/-! The concrete trace invariant used while joining the ordered smooth +bridges: old path points plus only the bridges already inserted. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} (γ : Path p q) {T : ι → ℝ} {O : Set M} + +def resolvedPrefixImage (B : ∀ i, LocalCornerBridge γ (T i) O) (J : Set ι) (a : ℝ) : Set M := + γ.extend '' Icc 0 a ∪ ⋃ i ∈ J, (B i).arc.curve '' Icc (B i).arc.start (B i).arc.finish + +variable {γ} + +lemma resolvedPrefixImage_mono (B : ∀ i, LocalCornerBridge γ (T i) O) + {J K : Set ι} (hJK : J ⊆ K) {a b : ℝ} (hab : a ≤ b) : + resolvedPrefixImage γ B J a ⊆ resolvedPrefixImage γ B K b := by + intro x hx + rcases hx with hx | hx + · exact Or.inl (image_mono (Icc_subset_Icc_right hab) hx) + · obtain ⟨i,hi,hx⟩ := mem_iUnion₂.mp hx + exact Or.inr (mem_iUnion₂.mpr ⟨i,hJK hi,hx⟩) + +lemma resolvedPrefixImage_avoids_future (B : ∀ i, LocalCornerBridge γ (T i) O) + (hi : Function.Injective γ) {J : Set ι} {a : ℝ} (ha : a ≤ 1) + (hJ : ∀ i ∈ J, (B i).right ≤ a) + (hsep : ∀ i, ∀ s ∈ Icc (B i).arc.start (B i).arc.finish, + ∀ u ∈ Ico (0:ℝ) (B i).left ∪ Ioc (B i).right 1, + (B i).arc.curve s ≠ γ.extend u) : + ∀ x ∈ resolvedPrefixImage γ B J a, ∀ u ∈ Ioc a 1, x ≠ γ.extend u := by + intro x hx u hu he + rcases hx with hx | hx + · obtain ⟨v,hv,hvx⟩ := hx + have h := embeddedPath_extend_injOn γ hi ⟨hv.1,hv.2.trans ha⟩ + ⟨hv.1.trans (hv.2.trans hu.1.le),hu.2⟩ (hvx.trans he) + exact (not_le_of_gt hu.1) (h ▸ hv.2) + · obtain ⟨i,hiJ,s,hs,hsx⟩ := mem_iUnion₂.mp hx + exact hsep i s hs u (Or.inr ⟨(hJ i hiJ).trans_lt hu.1,hu.2⟩) (hsx.trans he) + +lemma resolvedPrefixImage_avoids_bridge (B : ∀ i, LocalCornerBridge γ (T i) O) + {J : Set ι} {k : ι} (hk : k ∉ J) + (hsep : ∀ i, ∀ s ∈ Icc (B i).arc.start (B i).arc.finish, + ∀ u ∈ Ico (0:ℝ) (B i).left ∪ Ioc (B i).right 1, + (B i).arc.curve s ≠ γ.extend u) + (hdis : Pairwise (fun i j => Disjoint + ((B i).arc.curve '' Icc (B i).arc.start (B i).arc.finish) + ((B j).arc.curve '' Icc (B j).arc.start (B j).arc.finish))) : + ∀ x ∈ resolvedPrefixImage γ B J (B k).left, + ∀ t ∈ Ioc (B k).arc.start (B k).arc.finish, x ≠ (B k).arc.curve t := by + intro x hx t ht he + rcases hx with hx | hx + · obtain ⟨u,hu,hux⟩ := hx + by_cases hul : u < (B k).left + · exact hsep k t ⟨ht.1.le,ht.2⟩ u (Or.inl ⟨hu.1,hul⟩) (hux.trans he).symm + · have hul' : u = (B k).left := le_antisymm hu.2 (le_of_not_gt hul) + subst u + have hstart : (B k).arc.curve (B k).arc.start = γ.extend (B k).left := + (B k).left_germ.eq_of_nhds.trans (by rw [Function.comp_apply,(B k).left_value]) + have het : (B k).arc.start = t := (B k).arc.injective + (left_mem_Icc.mpr (B k).arc.start_lt_finish.le) ⟨ht.1.le,ht.2⟩ + (hstart.trans (hux.trans he)) + exact ht.1.ne het + · obtain ⟨i,hiJ,s,hs,hsx⟩ := mem_iUnion₂.mp hx + have hik : i ≠ k := fun he => hk (he ▸ hiJ) + have hxI : x ∈ (B i).arc.curve '' Icc (B i).arc.start (B i).arc.finish := ⟨s,hs,hsx⟩ + have hxK : x ∈ (B k).arc.curve '' Icc (B k).arc.start (B k).arc.finish := + ⟨t,⟨ht.1.le,ht.2⟩,he.symm⟩ + exact disjoint_left.mp (hdis hik) hxI hxK + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RestoredMetricTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RestoredMetricTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..b04b3fe9d10287c124053dca4ff85cf0dcd573cc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RestoredMetricTensor.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ManifoldMetricTensor + +namespace OAI + +/-! Restoring a compactly supported Euclidean displacement restores its +actual metric tensor, with no extra terms from the outer atlas cutoff. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +local instance restoredMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma plane_chart_differential (i : A.centers) {p : M} (hp : p ∈ (chart (i : M)).source) : + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + (surfaceDifferential (chart (i : M)) p) = + planeCoordinates.toContinuousLinearMap.comp + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p) := by + have hc := ((chart_smooth (i : M)) p hp).contMDiffAt + ((chart (i : M)).open_source.mem_nhds hp) + have he : (planeCoordinateIsometry : JetPolynomial.Base → SmallModes.Base) ∘ chart (i : M) = + coordinateChart (i : M) := by + funext x + rfl + have hd := mfderiv_comp p + ((planeCoordinateIsometry.contDiff (n := (∞ : ℕ∞ω))).contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hc.mdifferentiableAt (by simp)) + rw [he, mfderiv_eq_fderiv] at hd + change surfaceDifferential (coordinateChart (i : M)) p = + (fderiv ℝ planeCoordinateIsometry (chart (i : M) p)).comp + (surfaceDifferential (chart (i : M)) p) at hd + have hi : fderiv ℝ (planeCoordinateIsometry : JetPolynomial.Base → SmallModes.Base) + (chart (i : M) p) = planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap := + planeCoordinateIsometry.toContinuousLinearEquiv.hasFDerivAt.fderiv + rw [hi] at hd + exact hd.symm.trans (A.coordinateChart_tangentCoordinates i hp) + +lemma restored_metric_tensor (i : A.centers) (f : SmallModes.Base → Space) + (hf : ContDiff ℝ ∞ f) + (hsp : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun y => + fiberFromThree (RealModes.realMetricTensor (spaceCoordinates ∘ f) (planeCoordinateIsometry y))) := by + funext p + ext v w + by_cases hp : p ∈ (chart (i : M)).source + · rw [inducedTensor_apply, A.restore_plane_metric_on_source i f hsp hp + (hf.differentiable (by simp) _), A.tensorRestore_apply i _ hp, + fiberFromThree_apply] + have hd := A.plane_chart_differential i hp + have hv := congrArg (fun L => L v) hd + have hw := congrArg (fun L => L w) hd + change planeCoordinateIsometry (surfaceDifferential (chart (i : M)) p v) = _ at hv + change planeCoordinateIsometry (surfaceDifferential (chart (i : M)) p w) = _ at hw + simp only [ContinuousLinearMap.comp_apply] at hv hw + rw [hv,hw] + by_cases hs : p ∈ tsupport (A.weight i) + · rw [A.outer_one i p hs,one_mul] + rfl + · have hn : planeCoordinateIsometry (chart (i : M) p) ∉ tsupport f := by + intro hh + exact hs (A.mem_weight_support_of_plane i hp (hsp hh)) + simp only [euclidean_metric_coordinate_value f (hf.differentiable (by simp) _), + fderiv_of_notMem_tsupport ℝ hn,zero_apply,inner_zero_right,mul_zero] + · have hs : p ∉ tsupport (A.weight i) := fun h => hp (A.weight_support i h) + rw [inducedTensor_apply, A.restore_plane_metric_off_support i f hsp hs] + have ho : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.outer_support i h)) + simp only [bundleRestore,ho,zero_smul,zero_apply] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..23bc5d152fa80aaac5d3ec1c4b8edc92db703db8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnCurve.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CenteredSmoothStep + +namespace OAI + +/-! An explicit embedded U-turn between disjoint graph branches. It is +flatly equal to the lower and upper graphs at the two ends. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def roundedReturnCurve (f g : ℝ → ℝ) (a b t : ℝ) : Base := + ![a+b*t^2,(1-centeredSmoothStep t)*f (a+b*t^2)+centeredSmoothStep t*g (a+b*t^2)] + +lemma roundedReturnCurve_smooth {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (a b : ℝ) : ContDiff ℝ ∞ (roundedReturnCurve f g a b) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun t : ℝ => a+b*t^2) + fun_prop + · change ContDiff ℝ ∞ (fun t : ℝ => + (1-centeredSmoothStep t)*f (a+b*t^2)+centeredSmoothStep t*g (a+b*t^2)) + exact ((contDiff_const.sub centeredSmoothStep_smooth).mul (hf.comp (by fun_prop))).add + (centeredSmoothStep_smooth.mul (hg.comp (by fun_prop))) + +lemma roundedReturnCurve_left {f g : ℝ → ℝ} {a b t : ℝ} (ht : t ≤ -1) : + roundedReturnCurve f g a b t = ![a+b*t^2,f (a+b*t^2)] := by + simp [roundedReturnCurve,centeredSmoothStep_zero ht] + +lemma roundedReturnCurve_right {f g : ℝ → ℝ} {a b t : ℝ} (ht : 1 ≤ t) : + roundedReturnCurve f g a b t = ![a+b*t^2,g (a+b*t^2)] := by + simp [roundedReturnCurve,centeredSmoothStep_one ht] + +lemma roundedReturnCurve_coordinate_bound {f g : ℝ → ℝ} {a b T t : ℝ} + (hb : 0 ≤ b) (ht : t ∈ Icc (-T) T) : + (roundedReturnCurve f g a b t) 0 ∈ Icc a (a+b*T^2) := by + change a+b*t^2 ∈ Icc a (a+b*T^2) + have hsq : t^2 ≤ T^2 := by + have hprod := mul_nonneg (sub_nonneg.mpr ht.2) (show 0 ≤ T+t by linarith [ht.1]) + nlinarith + constructor + · nlinarith [mul_nonneg hb (sq_nonneg t)] + · exact add_le_add le_rfl (mul_le_mul_of_nonneg_left hsq hb) + +lemma roundedReturnCurve_opposite_ne {f g : ℝ → ℝ} {a b t : ℝ} + (ht : 0 < t) (hgap : f (a+b*t^2) < g (a+b*t^2)) : + roundedReturnCurve f g a b (-t) ≠ roundedReturnCurve f g a b t := by + intro he + have hy := congrFun he 1 + change (1-centeredSmoothStep (-t))*f (a+b*(-t)^2)+centeredSmoothStep (-t)*g (a+b*(-t)^2) = + (1-centeredSmoothStep t)*f (a+b*t^2)+centeredSmoothStep t*g (a+b*t^2) at hy + rw [neg_sq] at hy + have hp := mul_pos (sub_pos.mpr (centeredSmoothStep_opposite_lt ht)) (sub_pos.mpr hgap) + nlinarith + +theorem roundedReturnCurve_injective {f g : ℝ → ℝ} {a b T : ℝ} + (hb : 0 < b) (hgap : ∀ x ∈ Icc a (a+b*T^2), f x < g x) : + (Icc (-T) T).InjOn (roundedReturnCurve f g a b) := by + intro s hs t ht he + have hx := congrFun he 0 + change a+b*s^2 = a+b*t^2 at hx + have hsq : s^2 = t^2 := by nlinarith + rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with heq | heq + · exact heq + rcases lt_trichotomy 0 t with hp | hz | hn + · have hgap' := hgap _ (roundedReturnCurve_coordinate_bound (f := f) (g := g) hb.le ht) + exact False.elim (roundedReturnCurve_opposite_ne hp hgap' (heq ▸ he)) + · simpa only [← hz,neg_zero] using heq + · have hps : 0 < s := by linarith + have hgap' := hgap _ (roundedReturnCurve_coordinate_bound (f := f) (g := g) hb.le hs) + apply False.elim + apply roundedReturnCurve_opposite_ne hps hgap' + have hts : t = -s := by linarith + simpa only [hts] using he.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnRegular.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..0cfd04025fc413ebfa4b633dff9e3a826427c02e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnRegular.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RoundedReturnCurve + +namespace OAI + +/-! The explicit graph U-turn has nonzero velocity even at its turning +point; away from it, the first coordinate already has nonzero derivative. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma plane_curve_regular_of_hasDerivAt {C : ℝ → Base} {v : Base} {t : ℝ} + (hC : HasDerivAt C v t) {i : Fin 2} (hi : v i ≠ 0) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) C t) := by + have hD := hC.hasFDerivAt.hasMFDerivAt.mfderiv + rw [hD] + intro x y hxy + change ℝ at x y + have h := congrFun hxy i + change x*v i = y*v i at h + exact (mul_right_cancel₀ hi h : (x : ℝ) = (y : ℝ)) + +lemma roundedReturnCurve_hasDerivAt_zero {f g : ℝ → ℝ} {a b : ℝ} + (hf : DifferentiableAt ℝ f a) (hg : DifferentiableAt ℝ g a) : + HasDerivAt (roundedReturnCurve f g a b) (![0,g a-f a] : Base) 0 := by + have hx : HasDerivAt (fun t : ℝ => a+b*t^2) 0 0 := by + convert (((hasDerivAt_id (0:ℝ)).pow 2).const_mul b).const_add a using 1 <;> norm_num + have hF : HasDerivAt (fun t : ℝ => f (a+b*t^2)) 0 0 := by + have hf' : HasDerivAt f (deriv f a) (a+b*(0:ℝ)^2) := by simpa using hf.hasDerivAt + simpa only [mul_zero,Function.comp_def] using hf'.comp 0 hx + have hG : HasDerivAt (fun t : ℝ => g (a+b*t^2)) 0 0 := by + have hg' : HasDerivAt g (deriv g a) (a+b*(0:ℝ)^2) := by simpa using hg.hasDerivAt + simpa only [mul_zero,Function.comp_def] using hg'.comp 0 hx + have hy : HasDerivAt (fun t : ℝ => + (1-centeredSmoothStep t)*f (a+b*t^2)+centeredSmoothStep t*g (a+b*t^2)) (g a-f a) 0 := by + convert ((centeredSmoothStep_hasDerivAt_zero.const_sub 1).mul hF).add + (centeredSmoothStep_hasDerivAt_zero.mul hG) using 1 + all_goals first | rfl | (norm_num; ring) + apply hasDerivAt_pi.mpr + intro i + fin_cases i + · exact hx + · exact hy + +theorem roundedReturnCurve_regular {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) {a b : ℝ} (hb : 0 < b) (hgap : f a < g a) (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (roundedReturnCurve f g a b) t) := by + by_cases ht : t = 0 + · subst t + apply plane_curve_regular_of_hasDerivAt + (roundedReturnCurve_hasDerivAt_zero (hf.differentiable (by simp) a) (hg.differentiable (by simp) a)) + (i := 1) + exact sub_ne_zero.mpr (ne_of_gt hgap) + · have hx : HasDerivAt (fun u : ℝ => a+b*u^2) (2*b*t) t := by + convert (((hasDerivAt_id t).pow 2).const_mul b).const_add a using 1 + · rfl + · dsimp only [id_eq] + ring + have hC := (roundedReturnCurve_smooth hf hg a b).differentiable (by simp) t + have hc0 := hasDerivAt_pi.mp hC.hasDerivAt 0 + have hcoord : deriv (roundedReturnCurve f g a b) t 0 = 2*b*t := hc0.unique hx + apply plane_curve_regular_of_hasDerivAt hC.hasDerivAt (i := 0) + rw [hcoord] + exact mul_ne_zero (mul_ne_zero (by norm_num) hb.ne') ht + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnSeparated.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnSeparated.lean new file mode 100644 index 0000000000000000000000000000000000000000..d356e667de89febb29da19d7bc14c4240fe80a9d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/RoundedReturnSeparated.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RoundedReturnArc + +namespace OAI + +/-! Both vertical orders of two separated graphs admit the same regular rounding. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma roundedReturnCurve_opposite_ne_of_ne {f g : ℝ → ℝ} {a b t : ℝ} + (ht : 0 < t) (hgap : f (a+b*t^2) ≠ g (a+b*t^2)) : + roundedReturnCurve f g a b (-t) ≠ roundedReturnCurve f g a b t := by + intro he + have hy := congrFun he 1 + change (1-centeredSmoothStep (-t))*f (a+b*(-t)^2)+centeredSmoothStep (-t)*g (a+b*(-t)^2) = + (1-centeredSmoothStep t)*f (a+b*t^2)+centeredSmoothStep t*g (a+b*t^2) at hy + rw [neg_sq] at hy + have hn := mul_ne_zero + (sub_ne_zero.mpr (ne_of_gt (centeredSmoothStep_opposite_lt ht))) + (sub_ne_zero.mpr hgap.symm) + apply hn + nlinarith [hy] + +lemma roundedReturnCurve_regular_of_ne {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) {a b : ℝ} (hb : b ≠ 0) (hgap : f a ≠ g a) (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (roundedReturnCurve f g a b) t) := by + by_cases ht : t = 0 + · subst t + apply plane_curve_regular_of_hasDerivAt + (roundedReturnCurve_hasDerivAt_zero (hf.differentiable (by simp) a) (hg.differentiable (by simp) a)) + (i := 1) + exact sub_ne_zero.mpr hgap.symm + · have hx : HasDerivAt (fun u : ℝ => a+b*u^2) (2*b*t) t := by + convert (((hasDerivAt_id t).pow 2).const_mul b).const_add a using 1 + · rfl + · dsimp only [id_eq] + ring + have hC := (roundedReturnCurve_smooth hf hg a b).differentiable (by simp) t + have hc0 := hasDerivAt_pi.mp hC.hasDerivAt 0 + have hcoord : deriv (roundedReturnCurve f g a b) t 0 = 2*b*t := hc0.unique hx + apply plane_curve_regular_of_hasDerivAt hC.hasDerivAt (i := 0) + rw [hcoord] + exact mul_ne_zero (mul_ne_zero (by norm_num) hb) ht + +lemma roundedReturnCurve_injective_of_ne {f g : ℝ → ℝ} {a b T : ℝ} + (hb : b ≠ 0) (hgap : ∀ t ∈ Icc (-T) T, f (a+b*t^2) ≠ g (a+b*t^2)) : + (Icc (-T) T).InjOn (roundedReturnCurve f g a b) := by + intro s hs t ht he + have hx := congrFun he 0 + change a+b*s^2 = a+b*t^2 at hx + have hsq : s^2 = t^2 := by + apply mul_left_cancel₀ hb + linarith + rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with heq | heq + · exact heq + rcases lt_trichotomy 0 t with hp | hz | hn + · exact False.elim (roundedReturnCurve_opposite_ne_of_ne hp (hgap _ ht) (heq ▸ he)) + · simpa only [← hz,neg_zero] using heq + · have hps : 0 < s := by linarith + apply False.elim + apply roundedReturnCurve_opposite_ne_of_ne hps (hgap _ hs) + have hts : t = -s := by linarith + simpa only [hts] using he.symm + +theorem rounded_return_arc_of_ne {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) {a b : ℝ} (hb : b ≠ 0) + (hgap : ∀ t ∈ Icc (-2:ℝ) 2, f (a+b*t^2) ≠ g (a+b*t^2)) : + ∃ P : SmoothCompactArc 𝓘(ℝ,Base) Base, + P.start = -2 ∧ P.finish = 2 ∧ P.curve = roundedReturnCurve f g a b ∧ + P.curve =ᶠ[𝓝 P.start] (fun t => ![a+b*t^2,f (a+b*t^2)]) ∧ + P.curve =ᶠ[𝓝 P.finish] (fun t => ![a+b*t^2,g (a+b*t^2)]) := by + have hgap0 : f a ≠ g a := by simpa using hgap 0 (by norm_num) + let P : SmoothCompactArc 𝓘(ℝ,Base) Base := + ⟨roundedReturnCurve f g a b,-2,2,by norm_num,univ,isOpen_univ,subset_univ _, + (roundedReturnCurve_smooth hf hg a b).contMDiff.contMDiffOn, + fun t _ => roundedReturnCurve_regular_of_ne hf hg hb hgap0 t, + roundedReturnCurve_injective_of_ne hb hgap⟩ + refine ⟨P,rfl,rfl,rfl,?_,?_⟩ + · filter_upwards [eventually_lt_nhds (show (-2:ℝ) < -1 by norm_num)] with t ht + exact roundedReturnCurve_left ht.le + · filter_upwards [eventually_gt_nhds (show (1:ℝ) < 2 by norm_num)] with t ht + exact roundedReturnCurve_right ht.le + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeNormalizationStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeNormalizationStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e504445dc0b9279af409beae7dcd101ebe27519 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeNormalizationStability.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SafeRadialNormalization +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! The fixed smooth extension acts uniformly continuously on bounded +first jets. This gives the C1 stability used in finite-point preparation. -/ +noncomputable section +open Set Metric +open scoped ContDiff +namespace ClosedSurfaceR4.SphericalJets +open WeightedEstimates +abbrev SafeFirstJet := Space × (JetPolynomial.Base →L[ℝ] Space) + +def safeNormalizeFirstJet (J : SafeFirstJet) : SafeFirstJet := + (safeRadialNormalize J.1,(fderiv ℝ safeRadialNormalize J.1).comp J.2) + +lemma safeNormalizeFirstJet_continuous : Continuous safeNormalizeFirstJet := by + exact (safeRadialNormalize_smooth.continuous.comp continuous_fst).prodMk + (((safeRadialNormalize_smooth.fderiv_right (m := ∞) (by simp)).continuous.comp + continuous_fst).clm_comp continuous_snd) + +theorem safe_normalization_first_jet_stability (C : ℝ) (_hC : 0 ≤ C) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ δ ≤ 1 ∧ ∀ (x y : Space) (L A : JetPolynomial.Base →L[ℝ] Space), + ‖x‖ ≤ C → ‖L‖ ≤ C → ‖y-x‖ ≤ δ → ‖A-L‖ ≤ δ → + ‖safeRadialNormalize y-safeRadialNormalize x‖ ≤ ε ∧ + ‖(fderiv ℝ safeRadialNormalize y).comp A- + (fderiv ℝ safeRadialNormalize x).comp L‖ ≤ ε := by + have hu := (isCompact_closedBall (0 : SafeFirstJet) (C+1)).uniformContinuousOn_of_continuous + safeNormalizeFirstJet_continuous.continuousOn + obtain ⟨d,hd,hclose⟩ := Metric.uniformContinuousOn_iff.mp hu ε hε + refine ⟨min 1 (d/2),lt_min zero_lt_one (half_pos hd),min_le_left _ _,?_⟩ + intro x y L A hx hL hy hA + let J : SafeFirstJet := (x,L) + let H : SafeFirstJet := (y,A) + have hJ : ‖J‖ ≤ C := max_le hx hL + have hHJ : ‖H-J‖ ≤ min 1 (d/2) := max_le hy hA + have hH : ‖H‖ ≤ C+1 := by + calc + ‖H‖ ≤ ‖H-J‖+‖J‖ := norm_le_norm_sub_add H J + _ ≤ C+1 := by linarith [min_le_left (1 : ℝ) (d/2)] + have hdist : dist H J < d := by + rw [dist_eq_norm] + exact hHJ.trans_lt ((min_le_right (1 : ℝ) (d/2)).trans_lt (half_lt_self hd)) + have hh := hclose H (by simpa only [mem_closedBall,dist_zero_right] using hH) + J (by simpa only [mem_closedBall,dist_zero_right] using hJ.trans (by linarith : C ≤ C+1)) hdist + rw [dist_eq_norm] at hh + exact ⟨(norm_fst_le _).trans hh.le,(norm_snd_le _).trans hh.le⟩ + +theorem safe_normalization_C1_stability (f : JetPolynomial.Base → Space) + (hf : ContDiff ℝ ∞ f) (C : ℝ) (hC : 0 ≤ C) + (hb : WeightedBound univ 1 1 C f) {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ q : JetPolynomial.Base → Space, + ContDiff ℝ ∞ q → WeightedBound univ 1 1 δ q → + WeightedBound univ 1 1 ε (fun x => safeRadialNormalize (f x+q x)-safeRadialNormalize (f x)) := by + obtain ⟨δ,hδ,_,hd⟩ := safe_normalization_first_jet_stability C hC hε + refine ⟨δ,hδ,?_⟩ + intro q hq hqb + have hpoint (x : JetPolynomial.Base) : + ‖safeRadialNormalize (f x+q x)-safeRadialNormalize (f x)‖ ≤ ε ∧ + ‖fderiv ℝ (fun x => safeRadialNormalize (f x+q x)-safeRadialNormalize (f x)) x‖ ≤ ε := by + have hf₁ := hb 1 le_rfl x (mem_univ x) + have hq₁ := hqb 1 le_rfl x (mem_univ x) + simp only [one_pow,one_mul,iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] at hf₁ hq₁ + have hh := hd (f x) (f x+q x) (fderiv ℝ f x) (fderiv ℝ (f+q) x) + (hb.norm_le (mem_univ x)) hf₁ (by simpa using hqb.norm_le (mem_univ x)) (by + rw [fderiv_add (hf.differentiable (by simp) x) (hq.differentiable (by simp) x)] + simpa using hq₁) + refine ⟨hh.1,?_⟩ + have hs : HasFDerivAt (fun y => f y+q y) (fderiv ℝ f x+fderiv ℝ q x) x := + (hf.differentiable (by simp) x).hasFDerivAt.add + (hq.differentiable (by simp) x).hasFDerivAt + have hg := ((safeRadialNormalize_smooth.differentiable (by simp) (f x+q x)).hasFDerivAt.comp x hs).sub + ((safeRadialNormalize_smooth.differentiable (by simp) (f x)).hasFDerivAt.comp x + (hf.differentiable (by simp) x).hasFDerivAt) + have hdf : fderiv ℝ (fun y => safeRadialNormalize (f y+q y)-safeRadialNormalize (f y)) x = + (fderiv ℝ safeRadialNormalize (f x+q x)).comp (fderiv ℝ f x+fderiv ℝ q x)- + (fderiv ℝ safeRadialNormalize (f x)).comp (fderiv ℝ f x) := hg.fderiv + rw [hdf] + have hs' : fderiv ℝ (f+q) x = fderiv ℝ f x+fderiv ℝ q x := hs.fderiv + rw [hs'] at hh + exact hh.2 + intro j hj x hx + interval_cases j + · simpa using (hpoint x).1 + · simpa only [one_pow,one_mul,iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] using (hpoint x).2 + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeRadialNormalization.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeRadialNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c3319f37fe3bd2bf1a892ab3b0a6f928037cd48 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SafeRadialNormalization.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection +import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct + +namespace OAI + +/-! A globally smooth extension of radial normalization that agrees with it +outside the half-unit ball. Only this fixed extension is used in atlas bounds. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +def normalizationCutoff : ContDiffBump (0 : Space) where + rIn := 1/4 + rOut := 1/2 + rIn_pos := by norm_num + rIn_lt_rOut := by norm_num + +def safeRadialNormalize (x : Space) : Space := + (1-normalizationCutoff x) • radialNormalize x + +lemma safeRadialNormalize_eq {x : Space} (hx : (1/2 : ℝ) ≤ ‖x‖) : + safeRadialNormalize x = radialNormalize x := by + have hz : normalizationCutoff x = 0 := normalizationCutoff.zero_of_le_dist + (by simpa only [normalizationCutoff,dist_zero_right] using hx) + simp [safeRadialNormalize,hz] + +lemma safeRadialNormalize_smooth : ContDiff ℝ ∞ safeRadialNormalize := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x = 0 + · subst x + have hz : ContDiffAt ℝ ∞ (fun _ : Space => (0 : Space)) 0 := contDiffAt_const + apply hz.congr_of_eventuallyEq + have he : normalizationCutoff =ᶠ[𝓝 (0 : Space)] (fun _ => (1 : ℝ)) := + normalizationCutoff.eventuallyEq_one + filter_upwards [he] with y hy + simp [safeRadialNormalize,hy] + · exact (contDiffAt_const.sub normalizationCutoff.contDiff.contDiffAt).smul + (radialNormalize_smoothAt hx) + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SardDimensionStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SardDimensionStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..00ce05a8b1de2fa8dad58fce007055fa5d27b37a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SardDimensionStep.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RegularCoordinateSard +import OAI.Geometry.SurfaceImmersion.Atlas.TargetCoordinateChoice +import OAI.Geometry.SurfaceImmersion.Geometry.LinearEquivNullImage + +namespace OAI + +/-! The single dimension-reduction step needed to pass from the proved +scalar surface Sard statement to the three- and four-dimensional pair +charts. All hypotheses of the lower-dimensional statement are explicit. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology ENNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E H F G : Type*} + [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + [NormedAddCommGroup H] [NormedSpace ℝ H] [FiniteDimensional ℝ H] + [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] [FiniteDimensional ℝ G] + [MeasureSpace F] [BorelSpace F] [Measure.IsAddHaarMeasure (volume : Measure F)] + [MeasureSpace G] [BorelSpace G] [Measure.IsAddHaarMeasure (volume : Measure G)] + +theorem sard_dimension_step + (hdomain : Module.finrank ℝ E = Module.finrank ℝ H + 1) + (htarget : Module.finrank ℝ F = Module.finrank ℝ G + 1) + (hsmall : (Module.finrank ℝ E : ℝ≥0∞)/2 < Module.finrank ℝ F) + (hsard : ∀ (g : H → G) (V : Set H), IsOpen V → ContDiffOn ℝ ∞ g V → + volume (g '' {x | x ∈ V ∧ ¬ Function.Surjective (fderiv ℝ g x)}) = 0) + {f : E → F} (hf : ContDiff ℝ ∞ f) : + volume (f '' {x | ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + let C : Set E := {x | ¬ Function.Surjective (fderiv ℝ f x) ∧ fderiv ℝ f x ≠ 0} + have hC : volume (f '' C) = 0 := by + apply null_image_of_locally_null + intro p hp + obtain ⟨e,he⟩ := target_coordinate_choice htarget (fderiv ℝ f p) hp.2 + let g : E → ℝ × G := e ∘ f + have hg : ContDiff ℝ ∞ g := e.contDiff.comp hf + have hd (x : E) : fderiv ℝ g x = e.toContinuousLinearMap.comp (fderiv ℝ f x) := + (e.hasFDerivAt.comp x (hf.differentiable (by simp) x).hasFDerivAt).fderiv + have hgp : fderiv ℝ (fun x => (g x).1) p ≠ 0 := by + rw [fderiv.fst (hg.differentiable (by simp) p),hd] + exact he + obtain ⟨U,hU,hpU,hnull⟩ := regular_coordinate_critical_local_null hdomain hsard hg p hgp + have hbad (x : E) (hx : ¬ Function.Surjective (fderiv ℝ f x)) : + ¬ Function.Surjective (fderiv ℝ g x) := by + intro hs + apply hx + intro y + obtain ⟨v,hv⟩ := hs (e y) + rw [hd] at hv + exact ⟨v,e.injective hv⟩ + have him : volume (e '' (f '' (C ∩ U))) = 0 := by + apply measure_mono_null _ hnull + rintro y ⟨z,⟨x,hx,rfl⟩,rfl⟩ + exact ⟨x,⟨hbad x hx.1.1,hx.2⟩,rfl⟩ + refine ⟨U,hU,hpU,?_⟩ + let : Measure.IsAddHaarMeasure (volume : Measure (ℝ × G)) := by + change Measure.IsAddHaarMeasure ((volume : Measure ℝ).prod (volume : Measure G)) + exact Measure.prod.instIsAddHaarMeasure _ _ + have hh := linear_equiv_null_image e.symm (volume : Measure (ℝ × G)) (volume : Measure F) him + simpa only [e.symm_image_image] using hh + have hzero := flat_first_image_null volume hf hsmall + apply measure_mono_null (image_mono (show {x | ¬ Function.Surjective (fderiv ℝ f x)} ⊆ + {x | fderiv ℝ f x = 0} ∪ C from ?_)) + · rw [image_union] + exact measure_union_null hzero hC + · intro x hx + by_cases h : fderiv ℝ f x = 0 + · exact Or.inl h + · exact Or.inr ⟨hx,h⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarCriticalCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarCriticalCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..93e11bba515d7d0fcef867420576b1138a21073b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarCriticalCurve.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.OneFiberChart +import OAI.Geometry.SurfaceImmersion.Geometry.LocalNullImage + +namespace OAI + +/-! Near a nonzero derivative, the zero set is a curve. The critical +values of a scalar function restricted to this curve are null. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem scalar_critical_curve_local_null {f g : Base → ℝ} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (p : Base) + (hdg : fderiv ℝ g p ≠ 0) : + ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + volume (f '' ({x | fderiv ℝ f x = 0 ∧ g x = 0} ∩ U)) = 0 := by + have hs : Function.Surjective (fderiv ℝ g p) := + surjective_of_nonzero_of_finrank_eq_one (by simp : Module.finrank ℝ ℝ = 1) + (show (fderiv ℝ g p).toLinearMap ≠ 0 from fun h => hdg (by ext x; exact congrArg (fun L => L x) h)) + obtain ⟨e,hpe,he,hsm,hinv⟩ := one_fiber_submersion_chart (by simp [Base]) hg p hs + let τ : ℝ → ℝ × ℝ := fun t => (0,t) + have hτ : ContDiff ℝ ∞ τ := contDiff_const.prodMk contDiff_id + let h : ℝ → ℝ := f ∘ e.symm ∘ τ + let S : Set ℝ := {t | τ t ∈ e.target ∧ fderiv ℝ f (e.symm (τ t)) = 0} + have hh (t : ℝ) (ht : t ∈ S) : HasFDerivAt h (0 : ℝ →L[ℝ] ℝ) t := by + have hi : DifferentiableAt ℝ e.symm (τ t) := + (hinv.contDiffAt (e.open_target.mem_nhds ht.1)).differentiableAt (by simp) + have hf0 : HasFDerivAt f (0 : Base →L[ℝ] ℝ) (e.symm (τ t)) := by + simpa only [ht.2] using (hf.differentiable (by simp) (e.symm (τ t))).hasFDerivAt + simpa only [ContinuousLinearMap.zero_comp] using + hf0.comp t (hi.hasFDerivAt.comp t (hτ.differentiable (by simp) t).hasFDerivAt) + have hn : volume (h '' S) = 0 := + addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun _ => (0 : ℝ →L[ℝ] ℝ)) + (fun t ht => (hh t ht).hasFDerivWithinAt) (by simp) + refine ⟨e.source,e.open_source,hpe,measure_mono_null ?_ hn⟩ + rintro y ⟨x,⟨hx,hxe⟩,rfl⟩ + have ht : τ ((e x).2) = e x := by + apply Prod.ext + · exact (he x |>.trans hx.2).symm + · rfl + refine ⟨(e x).2,?_,?_⟩ + · change τ ((e x).2) ∈ e.target ∧ fderiv ℝ f (e.symm (τ ((e x).2))) = 0 + rw [ht,e.left_inv hxe] + exact ⟨e.map_source hxe,hx.1⟩ + · change f (e.symm (τ ((e x).2))) = f x + rw [ht,e.left_inv hxe] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFastRemainderBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFastRemainderBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c73beb5069aecaded476db002e775bd28d79c519 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFastRemainderBounds.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FastPhaseBounds +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialScalar + +namespace OAI + +/-! The finite high-order metric tail has the required `z^L` gain after +fast evaluation, with a slow-scale loss independent of derivative order. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open LocalPeriodicExpansion WeightedEstimates + +theorem compact_scalar_fast_bound {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : Expression) (he : e.SmoothCoeffs O) + (ℓ : Base →L[ℝ] ℝ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s z : ℝ), + 0 < z → z ≤ s → s ≤ 1 → ContDiff ℝ ∞ G → + Set.MapsTo (lowJet G) S K → WeightedBound S s (m + e.order) B (lowJet G) → + ∀ (U : Family S ℝ), Represents G e U → + WeightedBound S z m (D / s ^ e.loss) (U.fastValue ℓ z) := by + obtain ⟨D, hD, hd⟩ := compact_periodic_fast_bound S.isOpen hO hK hKO e he ℓ m B hB + exact ⟨D, hD, fun G s z hz hzs hs1 hG hGK hb U hR => + hd G s z hz hzs hs1 hG hGK hb (fun p t => U.val p t) hR⟩ + +/-- This is the finite-tail estimate used for the pullback-metric error. +Every coefficient is an actual represented family; its derivatives are not +postulated as hypotheses. -/ +theorem compact_tail_bound {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (R : ℕ → Expression) (hRs : ∀ r, (R r).SmoothCoeffs O) (L T N d : ℕ) + (hN : ∀ r ∈ Finset.Ico L T, (R r).order ≤ N) + (hd : ∀ r ∈ Finset.Ico L T, (R r).loss ≤ d) + (ℓ : Base →L[ℝ] ℝ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s z : ℝ), + 0 < z → z ≤ s → s ≤ 1 → ContDiff ℝ ∞ G → + Set.MapsTo (lowJet G) S K → WeightedBound S s (m + N) B (lowJet G) → + ∀ (U : ℕ → Family S ℝ), (∀ r ∈ Finset.Ico L T, Represents G (R r) (U r)) → + WeightedBound S z m (D * z ^ L / s ^ d) + (fun p => ∑ r ∈ Finset.Ico L T, z ^ r * (U r).fastValue ℓ z p) := by + classical + have hex := fun r => compact_scalar_fast_bound (S := S) hO hK hKO (R r) (hRs r) ℓ m B hB + choose C hC hc using hex + refine ⟨∑ r ∈ Finset.Ico L T, C r, Finset.sum_nonneg (fun r _ => hC r), ?_⟩ + intro G s z hz hzs hs1 hG hGK hb U hrep + have hs : 0 < s := hz.trans_le hzs + have hz1 : z ≤ 1 := hzs.trans hs1 + have hterm (r : ℕ) (hr : r ∈ Finset.Ico L T) : + WeightedBound S z m (C r * z ^ L / s ^ d) + (fun p => z ^ r • (U r).fastValue ℓ z p) := by + have hh := hc r G s z hz hzs hs1 hG hGK + (hb.mono_order (Nat.add_le_add_left (hN r hr) m)) (U r) (hrep r hr) + have hh' : WeightedBound S z m (C r / s ^ d) ((U r).fastValue ℓ z) := + hh.mono_const (div_le_div_of_nonneg_left (hC r) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (hd r hr))) + have hmul := hh'.const_smul S.isOpen.uniqueDiffOn ((U r).fastValue_smooth ℓ z) (z ^ r) + apply hmul.mono_const + rw [abs_of_nonneg (pow_nonneg hz.le _)] + calc + z ^ r * (C r / s ^ d) ≤ z ^ L * (C r / s ^ d) := + mul_le_mul_of_nonneg_right + (pow_le_pow_of_le_one hz.le hz1 (Finset.mem_Ico.mp hr).1) + (div_nonneg (hC r) (pow_nonneg hs.le _)) + _ = C r * z ^ L / s ^ d := by ring + have hh := WeightedBound.finset_sum S.isOpen.uniqueDiffOn hz.le (Finset.Ico L T) + (fun r => C r * z ^ L / s ^ d) (fun r p => z ^ r • (U r).fastValue ℓ z p) + (fun r _ => (contDiffOn_const (c := z ^ r)).smul ((U r).fastValue_smooth ℓ z)) hterm + have heq : (∑ r ∈ Finset.Ico L T, C r * z ^ L / s ^ d) = + (∑ r ∈ Finset.Ico L T, C r) * z ^ L / s ^ d := by + rw [← Finset.sum_div, ← Finset.sum_mul] + rw [heq] at hh + simpa only [smul_eq_mul] using hh + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatCriticalValues.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatCriticalValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d900fb97a2c6d4bd536a1486c26e19655fec5e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatCriticalValues.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarFlatHolder + +namespace OAI + +/-! The image of the flat second-jet stratum of a smooth scalar surface +function is null. No Sard hypothesis is used. -/ +noncomputable section +open Set Filter Metric MeasureTheory +open scoped ContDiff Topology NNReal ENNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem scalarFlatTwo_image_dimH {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) : + dimH (f '' scalarFlatTwo f) ≤ (2 : ℝ≥0∞)/3 := by + have hholder : dimH (f '' scalarFlatTwo f) ≤ dimH (scalarFlatTwo f)/(3 : ℝ≥0∞) := by + apply dimH_image_le_of_locally_holder_on (by norm_num : (0 : ℝ≥0) < 3) + intro p hp + obtain ⟨C,hC⟩ := scalarFlatTwo_local_holder hf p + refine ⟨C,scalarFlatTwo f ∩ ball p (1/4),?_,hC⟩ + exact inter_mem_nhdsWithin _ (ball_mem_nhds _ (by norm_num)) + have hdim : dimH (scalarFlatTwo f) ≤ (2 : ℝ≥0∞) := by + have h := dimH_mono (subset_univ (scalarFlatTwo f)) + simpa [Base,Real.dimH_univ_pi_fin] using h + exact hholder.trans (ENNReal.div_le_div_right hdim _) + +theorem scalarFlatTwo_image_volume_zero {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) : + volume (f '' scalarFlatTwo f) = 0 := by + have hd : dimH (f '' scalarFlatTwo f) < (1 : ℝ≥0∞) := + (scalarFlatTwo_image_dimH hf).trans_lt (by + rw [ENNReal.div_lt_iff (Or.inl (by norm_num : (3 : ℝ≥0∞) ≠ 0)) (Or.inl (by simp))] + norm_num) + have hm := hausdorffMeasure_of_dimH_lt (d := (1 : ℝ≥0)) hd + simpa using hm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatHolder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatHolder.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c60d17d393f61d5b6a67386af0660ed282273b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatHolder.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarFlatTaylor +import Mathlib.Topology.MetricSpace.HausdorffDimension + +namespace OAI + +/-! The flat second-jet stratum of a smooth scalar surface function has +locally cubic Hölder control. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology NNReal ENNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance holderFirstNormed : NormedAddCommGroup (Base →L[ℝ] ℝ) := inferInstance +local instance holderFirstSpace : NormedSpace ℝ (Base →L[ℝ] ℝ) := inferInstance +local instance holderSecondNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance holderSecondSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance holderThirdNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance holderThirdSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance + +def scalarFlatTwo (f : Base → ℝ) : Set Base := + {x | fderiv ℝ f x = 0 ∧ fderiv ℝ (fderiv ℝ f) x = 0} + +theorem scalarFlatTwo_local_holder {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) (p : Base) : + ∃ C : ℝ≥0, HolderOnWith C 3 f (scalarFlatTwo f ∩ ball p (1/4)) := by + have hD := hf.fderiv_right (m := ∞) (by simp) + have hDD := hD.fderiv_right (m := ∞) (by simp) + have hc := hDD.continuous_fderiv (by simp) + obtain ⟨M,hM⟩ := (isCompact_closedBall p 1).exists_bound_of_continuousOn hc.continuousOn + let C : ℝ≥0 := ⟨max M 0,le_max_right _ _⟩ + refine ⟨C,?_⟩ + intro x hx y hy + have hsub : closedBall y ‖x-y‖ ⊆ closedBall p 1 := by + intro z hz + have hzp := dist_triangle z y p + have hxy := dist_triangle x p y + have hz' : dist z y ≤ dist x y := by simpa only [mem_closedBall,dist_eq_norm] using hz + have hxp : dist x p < 1/4 := hx.2 + have hyp : dist y p < 1/4 := hy.2 + rw [dist_comm p y] at hxy + change dist z p ≤ 1 + linarith + have hbound : ‖f x-f y‖ ≤ (C:ℝ)*‖x-y‖^3 := + scalar_flat_cubic_bound hf y x hy.1.1 hy.1.2 C.2 (fun z hz => + (hM z (hsub hz)).trans (le_max_left _ _)) + change edist (f x) (f y) ≤ (C : ℝ≥0∞)*edist x y ^ (3 : ℝ) + rw [edist_dist,edist_dist,show (3 : ℝ) = (3 : ℕ) by norm_num,ENNReal.rpow_natCast] + have he := ENNReal.ofReal_le_ofReal hbound + rw [ENNReal.ofReal_mul (p := (C:ℝ)) C.2, + ENNReal.ofReal_pow (norm_nonneg (x-y)) 3,ENNReal.ofReal_coe_nnreal] at he + simpa only [dist_eq_norm] using he + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatTaylor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatTaylor.lean new file mode 100644 index 0000000000000000000000000000000000000000..19b112c9f0bd69e059a9c7b1e78cacb82b651759 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarFlatTaylor.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusArc + +namespace OAI + +/-! A cubic remainder estimate at a scalar flat second jet. This is the +low-dimensional flat-stratum estimate needed for double-locus regularity. -/ +noncomputable section +open Set Metric +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance scalarFirstNormed : NormedAddCommGroup (Base →L[ℝ] ℝ) := inferInstance +local instance scalarFirstSpace : NormedSpace ℝ (Base →L[ℝ] ℝ) := inferInstance +local instance scalarSecondNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance scalarSecondSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance scalarThirdNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance scalarThirdSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance + +lemma scalar_flat_cubic_bound {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) + (x y : Base) (hfirst : fderiv ℝ f x = 0) + (hsecond : fderiv ℝ (fderiv ℝ f) x = 0) {M : ℝ} (hM : 0 ≤ M) + (hthird : ∀ z ∈ closedBall x ‖y-x‖, + ‖fderiv ℝ (fderiv ℝ (fderiv ℝ f)) z‖ ≤ M) : + ‖f y-f x‖ ≤ M*‖y-x‖^3 := by + let d := ‖y-x‖ + have hd : 0 ≤ d := norm_nonneg _ + let B := closedBall x d + have hx : x ∈ B := mem_closedBall_self hd + have hy : y ∈ B := by simp only [B,d,mem_closedBall,dist_eq_norm,le_refl] + have hD := hf.fderiv_right (m := ∞) (by simp) + have hDD := hD.fderiv_right (m := ∞) (by simp) + have hsecond_bound (z : Base) (hz : z ∈ B) : + ‖fderiv ℝ (fderiv ℝ f) z‖ ≤ M*d := by + have h := (convex_closedBall x d).norm_image_sub_le_of_norm_fderiv_le + (fun w _ => hDD.differentiable (by simp) w) hthird hx hz + rw [hsecond,sub_zero] at h + apply h.trans + exact mul_le_mul_of_nonneg_left (mem_closedBall.mp hz) hM + have hfirst_bound (z : Base) (hz : z ∈ B) : ‖fderiv ℝ f z‖ ≤ (M*d)*d := by + have h := (convex_closedBall x d).norm_image_sub_le_of_norm_fderiv_le + (fun w _ => hD.differentiable (by simp) w) hsecond_bound hx hz + rw [hfirst,sub_zero] at h + apply h.trans + exact mul_le_mul_of_nonneg_left (mem_closedBall.mp hz) (mul_nonneg hM hd) + have h := (convex_closedBall x d).norm_image_sub_le_of_norm_fderiv_le + (fun w _ => hf.differentiable (by simp) w) hfirst_bound hx hy + calc + _ ≤ (M*d*d)*‖y-x‖ := h + _ = M*‖y-x‖^3 := by dsimp [d]; ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarJetTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarJetTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..567363ad7b0427b27043cfce4274d2a9054126ca --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarJetTransport.lean @@ -0,0 +1,221 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinatePolynomialPullback + +namespace OAI + +/-! Exact finite jet-polynomial transport under multiplication by a fixed +smooth scalar function. This accounts for the atlas outer cutoffs before +coordinate transport. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial + +lemma coordinatePartial_mul {a f : Base → ℝ} + (ha : ContDiff ℝ ∞ a) (hf : ContDiff ℝ ∞ f) (v : Fin 2) (x : Base) : + coordinatePartial (fun y => a y * f y) v x = + a x * coordinatePartial f v x + f x * coordinatePartial a v x := by + change fderiv ℝ (fun y => a y * f y) x (coordinateVector v) = _ + rw [fderiv_fun_mul (ha.differentiable (by simp) x) (hf.differentiable (by simp) x)] + simp only [add_apply,smul_apply,smul_eq_mul] + rfl + +lemma coordinatePartial_coordinatePartial_mul {a f : Base → ℝ} + (ha : ContDiff ℝ ∞ a) (hf : ContDiff ℝ ∞ f) (v w : Fin 2) (x : Base) : + coordinatePartial (coordinatePartial (fun y => a y * f y) w) v x = + a x * coordinatePartial (coordinatePartial f w) v x + + coordinatePartial f w x * coordinatePartial a v x + + coordinatePartial a w x * coordinatePartial f v x + + f x * coordinatePartial (coordinatePartial a w) v x := by + have he : coordinatePartial (fun y => a y * f y) w = + fun y => a y * coordinatePartial f w y + f y * coordinatePartial a w y := + funext (coordinatePartial_mul ha hf w) + change fderiv ℝ (coordinatePartial (fun y => a y * f y) w) x (coordinateVector v) = _ + rw [he,fderiv_fun_add + ((ha.mul (coordinatePartial_smooth hf w)).differentiable (by simp) x) + ((hf.mul (coordinatePartial_smooth ha w)).differentiable (by simp) x)] + simp only [add_apply] + change coordinatePartial (fun y => a y * coordinatePartial f w y) v x + + coordinatePartial (fun y => f y * coordinatePartial a w y) v x = _ + rw [coordinatePartial_mul ha (coordinatePartial_smooth hf w), + coordinatePartial_mul hf (coordinatePartial_smooth ha w)] + ring + +def scalarJetFirst (a : Base → ℝ) (x : Base) (J : LowJet) (v : Fin 2) (k : Fin 4) : ℝ := + a x * J (.inr (firstJetSlot v,k)) + J (.inr (0,k)) * coordinatePartial a v x + +def scalarJetSecond (a : Base → ℝ) (x : Base) (J : LowJet) + (v w : Fin 2) (k : Fin 4) : ℝ := + a x * J (.inr (secondJetSlot v w,k)) + + J (.inr (firstJetSlot w,k)) * coordinatePartial a v x + + coordinatePartial a w x * J (.inr (firstJetSlot v,k)) + + J (.inr (0,k)) * coordinatePartial (coordinatePartial a w) v x + +/-- Multiplication preserves the position slots and transforms the value, +first derivatives, and ordered second derivatives by the product rule. -/ +def lowJetScalarProduct (a : Base → ℝ) (p : Base × LowJet) : LowJet + | .inl i => p.1 i + | .inr (w,k) => ![a p.1 * p.2 (.inr (0,k)), + scalarJetFirst a p.1 p.2 0 k, + scalarJetFirst a p.1 p.2 1 k, + scalarJetSecond a p.1 p.2 0 0 k, + scalarJetSecond a p.1 p.2 0 1 k, + scalarJetSecond a p.1 p.2 1 0 k, + scalarJetSecond a p.1 p.2 1 1 k] w + +lemma scalarJetFirst_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (v : Fin 2) (k : Fin 4) : + ContDiff ℝ ∞ (fun p : Base × LowJet => scalarJetFirst a p.1 p.2 v k) := by + exact ((ha.comp contDiff_fst).mul + ((ContinuousLinearMap.proj (.inr (firstJetSlot v,k)) : LowJet →L[ℝ] ℝ).contDiff.comp contDiff_snd)).add + (((ContinuousLinearMap.proj (.inr (0,k)) : LowJet →L[ℝ] ℝ).contDiff.comp contDiff_snd).mul + ((coordinatePartial_smooth ha v).comp contDiff_fst)) + +lemma scalarJetSecond_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (v w : Fin 2) (k : Fin 4) : + ContDiff ℝ ∞ (fun p : Base × LowJet => scalarJetSecond a p.1 p.2 v w k) := by + have hp (i : Fin 7) : ContDiff ℝ ∞ (fun p : Base × LowJet => p.2 (.inr (i,k))) := + (ContinuousLinearMap.proj (.inr (i,k)) : LowJet →L[ℝ] ℝ).contDiff.comp contDiff_snd + exact ((((ha.comp contDiff_fst).mul (hp (secondJetSlot v w))).add + ((hp (firstJetSlot w)).mul ((coordinatePartial_smooth ha v).comp contDiff_fst))).add + (((coordinatePartial_smooth ha w).comp contDiff_fst).mul (hp (firstJetSlot v)))).add + ((hp 0).mul ((coordinatePartial_smooth (coordinatePartial_smooth ha w) v).comp contDiff_fst)) + +lemma lowJetScalarProduct_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) : + ContDiff ℝ ∞ (lowJetScalarProduct a) := by + apply contDiff_pi.mpr + intro i + cases i with + | inl i => + exact (ContinuousLinearMap.proj i : Base →L[ℝ] ℝ).contDiff.comp + (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : Base × LowJet → Base)) + | inr i => + rcases i with ⟨w,k⟩ + fin_cases w + · have hp : ContDiff ℝ ∞ + (fun p : Base × LowJet => p.2 (Sum.inr ((0 : Fin 7),k))) := + (ContinuousLinearMap.proj (Sum.inr ((0 : Fin 7),k) : LowIndex) : LowJet →L[ℝ] ℝ).contDiff.comp + (contDiff_snd : ContDiff ℝ ∞ (Prod.snd : Base × LowJet → LowJet)) + exact (ha.comp + (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : Base × LowJet → Base))).mul hp + · exact scalarJetFirst_smooth ha 0 k + · exact scalarJetFirst_smooth ha 1 k + · exact scalarJetSecond_smooth ha 0 0 k + · exact scalarJetSecond_smooth ha 0 1 k + · exact scalarJetSecond_smooth ha 1 0 k + · exact scalarJetSecond_smooth ha 1 1 k + +lemma lowJetScalarProduct_eval {a : Base → ℝ} {G : Base → Space} + (ha : ContDiff ℝ ∞ a) (hG : ContDiff ℝ ∞ G) (x : Base) : + lowJetScalarProduct a (x,lowJet G x) = lowJet (fun y => a y • G y) x := by + funext i + cases i with + | inl i => rfl + | inr i => + rcases i with ⟨w,k⟩ + have hfirst (v : Fin 2) : scalarJetFirst a x (lowJet G x) v k = + coordinatePartial (fun y => a y * G y k) v x := by + rw [coordinatePartial_mul ha (contDiff_pi.mp hG k)] + simp only [scalarJetFirst,lowJet_first_slot] + rfl + have hsecond (v w : Fin 2) : scalarJetSecond a x (lowJet G x) v w k = + coordinatePartial (coordinatePartial (fun y => a y * G y k) w) v x := by + rw [coordinatePartial_coordinatePartial_mul ha (contDiff_pi.mp hG k)] + simp only [scalarJetSecond,lowJet_first_slot,lowJet_second_slot] + rfl + fin_cases w + · rfl + · exact hfirst 0 + · exact hfirst 1 + · exact hsecond 0 0 + · exact hsecond 0 1 + · exact hsecond 1 0 + · exact hsecond 1 1 + +/-- The smooth coefficient substitution needs no separate position input +because an actual low jet already stores its base point. -/ +def scalarLowJetSubstitution (a : Base → ℝ) (J : LowJet) : LowJet := + lowJetScalarProduct a (lowPosition J,J) + +lemma scalarLowJetSubstitution_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) : + ContDiff ℝ ∞ (scalarLowJetSubstitution a) := + (lowJetScalarProduct_smooth ha).comp (lowPosition.contDiff.prodMk contDiff_id) + +@[simp] lemma scalarLowJetSubstitution_eval {a : Base → ℝ} {G : Base → Space} + (ha : ContDiff ℝ ∞ a) (hG : ContDiff ℝ ∞ G) (x : Base) : + scalarLowJetSubstitution a (lowJet G x) = lowJet (fun y => a y • G y) x := by + simpa only [scalarLowJetSubstitution,lowPosition_lowJet] using lowJetScalarProduct_eval ha hG x + +/-- Every ordered derivative of the scalar product is a finite expression. +Repeated formal slow differentiation supplies the exact Leibniz expansion. -/ +def scalarProductAtom (a : Base → ℝ) : List (Fin 2) → Fin 4 → Expression + | [],k => .atom [] k (.coeff (fun z => a (lowPosition z.1))) + | v::w,k => (scalarProductAtom a w k).slow v + +lemma scalarProductAtom_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (w : List (Fin 2)) (k : Fin 4) : (scalarProductAtom a w k).SmoothCoeffs univ := by + induction w with + | nil => exact (ha.comp (lowPosition.contDiff.comp contDiff_fst)).contDiffOn + | cons v w ih => exact Expression.smoothCoeffs_slow isOpen_univ v ih + +lemma scalarProductAtom_eval {a : Base → ℝ} {G : Base → Space} + (ha : ContDiff ℝ ∞ a) (hG : ContDiff ℝ ∞ G) + (w : List (Fin 2)) (k : Fin 4) (t : ℝ) (x : Base) : + (scalarProductAtom a w k).eval G (x,t) = jet (fun y => a y • G y) w k x := by + induction w generalizing x with + | nil => + change G x k * a (lowPosition (lowJet G x)) = a x * G x k + rw [lowPosition_lowJet] + ring + | cons v w ih => + rw [scalarProductAtom,Expression.eval_slow isOpen_univ isOpen_univ hG + (mapsTo_univ _ _) v (scalarProductAtom_smooth ha w k) (mem_univ x) t] + have he : (fun y => (scalarProductAtom a w k).eval G (y,t)) = + jet (fun y => a y • G y) w k := funext ih + rw [he] + rfl + +namespace Expression + +/-- Substitute the complete finite jet polynomial of the fixed scalar +product, including positional low-jet coefficients. -/ +def scalarProductPullback (a : Base → ℝ) : Expression → Expression + | .coeff c => .coeff (fun z => c (scalarLowJetSubstitution a z.1,z.2)) + | .atom w k e => (scalarProductAtom a w k).mul (scalarProductPullback a e) + | .add e f => .add (scalarProductPullback a e) (scalarProductPullback a f) + +lemma scalarProductPullback_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + {e : Expression} (he : e.SmoothCoeffs univ) : + (scalarProductPullback a e).SmoothCoeffs univ := by + induction e with + | coeff c => + have hc : ContDiff ℝ ∞ c := + contDiffOn_univ.mp (by simpa only [SmoothCoeffs,univ_prod_univ] using he) + exact (hc.comp (((scalarLowJetSubstitution_smooth ha).comp contDiff_fst).prodMk + contDiff_snd)).contDiffOn + | atom w k e ih => exact smoothCoeffs_mul (scalarProductAtom_smooth ha w k) (ih he) + | add e f ihe ihf => exact ⟨ihe he.1,ihf he.2⟩ + +lemma scalarProductPullback_eval {a : Base → ℝ} {G : Base → Space} + (ha : ContDiff ℝ ∞ a) (hG : ContDiff ℝ ∞ G) (e : Expression) (t : ℝ) (x : Base) : + (scalarProductPullback a e).eval G (x,t) = e.eval (fun y => a y • G y) (x,t) := by + induction e with + | coeff c => + change c (scalarLowJetSubstitution a (lowJet G x),t) = _ + rw [scalarLowJetSubstitution_eval ha hG] + rfl + | atom w k e ih => + rw [scalarProductPullback,eval_mul,scalarProductAtom_eval ha hG,ih] + rfl + | add e f ihe ihf => + change (scalarProductPullback a e).eval G (x,t) + + (scalarProductPullback a f).eval G (x,t) = _ + rw [ihe,ihf] + rfl + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarNonflatCriticalValues.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarNonflatCriticalValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc71f3514deac5adfe173e6eaa8d53d3cf1ffe63 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScalarNonflatCriticalValues.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarCriticalCurve + +namespace OAI + +/-! Nonflat critical scalar jets lie on regular level curves of a +first derivative; one-dimensional critical-value nullity applies. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance nonflatFirstNormed : NormedAddCommGroup (Base →L[ℝ] ℝ) := inferInstance +local instance nonflatFirstSpace : NormedSpace ℝ (Base →L[ℝ] ℝ) := inferInstance +local instance nonflatSecondNormed : NormedAddCommGroup (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance +local instance nonflatSecondSpace : NormedSpace ℝ (Base →L[ℝ] Base →L[ℝ] ℝ) := inferInstance + +theorem scalar_nonflat_critical_image_null {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) : + volume (f '' {x | fderiv ℝ f x = 0 ∧ fderiv ℝ (fderiv ℝ f) x ≠ 0}) = 0 := by + apply null_image_of_locally_null + intro p hp + have hD := hf.fderiv_right (m := ∞) (by simp) + obtain ⟨v,hv⟩ := DFunLike.ne_iff.mp hp.2 + obtain ⟨w,hw⟩ := DFunLike.ne_iff.mp (show (fderiv ℝ (fderiv ℝ f) p) v ≠ 0 by simpa using hv) + let g : Base → ℝ := fun x => fderiv ℝ f x w + have hg : ContDiff ℝ ∞ g := hD.clm_apply contDiff_const + have hdg : fderiv ℝ g p ≠ 0 := by + intro hz + have hd := ((hD.differentiable (by simp) p).hasFDerivAt.clm_apply + (hasFDerivAt_const w p)).fderiv + have he := congrArg (fun L : Base →L[ℝ] ℝ => L v) (hz.symm.trans hd) + apply hw + simpa only [add_apply,ContinuousLinearMap.comp_apply, + ContinuousLinearMap.flip_apply,zero_apply,map_zero,add_zero,zero_add] using he.symm + obtain ⟨U,hU,hpU,hn⟩ := scalar_critical_curve_local_null hf hg p hdg + refine ⟨U,hU,hpU,measure_mono_null (image_mono ?_) hn⟩ + rintro x ⟨hx,hxU⟩ + exact ⟨⟨hx.1,by simp [g,hx.1]⟩,hxU⟩ + +theorem scalar_surface_critical_values_null {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) : + volume (f '' {x | fderiv ℝ f x = 0}) = 0 := by + have hsub : {x | fderiv ℝ f x = 0} ⊆ scalarFlatTwo f ∪ + {x | fderiv ℝ f x = 0 ∧ fderiv ℝ (fderiv ℝ f) x ≠ 0} := by + intro x hx + by_cases h : fderiv ℝ (fderiv ℝ f) x = 0 + · exact Or.inl ⟨hx,h⟩ + · exact Or.inr ⟨hx,h⟩ + apply measure_mono_null (image_mono hsub) + rw [image_union] + exact measure_union_null (scalarFlatTwo_image_volume_zero hf) + (scalar_nonflat_critical_image_null hf) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGlobalQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGlobalQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7d2967ddae3d6c0c8466890530a0374fa218f28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGlobalQuadraticCancellation.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.OverlapQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors + +namespace OAI + +/-! Explicit amplitude and residual powers in the global quadratic cancellation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance scaledGlobalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance scaledGlobalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance scaledGlobalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance scaledGlobalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance scaledGlobalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance scaledGlobalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem scaled_global_quadratic_cancellation + {n : A.centers → ℕ} + (P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression) : + ∃ Dv Dt : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a) + {τ : ℝ} {s : ℝ≥0} + (c : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → ∀ (δ : ℝ) (q : ℕ) + (b : A.centers → RealModes.QuadraticLabel ι → ℕ → ℝ), + (∀ k l m, (c k l).norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m + ≤ δ^2 * b k l m) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (δ^2 * (Dv m * ∑ k : A.centers, ∑ l, + (c k l).sizeFactor q m * b k l (PolynomialSolveData.inputOrder (P := P k) q m))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (δ^2 * (τ/s)^(q+1) * (Dt m * ∑ k : A.centers, ∑ l, + (c k l).residualFactor q m * b k l (PolynomialSolveData.inputOrder (P := P k) q m))) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) x))) := by + obtain ⟨Dv,Dt,hDv,hDt,h⟩ := A.global_quadratic_cancellation_on (ι := ι) P + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro F hF φ Z hφ hZ S hS hSZ τ s c hτ hs hτs hs1 δ q b hb + obtain ⟨W,hW,hsize,hres⟩ := h F hF φ Z hφ hZ S hS hSZ c hτ hs hτs hs1 q + refine ⟨W,hW,?_,?_⟩ + · intro m k + apply (hsize m k).mono_const + rw [mul_left_comm (δ^2)] + apply mul_le_mul_of_nonneg_left _ (hDv m) + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro l _ + exact (c i l).size_le_scaled (sq_nonneg δ) _ q m (hb i l _) + · intro m k + apply (hres m k).mono_const + have he : δ^2 * (τ/s)^(q+1) * (Dt m * ∑ i : A.centers, ∑ l, + (c i l).residualFactor q m * b i l (PolynomialSolveData.inputOrder (P := P i) q m)) = + Dt m * ∑ i : A.centers, ∑ l, δ^2 * (τ/s)^(q+1) * + ((c i l).residualFactor q m * b i l (PolynomialSolveData.inputOrder (P := P i) q m)) := by + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro l _ + ring + rw [he] + apply mul_le_mul_of_nonneg_left _ (hDt m) + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro l _ + have hh := (c i l).residual_le_scaled + (by simpa only [zero_div,add_zero] using div_nonneg hτ.le hs.le) _ q m (hb i l _) + simpa only [zero_div,add_zero] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGradientEstimates.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGradientEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0ee30bc5e2a9e3cb81bfbd6b88238d4e5392b1b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGradientEstimates.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GradientSeedEstimates + +namespace OAI + +/-! Extract the common small factor from the quadratic-mean error. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SmallModes +open WeightedEstimates + +lemma weighted_gradient_small_error {n : ℕ} {τ s η C D : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hη : 0 ≤ η) (hratio : τ / s ≤ η) (hC : 0 ≤ C) (hD : 0 ≤ D) + {Z V : Field n} (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hbZ : WeightedBound U s (m + 1) C Z) + (he : WeightedBound U s m (η * D) (fun p => Z p - V p)) + (v : Base) (hv : ‖v‖ ≤ 1) : + WeightedBound U s m (η * (C + D) / τ) + (fun p => gradientAmplitude τ Z v p - leadingDerivative τ V v p) := by + apply (weighted_gradient_seed_error hU hτ hs hC (mul_nonneg hη hD) hZ hV hbZ he v hv).mono_const + have hc : C / s ≤ η * C / τ := by + apply (le_div_iff₀ hτ).2 + calc + C / s * τ = (τ / s) * C := by ring + _ ≤ η * C := mul_le_mul_of_nonneg_right hratio hC + calc + C / s + η * D / τ ≤ η * C / τ + η * D / τ := add_le_add hc le_rfl + _ = _ := by ring + +lemma weighted_gradient_small {n : ℕ} {τ s η C D B : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hη : 0 ≤ η) (hη1 : η ≤ 1) (hratio : τ / s ≤ η) + (hC : 0 ≤ C) (hD : 0 ≤ D) (hB : 0 ≤ B) + {Z V : Field n} (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hbZ : WeightedBound U s (m + 1) C Z) + (he : WeightedBound U s m (η * D) (fun p => Z p - V p)) + (hbV : WeightedBound U s m B V) (v : Base) (hv : ‖v‖ ≤ 1) : + WeightedBound U s m ((C + D + B) / τ) (gradientAmplitude τ Z v) := by + have hg := weighted_gradient_small_error hU hτ hs hη hratio hC hD hZ hV hbZ he v hv + have hl := weighted_leadingDerivative hτ hU.uniqueDiffOn hs hB hV hbV v hv + have hh := hg.add hU.uniqueDiffOn hs.le + ((contDiffOn_gradientAmplitude hU hZ τ v).sub (contDiffOn_leadingDerivative τ hV v)) + (contDiffOn_leadingDerivative τ hV v) hl + apply (hh.congr (fun _ _ => (sub_add_cancel _ _).symm)).mono_const + calc + η * (C + D) / τ + B / τ ≤ (1 * (C + D)) / τ + B / τ := + add_le_add (div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right hη1 (add_nonneg hC hD)) hτ.le) le_rfl + _ = _ := by ring + +lemma weighted_mean_small_error {n : ℕ} {τ s η C D B C' D' B' : ℝ} {m : ℕ} + {U : Set Base} (hU : IsOpen U) (hτ : 0 < τ) (hs : 0 < s) + (hη : 0 ≤ η) (hη1 : η ≤ 1) (hratio : τ / s ≤ η) + (hC : 0 ≤ C) (hD : 0 ≤ D) (hB : 0 ≤ B) + (hC' : 0 ≤ C') (hD' : 0 ≤ D') (hB' : 0 ≤ B') + {Z V W Y : Field n} + (hZ : ContDiffOn ℝ ∞ Z U) (hV : ContDiffOn ℝ ∞ V U) + (hW : ContDiffOn ℝ ∞ W U) (hY : ContDiffOn ℝ ∞ Y U) + (hbZ : WeightedBound U s (m + 1) C Z) + (heZ : WeightedBound U s m (η * D) (fun p => Z p - V p)) + (hbV : WeightedBound U s m B V) + (hbW : WeightedBound U s (m + 1) C' W) + (heW : WeightedBound U s m (η * D') (fun p => W p - Y p)) + (hbY : WeightedBound U s m B' Y) + (v w : Base) (hv : ‖v‖ ≤ 1) (hw : ‖w‖ ≤ 1) : + WeightedBound U s m + ((n : ℝ) * 2 ^ m * ((C + D) * (C' + D' + B') + B * (C' + D')) * η / τ ^ 2) + (fun p => QuadraticMean.zeroPair (gradientAmplitude τ Z v p) (gradientAmplitude τ W w p) - + QuadraticMean.zeroPair (leadingDerivative τ V v p) (leadingDerivative τ Y w p)) := by + have he1 := weighted_gradient_small_error hU hτ hs hη hratio hC hD hZ hV hbZ heZ v hv + have he2 := weighted_gradient_small_error hU hτ hs hη hratio hC' hD' hW hY hbW heW w hw + have hw' := weighted_gradient_small hU hτ hs hη hη1 hratio hC' hD' hB' hW hY hbW heW hbY w hw + have hv' := weighted_leadingDerivative hτ hU.uniqueDiffOn hs hB hV hbV v hv + have hbound := QuadraticMean.weighted_zeroPair_error hU.uniqueDiffOn hs + (div_nonneg hB hτ.le) (div_nonneg (add_nonneg (add_nonneg hC' hD') hB') hτ.le) + (div_nonneg (mul_nonneg hη (add_nonneg hC hD)) hτ.le) + (div_nonneg (mul_nonneg hη (add_nonneg hC' hD')) hτ.le) + (contDiffOn_leadingDerivative τ hV v) (contDiffOn_leadingDerivative τ hY w) + (contDiffOn_gradientAmplitude hU hZ τ v) (contDiffOn_gradientAmplitude hU hW τ w) + hv' hw' he1 he2 + convert hbound using 1 + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGraphJoin.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGraphJoin.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbaf72033e30b7b1a31169fc2cfa3992d4c3584d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledGraphJoin.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.GraphJoinArc +import OAI.Geometry.SurfaceImmersion.Geometry.SmallGraphBlends + +namespace OAI + +/-! A graph corner can be rounded at an arbitrarily small horizontal scale. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def scaledGraphJoin (f g : ℝ → ℝ) (a b t : ℝ) : Base := + ![a+b*t,(1-centeredSmoothStep t)*f (a+b*t)+centeredSmoothStep t*g (a+b*t)] + +lemma scaledGraphJoin_smooth {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (a b : ℝ) : ContDiff ℝ ∞ (scaledGraphJoin f g a b) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun t => a+b*t) + fun_prop + · change ContDiff ℝ ∞ (fun t => (1-centeredSmoothStep t)*f (a+b*t)+centeredSmoothStep t*g (a+b*t)) + exact ((contDiff_const.sub centeredSmoothStep_smooth).mul (hf.comp (by fun_prop))).add + (centeredSmoothStep_smooth.mul (hg.comp (by fun_prop))) + +lemma scaledGraphJoin_injective (f g : ℝ → ℝ) (a : ℝ) {b : ℝ} (hb : b ≠ 0) : + Function.Injective (scaledGraphJoin f g a b) := by + intro t u he + have hx := congrFun he 0 + change a+b*t = a+b*u at hx + exact mul_left_cancel₀ hb (add_left_cancel hx) + +lemma scaledGraphJoin_regular {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (a : ℝ) {b : ℝ} (hb : b ≠ 0) (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (scaledGraphJoin f g a b) t) := by + have hC := (scaledGraphJoin_smooth hf hg a b).differentiable (by simp) t + have hc0 := hasDerivAt_pi.mp hC.hasDerivAt 0 + have hx : HasDerivAt (fun u : ℝ => a+b*u) b t := by + simpa only [id_eq,mul_one] using ((hasDerivAt_id t).const_mul b).const_add a + apply plane_curve_regular_of_hasDerivAt hC.hasDerivAt (i := 0) + rw [hc0.unique hx] + exact hb + +lemma scaledGraphJoin_eq_blend (f g : ℝ → ℝ) (a b t : ℝ) : + scaledGraphJoin f g a b t = (1-centeredSmoothStep t) • graphPoint f (a+b*t) + + centeredSmoothStep t • graphPoint g (a+b*t) := by + ext i + fin_cases i + · change a+b*t = (1-centeredSmoothStep t)*(a+b*t)+centeredSmoothStep t*(a+b*t) + ring + · rfl + +theorem scaled_graph_join_arc {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (a : ℝ) {b : ℝ} (hb : b ≠ 0) : + ∃ P : SmoothCompactArc 𝓘(ℝ,Base) Base, + P.start = -2 ∧ P.finish = 2 ∧ P.curve = scaledGraphJoin f g a b ∧ + P.curve =ᶠ[𝓝 P.start] (fun t => ![a+b*t,f (a+b*t)]) ∧ + P.curve =ᶠ[𝓝 P.finish] (fun t => ![a+b*t,g (a+b*t)]) := by + let P : SmoothCompactArc 𝓘(ℝ,Base) Base := + ⟨scaledGraphJoin f g a b,-2,2,by norm_num,univ,isOpen_univ,subset_univ _, + (scaledGraphJoin_smooth hf hg a b).contMDiff.contMDiffOn, + fun t _ => scaledGraphJoin_regular hf hg a hb t, + (scaledGraphJoin_injective f g a hb).injOn⟩ + refine ⟨P,rfl,rfl,rfl,?_,?_⟩ + · filter_upwards [eventually_lt_nhds (show (-2:ℝ) < -1 by norm_num)] with t ht + simp [P,scaledGraphJoin,centeredSmoothStep_zero ht.le] + · filter_upwards [eventually_gt_nhds (show (1:ℝ) < 2 by norm_num)] with t ht + simp [P,scaledGraphJoin,centeredSmoothStep_one ht.le] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledInitialMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledInitialMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..663cf0fbf7693795dfc06798672ff604aa746d4a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledInitialMap.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalMetricStep +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalMetricStepBound + +namespace OAI + +/-! The initial contraction of an approximate immersion. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance initialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance initialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +local instance initialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance initialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance initialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance initialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +lemma inducedTensor_const_smul {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (a : ℝ) : + inducedTensor (a • F) = a^2 • inducedTensor F := by + funext p + ext v w + have hd : (mfderiv planeModel spaceModel (a • F) p : Plane →L[ℝ] Space) = + a • (mfderiv planeModel spaceModel F p : Plane →L[ℝ] Space) := + const_smul_mfderiv ((hF p).mdifferentiableAt (by simp)) a + change inner ℝ ((mfderiv planeModel spaceModel (a • F) p : Plane →L[ℝ] Space) v) + ((mfderiv planeModel spaceModel (a • F) p : Plane →L[ℝ] Space) w) = + a^2*inner ℝ (mfderiv planeModel spaceModel F p v) (mfderiv planeModel spaceModel F p w) + have hv := congrArg (fun L : Plane →L[ℝ] Space => L (show Plane from v)) hd + have hw := congrArg (fun L : Plane →L[ℝ] Space => L (show Plane from w)) hd + change (mfderiv planeModel spaceModel (a • F) p v : Space) = + a • (mfderiv planeModel spaceModel F p v : Space) at hv + change (mfderiv planeModel spaceModel (a • F) p w : Space) = + a • (mfderiv planeModel spaceModel F p w : Space) at hw + calc + _ = inner ℝ (a • (mfderiv planeModel spaceModel F p v : Space)) + (a • (mfderiv planeModel spaceModel F p w : Space)) := + congrArg₂ (fun x y : Space => inner ℝ x y) hv hw + _ = _ := by rw [real_inner_smul_left,real_inner_smul_right]; ring + +/-- The normalized defect after the initial scalar contraction has exactly +the reference metric plus a scaled copy of the old metric error. -/ +theorem normalizedTensorDefect_initial {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (target : ∀ p : M, CovariantTwoTensor p) {δ : ℝ} (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) : + normalizedTensorDefect target δ (Real.sqrt (1-δ^2) • F) = + target+(1-(δ^2)⁻¹) • (inducedTensor F-target) := by + rw [normalizedTensorDefect,inducedTensor_const_smul hF,Real.sq_sqrt (sub_nonneg.mpr hδ1)] + funext p + ext v w + change (δ^2)⁻¹*(target p v w-(1-δ^2)*inducedTensor F p v w) = + target p v w+(1-(δ^2)⁻¹)*(inducedTensor F p v w-target p v w) + field_simp + ring + +lemma initial_contraction_displacement {δ : ℝ} (hδ1 : δ^2 ≤ 1) : + |Real.sqrt (1-δ^2)-1| ≤ δ^2 := by + have hsq := Real.sq_sqrt (sub_nonneg.mpr hδ1) + have hn := Real.sqrt_nonneg (1-δ^2) + have hu : Real.sqrt (1-δ^2) ≤ 1 := by nlinarith [sq_nonneg δ] + rw [abs_of_nonpos (sub_nonpos.mpr hu)] + nlinarith + +lemma initial_normalized_coefficient_bound {δ C : ℝ} (hδ : δ ≠ 0) + (hδ1 : δ^2 ≤ 1) (hC : 0 ≤ C) : + |1-(δ^2)⁻¹| * (δ^2*C) ≤ C := by + have hinv : 1 ≤ (δ^2)⁻¹ := (one_le_inv₀ (sq_pos_of_ne_zero hδ)).mpr hδ1 + rw [abs_of_nonpos (sub_nonpos.mpr hinv)] + have he : -(1-(δ^2)⁻¹)*(δ^2*C) = (1-δ^2)*C := by + field_simp + ring + rw [he] + nlinarith [sq_nonneg δ] + +variable [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas + +/-- Finite metric accuracy before contraction becomes the normalized +accuracy required to start the correction iteration. -/ +theorem normalized_initial_error_bound (A : SmoothingAtlas M) + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + {target : ∀ p : M, CovariantTwoTensor p} + (htarget : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p))) + {δ C s : ℝ} {m : ℕ} (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) (hC : 0 ≤ C) + (hb : A.TensorWeightedBound s m (δ^2*C) (inducedTensor F-target)) : + A.TensorWeightedBound s m C + (normalizedTensorDefect target δ (Real.sqrt (1-δ^2) • F)-target) := by + have he : normalizedTensorDefect target δ (Real.sqrt (1-δ^2) • F)-target = + (1-(δ^2)⁻¹) • (inducedTensor F-target) := by + rw [normalizedTensorDefect_initial hF target hδ hδ1] + abel + rw [he] + have hh := A.tensorWeightedBound_const_smul + ((A.inducedTensor_smooth hF).sub_section htarget) hb (1-(δ^2)⁻¹) + intro i + exact (hh i).mono_const (initial_normalized_coefficient_bound hδ hδ1 hC) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledMetricQuadraticTargets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledMetricQuadraticTargets.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc5c05f993699a3cb76bdac02e5b4a6db0e30036 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledMetricQuadraticTargets.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.Immersion.ClosedSurface.QuadraticSupport + +namespace OAI + +/-! Metric quadratic coefficients have size delta squared when the +oscillatory amplitudes have size delta times their wavelength. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +theorem scaled_quadraticAmplitude_bound {n : ℕ} {ι : Type*} {U : Set Base} + (hU : IsOpen U) {φ : ι → Base → ℝ} {Z : ι → Field n} + (hφ : ∀ i, ContDiffOn ℝ ∞ (φ i) U) (hZ : ∀ i, ContDiffOn ℝ ∞ (Z i) U) + {s τ δ A P : ℝ} (hτ : 0 < τ) (hs : 0 < s) (hτs : τ ≤ s) + (hδ : 0 ≤ δ) (hA : 0 ≤ A) (hP : 0 ≤ P) (m : ℕ) + (hb : ∀ i, WeightedBound U s (m + 1) (A * (δ * τ)) (Z i)) + (hp : ∀ i v, ‖v‖ ≤ 1 → WeightedBound U s m P (coordDeriv v (φ i))) + (l : QuadraticLabel ι) : + WeightedBound U s m (δ ^ 2 * ((n : ℝ) * 2 ^ m * ((1 + 2 ^ m * P) * A) ^ 2)) + (quadraticAmplitude τ φ Z l) := by + have hh (i j : ι) := weighted_phaseCrossTensor hU hτ hs hτs + (show 0 ≤ A * (δ * τ) by positivity) (show 0 ≤ A * (δ * τ) by positivity) hP + (hφ i) (hφ j) (hZ i) (hZ j) (hb i) (hb j) (hp i) (hp j) + have he : (n : ℝ) * (2 ^ m * ((1 + 2 ^ m * P) * (A * (δ * τ)) / τ) * + ((1 + 2 ^ m * P) * (A * (δ * τ)) / τ)) = + δ ^ 2 * ((n : ℝ) * 2 ^ m * ((1 + 2 ^ m * P) * A) ^ 2) := by + field_simp [hτ.ne'] + rcases l with i | ⟨i,j,b⟩ + · change WeightedBound U s m _ (phasePlusTensor τ (φ i) (φ i) (Z i) (Z i)) + simpa only [he] using (hh i i).1 + · cases b + · simpa only [quadraticAmplitude, Bool.false_eq_true, ↓reduceIte, he] using (hh i j).1 + · simpa only [quadraticAmplitude, ↓reduceIte, he] using (hh i j).2 + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledNonlinearBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledNonlinearBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f241fd3c2886fe9ad3a4652dd6e22f564885d955 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledNonlinearBounds.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateNonlinearBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialNonlinearScales +import OAI.Geometry.Immersion.ClosedSurface.TensorBounds + +namespace OAI + +/-! The actual mixed and cubic nonlinear errors at the scales of the small +increment construction. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma coordinateQuadraticPolynomial_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) {G : Base → Space} + {X : RealModes.RField 4} (hG : ContDiff ℝ ∞ G) (hX : ContDiff ℝ ∞ X) (ε t : ℝ) : + ContDiff ℝ ∞ (coordinateQuadraticPolynomial P ε G X t) := by + rw [coordinateQuadraticPolynomial_eq_cross] + exact ((tensorQuadraticCross_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) + (hX.comp planeCoordinateIsometry.contDiff) ε t).comp + planeCoordinateIsometry.symm.contDiff).const_smul (1 / 2 : ℝ) + +theorem scaled_coordinate_interaction_bound {n : ℕ} {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (X Y : RealModes.RField 4) + (τ ε δ A B : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < δ → δ ≤ τ → + 0 < A → 0 < B → ε / τ ^ tensorLoss P ≤ 1 → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ X → ContDiff ℝ ∞ Y → + Set.MapsTo (lowJet G) U Q → WeightedBound U τ (m + tensorOrder P) B₀ (lowJet G) → + WeightedBound Set.univ τ (m + tensorOrder P + 1) (A * δ * τ) X → + WeightedBound Set.univ τ (m + tensorOrder P + 1) (B * δ ^ 2) Y → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) τ m + ((4 * 2 ^ m * (2 * A * B + B ^ 2) + E * (A * B + B ^ 2)) * (δ ^ 3 / τ)) + (coordinateQuadraticInteraction P ε G X Y) := by + obtain ⟨E,hE,he⟩ := coordinateCross_bound hU hQ P hP m B₀ hB₀ + refine ⟨E,hE,?_⟩ + intro G X Y τ ε δ A B hτ hτ1 hε hε1 hδ hδτ hA hB hsmall hG hX hY hGQ hGb hXb hYb + let V := planeCoordinateIsometry.symm ⁻¹' U + have hV : IsOpen V := hU.preimage planeCoordinateIsometry.symm.continuous + have hX0 := hXb.mono_order (show m + tensorOrder P ≤ m + tensorOrder P + 1 by omega) + have hY0 := hYb.mono_order (show m + tensorOrder P ≤ m + tensorOrder P + 1 by omega) + have hc := he G X Y τ ε (A * δ * τ) (B * δ ^ 2) hτ hτ1 hε hε1 + (by positivity) (by positivity) hG hX hY hGQ hGb hX0 hY0 + have hcc := hc.mono_const (polynomial_mixed_scale hE hε hA.le hB.le hδ.le hτ hτ1 hsmall) + have hy := he G Y Y τ ε (B * δ ^ 2) (B * δ ^ 2) hτ hτ1 hε hε1 + (by positivity) (by positivity) hG hY hY hGQ hGb hY0 hY0 + have hyy := hy.mono_const (polynomial_self_scale hE hε hB.le hδ.le hτ hτ1 hδτ hsmall) + have hsYY : ContDiffOn ℝ ∞ (tensorQuadraticCross P ε G (Y ∘ planeCoordinateIsometry) + (Y ∘ planeCoordinateIsometry) 0 ∘ planeCoordinateIsometry.symm) V := ((tensorQuadraticCross_smooth hP hG (hY.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) ε 0).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + have hyhalf := hyy.const_smul hV.uniqueDiffOn hsYY (1 / 2 : ℝ) + have hys : WeightedBound V τ m (E * B ^ 2 * (δ ^ 3 / τ)) + (coordinateQuadraticPolynomial P ε G Y 0) := by + rw [coordinateQuadraticPolynomial_eq_cross] + apply hyhalf.mono_const + norm_num only [abs_of_pos (by norm_num : (0 : ℝ) < 1 / 2)] + exact mul_le_of_le_one_left (by positivity) (by norm_num) + have hm := RealModes.weighted_cubic_remainder (n := 4) (m := m) isOpen_univ hτ hδ.le hδτ hA.le hB.le + hX.contDiffOn hY.contDiffOn (hXb.mono_order (by omega)) (hYb.mono_order (by omega)) + have hsmetric : ContDiffOn ℝ ∞ (fun p => RealModes.realLinearizedTensor X Y p + + RealModes.realMetricTensor Y p) V := + (RealModes.contDiffOn_realLinearizedTensor hV hX.contDiffOn hY.contDiffOn).add + (RealModes.contDiffOn_realMetricTensor hV hY.contDiffOn) + have hscross : ContDiffOn ℝ ∞ (tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) + (Y ∘ planeCoordinateIsometry) 0 ∘ planeCoordinateIsometry.symm) V := ((tensorQuadraticCross_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) ε 0).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + have hmV := hm.restrict_open hV + have hadd := (hmV.add hV.uniqueDiffOn hτ.le hsmetric hscross hcc).add hV.uniqueDiffOn hτ.le + (hsmetric.add hscross) (coordinateQuadraticPolynomial_smooth hP hG hY ε 0).contDiffOn hys + rw [coordinateQuadraticInteraction_eq_cross] + convert hadd using 1 <;> first | rfl | ring + +theorem scaled_coordinate_taylor_bound {n : ℕ} {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (X : RealModes.RField 4) + (τ ε δ A : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < δ → 0 < A → + ε / τ ^ tensorLoss P ≤ 1 → ContDiff ℝ ∞ G → ContDiff ℝ ∞ X → + (∀ t ∈ Set.Icc (0 : ℝ) 1, Set.MapsTo + (lowJet (fun p => G p + t • X (planeCoordinateIsometry p))) U Q) → + (∀ t ∈ Set.Icc (0 : ℝ) 1, WeightedBound U τ (m + tensorOrder P) B₀ + (lowJet (fun p => G p + t • X (planeCoordinateIsometry p)))) → + WeightedBound Set.univ τ (m + tensorOrder P) (A * δ * τ) X → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) τ m + (E * A ^ 3 * (δ ^ 3 / τ)) (coordinateTaylorRemainder P ε G X) := by + obtain ⟨E,hE,he⟩ := coordinateTaylorRemainder_bound hU hQ P hP m B₀ hB₀ + refine ⟨E,hE,?_⟩ + intro G X τ ε δ A hτ hτ1 hε hε1 hδ hA hsmall hG hX hGQ hGb hXb + exact (he G X τ ε (A * δ * τ) hτ hτ1 hε hε1 (by positivity) hG hX hGQ hGb hXb).mono_const + (polynomial_cubic_scale hE hε hA.le hδ.le hτ hτ1 hsmall) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..29f493f643a93330bdd66dd78d31536e5f2fb628 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticBudgets.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.DisjointJetBounds + +namespace OAI + +/-! C1 smallness and a radius-independent C2 budget for the actual scaled +quadratic corrections. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SphericalJets + +theorem scaled_quadratic_C1_C2_budgets (K : ℝ) (hK : 0 ≤ K) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (B : SecondTensor), ‖B‖ ≤ K → + ∀ (p : Plane) (r : ℝ), 0 < r → r ≤ 1 → + WeightedEstimates.WeightedBound univ 1 1 (D*r) (scaledQuadraticCutoff B p r) ∧ + WeightedEstimates.WeightedBound univ 1 2 D (scaledQuadraticCutoff B p r) := by + obtain ⟨C,hC,hb⟩ := uniform_scaled_quadratic_bounds + let D := C*K + have hD : 0 ≤ D := mul_nonneg hC hK + refine ⟨D,hD,?_⟩ + intro B hB p r hr hr1 + have hCK : C*‖B‖ ≤ D := mul_le_mul_of_nonneg_left hB hC + have hbound (j : ℕ) (hj : j ≤ 2) (x : Plane) : + r^j * ‖iteratedFDeriv ℝ j (scaledQuadraticCutoff B p r) x‖ ≤ D*r^2 := by + exact (hb B p r hr j hj x).trans (mul_le_mul_of_nonneg_right hCK (sq_nonneg r)) + have hr2 : 0 < r^2 := sq_pos_of_pos hr + have hrr : r^2 ≤ r := by nlinarith + constructor + · intro j hj x hx + rw [iteratedFDerivWithin_univ] + simp only [one_pow,one_mul] + have hh := hbound j (by omega) x + interval_cases j + · simp only [pow_zero,one_mul] at hh + exact hh.trans (mul_le_mul_of_nonneg_left hrr hD) + · simp only [pow_one] at hh + nlinarith + · intro j hj x hx + rw [iteratedFDerivWithin_univ] + simp only [one_pow,one_mul] + have hh := hbound j hj x + interval_cases j + · simp only [pow_zero,one_mul] at hh + exact hh.trans (by nlinarith [mul_nonneg hD (by nlinarith : 0 ≤ 1-r^2)]) + · simp only [pow_one] at hh + nlinarith [mul_nonneg hD (by linarith : 0 ≤ 1-r)] + · nlinarith + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d718c47ffc72764131b669f9399bbb78ab5dd126 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticCancellation.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors + +namespace OAI + +/-! Keep the delta-squared size and high residual power explicit in the +actual finite cancellation of all doubled and mixed quadratic phases. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem scaled_polynomial_quadratic_cancellation {n : ℕ} {ι : Type*} + [Fintype ι] [DecidableEq ι] (P : Fin 3 → Fin n → Expression) (ε δ : ℝ) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (K : ι → Compacts Base) + (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) {τ : ℝ} {s : ℝ≥0} + (c : ∀ l, PolynomialSolveData P ε G hG (quadraticFamilyPhase φ l) (quadraticCompacts K l) τ s) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q : ℕ) + (A : QuadraticLabel ι → ℕ → ℝ) : + let f := fun l => combinedQuadraticTarget (c l).openU (c l).openO P (c l).smoothP hG φ hφ H + (c l).mapsG l (c l).supportU ε τ 0 + (∀ l m, (c l).norm (f l) m ≤ δ ^ 2 * A l m) → + ∃ V : RField 4, ContDiff ℝ ∞ V ∧ tsupport V ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m + (δ ^ 2 * ∑ l, (c l).sizeFactor q m * A l (PolynomialSolveData.inputOrder (P := P) q m)) V) ∧ + (∀ m, WeightedBound Set.univ τ m + (δ ^ 2 * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + ∑ l, (c l).residualFactor q m * A l (PolynomialSolveData.inputOrder (P := P) q m)) + (coordinateFullLinearized P ε G V + combinedNonzeroQuadratic P ε G φ (fun i => H i) τ)) := by + dsimp only + intro hA + obtain ⟨V,hV,hsp,hsize,hres⟩ := polynomial_quadratic_cancellation P ε hG φ hφ K H c + hτ hs hτs hs1 hε hsmall q + refine ⟨V,hV,hsp,?_,?_⟩ + · intro m + apply (hsize m).mono_const + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro l _ + exact (c l).size_le_scaled (sq_nonneg δ) _ q m (hA l _) + · intro m + apply (hres m).mono_const + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro l _ + have hh := (c l).residual_le_scaled + (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) _ q m (hA l _) + convert hh using 1 + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticTargets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticTargets.lean new file mode 100644 index 0000000000000000000000000000000000000000..b879d225474f62e342528e5741079da8277ca26c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ScaledQuadraticTargets.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTensorBounds +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialMean + +namespace OAI + +/-! Quadratic targets have size O(delta^2), with the polynomial contribution +retaining an eta factor when the input amplitudes have size delta * tau. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma quadratic_product_scale {δ τ s ε E A : ℝ} {r p : ℕ} + (hδ : 0 < δ) (hτ : 0 < τ) (hs : 0 < s) (hτ1 : τ ≤ 1) + (hε : 0 ≤ ε) (hE : 0 ≤ E) (hA : 0 ≤ A) (hp : r ≤ p) : + E * ε * (A * (δ * τ)) ^ 2 / τ ^ r ≤ + δ ^ 2 * (τ / s + ε / τ ^ p) * E * A ^ 2 := by + have hh := normalized_product_scale hδ hτ hs hτ1 hε hE hA hA hp + calc + _ = δ ^ 2 * (δ⁻¹ ^ 2 * (E * ε * (A * (δ * τ)) * (A * (δ * τ)) / τ ^ r)) := by + field_simp [hδ.ne'] + _ ≤ δ ^ 2 * ((τ / s + ε / τ ^ p) * E * A * A) := + mul_le_mul_of_nonneg_left hh (sq_nonneg δ) + _ = _ := by ring + +theorem scaled_quadraticFamilyTensor_bound {n : ℕ} {ι : Type*} + {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : ι → Base → ℝ) + (H : ι → Base → Fin 4 → ℂ) (s δ τ ε A : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < A → + tensorLoss P ≤ p → ContDiff ℝ ∞ G → (∀ i, ContDiff ℝ ∞ (φ i)) → + (∀ i, ContDiff ℝ ∞ (H i)) → Set.MapsTo (lowJet G) U Q → + WeightedBound U s (m + tensorOrder P) B (lowJet G) → + (∀ i, WeightedBound U s (m + tensorOrder P) (A * (δ * τ)) (H i)) → + (∀ i v, WeightedBound U s (m + tensorOrder P) F + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) → + ∀ (l : RealModes.QuadraticLabel ι), ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (δ ^ 2 * (τ / s + ε / τ ^ p) * E * A ^ 2) + (quadraticFamilyTensor P ε G φ H τ t l) := by + obtain ⟨E, hE, he⟩ := quadraticFamilyTensor_bound (ι := ι) hU hO hQ hQO P hP m B F hB hF + refine ⟨E, hE, ?_⟩ + intro G φ H s δ τ ε A p hδ hτ hs hτs hs1 hε hε1 hA hp hG hφ hH hGQ hGb hHb hφb l t ht + exact (he G φ H s τ ε (A * (δ * τ)) hτ hs hτs hs1 hε hε1 (by positivity) + hG hφ hH hGQ hGb hHb hφb l t ht).mono_const + (quadratic_product_scale hδ hτ hs (hτs.trans hs1) hε hE hA.le hp) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormComponents.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormComponents.lean new file mode 100644 index 0000000000000000000000000000000000000000..d342d6d837e807e33b80405c89d132adc3e2c99a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormComponents.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ActualSecondFormFrame +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingProjectionBounds +import OAI.Geometry.Immersion.ClosedSurface.ChartModel + +namespace OAI + +/-! Apply the scalar normal-component calculations to the actual second +fundamental form and its Euclidean unit frame. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes + +lemma spaceCoordinates_symm_inner (v w : RVec 4) : + inner ℝ (spaceCoordinates.symm v) (spaceCoordinates.symm w) = v ⬝ᵥ w := by + simpa only [ContinuousLinearEquiv.apply_symm_apply] using + (spaceCoordinates_dot (spaceCoordinates.symm v) (spaceCoordinates.symm w)).symm + +lemma spaceCoordinates_norm_unit {v : RVec 4} (hv : v ⬝ᵥ v = 1) : + ‖spaceCoordinates.symm v‖ = 1 := by + have h := spaceCoordinates_symm_inner v v + rw [real_inner_self_eq_norm_sq,hv] at h + nlinarith [norm_nonneg (spaceCoordinates.symm v)] + +namespace SecondFormFrame +variable {F : RField 4} {p : Base} {k : ℝ} (d : SecondFormFrame F p k) + +lemma pure_components (hF : ContDiff ℝ ∞ F) (b c : ℝ) : + realSecondForm F (b,c) (b,c) p = + (pureComponents d.S d.D d.N d.L k b c).1 • d.n+ + (pureComponents d.S d.D d.N d.L k b c).2 • d.m := by + rw [realSecondForm_bilinear hF] + simp only [realSecondTensor,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.head_cons,Matrix.tail_cons, + d.xx,d.xy,d.yy] + ext j + simp only [pureComponents,frameXX,frameXY,frameYY,Prod.fst_add,Prod.snd_add, + Prod.smul_fst,Prod.smul_snd,Pi.add_apply,Pi.smul_apply,smul_eq_mul] + ring + +lemma pure_space_components (hF : ContDiff ℝ ∞ F) (b c : ℝ) : + spaceCoordinates.symm (realSecondForm F (b,c) (b,c) p) = + frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (pureComponents d.S d.D d.N d.L k b c) := by + rw [d.pure_components hF] + simp only [map_add,map_smul,frameVector] + +lemma slope_space_components (hF : ContDiff ℝ ∞ F) (t : ℝ) : + spaceCoordinates.symm (realSecondForm F (1,t) (1,t) p) = + frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k t) := by + rw [d.pure_space_components hF,pure_unit_slope d.size_pos.ne'] + +lemma mixed_space_components (hF : ContDiff ℝ ∞ F) (t u : ℝ) : + spaceCoordinates.symm (realSecondForm F (1,t) (1,u) p) = + frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopeMixed d.S d.D d.N d.L k t u) := by + have hvec : realSecondForm F (1,t) (1,u) p = + (slopeMixed d.S d.D d.N d.L k t u).1 • d.n+ + (slopeMixed d.S d.D d.N d.L k t u).2 • d.m := by + rw [realSecondForm_bilinear hF] + simp only [realSecondTensor,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.head_cons,Matrix.tail_cons, + d.xx,d.xy,d.yy] + ext j + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul,slopeMixed] + field_simp [d.size_pos.ne'] + ring + rw [hvec] + simp only [map_add,map_smul,frameVector] + +end SecondFormFrame +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormNormalFields.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormNormalFields.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8bfb89b0ce42206925b1d404ec9414609008c63 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondFormNormalFields.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileNormal +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame + +namespace OAI + +/-! Smooth fields of actual second forms and their preferred unit normal. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +lemma realSecondForm_smoothOn {F : RField 4} (hF : ContDiff ℝ ∞ F) + {U : Set Base} + (hD : ∀ x ∈ U, gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) + (v w : Base) : ContDiffOn ℝ ∞ (realSecondForm F v w) U := by + intro x hx + exact (contDiffAt_realNormalPart + (contDiff_real_coordDeriv hF dx).contDiffAt + (contDiff_real_coordDeriv hF dy).contDiffAt + (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF w) v).contDiffAt + (hD x hx)).contDiffWithinAt + +lemma realSecondForm_variable_smoothOn {F : RField 4} (hF : ContDiff ℝ ∞ F) + {U : Set Base} + (hD : ∀ x ∈ U, gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) + {v : Base → Base} (hv : ContDiffOn ℝ ∞ v U) : + ContDiffOn ℝ ∞ (fun x => realSecondForm F (v x) (v x) x) U := by + have hx := realSecondForm_smoothOn hF hD dx dx + have hxy := realSecondForm_smoothOn hF hD dx dy + have hy := realSecondForm_smoothOn hF hD dy dy + have hvx : ContDiffOn ℝ ∞ (fun x => (v x).1) U := contDiff_fst.comp_contDiffOn hv + have hvy : ContDiffOn ℝ ∞ (fun x => (v x).2) U := contDiff_snd.comp_contDiffOn hv + have hh := (((hvx.pow 2).smul hx).add + ((((contDiffOn_const : ContDiffOn ℝ ∞ (fun _ : Base => (2:ℝ)) U).mul hvx).mul hvy).smul hxy)).add ((hvy.pow 2).smul hy) + convert hh using 1 + funext x + rw [realSecondForm_quadratic hF] + rfl + +lemma realBoundaryProfile_smooth {F : RField 4} (hF : ContDiff ℝ ∞ F) (z : ℝ) : + ContDiff ℝ ∞ (realBoundaryProfile F z) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact contDiff_real_coordDeriv hF dx + · exact contDiff_real_coordDeriv hF dy + · exact contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dy + · exact contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dx + · exact (contDiff_const : ContDiff ℝ ∞ (fun _ : Base => z)).smul (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dx) dx) + +lemma profilePreferred_field_smoothOn {F : RField 4} (hF : ContDiff ℝ ∞ F) (z : ℝ) + {U : Set Base} (hreg : ∀ x ∈ U, realBoundaryProfile F z x ∈ regularBoundaryProfiles) : + ContDiffOn ℝ ∞ (fun x => profilePreferred (realBoundaryProfile F z x)) U := by + intro x hx + exact ((contDiffAt_profilePreferred (hreg x hx)).comp x + (realBoundaryProfile_smooth hF z).contDiffAt).contDiffWithinAt + +lemma realSecondForm_field_perp {F : RField 4} {x : Base} + (hD : gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) (v w : Base) : + coordDeriv dx F x ⬝ᵥ realSecondForm F v w x = 0 ∧ + coordDeriv dy F x ⬝ᵥ realSecondForm F v w x = 0 := + realNormalPart_perp _ _ _ hD + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondVariationAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondVariationAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9f0547e47765d284d6c86e460e183d7802f0a50 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SecondVariationAlgebra.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealQuadraticVariation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialDiagonalVariations + +namespace OAI + +/-! Exact algebra of the real second variation, including its unused +third direction slot. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +lemma second_diagonal_eq_pair (e : Expression) {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (z : Base × ℝ) : + (e.variations 1).eval (diagonalFamily G H) z = + (e.variations 1).eval ![G,H,H,0] z := by + have hd : DegreeIn 2 (e.variations 1) 0 := by simpa using e.variations_degree 1 2 + have hh := hd.eval_scaleSlot (diagonalFamily_smooth hG hH) 0 z + have hf : scaleSlot (diagonalFamily G H) 2 0 = ![G,H,H,0] := by + funext i p + fin_cases i + · rfl + · rfl + · rfl + · simp [scaleSlot] + rw [hf, pow_zero, one_mul] at hh + exact hh.symm + +lemma real_second_variation_add_left (e : Expression) (G : Base → Space) + {H K : Base → Space} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (J : Base → Space) (z : Base × ℝ) : + (e.variations 1).eval ![G,(fun x => H x + K x),J,0] z = + (e.variations 1).eval ![G,H,J,0] z + (e.variations 1).eval ![G,K,J,0] z := by + have hj : (fun w a p => (jet (fun x => H x + K x) w a p : ℂ)) = + (fun w a p => (jet H w a p : ℂ)) + (fun w a p => (jet K w a p : ℂ)) := by + funext w a p + simp only [jet_add hH hK, Complex.ofReal_add, Pi.add_apply] + apply Complex.ofReal_injective + rw [Complex.ofReal_add, ← quadraticComplex_real_fields, ← quadraticComplex_real_fields, + ← quadraticComplex_real_fields, hj, quadraticComplex_add_left] + +lemma real_second_variation_add_right (e : Expression) (G : Base → Space) + (J : Base → Space) {H K : Base → Space} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (z : Base × ℝ) : + (e.variations 1).eval ![G,J,(fun x => H x + K x),0] z = + (e.variations 1).eval ![G,J,H,0] z + (e.variations 1).eval ![G,J,K,0] z := by + have hj : (fun w a p => (jet (fun x => H x + K x) w a p : ℂ)) = + (fun w a p => (jet H w a p : ℂ)) + (fun w a p => (jet K w a p : ℂ)) := by + funext w a p + simp only [jet_add hH hK, Complex.ofReal_add, Pi.add_apply] + apply Complex.ofReal_injective + rw [Complex.ofReal_add, ← quadraticComplex_real_fields, ← quadraticComplex_real_fields, + ← quadraticComplex_real_fields, hj, quadraticComplex_add_right] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..95b6b05f768a9492d5b630cf8bbf35f810b0350b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityCompact.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BlendedDensityCompact + +namespace OAI + +/-! Uniform positive densities for small translations of the blended angle. +The allowable translation size follows from compactness after constructing +smooth solutions near zero translation. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem shifted_density_compact {a A s : B → ℝ} {c : B → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hc : ContDiff ℝ ∞ c) + {K : Set B} (hK : IsCompact K) + (hshape : ∀ b ∈ K, + (0 < a b ∧ 2 * Real.arctan (a b) ≤ A b ∧ s b ∈ Icc (0 : ℝ) 1 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) ∨ + (s b = 1 ∧ Real.pi < A b ∧ c b 0 ^ 2 + c b 1 ^ 2 < 1)) : + ∃ W : Set B, IsOpen W ∧ K ⊆ W ∧ ∃ ε : ℝ, 0 < ε ∧ + ∃ ρ : (B × ℝ) × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ ((W ×ˢ Metric.ball (0 : ℝ) ε) ×ˢ univ) ∧ + (∀ b ∈ W, ∀ h, |h| < ε → ∀ t, 0 < ρ ((b, h), t)) ∧ + (∀ b h, Function.Periodic (fun t => ρ ((b, h), t)) 1) ∧ + ∀ b ∈ W, ∀ h, |h| < ε → + (∫ t in 0..1, ρ ((b, h), t) • + LoopDensity.augment (blendedPath (a b) (A b) (s b) h t)) = + LoopDensity.augment (c b) := by + classical + let a' : B × ℝ → ℝ := fun p => a p.1 + let A' : B × ℝ → ℝ := fun p => A p.1 + let s' : B × ℝ → ℝ := fun p => s p.1 + let c' : B × ℝ → LoopDensity.Plane := fun p => c p.1 + have ha' : ContDiff ℝ ∞ a' := ha.comp contDiff_fst + have hA' : ContDiff ℝ ∞ A' := hA.comp contDiff_fst + have hs' : ContDiff ℝ ∞ s' := hs.comp contDiff_fst + have hc' : ContDiff ℝ ∞ c' := hc.comp contDiff_fst + let J := {p : B × ℝ // p ∈ K ×ˢ ({0} : Set ℝ)} + have hlocal (p : J) : ∃ V : Set (B × ℝ), IsOpen V ∧ p.val ∈ V ∧ + ∃ ρ : (B × ℝ) × ℝ → ℝ, ContDiffOn ℝ ∞ ρ (V ×ˢ univ) ∧ + (∀ b ∈ V, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ V, (∫ t in 0..1, ρ (b, t) • LoopDensity.augment + (blendedPath (a' b) (A' b) (s' b) b.2 t)) = LoopDensity.augment (c' b) := by + have hp0 : p.val.2 = 0 := p.property.2 + rcases hshape p.val.1 p.property.1 with ht | hi + · exact blended_positive_density_near ha' hA' hs' contDiff_snd hc' + ht.1 ht.2.1 ht.2.2.1 hp0 ht.2.2.2 + · apply blended_density_near_interior ha' hA' hs' contDiff_snd hc' hi.1 _ hi.2.2 + simpa only [hp0, abs_zero, add_zero] using hi.2.1 + choose V hV hpV ρ hρ hpos hper hmom using hlocal + have hcover : K ×ˢ ({0} : Set ℝ) ⊆ ⋃ p : J, V p := by + intro p hp + exact mem_iUnion.mpr ⟨⟨p, hp⟩, hpV ⟨p, hp⟩⟩ + obtain ⟨U, hU, hKU, σ, hσ, hσpos, hσper, hσmom, _⟩ := + LoopDensity.compact_patch_densities + (blendedPath_smooth ha' hA' hs' contDiff_snd) V hV ρ hρ hpos hper hmom + (hK.prod isCompact_singleton) hcover + obtain ⟨W, Z, hW, hZ, hKW, h0Z, hWZ⟩ := + generalized_tube_lemma hK isCompact_singleton hU hKU + obtain ⟨ε, hε, hεZ⟩ := Metric.isOpen_iff.mp hZ 0 (h0Z (mem_singleton 0)) + have htube : W ×ˢ Metric.ball (0 : ℝ) ε ⊆ U := + (prod_mono Subset.rfl hεZ).trans hWZ + refine ⟨W, hW, hKW, ε, hε, σ, hσ.mono (prod_mono htube Subset.rfl), ?_, ?_, ?_⟩ + · intro b hb h hh t + exact hσpos (b, h) (htube ⟨hb, by simpa only [Metric.mem_ball, Real.dist_eq, sub_zero] using hh⟩) t + · intro b h + exact hσper (b, h) + · intro b hb h hh + exact hσmom (b, h) (htube ⟨hb, by simpa only [Metric.mem_ball, Real.dist_eq, sub_zero] using hh⟩) + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d9f1f801333c2b2b69c4684edb194070b808136 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedDensityPullback.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ShiftedDensityCompact +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityMoments + +namespace OAI + +/-! Pull back the universal translation-dependent density along any small smooth +translation. Its derivatives may be arbitrarily large. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem small_shift_density {a A s : B → ℝ} {c : B → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hc : ContDiff ℝ ∞ c) + {K : Set B} (hK : IsCompact K) + (hshape : ∀ b ∈ K, + (0 < a b ∧ 2 * Real.arctan (a b) ≤ A b ∧ s b ∈ Icc (0 : ℝ) 1 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) ∨ + (s b = 1 ∧ Real.pi < A b ∧ c b 0 ^ 2 + c b 1 ^ 2 < 1)) : + ∃ W : Set B, IsOpen W ∧ K ⊆ W ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ h : B → ℝ, ContDiff ℝ ∞ h → (∀ b, |h b| < ε) → + ∃ σ : B × ℝ → ℝ, ContDiffOn ℝ ∞ σ (W ×ˢ univ) ∧ + (∀ b ∈ W, ∀ t, 0 < σ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => σ (b, t)) 1) ∧ + (∀ b ∈ W, (∫ t in 0..1, σ (b, t)) = 1) ∧ + ∀ b ∈ W, (∫ t in 0..1, σ (b, t) • + blendedPath (a b) (A b) (s b) (h b) t) = c b := by + obtain ⟨W, hW, hKW, ε, hε, ρ, hρ, hpos, hper, hmom⟩ := + shifted_density_compact ha hA hs hc hK hshape + refine ⟨W, hW, hKW, ε, hε, ?_⟩ + intro h hh hsmall + let σ : B × ℝ → ℝ := fun z => ρ ((z.1, h z.1), z.2) + have hσ : ContDiffOn ℝ ∞ σ (W ×ˢ univ) := by + apply hρ.comp + (((contDiff_fst.prodMk (hh.comp contDiff_fst)).prodMk contDiff_snd).contDiffOn) + intro z hz + exact ⟨⟨hz.1, by simpa only [Metric.mem_ball, Real.dist_eq, sub_zero, Function.comp_apply] using hsmall z.1⟩, hz.2⟩ + have hσpos (b : B) (hb : b ∈ W) (t : ℝ) : 0 < σ (b, t) := + hpos b hb (h b) (hsmall b) t + have hσmom (b : B) (hb : b ∈ W) : + (∫ t in 0..1, σ (b, t) • + LoopDensity.augment (blendedPath (a b) (A b) (s b) (h b) t)) = + LoopDensity.augment (c b) := hmom b hb (h b) (hsmall b) + have hσboth (b : B) (hb : b ∈ W) := LoopDensity.mass_and_mean + (LocalPeriodicCalculus.smooth_slice hW hσ hb).continuous + ((blendedPath_smooth ha hA hs hh).continuous.comp + (continuous_const.prodMk continuous_id)) (hσmom b hb) + exact ⟨σ, hσ, hσpos, (fun b => hper b (h b)), + (fun b hb => (hσboth b hb).1), (fun b hb => (hσboth b hb).2)⟩ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedScaleGain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedScaleGain.lean new file mode 100644 index 0000000000000000000000000000000000000000..86f482fabcdc5f68982e034b06cc81b6bcbda1dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShiftedScaleGain.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ShiftedSmoothingBounds + +namespace OAI + +/-! Inherited derivatives gain a scale ratio above the fixed prefix. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- Reducing the scale preserves the unweighted prefix and contracts all +higher weighted derivatives by at least `τ/t`. -/ +theorem ShiftedBound.shrink_with_prefix {q m : ℕ} {t τ A C : ℝ} {f : Base → V} + (hb : ShiftedBound q 0 t A f) (hc : ShiftedBound q m t C f) + (ht : 0 < t) (hτ : 0 ≤ τ) (hτt : τ ≤ t) (hA : 0 ≤ A) (hC : 0 ≤ C) : + ShiftedBound q m τ (A + (τ / t) * C) f := by + intro j hj x + by_cases hjq : j ≤ q + · have h := hb j (by omega) x + simp only [Nat.sub_eq_zero_of_le hjq, pow_zero, one_mul] at h ⊢ + exact h.trans (le_add_of_nonneg_right (mul_nonneg (div_nonneg hτ ht.le) hC)) + · have hp : (τ / t) ^ (j - q) ≤ τ / t := by + simpa only [pow_one] using pow_le_pow_of_le_one (div_nonneg hτ ht.le) + ((div_le_one ht).mpr hτt) (show 1 ≤ j - q by omega) + calc + _ ≤ τ ^ (j - q) * (C / t ^ (j - q)) := + mul_le_mul_of_nonneg_left (hc.deriv_le ht hj x) (pow_nonneg hτ _) + _ = (τ / t) ^ (j - q) * C := by rw [div_pow]; ring + _ ≤ (τ / t) * C := mul_le_mul_of_nonneg_right hp hC + _ ≤ _ := le_add_of_nonneg_left hA + +/-- Adding the actual increment adds its shifted derivative budget. -/ +theorem ShiftedBound.add {q m : ℕ} {s A B : ℝ} {f g : Base → V} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (hs : 0 ≤ s) + (hb : ShiftedBound q m s A f) (hc : ShiftedBound q m s B g) : + ShiftedBound q m s (A + B) (f + g) := by + intro j hj x + rw [iteratedFDeriv_add_apply (hf.of_le (by simp)).contDiffAt + (hg.of_le (by simp)).contDiffAt] + calc + _ ≤ s ^ (j - q) * (‖iteratedFDeriv ℝ j f x‖ + ‖iteratedFDeriv ℝ j g x‖) := + mul_le_mul_of_nonneg_left (norm_add_le _ _) (pow_nonneg hs _) + _ = s ^ (j - q) * ‖iteratedFDeriv ℝ j f x‖ + + s ^ (j - q) * ‖iteratedFDeriv ℝ j g x‖ := by ring + _ ≤ _ := add_le_add (hb j hj x) (hc j hj x) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShortMetricPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShortMetricPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d74bdab5e679f2f8b8a2e42790ad4bf8fd93ea7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ShortMetricPath.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorMetric + +namespace OAI + +/-! The positive metric remainder and the actual smooth metric path used +by the finite primitive preparation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance pathFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance pathFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance pathDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance pathDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance pathSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance pathSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) (g : SmoothMetric M) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hshort : ∀ p v, inducedForm F p v v ≤ (1/2 : ℝ)*g.inner p v v) + +def shortRemainderMetric : SmoothMetric M := + positiveTensorMetric (g.inner-inducedTensor F) + (g.contMDiff.sub_section (A.inducedTensor_smooth hF)) + (by + intro p v w + change g.inner p v w-inducedTensor F p v w = g.inner p w v-inducedTensor F p w v + rw [g.symm,inducedTensor_symmetric]) + (by + intro p v hv + change 0 < g.inner p v v-inducedForm F p v v + have hp := g.pos p v hv + have hs := hshort p v + linarith) + +lemma shortRemainderMetric_lower (p : M) (v : TangentSpace planeModel p) : + (1/2 : ℝ)*g.inner p v v ≤ (A.shortRemainderMetric g hF hshort).inner p v v := by + change (1/2 : ℝ)*g.inner p v v ≤ g.inner p v v-inducedForm F p v v + linarith [hshort p v] + +def shortPathMetric (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (s : ℝ) (hs : 0 ≤ s) : SmoothMetric M := + positiveTensorMetric ((A.immersionMetric hF hI).inner+s • (A.shortRemainderMetric g hF hshort).inner) + ((A.immersionMetric hF hI).contMDiff.add_section + (A.shortRemainderMetric g hF hshort).contMDiff.const_smul_section) + (by + intro p v w + change (A.immersionMetric hF hI).inner p v w+s*(A.shortRemainderMetric g hF hshort).inner p v w = + (A.immersionMetric hF hI).inner p w v+s*(A.shortRemainderMetric g hF hshort).inner p w v + rw [(A.immersionMetric hF hI).symm,(A.shortRemainderMetric g hF hshort).symm]) + (by + intro p v hv + have h₀ := (A.immersionMetric hF hI).pos p v hv + have h₁ := (A.shortRemainderMetric g hF hshort).pos p v hv + change 0 < (A.immersionMetric hF hI).inner p v v+s*(A.shortRemainderMetric g hF hshort).inner p v v + exact add_pos_of_pos_of_nonneg h₀ (mul_nonneg hs h₁.le)) + +lemma shortPathMetric_apply (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (s : ℝ) (hs : 0 ≤ s) (p : M) (v w : TangentSpace planeModel p) : + (A.shortPathMetric g hF hshort hI s hs).inner p v w = + (1-s)*inducedForm F p v w+s*g.inner p v w := by + change inducedForm F p v w+s*(g.inner p v w-inducedForm F p v w) = _ + ring + +lemma shortPathMetric_start (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + (A.shortPathMetric g hF hshort hI 0 le_rfl).inner = inducedTensor F := by + funext p + ext v w + rw [A.shortPathMetric_apply] + simp only [sub_zero,one_mul,zero_mul,add_zero,inducedTensor_apply] + +lemma shortPathMetric_finish (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + (A.shortPathMetric g hF hshort hI 1 zero_le_one).inner = g.inner := by + funext p + ext v w + rw [A.shortPathMetric_apply] + simp + +lemma shortPathMetric_lower (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (s : ℝ) (hs : 0 ≤ s) {c : ℝ} + (hlower : ∀ p v, c*g.inner p v v ≤ inducedForm F p v v) + (p : M) (v : TangentSpace planeModel p) : + c*g.inner p v v ≤ (A.shortPathMetric g hF hshort hI s hs).inner p v v := by + have hm : 0 ≤ (A.shortRemainderMetric g hF hshort).inner p v v := by + by_cases hv : v = 0 + · simp [hv] + · exact ((A.shortRemainderMetric g hF hshort).pos p v hv).le + change c*g.inner p v v ≤ inducedForm F p v v+s*(A.shortRemainderMetric g hF hshort).inner p v v + exact (hlower p v).trans (le_add_of_nonneg_right (mul_nonneg hs hm)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SignedDiagonalFilling.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SignedDiagonalFilling.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3347564bc76f597bb5feb8d565373d5ed9734c7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SignedDiagonalFilling.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CenteredPairModels + +namespace OAI + +/-! Either possible pair of transverse endpoint signs admits a compact +relative frame filling in every neighborhood of the whole connecting interval. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma nonzeroSign_ne_zero (a : ℝ) : nonzeroSign a ≠ 0 := by + unfold nonzeroSign + split <;> norm_num + +lemma nonzeroSign_cases (a b : ℝ) : + nonzeroSign a = nonzeroSign b ∨ nonzeroSign b = -nonzeroSign a := by + unfold nonzeroSign + split <;> split <;> norm_num + +theorem signed_diagonal_filling {p q a b : ℝ} (hpq : p < q) + {U : Set Base} (hU : IsOpen U) + (haxis : ∀ t ∈ Icc p q, crosscapAxis t ∈ U) : + HasRelativeDefectFilling (diagonalDefectModel (endpointSignModel p q a b) p q) U := by + let c := (p+q)/2 + let h := (q-p)/2 + have hh : 0 < h := by dsimp [h]; linarith + have hleft : c-h = p := by dsimp [c,h]; ring + have hright : c+h = q := by dsimp [c,h]; ring + have hax : ∀ t ∈ Icc (c-h) (c+h), crosscapAxis t ∈ U := by + simpa only [hleft,hright] using haxis + rcases nonzeroSign_cases a b with hsame | hopp + · have hmodel : diagonalDefectModel (endpointSignModel p q a b) p q = + centeredOppositeNormal c h (nonzeroSign a) := by + funext x + rw [diagonalDefectModel_apply,endpointSignModel_same hpq.ne hsame] + ext i + fin_cases i + · dsimp [centeredOppositeNormal,c,h] + ring + · dsimp [centeredOppositeNormal] + ring + rw [hmodel] + exact centeredOppositeNormal_filling hh (nonzeroSign_ne_zero a) hU hax + · obtain ⟨R,k,hR,hk,hbox⟩ := thin_pair_coordinates hh hU hax + let H := centeredEqualHomotopy c h k (-nonzeroSign a) + have h1 : H 1 = centeredEqualNormal c h k (-nonzeroSign a) := by + funext x + ext i + fin_cases i <;> simp [H,centeredEqualHomotopy,centeredEqualNormal] + have h0 : H 0 = diagonalDefectModel (endpointSignModel p q a b) p q := by + funext x + rw [diagonalDefectModel_apply,endpointSignModel_opposite hpq.ne hopp] + ext i + fin_cases i + · dsimp [H,centeredEqualHomotopy,c,h] + ring + · dsimp [H,centeredEqualHomotopy,c,h] + field_simp + ring + have hfill : HasRelativeDefectFilling (H 1) U := by + rw [h1] + exact centeredEqualNormal_filling hh hk (neg_ne_zero.mpr (nonzeroSign_ne_zero a)) hR hbox + have hz : ∀ s ∈ Icc (0:ℝ) 1, ∀ x ∈ U, + x ∉ ({crosscapAxis p,crosscapAxis q} : Set Base) → H s x ≠ 0 := by + intro s hs x _ hx he + have hr := (centeredEqualHomotopy_zero_iff hh + (neg_ne_zero.mpr (nonzeroSign_ne_zero a)) hs.1 x).mp he + rw [hleft,hright] at hr + exact hx (by simpa only [mem_insert_iff,mem_singleton_iff] using hr) + have hzU : ({crosscapAxis p,crosscapAxis q} : Set Base) ⊆ U := by + intro x hx + rcases hx with (rfl | rfl) + · exact haxis p (left_mem_Icc.mpr hpq.le) + · exact haxis q (right_mem_Icc.mpr hpq.le) + have hres := relativeDefectFilling_homotopy (centeredEqualHomotopy_smooth c h k (-nonzeroSign a)) + hU (isCompact_singleton.insert _) hzU hz hfill + change HasRelativeDefectFilling (H 0) U at hres + rwa [h0] at hres + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleEuclideanRestoreBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleEuclideanRestoreBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..49f540cadda8b25484f9abcc48374dcea77a4923 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleEuclideanRestoreBound.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EuclideanRestoration +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds + +namespace OAI + +/-! A fixed atlas controls a single Euclidean restored correction, with a +constant independent of its center, support radius and jet tensor. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem single_euclidean_restore_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (i : A.centers) (f : Plane → Space) (C : ℝ), + 0 ≤ C → ContDiff ℝ ∞ f → WeightedEstimates.WeightedBound univ 1 m C f → + A.WeightedBound 1 m (D*C) (euclideanRestore (i : M) (A.outer i) f) := by + classical + let e := (EuclideanSpace.equiv (Fin 2) ℝ).symm.toContinuousLinearMap + let K : ℝ := max 1 ‖e‖ ^ m + have hK : 0 ≤ K := pow_nonneg (le_max_of_le_left zero_le_one) _ + obtain ⟨D,hD,hd⟩ := A.restoration_bound (V := Space) m + refine ⟨D*K,mul_nonneg hD hK,?_⟩ + intro i f C hC hf hb + have he : WeightedEstimates.WeightedBound univ 1 m (K*C) (f ∘ e) := by + intro j hj x hx + rw [iteratedFDerivWithin_univ,e.iteratedFDeriv_comp_right hf x (by simp)] + simp only [one_pow,one_mul] + have hnorm := (iteratedFDeriv ℝ j f (e x)).norm_compContinuousLinearMap_le + (fun _ => e) + have hp : ‖e‖^j ≤ K := by + exact (pow_le_pow_left₀ (norm_nonneg _) (le_max_right 1 ‖e‖) _).trans + (pow_le_pow_right₀ (le_max_left 1 ‖e‖) hj) + have hv := hb j hj (e x) (mem_univ _) + simp only [iteratedFDerivWithin_univ,one_pow,one_mul] at hv + calc + _ ≤ ‖iteratedFDeriv ℝ j f (e x)‖ * ∏ _ : Fin j, ‖e‖ := hnorm + _ = ‖iteratedFDeriv ℝ j f (e x)‖ * ‖e‖^j := by simp + _ ≤ C*K := mul_le_mul hv hp (pow_nonneg (norm_nonneg _) _) hC + _ = K*C := mul_comm _ _ + have hr := hd (fun k => if k = i then f ∘ e else 0) 1 (K*C) + zero_lt_one le_rfl (mul_nonneg hK hC) + (fun k => by split_ifs; exact hf.comp e.contDiff; exact contDiff_const) + (fun k => by split_ifs; exact he; exact (weightedBound_zero univ 1 m).mono_const (mul_nonneg hK hC)) + have heq : (∑ k : A.centers, restore (k : M) (A.outer k) + (if k = i then f ∘ e else 0)) = euclideanRestore (i : M) (A.outer i) f := by + funext p + simp only [Finset.sum_apply] + rw [Finset.sum_eq_single i] + · simp [euclideanRestore,e] + · intro j _ hji + simp [hji,restore] + · simp + rw [heq] at hr + simpa only [mul_assoc] using hr + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleTensorRestoreBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleTensorRestoreBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b37f8529a3e6f911b244f7cce084d98872200a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SingleTensorRestoreBound.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates + +namespace OAI + +/-! The fixed atlas estimate for the single tensor patch of a primitive. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +local instance singleTensorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance singleTensorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance singleTensorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance singleTensorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance singleTensorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance singleTensorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +local instance singleTensorCentersDecidableEq : DecidableEq A.centers := Classical.decEq _ + +omit [CompactSpace M] in +lemma tensorPlaneRestore_single (i : A.centers) (f : SmallModes.Base → PhaseMean.Tensor) : + A.tensorPlaneRestore (fun j => if j = i then f else 0) = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (f (planeCoordinateIsometry y))) := by + classical + funext p + unfold tensorPlaneRestore + rw [Finset.sum_eq_single i] + · simp + · intro j _ hji + simp [hji,bundleRestore] + · exact fun hi => False.elim (hi (Finset.mem_univ _)) + +lemma single_tensor_restore_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : SmallModes.Base → PhaseMean.Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → WeightedBound univ s m C f → + A.TensorWeightedBound s m (D*C) + (A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (f (planeCoordinateIsometry y)))) := by + classical + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hb + rw [← A.tensorPlaneRestore_single i f] + apply hd _ s C hs hs1 hC + · intro j + split_ifs + · exact hf + · exact contDiff_const + · intro j + split_ifs + · exact hb + · exact (weightedBound_zero univ s m).mono_const hC + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SliceDerivativeSurjective.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SliceDerivativeSurjective.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba55f6473f3622811ba7bc6a5c4c8e0419bf66c6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SliceDerivativeSurjective.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSardTransfer + +namespace OAI + +/-! Surjectivity in split coordinates is equivalent to surjectivity of +the vertical derivative when the first component is the first coordinate. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem split_linear_surjective {K : (ℝ × E) →L[ℝ] (ℝ × F)} + (hfirst : ∀ v, (K v).1 = v.1) + (hvert : Function.Surjective (fun v : E => (K (0,v)).2)) : + Function.Surjective K := by + rintro ⟨a,y⟩ + obtain ⟨v,hv⟩ := hvert (y-(K (a,0)).2) + refine ⟨(a,v),?_⟩ + apply Prod.ext + · exact hfirst _ + · have h := congrArg Prod.snd (map_add K (a,0) (0,v)) + simp only [Prod.mk_add_mk,add_zero,zero_add,Prod.snd_add] at h + dsimp only at hv + rw [h,hv] + abel + +theorem slice_derivative_not_surjective {f : (ℝ × E) → ℝ × F} {U : Set (ℝ × E)} + (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) + (hfirst : ∀ z ∈ U, (f z).1 = z.1) (a : ℝ) (x : E) (hx : (a,x) ∈ U) + (hcrit : ¬ Function.Surjective (fderiv ℝ f (a,x))) : + ¬ Function.Surjective (fderiv ℝ (fun y : E => (f (a,y)).2) x) := by + have hfd := (hf.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) + have he : (fun z => (f z).1) =ᶠ[𝓝 (a,x)] Prod.fst := + Filter.eventuallyEq_iff_exists_mem.mpr ⟨U,hU.mem_nhds hx,hfirst⟩ + have he' : (ContinuousLinearMap.fst ℝ ℝ F).comp (fderiv ℝ f (a,x)) = + ContinuousLinearMap.fst ℝ ℝ E := by + rw [← fderiv.fst hfd,he.fderiv_eq (𝕜 := ℝ),fderiv_fst] + have hpair : HasFDerivAt (fun y : E => (a,y)) (ContinuousLinearMap.inr ℝ ℝ E) x := + (hasFDerivAt_const a x).prodMk (hasFDerivAt_id x) + have hv := ((hfd.hasFDerivAt.comp x hpair).snd).fderiv + dsimp only [Function.comp_def] at hv + intro hs + apply hcrit + apply split_linear_surjective (fun v => congrArg (fun L : (ℝ × E) →L[ℝ] ℝ => L v) he') + intro y + obtain ⟨v,hv'⟩ := hs y + refine ⟨v,?_⟩ + rw [hv] at hv' + exact hv' + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowFlatRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowFlatRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..a19c4d0f1a0e258fa050e95663f3b86e8539a852 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowFlatRemainder.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisFlatBounds +import OAI.Geometry.SurfaceImmersion.Whitney.SlowCollarCutoff + +namespace OAI + +/-! A logarithmically slow cutoff preserves the first-order smallness +of any remainder with zero value and derivative along the axis. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem slow_flat_remainder_bound {R : Base → W} {χ : ℝ → ℝ} + (hR : ContDiff ℝ ∞ R) (hχ : ContDiff ℝ ∞ χ) + (h0 : ∀ t, R (crosscapAxis t) = 0) + (hD0 : ∀ t, fderiv ℝ R (crosscapAxis t) = 0) + {ρ C : ℝ} (hC : 0 ≤ C) + (hb : ∀ x ∈ closedBall (0 : Base) ρ, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ C) + (hχb : ∀ t, |χ t| ≤ 1) (hχd : ∀ t, |t*deriv χ t| ≤ 1) + {x : Base} (hx : x ∈ closedBall (0 : Base) ρ) : + ‖fderiv ℝ (fun y => χ (y 0) • R y) x‖ ≤ + (1 + ‖(ContinuousLinearMap.proj 0 : Base →L[ℝ] ℝ)‖)*C*|x 0| := by + let P : Base →L[ℝ] ℝ := ContinuousLinearMap.proj 0 + have hv := axis_flat_value_bound hR h0 hD0 hC hb hx + have hd := axis_flat_first_bound hR hD0 hb hx + have hχD : HasFDerivAt (fun y : Base => χ (y 0)) (deriv χ (x 0) • P) x := by + have h := ((hχ.differentiable (by simp) _).hasDerivAt.hasFDerivAt).comp x + (hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) x) + change HasFDerivAt (fun y : Base => χ (y 0)) _ x at h + have he : (ContinuousLinearMap.toSpanSingleton ℝ (deriv χ (x 0))).comp + (ContinuousLinearMap.proj 0) = deriv χ (x 0) • P := by + ext v + simp [P, mul_comm] + rw [he] at h + exact h + have hp := hχD.smul (hR.differentiable (by simp) x).hasFDerivAt + change HasFDerivAt (fun y => χ (y 0) • R y) _ x at hp + have hweighted : |deriv χ (x 0)| * ‖R x‖ ≤ C*|x 0| := by + calc + _ ≤ |deriv χ (x 0)| * (C*|x 0|^2) := mul_le_mul_of_nonneg_left hv (abs_nonneg _) + _ = (C*|x 0|) * |x 0*deriv χ (x 0)| := by rw [abs_mul]; ring + _ ≤ (C*|x 0|)*1 := mul_le_mul_of_nonneg_left (hχd _) (mul_nonneg hC (abs_nonneg _)) + _ = _ := mul_one _ + rw [hp.fderiv] + calc + _ ≤ ‖χ (x 0) • fderiv ℝ R x‖ + ‖(deriv χ (x 0) • P).smulRight (R x)‖ := norm_add_le _ _ + _ = |χ (x 0)| * ‖fderiv ℝ R x‖ + ‖P‖*(|deriv χ (x 0)| * ‖R x‖) := by + rw [norm_smul, Real.norm_eq_abs, ContinuousLinearMap.norm_smulRight_apply, + norm_smul, Real.norm_eq_abs] + ring + _ ≤ 1*(C*|x 0|) + ‖P‖*(C*|x 0|) := add_le_add + (mul_le_mul (hχb _) hd (norm_nonneg _) (by norm_num)) + (mul_le_mul_of_nonneg_left hweighted (norm_nonneg _)) + _ = _ := by dsimp [P]; ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowOrderSchedule.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowOrderSchedule.lean new file mode 100644 index 0000000000000000000000000000000000000000..27d368e4e5e9798aa8b7e3816cb2e997a887db16 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SlowOrderSchedule.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScales + +namespace OAI + +/-! A derivative order can increase to infinity one step at a time, +waiting until any prescribed fixed-order smallness threshold holds. -/ +noncomputable section +open Filter +open scoped Topology + +namespace ClosedSurfaceR4.ExactCorrection + +private def delayedRank (N : ℕ → ℕ) : ℕ → ℕ + | 0 => 0 + | n+1 => if N (delayedRank N n) ≤ n+1 then delayedRank N n+1 else delayedRank N n + +private lemma delayedRank_step (N : ℕ → ℕ) (n : ℕ) : + delayedRank N n ≤ delayedRank N (n+1) ∧ + delayedRank N (n+1) ≤ delayedRank N n+1 := by + rw [delayedRank] + split_ifs <;> omega + +private lemma delayedRank_monotone (N : ℕ → ℕ) : Monotone (delayedRank N) := + monotone_nat_of_le_succ (fun n => (delayedRank_step N n).1) + +private lemma delayedRank_threshold (N : ℕ → ℕ) (n : ℕ) : + 0 < delayedRank N n → N (delayedRank N n-1) ≤ n := by + induction n with + | zero => simp [delayedRank] + | succ n ih => + rw [delayedRank] + split_ifs with h + · intro _ + simpa only [Nat.add_sub_cancel] using h + · intro hpos + exact (ih hpos).trans (Nat.le_succ n) + +private lemma delayedRank_cofinal (N : ℕ → ℕ) (m : ℕ) : + ∃ n, m ≤ delayedRank N n := by + induction m with + | zero => exact ⟨0,Nat.zero_le _⟩ + | succ m ih => + obtain ⟨n,hn⟩ := ih + let p := max n (N m) + have hp : m ≤ delayedRank N p := hn.trans (delayedRank_monotone N (le_max_left _ _)) + by_cases hlarge : m < delayedRank N p + · exact ⟨p,hlarge⟩ + · have he : delayedRank N p = m := by omega + have hNp : N (delayedRank N p) ≤ p+1 := by + rw [he] + exact (le_max_right n (N m)).trans (Nat.le_succ p) + refine ⟨p+1,?_⟩ + rw [delayedRank,ite_eq_left hNp,he] + +/-- No rate of convergence is required: each finite-order threshold +can be reached before increasing the order, with increments at most one. -/ +theorem exists_slow_order_schedule {t : ℕ → ℝ} (ht : Tendsto t atTop (𝓝 0)) + (ε : ℕ → ℝ) (hε : ∀ j, 0 < ε j) : + ∃ k : ℕ → ℕ, k 0 = 0 ∧ Tendsto k atTop atTop ∧ + (∀ n, k n ≤ k (n+1) ∧ k (n+1) ≤ k n+1) ∧ + ∀ n, 0 < k n → t n < ε (k n-1) := by + classical + have hN : ∀ j, ∃ N : ℕ, ∀ n ≥ N, t n < ε j := by + intro j + exact eventually_atTop.mp (ht.eventually (gt_mem_nhds (hε j))) + choose N hN using hN + refine ⟨delayedRank N,rfl,?_,delayedRank_step N,?_⟩ + · exact (delayedRank_monotone N).tendsto_atTop_atTop_iff.mpr (delayedRank_cofinal N) + · intro n hn + exact hN (delayedRank N n-1) n (delayedRank_threshold N n hn) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallGraphBlends.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallGraphBlends.lean new file mode 100644 index 0000000000000000000000000000000000000000..80cbab8e4d6ce00f9c65790be974245f370f6f28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallGraphBlends.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GraphBlendBounds + +namespace OAI + +/-! All convex interpolations between two graphs remain in a prescribed +neighborhood when their common base point is approached. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def graphPoint (f : ℝ → ℝ) (x : ℝ) : Base := ![x,f x] + +lemma graphPoint_continuous {f : ℝ → ℝ} (hf : Continuous f) : Continuous (graphPoint f) := by + apply continuous_pi + intro i + fin_cases i + · exact continuous_id + · exact hf + +lemma roundedReturnCurve_eq_blend (f g : ℝ → ℝ) (a b t : ℝ) : + roundedReturnCurve f g a b t = + (1-centeredSmoothStep t) • graphPoint f (a+b*t^2) + + centeredSmoothStep t • graphPoint g (a+b*t^2) := by + ext i + fin_cases i + · change a+b*t^2 = (1-centeredSmoothStep t)*(a+b*t^2)+centeredSmoothStep t*(a+b*t^2) + ring + · rfl + +theorem small_graph_blends {f g : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) + (x : ℝ) (he : f x = g x) {V : Set Base} (hV : IsOpen V) + (hx : graphPoint f x ∈ V) : + ∃ δ > 0, ∀ y ∈ Ioo (x-δ) (x+δ), ∀ s ∈ Icc (0:ℝ) 1, + (1-s) • graphPoint f y + s • graphPoint g y ∈ V := by + obtain ⟨ε,hε,hball⟩ := Metric.isOpen_iff.mp hV _ hx + have hcenter : graphPoint f x = graphPoint g x := by simp [graphPoint,he] + have hF : ∀ᶠ y in 𝓝 x, graphPoint f y ∈ Metric.ball (graphPoint f x) ε := + (graphPoint_continuous hf).continuousAt.preimage_mem_nhds (Metric.ball_mem_nhds _ hε) + have hG : ∀ᶠ y in 𝓝 x, graphPoint g y ∈ Metric.ball (graphPoint f x) ε := by + rw [hcenter] + exact (graphPoint_continuous hg).continuousAt.preimage_mem_nhds (Metric.ball_mem_nhds _ hε) + obtain ⟨δ,hδ,hsmall⟩ := Metric.eventually_nhds_iff.mp (hF.and hG) + refine ⟨δ,hδ,?_⟩ + intro y hy s hs + have hyd : dist y x < δ := by rw [Real.dist_eq]; exact abs_lt.mpr ⟨by linarith [hy.1],by linarith [hy.2]⟩ + obtain ⟨hfy,hgy⟩ := hsmall hyd + apply hball + exact (convex_ball (graphPoint f x) ε) hfy hgy (sub_nonneg.mpr hs.2) hs.1 (by ring) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallMetricStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallMetricStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..007d1a4c57e746f1f31ef9fe1c83329c46e25e13 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SmallMetricStartingFamily.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformSmallStartingMetric + +namespace OAI + +/-! A spherical family with a uniformly small induced metric, with the +scale chosen before the finite set at which the spherical second form vanishes. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [SecondCountableTopology M] + +theorem small_metric_starting_family (g : SmoothMetric M) + (hW : PublishedInputs.WhitneySurfaceInput M) {η : ℝ} (hη : 0 < η) : + ∃ (I : M → Space) (A : SmoothingAtlas M) (r D c : ℝ), + ContMDiff planeModel spaceModel ∞ I ∧ (∀ p, ‖I p‖ = 1) ∧ + 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (a : P → A.centers) (G : M → Space) (n : PreferredNormal (r • G)), + (∀ p, A.weight (a p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) ∧ + n.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + A.TensorWeightedBound 1 1 η (inducedTensor (r • G)) ∧ + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + ∀ p : P, G p = I p ∧ + fderiv ℝ (G ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) = + fderiv ℝ (I ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (a p : M)).symm) + (chartAt Plane (a p : M) p) v w = 0 := by + obtain ⟨I,hI,hunit,hImm,⟨data⟩⟩ := metricPhaseData_of_whitney g hW + let A := data.A + obtain ⟨D,c,hD,hc,hprep⟩ := A.uniform_prepared_spherical_immersion g hI hunit hImm + obtain ⟨r,hr,hr1,hsmall⟩ := A.uniform_small_scaled_metric g hD hη + refine ⟨I,A,r,D,c,hI,hunit,hr,hr1,hD,hc,?_⟩ + intro P ε hε + obtain ⟨a,G,ha,hG,hu,hGI,hclose,hbound,hlower,hflat⟩ := hprep P ε hε + let n := (sphericalPreferredNormal hG hu).const_smul hG r + have hscaled : ∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p) := by + intro p v w h + have hd := const_smul_mfderiv ((hG p).mdifferentiableAt (by simp)) r + have he := congrArg (fun z : Space => r⁻¹ • z) h + rw [hd] at he + change r⁻¹ • (r • (mfderiv planeModel spaceModel G p v)) = + r⁻¹ • (r • (mfderiv planeModel spaceModel G p w)) at he + simp only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul] at he + exact hGI p he + exact ⟨a,G,n,ha,hG,hu,hscaled,rfl,hclose,hbound,hlower, + (hsmall G hG hbound).1,(hsmall G hG hbound).2,hflat⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalInitialBoundary.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalInitialBoundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..064645ea304e7af845a192dc5e822c5706d6fff6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalInitialBoundary.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConstantNormBoundaryGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.UniformStartingFamily + +namespace OAI + +/-! The global inward normal of a scaled spherical immersion satisfies +the nonvanishing and antipode exclusions for every nonzero direction. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4 +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem spherical_initial_boundary_geometry {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (hunit : ∀ p, ‖G p‖ = 1) + {r : ℝ} (hr : 0 < r) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) + (p : M) {v : SmallModes.Base} (hv : v ≠ 0) : + 0 < realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p) ⬝ᵥ + spaceCoordinates (-G p) ∧ + realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p) ≠ 0 ∧ + normalize (realSecondForm (coordinateMap (r • G) p) v v (coordinateCenter p)) ≠ + -spaceCoordinates (-G p) := by + have hs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hR : ∀ y, coordinateMap (r • G) p y ⬝ᵥ coordinateMap (r • G) p y = r^2 := by + intro y + simp only [coordinateMap,Function.comp_apply,Pi.smul_apply,spaceCoordinates_dot] + rw [real_inner_self_eq_norm_sq,norm_smul,Real.norm_eq_abs,hunit,mul_one,sq_abs] + have hn : r⁻¹ • (-coordinateMap (r • G) p (coordinateCenter p)) = + spaceCoordinates (-G p) := by + rw [coordinateMap_at_center,Pi.smul_apply,map_smul,map_neg,smul_neg,smul_smul, + inv_mul_cancel₀ hr.ne',one_smul] + have hh := constant_norm_boundary_geometry (coordinateDomain_open p) + (coordinateMap_smoothOn hs p) hR hr (coordinateCenter_mem p) + (coordinateMap_immersion_center hs p (hI p)) hv + simpa only [hn] using hh + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJetGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJetGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f274f58b7c267988004d1c36249c7a38fbb2f66 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJetGerms.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalPointFlattening + +namespace OAI + +/-! Local versions of the spherical identities. Chart representatives need +take values in the sphere only near the point under consideration. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +lemma radial_first_of_germ {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {p : Plane} (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) (v : Plane) : + inner ℝ (F p) (fderiv ℝ F p v) = 0 := by + have he : (fun y => inner ℝ (F y) (F y)) =ᶠ[𝓝 p] (fun _ => (1 : ℝ)) := by + filter_upwards [hunit] with y hy + rw [real_inner_self_eq_norm_sq,hy] + norm_num + have hh := congrArg (fun A : Plane →L[ℝ] ℝ => A v) he.fderiv_eq + rw [fderiv_inner_apply ℝ (hF.differentiable (by simp) p) + (hF.differentiable (by simp) p)] at hh + simp only [fderiv_const_apply,zero_apply,real_inner_comm (F p)] at hh + linarith + +lemma radial_second_of_germ {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {p : Plane} (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) (v w : Plane) : + inner ℝ (F p) (fderiv ℝ (fderiv ℝ F) p v w) = + -inner ℝ (fderiv ℝ F p v) (fderiv ℝ F p w) := by + have he : (fun y => inner ℝ (F y) (fderiv ℝ F y w)) =ᶠ[𝓝 p] + (fun _ => (0 : ℝ)) := by + filter_upwards [hunit.eventually_nhds] with y hy + exact radial_first_of_germ hF hy w + have hh := congrArg (fun A : Plane →L[ℝ] ℝ => A v) he.fderiv_eq + have hD := (hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) p + rw [fderiv_inner_apply ℝ (hF.differentiable (by simp) p) + (hD.clm_apply (differentiableAt_const w)),derivative_apply hF] at hh + simp only [fderiv_const_apply,zero_apply] at hh + linarith + +lemma radial_normal_mem_of_germ {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {p : Plane} (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) : + F p ∈ normalSpace F p := by + rw [normalSpace,Submodule.mem_orthogonal] + rintro _ ⟨v,rfl⟩ + change inner ℝ (fderiv ℝ F p v) (F p) = 0 + rw [real_inner_comm] + exact radial_first_of_germ hF hunit v + +lemma sphericalSecondForm_mem_of_germ {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {p : Plane} (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) (v w : Plane) : + sphericalSecondForm F p v w ∈ normalSpace F p := by + exact Submodule.add_mem _ (Submodule.starProjection_apply_mem _ _) + (Submodule.smul_mem _ _ (radial_normal_mem_of_germ hF hunit)) + +lemma sphericalSecondForm_radial_orthogonal_of_germ {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) {p : Plane} (hunit : ∀ᶠ x in 𝓝 p, ‖F x‖ = 1) + (v w : Plane) : inner ℝ (sphericalSecondForm F p v w) (F p) = 0 := by + have hp : ‖F p‖ = 1 := Filter.EventuallyEq.eq_of_nhds hunit + have hnorm : inner ℝ (F p) (F p) = 1 := by rw [real_inner_self_eq_norm_sq,hp]; norm_num + rw [sphericalSecondForm,inner_add_left,real_inner_smul_left,hnorm,mul_one, + secondForm,Submodule.inner_starProjection_left_eq_right, + Submodule.starProjection_eq_self_iff.mpr (radial_normal_mem_of_germ hF hunit), + real_inner_comm,radial_second_of_germ hF hunit] + exact neg_add_cancel _ + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..320bf93f738e8bdcbd1d02b07e87bd75f54be614 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalJets.lean @@ -0,0 +1,179 @@ +import Mathlib + +namespace OAI + +/-! +The radial normal of a spherical surface immersion. The identities are for +actual Fréchet derivatives and the orthogonal projection defining the second +fundamental form, not an abstract second-jet model. +-/ + +noncomputable section + +open scoped ContDiff + +namespace ClosedSurfaceR4.SphericalJets + +abbrev Plane := EuclideanSpace ℝ (Fin 2) +abbrev Space := EuclideanSpace ℝ (Fin 4) + +theorem radial_first {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v : Plane) : + inner ℝ (F x) (fderiv ℝ F x v) = 0 := by + have he : (fun y => inner ℝ (F y) (F y)) = fun _ => (1 : ℝ) := by + funext y + rw [real_inner_self_eq_norm_sq, hunit y] + norm_num + have hd := hF.differentiable (by simp) x + have hh := congrArg (fun A : Plane →L[ℝ] ℝ => A v) + (congrArg (fun f : Plane → ℝ => fderiv ℝ f x) he) + rw [fderiv_inner_apply ℝ hd hd] at hh + simp only [fderiv_const_apply, zero_apply, real_inner_comm (F x)] at hh + linarith + +lemma derivative_apply {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (x v w : Plane) : + fderiv ℝ (fun y => fderiv ℝ F y w) x v = + fderiv ℝ (fderiv ℝ F) x v w := by + have hDF := (hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x + rw [fderiv_clm_apply hDF (differentiableAt_const w)] + simp + +theorem radial_second {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v w : Plane) : + inner ℝ (F x) (fderiv ℝ (fderiv ℝ F) x v w) = + -inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w) := by + have he : (fun y => inner ℝ (F y) (fderiv ℝ F y w)) = fun _ => (0 : ℝ) := by + funext y + exact radial_first hF hunit y w + have hh := congrArg (fun A : Plane →L[ℝ] ℝ => A v) + (congrArg (fun f : Plane → ℝ => fderiv ℝ f x) he) + have hd := hF.differentiable (by simp) x + have hDF := (hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x + rw [fderiv_inner_apply ℝ hd (hDF.clm_apply (differentiableAt_const w)), + derivative_apply hF] at hh + simp only [fderiv_const_apply, zero_apply] at hh + linarith + +theorem raw_second_inward_pairing {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v w : Plane) : + inner ℝ (fderiv ℝ (fderiv ℝ F) x v w) (-F x) = + inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w) := by + rw [inner_neg_right, real_inner_comm, radial_second hF hunit, neg_neg] + +/-- The actual normal plane of the immersed tangent plane. -/ +def normalSpace (F : Plane → Space) (x : Plane) : Submodule ℝ Space := + (LinearMap.range (fderiv ℝ F x).toLinearMap)ᗮ + +/-- The Euclidean second fundamental form obtained by normal projection. -/ +def secondForm (F : Plane → Space) (x v w : Plane) : Space := + (normalSpace F x).starProjection (fderiv ℝ (fderiv ℝ F) x v w) + +theorem inward_normal_mem {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x : Plane) : -F x ∈ normalSpace F x := by + rw [normalSpace, Submodule.mem_orthogonal] + rintro _ ⟨v, rfl⟩ + change inner ℝ (fderiv ℝ F x v) (-F x) = 0 + rw [inner_neg_right, real_inner_comm, radial_first hF hunit, neg_zero] + +theorem secondForm_inward_pairing {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v w : Plane) : + inner ℝ (secondForm F x v w) (-F x) = + inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w) := by + rw [secondForm, Submodule.inner_starProjection_left_eq_right, + Submodule.starProjection_eq_self_iff.mpr (inward_normal_mem hF hunit x)] + exact raw_second_inward_pairing hF hunit x v w + +theorem secondForm_inward_pos {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v : Plane) + (hImm : Function.Injective (fderiv ℝ F x)) (hv : v ≠ 0) : + 0 < inner ℝ (secondForm F x v v) (-F x) := by + rw [secondForm_inward_pairing hF hunit] + apply real_inner_self_pos.mpr + intro h + apply hv + exact hImm (by simpa only [map_zero] using h) + +theorem secondForm_ne_zero {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (x v : Plane) + (hImm : Function.Injective (fderiv ℝ F x)) (hv : v ≠ 0) : + secondForm F x v v ≠ 0 := by + have hp := secondForm_inward_pos hF hunit x v hImm hv + intro h + rw [h, inner_zero_left] at hp + exact lt_irrefl 0 hp + +/-- Removing the radial component gives the second fundamental form within +the unit sphere. -/ +def sphericalSecondForm (F : Plane → Space) (x v w : Plane) : Space := + secondForm F x v w + + (inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w)) • F x + +theorem sphericalSecondForm_radial_orthogonal {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) (hunit : ∀ x, ‖F x‖ = 1) (x v w : Plane) : + inner ℝ (sphericalSecondForm F x v w) (F x) = 0 := by + have hp := secondForm_inward_pairing hF hunit x v w + rw [inner_neg_right] at hp + have hnorm : inner ℝ (F x) (F x) = 1 := by + rw [real_inner_self_eq_norm_sq, hunit x] + norm_num + simp only [sphericalSecondForm, inner_add_left, real_inner_smul_left, hnorm, mul_one] + linarith + +theorem radial_secondForm_decomposition (F : Plane → Space) (x v w : Plane) : + secondForm F x v w = sphericalSecondForm F x v w + + (inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w)) • (-F x) := by + simp only [sphericalSecondForm, smul_neg, add_neg_cancel_right] + +lemma firstDerivative_scale {F : Plane → Space} (hF : ContDiff ℝ ∞ F) (r : ℝ) (x : Plane) : + fderiv ℝ (fun y => r • F y) x = r • fderiv ℝ F x := + fderiv_const_smul (hF.differentiable (by simp) x) r + +lemma secondDerivative_scale {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (r : ℝ) (x v w : Plane) : + fderiv ℝ (fderiv ℝ (fun y => r • F y)) x v w = + r • fderiv ℝ (fderiv ℝ F) x v w := by + have he : fderiv ℝ (fun y => r • F y) = fun y => r • fderiv ℝ F y := by + funext y + exact firstDerivative_scale hF r y + rw [he] + change fderiv ℝ (r • fderiv ℝ F) x v w = _ + rw [fderiv_const_smul + ((hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x) r] + rfl + +lemma normalSpace_scale {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {r : ℝ} (hr : r ≠ 0) (x : Plane) : + normalSpace (fun y => r • F y) x = normalSpace F x := by + unfold normalSpace + rw [firstDerivative_scale hF r x] + change (LinearMap.range (r • (fderiv ℝ F x).toLinearMap))ᗮ = _ + rw [LinearMap.range_smul _ _ hr] + +theorem secondForm_scale {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {r : ℝ} (hr : r ≠ 0) (x v w : Plane) : + secondForm (fun y => r • F y) x v w = r • secondForm F x v w := by + unfold secondForm + simp only [normalSpace_scale hF hr, secondDerivative_scale hF, map_smul] + +/-- Equation `spherical-radial-form` for the actual second fundamental form. +The scaled induced metric appears in the coefficient of the inward radial +normal, as in the manuscript. -/ +theorem scaled_spherical_radial_form {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + {r : ℝ} (hr : r ≠ 0) (x v w : Plane) : + secondForm (fun y => r • F y) x v w = r • sphericalSecondForm F x v w + + (r⁻¹ * inner ℝ (fderiv ℝ (fun y => r • F y) x v) + (fderiv ℝ (fun y => r • F y) x w)) • (-F x) := by + rw [secondForm_scale hF hr, radial_secondForm_decomposition F, + firstDerivative_scale hF r x] + simp only [smul_apply, real_inner_smul_left, + real_inner_smul_right, smul_add, smul_smul] + congr 1 + congr 1 + field_simp + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalLift.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f0f14d4eab1c6d403d841193da4515129ceb9f5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalLift.lean @@ -0,0 +1,130 @@ +import Mathlib + +namespace OAI + +/-! +# The spherical lift of an ordinary surface immersion + +Inverse stereographic projection lifts a smooth immersion into three-space +to a smooth spherical immersion in four-space, as in Section 8.1 of paper 094-01. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.SphericalStart + +open Set Manifold +open scoped ContDiff Topology InnerProductSpace + +abbrev Space := EuclideanSpace ℝ (Fin 4) +abbrev ThreeSpace := EuclideanSpace ℝ (Fin 3) +abbrev Hyperplane (v : Space) := (ℝ ∙ v)ᗮ + +/-- Inverse stereographic projection, regarded as an ambient R4-valued map. -/ +def lift (v : Space) (w : Hyperplane v) : Space := stereoInvFunAux v w + +lemma lift_smooth (v : Space) : ContDiff ℝ ∞ (lift v) := + contDiff_stereoInvFunAux.comp (ℝ ∙ v)ᗮ.subtypeL.contDiff + +lemma lift_norm {v : Space} (hv : ‖v‖ = 1) (w : Hyperplane v) : + ‖lift v w‖ = 1 := by + exact mem_sphere_zero_iff_norm.mp (stereoInvFunAux_mem hv w.property) + +lemma lift_inner_lt_one {v : Space} (hv : ‖v‖ = 1) (w : Hyperplane v) : + inner ℝ v (lift v w) < 1 := by + apply (inner_lt_one_iff_real_of_norm_eq_one hv (lift_norm hv w)).mpr + exact (Subtype.coe_ne_coe.mpr (stereoInvFun_ne_north_pole hv w)).symm + +/-- Its differential is injective everywhere because stereographic projection +is a smooth left inverse on its image. -/ +theorem lift_fderiv_injective {v : Space} (hv : ‖v‖ = 1) (w : Hyperplane v) : + Function.Injective (fderiv ℝ (lift v) w) := by + let U : Set Space := {x | inner ℝ v x ≠ 1} + have hU : IsOpen U := isOpen_ne_fun (innerSL ℝ v).continuous continuous_const + have hw : lift v w ∈ U := ne_of_lt (lift_inner_lt_one hv w) + have hd : DifferentiableAt ℝ (stereoToFun v) (lift v w) := by + exact ((contDiffOn_stereoToFun (v := v) (n := (1 : ℕ∞ω))).contDiffAt + (hU.mem_nhds hw)).differentiableAt (by simp) + have hl := (lift_smooth v).differentiable (by simp) w + have he : stereoToFun v ∘ lift v = id := by + funext z + exact stereo_right_inv hv z + have hchain : (fderiv ℝ (stereoToFun v) (lift v w)).comp + (fderiv ℝ (lift v) w) = ContinuousLinearMap.id ℝ (Hyperplane v) := by + rw [← fderiv_comp w hd hl, he, fderiv_id] + intro a b hab + have hab' := congrArg (fderiv ℝ (stereoToFun v) (lift v w)) hab + change ((fderiv ℝ (stereoToFun v) (lift v w)).comp + (fderiv ℝ (lift v) w)) a = ((fderiv ℝ (stereoToFun v) (lift v w)).comp + (fderiv ℝ (lift v) w)) b at hab' + simpa only [hchain, ContinuousLinearMap.id_apply] using hab' + +variable {M : Type*} [TopologicalSpace M] + [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] + [IsManifold 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) ∞ M] + +omit [IsManifold 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) ∞ M] in +/-- A smooth ordinary immersion into the three-dimensional hyperplane gives +an ambient smooth immersion with image in the unit three-sphere. -/ +theorem spherical_immersion_of_hyperplane_immersion {v : Space} (hv : ‖v‖ = 1) + {F : M → Hyperplane v} + (hF : ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Hyperplane v) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Hyperplane v) F p)) : + ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Space) ∞ (lift v ∘ F) ∧ + (∀ p, ‖lift v (F p)‖ = 1) ∧ + ∀ p, Function.Injective + (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Space) (lift v ∘ F) p) := by + have hl := (lift_smooth v).contMDiff + refine ⟨hl.comp hF, fun p => lift_norm hv (F p), ?_⟩ + intro p + rw [mfderiv_comp p (hl.mdifferentiable (by simp)).mdifferentiableAt + (hF.mdifferentiable (by simp)).mdifferentiableAt, mfderiv_eq_fderiv] + exact (lift_fderiv_injective hv (F p)).comp (hI p) + +/-- The hyperplane perpendicular to a nonzero vector in four-space is +isometrically three-dimensional. -/ +def threeSpaceToHyperplane {v : Space} (hv : v ≠ 0) : + ThreeSpace ≃ₗᵢ[ℝ] Hyperplane v := by + letI : Fact (Module.finrank ℝ Space = 3 + 1) := ⟨by simp [Space]⟩ + exact (OrthonormalBasis.fromOrthogonalSpanSingleton 3 hv).repr.symm + +omit [IsManifold 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) ∞ M] in +/-- The ordinary smooth three-space immersion supplied at the starting step +can be placed in the unit three-sphere. -/ +theorem spherical_immersion_of_three_space_immersion {v : Space} (hv : ‖v‖ = 1) + {F : M → ThreeSpace} + (hF : ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, ThreeSpace) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, ThreeSpace) F p)) : + ∃ G : M → Space, + ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Space) ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + ∀ p, Function.Injective + (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Space) G p) := by + have hv0 : v ≠ 0 := by + intro he + rw [he, norm_zero] at hv + norm_num at hv + let e := threeSpaceToHyperplane hv0 + have he : ContDiff ℝ ∞ e := e.toContinuousLinearEquiv.contDiff + have hi : ∀ p, Function.Injective + (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, Hyperplane v) (e ∘ F) p) := by + intro p + rw [mfderiv_comp p (he.contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hF.mdifferentiable (by simp)).mdifferentiableAt, mfderiv_eq_fderiv] + let D : EuclideanSpace ℝ (Fin 2) →L[ℝ] ThreeSpace := + mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin 2)) 𝓘(ℝ, ThreeSpace) F p + change Function.Injective ((fderiv ℝ e (F p)).comp D) + have hde : fderiv ℝ e (F p) = e.toContinuousLinearEquiv.toContinuousLinearMap := + e.toContinuousLinearEquiv.hasFDerivAt.fderiv + rw [hde] + exact e.injective.comp (hI p) + exact ⟨lift v ∘ (e ∘ F), + spherical_immersion_of_hyperplane_immersion hv (he.contMDiff.comp hF) hi⟩ + +end ClosedSurfaceR4.SphericalStart + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalPointFlattening.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalPointFlattening.lean new file mode 100644 index 0000000000000000000000000000000000000000..b61caa9cdb20e615387f5dd7f574fb4110875a7b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalPointFlattening.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.QuadraticJetCutoff + +namespace OAI + +/-! Exact spherical second-jet cancellation by a supported quadratic map. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +def sphericalSecondFormCLM (F : Plane → Space) (p : Plane) : + Plane →L[ℝ] Plane →L[ℝ] Space := + (ContinuousLinearMap.compL ℝ Plane Space Space (normalSpace F p).starProjection).comp + (fderiv ℝ (fderiv ℝ F) p) + + ((ContinuousLinearMap.smulRightL ℝ Plane Space).flip (F p)).comp + (((innerSL ℝ).restrictScalars ℝ).bilinearComp (fderiv ℝ F p) (fderiv ℝ F p)) + +lemma sphericalSecondFormCLM_apply (F : Plane → Space) (p v w : Plane) : + sphericalSecondFormCLM F p v w = sphericalSecondForm F p v w := rfl + +lemma sphericalSecondForm_symmetric {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (p v w : Plane) : sphericalSecondForm F p v w = sphericalSecondForm F p w v := by + unfold sphericalSecondForm secondForm + rw [hF.contDiffAt.isSymmSndFDerivAt (by simp) v w,real_inner_comm] + +lemma sphericalSecondForm_mem {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (p v w : Plane) : + sphericalSecondForm F p v w ∈ normalSpace F p := by + apply Submodule.add_mem + · exact Submodule.starProjection_apply_mem _ _ + · apply Submodule.smul_mem + simpa using (normalSpace F p).neg_mem (inward_normal_mem hF hunit p) + +lemma secondDerivative_add {F Q : Plane → Space} + (hF : ContDiff ℝ ∞ F) (hQ : ContDiff ℝ ∞ Q) (p v w : Plane) : + fderiv ℝ (fderiv ℝ (F+Q)) p v w = + fderiv ℝ (fderiv ℝ F) p v w + fderiv ℝ (fderiv ℝ Q) p v w := by + have he : fderiv ℝ (F+Q) = fderiv ℝ F + fderiv ℝ Q := by + funext x + exact fderiv_add (hF.differentiable (by simp) x) (hQ.differentiable (by simp) x) + rw [he, fderiv_add + ((hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) p) + ((hQ.fderiv_right (m := ∞) (by simp)).differentiable (by simp) p)] + rfl + +/-- The cutoff correction kills the spherical second fundamental form at its +center, while preserving the value and the full first derivative. -/ +theorem spherical_point_flattening {F : Plane → Space} (hF : ContDiff ℝ ∞ F) + (hunit : ∀ x, ‖F x‖ = 1) (p : Plane) (χ : ContDiffBump p) : + let Q := cutoffQuadratic (sphericalSecondFormCLM F p) p χ + let G := radialNormalize ∘ (F+Q) + G p = F p ∧ fderiv ℝ G p = fderiv ℝ F p ∧ + ∀ v w, sphericalSecondForm G p v w = 0 := by + dsimp only + let B := sphericalSecondFormCLM F p + let Q := cutoffQuadratic B p χ + let H := F+Q + let G := radialNormalize ∘ H + have hB : ∀ v w, B v w = B w v := by + intro v w + change sphericalSecondForm F p v w = sphericalSecondForm F p w v + exact sphericalSecondForm_symmetric hF p v w + have hQ := cutoffQuadratic_smooth B p χ + obtain ⟨hq0,hq1,hq2⟩ := cutoffQuadratic_jets B hB p χ + change Q p = 0 at hq0 + change fderiv ℝ Q p = 0 at hq1 + change ∀ v w, fderiv ℝ (fderiv ℝ Q) p v w = -B v w at hq2 + have hH : ContDiff ℝ ∞ H := hF.add hQ + have hH0 : H p = F p := by change F p + Q p = F p; rw [hq0,add_zero] + have hH1 : fderiv ℝ H p = fderiv ℝ F p := by + rw [show H = F+Q from rfl, fderiv_add (hF.differentiable (by simp) p) + (hQ.differentiable (by simp) p), hq1, add_zero] + have hn : F p ≠ 0 := by intro hz; simpa [hz] using hunit p + have hG0 : G p = F p := by simp [G,Function.comp_apply,hH0,radialNormalize,hunit] + have hG1 : fderiv ℝ G p = fderiv ℝ F p := by + ext v + rw [show G = radialNormalize ∘ H from rfl, + fderiv_comp p ((radialNormalize_smoothAt (by rw [hH0]; exact hn)).differentiableAt + (by simp)) (hH.differentiable (by simp) p)] + simp only [ContinuousLinearMap.comp_apply,hH0,hH1, + radialNormalize_fderiv_unit (hunit p),radial_first hF hunit,zero_smul,sub_zero] + have hN : normalSpace G p = normalSpace F p := by unfold normalSpace; rw [hG1] + have hrad : radialNormalize ∘ F = F := by + funext x + simp [radialNormalize,Function.comp_apply,hunit] + have hG2 (v w : Plane) : fderiv ℝ (fderiv ℝ G) p v w = + fderiv ℝ (fderiv ℝ F) p v w - sphericalSecondForm F p v w := by + have hd := radialNormalize_second_jet_difference hF hH p v w (hunit p) hH0 hH1 + rw [hrad,secondDerivative_add hF hQ,hq2] at hd + change _ - _ = _ - inner ℝ (F p) _ • F p at hd + have ho : inner ℝ (F p) (sphericalSecondForm F p v w) = 0 := by + rw [real_inner_comm] + exact sphericalSecondForm_radial_orthogonal hF hunit p v w + change fderiv ℝ (fderiv ℝ G) p v w - _ = _ at hd + change _ = (_ + -sphericalSecondForm F p v w - _) - + inner ℝ (F p) (_ + -sphericalSecondForm F p v w - _) • F p at hd + have hc : fderiv ℝ (fderiv ℝ F) p v w + -sphericalSecondForm F p v w - + fderiv ℝ (fderiv ℝ F) p v w = -sphericalSecondForm F p v w := by abel + rw [hc,inner_neg_right,ho,neg_zero,zero_smul,sub_zero] at hd + exact sub_eq_iff_eq_add.mp hd |>.trans (by abel) + refine ⟨hG0,hG1,?_⟩ + intro v w + change sphericalSecondForm G p v w = 0 + change (normalSpace G p).starProjection (fderiv ℝ (fderiv ℝ G) p v w) + + inner ℝ (fderiv ℝ G p v) (fderiv ℝ G p w) • G p = 0 + simp only [hN,hG2,map_sub,hG1,hG0] + rw [Submodule.starProjection_eq_self_iff.mpr (sphericalSecondForm_mem hF hunit p v w)] + change secondForm F p v w - sphericalSecondForm F p v w + _ = 0 + unfold sphericalSecondForm + abel + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalTensorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalTensorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c86901fba6ba2e496448df85fad463aebbc128e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SphericalTensorBound.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalPointFlattening + +namespace OAI + +/-! The spherical correction tensor is bounded using only the first two +derivatives, uniformly without choosing a normal frame. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.SphericalJets + +lemma norm_sphericalSecondFormCLM_le (F : Plane → Space) (p : Plane) : + ‖sphericalSecondFormCLM F p‖ ≤ ‖fderiv ℝ (fderiv ℝ F) p‖ + + ‖fderiv ℝ F p‖^2 * ‖F p‖ := by + apply ContinuousLinearMap.opNorm_le_bound₂ _ (by positivity) + intro v w + rw [sphericalSecondFormCLM_apply,sphericalSecondForm] + calc + _ ≤ ‖secondForm F p v w‖ + + ‖inner ℝ (fderiv ℝ F p v) (fderiv ℝ F p w) • F p‖ := norm_add_le _ _ + _ ≤ ‖fderiv ℝ (fderiv ℝ F) p v w‖ + + (‖fderiv ℝ F p v‖ * ‖fderiv ℝ F p w‖) * ‖F p‖ := by + apply add_le_add + · exact (normalSpace F p).norm_starProjection_apply_le _ + · rw [norm_smul] + exact mul_le_mul_of_nonneg_right (norm_inner_le_norm _ _) (norm_nonneg _) + _ ≤ ‖fderiv ℝ (fderiv ℝ F) p‖ * ‖v‖ * ‖w‖ + + ((‖fderiv ℝ F p‖ * ‖v‖) * (‖fderiv ℝ F p‖ * ‖w‖)) * ‖F p‖ := by + apply add_le_add + · exact ContinuousLinearMap.le_opNorm₂ _ _ _ + · gcongr + · exact (fderiv ℝ F p).le_opNorm v + · exact (fderiv ℝ F p).le_opNorm w + _ = (‖fderiv ℝ (fderiv ℝ F) p‖ + ‖fderiv ℝ F p‖^2 * ‖F p‖) * ‖v‖ * ‖w‖ := by ring + +lemma norm_sphericalSecondFormCLM_of_bounds {F : Plane → Space} {p : Plane} + {C₁ C₂ : ℝ} (h₁ : ‖fderiv ℝ F p‖ ≤ C₁) (h₂ : ‖fderiv ℝ (fderiv ℝ F) p‖ ≤ C₂) + (hp : ‖F p‖ = 1) : ‖sphericalSecondFormCLM F p‖ ≤ C₂+C₁^2 := by + apply (norm_sphericalSecondFormCLM_le F p).trans + rw [hp,mul_one] + gcongr + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSardCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSardCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7725d0061bdc27373ac601b8887b59e32b6eba2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSardCompact.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SliceDerivativeSurjective +import Mathlib.MeasureTheory.Measure.Prod + +namespace OAI + +/-! Fiberwise Sard nullity gives null critical images for split maps, +first on compact sets so measurability follows directly from continuity. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [MeasureSpace F] [BorelSpace F] [SFinite (volume : Measure F)] + +theorem split_sard_compact + (hsard : ∀ (g : E → F) (V : Set E), IsOpen V → ContDiffOn ℝ ∞ g V → + volume (g '' {x | x ∈ V ∧ ¬ Function.Surjective (fderiv ℝ g x)}) = 0) + {f : (ℝ × E) → ℝ × F} {U K : Set (ℝ × E)} + (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) + (hfirst : ∀ z ∈ U, (f z).1 = z.1) + (hK : IsCompact K) (hKU : K ⊆ U) + (hcrit : ∀ z ∈ K, ¬ Function.Surjective (fderiv ℝ f z)) : + volume (f '' K) = 0 := by + have him : IsCompact (f '' K) := hK.image_of_continuousOn (hf.continuousOn.mono hKU) + apply Measure.measure_prod_null_of_ae_null him.measurableSet + filter_upwards [] with a + let g : E → F := fun x => (f (a,x)).2 + let V : Set E := {x | (a,x) ∈ U} + have hV : IsOpen V := hU.preimage (continuous_const.prodMk continuous_id) + have hg : ContDiffOn ℝ ∞ g V := + (hf.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun _ hx => hx)).snd + apply measure_mono_null _ (hsard g V hV hg) + rintro y ⟨z,hz,heq⟩ + have ha : z.1 = a := (hfirst z (hKU hz)).symm.trans (congrArg Prod.fst heq) + have hz' : z = (a,z.2) := by ext <;> simp [ha] + refine ⟨z.2,⟨?_,?_⟩,?_⟩ + · change (a,z.2) ∈ U + rw [← hz'] + exact hKU hz + · apply slice_derivative_not_surjective hU hf hfirst a z.2 + · rw [← hz']; exact hKU hz + · rw [← hz']; exact hcrit z hz + · change (f (a,z.2)).2 = y + rw [← hz'] + exact congrArg Prod.snd heq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb9b7aea7c6becf242ab6bb0e7628c040073345f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedBounds.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSupportedTarget +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds + +namespace OAI + +/-! +Finite-order bounds for the actual partition split. A fixed partition has +bounded derivatives of every fixed order. Consequently the split costs a +constant depending only on that partition and the order, uniformly over all +short scales at most one and linearly in the target seminorm. +-/ + +noncomputable section + +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.PhasePartitions.CompactPhasePartition + +open SmallModes (Base) +open JetPolynomial (SupportedField supportedWeightedSeminorm + weightedBound_of_supportedSeminorm supportedSeminorm_le_of_weightedBound) +open WeightedEstimates + +variable {ι : Type*} [Fintype ι] {K : Compacts Base} {U : ι → Set Base} + +/-- A partition coefficient bundled on its actual compact support. -/ +def supportedWeight (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + SupportedField (F := ℝ) (P.supportCompact i) := + ContDiffMapSupportedIn.of_support_subset (P.smooth i) subset_closure + +@[simp] theorem supportedWeight_apply (P : CompactPhasePartition ι (K : Set Base) U) + (i : ι) (x : Base) : P.supportedWeight i x = P.weight i x := rfl + +/-- Unit-scale derivatives of the fixed partition coefficient. -/ +def weightSize (P : CompactPhasePartition ι (K : Set Base) U) (m : ℕ) (i : ι) : ℝ := + supportedWeightedSeminorm (P.supportCompact i) 1 m (P.supportedWeight i) + +theorem weightSize_nonneg (P : CompactPhasePartition ι (K : Set Base) U) (m : ℕ) (i : ι) : + 0 ≤ P.weightSize m i := apply_nonneg _ _ + +theorem weight_weightedBound (P : CompactPhasePartition ι (K : Set Base) U) + (m : ℕ) (i : ι) (s : ℝ≥0) (hs : (s : ℝ) ≤ 1) : + WeightedBound univ s m (P.weightSize m i) (P.weight i) := by + exact (weightedBound_of_supportedSeminorm (1 : ℝ≥0) m + (P.supportedWeight i)).shrink_scale s.coe_nonneg hs + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The product estimate with the coefficient's explicit derivative size. -/ +theorem splitSupported_bound (P : CompactPhasePartition ι (K : Set Base) U) + (m : ℕ) (i : ι) (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : (s : ℝ) ≤ 1) + (A : SupportedField (F := F) K) : + supportedWeightedSeminorm (P.pieceSupport i) s m (P.splitSupported A i) ≤ + (2 ^ m * P.weightSize m i) * supportedWeightedSeminorm K s m A := by + have hA := weightedBound_of_supportedSeminorm s m A + have hprod := (P.weight_weightedBound m i s hs1).smul_real uniqueDiffOn_univ + s.coe_nonneg (P.weightSize_nonneg m i) (apply_nonneg _ _) + (P.smooth i).contDiffOn A.contDiff.contDiffOn hA + exact supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (mul_nonneg (by positivity) (P.weightSize_nonneg m i)) + (apply_nonneg _ _)) (P.splitSupported A i) hprod + +/-- A single constant works for every member of the finite partition. -/ +def splitConstant (P : CompactPhasePartition ι (K : Set Base) U) (m : ℕ) : ℝ := + 1 + ∑ i, 2 ^ m * P.weightSize m i + +theorem one_le_splitConstant (P : CompactPhasePartition ι (K : Set Base) U) (m : ℕ) : + 1 ≤ P.splitConstant m := by + have hsum : 0 ≤ ∑ i, 2 ^ m * P.weightSize m i := + Finset.sum_nonneg (fun i _ => mul_nonneg (by positivity) (P.weightSize_nonneg m i)) + change 1 ≤ 1 + ∑ i, 2 ^ m * P.weightSize m i + linarith + +theorem coefficient_le_splitConstant (P : CompactPhasePartition ι (K : Set Base) U) + (m : ℕ) (i : ι) : 2 ^ m * P.weightSize m i ≤ P.splitConstant m := by + classical + have hi : 2 ^ m * P.weightSize m i ≤ ∑ j, 2 ^ m * P.weightSize m j := + Finset.single_le_sum (fun j _ => mul_nonneg (by positivity) (P.weightSize_nonneg m j)) + (Finset.mem_univ i) + change 2 ^ m * P.weightSize m i ≤ 1 + ∑ j, 2 ^ m * P.weightSize m j + linarith + +/-- The fixed finite partition costs no negative power of the scale. -/ +theorem splitSupported_uniform_bound (P : CompactPhasePartition ι (K : Set Base) U) + (m : ℕ) (i : ι) (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : (s : ℝ) ≤ 1) + (A : SupportedField (F := F) K) : + supportedWeightedSeminorm (P.pieceSupport i) s m (P.splitSupported A i) ≤ + P.splitConstant m * supportedWeightedSeminorm K s m A := + (P.splitSupported_bound m i s hs hs1 A).trans + (mul_le_mul_of_nonneg_right (P.coefficient_le_splitConstant m i) (apply_nonneg _ _)) + +end ClosedSurfaceR4.PhasePartitions.CompactPhasePartition + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedTarget.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedTarget.lean new file mode 100644 index 0000000000000000000000000000000000000000..e00c449ef245a32ec03c0d2814b6603cfa3521b3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SplitSupportedTarget.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhasePartition +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.Immersion.ClosedSurface.ComplexPullback + +namespace OAI + +/-! +Split an actual smooth compactly supported target using the finite smooth +phase partition. Every piece is a supported smooth field on a compact subset +of its phase domain, and the sum of the pieces is the original target. +-/ + +noncomputable section + +open Set TopologicalSpace +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.PhasePartitions + +open SmallModes (Base) +open JetPolynomial (SupportedField) +open PhaseMean (ComplexTensor) + +namespace CompactPhasePartition + +variable {ι : Type*} [Fintype ι] {K : Compacts Base} {U : ι → Set Base} +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- Each target piece is supported both where the target was supported and +where its partition coefficient is supported. -/ +def pieceSupport (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + Compacts Base := + ⟨(K : Set Base) ∩ tsupport (P.weight i), + K.isCompact.inter_right (isClosed_tsupport _)⟩ + +@[simp] theorem coe_pieceSupport (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + (P.pieceSupport i : Set Base) = (K : Set Base) ∩ tsupport (P.weight i) := rfl + +theorem pieceSupport_subset_original (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + (P.pieceSupport i : Set Base) ⊆ K := fun _ hx => hx.1 + +theorem pieceSupport_subset_domain (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + (P.pieceSupport i : Set Base) ⊆ U i := fun _ hx => P.subordinate i hx.2 + +/-- The piece is constructed by ordinary scalar multiplication of the target. -/ +def splitSupported (P : CompactPhasePartition ι (K : Set Base) U) + (A : SupportedField (F := F) K) (i : ι) : SupportedField (F := F) (P.pieceSupport i) := + ContDiffMapSupportedIn.of_support_subset ((P.smooth i).smul A.contDiff) + (subset_closure.trans (fun _x hx => + ⟨A.tsupport_subset (tsupport_smul_subset_right (P.weight i) A hx), + tsupport_smul_subset_left (P.weight i) A hx⟩)) + +@[simp] theorem splitSupported_apply (P : CompactPhasePartition ι (K : Set Base) U) + (A : SupportedField (F := F) K) (i : ι) (x : Base) : + P.splitSupported A i x = P.weight i x • A x := rfl + +/-- With the partition fixed, splitting is linear in the target. -/ +def splitSupportedLM (P : CompactPhasePartition ι (K : Set Base) U) (i : ι) : + SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := F) (P.pieceSupport i) where + toFun := fun A => P.splitSupported A i + map_add' A B := by + apply DFunLike.ext + intro x + change P.weight i x • (A x + B x) = P.weight i x • A x + P.weight i x • B x + exact smul_add _ _ _ + map_smul' c A := by + apply DFunLike.ext + intro x + change P.weight i x • (c • A x) = c • (P.weight i x • A x) + exact smul_comm _ _ _ + +theorem splitSupported_tsupport_subset (P : CompactPhasePartition ι (K : Set Base) U) + (A : SupportedField (F := F) K) (i : ι) : + tsupport (P.splitSupported A i) ⊆ U i := + (P.splitSupported A i).tsupport_subset.trans (P.pieceSupport_subset_domain i) + +/-- The finite pieces sum to the original target at every point, including +outside the compact set on which the coefficients sum to one. -/ +theorem sum_splitSupported_apply (P : CompactPhasePartition ι (K : Set Base) U) + (A : SupportedField (F := F) K) (x : Base) : + ∑ i, P.splitSupported A i x = A x := by + classical + simp only [splitSupported_apply, ← Finset.sum_smul] + by_cases hx : x ∈ (K : Set Base) + · rw [P.sum_eq_one x hx, one_smul] + · simp only [A.zero_on_compl hx, Pi.zero_apply, smul_zero] + +theorem sum_splitSupported (P : CompactPhasePartition ι (K : Set Base) U) + (A : SupportedField (F := F) K) : + (fun x => ∑ i, P.splitSupported A i x) = A := by + funext x + exact P.sum_splitSupported_apply A x + +end CompactPhasePartition + +/-- Split the actual complex tensor target into one smooth supported target +for each supplied phase domain, without changing their total. -/ +theorem exists_split_supported_complex_target {ι : Type*} [Fintype ι] + (K : Compacts Base) (U : ι → Set Base) (hU : ∀ i, IsOpen (U i)) + (hcover : (K : Set Base) ⊆ ⋃ i, U i) + (A : SupportedField (F := ComplexTensor) K) : + ∃ (L : ι → Compacts Base) (B : (i : ι) → SupportedField (F := ComplexTensor) (L i)), + (∀ i, (L i : Set Base) ⊆ K) ∧ (∀ i, (L i : Set Base) ⊆ U i) ∧ + (∀ x, ∑ i, B i x = A x) := by + obtain ⟨P⟩ := exists_compact_phase_partition K.isCompact U hU hcover + exact ⟨P.pieceSupport, P.splitSupported A, P.pieceSupport_subset_original, + P.pieceSupport_subset_domain, P.sum_splitSupported_apply A⟩ + +end ClosedSurfaceR4.PhasePartitions + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcClosure.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcClosure.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9bc79f7da37660f5cbdaca7f3edf3e89f7fcd02 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcClosure.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcTopology + +namespace OAI + +/-! Each nonempty interval piece has exactly the two expected endpoints +in its closure. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +omit [T2Space X] in +theorem CompactCurveArc.subarc_closure (A : CompactCurveArc X) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) (huv : u < v) : + closure (A.openSubarc u v) = A.closedSubarc u v := by + let S : Set (Icc A.left A.right) := {t | u < (t:ℝ) ∧ (t:ℝ) < v} + have himage : (Subtype.val '' S : Set ℝ) = Ioo u v := by + ext r + constructor + · rintro ⟨t,ht,rfl⟩ + exact ht + · intro hr + exact ⟨⟨r,hu.trans hr.1.le,hr.2.le.trans hv⟩,hr,rfl⟩ + have hclosure : closure S = {t : Icc A.left A.right | u ≤ (t:ℝ) ∧ (t:ℝ) ≤ v} := by + rw [Topology.IsEmbedding.subtypeVal.closure_eq_preimage_closure_image,himage,closure_Ioo huv.ne] + rfl + change closure (A.map '' S) = _ + rw [A.embedding.closure_image_eq,hclosure] + rfl + +theorem CompactCurveArc.subarc_boundary_eq (A : CompactCurveArc X) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) (huv : u < v) : + closure (A.openSubarc u v) \ A.openSubarc u v = + {A.map ⟨u,hu,huv.le.trans hv⟩,A.map ⟨v,hu.trans huv.le,hv⟩} := by + apply Subset.antisymm + · intro x hx + rcases A.subarc_frontier hu hv huv hx.1 hx.2 with h | h + · exact Or.inl h + · exact Or.inr (mem_singleton_iff.mpr h) + · intro x hx + rw [A.subarc_closure hu hv huv] + rcases hx with h | h + · rw [h] + refine ⟨⟨⟨u,hu,huv.le.trans hv⟩,⟨le_rfl,huv.le⟩,rfl⟩,?_⟩ + rintro ⟨t,ht,he⟩ + have heq := congrArg Subtype.val (A.embedding.injective he) + exact (ne_of_gt ht.1) heq + · have h := mem_singleton_iff.mp h + rw [h] + refine ⟨⟨⟨v,hu.trans huv.le,hv⟩,⟨huv.le,le_rfl⟩,rfl⟩,?_⟩ + rintro ⟨t,ht,he⟩ + have heq := congrArg Subtype.val (A.embedding.injective he) + exact (ne_of_lt ht.2) heq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcTopology.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcTopology.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ceb6512cdedc0b1ac249ed1aa81e042768423a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SubarcTopology.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EmbeddedOpenSubset +import Mathlib.Topology.Order.IntermediateValue + +namespace OAI + +/-! Open subarcs are connected, and their only possible frontier points +are their two endpoints. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem CompactCurveArc.subarc_frontier (A : CompactCurveArc X) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) (huv : u < v) + {x : X} (hx : x ∈ closure (A.openSubarc u v)) (hnot : x ∉ A.openSubarc u v) : + x = A.map ⟨u,hu,huv.le.trans hv⟩ ∨ x = A.map ⟨v,hu.trans huv.le,hv⟩ := by + have hsub : A.openSubarc u v ⊆ A.closedSubarc u v := by + rintro z ⟨t,ht,rfl⟩ + exact ⟨t,⟨ht.1.le,ht.2.le⟩,rfl⟩ + have hc := closure_minimal hsub (A.closedSubarc_compact u v).isClosed + obtain ⟨t,ht,rfl⟩ := hc hx + have hnt : ¬ (u < (t:ℝ) ∧ (t:ℝ) < v) := fun h => hnot ⟨t,h,rfl⟩ + rcases eq_or_lt_of_le ht.1 with he | he + · left + congr 1 + exact Subtype.ext he.symm + · right + have heq : (t:ℝ) = v := le_antisymm ht.2 (le_of_not_gt fun h => hnt ⟨he,h⟩) + congr 1 + exact Subtype.ext heq + +omit [T2Space X] in +theorem CompactCurveArc.subarc_connected (A : CompactCurveArc X) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) (huv : u < v) : + IsConnected (A.openSubarc u v) := by + let j : Ioo u v → Icc A.left A.right := fun t => + ⟨t.val,hu.trans t.property.1.le,t.property.2.le.trans hv⟩ + have hj : Continuous j := continuous_subtype_val.subtype_mk _ + let : ConnectedSpace (Ioo u v) := isConnected_iff_connectedSpace.mp (isConnected_Ioo huv) + have hconn : IsConnected (range (A.map ∘ j)) := isConnected_range (A.embedding.continuous.comp hj) + have heq : range (A.map ∘ j) = A.openSubarc u v := by + ext x + constructor + · rintro ⟨t,rfl⟩ + exact ⟨j t,t.property,rfl⟩ + · rintro ⟨t,ht,rfl⟩ + exact ⟨⟨t.val,ht⟩,rfl⟩ + rwa [heq] at hconn + +theorem CompactCurveArc.subarc_clopen_complement (A : CompactCurveArc X) {u v : ℝ} + (hu : A.left ≤ u) (hv : v ≤ A.right) (huv : u < v) + (V : Set X) + (hleft : A.map ⟨u,hu,huv.le.trans hv⟩ ∈ V) + (hright : A.map ⟨v,hu.trans huv.le,hv⟩ ∈ V) : + IsClopen ((↑) ⁻¹' A.openSubarc u v : Set {x : X // x ∉ V}) := by + have heq : ((↑) ⁻¹' A.openSubarc u v : Set {x : X // x ∉ V}) = (↑) ⁻¹' closure (A.openSubarc u v) := by + ext x + constructor + · exact fun hx => subset_closure hx + · intro hx + by_contra hn + rcases A.subarc_frontier hu hv huv hx hn with he | he + · exact x.property (he ▸ hleft) + · exact x.property (he ▸ hright) + refine ⟨?_,(A.openSubarc_open hu hv).preimage continuous_subtype_val⟩ + rw [heq] + exact isClosed_closure.preimage continuous_subtype_val + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportJetEquality.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportJetEquality.lean new file mode 100644 index 0000000000000000000000000000000000000000..edd01acbe0c9db75217534aa3b8d04d3fe71f43e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportJetEquality.lean @@ -0,0 +1,39 @@ +import Mathlib + +namespace OAI + +/-! Equality on the closed support of a smooth cutoff determines every +jet there, including at its boundary. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma iteratedFDeriv_eq_on_tsupport {χ : E → ℝ} (hχ : Continuous χ) + {U : Set E} (hU : IsOpen U) (hK : tsupport χ ⊆ U) + {f g : E → F} (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (he : EqOn f g (tsupport χ)) (m : ℕ) : + EqOn (iteratedFDeriv ℝ m f) (iteratedFDeriv ℝ m g) (tsupport χ) := by + have hfc : ContinuousOn (iteratedFDeriv ℝ m f) U := by + apply (hf.continuousOn_iteratedFDerivWithin (by simp) hU.uniqueDiffOn).congr + intro x hx + exact (iteratedFDerivWithin_of_isOpen m hU hx).symm + have hgc : ContinuousOn (iteratedFDeriv ℝ m g) U := by + apply (hg.continuousOn_iteratedFDerivWithin (by simp) hU.uniqueDiffOn).congr + intro x hx + exact (iteratedFDerivWithin_of_isOpen m hU hx).symm + have ho : EqOn (iteratedFDeriv ℝ m f) (iteratedFDeriv ℝ m g) (Function.support χ) := by + intro x hx + have hh : f =ᶠ[𝓝 x] g := by + filter_upwards [hχ.isOpen_support.mem_nhds hx] with y hy + exact he (subset_tsupport χ hy) + exact (hh.iteratedFDeriv ℝ m).self_of_nhds + exact ho.of_subset_closure (hfc.mono hK) (hgc.mono hK) subset_closure Subset.rfl + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedJetDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedJetDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..c73b3591b6e7e3d2706a47b9cfadd02b4fb9ac14 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedJetDomain.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredJetFrame + +namespace OAI + +/-! The velocity radius stays nonzero on an open neighborhood of the +actual compact jet set, including the zero-amplitude boundary. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry + +def supportedJetDomain (U : Set Base) (n : Base → Vec) (a : Base → ℝ) : Set GeometricJet := + {j | j ∈ preferredJetDomain U n ∧ (jetNormal j ≠ 0 ∨ a j.1 ≠ 0)} + +lemma supportedJetDomain_open {U : Set Base} (hU : IsOpen U) {n : Base → Vec} + (hn : ContDiffOn ℝ ∞ n U) {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) : + IsOpen (supportedJetDomain U n a) := by + have hΩ := preferredJetDomain_open hU hn + rw [isOpen_iff_mem_nhds] + intro j hj + have hjΩ := hj.1 + have hv : ContDiffAt ℝ ∞ jetNormal j := + contDiffAt_realNormalPart (jetSlot_smooth 1).contDiffAt (jetSlot_smooth 4).contDiffAt + (jetSlot_smooth 0).contDiffAt (preferredJetDomain_velocity_gram hjΩ) + have hamp : ContinuousAt (fun j : GeometricJet => a j.1) j := + (ha.continuous.comp continuous_fst).continuousAt + rcases hj.2 with hv0 | ha0 + · filter_upwards [hΩ.mem_nhds hjΩ,hv.continuousAt.eventually_ne hv0] with k hk hvk + exact ⟨hk,Or.inl hvk⟩ + · filter_upwards [hΩ.mem_nhds hjΩ,hamp.eventually_ne ha0] with k hk hak + exact ⟨hk,Or.inr hak⟩ + +lemma actual_jet_mem_supported_domain {F n : Base → Vec} + (hF : ContDiff ℝ ∞ F) {a : Base → ℝ} {U : Set Base} {p : Base} (hp : p ∈ U) + (hI : Function.Injective (fderiv ℝ F p)) + (hN : coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (hboundary : a p = 0 → realSecondForm F dy dy p ≠ 0) : + CollarVelocity.jetSection F p ∈ supportedJetDomain U n a := by + have hj := actual_jet_mem_preferred_domain hF hp hI hN hHess + refine ⟨hj,?_⟩ + by_cases ha : a p = 0 + · left + have hg := preferredJetDomain_velocity_gram hj + have hgeom := preferredJetDomain_geometry hj + have hb := hboundary ha + have hproj := projected_normal_ne_zero hgeom.1 hgeom.2.1.ne hgeom.2.2.1 hgeom.2.2.2.1 + hgeom.2.2.2.2.1 hgeom.2.2.1 hgeom.2.2.2.1 hb + have he := projected_second_form hg hgeom.2.2.2.2.1 + intro hv + apply hproj + rw [he] + change -((jetAccelerationCoefficients (CollarVelocity.jetSection F p)).1) • + jetNormal (CollarVelocity.jetSection F p) = 0 + rw [hv,smul_zero] + · exact Or.inr ha + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedLocalMetricDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedLocalMetricDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..c70458f80d7315104260f160d2000176ecafc30c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedLocalMetricDefect.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPeriodicMetric +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSingleTensorRestoreBound +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPrimitivePolynomial + +namespace OAI + +/-! Exact decomposition of a global primitive's metric defect into the +solved polynomial mean error and the finite periodic remainder. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +local instance supportedLocalDefectFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance supportedLocalDefectFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance supportedLocalDefectDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance supportedLocalDefectDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance supportedLocalDefectSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance supportedLocalDefectSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Any supported local map, including a nonlinear phase ansatz, has the +same exact global defect decomposition. -/ +lemma supported_local_metric_defect (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (f : JetPolynomial.Base → Space) + (hf : ContDiff ℝ ∞ f) (hs : tsupport f ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + {n : ℕ} (P : Fin 3 → Fin n → Expression) (z : ℝ) + (γ : ∀ x : M, CovariantTwoTensor x) (H : SmallModes.Base → PhaseMean.Tensor) : + inducedTensor (F + restore (i : M) (A.outer i) f) - + (γ + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (H (planeCoordinateIsometry y)))) = + (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i P) z F - γ) + + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor + (spaceCoordinates ∘ (A.vectorChartRead i F + f) ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y) - + coordinateMetricMap P z (A.jetChartMap i F) (planeCoordinateIsometry y) - + H (planeCoordinateIsometry y))) := by + have hsp : tsupport (f ∘ planeCoordinateIsometry.symm) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + have hh := hs (tsupport_comp_preimage f planeCoordinateIsometry.symm + planeCoordinateIsometry.symm.continuous hx) + exact ⟨planeCoordinateIsometry.symm x,hh,planeCoordinateIsometry.apply_symm_apply x⟩ + have hm := A.restored_metric_increment i hF (f ∘ planeCoordinateIsometry.symm) + (hf.comp planeCoordinateIsometry.symm.contDiff) hsp + have he : (f ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = f := by + funext x + simp + rw [he] at hm + have hp := A.atlasPolynomialValue_primitive i P z F + have hmetric : inducedTensor (F+restore (i : M) (A.outer i) f) = inducedTensor F + + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor + (spaceCoordinates ∘ (A.vectorChartRead i F + f) ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y) - + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry y))) := by + have heq : spaceCoordinates ∘ (A.vectorPlaneRead i F + f ∘ planeCoordinateIsometry.symm) = + spaceCoordinates ∘ (A.vectorChartRead i F + f) ∘ planeCoordinateIsometry.symm := rfl + rw [heq] at hm + rw [← hm] + abel + rw [hmetric,atlasPolynomialMetric,hp] + funext p + simp only [coordinateMetricMap,Pi.add_apply,Pi.sub_apply,bundleRestore,map_sub,map_add,smul_sub,smul_add] + have heq : A.jetChartMap i F ∘ planeCoordinateIsometry.symm = + spaceCoordinates ∘ A.vectorPlaneRead i F := rfl + rw [heq] + abel + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedNormalSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedNormalSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..8450553324241c0c4a7c80450a91b2df03a89ddb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedNormalSeed.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedMeanDifference +import OAI.Geometry.Immersion.ClosedSurface.RealBounds + +namespace OAI + +/-! Supported normal seeds and the exact leading quadratic metric. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates +open JetPolynomial (SupportedField supportedWeightedSeminorm weightedBound_of_supportedSeminorm + supportedSeminorm_le_of_weightedBound) + +lemma freeSeed_tsupport (δ τ : ℝ) (b : Base → ℝ) (F : RField 4) : + tsupport (freeSeed δ τ b F) ⊆ tsupport b := by + apply closure_mono + intro p hp + by_contra hn + have hb : b p = 0 := by simpa only [Function.mem_support, not_not] using hn + exact hp (by simp only [freeSeed, hb, mul_zero, Complex.ofReal_zero, zero_smul]) + +def supportedFreeSeed (δ τ : ℝ) {F : RField 4} {U : Set Base} + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (b : SupportedField (F := ℝ) K) : + SupportedField (F := Ambient 4) K := + let hs := (freeSeed_tsupport δ τ b F).trans b.tsupport_subset + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset h.isOpen (hs.trans hKU) + (freeSeed_isFree hF h δ τ b.contDiff.contDiffOn).smooth) + (subset_closure.trans hs) + +lemma supportedFreeSeed_isFree (δ τ : ℝ) {F : RField 4} {U : Set Base} + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (b : SupportedField (F := ℝ) K) : + FreeCoefficient (fun p => complexify (F p)) U (supportedFreeSeed δ τ hF h K hKU b) := + freeSeed_isFree hF h δ τ b.contDiff.contDiffOn + +lemma supportedFreeSeed_bound {δ τ : ℝ} {F : RField 4} {U : Set Base} + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (b : SupportedField (F := ℝ) K) + {s : ℝ≥0} {B D : ℝ} (hδ : 0 ≤ δ) (hτ : 0 ≤ τ) (hs : 0 < (s : ℝ)) + (hB : 0 ≤ B) (hD : 0 ≤ D) (m : ℕ) + (hb : supportedWeightedSeminorm K s m b ≤ B) + (hN : WeightedBound U s m D (freeNormal F)) : + supportedWeightedSeminorm K s m (supportedFreeSeed δ τ hF h K hKU b) ≤ + (Real.sqrt 2 * 2 ^ m * B * D) * (δ * τ) := by + have hh := weighted_freeSeed hF h hδ hτ hs hB hD b.contDiff.contDiffOn + (((weightedBound_of_supportedSeminorm s m b).mono_const hb).restrict_open h.isOpen) hN + have hn : 0 ≤ (Real.sqrt 2 * 2 ^ m * B * D) * (δ * τ) := by positivity + have hl : WeightedBound U s m ((Real.sqrt 2 * 2 ^ m * B * D) * (δ * τ)) + (supportedFreeSeed δ τ hF h K hKU b) := hh + exact supportedSeminorm_le_of_weightedBound hs hn _ + (hl.extend_support h.isOpen ((supportedFreeSeed δ τ hF h K hKU b).tsupport_subset.trans hKU) hn) + +lemma corrected_seed_mean (δ : ℝ) {τ : ℝ} (hτ : τ ≠ 0) {F : RField 4} {U : Set Base} + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (b : SupportedField (F := ℝ) K) + (T : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Ambient 4) K) + (v w p : Base) (hp : p ∈ U) : + let V := supportedFreeSeed δ τ hF h K hKU b + QuadraticMean.zeroPair (gradientAmplitude τ (T V) v p) (gradientAmplitude τ (T V) w p) = + δ ^ 2 * b p ^ 2 * v.1 * w.1 + seedMeanError τ T V V v w p := by + dsimp only + have hh := freeSeed_zeroPair h hτ δ b v w hp + change QuadraticMean.zeroPair (leadingDerivative τ (supportedFreeSeed δ τ hF h K hKU b) v p) + (leadingDerivative τ (supportedFreeSeed δ τ hF h K hKU b) w p) = _ at hh + rw [seedMeanError, hh] + ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedOperatorTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedOperatorTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..7705bb4e19d0f41039cdc9ecd09a9a5102356f4d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedOperatorTransport.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedCoordinateChange + +namespace OAI + +/-! Transport of differential operators through a fixed isometric coordinate +change, including their finite derivative-loss estimates. -/ +noncomputable section +open TopologicalSpace +open scoped NNReal + +namespace ClosedSurfaceR4.JetPolynomial + +variable {A B F G : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup B] [NormedSpace ℝ B] [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + +def transportSupportedLM (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) + (L : SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := G) K) : + SupportedField (F := F) (K.map e e.continuous) →ₗ[ℝ] + SupportedField (F := G) (K.map e e.continuous) := + (supportedCoordinateEquiv e K).toLinearMap.comp + (L.comp (supportedCoordinateEquiv e K).symm.toLinearMap) + +lemma transportSupportedLM_bound (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) + (L : SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := G) K) + {s : ℝ≥0} (hs : 0 < (s : ℝ)) (m r : ℕ) (C : ℝ) + (hL : ∀ f, supportedWeightedSeminorm K s m (L f) ≤ C * supportedWeightedSeminorm K s r f) + (f : SupportedField (F := F) (K.map e e.continuous)) : + supportedWeightedSeminorm (K.map e e.continuous) s m (transportSupportedLM e K L f) ≤ + C * supportedWeightedSeminorm (K.map e e.continuous) s r f := by + change supportedWeightedSeminorm (K.map e e.continuous) s m + (supportedCoordinateEquiv e K (L ((supportedCoordinateEquiv e K).symm f))) ≤ _ + rw [supportedCoordinateEquiv_norm e K hs] + calc + _ ≤ C * supportedWeightedSeminorm K s r ((supportedCoordinateEquiv e K).symm f) := hL _ + _ = _ := by + have he := supportedCoordinateEquiv_norm e K hs r ((supportedCoordinateEquiv e K).symm f) + rw [LinearEquiv.apply_symm_apply] at he + rw [he] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedPatchGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedPatchGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8a6812868b2732061baa2f67c8f1ea4c4007e23 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedPatchGeometry.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.UniformMetricPhaseGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! The local primitive normal bound and exterior C2 proximity together +preserve immersion and a nonzero second form on the entire surface. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +namespace FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation JetVelocityCoordinates SurfaceJetCoordinates SurfaceVelocityFamily.Loop +variable [CompactSpace M] +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem supported_patch_geometry (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (i : data.A.centers) : + ∃ ρ : ℝ, 0 < ρ ∧ + ∀ (G V : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ∀ b : ℝ, 0 ≤ b → b < ρ → + data.A.WeightedBound 1 2 b (G-F) → + (∀ p ∈ tsupport (data.A.weight i), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p)) ≠ 0) → + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) → + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) := by + obtain ⟨ρ,hρ,hnear⟩ := data.uniform_C2_geometry hF + refine ⟨ρ,hρ,?_⟩ + intro G V hG hV b hb hbρ hclose hnormal hexterior + obtain ⟨hImm,hgood,_⟩ := hnear G hG b hb hbρ hclose + apply data.A.geometry_of_chartwise_good hV data.outer_locally_one + intro p + by_cases hp : p ∈ tsupport (data.A.weight i) + · obtain ⟨hD,hN⟩ := hnormal p hp + obtain ⟨ξ,Q,_,_,hgood,_⟩ := PhaseGeometry.positive_good_phase_data hN + (H₀ := ![(1:ℝ),0,1]) (by simp) (by simp) + exact ⟨i,hp,hD,ξ 0,hgood 0⟩ + · obtain ⟨j,hj⟩ : ∃ j : data.A.centers, data.A.weight j p ≠ 0 := by + by_contra! hzero + have hh := data.A.partition p + simp only [hzero,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hh + norm_num at hh + have hjp : p ∈ tsupport (data.A.weight j) := subset_tsupport _ hj + have hx : planeCoordinateIsometry (chart (j : M) p) ∈ + (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) := + ⟨chart (j : M) p,⟨p,hjp,rfl⟩,rfl⟩ + have he := data.A.planeRead_eventuallyEq_on_weight (hexterior p hp) j hjp + (data.outer_locally_one j) + refine ⟨j,hjp,?_,(data.Q j).ξ 0,?_⟩ + · rw [he.fderiv_eq] + exact hImm j _ hx + · rw [(realSecondTensor_eventuallyEq he).eq_of_nhds] + exact hgood j 0 _ hx + +end MetricGoodPhaseData +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedQuadraticFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedQuadraticFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba470525069b53746c80a26a85566b21ba6f2c19 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedQuadraticFamily.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Geometry.CombinedQuadraticExpansion + +namespace OAI + +/-! Actual supported targets for the doubled and mixed quadratic phases. +Mixed labels retain the intersection of the original amplitude supports. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean + +def quadraticCompacts {ι : Type*} (K : ι → Compacts Base) : + RealModes.QuadraticLabel ι → Compacts Base + | .inl i => K i + | .inr ⟨i,j,_⟩ => K i ⊓ K j + +lemma quadraticCompacts_coe {ι : Type*} (K : ι → Compacts Base) + (l : RealModes.QuadraticLabel ι) : + (quadraticCompacts K l : Set Base) = quadraticFamilySupport (fun i => (K i : Set Base)) l := by + rcases l with i | ⟨i,j,b⟩ <;> rfl + +lemma modeSupport_quadraticCompacts {ι : Type*} (K : ι → Compacts Base) + (l : RealModes.QuadraticLabel ι) : + (modeSupport (quadraticCompacts K l) : Set SmallModes.Base) = + RealModes.quadraticSupport (fun i => (modeSupport (K i) : Set SmallModes.Base)) l := by + rcases l with i | ⟨i,j,b⟩ + · rfl + · exact Set.image_inter planeCoordinateIsometry.injective + +lemma coordinateAmplitude_tsupport {K : Compacts Base} + (H : SupportedField (F := Fin 4 → ℂ) K) : + tsupport (coordinateAmplitude H) ⊆ (modeSupport K : Set SmallModes.Base) := + (pushSupported planeCoordinateIsometry K H).tsupport_subset + +def metricQuadraticTarget {ι : Type*} {K : ι → Compacts Base} + (φ : ι → Base → ℝ) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) (τ : ℝ) + (l : RealModes.QuadraticLabel ι) : + SupportedField (F := ComplexTensor) (modeSupport (quadraticCompacts K l)) := by + have ht := RealModes.quadraticAmplitude_tsupport τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) (fun i => coordinateAmplitude_tsupport (H i)) l + rw [← modeSupport_quadraticCompacts] at ht + exact ContDiffMapSupportedIn.of_support_subset + (RealModes.quadraticAmplitude_smooth + (fun i => (hφ i).comp planeCoordinateIsometry.symm.contDiff) + (fun i => (H i).contDiff.comp planeCoordinateIsometry.symm.contDiff) τ l) + (subset_closure.trans ht) + +lemma metricQuadraticTarget_apply {ι : Type*} {K : ι → Compacts Base} + (φ : ι → Base → ℝ) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) (τ : ℝ) + (l : RealModes.QuadraticLabel ι) (x : SmallModes.Base) : + metricQuadraticTarget φ hφ H τ l x = + RealModes.quadraticAmplitude τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) l x := rfl + +def combinedQuadraticTarget {n : ℕ} {ι : Type*} {K : ι → Compacts Base} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) + (hQ : Set.MapsTo (lowJet G) U O) (l : RealModes.QuadraticLabel ι) + (hKU : (quadraticCompacts K l : Set Base) ⊆ U) (ε τ t : ℝ) : + SupportedField (F := ComplexTensor) (modeSupport (quadraticCompacts K l)) := + metricQuadraticTarget φ hφ H τ l + pushSupported planeCoordinateIsometry (quadraticCompacts K l) + (polynomialQuadraticTarget hU hO hP hG hφ (fun i => (H i).contDiff) hQ + (fun i => (K i).isCompact.isClosed) (fun i => (H i).tsupport_subset) + l (quadraticCompacts K l) hKU (quadraticCompacts_coe K l).symm.subset ε τ t) + +lemma combinedQuadraticTarget_apply {n : ℕ} {ι : Type*} {K : ι → Compacts Base} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) + (hQ : Set.MapsTo (lowJet G) U O) (l : RealModes.QuadraticLabel ι) + (hKU : (quadraticCompacts K l : Set Base) ⊆ U) (ε τ t : ℝ) (x : SmallModes.Base) : + combinedQuadraticTarget hU hO P hP hG φ hφ H hQ l hKU ε τ t x = + combinedQuadraticCoefficient P ε G φ (fun i => H i) τ t l x := rfl + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRegularChange.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRegularChange.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d198375fcce2e91d0e75134007c7a48dbb1f6e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRegularChange.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! A sufficiently small supported C1 change in a compact regular set +preserves the exact singular set of the original map. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem supported_regular_change {f : Base → V} + (hf : ContDiff ℝ ∞ f) {K : Set Base} (hK : IsCompact K) + (hI : ∀ x ∈ K, Function.Injective (fderiv ℝ f x)) : + ∃ ε : ℝ, 0 < ε ∧ ∀ q : Base → V, ContDiff ℝ ∞ q → + tsupport q ⊆ K → (∀ x, ‖fderiv ℝ q x‖ < ε) → + ∀ x, Function.Injective (fderiv ℝ (f+q) x) ↔ Function.Injective (fderiv ℝ f x) := by + have hD : Continuous (fderiv ℝ f) := hf.continuous_fderiv (by simp) + obtain ⟨ε,hε,hstable⟩ := compact_injective_stability (hK.image hD) + (by rintro L ⟨x,hx,rfl⟩; exact hI x hx) + refine ⟨ε,hε,?_⟩ + intro q hq hs hb x + by_cases hx : x ∈ K + · have hnew : Function.Injective (fderiv ℝ (f+q) x) := by + apply hstable (fderiv ℝ f x) ⟨x,hx,rfl⟩ + rw [fderiv_add (hf.differentiable (by simp) x) (hq.differentiable (by simp) x), + add_sub_cancel_left] + exact hb x + exact ⟨fun _ => hI x hx,fun _ => hnew⟩ + · have hn : x ∉ tsupport q := fun hxq => hx (hs hxq) + have he : f+q =ᶠ[𝓝 x] f := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + simp [hy] + rw [he.fderiv_eq] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRootAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRootAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf33fc2b96baa8117e29e2d59bc90d4a2dac62ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedRootAmplitude.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedPerturbedDifference +import OAI.Geometry.Immersion.ClosedSurface.RootMean + +namespace OAI + +/-! The actual cutoff square-root amplitudes as supported smooth fields. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates RootMean +open JetPolynomial (SupportedField supportedWeightedSeminorm weightedBound_of_supportedSeminorm + supportedSeminorm_le_of_weightedBound) + +lemma phaseAmplitude_tsupport (ψ u : Base → ℝ) : + tsupport (phaseAmplitude ψ u) ⊆ tsupport ψ := by + apply closure_mono + intro p hp + by_contra hn + have hψ : ψ p = 0 := by simpa only [Function.mem_support, not_not] using hn + exact hp (by simp only [phaseAmplitude, hψ, zero_mul]) + +def supportedRootAmplitude {U : Set Base} (hU : IsOpen U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (ψ : SupportedField (F := ℝ) K) + (u : Base → ℝ) (hu : ContDiffOn ℝ ∞ u U) (hpos : ∀ p ∈ U, 0 < u p) : + SupportedField (F := ℝ) K := + let hs := (phaseAmplitude_tsupport ψ u).trans ψ.tsupport_subset + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset hU (hs.trans hKU) + (contDiffOn_phaseAmplitude ψ.contDiff.contDiffOn hu hpos)) + (subset_closure.trans hs) + +theorem supportedRootAmplitude_bounds {U : Set Base} (hU : IsOpen U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {r R C P : ℝ} + (hr : 0 < r) (hC : 1 ≤ C) (hP : 0 ≤ P) (m : ℕ) : + ∃ A : ℝ, 1 ≤ A ∧ ∀ (s : ℝ≥0) (ψ : SupportedField (F := ℝ) K) + (u v : Base → ℝ) (hu : ContDiffOn ℝ ∞ u U) (hv : ContDiffOn ℝ ∞ v U) + (hru : Set.MapsTo u U (Set.Icc r R)) (hrv : Set.MapsTo v U (Set.Icc r R)) (D : ℝ), + 0 < (s : ℝ) → 0 ≤ D → supportedWeightedSeminorm K s m ψ ≤ P → + WeightedBound U s m C u → WeightedBound U s m C v → + WeightedBound U s m D (fun p => u p - v p) → + let bu := supportedRootAmplitude hU K hKU ψ u hu (fun _ hp => hr.trans_le (hru hp).1) + let bv := supportedRootAmplitude hU K hKU ψ v hv (fun _ hp => hr.trans_le (hrv hp).1) + supportedWeightedSeminorm K s m bu ≤ A ∧ supportedWeightedSeminorm K s m bv ≤ A ∧ + supportedWeightedSeminorm K s m (bu - bv) ≤ A * D := by + obtain ⟨A, hA, ha⟩ := compact_amplitude_bounds (R := R) hU.uniqueDiffOn hr hC hP m + refine ⟨A, hA, ?_⟩ + intro s ψ u v hu hv hru hrv D hs hD hψ hbu hbv hd + have hψ' := ((weightedBound_of_supportedSeminorm s m ψ).mono_const hψ).restrict_open hU + obtain ⟨haU, haV, haD⟩ := ha s D ψ u v hs hD ψ.contDiff.contDiffOn hu hv hru hrv hψ' hbu hbv hd + let bu := supportedRootAmplitude hU K hKU ψ u hu (fun _ hp => hr.trans_le (hru hp).1) + let bv := supportedRootAmplitude hU K hKU ψ v hv (fun _ hp => hr.trans_le (hrv hp).1) + have hA0 : 0 ≤ A := zero_le_one.trans hA + refine ⟨?_, ?_, ?_⟩ + · exact supportedSeminorm_le_of_weightedBound hs hA0 bu + (haU.extend_support hU (bu.tsupport_subset.trans hKU) hA0) + · exact supportedSeminorm_le_of_weightedBound hs hA0 bv + (haV.extend_support hU (bv.tsupport_subset.trans hKU) hA0) + · have hd' : WeightedBound U s m (A * D) (bu - bv) := haD + exact supportedSeminorm_le_of_weightedBound hs (mul_nonneg hA0 hD) (bu - bv) + (hd'.extend_support hU ((bu - bv).tsupport_subset.trans hKU) (mul_nonneg hA0 hD)) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedScalarQuotient.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedScalarQuotient.lean new file mode 100644 index 0000000000000000000000000000000000000000..4be23b44bbc378f1dca337a5693a54678e54681c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedScalarQuotient.lean @@ -0,0 +1,51 @@ +import Mathlib + +namespace OAI + +/-! A smooth supported quotient only requires a nonzero denominator on its support. -/ +noncomputable section +open Filter Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.TransverseSmallFunction + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma supported_quotient_smooth {χ d : E → ℝ} + (hχ : ContDiff ℝ ∞ χ) (hd : ContDiff ℝ ∞ d) + (hne : ∀ x ∈ tsupport χ, d x ≠ 0) : + ContDiff ℝ ∞ (fun x => χ x / d x) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport χ + · exact hχ.contDiffAt.div hd.contDiffAt (hne x hx) + · have hz : χ =ᶠ[𝓝 x] (fun _ => 0) := notMem_tsupport_iff_eventuallyEq.mp hx + have he : (fun y => χ y / d y) =ᶠ[𝓝 x] (fun _ => 0) := by + filter_upwards [hz] with y hy + rw [hy, zero_div] + exact contDiffAt_const.congr_of_eventuallyEq he + +omit [NormedSpace ℝ E] in +lemma supported_quotient_support (χ d : E → ℝ) : + tsupport (fun x => χ x / d x) ⊆ tsupport χ := by + simpa only [div_eq_mul_inv] using + (tsupport_mul_subset_left (f := χ) (g := fun x => (d x)⁻¹)) + +omit [NormedSpace ℝ E] in +lemma supported_quotient_compact {χ d : E → ℝ} (hχ : HasCompactSupport χ) : + HasCompactSupport (fun x => χ x / d x) := by + exact hχ.of_isClosed_subset (isClosed_tsupport _) (supported_quotient_support χ d) + +omit [NormedSpace ℝ E] in +lemma supported_quotient_cancel {χ d : E → ℝ} + (hne : ∀ x ∈ tsupport χ, d x ≠ 0) (x : E) : (χ x / d x) * d x = χ x := by + by_cases hd : d x = 0 + · have hx : x ∉ tsupport χ := fun h => hne x h hd + rw [image_eq_zero_of_notMem_tsupport hx, zero_div, zero_mul] + · exact div_mul_cancel₀ _ hd + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTrialAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTrialAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..7cbeba08674f9bb7589b7a73df1118f2f5656e5e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTrialAmplitude.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanTensor +import OAI.Geometry.Immersion.ClosedSurface.LocalMean + +namespace OAI + +/-! Actual supported phase amplitudes for arbitrary trial tensor fields. +On the admissible trial ball they equal the cutoff square root, and their +finite-loss bounds follow from the fixed positive coefficient margins. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean +open JetPolynomial (SupportedField supportedWeightedSeminorm supportedSeminorm_le_of_weightedBound) + +variable {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (JetPolynomial.Perturbation.modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +def supportedTrialAmplitude (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (JetPolynomial.Perturbation.modeSupport K : Set Base) ⊆ V) + (A : Base → Tensor) : SupportedField (F := ℝ) (JetPolynomial.Perturbation.modeSupport K) := + by + classical + exact if ha : ContDiffOn ℝ ∞ A U ∧ InTrialBall U reference r A then + supportedRootAmplitude h.domain.isOpen _ hKV ψ (coefficient Q e A) + (contDiffOn_coefficient h.smoothQ h.smoothInv h.invInto ha.1) + (fun _ hp => hρ.trans_le (coefficient_trial_range h.invInto h.margin ha.2 hp).1) + else 0 + +lemma supportedTrialAmplitude_apply (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (JetPolynomial.Perturbation.modeSupport K : Set Base) ⊆ V) + {A : Base → Tensor} (hA : ContDiffOn ℝ ∞ A U) (hball : InTrialBall U reference r A) (x : Base) : + supportedTrialAmplitude h hρ hKV A x = phaseAmplitude ψ (coefficient Q e A) x := by + classical + simp only [supportedTrialAmplitude, dite_eq_left (show ContDiffOn ℝ ∞ A U ∧ + InTrialBall U reference r A from ⟨hA, hball⟩)] + rfl + +lemma supportedTrialAmplitude_function (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (JetPolynomial.Perturbation.modeSupport K : Set Base) ⊆ V) + {A : Base → Tensor} (hA : ContDiffOn ℝ ∞ A U) (hball : InTrialBall U reference r A) : + (supportedTrialAmplitude h hρ hKV A : Base → ℝ) = phaseAmplitude ψ (coefficient Q e A) := by + funext x + exact supportedTrialAmplitude_apply h hρ hKV hA hball x + +theorem supportedTrialAmplitude_bounds (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (d : Budgets U V s F ψ Q χ e) (hs : 0 < s) (hs1 : s ≤ 1) (hρ : 0 < ρ) + (hKV : (JetPolynomial.Perturbation.modeSupport K : Set Base) ⊆ V) (n : ℕ) (C : ℝ) : + ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ (A B : Base → Tensor) (D : ℝ), 0 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ A U → ContDiffOn ℝ ∞ B U → + InTrialBall U reference r A → InTrialBall U reference r B → + WeightedBound U s n C A → WeightedBound U s n C B → WeightedBound U s n D (A - B) → + supportedWeightedSeminorm (JetPolynomial.Perturbation.modeSupport K) ⟨s, hs.le⟩ n + (supportedTrialAmplitude h hρ hKV A) ≤ A₀ ∧ + supportedWeightedSeminorm (JetPolynomial.Perturbation.modeSupport K) ⟨s, hs.le⟩ n + (supportedTrialAmplitude h hρ hKV B) ≤ A₀ ∧ + supportedWeightedSeminorm (JetPolynomial.Perturbation.modeSupport K) ⟨s, hs.le⟩ n + (supportedTrialAmplitude h hρ hKV A - supportedTrialAmplitude h hρ hKV B) ≤ + A₀ * inputFactor d n * D := by + obtain ⟨A₀, hA₀, ha⟩ := h.amplitude_bounds d hs hs1 hρ n C + refine ⟨A₀, hA₀, ?_⟩ + intro A B D hC hD hA hB hballA hballB hbA hbB hbD + obtain ⟨hu, hv, hd⟩ := ha A B D hC hD hA hB hballA hballB hbA hbB hbD + let a := supportedTrialAmplitude h hρ hKV A + let b := supportedTrialAmplitude h hρ hKV B + have heA := supportedTrialAmplitude_function h hρ hKV hA hballA + have heB := supportedTrialAmplitude_function h hρ hKV hB hballB + have hA0 : 0 ≤ A₀ := zero_le_one.trans hA₀ + have hD0 : 0 ≤ A₀ * inputFactor d n * D := mul_nonneg (mul_nonneg hA0 (inputFactor_nonneg d n)) hD + have hau : WeightedBound V s n A₀ a := by simpa only [a, heA] using hu + have hav : WeightedBound V s n A₀ b := by simpa only [b, heB] using hv + have had : WeightedBound V s n (A₀ * inputFactor d n * D) (a - b) := by + change WeightedBound V s n (A₀ * inputFactor d n * D) (fun p => a p - b p) + simpa only [a, b, heA, heB] using hd + exact ⟨supportedSeminorm_le_of_weightedBound (s := ⟨s, hs.le⟩) hs hA0 a + (hau.extend_support h.domain.isOpen (a.tsupport_subset.trans hKV) hA0), + supportedSeminorm_le_of_weightedBound (s := ⟨s, hs.le⟩) hs hA0 b + (hav.extend_support h.domain.isOpen (b.tsupport_subset.trans hKV) hA0), + supportedSeminorm_le_of_weightedBound (s := ⟨s, hs.le⟩) hs hD0 (a - b) + (had.extend_support h.domain.isOpen ((a - b).tsupport_subset.trans hKV) hD0)⟩ + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTupleOperators.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTupleOperators.lean new file mode 100644 index 0000000000000000000000000000000000000000..73d5ad43f4dc2f665b3b34206e588b018779c82d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SupportedTupleOperators.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm + +namespace OAI + +/-! Finite tuples of supported linear operators, with actual weighted +seminorm bounds. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +variable {A F E ι : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup F] [NormedSpace ℝ F] [AddCommGroup E] [Module ℝ E] + [Fintype ι] + +lemma supportedWeightedSeminorm_mono {K : Compacts A} (s : ℝ≥0) {m r : ℕ} (hmr : m ≤ r) + (f : SupportedField (F := F) K) : + supportedWeightedSeminorm K s m f ≤ supportedWeightedSeminorm K s r f := by + apply Seminorm.finset_sup_apply_le (apply_nonneg _ _) + intro j hj + have hjm : j ≤ m := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + exact supportedWeightedSeminorm_component s r j (hjm.trans hmr) f + +def tupleSupportedLM (K : Compacts A) (L : ι → E →ₗ[ℝ] SupportedField (F := F) K) : + E →ₗ[ℝ] SupportedField (F := ι → F) K where + toFun z := ⟨fun p i => L i z p, + contDiff_pi.mpr (fun i => (L i z).contDiff), fun p hp => by + funext i + exact (L i z).zero_on_compl hp⟩ + map_add' z w := by + apply DFunLike.ext + intro p + funext i + exact congrArg (fun f : SupportedField (F := F) K => f p) ((L i).map_add z w) + map_smul' c z := by + apply DFunLike.ext + intro p + funext i + exact congrArg (fun f : SupportedField (F := F) K => f p) ((L i).map_smul c z) + +lemma tupleSupportedLM_apply (K : Compacts A) (L : ι → E →ₗ[ℝ] SupportedField (F := F) K) + (z : E) (p : A) (i : ι) : tupleSupportedLM K L z p i = L i z p := rfl + +lemma tupleSupportedLM_bound (K : Compacts A) (L : ι → E →ₗ[ℝ] SupportedField (F := F) K) + {s : ℝ≥0} (hs : 0 < (s : ℝ)) (m : ℕ) (z : E) : + supportedWeightedSeminorm K s m (tupleSupportedLM K L z) ≤ + ∑ i, supportedWeightedSeminorm K s m (L i z) := by + have hn : 0 ≤ ∑ i, supportedWeightedSeminorm K s m (L i z) := + Finset.sum_nonneg fun i _ => apply_nonneg _ _ + apply supportedSeminorm_le_of_weightedBound hs hn + apply WeightedBound.pi uniqueDiffOn_univ hs hn + · intro i + exact (L i z).contDiff.contDiffOn + · intro i + exact (weightedBound_of_supportedSeminorm s m (L i z)).mono_const + (Finset.single_le_sum (f := fun j => supportedWeightedSeminorm K s m (L j z)) + (fun j _ => apply_nonneg _ _) (Finset.mem_univ i)) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendExterior.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendExterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..891f0de47e230946d159152704b0e63f73ada9ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendExterior.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceBlendGerms + +namespace OAI + +/-! The scalar cutoff gives exact smooth chart germs outside the transition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} + +lemma surfaceTimeBlend_left_germ (c d : SurfaceTimeChart F) + (hF : Continuous F) {l r : ℝ} (hlr : l < r) {x : M} (hx : F x < l) : + surfaceTimeBlend c d (timeCutoff l r) =ᶠ[𝓝 x] c.coord := by + filter_upwards [hF.continuousAt.eventually (isOpen_Iio.mem_nhds hx)] with y hy + exact surfaceTimeBlend_zero c d (timeCutoff_zero hlr hy.le) + +lemma surfaceTimeBlend_right_germ (c d : SurfaceTimeChart F) + (hF : Continuous F) {l r : ℝ} (hlr : l < r) {x : M} (hx : r < F x) : + surfaceTimeBlend c d (timeCutoff l r) =ᶠ[𝓝 x] d.coord := by + filter_upwards [hF.continuousAt.eventually (isOpen_Ioi.mem_nhds hx)] with y hy + exact surfaceTimeBlend_one c d (timeCutoff_one hlr hy.le) + +lemma SurfaceTimeChart.regular (c : SurfaceTimeChart F) {x : M} + (hx : x ∈ c.coord.source) : + Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) c.coord x) := by + have hD : c.coord.MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨c.smooth.mdifferentiableOn (by simp),c.inverse_smooth.mdifferentiableOn (by simp)⟩ + exact hD.mfderiv_bijective hx + +lemma straddling_compact_interval {a b c : ℝ} (hab : a < b) (hbc : b < c) + {V : Set ℝ} (hV : V ∈ 𝓝 b) : + ∃ l r, a < l ∧ l < b ∧ b < r ∧ r < c ∧ Icc l r ⊆ V := by + obtain ⟨s,t,hbst,hst⟩ := mem_nhds_iff_exists_Ioo_subset.mp + (inter_mem hV (Ioo_mem_nhds hab hbc)) + have hs : a < b := hab + have hsa : a < t := (hst ⟨hbst.1,hbst.2⟩).2.1.trans hbst.2 + let l := (max a s + b)/2 + let r := (b + min c t)/2 + have hmax : max a s < b := max_lt hab hbst.1 + have hmin : b < min c t := lt_min hbc hbst.2 + refine ⟨l,r,?_,?_,?_,?_,?_⟩ + · dsimp [l]; have := le_max_left a s; linarith + · dsimp [l]; linarith + · dsimp [r]; linarith + · dsimp [r]; have := min_le_left c t; linarith + · intro x hx + apply (hst ?_).1 + constructor + · have := le_max_right a s; dsimp [l] at hx; linarith [hx.1] + · have := min_le_right c t; dsimp [r] at hx; linarith [hx.2] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..7897b964644e522e94190b1fb15c7f47969f4101 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBlendGerms.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceTimeBlend +import Mathlib.Analysis.SpecialFunctions.SmoothTransition + +namespace OAI + +/-! Exterior germs of the actual chart blend and an explicit time cutoff. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} + +lemma surfaceTimeBlend_zero (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} {x : M} + (hx : χ (F x) = 0) : surfaceTimeBlend c d χ x = c.coord x := by + simp [surfaceTimeBlend,hx] + +lemma surfaceTimeBlend_one (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} {x : M} + (hx : χ (F x) = 1) : surfaceTimeBlend c d χ x = d.coord x := by + simp [surfaceTimeBlend,hx] + +lemma surfaceTimeBlend_axis (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} {x : M} {t : ℝ} + (hc : c.coord x = ![0,t]) (hd : d.coord x = ![0,t]) : + surfaceTimeBlend c d χ x = ![0,t] := by + simp only [surfaceTimeBlend,hc,hd] + rw [← add_smul] + simp + +lemma surfaceTimeBlend_time (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} {x : M} + (hc : x ∈ c.coord.source) (hd : x ∈ d.coord.source) : + surfaceTimeBlend c d χ x 1 = F x := by + change (1-χ (F x)) * c.coord x 1 + χ (F x) * d.coord x 1 = F x + rw [c.time x hc,d.time x hd] + ring + +def timeCutoff (l r : ℝ) (t : ℝ) : ℝ := Real.smoothTransition ((t-l)/(r-l)) + +lemma timeCutoff_smooth (l r : ℝ) : ContDiff ℝ ∞ (timeCutoff l r) := + Real.smoothTransition.contDiff.comp ((contDiff_id.sub contDiff_const).div_const _) + +lemma timeCutoff_mem (l r t : ℝ) : timeCutoff l r t ∈ Icc (0:ℝ) 1 := + ⟨Real.smoothTransition.nonneg _,Real.smoothTransition.le_one _⟩ + +lemma timeCutoff_zero {l r t : ℝ} (hlr : l < r) (ht : t ≤ l) : + timeCutoff l r t = 0 := by + apply Real.smoothTransition.zero_of_nonpos + exact div_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr ht) (sub_pos.mpr hlr).le + +lemma timeCutoff_one {l r t : ℝ} (hlr : l < r) (ht : r ≤ t) : + timeCutoff l r t = 1 := by + apply Real.smoothTransition.one_of_one_le + apply (le_div_iff₀ (sub_pos.mpr hlr)).mpr + linarith + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBoundaryMatching.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBoundaryMatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..c263d1c81692c7ae487da6894462e8e65cd51f89 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceBoundaryMatching.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceCurveExterior +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryNormalMatching +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity + +namespace OAI + +/-! Strict original boundary geometry gives both positive pairings needed +to glue the exact canonical normal to the exterior projected normal. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes GeometryPreservation VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_surface_boundary_matching + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {C : Set M} (hC : IsCompact C) + (hCs : C ⊆ ((chart (i : M)).trans e).source) + (hw : ∀ p ∈ C, A.weight i p ≠ 0) + (v : SmallModes.Base → SmallModes.Base) (hv : Continuous v) + (hB : ∀ p ∈ C, realSecondForm (A.phaseRealChartMap i e.symm F) dy dy + (baseEquiv (e (chart (i : M) p))) ≠ 0) + (havoid : ∀ p ∈ C, spaceCoordinates (n.vector p) ≠ + -normalize (realSecondForm (A.phaseRealChartMap i e.symm F) dy dy + (baseEquiv (e (chart (i : M) p))))) + (hpositive : ∀ p ∈ C, + let q := baseEquiv (e (chart (i : M) p)) + 0 < realSecondForm (A.phaseRealChartMap i e.symm F) (v q) (v q) q ⬝ᵥ + spaceCoordinates (n.vector p)) + (hcross : ∀ p ∈ C, + let q := baseEquiv (e (chart (i : M) p)) + let H := A.phaseRealChartMap i e.symm F + 0 < orderedCrossing H dy (v q) q + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) q)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ p ∈ C ∩ closure O, ∀ z : ℝ, + let q := baseEquiv (e (chart (i : M) p)) + let H := A.phaseRealChartMap i e.symm W + 0 < realSecondForm H (v q) (v q) q ⬝ᵥ spaceCoordinates (A.unitProjectedNormalField W n.vector p) ∧ + 0 < realSecondForm H (v q) (v q) q ⬝ᵥ profilePreferred (realBoundaryProfile H z q) := by + have : CompactSpace C := isCompact_iff_compactSpace.mp hC + let Q : C → JetPolynomial.Base := fun p => e (chart (i : M) p) + have hQ : Continuous Q := ((chart (i : M)).trans e).continuousOn.comp_continuous + continuous_subtype_val (fun p => hCs p.property) + have hK : IsCompact (Set.range Q) := isCompact_range hQ + obtain ⟨S,hS,hKS,hSc,_⟩ := CollarVelocity.compact_open_thickening hK isOpen_univ (subset_univ _) + have hD (p : C) := A.phase_gram_at_source i e he hi hF (hCs p.property) (hw p p.property) + let H := A.phaseRealChartMap i e.symm F + let κ : C → ℝ := fun p => coordinateGaussianCurvature (realMetric H dx dx) + (realMetric H dx dy) (realMetric H dy dy) (baseEquiv (Q p)) + obtain ⟨δ,hδ,hstab⟩ := compact_actual_boundary_matching (A.phaseRealChartMap_smooth i hi hF.1) + (baseEquiv.continuous.comp hQ) (hv.comp (baseEquiv.continuous.comp hQ)) + (spaceCoordinates.continuous.comp (n.smooth.continuous.comp continuous_subtype_val)) + hD (fun p : C => hB p p.property) (fun p : C => havoid p p.property) + (fun p : C => hpositive p p.property) κ + (fun p => coordinateGauss_eq_curvature_mul H _ (hD p)) + (fun p : C => hcross p p.property) + obtain ⟨ρ,hρ,hcontrol⟩ := A.cross_phase_exterior_control A hF.1 + (IsSmoothIsometricImmersion.mfderiv_injective hF) n houter i hi hS hSc hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O hext p hp z + let P := phaseExteriorDomain (i : M) e O + have hP := phaseExteriorDomain_properties (i : M) e O + obtain ⟨_,hn,hj⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV O P + (fun y hy => (hP y hy).1) (fun y hy => (hP y hy).2) hext p hp.2 + (Q ⟨p,hp.1⟩) ⟨phaseExteriorDomain_closure (i : M) e O (hCs hp.1) hp.2, + hKS (mem_range_self (⟨p,hp.1⟩ : C))⟩ + have hh := hstab (⟨p,hp.1⟩ : C) _ (A.phaseRealChartMap_smooth i hi hW) _ hj hn z + exact ⟨hh.2.2.1,hh.2.2.2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceC2Difference.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceC2Difference.lean new file mode 100644 index 0000000000000000000000000000000000000000..15266f2f74841090cd85e8bf03237e828bbd6d07 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceC2Difference.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalQuadraticReplacement + +namespace OAI + +/-! Converting the global second-order norm estimate into the two actual +derivative estimates used by the crosscap direction map. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma surface_second_derivative_sub {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (x : Base) : + fderiv ℝ (fderiv ℝ (g-f)) x = + fderiv ℝ (fderiv ℝ g) x-fderiv ℝ (fderiv ℝ f) x := by + have he : fderiv ℝ (g-f) = fderiv ℝ g-fderiv ℝ f := by + funext y + exact fderiv_sub (hg.differentiable (by simp) y) (hf.differentiable (by simp) y) + rw [he] + exact fderiv_sub ((hg.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x) + ((hf.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x) + +lemma surface_C2_difference {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) {ε : ℝ} + (hbound : ∀ j ≤ 2, ∀ x, ‖iteratedFDeriv ℝ j (g-f) x‖ ≤ ε) (x : Base) : + ‖fderiv ℝ g x-fderiv ℝ f x‖ ≤ ε ∧ + ‖fderiv ℝ (fderiv ℝ g) x-fderiv ℝ (fderiv ℝ f) x‖ ≤ ε := by + constructor + · have h := hbound 1 (by decide) x + rwa [norm_iteratedFDeriv_one,fderiv_sub (hg.differentiable (by simp) x) + (hf.differentiable (by simp) x)] at h + · have h := hbound 2 (by decide) x + rwa [← norm_iteratedFDeriv_fderiv (n := 1),norm_iteratedFDeriv_one, + surface_second_derivative_sub hf hg] at h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCompactRepresentative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCompactRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..d95c91a996a385a9a0b71426351c9631feeb3a46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCompactRepresentative.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative + +namespace OAI + +/-! Smooth representatives on a fixed compact part of a surface chart. +The compact chart region can be chosen before the surface map. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem surface_compact_representative {f : M → W} + (hf : ContMDiff planeModel 𝓘(ℝ,W) ∞ f) (p : M) + {K : Set M} (hK : IsCompact K) (hKp : K ⊆ (chart p).source) : + ∃ F : Base → W, ContDiff ℝ ∞ F ∧ EqOn f (F ∘ chart p) K := by + have hlocal : ContDiffOn ℝ ∞ (f ∘ (chart p).symm) (chart p).target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + have hKc : IsCompact ((chart p) '' K) := + hK.image_of_continuousOn ((chart p).continuousOn.mono hKp) + have hKT : (chart p) '' K ⊆ (chart p).target := by + rintro z ⟨x,hx,rfl⟩ + exact (chart p).map_source (hKp hx) + obtain ⟨U,hU,hKU,hUT,F,hF,hFF⟩ := CollarVelocity.compact_smooth_extension + hKc (chart p).open_target hKT hlocal + refine ⟨F,hF,?_⟩ + intro x hx + change f x = F (chart p x) + rw [hFF (hKU ⟨x,hx,rfl⟩)] + change f x = f ((chart p).symm (chart p x)) + rw [(chart p).left_inv (hKp hx)] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveExterior.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveExterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d744dbafdc497b1bc5a76558199b1adcbb67de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveExterior.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.Immersion.ClosedSurface.Main +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorDomain +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorPreservation + +namespace OAI + +/-! Exterior stability on actual compact curves of the surface. All chart +domains and compact parameter neighborhoods are constructed here. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes GeometryPreservation VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem compact_surface_phase_exterior_preservation + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : B.centers) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {C : Set M} (hC : IsCompact C) + (hCs : C ⊆ ((chart (i : M)).trans e).source) + (hw : ∀ p ∈ C, B.weight i p ≠ 0) + (hB : ∀ p ∈ C, realSecondForm (B.phaseRealChartMap i e.symm F) dy dy + (baseEquiv (e (chart (i : M) p))) ≠ 0) + (havoid : ∀ p ∈ C, spaceCoordinates (n.vector p) ≠ + -normalize (realSecondForm (B.phaseRealChartMap i e.symm F) dy dy + (baseEquiv (e (chart (i : M) p))))) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ p ∈ C ∩ closure O, + A.projectedNormalField W n.vector p ≠ 0 ∧ + realSecondForm (B.phaseRealChartMap i e.symm W) dy dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector p) ≠ + -normalize (realSecondForm (B.phaseRealChartMap i e.symm W) dy dy + (baseEquiv (e (chart (i : M) p)))) := by + have : CompactSpace C := isCompact_iff_compactSpace.mp hC + let Q : C → JetPolynomial.Base := fun p => e (chart (i : M) p) + have hQ : Continuous Q := ((chart (i : M)).trans e).continuousOn.comp_continuous + continuous_subtype_val (fun p => hCs p.property) + have hK : IsCompact (Set.range Q) := isCompact_range hQ + obtain ⟨S,hS,hKS,hSc,_⟩ := CollarVelocity.compact_open_thickening hK isOpen_univ (subset_univ _) + obtain ⟨δ,hδ,hstab⟩ := compact_actual_exterior_avoidance (B.phaseRealChartMap_smooth i hi hF.1) + (baseEquiv.continuous.comp hQ) (spaceCoordinates.continuous.comp + (n.smooth.continuous.comp continuous_subtype_val)) continuous_const + (fun p : C => B.phase_gram_at_source i e he hi hF (hCs p.property) (hw p p.property)) + (fun p : C => hB p p.property) (fun p : C => havoid p p.property) + obtain ⟨ρ,hρ,hcontrol⟩ := A.cross_phase_exterior_control B hF.1 (IsSmoothIsometricImmersion.mfderiv_injective hF) + n houter i hi hS hSc hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O hext p hp + let P := phaseExteriorDomain (i : M) e O + have hP := phaseExteriorDomain_properties (i : M) e O + obtain ⟨hne,hn,hj⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV O P + (fun y hy => (hP y hy).1) (fun y hy => (hP y hy).2) hext p hp.2 + (Q ⟨p,hp.1⟩) ⟨phaseExteriorDomain_closure (i : M) e O (hCs hp.1) hp.2, + hKS (mem_range_self (⟨p,hp.1⟩ : C))⟩ + exact ⟨hne,hstab ⟨p,hp.1⟩ _ (B.phaseRealChartMap_smooth i hi hW) _ hj hn⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveNormalGluing.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveNormalGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd8592777cb23fdb9f11f18919a7ade8b1d94735 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveNormalGluing.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingSafeNormalGluing + +namespace OAI + +/-! The global normal step for actual surface curves. A single smallness +threshold handles every exterior curve and the whole exterior normal field. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes NormalFrame VelocityFrame +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [Fintype κ] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem finite_curve_disk_normal + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (curves : κ → PhaseBoundaryCurve B) + (hold : ∀ k p, p ∈ (curves k).carrier → (curves k).second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize ((curves k).second F p)) + (i : A.centers) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, A.weight i p ≠ 0) + (E : Set M) (hE : E.Finite) (hEf : Disjoint E (frontier D)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ∀ h : SmoothMetric M, IsSmoothIsometricImmersion M h W → + ∀ b d : ℝ, 0 ≤ b → 0 ≤ d → b+d < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 d (W-V) → + (∀ p ∉ closure D, V =ᶠ[𝓝 p] G) → + ∀ U₀ : Set SmallModes.Base, IsOpen U₀ → ∀ ν : SmallModes.Base → Vec, + ContDiffOn ℝ ∞ ν U₀ → + (∀ x ∈ U₀, ν x ⬝ᵥ ν x = 1) → + (∀ x ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A.phaseRealChartMap i e.symm W) x ⬝ᵥ ν x = 0) → + MapsTo (fun p => baseEquiv (e (chart (i : M) p))) (closure D) U₀ → + (∀ p ∈ frontier D, spaceCoordinates (A.unitProjectedNormalField W n.vector p) ≠ + -ν (baseEquiv (e (chart (i : M) p)))) → + (∀ k p, p ∈ (curves k).carrier → p ∈ D → + (curves k).second W p ≠ 0 ∧ + ν (baseEquiv (e (chart (i : M) p))) ≠ -normalize ((curves k).second W p)) → + (∀ k p, p ∈ (curves k).carrier → p ∈ frontier D → + 0 < (curves k).second W p ⬝ᵥ ν (baseEquiv (e (chart (i : M) p))) ∧ + 0 < (curves k).second W p ⬝ᵥ spaceCoordinates (A.unitProjectedNormalField W n.vector p)) → + ∃ N : PreferredNormal W, + (∀ k p, p ∈ (curves k).carrier → (curves k).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves k).second W p)) ∧ + ∀ p ∈ E, (p ∈ D → N.vector p = A.phaseNormalLift i e ν p) ∧ + (p ∉ D → N.vector p = A.unitProjectedNormalField W n.vector p) := by + classical + choose r hr hpres using fun k => (curves k).exterior_preservation A hF n houter + (fun p hp => (hold k p hp).1) (fun p hp => (hold k p hp).2) + obtain ⟨s,hs,_,hsr⟩ := finite_positive_threshold r hr + obtain ⟨t,ht,hproj⟩ := A.exterior_projected_normal_close_closure hF.1 n.smooth n.unit n.normal + (fun j p hp => A.planeRead_gram_of_immersion hF.1 + (IsSmoothIsometricImmersion.mfderiv_injective hF) houter j hp) zero_lt_one + refine ⟨min s t,lt_min hs ht,?_⟩ + intro G V W hG hV h hW b d hb hd hbd hGF hWV hext U₀ hU₀ ν hν hunit hnormal hDU hanti hin hpair + have hclosure (p : M) (hp : p ∉ D) : p ∈ closure (closure D)ᶜ := by + rwa [closure_compl,hDr] + have hcurve (k : κ) (p : M) (hp : p ∈ (curves k).carrier) (hpD : p ∉ D) := + hpres k G V W hG hV hW.1 b d hb hd + ((hbd.trans_le (min_le_left _ _)).trans_le (hsr k)) hGF hWV (closure D)ᶜ + hext p ⟨hp,hclosure p hpD⟩ + have hpn (p : M) (hpD : p ∉ D) : A.projectedNormalField W n.vector p ≠ 0 := + (hproj G V W hG hV hW.1 b d hb hd (hbd.trans_le (min_le_right _ _)) hGF hWV + (closure D)ᶜ hext p (hclosure p hpD)).1 + obtain ⟨N,havoid,hmatch⟩ := A.crossing_safe_phase_normal_gluing i hW.1 + (IsSmoothIsometricImmersion.mfderiv_injective hW) n.smooth houter e he hi hD E hE hEf + hU₀ hν hunit hnormal hDs hDe hDU hDw hpn hanti + (fun k => (curves k).carrier) (fun k => (curves k).compact.isClosed) + (fun k => (curves k).second W) (fun k => ((curves k).second_smooth hW).continuous) + (fun k p hp hpD => (hin k p hp hpD).2) + (fun k p hp hpD => (hcurve k p hp (fun hpd => hpD (subset_closure hpd))).2.2) hpair + refine ⟨N,?_,hmatch⟩ + intro k p hp + refine ⟨?_,havoid k p hp⟩ + by_cases hpD : p ∈ D + · exact (hin k p hp hpD).1 + · exact (hcurve k p hp hpD).2.1 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveRepresentative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..54bc82896042159bec93f6a25dd2f384e1a8706b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceCurveRepresentative.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCurveCoordinates + +namespace OAI + +/-! A regular surface curve has an actual smooth Euclidean representative +in any selected surface chart through its base point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem surface_curve_chart_representative {γ : ℝ → M} {U : Set ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) + {t : ℝ} (ht : t ∈ U) (p : M) (hp : γ t ∈ (chart p).source) + (hr : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) : + ∃ (F : ℝ → Base) (V : Set ℝ), ContDiff ℝ ∞ F ∧ IsOpen V ∧ t ∈ V ∧ V ⊆ U ∧ + (∀ u ∈ V, γ u ∈ (chart p).source ∧ F u = chart p (γ u)) ∧ deriv F t ≠ 0 := by + let W := U ∩ γ ⁻¹' (chart p).source + have hW : IsOpen W := hγ.continuousOn.isOpen_inter_preimage hU (chart p).open_source + have htW : t ∈ W := ⟨ht,hp⟩ + let φ : ℝ → Base := chart p ∘ γ + have hφ : ContDiffOn ℝ ∞ φ W := + ((chart_smooth p).comp (hγ.mono inter_subset_left) (fun _ hu => hu.2)).contDiffOn + obtain ⟨V,hV,htV,hVW,F,hF,hFφ⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := t)) hW (singleton_subset_iff.mpr htW) hφ + have he : F =ᶠ[𝓝 t] φ := hFφ.eventuallyEq_of_mem (hV.mem_nhds (htV (by simp))) + have hφi : Function.Injective (fderiv ℝ φ t) := by + rw [← mfderiv_eq_fderiv,mfderiv_comp t + (((chart_smooth p).contMDiffAt ((chart p).open_source.mem_nhds hp)).mdifferentiableAt (by simp)) + ((hγ.contMDiffAt (hU.mem_nhds ht)).mdifferentiableAt (by simp))] + exact ((chart_mdifferentiable p).mfderiv_injective hp).comp hr + have hFi : Function.Injective (fderiv ℝ F t) := by rw [he.fderiv_eq]; exact hφi + have hFn : deriv F t ≠ 0 := by + intro hz + have h01 : fderiv ℝ F t 1 = fderiv ℝ F t 0 := by + rw [fderiv_apply_one_eq_deriv,hz,map_zero] + have hn := hFi h01 + norm_num at hn + refine ⟨F,V,hF,hV,htV (by simp),hVW.trans inter_subset_left,?_,hFn⟩ + intro u hu + exact ⟨(hVW hu).2,hFφ hu⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionBlock.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionBlock.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd75a753a858476b155ab21cf1b3237f392cbc53 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionBlock.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalDefectJet + +namespace OAI + +/-! The original derivative-direction transversality is exactly the +three-column block entering the normal-defect jet. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma surfaceDirection_true_block {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (p : Base) : + (EuclideanSpace.equiv (Fin 3) ℝ).toContinuousLinearMap.comp + (fderiv ℝ (surfaceDirection φ true) (p,0)) = + directionBlock (fderiv ℝ (fun x => coordinateDifferential φ x (![0,1] : Base)) p) + (transverseDerivative φ p) := by + let E := (EuclideanSpace.equiv (Fin 3) ℝ).toContinuousLinearMap + let W := fun x => coordinateDifferential φ x (![0,1] : Base) + let U := transverseDerivative φ + have hW : ContDiff ℝ ∞ W := (coordinateDifferential_smooth hφ).clm_apply contDiff_const + have hU : ContDiff ℝ ∞ U := transverseDerivative_smooth hφ + have hWD := (hW.differentiable (by simp) p).hasFDerivAt.comp (p,(0:ℝ)) (hasFDerivAt_fst (𝕜 := ℝ) (p := (p,(0:ℝ)))) + have hUD := (hU.differentiable (by simp) p).hasFDerivAt.comp (p,(0:ℝ)) (hasFDerivAt_fst (𝕜 := ℝ) (p := (p,(0:ℝ)))) + have hd := hWD.add ((hasFDerivAt_snd (𝕜 := ℝ) (p := (p,(0:ℝ)))).smul hUD) + have hEq : E ∘ surfaceDirection φ true = + fun z : Base × ℝ => W z.1 + z.2 • U z.1 := by + funext z + have hray : tangentRay true z.2 = (z.2) • (![1,0] : Base) + (![0,1] : Base) := by + ext i + fin_cases i <;> simp [tangentRay] + simp only [Function.comp_apply,surfaceDirection,hray,map_add,map_smul] + dsimp [W,U,transverseDerivative,coordinateDifferential,E] + abel + have hleft := E.hasFDerivAt.comp (p,(0:ℝ)) ((surfaceDirection_smooth hφ true).differentiable (by simp) _).hasFDerivAt + change HasFDerivAt (fun z : Base × ℝ => W z.1 + z.2 • U z.1) _ (p,0) at hd + have hfd := hleft.fderiv + rw [hEq,hd.fderiv] at hfd + rw [← hfd] + apply ContinuousLinearMap.ext + intro z + simp [directionBlock_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.smulRight_apply,W,U] + +lemma normalDefect_nondegenerate_of_direction {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (a : Fin 3 → ℝ) (p : Base) + (hu : transverseDerivative φ p ≠ 0) + (ha : ∀ r : ℝ, r • transverseDerivative φ p ≠ a) + (hz : fderiv ℝ φ p (![0,1] : Base) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ true) (p,0))) : + Function.Bijective (fderiv ℝ (normalDefect φ a) p) := by + apply normalDefect_jet_bijective hφ a p hu ha hz + rw [← surfaceDirection_true_block hφ p] + exact (EuclideanSpace.equiv (Fin 3) ℝ).bijective.comp hreg + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionEstimates.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac2618bf20be3f0d5083c15a6d9142d4d4908fbe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionEstimates.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapLinearStability + +namespace OAI + +/-! Second-jet control of the actual surface controls the first derivative +of its direction map. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma surfaceDirectionLinearization_sub_apply (f g : Base → ProjectionTarget 3) + (b : Bool) (z w : Base × ℝ) : + (surfaceDirectionLinearization g b z-surfaceDirectionLinearization f b z) w = + w.2 • ((fderiv ℝ g z.1-fderiv ℝ f z.1) (tangentRayVelocity b)) + + (fderiv ℝ (fderiv ℝ g) z.1-fderiv ℝ (fderiv ℝ f) z.1) w.1 (tangentRay b z.2) := by + change (fderiv ℝ g z.1 (w.2 • tangentRayVelocity b) + + fderiv ℝ (fderiv ℝ g) z.1 w.1 (tangentRay b z.2)) - + (fderiv ℝ f z.1 (w.2 • tangentRayVelocity b) + + fderiv ℝ (fderiv ℝ f) z.1 w.1 (tangentRay b z.2)) = _ + simp only [sub_apply,smul_sub,map_smul] + abel + +lemma norm_surfaceJet_operator + (A : Base →L[ℝ] ProjectionTarget 3) + (B : Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) (u v : Base) + (L : Base × ℝ →L[ℝ] ProjectionTarget 3) + (hL : ∀ w : Base × ℝ, L w = w.2 • A v+B w.1 u) : + ‖L‖ ≤ ‖A‖*‖v‖+‖B‖*‖u‖ := by + apply L.opNorm_le_bound (by positivity) + intro w + rw [hL] + have hb : ‖B w.1 u‖ ≤ ‖B‖*‖w.1‖*‖u‖ := by + calc + _ ≤ ‖B w.1‖*‖u‖ := (B w.1).le_opNorm _ + _ ≤ (‖B‖*‖w.1‖)*‖u‖ := + mul_le_mul_of_nonneg_right (B.le_opNorm _) (norm_nonneg _) + calc + _ ≤ ‖w.2 • A v‖+‖B w.1 u‖ := norm_add_le _ _ + _ ≤ ‖w.2‖*(‖A‖*‖v‖)+‖B‖*‖w.1‖*‖u‖ := by + rw [norm_smul] + exact add_le_add (mul_le_mul_of_nonneg_left (A.le_opNorm _) (norm_nonneg _)) hb + _ ≤ ‖w‖*(‖A‖*‖v‖)+‖B‖*‖w‖*‖u‖ := by + gcongr + · exact norm_snd_le w + · exact norm_fst_le w + _ = _ := by ring + +lemma norm_surfaceDirection_fderiv_sub {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (b : Bool) (z : Base × ℝ) : + ‖fderiv ℝ (surfaceDirection g b) z-fderiv ℝ (surfaceDirection f b) z‖ ≤ + ‖fderiv ℝ g z.1-fderiv ℝ f z.1‖*‖tangentRayVelocity b‖ + + ‖fderiv ℝ (fderiv ℝ g) z.1-fderiv ℝ (fderiv ℝ f) z.1‖*‖tangentRay b z.2‖ := by + have hdg := (surfaceDirection_hasFDerivAt hg b z).fderiv + have hdf := (surfaceDirection_hasFDerivAt hf b z).fderiv + rw [hdg,hdf] + exact norm_surfaceJet_operator _ _ _ _ _ + (surfaceDirectionLinearization_sub_apply f g b z) + +lemma tangentRay_norm_le (b : Bool) (t : ℝ) : ‖tangentRay b t‖ ≤ |t|+1 := by + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro i + cases b <;> fin_cases i <;> simp [tangentRay] + +lemma tangentRayVelocity_norm (b : Bool) : ‖tangentRayVelocity b‖ = 1 := by + apply le_antisymm + · apply (pi_norm_le_iff_of_nonneg zero_le_one).mpr + intro i + cases b <;> fin_cases i <;> simp [tangentRayVelocity] + · cases b + · simpa [tangentRayVelocity] using + (norm_le_pi_norm (tangentRayVelocity false) (1 : Fin 2)) + · simpa [tangentRayVelocity] using + (norm_le_pi_norm (tangentRayVelocity true) (0 : Fin 2)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..d244c543b3418e99f63d1d18b1e771b3a3b68cd8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceDirectionJet.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ProjectionCrosscapJet + +namespace OAI + +/-! The derivative-direction map of an actual three-dimensional surface, +and its relation to the unweighted projection jet. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def surfaceDirection (f : Base → ProjectionTarget 3) (b : Bool) + (z : Base × ℝ) : ProjectionTarget 3 := fderiv ℝ f z.1 (tangentRay b z.2) + +def surfaceDirectionLinearization (f : Base → ProjectionTarget 3) (b : Bool) + (z : Base × ℝ) : Base × ℝ →L[ℝ] ProjectionTarget 3 := + (fderiv ℝ f z.1).comp ((ContinuousLinearMap.snd ℝ Base ℝ).smulRight (tangentRayVelocity b)) + + ((fderiv ℝ (fderiv ℝ f) z.1).comp (ContinuousLinearMap.fst ℝ Base ℝ)).flip + (tangentRay b z.2) + +lemma surfaceDirection_smooth {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) : ContDiff ℝ ∞ (surfaceDirection f b) := by + exact ((hf.fderiv_right (m := ∞) (by simp)).comp contDiff_fst).clm_apply + ((tangentRay_smooth b).comp contDiff_snd) + +lemma surfaceDirection_hasFDerivAt {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) (z : Base × ℝ) : + HasFDerivAt (surfaceDirection f b) (surfaceDirectionLinearization f b z) z := by + exact ((((hf.fderiv_right (m := ∞) (by simp)).differentiable (by simp) z.1).hasFDerivAt.comp z + hasFDerivAt_fst).clm_apply + ((tangentRay_hasDerivAt b z.2).hasFDerivAt.comp z hasFDerivAt_snd)) + +lemma surfaceDirection_projected {Φ : Base → ProjectionTarget 3 × ℝ} + (hΦ : ContDiff ℝ ∞ Φ) (a : ProjectionTarget 3) (b : Bool) (z : Base × ℝ) : + surfaceDirection (graphProjection a ∘ Φ) b z = + graphProjection a (fderiv ℝ Φ z.1 (tangentRay b z.2)) := by + rw [surfaceDirection,fderiv_comp z.1 (graphProjection a).differentiableAt + (hΦ.differentiable (by simp) z.1),(graphProjection a).fderiv] + rfl + +lemma surfaceDirection_projected_fderiv {Φ : Base → ProjectionTarget 3 × ℝ} + (hΦ : ContDiff ℝ ∞ Φ) (a : ProjectionTarget 3) (b : Bool) (z : Base × ℝ) : + fderiv ℝ (surfaceDirection (graphProjection a ∘ Φ) b) z = + projectedCrosscapJet Φ a b z.1 z.2 := by + have hd := (graphProjection a).hasFDerivAt.comp z + (hasFDerivAt_tangent_direction (hΦ.fderiv_right (m := ∞) (by simp)) b z) + have he : surfaceDirection (graphProjection a ∘ Φ) b = + graphProjection a ∘ (fun w : Base × ℝ => fderiv ℝ Φ w.1 (tangentRay b w.2)) := by + funext w + exact surfaceDirection_projected hΦ a b w + rw [he,hd.fderiv] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceFrozenCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceFrozenCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..125f8fb0406d8a983efec15c204ce3ca123c617b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceFrozenCoefficients.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceBoundaryCollar + +namespace OAI + +/-! Identify the first two coefficients of the actual surface profiles with +those used to choose the boundary collar before the loop. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation + +lemma surfaceCircularProfile_frozen_coefficients {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {U : Set Base} {Ω Z : TopologicalSpace.Opens GeometricJet} + (hΩ : (Ω : Set GeometricJet) ⊆ supportedJetDomain U n a) + (hZΩ : (Z : Set GeometricJet) ⊆ Ω) + {e₁ e₂ : GeometricJet → Vec} (h₁ : ContDiffOn ℝ ∞ e₁ Ω) (h₂ : ContDiffOn ℝ ∞ e₂ Ω) + (hframe : ∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + {x : Base} (hxZ : CollarVelocity.jetSection F x ∈ Z) (t : ℝ) : + profileCoefficients (surfaceCircularProfile F a e₁ e₂ α (x,t)) 0 = + surfaceFrozenSize F a e₁ e₂ (x,α (CollarVelocity.jetSection F x,t)) ∧ + profileCoefficients (surfaceCircularProfile F a e₁ e₂ α (x,t)) 1 = + surfaceFrozenFirst F a e₁ e₂ (x,α (CollarVelocity.jetSection F x,t)) := by + let V : Set Base := CollarVelocity.jetSection F ⁻¹' Z + have hσ := CollarVelocity.jetSection_smooth hF + have hV : IsOpen V := Z.isOpen.preimage hσ.continuous + have hmaps : MapsTo (CollarVelocity.jetSection F) V Ω := fun _ hx => hZΩ hx + have hD : ∀ x ∈ V, gramDet (coordDeriv dy F x) (coordDeriv dy (coordDeriv dy F) x) ≠ 0 := + fun x hx => preferredJetDomain_velocity_gram (hΩ (hZΩ hx)).1 + have hv : ContDiffOn ℝ ∞ (fun x => jetNormal (CollarVelocity.jetSection F x)) V := + (jetNormal_smooth (fun j hj => preferredJetDomain_velocity_gram (hΩ hj).1)).comp hσ.contDiffOn hmaps + have hnonzero : ∀ x ∈ V, jetNormal (CollarVelocity.jetSection F x) ≠ 0 ∨ a x ≠ 0 := + fun _ hx => (hΩ (hZΩ hx)).2 + have hR := velocityRadius_smoothOn hv ha.contDiffOn hnonzero + have hx := (contDiff_real_coordDeriv hF dx).contDiffOn (s := V) + have hy := (contDiff_real_coordDeriv hF dy).contDiffOn (s := V) + have hc := (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dy).contDiffOn (s := V) + have hα' : ContDiffOn ℝ ∞ (fun z : Base × ℝ => α (CollarVelocity.jetSection F z.1,z.2)) + (V ×ˢ univ) := + hα.comp ((hσ.comp contDiff_fst).prodMk contDiff_snd).contDiffOn (fun _ hz => ⟨hz.1,hz.2⟩) + have hnb := hV.mem_nhds hxZ + exact circularFamilyProfile_frozen_coefficients + (X := coordDeriv dx F) (Y := coordDeriv dy F) (C := coordDeriv dy (coordDeriv dy F)) + (((hx.sub hv).contDiffAt hnb).differentiableAt (by simp)) + ((hR.contDiffAt hnb).differentiableAt (by simp)) + (((h₁.comp hσ.contDiffOn hmaps).contDiffAt hnb).differentiableAt (by simp)) + (((h₂.comp hσ.contDiffOn hmaps).contDiffAt hnb).differentiableAt (by simp)) + ((hα'.contDiffAt ((hV.prod isOpen_univ).mem_nhds (show (x,t) ∈ V ×ˢ univ from ⟨hxZ,mem_univ t⟩))).differentiableAt (by simp)) + (hframe _ (hZΩ hxZ)) dy + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGermTranslation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGermTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa6524987ba97ab11574d1edf015f6f2624b28a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGermTranslation.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteGermSeparator + +namespace OAI + +/-! Smooth supported translation families and their unchanged first jets +at points where the scalar separator is locally constant. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def surfaceTranslation (f : M → ProjectionTarget 3) (χ : M → ℝ) + (a : ProjectionTarget 3) : M → ProjectionTarget 3 := fun p => f p + χ p • a + +omit [IsManifold planeModel ∞ M] in +theorem surfaceTranslation_smooth {f : M → ProjectionTarget 3} {χ : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) (a : ProjectionTarget 3) : + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ (surfaceTranslation f χ a) := + hf.add (hχ.smul contMDiff_const) + +omit [ChartedSpace Plane M] [IsManifold planeModel ∞ M] in +theorem surfaceTranslation_germ {f : M → ProjectionTarget 3} {χ : M → ℝ} + {p : M} {c : ℝ} (hχ : χ =ᶠ[𝓝 p] (fun _ => c)) (a : ProjectionTarget 3) : + surfaceTranslation f χ a =ᶠ[𝓝 p] (fun q => f q+c • a) := by + filter_upwards [hχ] with q hq + simp only [surfaceTranslation,hq] + +omit [IsManifold planeModel ∞ M] in +theorem surfaceTranslation_mfderiv {f : M → ProjectionTarget 3} {χ : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {p : M} {c : ℝ} (hχ : χ =ᶠ[𝓝 p] (fun _ => c)) (a : ProjectionTarget 3) : + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (surfaceTranslation f χ a) p = + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p := by + rw [(surfaceTranslation_germ hχ a).mfderiv_eq] + apply ContinuousLinearMap.ext + intro v + change (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (f + fun _ => c • a) p) v = _ + rw [mfderiv_add ((hf p).mdifferentiableAt (by simp)) mdifferentiableAt_const, + mfderiv_const] + change (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) v + 0 = _ + exact add_zero _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGraphParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGraphParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..901ae04406d6988764b707e97ff29d771e397147 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceGraphParameter.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NonzeroGermDiffeomorphism +import OAI.Geometry.SurfaceImmersion.Geometry.CommonSurfaceCurveGraphs + +namespace OAI + +/-! Smooth inverse parameters for actual graph branches in a surface chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +theorem surface_graph_parameter {γ : ℝ → M} {U : Set ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) + (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (g : ℝ → ℝ) (hgraph : ∀ u ∈ U, γ u ∈ c.source ∧ + c (γ u) = ![c (γ u) 0,g (c (γ u) 0)]) + {s : ℝ} (hs : s ∈ U) (hd : deriv (fun u => c (γ u) 0) s ≠ 0) : + ∃ (e : ℝ ≃ₜ ℝ) (W : Set ℝ), + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + (StrictMono e ∨ StrictAnti e) ∧ IsOpen W ∧ s ∈ W ∧ W ⊆ U ∧ + (∀ u ∈ W, e u = c (γ u) 0) ∧ + IsOpen (e '' W) ∧ e s ∈ e '' W ∧ + (∀ x ∈ e '' W, ![x,g x] ∈ c.target ∧ + c.symm ![x,g x] = γ (e.symm x)) := by + have hcoord : ContDiffOn ℝ ∞ (fun u => c (γ u) 0) U := + (contDiff_apply ℝ ℝ 0).comp_contDiffOn + (hcs.comp hγ (fun u hu => (hgraph u hu).1)).contDiffOn + obtain ⟨e,he,hei,hem,hee⟩ := nonzero_local_germ_diffeomorphism hU hcoord hs hd + obtain ⟨V,hV,hsV,hVe⟩ := mem_nhds_iff.mp hee + let W := U ∩ V + have hW : IsOpen W := hU.inter hsV + have hsW : s ∈ W := ⟨hs,hVe⟩ + refine ⟨e,W,he,hei,hem,hW,hsW,inter_subset_left,?_,e.isOpenMap _ hW, + mem_image_of_mem e hsW,?_⟩ + · intro u hu + exact hV hu.2 + · rintro x ⟨u,hu,rfl⟩ + have heq : c (γ u) = ![e u,g (e u)] := by + rw [hV hu.2] + exact (hgraph u hu.1).2 + refine ⟨heq ▸ c.map_source (hgraph u hu.1).1,?_⟩ + rw [e.symm_apply_apply,← heq,c.left_inv (hgraph u hu.1).1] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceImmersionLocalInjective.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceImmersionLocalInjective.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e8caab76965f3da8f9858ab6022bdce960468ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceImmersionLocalInjective.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EuclideanImmersionLocalInjective +import OAI.Geometry.SurfaceImmersion.Atlas.ChartGermImmersion + +namespace OAI + +/-! Actual regular surface points have neighborhoods on which the map is injective. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem surface_immersion_locally_injective {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (p : M) (hp : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ U.InjOn f := by + obtain ⟨U,F,hU,hpU,hUs,hF,heF⟩ := surface_chart_representative hf p + have hpF := (chart_germ_immersion_iff p (hUs hpU) hF + (heF.eventuallyEq_of_mem (hU.mem_nhds hpU))).mp hp + obtain ⟨V,hV,hpV,hVinj⟩ := euclidean_immersion_locally_injective hF (chart p p) hpF + refine ⟨U ∩ (chart p) ⁻¹' V, + ((chart p).continuousOn.mono hUs).isOpen_inter_preimage hU hV,⟨hpU,hpV⟩,?_⟩ + intro x hx y hy heq + apply (chart p).injOn (hUs hx.1) (hUs hy.1) + apply hVinj hx.2 hy.2 + change (F ∘ chart p) x = (F ∘ chart p) y + rw [← heF hx.1,← heF hy.1,heq] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceInjectivityPatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceInjectivityPatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..ccee73f2cec1b0dd6fe6439a0f9cded8c27421c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceInjectivityPatch.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConvexDerivativeInjectivity +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartTranslationBound + +namespace OAI + +/-! Fixed coordinate balls with quantitative local injectivity margins. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +structure SurfaceInjectivityPatch (f : M → ProjectionTarget 3) (p : M) where + radius : ℝ + radius_pos : 0 < radius + target : closedBall (chart p p) radius ⊆ (chart p).target + K : NNReal + K_pos : 0 < K + anti : AntilipschitzWith K (fderiv ℝ (f ∘ (chart p).symm) (chart p p)) + bound : ∀ y ∈ closedBall (chart p p) radius, + ‖fderiv ℝ (f ∘ (chart p).symm) y-fderiv ℝ (f ∘ (chart p).symm) (chart p p)‖ < 1/(4*(K:ℝ)) + +def SurfaceInjectivityPatch.region {f : M → ProjectionTarget 3} {p : M} + (P : SurfaceInjectivityPatch f p) : Set M := + (chart p).source ∩ (chart p) ⁻¹' ball (chart p p) P.radius + +omit [IsManifold planeModel ∞ M] in +lemma SurfaceInjectivityPatch.region_open {f : M → ProjectionTarget 3} {p : M} + (P : SurfaceInjectivityPatch f p) : IsOpen P.region := + (chart p).isOpen_inter_preimage isOpen_ball + +omit [IsManifold planeModel ∞ M] in +lemma SurfaceInjectivityPatch.mem_region {f : M → ProjectionTarget 3} {p : M} + (P : SurfaceInjectivityPatch f p) : p ∈ P.region := by + exact ⟨by simpa only [chart_source] using mem_chart_source Plane p, + mem_ball_self P.radius_pos⟩ + +theorem exists_surface_injectivity_patch {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (p : M) (hi : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + Nonempty (SurfaceInjectivityPatch f p) := by + have hp : p ∈ (chart p).source := by simpa only [chart_source] using mem_chart_source Plane p + have hxp := (chart p).map_source hp + have hI : Function.Injective (fderiv ℝ (f ∘ (chart p).symm) (chart p p)) := by + rw [fderiv_comp_chart_symm (hf.of_le (by simp)) p hxp,(chart p).left_inv hp] + exact hi.comp ((chart_mdifferentiable p).symm.mfderiv_injective hxp) + obtain ⟨K,hK,hL⟩ := (fderiv ℝ (f ∘ (chart p).symm) (chart p p)).toLinearMap.exists_antilipschitzWith + (LinearMap.ker_eq_bot.mpr hI) + have hF : ContDiffOn ℝ ∞ (f ∘ (chart p).symm) (chart p).target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + have hD := (hF.continuousOn_fderiv_of_isOpen (chart p).open_target (by simp)).continuousAt + ((chart p).open_target.mem_nhds hxp) + have hc : ∀ᶠ y in 𝓝 (chart p p), + ‖fderiv ℝ (f ∘ (chart p).symm) y-fderiv ℝ (f ∘ (chart p).symm) (chart p p)‖ < 1/(4*(K:ℝ)) := by + simpa only [dist_eq_norm] using (Metric.tendsto_nhds.mp hD) (1/(4*(K:ℝ))) (by positivity) + obtain ⟨r,hr,hrb⟩ := Metric.mem_nhds_iff.mp + (inter_mem ((chart p).open_target.mem_nhds hxp) hc) + refine ⟨⟨r/2,half_pos hr,?_,K,hK,hL,?_⟩⟩ + · intro y hy + exact (hrb (closedBall_subset_ball (by linarith : r/2 < r) hy)).1 + · intro y hy + exact (hrb (closedBall_subset_ball (by linarith : r/2 < r) hy)).2 + +theorem SurfaceInjectivityPatch.injective_of_close {f g : M → ProjectionTarget 3} {p : M} + (P : SurfaceInjectivityPatch f p) + (hg : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g) + (hclose : ∀ y ∈ closedBall (chart p p) P.radius, + ‖fderiv ℝ (g ∘ (chart p).symm) y-fderiv ℝ (f ∘ (chart p).symm) y‖ < 1/(4*(P.K:ℝ))) : + InjOn g P.region := by + have hG : ContDiffOn ℝ ∞ (g ∘ (chart p).symm) (chart p).target := + (hg.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + have hi : InjOn (g ∘ (chart p).symm) (closedBall (chart p p) P.radius) := by + apply convex_injective_of_derivative_close P.K_pos P.anti (convex_closedBall _ _) + · intro x hx + exact (hG.contDiffAt ((chart p).open_target.mem_nhds (P.target hx))).differentiableAt (by simp) + · intro x hx + calc + _ ≤ ‖fderiv ℝ (g ∘ (chart p).symm) x-fderiv ℝ (f ∘ (chart p).symm) x‖+ + ‖fderiv ℝ (f ∘ (chart p).symm) x-fderiv ℝ (f ∘ (chart p).symm) (chart p p)‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ 1/(2*(P.K:ℝ)) := by + have h1 := hclose x hx + have h2 := P.bound x hx + have hK : 0 < (P.K:ℝ) := P.K_pos + have he : 1/(4*(P.K:ℝ))+1/(4*(P.K:ℝ)) = 1/(2*(P.K:ℝ)) := by ring + linarith + intro x hx y hy he + apply (chart p).injOn hx.1 hy.1 + apply hi (ball_subset_closedBall hx.2) (ball_subset_closedBall hy.2) + simpa only [Function.comp_apply,(chart p).left_inv hx.1,(chart p).left_inv hy.1] using he + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceMetricExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceMetricExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..68e52783c8f96c786a7f58c2d1590665cc08c59c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceMetricExpansion.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Correction.BoundedSurfaceCorrection +import OAI.Geometry.SurfaceImmersion.Geometry.QuantitativeMetricExpansion + +namespace OAI + +/-! The finite metric expansion of the actual surface map, with its leading +primitive tensor identified and its fast remainder uniformly bounded. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion +open CovarianceCorrector WeightedEstimates +local notation "ι" => JetVelocityCoordinates.toEuclidean + +namespace Loop +variable {O : TopologicalSpace.Opens LowJet} (l : Loop O) + +def meanCorrection {S : TopologicalSpace.Opens JetPolynomial.Base} + (g : Geometry (E := Euclidean) S (coordinateVector 1)) + (U : ℕ → Family S Euclidean) (n : ℕ) (b c : Bool) (z : ℝ) + (p : JetPolynomial.Base) : ℝ := + if b && c then + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xxCoefficient (coordinateVector 0) U r).val p) * z ^ r + else if b || c then + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.xyCoefficient (coordinateVector 0) U r).val p) * z ^ r + else + ∑ r ∈ Finset.Ico 1 (n + 1), average ((g.yyCoefficient U r).val p) * z ^ r + +lemma meanMetric_eq {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) (U : ℕ → Family S Euclidean) + (n : ℕ) (b c : Bool) (z : ℝ) {p : JetPolynomial.Base} (hp : p ∈ S) : + let g := l.geometry G hG hGO + MetricPolynomial.meanMetric g (coordinateVector 0) U n b c z p = + inner ℝ + (fderiv ℝ (fun q => ι (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (fun q => ι (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) + + (if b && c then l.amplitude (lowJet G p) ^ 2 else 0) + meanCorrection g U n b c z p := by + dsimp only + cases b <;> cases c <;> + simp only [MetricPolynomial.meanMetric, meanCorrection, MetricPolynomial.metricDirection, + Bool.and, Bool.or, Bool.false_eq_true, ↓reduceIte, + euclidean_first_derivative hG, Matrix.cons_val_zero, Matrix.cons_val_one] + · simp only [add_zero]; rfl + · change inner ℝ (ι (tangent (lowJet G p))) (ι (slot 2 (lowJet G p))) + _ = _ + rw [l.leading_xy (hGO hp), real_inner_comm (ι (slot 1 (lowJet G p))) (ι (slot 2 (lowJet G p)))] + simp only [add_zero] + · change inner ℝ (ι (tangent (lowJet G p))) (ι (slot 2 (lowJet G p))) + _ = _ + rw [l.leading_xy (hGO hp)] + simp only [add_zero] + · change (inner ℝ (ι (tangent (lowJet G p))) (ι (tangent (lowJet G p))) + + l.q (lowJet G p)) + _ = _ + rw [l.leading_xx (hGO hp)] + +/-- No derivative or leading-metric identities are additional assumptions: +they follow from the actual coordinate jet and the geometric loop. -/ +theorem compact_surface_metric_error {S : TopologicalSpace.Opens JetPolynomial.Base} + {K : Set LowJet} (hK : IsCompact K) (hKO : K ⊆ O) + (n : ℕ) (b c : Bool) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ d : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGK : MapsTo (lowJet G) S K) (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m + (2 * (n + 1) + 1)) B (lowJet G) → + let g := l.geometry G hG (fun _ hp => hKO (hGK hp)) + ∀ U : ℕ → Family S Euclidean, + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = g.initial → (g.yyCoefficient U 1).fluct = 0 → + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0) → + WeightedBound S z m (D * z ^ (n + 1) / s ^ d) + (fun p => inner ℝ + (fderiv ℝ (finiteAnsatz (fun q => ι (G q)) U ℓ (n + 1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (finiteAnsatz (fun q => ι (G q)) U ℓ (n + 1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) - + MetricPolynomial.meanMetric g (coordinateVector 0) U n b c z p) := by + have hd : ∀ J ∈ O, PeriodicCorrector.gramDet (yData J) (cData J) ≠ 0 := by + intro J hJ + rw [yData, cData, gram_toEuclidean] + exact l.gram_ne J hJ + have hRs := MetricPolynomial.coefficients_smooth O.isOpen yData_smooth cData_smooth + (xData_smooth l) l.euclideanVelocity_smooth hd l.smoothQ (fun _ hJ => l.q_pos hJ) + (fun _ hJ => l.euclideanVelocity_length hJ) 0 1 n + obtain ⟨d, hb⟩ := MetricPolynomial.compact_metric_error (S := S) O.isOpen hK hKO + (MetricPolynomial.longitudinal xData l.euclideanVelocity) (MetricPolynomial.transverse yData) + (l.coefficientExpressions n) + (MetricPolynomial.smooth_longitudinal (xData_smooth l) l.euclideanVelocity_smooth) + (MetricPolynomial.smooth_transverse yData_smooth) hRs n (fun _ => le_rfl) (fun _ => le_rfl) + (fun j _ a => MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n j a) + 0 1 b c ℓ hℓx hℓy + refine ⟨d, ?_⟩ + intro m B hB + obtain ⟨D, hD, hbound⟩ := hb m B hB + refine ⟨D, hD, ?_⟩ + intro G hG hGK s z hz hzs hs1 hGs g U hrep hinit hy hc + exact hbound G s z hz hzs hs1 hG hGK hGs g U (fun q => ι (G q)) + (MetricPolynomial.represents_longitudinal g xData l.euclideanVelocity (fun _ _ => rfl) + (fun _ hp => l.geometry_velocity hG (fun _ hp => hKO (hGK hp)) hp)) + (MetricPolynomial.represents_transverse g yData (fun _ _ => rfl)) + hrep hinit hy hc (JetVelocityCoordinates.toEuclidean.contDiff.comp hG).contDiffOn + (fun _ hp => l.geometry_dx hG (fun _ hp => hKO (hGK hp)) hp) + (fun p _ => l.geometry_dy hG (fun _ hp => hKO (hGK hp)) p) + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceQuadraticTaylor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceQuadraticTaylor.lean new file mode 100644 index 0000000000000000000000000000000000000000..b82b77dca7fd82360934d3f2efb3b7cb902db1df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceQuadraticTaylor.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FlatSecondJetBounds + +namespace OAI + +/-! The actual second Taylor polynomial of a smooth surface map at the +coordinate origin, including exact vanishing jets of its remainder. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def surfaceQuadratic (B : Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) (x : Base) : + ProjectionTarget 3 := (1/2 : ℝ) • B x x + +lemma surfaceQuadratic_smooth (B : Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) : + ContDiff ℝ ∞ (surfaceQuadratic B) := + (B.contDiff.clm_apply contDiff_id).const_smul _ + +lemma surfaceQuadratic_hasFDerivAt (B : Base →L[ℝ] Base →L[ℝ] ProjectionTarget 3) + (hB : ∀ v w, B v w = B w v) (x : Base) : + HasFDerivAt (surfaceQuadratic B) (B x) x := by + have hd := (B.hasFDerivAt_of_bilinear (hasFDerivAt_id x) (hasFDerivAt_id x)).const_smul (1/2 : ℝ) + change HasFDerivAt (surfaceQuadratic B) _ x at hd + convert hd using 1 + apply ContinuousLinearMap.ext + intro v + change B x v = (1/2 : ℝ) • (B x v+B v x) + rw [hB v x] + module + +def surfaceTaylorTwo (f : Base → ProjectionTarget 3) (x : Base) : ProjectionTarget 3 := + f 0+fderiv ℝ f 0 x+surfaceQuadratic (fderiv ℝ (fderiv ℝ f) 0) x + +lemma surfaceTaylorTwo_smooth (f : Base → ProjectionTarget 3) : + ContDiff ℝ ∞ (surfaceTaylorTwo f) := + (contDiff_const.add (fderiv ℝ f 0).contDiff).add (surfaceQuadratic_smooth _) + +lemma surfaceTaylorTwo_fderiv {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (x : Base) : + fderiv ℝ (surfaceTaylorTwo f) x = fderiv ℝ f 0+fderiv ℝ (fderiv ℝ f) 0 x := by + have hB : ∀ v w, fderiv ℝ (fderiv ℝ f) 0 v w = fderiv ℝ (fderiv ℝ f) 0 w v := + fun v w => hf.contDiffAt.isSymmSndFDerivAt (by simp) v w + have hd := ((fderiv ℝ f 0).hasFDerivAt.const_add (f 0)).add + (surfaceQuadratic_hasFDerivAt _ hB x) + exact hd.fderiv + +lemma surfaceTaylorTwo_second {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (x : Base) : + fderiv ℝ (fderiv ℝ (surfaceTaylorTwo f)) x = fderiv ℝ (fderiv ℝ f) 0 := by + have he : fderiv ℝ (surfaceTaylorTwo f) = + fun y => fderiv ℝ f 0+fderiv ℝ (fderiv ℝ f) 0 y := funext (surfaceTaylorTwo_fderiv hf) + rw [he] + exact ((fderiv ℝ (fderiv ℝ f) 0).hasFDerivAt.const_add (fderiv ℝ f 0)).fderiv + +lemma surfaceTaylorTwo_remainder_jets {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) : + (f-surfaceTaylorTwo f) 0 = 0 ∧ fderiv ℝ (f-surfaceTaylorTwo f) 0 = 0 ∧ + fderiv ℝ (fderiv ℝ (f-surfaceTaylorTwo f)) 0 = 0 := by + have hT := surfaceTaylorTwo_smooth f + have hfirst : fderiv ℝ (f-surfaceTaylorTwo f) = + fderiv ℝ f-fderiv ℝ (surfaceTaylorTwo f) := by + funext x + exact fderiv_sub (hf.differentiable (by simp) x) (hT.differentiable (by simp) x) + refine ⟨?_,?_,?_⟩ + · simp [surfaceTaylorTwo,surfaceQuadratic] + · rw [hfirst] + simp [surfaceTaylorTwo_fderiv hf] + · rw [hfirst,fderiv_sub + ((hf.fderiv_right (m := ∞) (by simp)).differentiable (by simp) 0) + ((hT.fderiv_right (m := ∞) (by simp)).differentiable (by simp) 0), + surfaceTaylorTwo_second hf,sub_self] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularLocus.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularLocus.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d97016bc9518a8f4e6909e37e0ddd9ecf59b198 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularLocus.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative +import OAI.Geometry.SurfaceImmersion.Atlas.ChartGermImmersion + +namespace OAI + +/-! The regular locus of a smooth surface map is open in the actual surface. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem surface_regular_locus_open {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + IsOpen {p | Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)} := by + apply isOpen_iff_mem_nhds.mpr + intro p hp + obtain ⟨U,F,hU,hpU,hUs,hF,heF⟩ := surface_chart_representative hf p + let V : Set Base := {z | Function.Injective (fderiv ℝ F z)} + have hV : IsOpen V := ContinuousLinearMap.isOpen_injective.preimage + (hF.continuous_fderiv (by simp)) + have hpV : chart p p ∈ V := + (chart_germ_immersion_iff p (hUs hpU) hF + (heF.eventuallyEq_of_mem (hU.mem_nhds hpU))).mp hp + have hW : IsOpen (U ∩ (chart p) ⁻¹' V) := + ((chart p).continuousOn.mono hUs).isOpen_inter_preimage hU hV + apply Filter.mem_of_superset (hW.mem_nhds ⟨hpU,hpV⟩) + rintro x ⟨hxU,hxV⟩ + exact (chart_germ_immersion_iff p (hUs hxU) hF + (heF.eventuallyEq_of_mem (hU.mem_nhds hxU))).mpr hxV + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPair.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3c3ee7a8db553a966af66e997ac6e8f97e9d6a3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPair.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericSurfaceLevels +import OAI.Geometry.SurfaceImmersion.Geometry.RegularPairCovectors + +namespace OAI + +/-! The regular-value condition in Euclidean surface charts implies the +nonzero determinant of the actual two covectors in our real coordinates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PublishedInputs PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] +variable {ι : Type*} [Fintype ι] + +lemma surface_regular_pair_covectors + (ρ : ι → M → ℝ) (hρ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (ρ i)) + (i j : ι) (q : M) {p : M} (hp : p ∈ (chartAt Plane q).source) + (hreg : Function.Surjective (fderiv ℝ (fun y => radiusPairProjection i j + (fun k => ρ k ((chartAt Plane q).symm y))) (chartAt Plane q p))) : + covectorDet + (phaseDerivative (ρ i ∘ (coordinateChart q).symm) (coordinateChart q p)) + (phaseDerivative (ρ j ∘ (coordinateChart q).symm) (coordinateChart q p)) ≠ 0 := by + let x : Plane := chartAt Plane q p + let z : CurvePlane := coordinateChart q p + let F : Plane → Plane := fun y => radiusPairProjection i j (fun k => ρ k ((chartAt Plane q).symm y)) + have hx : x ∈ (chartAt Plane q).target := (chartAt Plane q).map_source hp + have hd (k : ι) : DifferentiableAt ℝ (fun y => ρ k ((chartAt Plane q).symm y)) x := + (((hρ k).comp_contMDiffOn (contMDiffOn_chart_symm (I := planeModel) (x := q))).contDiffOn + x hx).contDiffAt ((chartAt Plane q).open_target.mem_nhds hx) |>.differentiableAt (by simp) + have hF : DifferentiableAt ℝ F x := + (radiusPairProjection i j).differentiableAt.comp x (differentiableAt_pi.mpr hd) + have hfx : planeCoordinates.symm z = x := by + change planeCoordinates.symm (planeCoordinates (chartAt Plane q p)) = x + exact planeCoordinates.symm_apply_apply x + have heq : (fun y => (ρ i ((coordinateChart q).symm y),ρ j ((coordinateChart q).symm y))) = + planeCoordinates ∘ F ∘ planeCoordinates.symm := by + funext y + apply Prod.ext <;> rfl + have hFx : HasFDerivAt F (fderiv ℝ F x) (planeCoordinates.symm z) := by + rw [hfx] + exact hF.hasFDerivAt + have hinner := hFx.comp z planeCoordinates.symm.hasFDerivAt + have hcomp := planeCoordinates.hasFDerivAt.comp z hinner + have hsurj : Function.Surjective (fderiv ℝ + (fun y => (ρ i ((coordinateChart q).symm y),ρ j ((coordinateChart q).symm y))) z) := by + rw [heq,hcomp.fderiv] + exact planeCoordinates.surjective.comp (hreg.comp planeCoordinates.symm.surjective) + have hsmall (k : ι) : DifferentiableAt ℝ (ρ k ∘ (coordinateChart q).symm) z := by + have hk : DifferentiableAt ℝ (fun y => ρ k ((chartAt Plane q).symm y)) + (planeCoordinates.symm z) := by rw [hfx]; exact hd k + exact hk.comp z planeCoordinates.symm.differentiableAt + exact regular_pair_covectors (hsmall i) (hsmall j) hsurj + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPairLocus.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPairLocus.lean new file mode 100644 index 0000000000000000000000000000000000000000..66dd1cb757dc82aaa93c7aee68a9976819b56e1e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceRegularPairLocus.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairLocalRegularization +import OAI.Geometry.SurfaceImmersion.Geometry.CriticalSetClosed + +namespace OAI + +/-! Regularity of a surface coincidence is an open first-jet condition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def regularSurfacePairs (f : M → ProjectionTarget 3) : Set (M × M) := + {z | f z.1 ≠ f z.2 ∨ Function.Surjective (surfacePairDerivative f z.1 z.2)} + +theorem regularSurfacePairs_open {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + IsOpen (regularSurfacePairs f) := by + rw [isOpen_iff_mem_nhds] + intro z hz + rcases hz with hz | hz + · have ho : IsOpen {w : M × M | f w.1 ≠ f w.2} := + (isClosed_eq (hf.continuous.comp continuous_fst) (hf.continuous.comp continuous_snd)).isOpen_compl + exact mem_of_superset (ho.mem_nhds hz) fun w hw => Or.inl hw + · obtain ⟨U,F,hU,hzU,hUs,hF,heF⟩ := surface_chart_representative hf z.1 + obtain ⟨V,G,hV,hzV,hVs,hG,heG⟩ := surface_chart_representative hf z.2 + let H : Base × Base → ProjectionTarget 3 := fun w => F w.1-G w.2 + have hH : ContDiff ℝ ∞ H := (hF.comp contDiff_fst).sub (hG.comp contDiff_snd) + have hsurj : Function.Surjective (fderiv ℝ H (chart z.1 z.1,chart z.2 z.2)) := + (surface_pair_coordinate_regular_iff z.1 z.2 (hUs hzU) (hVs hzV) hF hG + (heF.eventuallyEq_of_mem (hU.mem_nhds hzU)) + (heG.eventuallyEq_of_mem (hV.mem_nhds hzV))).mp hz + have hc : ContinuousAt (fun w : M × M => (chart z.1 w.1,chart z.2 w.2)) z := + ((chart z.1).continuousAt (hUs hzU)).comp continuousAt_fst |>.prodMk + (((chart z.2).continuousAt (hVs hzV)).comp continuousAt_snd) + have hn : ∀ᶠ w : M × M in 𝓝 z, + Function.Surjective (fderiv ℝ H (chart z.1 w.1,chart z.2 w.2)) := + hc.eventually (((surjective_clm_open).preimage + (hH.continuous_fderiv (by simp))).mem_nhds hsurj) + filter_upwards [(hU.prod hV).mem_nhds ⟨hzU,hzV⟩,hn] with w hw hs + right + exact (surface_pair_coordinate_regular_iff z.1 z.2 (hUs hw.1) (hVs hw.2) hF hG + (heF.eventuallyEq_of_mem (hU.mem_nhds hw.1)) + (heG.eventuallyEq_of_mem (hV.mem_nhds hw.2))).mpr hs + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceScalarRepresentative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceScalarRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e79b80595ce121b569ab621b6c9acdd47e8b163 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceScalarRepresentative.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairDerivative +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Every smooth scalar surface function has a globally smooth Euclidean +representative on an actual smaller neighborhood of any chosen point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem scalar_surface_chart_representative {f : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ℝ) ∞ f) (p : M) : + ∃ (U : Set M) (F : Base → ℝ), IsOpen U ∧ p ∈ U ∧ + U ⊆ (chart p).source ∧ ContDiff ℝ ∞ F ∧ EqOn f (F ∘ chart p) U := by + have hp : p ∈ (chart p).source := by simpa only [chart_source] using mem_chart_source Plane p + have hlocal : ContDiffOn ℝ ∞ (f ∘ (chart p).symm) (chart p).target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + obtain ⟨W,hW,hpW,hWT,F,hF,hFF⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := chart p p)) (chart p).open_target + (singleton_subset_iff.mpr ((chart p).map_source hp)) hlocal + let U := (chart p).source ∩ (chart p) ⁻¹' W + refine ⟨U,F,(chart p).isOpen_inter_preimage hW,⟨hp,hpW (mem_singleton _)⟩, + inter_subset_left,hF,?_⟩ + intro x hx + change f x = F (chart p x) + rw [hFF hx.2] + change f x = f ((chart p).symm (chart p x)) + rw [(chart p).left_inv hx.1] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceTimeBlend.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceTimeBlend.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c56623030882768ee9a2315142d16294258354b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/SurfaceTimeBlend.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TimeCoordinateBlend +import OAI.Geometry.SurfaceImmersion.Whitney.ArcTimeChartPartition + +namespace OAI + +/-! The actual blend of surface time charts is regular at every common +axis point where their transverse transition is positive. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} + +def surfaceTimeBlend (c d : SurfaceTimeChart F) (χ : ℝ → ℝ) (x : M) : Base := + (1-χ (F x)) • c.coord x + χ (F x) • d.coord x + +lemma surfaceTimeBlend_smooth (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} + (hχ : ContDiff ℝ ∞ χ) (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) : + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ (surfaceTimeBlend c d χ) + (c.coord.source ∩ d.coord.source) := by + have hw := hχ.contMDiff.comp hF + exact ((contMDiff_const.sub hw).contMDiffOn.smul (c.smooth.mono inter_subset_left)).add + (hw.contMDiffOn.smul (d.smooth.mono inter_subset_right)) + +theorem surfaceTimeBlend_regular (c d : SurfaceTimeChart F) {χ : ℝ → ℝ} + (hχ : ContDiff ℝ ∞ χ) (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) + (x : M) (hxc : x ∈ c.coord.source) (hxd : x ∈ d.coord.source) + (hagree : d.coord x = c.coord x) + (hpos : 0 < fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord x) ![1,0] 0) + (hw : χ (F x) ∈ Icc (0:ℝ) 1) : + Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) (surfaceTimeBlend c d χ) x) := by + let H := surfaceTimeBlend c d χ + let g : Base → Base := d.coord ∘ c.coord.symm + let η : Base → ℝ := fun z => χ (z 1) + have hci := c.inverse_smooth.contMDiffAt (c.coord.open_target.mem_nhds (c.coord.map_source hxc)) + have hds : ContMDiffAt planeModel 𝓘(ℝ,Base) ∞ d.coord (c.coord.symm (c.coord x)) := + (c.coord.left_inv hxc).symm ▸ d.smooth.contMDiffAt (d.coord.open_source.mem_nhds hxd) + have hgd : DifferentiableAt ℝ g (c.coord x) := (hds.comp (c.coord x) hci).contDiffAt.differentiableAt (by simp) + have hη : ContDiff ℝ ∞ η := hχ.comp (contDiff_apply ℝ ℝ (1:Fin 2)) + have hpoint : g (c.coord x) = c.coord x := by dsimp [g]; rw [c.coord.left_inv hxc,hagree] + have hηweight : η (c.coord x) ∈ Icc (0:ℝ) 1 := by + change χ (c.coord x 1) ∈ _ + rwa [c.time x hxc] + have hB := timeCoordinateBlend_regular hgd (hη.differentiable (by simp) _) + hpoint (time_coordinate_transition c.coord d.coord c.smooth c.inverse_smooth + d.smooth d.inverse_smooth c.time d.time hxc hxd).2.1 hpos hηweight + have heq : H ∘ c.coord.symm =ᶠ[𝓝 (c.coord x)] timeCoordinateBlend g η := by + filter_upwards [c.coord.open_target.mem_nhds (c.coord.map_source hxc)] with z hz + change (1-χ (F (c.coord.symm z))) • c.coord (c.coord.symm z) + + χ (F (c.coord.symm z)) • d.coord (c.coord.symm z) = _ + rw [← c.time _ (c.coord.map_target hz),c.coord.right_inv hz] + rfl + have hHcx : Function.Bijective (fderiv ℝ (H ∘ c.coord.symm) (c.coord x)) := by + rw [heq.fderiv_eq] + exact hB + have hH : ContMDiffAt planeModel 𝓘(ℝ,Base) ∞ H x := + (surfaceTimeBlend_smooth c d hχ hF).contMDiffAt + ((c.coord.open_source.inter d.coord.open_source).mem_nhds ⟨hxc,hxd⟩) + have hHc : ContMDiffAt 𝓘(ℝ,Base) 𝓘(ℝ,Base) ∞ (H ∘ c.coord.symm) (c.coord x) := + ((c.coord.left_inv hxc).symm ▸ hH).comp (c.coord x) hci + have hrestore : H =ᶠ[𝓝 x] (H ∘ c.coord.symm) ∘ c.coord := by + filter_upwards [c.coord.open_source.mem_nhds hxc] with y hy + change H y = H (c.coord.symm (c.coord y)) + rw [c.coord.left_inv hy] + have hcD : c.coord.MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨c.smooth.mdifferentiableOn (by simp),c.inverse_smooth.mdifferentiableOn (by simp)⟩ + change Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) H x) + rw [hrestore.mfderiv_eq,mfderiv_comp x (hHc.mdifferentiableAt (by simp)) + (hcD.mdifferentiableAt hxc),mfderiv_eq_fderiv] + exact hHcx.comp (hcD.mfderiv_bijective hxc) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TangentSlopeLinearization.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TangentSlopeLinearization.lean new file mode 100644 index 0000000000000000000000000000000000000000..bac325e4d70d5335907988dc9825caeb4f56d7f3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TangentSlopeLinearization.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectionSlopeDifferential + +namespace OAI + +/-! Exact linearization of the projective tangent-direction map. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {n : ℕ} + +def directionJetLinearization + (H : Base → Base →L[ℝ] ProjectionTarget n × ℝ) (b : Bool) (z : Base × ℝ) : + Base × ℝ →L[ℝ] ProjectionTarget n × ℝ := + (H z.1).comp ((ContinuousLinearMap.snd ℝ Base ℝ).smulRight (tangentRayVelocity b)) + + ((fderiv ℝ H z.1).comp (ContinuousLinearMap.fst ℝ Base ℝ)).flip (tangentRay b z.2) + +@[simp] lemma directionJetLinearization_apply + (H : Base → Base →L[ℝ] ProjectionTarget n × ℝ) (b : Bool) (z w : Base × ℝ) : + directionJetLinearization H b z w = + w.2 • H z.1 (tangentRayVelocity b) + + fderiv ℝ H z.1 w.1 (tangentRay b z.2) := by + change H z.1 (w.2 • tangentRayVelocity b) + + fderiv ℝ H z.1 w.1 (tangentRay b z.2) = _ + rw [map_smul] + +lemma hasFDerivAt_tangent_direction + {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + (hH : ContDiff ℝ ∞ H) (b : Bool) (z : Base × ℝ) : + HasFDerivAt (fun w : Base × ℝ => H w.1 (tangentRay b w.2)) + (directionJetLinearization H b z) z := by + have h := ((hH.differentiable (by simp) z.1).hasFDerivAt.comp z + hasFDerivAt_fst).clm_apply + ((tangentRay_hasDerivAt b z.2).hasFDerivAt.comp z hasFDerivAt_snd) + exact h + +theorem tangentSlope_fderiv + {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + (hH : ContDiff ℝ ∞ H) (a : ProjectionTarget n) (b : Bool) (z : Base × ℝ) + (hz : z ∈ tangentSlopeDomain H b) (ha : tangentSlope H b z = a) : + fderiv ℝ (tangentSlope H b) z = + (H z.1 (tangentRay b z.2)).2⁻¹ • + (graphProjection a).comp (directionJetLinearization H b z) := by + have he : (H z.1 (tangentRay b z.2)).1 = + (H z.1 (tangentRay b z.2)).2 • a := by + rw [← ha] + change (H z.1 (tangentRay b z.2)).1 = + (H z.1 (tangentRay b z.2)).2 • + ((H z.1 (tangentRay b z.2)).2⁻¹ • (H z.1 (tangentRay b z.2)).1) + rw [smul_smul,mul_inv_cancel₀ hz,one_smul] + exact (hasFDerivAt_graph_slope (hasFDerivAt_tangent_direction hH b z) a hz he).fderiv + +theorem regular_tangentSlope_linearization_bijective + {H : Base → Base →L[ℝ] ProjectionTarget 3 × ℝ} + (hH : ContDiff ℝ ∞ H) (a : ProjectionTarget 3) (b : Bool) (z : Base × ℝ) + (hz : z ∈ tangentSlopeDomain H b) (ha : tangentSlope H b z = a) + (hreg : Function.Surjective (fderiv ℝ (tangentSlope H b) z)) : + Function.Bijective ((graphProjection a).comp (directionJetLinearization H b z)) := by + have hs : Function.Surjective ((graphProjection a).comp (directionJetLinearization H b z)) := by + intro y + obtain ⟨w,hw⟩ := hreg ((H z.1 (tangentRay b z.2)).2⁻¹ • y) + rw [tangentSlope_fderiv hH a b z hz ha] at hw + refine ⟨w,?_⟩ + exact (smul_right_injective _ (inv_ne_zero hz)) hw + exact ⟨(LinearMap.injective_iff_surjective_of_finrank_eq_finrank (by simp)).mpr hs,hs⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TaylorTargetTranslation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TaylorTargetTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d3164552cbf0c65a63b7df3a87e6e979804c96e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TaylorTargetTranslation.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CenteredTaylorJets + +namespace OAI + +/-! Target translations preserve the prepared Taylor polynomial and its +crosscap direction map. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma surfaceTaylorTwo_add_const (f : Base → ProjectionTarget 3) (c : ProjectionTarget 3) : + surfaceTaylorTwo (fun x => f x+c) = fun x => surfaceTaylorTwo f x+c := by + have hd : fderiv ℝ (fun x => f x+c) = fderiv ℝ f := funext fun x => fderiv_add_const c + funext x + simp only [surfaceTaylorTwo,hd] + abel + +lemma centeredSurfaceTaylor_add_const (f : Base → ProjectionTarget 3) (a : Base) + (c : ProjectionTarget 3) : + centeredSurfaceTaylor (fun x => f x+c) a = fun x => centeredSurfaceTaylor f a x+c := by + have ht : translatedSurface (fun x => f x+c) a = fun x => translatedSurface f a x+c := rfl + funext x + simp only [centeredSurfaceTaylor,ht,surfaceTaylorTwo_add_const] + +lemma surfaceDirection_add_const (f : Base → ProjectionTarget 3) (b : Bool) + (c : ProjectionTarget 3) : surfaceDirection (fun x => f x+c) b = surfaceDirection f b := by + funext z + simp only [surfaceDirection,fderiv_add_const] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorBundleInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorBundleInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b44f73b766c6bf663005653320edb6eb8135dc6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorBundleInverse.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothing +import Mathlib.Geometry.Manifold.VectorBundle.Hom + +namespace OAI + +/-! Smooth pointwise inversion for the actual tensor bundle. This is the +local analytic operation used to correct a finite perturbed primitive sum. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +local instance inverseTensorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inverseTensorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance inverseTensorFiberComplete : CompleteSpace TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance inverseTensorDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inverseTensorDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inverseTensorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inverseTensorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +private def tensorEndomorphismCoordinates + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (p x : M) : + TensorFiber →L[ℝ] TensorFiber := + ContinuousLinearMap.inCoordinates TensorFiber (CovariantTwoTensor (M := M)) + TensorFiber (CovariantTwoTensor (M := M)) p x p x (A x) + +private lemma tensorEndomorphismCoordinates_smoothAt + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (p : M) + (hA : ContMDiffAt planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun x => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) x (A x)) p) : + ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber) ∞ + (tensorEndomorphismCoordinates A p) p := + (contMDiffAt_hom_bundle + (fun x => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) x (A x))).mp hA |>.2 + +private lemma tensorEndomorphismCoordinates_invertible + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (p : M) + (hinv : (A p).IsInvertible) : (tensorEndomorphismCoordinates A p p).IsInvertible := by + unfold tensorEndomorphismCoordinates + rw [ContinuousLinearMap.inCoordinates_eq (FiberBundle.mem_baseSet_trivializationAt' p) + (FiberBundle.mem_baseSet_trivializationAt' p)] + exact ContinuousLinearMap.isInvertible_equiv.comp + (hinv.comp ContinuousLinearMap.isInvertible_equiv) + +private lemma tensorEndomorphismCoordinates_inverse + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (p : M) : + (fun x => (tensorEndomorphismCoordinates A p x).inverse) =ᶠ[𝓝 p] + tensorEndomorphismCoordinates (fun x => (A x).inverse) p := by + filter_upwards [(trivializationAt TensorFiber (CovariantTwoTensor (M := M)) p).open_baseSet.mem_nhds + (FiberBundle.mem_baseSet_trivializationAt' p)] with x hx + unfold tensorEndomorphismCoordinates + rw [ContinuousLinearMap.inCoordinates_eq hx hx,ContinuousLinearMap.inCoordinates_eq hx hx] + simp only [ContinuousLinearMap.inverse_equiv_comp,ContinuousLinearMap.inverse_comp_equiv, + ContinuousLinearEquiv.symm_symm] + rfl + +private lemma tensorEndomorphismCoordinates_inverse_smoothAt + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (p : M) + (hA : ContMDiffAt planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun x => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) x (A x)) p) + (hinv : (A p).IsInvertible) : + ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber) ∞ + (tensorEndomorphismCoordinates (fun x => (A x).inverse) p) p := by + have hc := tensorEndomorphismCoordinates_smoothAt A p hA + have hi := tensorEndomorphismCoordinates_invertible A p hinv + exact (hi.contDiffAt_map_inverse.contMDiffAt.comp p hc).congr_of_eventuallyEq + (tensorEndomorphismCoordinates_inverse A p).symm + +/-- A smooth invertible field of tensor endomorphisms sends a smooth target +section to a smooth inverse section. No global trivialization is chosen. -/ +theorem tensorBundle_inverse_apply_smooth + (A : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) + (hA : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun p => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) p (A p))) + (hinv : ∀ p, (A p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p ((A p).inverse (u p))) := by + intro p + have hc := tensorEndomorphismCoordinates_inverse_smoothAt A p (hA p) (hinv p) + exact ContMDiffAt.clm_apply_of_inCoordinates (b₁ := id) (b₂ := id) + (ϕ := fun x => (A x).inverse) (v := u) hc (hu p) contMDiffAt_id + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorDecodedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorDecodedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c33f7662cdc8d635af76a7ad58887795cb5e6f6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorDecodedBounds.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanIteration + +namespace OAI + +/-! Uniform chart-reading estimates for the redundant coordinates used by +finite mean substitution, including the radius of every local trial ball. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance decodedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance decodedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance decodedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance decodedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance decodedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance decodedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorPlaneRead_decode_sub (i : A.centers) (f g : Base → A.centers → TensorFiber) : + A.tensorPlaneRead i (A.tensorDecode (f-g)) = + A.tensorPlaneRead i (A.tensorDecode f) - A.tensorPlaneRead i (A.tensorDecode g) := by + rw [A.tensorDecode_sub, A.tensorPlaneRead_sub] + +theorem tensorPlaneRead_decode_bound (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (i : A.centers) (f : Base → A.centers → TensorFiber) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → WeightedBound univ s m C f → + WeightedBound univ s m (D*C) (A.tensorPlaneRead i (A.tensorDecode f)) := by + classical + obtain ⟨E,hE,he⟩ := A.tensorDecode_bound m + choose D hD hd using fun i : A.centers => A.tensorPlaneRead_bound i m + let B : ℝ := (∑ i : A.centers, D i) * E + refine ⟨max 1 B, le_max_left _ _, ?_⟩ + intro i f s C hs hs1 hC hf hb + have hh := hd i (A.tensorDecode f) s (E*C) hs hs1 (mul_nonneg hE hC) + (A.tensorDecode_smooth hf) (he f s C hs hs1 hC hf hb) + apply hh.mono_const + have hi : D i ≤ ∑ j : A.centers, D j := + Finset.single_le_sum (fun j _ => hD j) (Finset.mem_univ i) + calc + D i * (E*C) = (D i * E)*C := by ring + _ ≤ B*C := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hi hE) hC + _ ≤ _ := mul_le_mul_of_nonneg_right (le_max_right _ _) hC + +theorem tensorPlaneRead_decode_ball : ∃ D : ℝ, 1 ≤ D ∧ + ∀ (reference : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x)) → + ∀ (f : Base → A.centers → TensorFiber) (r : ℝ), 0 ≤ r → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorEncode reference) r f → ∀ i : A.centers, + InTrialBall univ (A.tensorPlaneRead i reference) (D*r) (A.tensorPlaneRead i (A.tensorDecode f)) := by + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRead_decode_bound 0 + refine ⟨D+1,by linarith,?_⟩ + intro reference href f r hr hf hb i x _ + have hdiff : ContDiff ℝ ∞ (f-A.tensorEncode reference) := hf.sub (A.tensorEncode_smooth href) + have hbound : WeightedBound univ 1 0 r (f-A.tensorEncode reference) := by + intro j hj y hy + have hj0 : j = 0 := Nat.eq_zero_of_le_zero hj + subst j + simpa only [pow_zero, one_mul, norm_iteratedFDerivWithin_zero, Pi.sub_apply] using (hb y hy).le + have hh := (hd i (f-A.tensorEncode reference) 1 r zero_lt_one le_rfl hr hdiff hbound).norm_le + (mem_univ x) + rw [A.tensorPlaneRead_decode_sub, A.tensorDecode_encode] at hh + have hrpos : 0 < r := (norm_nonneg (f 0 - A.tensorEncode reference 0)).trans_lt (hb 0 (mem_univ 0)) + exact hh.trans_lt (by nlinarith) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorExpressionLinearMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorExpressionLinearMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..066011c5a829c488516727912870dba016af73dc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorExpressionLinearMap.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback + +namespace OAI + +/-! Fixed smooth changes of tensor trivialization act on finite jet +polynomials by finite linear combinations with positional coefficients. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial + +def tensorLinearCoefficient (L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor) + (k l : Fin 3) : LowJet × ℝ → ℝ := + fun z => L (lowPosition z.1) (Pi.single l 1) k + +lemma tensorLinearCoefficient_smooth + {L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor} + (hL : ContDiff ℝ ∞ L) (k l : Fin 3) : + ContDiff ℝ ∞ (tensorLinearCoefficient L k l) := by + have hs : ContDiff ℝ ∞ (fun x => L x (Pi.single l 1) k) := + contDiff_pi.mp (hL.clm_apply contDiff_const) k + exact hs.comp (lowPosition.contDiff.comp contDiff_fst) + +namespace TensorExpression + +def mapLinear (L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor) + (E : TensorExpression) : TensorExpression := fun k => + Expression.sumFinset Finset.univ (fun l : Fin 3 => + (Expression.coeff (tensorLinearCoefficient L k l)).mul (E l)) + +lemma mapLinear_smooth {L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor} + (hL : ContDiff ℝ ∞ L) {E : TensorExpression} + (hE : ∀ k, (E k).SmoothCoeffs univ) (k : Fin 3) : + (mapLinear L E k).SmoothCoeffs univ := by + apply Expression.smoothCoeffs_sumFinset + intro l _ + exact Expression.smoothCoeffs_mul (tensorLinearCoefficient_smooth hL k l).contDiffOn (hE l) + +lemma mapLinear_eval (L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor) + (E : TensorExpression) (G : Base → Space) (x : Base) (t : ℝ) : + eval (mapLinear L E) G (x,t) = L x (eval E G (x,t)) := by + have hb : (∑ l : Fin 3, (eval E G (x,t)) l • Pi.single l (1 : ℝ)) = eval E G (x,t) := by + ext k + simp [Pi.single_apply] + rw [← hb,map_sum] + funext k + change (Expression.sumFinset Finset.univ (fun l : Fin 3 => + (Expression.coeff (tensorLinearCoefficient L k l)).mul (E l))).eval G (x,t) = _ + rw [Expression.sumFinset,Expression.eval_sumList, + ← List.sum_toFinset _ Finset.univ.nodup_toList,Finset.toList_toFinset] + simp only [Expression.eval_mul,Expression.eval,tensorLinearCoefficient,lowPosition_lowJet, + map_smul,Finset.sum_apply,Pi.smul_apply,smul_eq_mul] + apply Finset.sum_congr rfl + intro l _ + exact mul_comm _ _ + +end TensorExpression + +namespace Perturbation + +def mapTensorPolynomial {n : ℕ} (L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor) + (P : Fin 3 → Fin n → Expression) : Fin 3 → Fin n → Expression := + fun k r => TensorExpression.mapLinear L (fun l => P l r) k + +lemma mapTensorPolynomial_smooth {n : ℕ} + {L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor} (hL : ContDiff ℝ ∞ L) + {P : Fin 3 → Fin n → Expression} (hP : ∀ k r, (P k r).SmoothCoeffs univ) + (k : Fin 3) (r : Fin n) : (mapTensorPolynomial L P k r).SmoothCoeffs univ := + TensorExpression.mapLinear_smooth hL (fun l => hP l r) k + +lemma mapTensorPolynomial_eval {n : ℕ} + (L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor) (P : Fin 3 → Fin n → Expression) + (ε : ℝ) (G : Base → Space) (t : ℝ) (x : Base) : + coordinatePolynomialValue (mapTensorPolynomial L P) ε G t (planeCoordinateIsometry x) = + L x (coordinatePolynomialValue P ε G t (planeCoordinateIsometry x)) := by + rw [coordinatePolynomialValue_eq_tensor_sum,coordinatePolynomialValue_eq_tensor_sum,map_sum] + apply Finset.sum_congr rfl + intro r _ + rw [map_smul] + congr 1 + exact TensorExpression.mapLinear_eval L (fun l => P l r) G x t + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ca17cef7ea0168126a391ed76571914499143e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameAlgebra.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorOperatorFrame +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorConjugation +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothingSymmetry + +namespace OAI + +/-! Coordinate conjugation of the actual primitive operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance frameAlgebraFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance frameAlgebraFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance frameAlgebraDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance frameAlgebraDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance frameAlgebraSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance frameAlgebraSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +local instance frameAlgebraSectionGroup (p : M) : AddCommGroup (CovariantTwoTensor p) := + (frameAlgebraSectionNormed p).toAddCommGroup +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +lemma tensor_frame_symmetrizer (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) + (H : TensorFiber) : + (B.tensorTriv i).continuousLinearMapAt ℝ p (tensorSymmetrizer H) = + tensorSymmetrizer ((B.tensorTriv i).continuousLinearMapAt ℝ p H) := by + change B.bundleComponent B.tensorTriv i (fun _ => (show TensorFiber from tensorSymmetrizer H)) p = + tensorSymmetrizer (B.bundleComponent B.tensorTriv i (fun _ => (show TensorFiber from H)) p) + ext v w + erw [B.tensorComponent_apply i _ hp,tensorSymmetrizer_apply,tensorSymmetrizer_apply, + B.tensorComponent_apply i _ hp,B.tensorComponent_apply i _ hp] + rfl + +lemma tensor_inverse_frame_symmetrizer (i : B.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) (H : TensorFiber) : + tensorSymmetrizer ((B.tensorTriv i).symmL ℝ p H) = + (B.tensorTriv i).symmL ℝ p (tensorSymmetrizer H) := by + have hd := B.tensorTriv_domain i hp + have h := B.tensor_frame_symmetrizer i hp ((B.tensorTriv i).symmL ℝ p H) + erw [(B.tensorTriv i).continuousLinearMapAt_symmL hd] at h + have hh := congrArg ((B.tensorTriv i).symmL ℝ p) h + erw [(B.tensorTriv i).symmL_continuousLinearMapAt hd] at hh + exact hh + +def covectorFrame (i : B.centers) (p : M) (v : Plane →L[ℝ] ℝ) : Plane →L[ℝ] ℝ := + v.comp ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p) + +def coefficientFrame (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) (p : M) : TensorFiber →L[ℝ] ℝ := + (B.primitiveCoefficientField P a p).comp ((B.tensorTriv i).symmL ℝ p) + +lemma tensor_frame_square (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) + (v : Plane →L[ℝ] ℝ) : + (B.tensorTriv i).continuousLinearMapAt ℝ p (v.smulRight v) = + (B.covectorFrame i p v).smulRight (B.covectorFrame i p v) := by + ext x y + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet,chart_source] using hp + have h := B.tensorComponent_apply i (fun _ => v.smulRight v) hp x y + change (B.tensorTriv i).continuousLinearMapAt ℝ p (v.smulRight v) x y = _ at h + change (B.tensorTriv i).continuousLinearMapAt ℝ p (v.smulRight v) x y = + v ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p x) * + v ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p y) + erw [(trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL_apply (R := ℝ) ht, + (trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL_apply (R := ℝ) ht] + exact h + +lemma primitiveFullOperator_frame + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) : + B.tensorOperatorFrame i p (B.primitiveFullOperator P psi phi p) = + completedPrimitiveOperator (fun a => B.coefficientFrame P i a p) + (fun a => psi a p) (fun a => B.covectorFrame i p (B.primitivePhaseCovector phi a p)) := by + let e : TensorFiber →L[ℝ] TensorFiber := (B.tensorTriv i).continuousLinearMapAt ℝ p + let f : TensorFiber →L[ℝ] TensorFiber := (B.tensorTriv i).symmL ℝ p + have hef (H : TensorFiber) : e (f H) = H := + (B.tensorTriv i).continuousLinearMapAt_symmL (B.tensorTriv_domain i hp) H + have hf (H : TensorFiber) : tensorSymmetrizer (f H) = f (tensorSymmetrizer H) := + B.tensor_inverse_frame_symmetrizer i hp H + have hv (a : B.centers × Fin 3) : + e ((B.primitivePhaseCovector phi a p).smulRight (B.primitivePhaseCovector phi a p)) = + (B.covectorFrame i p (B.primitivePhaseCovector phi a p)).smulRight + (B.covectorFrame i p (B.primitivePhaseCovector phi a p)) := + B.tensor_frame_square i hp _ + exact completedPrimitiveOperator_conjugate e f + (fun a => B.primitiveCoefficientField P a p) (fun a => psi a p) + (fun a => B.primitivePhaseCovector phi a p) _ hef hf hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ca210f992f77692ea7cee6d67b6985acf19a764 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorFrameReadBounds.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceMetricStability +import OAI.Geometry.SurfaceImmersion.Geometry.SupportJetEquality + +namespace OAI + +/-! Ordinary first-jet bounds for symmetric tensor components on the fixed +primitive chart supports, including their boundaries. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance tensorReadBoundsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance tensorReadBoundsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance tensorReadBoundsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance tensorReadBoundsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance tensorReadBoundsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance tensorReadBoundsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def tensorFrameRead (i : B.centers) (u : ∀ p : M, CovariantTwoTensor p) + (y : JetPolynomial.Base) : TensorFiber := + (B.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm y) + (u ((chart (i : M)).symm y)) + +omit [CompactSpace M] in +lemma tensorFrameRead_smoothOn (i : B.centers) (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) : + ContDiffOn ℝ ∞ (B.tensorFrameRead i u) (chart (i : M)).target := by + have h := (B.bundleComponent_smooth_on B.tensorTriv B.tensorTriv_domain i hu).comp + (chart_symm_smooth (i : M)) (fun _ hx => (chart (i : M)).map_target hx) + exact h.contDiffOn + +lemma tensorFrameRead_jets (i : B.centers) (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hsym : ∀ p v w, u p v w = u p w v) (m : ℕ) + {y : JetPolynomial.Base} (hy : y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base)) : + iteratedFDeriv ℝ m (fiberFromThree ∘ B.tensorChartRead i u) y = + iteratedFDeriv ℝ m (B.tensorFrameRead i u) y := by + have hK : tsupport (B.chartWeight i) ⊆ (chart (i : M)).target := by + rw [B.chartWeight_tsupport] + rintro _ ⟨p,hp,rfl⟩ + exact (chart (i : M)).map_source (B.weight_support i hp) + apply iteratedFDeriv_eq_on_tsupport (B.chartWeight_smooth i).continuous + (chart (i : M)).open_target hK + (fiberFromThree.contDiff.comp (B.tensorChartRead_smooth i hu)).contDiffOn + (B.tensorFrameRead_smoothOn i u hu) ?_ m + · rwa [B.chartWeight_tsupport] + · intro y hy + rw [B.chartWeight_tsupport] at hy + obtain ⟨p,hp,rfl⟩ := hy + change fiberFromThree (B.tensorChartRead i u (chart (i : M) p)) = + (B.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm (chart (i : M) p)) + (u ((chart (i : M)).symm (chart (i : M) p))) + rw [(chart (i : M)).left_inv (B.weight_support i hp)] + exact (B.tensor_frame_read i u hsym hp).symm + +theorem tensorFrameRead_C1_bound {D : ℝ} (hD : 0 ≤ D) : + ∃ E : ℝ, 1 ≤ E ∧ ∀ u : ∀ p : M, CovariantTwoTensor p, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + (∀ p v w, u p v w = u p w v) → B.TensorWeightedBound 1 1 D u → + ∀ i p, p ∈ tsupport (B.weight i) → + ‖B.tensorFrameRead i u (chart (i : M) p)‖ ≤ E ∧ + ‖fderiv ℝ (B.tensorFrameRead i u) (chart (i : M) p)‖ ≤ E := by + classical + choose R hR hread using fun i : B.centers => B.tensorChartRead_bound i 1 + let E := 1+‖fiberFromThree‖*(∑ i, R i)*D + have hsum := Finset.sum_nonneg (s := Finset.univ) (fun i _ => hR i) + have hE : 1 ≤ E := by + dsimp only [E] + linarith [mul_nonneg (mul_nonneg (norm_nonneg fiberFromThree) hsum) hD] + refine ⟨E,hE,?_⟩ + intro u hu hsym hb i p hp + have h := hread i u 1 D zero_lt_one le_rfl hD hu hb + have hh := h.linear uniqueDiffOn_univ (by norm_num : (0 : ℝ) ≤ 1) + (B.tensorChartRead_smooth i hu).contDiffOn fiberFromThree + have hi : ‖fiberFromThree‖*(R i*D) ≤ E := by + have hx := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hR j) (Finset.mem_univ i)) hD) (norm_nonneg fiberFromThree) + dsimp only [E] + nlinarith + have hj := congrArg norm (B.tensorFrameRead_jets i u hu hsym 0 ⟨p,hp,rfl⟩) + simp only [norm_iteratedFDeriv_zero] at hj + have hv := (hh.norm_le (mem_univ (chart (i : M) p))).trans hi + refine ⟨hj ▸ hv,?_⟩ + have hd := hh.deriv_le zero_lt_one le_rfl (mem_univ (chart (i : M) p)) + simp only [iteratedFDerivWithin_univ,one_pow,div_one] at hd + rw [B.tensorFrameRead_jets i u hu hsym 1 ⟨p,hp,rfl⟩, + norm_iteratedFDeriv_one] at hd + exact hd.trans hi + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorGlobalAmplitudes.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorGlobalAmplitudes.lean new file mode 100644 index 0000000000000000000000000000000000000000..f182d8c8ed5fad754ca404c3246fcc1173e743c6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorGlobalAmplitudes.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDifferential +import OAI.Geometry.Immersion.ClosedSurface.TangentDecomposition + +namespace OAI + +/-! The global cutoff amplitudes give the actual rank-one phase differentials +needed for the quadratic oscillatory construction. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry + +local instance globalAmplitudeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalAmplitudeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance globalAmplitudeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalAmplitudeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalAmplitudeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalAmplitudeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem global_tensor_amplitude_decomposition (P : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (u : ∀ x : M, CovariantTwoTensor x) + (hu : ∀ p v v', u p v v' = u p v' v) (hw : ∀ i j, w i j ≠ 0) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (p : M) (v v' : TangentSpace planeModel p) : + (∑ i : A.centers, ∑ j : Fin 3, + (A.rootPhaseAmplitude i ((P i).Q j) (w i j) u p)^2 * + scalarDifferential (atlasPhase (i : M) (w i j • (P i).ξ j)) p v * + scalarDifferential (atlasPhase (i : M) (w i j • (P i).ξ j)) p v') = u p v v' := by + have hh := congrArg (fun B : CovariantTwoTensor p => B v v') + (A.global_rootPhase_decomposition P w u hu hw hpos p) + calc + _ = ∑ i : A.centers, ∑ j : Fin 3, + ((A.rootPhaseAmplitude i ((P i).Q j) (w i j) u p)^2 * (w i j)^2) * + A.bundleRestore A.tensorTriv i + (fun _ => fiberFromThree (covectorSquare ((P i).ξ j))) p v v' := by + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + by_cases hz : A.rootPhaseAmplitude i ((P i).Q j) (w i j) u p = 0 + · simp only [hz, zero_pow (by decide : 2 ≠ 0), zero_mul] + · have hweight : A.weight i p ≠ 0 := by + intro he + apply hz + simp only [rootPhaseAmplitude, he, zero_mul] + have hsupport := subset_tsupport (A.weight i) hweight + have hp := A.weight_support i hsupport + have hp' : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source, chart_source] using hp + rw [A.tensorRestore_covectorSquare i _ hp, A.outer_one i p hsupport] + have hscaled (z : TangentSpace planeModel p) : + scalarDifferential (atlasPhase (i : M) (w i j • (P i).ξ j)) p z = + w i j * (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (i : M) ((P i).ξ j)) p z) := by + let D : TangentSpace planeModel p →L[ℝ] SmallModes.Base := + mfderiv planeModel 𝓘(ℝ, SmallModes.Base) (coordinateChart (i : M)) p + unfold scalarDifferential + rw [mfderiv_atlasPhase _ _ hp', mfderiv_atlasPhase _ _ hp'] + change phaseLinear (w i j • (P i).ξ j) + (D z) = + w i j * phaseLinear ((P i).ξ j) + (D z) + simp only [phaseLinear_apply, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] + ring + rw [hscaled v, hscaled v'] + ring + _ = _ := by + simpa only [sum_apply, smul_apply, smul_eq_mul] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorOperatorFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorOperatorFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..3140e2bfca5f37a49ba6db1ac21dec19046657a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorOperatorFrame.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveOperator + +namespace OAI + +/-! Actual tensor operators and their inverses in a fixed primitive frame. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance operatorFrameFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance operatorFrameFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance operatorFrameDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance operatorFrameDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance operatorFrameSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance operatorFrameSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def tensorOperatorFrame (i : B.centers) (p : M) + (T : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) : TensorFiber →L[ℝ] TensorFiber := + ((B.tensorTriv i).continuousLinearMapAt ℝ p).comp (T.comp ((B.tensorTriv i).symmL ℝ p)) + +lemma tensorOperatorFrame_invertible_iff (i : B.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) + (T : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) : + (B.tensorOperatorFrame i p T).IsInvertible ↔ T.IsInvertible := by + let e := (B.tensorTriv i).continuousLinearEquivAt ℝ p (B.tensorTriv_domain i hp) + have he : B.tensorOperatorFrame i p T = + (e : CovariantTwoTensor p →L[ℝ] TensorFiber).comp + (T.comp (e.symm : TensorFiber →L[ℝ] CovariantTwoTensor p)) := by + simp only [e,Trivialization.coe_continuousLinearEquivAt_eq',Trivialization.symm_continuousLinearEquivAt_eq'] + rfl + rw [he,ContinuousLinearMap.isInvertible_equiv_comp,ContinuousLinearMap.isInvertible_comp_equiv] + +lemma tensorOperatorFrame_inverse_apply (i : B.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) + (T : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (H : CovariantTwoTensor p) : + (B.tensorOperatorFrame i p T).inverse ((B.tensorTriv i).continuousLinearMapAt ℝ p H) = + (B.tensorTriv i).continuousLinearMapAt ℝ p (T.inverse H) := by + let e := (B.tensorTriv i).continuousLinearEquivAt ℝ p (B.tensorTriv_domain i hp) + have he : B.tensorOperatorFrame i p T = + (e : CovariantTwoTensor p →L[ℝ] TensorFiber).comp + (T.comp (e.symm : TensorFiber →L[ℝ] CovariantTwoTensor p)) := by + simp only [e,Trivialization.coe_continuousLinearEquivAt_eq',Trivialization.symm_continuousLinearEquivAt_eq'] + rfl + have hec : (e : CovariantTwoTensor p →L[ℝ] TensorFiber) = + (B.tensorTriv i).continuousLinearMapAt ℝ p := + Trivialization.coe_continuousLinearEquivAt_eq' _ _ + rw [he, ← hec] + change ((e : CovariantTwoTensor p →L[ℝ] TensorFiber).comp + (T.comp (e.symm : TensorFiber →L[ℝ] CovariantTwoTensor p))).inverse (e H) = e (T.inverse H) + simp only [ContinuousLinearMap.inverse_equiv_comp,ContinuousLinearMap.inverse_comp_equiv, + ContinuousLinearEquiv.symm_symm,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.symm_apply_apply] + +lemma primitiveCoefficient_inverse_in_frame + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) + (T : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (H : CovariantTwoTensor p) (j : Fin 3) : + B.primitiveCoefficientField P (i,j) p (T.inverse H) = + (P i (chart (i : M) p)).Q j (fiberToThree + ((B.tensorOperatorFrame i p T).inverse ((B.tensorTriv i).continuousLinearMapAt ℝ p H))) := by + rw [B.tensorOperatorFrame_inverse_apply i hp T H] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPerturbationOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPerturbationOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..349a0aa138e8800361806373b802b025c6108522 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPerturbationOperator.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationOperator + +namespace OAI + +/-! Tensor-valued polynomial perturbations inherit one fixed derivative +budget and one fixed short-scale exponent from their three components. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +def tensorOrder (P : Fin 3 → Fin n → Expression) : ℕ := Finset.univ.sup (fun i => order (P i)) +def tensorLoss (P : Fin 3 → Fin n → Expression) : ℕ := Finset.univ.sup (fun i => loss (P i)) + +def tensorConjugatedLM (hO : IsOpen O) (hU : IsOpen U) (P : Fin 3 → Fin n → Expression) + (hP : ∀ i l, (P i l).SmoothCoeffs O) (hG : ContDiff ℝ ∞ G) + (hQ : Set.MapsTo (lowJet G) U O) (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (τ ε t : ℝ) : + SupportedField (F := Fin 4 → ℂ) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K := + tupleSupportedLM K (fun i => conjugatedLM hO hU (P i) (hP i) hG hQ K hKU hφ τ ε t) + +theorem tensorConjugatedLM_bound {Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQcompact : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ i l, (P i l).SmoothCoeffs O) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (m : ℕ) (B R : ℝ) (hB : 1 ≤ B) (hR : 0 ≤ R) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hGQ : Set.MapsTo (lowJet G) U Q) (s : ℝ≥0) (τ ε : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + WeightedBound U s (m + tensorOrder P) B (lowJet G) → + (∀ v, WeightedBound U s (m + tensorOrder P) R + (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ H : SupportedField (F := Fin 4 → ℂ) K, + supportedWeightedSeminorm K s m + (tensorConjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H) ≤ + D * ε / τ ^ tensorLoss P * supportedWeightedSeminorm K s (m + tensorOrder P) H := by + classical + have hex := fun i => conjugatedLM_bound hU hO hQcompact hQO (P i) (hP i) K hKU m B R hB hR + choose D hD hd using hex + refine ⟨∑ i, D i, Finset.sum_nonneg (fun i _ => hD i), ?_⟩ + intro G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb t ht H + have hiOrder (i : Fin 3) : order (P i) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ i) + have hiLoss (i : Fin 3) : loss (P i) ≤ tensorLoss P := + Finset.le_sup (f := fun j => loss (P j)) (Finset.mem_univ i) + calc + _ ≤ ∑ i, supportedWeightedSeminorm K s m + (conjugatedLM hO hU (P i) (hP i) hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H) := + tupleSupportedLM_bound K _ hs m H + _ ≤ ∑ i, D i * ε / τ ^ tensorLoss P * supportedWeightedSeminorm K s (m + tensorOrder P) H := by + apply Finset.sum_le_sum + intro i _ + have hv := hd i G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 + (hGb.mono_order (Nat.add_le_add_left (hiOrder i) m)) + (fun v => (hφb v).mono_order (Nat.add_le_add_left (hiOrder i) m)) t ht H + apply hv.trans + apply mul_le_mul + · exact div_le_div_of_nonneg_left (mul_nonneg (hD i) hε) (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le (hτs.trans hs1) (hiLoss i)) + · exact supportedWeightedSeminorm_mono s (Nat.add_le_add_left (hiOrder i) m) H + · exact apply_nonneg _ _ + · exact div_nonneg (mul_nonneg (hD i) hε) (pow_nonneg hτ.le _) + _ = _ := by rw [← Finset.sum_mul, ← Finset.sum_div, ← Finset.sum_mul] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPlaneReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPlaneReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f41e9fc84dd7ed624b60c9acd607db4e3e486da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPlaneReconstruction.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates + +namespace OAI + +/-! Exact reconstruction from the three independent tensor coordinates. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean +open JetPolynomial (Base planeCoordinateIsometry) + +local instance reconstructionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance reconstructionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance reconstructionDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance reconstructionDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance reconstructionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance reconstructionSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorPlaneEncode (u : ∀ x : M, CovariantTwoTensor x) (i : A.centers) : SmallModes.Base → Tensor := + fun y => fiberToThree (A.tensorEncode u (planeCoordinateIsometry.symm y) i) + +lemma tensorPlaneRestore_encode (u : ∀ x : M, CovariantTwoTensor x) + (hu : ∀ p v w, u p v w = u p w v) : A.tensorPlaneRestore (A.tensorPlaneEncode u) = u := by + have he : (fun x i => fiberFromThree (A.tensorPlaneEncode u i (planeCoordinateIsometry x))) = + A.tensorEncode u := by + funext x i + simp only [tensorPlaneEncode, LinearIsometryEquiv.symm_apply_apply] + exact fiberFromThree_toThree _ (A.tensorEncode_symmetric hu x i) + change A.tensorDecode (fun x i => fiberFromThree (A.tensorPlaneEncode u i (planeCoordinateIsometry x))) = u + rw [he, A.tensorDecode_encode] + +lemma tensorPlaneRestore_add (f g : A.centers → SmallModes.Base → Tensor) : + A.tensorPlaneRestore (f+g) = A.tensorPlaneRestore f + A.tensorPlaneRestore g := by + funext p + simp only [tensorPlaneRestore, Pi.add_apply, map_add, bundleRestore, smul_add, + Finset.sum_add_distrib] + +lemma tensorPlaneRestore_smul (a : ℝ) (f : A.centers → SmallModes.Base → Tensor) : + A.tensorPlaneRestore (a • f) = a • A.tensorPlaneRestore f := by + funext p + simp only [tensorPlaneRestore, Pi.smul_apply, map_smul, bundleRestore, smul_smul, Finset.smul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [mul_comm] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPullbackNorm.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPullbackNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbf6dc9b791ad88507bc021235d1d8a4df834176 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorPullbackNorm.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! A numerical operator norm bound for covariant two-tensor pullback. -/ +noncomputable section +namespace ClosedSurfaceR4.PhaseMean +open SmallModes + +lemma norm_evaluate_le (A : Tensor) (v w : Base) : + ‖evaluate A v w‖ ≤ 4*‖A‖*‖v‖*‖w‖ := by + have hA (i : Fin 3) : ‖A i‖ ≤ ‖A‖ := norm_le_pi_norm A i + have hv1 := norm_fst_le v + have hv2 := norm_snd_le v + have hw1 := norm_fst_le w + have hw2 := norm_snd_le w + have hmid : ‖v.1*w.2+v.2*w.1‖ ≤ ‖v‖*‖w‖+‖v‖*‖w‖ := by + calc + _ ≤ ‖v.1*w.2‖+‖v.2*w.1‖ := norm_add_le _ _ + _ ≤ _ := by simp only [norm_mul]; gcongr + have h0 : ‖A 0*v.1*w.1‖ ≤ ‖A‖*‖v‖*‖w‖ := by + simp only [norm_mul] + gcongr + exact hA 0 + have h1 : ‖A 1*(v.1*w.2+v.2*w.1)‖ ≤ ‖A‖*(‖v‖*‖w‖+‖v‖*‖w‖) := by + rw [norm_mul] + exact mul_le_mul (hA 1) hmid (norm_nonneg _) (norm_nonneg _) + have h2 : ‖A 2*v.2*w.2‖ ≤ ‖A‖*‖v‖*‖w‖ := by + simp only [norm_mul] + gcongr + exact hA 2 + calc + _ ≤ ‖A 0*v.1*w.1‖ + ‖A 1*(v.1*w.2+v.2*w.1)‖ + ‖A 2*v.2*w.2‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ ‖A‖*‖v‖*‖w‖ + ‖A‖*(‖v‖*‖w‖+‖v‖*‖w‖) + ‖A‖*‖v‖*‖w‖ := + add_le_add (add_le_add h0 h1) h2 + _ = _ := by ring + +lemma norm_pullback_le (L : Base →L[ℝ] Base) : ‖pullback L‖ ≤ 4*‖L‖^2 := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro A + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro i + change ‖evaluate A (L (firstDirection i)) (L (secondDirection i))‖ ≤ _ + have hv : ‖L (firstDirection i)‖ ≤ ‖L‖ := + (L.le_opNorm _).trans (by simpa using mul_le_mul_of_nonneg_left (firstDirection_norm i) (norm_nonneg L)) + have hw : ‖L (secondDirection i)‖ ≤ ‖L‖ := + (L.le_opNorm _).trans (by simpa using mul_le_mul_of_nonneg_left (secondDirection_norm i) (norm_nonneg L)) + calc + _ ≤ 4*‖A‖*‖L (firstDirection i)‖*‖L (secondDirection i)‖ := norm_evaluate_le _ _ _ + _ ≤ 4*‖A‖*‖L‖*‖L‖ := by gcongr + _ = _ := by ring + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRealVariationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRealVariationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..a33bcc7221dd3dbb08cd22836ca2c20d7f8f10d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRealVariationBounds.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RealPolynomialQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPerturbationOperator +import OAI.Geometry.SurfaceImmersion.Correction.PerturbationTaylorBounds + +namespace OAI + +/-! Common tensor bounds for the actual mixed quadratic term and cubic +Taylor remainder. The exponent does not depend on the correction depth. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +def tensorQuadraticCross {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G H K : Base → Space) (t : ℝ) : Base → PhaseMean.Tensor := + fun p k => quadraticCross (P k) ε G H K t p + +def tensorTaylorRemainder {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G H : Base → Space) (t : ℝ) : Base → PhaseMean.Tensor := + fun p k => taylorRemainder (P k) ε G H t p + +lemma tensorQuadraticCross_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + {G H K : Base → Space} (hG : ContDiff ℝ ∞ G) + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) (ε t : ℝ) : + ContDiff ℝ ∞ (tensorQuadraticCross P ε G H K t) := by + apply contDiff_pi.mpr + intro k + apply contDiffOn_univ.mp + exact contDiffOn_const.mul + ((realVariation_smooth isOpen_univ (hP k) (pairFamily_smooth hG hH hK) + (fun _ _ => Set.mem_univ _) ε 1 t).add + (realVariation_smooth isOpen_univ (hP k) (pairFamily_smooth hG hK hH) + (fun _ _ => Set.mem_univ _) ε 1 t)) + +lemma tensorTaylorRemainder_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (ε t : ℝ) : + ContDiff ℝ ∞ (tensorTaylorRemainder P ε G H t) := by + apply contDiff_pi.mpr + intro k + change ContDiff ℝ ∞ (fun p => ∑ l, ε ^ (l.val + 1) * (P k l).taylorRemainder G H t p) + exact ContDiff.sum fun l _ => contDiff_const.mul + (expression_taylorRemainder_smooth (hP k l) hG hH t) + +theorem tensorQuadraticCross_bound {n : ℕ} {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G H K : Base → Space) (s ε C D : ℝ), + 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → 0 < D → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → ContDiff ℝ ∞ K → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + tensorOrder P) B (lowJet G) → + WeightedBound U s (m + tensorOrder P) C H → + WeightedBound U s (m + tensorOrder P) D K → ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C * D / s ^ tensorLoss P) + (tensorQuadraticCross P ε G H K t) := by + have hex (k : Fin 3) := quadraticCross_bound hU isOpen_univ hQ (Set.subset_univ Q) + (P k) (hP k) m B hB + choose E hE he using hex + refine ⟨∑ k, E k, Finset.sum_nonneg (fun k _ => hE k), ?_⟩ + intro G H K s ε C D hs hs1 hε hε1 hC hD hG hH hK hGQ hGb hHb hKb t ht + have hsum : 0 ≤ ∑ k, E k := Finset.sum_nonneg (fun k _ => hE k) + apply WeightedBound.pi hU.uniqueDiffOn hs (by positivity) + · exact contDiffOn_pi.mp (tensorQuadraticCross_smooth hP hG hH hK ε t).contDiffOn + · intro k + have hEk := hE k + have ho : order (P k) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ k) + have hl : loss (P k) ≤ tensorLoss P := + Finset.le_sup (f := fun j => loss (P j)) (Finset.mem_univ k) + have hb := he k G H K s ε C D hs hs1 hε hε1 hC hD hG hH hK hGQ + (hGb.mono_order (Nat.add_le_add_left ho m)) + (hHb.mono_order (Nat.add_le_add_left ho m)) (hKb.mono_order (Nat.add_le_add_left ho m)) t ht + apply hb.mono_const + calc + _ ≤ E k * ε * C * D / s ^ tensorLoss P := + div_le_div_of_nonneg_left (by positivity) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 hl) + _ ≤ _ := by + gcongr + exact Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ k) + +theorem tensorTaylorRemainder_bound {n : ℕ} {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G H : Base → Space) (s ε C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → + (∀ t ∈ Set.Icc (0 : ℝ) 1, Set.MapsTo (lowJet (fun p => G p + t • H p)) U Q) → + (∀ t ∈ Set.Icc (0 : ℝ) 1, WeightedBound U s (m + tensorOrder P) B + (lowJet (fun p => G p + t • H p))) → + WeightedBound U s (m + tensorOrder P) C H → ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C ^ 3 / s ^ tensorLoss P) + (tensorTaylorRemainder P ε G H t) := by + have hex (k : Fin 3) := compact_taylorRemainder_bound hU hQ (P k) (hP k) m B hB + choose E hE he using hex + refine ⟨∑ k, E k, Finset.sum_nonneg (fun k _ => hE k), ?_⟩ + intro G H s ε C hs hs1 hε hε1 hC hG hH hGQ hGb hHb t ht + have hsum : 0 ≤ ∑ k, E k := Finset.sum_nonneg (fun k _ => hE k) + apply WeightedBound.pi hU.uniqueDiffOn hs (by positivity) + · exact contDiffOn_pi.mp (tensorTaylorRemainder_smooth hP hG hH ε t).contDiffOn + · intro k + have hEk := hE k + have ho : order (P k) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ k) + have hl : loss (P k) ≤ tensorLoss P := + Finset.le_sup (f := fun j => loss (P j)) (Finset.mem_univ k) + have hb := he k G H s C ε hs hs1 hC hε hε1 hG hH hGQ + (fun t ht => (hGb t ht).mono_order (Nat.add_le_add_left ho m)) + (hHb.mono_order (Nat.add_le_add_left ho m)) t ht + apply hb.mono_const + calc + _ ≤ E k * ε * C ^ 3 / s ^ tensorLoss P := + div_le_div_of_nonneg_left (by positivity) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 hl) + _ ≤ _ := by + gcongr + exact Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ k) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRestoreFinite.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRestoreFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..99967d21771194f1a564ddd6f8559ba77c3cffcc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TensorRestoreFinite.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPlaneReconstruction + +namespace OAI + +/-! Finite-sum linearity of the actual tensor restoration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial + +local instance tensorRestoreFiniteFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance tensorRestoreFiniteFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance tensorRestoreFiniteDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance tensorRestoreFiniteDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance tensorRestoreFiniteSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance tensorRestoreFiniteSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorPlaneRestoreLM : (A.centers → SmallModes.Base → PhaseMean.Tensor) →ₗ[ℝ] + ((p : M) → CovariantTwoTensor p) where + toFun := A.tensorPlaneRestore + map_add' := A.tensorPlaneRestore_add + map_smul' := A.tensorPlaneRestore_smul + +omit [CompactSpace M] in +lemma tensorPlaneRestore_sum {ι : Type*} [Fintype ι] + (f : ι → A.centers → SmallModes.Base → PhaseMean.Tensor) : + A.tensorPlaneRestore (∑ j, f j) = ∑ j, A.tensorPlaneRestore (f j) := + map_sum A.tensorPlaneRestoreLM f Finset.univ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TimeBlendDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TimeBlendDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1a17db4cef6ba9672c20de83f093d1e60199e32 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TimeBlendDomain.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceBlendExterior + +namespace OAI + +/-! An open domain for joining time charts using an exact scalar cutoff. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] {F : M → ℝ} + +def timeBlendDomain (c d : SurfaceTimeChart F) (l r : ℝ) : Set M := + (c.coord.source ∩ F ⁻¹' Iio l) ∪ (c.coord.source ∩ d.coord.source) ∪ + (d.coord.source ∩ F ⁻¹' Ioi r) + +lemma timeBlendDomain_open (c d : SurfaceTimeChart F) (l r : ℝ) + (hF : Continuous F) : IsOpen (timeBlendDomain c d l r) := + ((c.coord.open_source.inter (isOpen_Iio.preimage hF)).union + (c.coord.open_source.inter d.coord.open_source)).union + (d.coord.open_source.inter (isOpen_Ioi.preimage hF)) + +lemma timeBlendDomain_smooth (c d : SurfaceTimeChart F) {l r : ℝ} (hlr : l < r) + (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) : + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ (surfaceTimeBlend c d (timeCutoff l r)) + (timeBlendDomain c d l r) := by + intro x hx + rcases hx with (⟨hc,ht⟩ | ⟨hc,hd⟩) | ⟨hd,ht⟩ + · exact ((c.smooth.contMDiffAt (c.coord.open_source.mem_nhds hc)).congr_of_eventuallyEq + (surfaceTimeBlend_left_germ c d hF.continuous hlr ht)).contMDiffWithinAt + · exact ((surfaceTimeBlend_smooth c d (timeCutoff_smooth l r) hF).contMDiffAt + ((c.coord.open_source.inter d.coord.open_source).mem_nhds ⟨hc,hd⟩)).contMDiffWithinAt + · exact ((d.smooth.contMDiffAt (d.coord.open_source.mem_nhds hd)).congr_of_eventuallyEq + (surfaceTimeBlend_right_germ c d hF.continuous hlr ht)).contMDiffWithinAt + +lemma timeBlendDomain_time (c d : SurfaceTimeChart F) {l r : ℝ} (hlr : l < r) + {x : M} (hx : x ∈ timeBlendDomain c d l r) : + surfaceTimeBlend c d (timeCutoff l r) x 1 = F x := by + rcases hx with (⟨hc,ht⟩ | ⟨hc,hd⟩) | ⟨hd,ht⟩ + · rw [surfaceTimeBlend_zero c d (timeCutoff_zero hlr ht.le)] + exact c.time x hc + · exact surfaceTimeBlend_time c d hc hd + · rw [surfaceTimeBlend_one c d (timeCutoff_one hlr ht.le)] + exact d.time x hd + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCoefficientBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCoefficientBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..af2d01c08782bd399d3b0d0179afeefbbfa668e8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCoefficientBounds.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteFastBounds + +namespace OAI + +/-! Uniform bounds for the first two transverse derivatives of represented +periodic coefficients. Their common loss is fixed before the slow map. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial.VectorExpression +open LocalPeriodicExpansion WeightedEstimates + +def transverse (R : VectorExpression) (second : Bool) : VectorExpression := + if second then (R.slow 1).slow 1 else R.slow 1 + +def transverseFamily {S : TopologicalSpace.Opens Base} (U : Family S R4) (second : Bool) : Family S R4 := + if second then (U.slow (coordinateVector 1)).slow (coordinateVector 1) else U.slow (coordinateVector 1) + +lemma transverse_smooth {O : Set LowJet} (hO : IsOpen O) {R : VectorExpression} + (hR : R.SmoothCoeffs O) (second : Bool) : (R.transverse second).SmoothCoeffs O := by + have h1 : (R.slow 1).SmoothCoeffs O := fun a => Expression.smoothCoeffs_slow hO 1 (hR a) + cases second + · exact h1 + · exact fun a => Expression.smoothCoeffs_slow hO 1 (h1 a) + +lemma transverse_order {R : VectorExpression} {N : ℕ} (hN : 2 ≤ N) + (hR : ∀ a, (R a).order ≤ N) (second : Bool) (a : Fin 4) : + (R.transverse second a).order ≤ N+2 := by + have h1 := order_slow_le hN hR 1 + cases second + · exact (h1 a).trans (by omega) + · exact order_slow_le (by omega) h1 1 a + +lemma represents_transverse {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hGO : MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) (hR : Represents G R U) + (second : Bool) : Represents G (R.transverse second) (transverseFamily U second) := by + have h1 := represents_slow hO hG hGO hRs hR 1 + cases second + · exact h1 + · exact represents_slow hO hG hGO + (fun a => Expression.smoothCoeffs_slow hO 1 (hRs a)) h1 1 + +theorem compact_transverse_coefficients {S : TopologicalSpace.Opens Base} {O Q : Set LowJet} + (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (R : ℕ → VectorExpression) (L N : ℕ) (hN : 2 ≤ N) + (hRs : ∀ i < L, (R i).SmoothCoeffs O) (hRo : ∀ i < L, ∀ a, (R i a).order ≤ N) + (ℓ : Base →L[ℝ] ℝ) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : Base → Space) (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + ContDiff ℝ ∞ G → MapsTo (lowJet G) S Q → + WeightedBound S s (N+2) B (lowJet G) → + ∀ U : ℕ → Family S R4, (∀ i < L, Represents G (R i) (U i)) → + ∀ i < L, ∀ second : Bool, ∀ p ∈ S, + ‖(transverseFamily (U i) second).fastValue ℓ z p‖ ≤ D/s^loss := by + classical + let R' : Bool × Fin L → VectorExpression := fun j => (R j.2).transverse j.1 + let loss := Finset.univ.sup (fun j : Bool × Fin L => Finset.univ.sup (fun a : Fin 4 => (R' j a).loss)) + have hl (j : Bool × Fin L) (a : Fin 4) : (R' j a).loss ≤ loss := + (Finset.le_sup (f := fun a : Fin 4 => (R' j a).loss) (Finset.mem_univ a)).trans + (Finset.le_sup (f := fun j : Bool × Fin L => Finset.univ.sup (fun a : Fin 4 => (R' j a).loss)) + (Finset.mem_univ j)) + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := compact_finite_fast_bound (S := S) hO hQ hQO R' + (fun j => transverse_smooth hO (hRs j.2 j.2.isLt) j.1) (N+2) loss + (fun j a => transverse_order hN (hRo j.2 j.2.isLt) j.1 a) hl ℓ 0 B hB + refine ⟨D,hD,?_⟩ + intro G s z hz hzs hs1 hG hGQ hb U hrep i hi second p hp + have hGO : MapsTo (lowJet G) S O := fun _ hx => hQO (hGQ hx) + have hh := hd G s z hz hzs hs1 hG hGQ (by simpa only [zero_add] using hb) + (fun j : Bool × Fin L => transverseFamily (U j.2) j.1) + (fun j => represents_transverse hO hG hGO (hRs j.2 j.2.isLt) (hrep j.2 j.2.isLt) j.1) + (second,⟨i,hi⟩) + exact hh.norm_le hp + +end ClosedSurfaceR4.JetPolynomial.VectorExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCurveEquation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCurveEquation.lean new file mode 100644 index 0000000000000000000000000000000000000000..a77afab0113ffeb2482e4e531b79f425bfbe9446 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseCurveEquation.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalDefiningFunction + +namespace OAI + +/-! A transverse embedded parametrized curve has a local smooth defining equation. +The construction uses the inverse of its first coordinate. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.TransverseSmallFunction + +lemma embedded_curve_equation {γ : ℝ → Base} (hγ : ContDiff ℝ ∞ γ) + (he : Topology.IsEmbedding γ) (t : ℝ) + (ht : deriv (fun s => (γ s).1) t ≠ 0) : + ∃ U : Set Base, IsOpen U ∧ γ t ∈ U ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f U ∧ + (∀ x ∈ Set.range γ ∩ U, f x = 0) ∧ fderiv ℝ f (γ t) (0, 1) = 1 := by + let X : ℝ → ℝ := fun s => (γ s).1 + have hX : ContDiff ℝ ∞ X := contDiff_fst.comp hγ + have hXt := hX.hasStrictDerivAt (x := t) (by simp) + let e := (hXt.hasStrictFDerivAt_equiv ht).toOpenPartialHomeomorph X + have heX : (e : ℝ → ℝ) = X := rfl + have hts : t ∈ e.source := (hXt.hasStrictFDerivAt_equiv ht).mem_toOpenPartialHomeomorph_source + let Z : Set ℝ := {s | deriv X s ≠ 0} + have hZ : IsOpen Z := isOpen_ne.preimage (hX.continuous_deriv (by simp)) + let W : Set ℝ := e.target ∩ e.symm ⁻¹' Z + have hW : IsOpen W := e.isOpen_inter_preimage_symm hZ + have htW : X t ∈ W := by + refine ⟨e.map_source hts, ?_⟩ + change deriv X (e.symm (e t)) ≠ 0 + rw [e.left_inv hts] + exact ht + have hi : ContDiffOn ℝ ∞ e.symm W := by + intro y hy + apply ContDiffAt.contDiffWithinAt + apply e.contDiffAt_symm_deriv hy.2 hy.1 + · rw [heX] + exact (hX.differentiable (by simp) (e.symm y)).hasDerivAt + · rw [heX] + exact hX.contDiffAt + obtain ⟨V, hV, hpre⟩ := he.isInducing.isOpen_iff.mp e.open_source + have htV : γ t ∈ V := by + have : t ∈ γ ⁻¹' V := by rw [hpre]; exact hts + exact this + let U : Set Base := V ∩ Prod.fst ⁻¹' W + have hU : IsOpen U := hV.inter (hW.preimage continuous_fst) + let f : Base → ℝ := fun x => x.2 - (γ (e.symm x.1)).2 + have hf : ContDiffOn ℝ ∞ f U := by + apply contDiffOn_snd.sub + exact (contDiff_snd.comp hγ).contDiffOn.comp + (hi.comp contDiffOn_fst (fun x hx => hx.2)) (fun _ _ => mem_univ _) + have hz : ∀ x ∈ Set.range γ ∩ U, f x = 0 := by + rintro x ⟨⟨s, rfl⟩, hx⟩ + have hs : s ∈ e.source := by + rw [← hpre] + exact hx.1 + change (γ s).2 - (γ (e.symm (e s))).2 = 0 + rw [e.left_inv hs, sub_self] + have hpU : γ t ∈ U := ⟨htV, htW⟩ + have hiAt : DifferentiableAt ℝ (fun y => (γ (e.symm y)).2) (X t) := + ((contDiff_snd.comp hγ).contDiffAt.comp (X t) + ((hi.contDiffAt (hW.mem_nhds htW)))).differentiableAt (by simp) + have hfst : HasFDerivAt (fun x : Base => x.1) (ContinuousLinearMap.fst ℝ ℝ ℝ) (γ t) := + hasFDerivAt_fst + have hsnd : HasFDerivAt (fun x : Base => x.2) (ContinuousLinearMap.snd ℝ ℝ ℝ) (γ t) := + hasFDerivAt_snd + have hd := hsnd.sub (hiAt.hasFDerivAt.comp (γ t) hfst) + change HasFDerivAt f _ (γ t) at hd + refine ⟨U, hU, hpU, f, hf, hz, ?_⟩ + rw [hd.fderiv] + simp + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseFinitePatching.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseFinitePatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1c5c9e02ef01bc884aee63f317dd3eafde4ba0a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseFinitePatching.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSmallFunction + +namespace OAI + +/-! Finite patching of narrow corrections along defining curves. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.TransverseSmallFunction + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {ι : Type*} [Fintype ι] + +theorem finite_small_correction {f g : ι → E → ℝ} + (hf : ∀ i, ContDiff ℝ ∞ (f i)) (hg : ∀ i, ContDiff ℝ ∞ (g i)) + (hgc : ∀ i, HasCompactSupport (g i)) {K : Set E} + (hz : ∀ i x, x ∈ K → x ∈ tsupport (g i) → f i x = 0) + {ε : ℝ} (hε : 0 < ε) : + ∃ H : E → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ + tsupport H ⊆ ⋃ i, tsupport (g i) ∧ (∀ x, |H x| < ε) ∧ + ∀ x ∈ K, fderiv ℝ H x = ∑ i, g i x • fderiv ℝ (f i) x := by + classical + let e := ε / ((Fintype.card ι : ℝ) + 1) + have hden : 0 < (Fintype.card ι : ℝ) + 1 := by positivity + have he : 0 < e := div_pos hε hden + have hbound (i : ι) : ∃ G : ℝ, 0 ≤ G ∧ ∀ x, |g i x| ≤ G := by + obtain ⟨A, hA⟩ := (hg i).continuous.bounded_above_of_compact_support (hgc i) + refine ⟨max 0 A, le_max_left _ _, ?_⟩ + intro x + have hx : |g i x| ≤ A := by simpa only [Real.norm_eq_abs] using hA x + exact hx.trans (le_max_right _ _) + choose G hG hb using hbound + choose H hH hHs hHe hHd using fun i => exists_small_correction (hf i) (hg i) (hG i) (hb i) he + let F : E → ℝ := fun x => ∑ i, H i x + have hFs : tsupport F ⊆ ⋃ i, tsupport (g i) := by + apply closure_minimal + · intro x hx + by_contra hnot + have hn (i : ι) : x ∉ tsupport (H i) := by + intro hh + exact hnot (mem_iUnion.mpr ⟨i, hHs i hh⟩) + have hFx : F x = 0 := by + apply Finset.sum_eq_zero + intro i _ + exact image_eq_zero_of_notMem_tsupport (hn i) + exact hx hFx + · exact isClosed_iUnion_of_finite (fun i => isClosed_tsupport (g i)) + have hFc : HasCompactSupport F := + (isCompact_iUnion fun i => hgc i).of_isClosed_subset (isClosed_tsupport F) hFs + refine ⟨F, ContDiff.sum (fun i _ => hH i), hFc, hFs, ?_, ?_⟩ + · intro x + have hsum : |F x| ≤ (Fintype.card ι : ℝ) * e := by + calc + |F x| ≤ ∑ i, |H i x| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _i : ι, e := Finset.sum_le_sum (fun i _ => (hHe i x).le) + _ = (Fintype.card ι : ℝ) * e := by simp + apply lt_of_le_of_lt hsum + change (Fintype.card ι : ℝ) * (ε / ((Fintype.card ι : ℝ) + 1)) < ε + rw [← mul_div_assoc] + apply (div_lt_iff₀ hden).mpr + nlinarith + · intro x hx + change fderiv ℝ (fun y => ∑ i, H i y) x = _ + rw [fderiv_fun_sum (fun i _ => (hH i).differentiable (by simp) x)] + apply Finset.sum_congr rfl + intro i _ + by_cases hgi : x ∈ tsupport (g i) + · exact hHd i x (hz i x hx hgi) + · have hHi : x ∉ tsupport (H i) := fun hh => hgi (hHs i hh) + rw [fderiv_of_notMem_tsupport ℝ hHi, image_eq_zero_of_notMem_tsupport hgi, zero_smul] + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseJetConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseJetConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff501bbdb18c0a6d00b9381e274b51820fe57ac2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseJetConvexity.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.NormalLinearizationHomotopy + +namespace OAI + +/-! A common vertical column and matching transverse signs preserve rank +under convex interpolation of the endpoint jets. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def triangularPlaneJet (a b c : ℝ) : Base →L[ℝ] Base := + (ContinuousLinearMap.proj 0).smulRight (![a,b] : Base)+ + (ContinuousLinearMap.proj 1).smulRight (![c,0] : Base) + +lemma triangularPlaneJet_bijective {a b c : ℝ} (hb : b ≠ 0) (hc : c ≠ 0) : + Function.Bijective (triangularPlaneJet a b c) := by + have hi : Function.Injective (triangularPlaneJet a b c) := by + intro u v he + have h1 : u 0 = v 0 := by + have hh := congrFun he 1 + simp [triangularPlaneJet] at hh + exact hh.resolve_right hb + have h0 := congrFun he 0 + simp only [triangularPlaneJet,add_apply,ContinuousLinearMap.smulRight_apply, + Pi.add_apply,Pi.smul_apply,smul_eq_mul,ContinuousLinearMap.proj_apply, + Matrix.cons_val_zero] at h0 + rw [h1] at h0 + have h2 : u 1 = v 1 := mul_right_cancel₀ hc (add_left_cancel h0) + ext i + fin_cases i + · exact h1 + · exact h2 + exact ⟨hi,(LinearMap.injective_iff_surjective_of_finrank_eq_finrank + (f := (triangularPlaneJet a b c).toLinearMap) rfl).mp hi⟩ + +lemma plane_jet_bijective_of_columns (L : Base →L[ℝ] Base) {c : ℝ} + (hc : c ≠ 0) (he : L (![0,1] : Base) = ![c,0]) + (hb : (L (![1,0] : Base)) 1 ≠ 0) : Function.Bijective L := by + have hL : L = triangularPlaneJet (L ![1,0] 0) (L ![1,0] 1) c := by + rw [plane_map_columns L,he] + ext v i + fin_cases i <;> simp [triangularPlaneJet] + rw [hL] + exact triangularPlaneJet_bijective hb hc + +lemma convex_same_sign_ne_zero {a b s : ℝ} (hab : 0 < a*b) (hs : s ∈ Icc (0:ℝ) 1) : + (1-s)*a+s*b ≠ 0 := by + rcases mul_pos_iff.mp hab with ⟨ha,hb⟩ | ⟨ha,hb⟩ + · have hpos : 0 < (1-s)*a+s*b := by + rcases lt_or_eq_of_le hs.2 with hlt | rfl + · exact add_pos_of_pos_of_nonneg (mul_pos (by linarith) ha) (mul_nonneg hs.1 hb.le) + · simpa using hb + exact hpos.ne' + · have hneg : (1-s)*a+s*b < 0 := by + rcases lt_or_eq_of_le hs.2 with hlt | rfl + · exact add_neg_of_neg_of_nonpos (mul_neg_of_pos_of_neg (by linarith) ha) + (mul_nonpos_of_nonneg_of_nonpos hs.1 hb.le) + · simpa using hb + exact hneg.ne + +lemma convex_plane_jets_bijective (L J : Base →L[ℝ] Base) {c s : ℝ} + (hc : c ≠ 0) (hL : L (![0,1] : Base) = ![c,0]) + (hJ : J (![0,1] : Base) = ![c,0]) + (hprod : 0 < (L (![1,0] : Base) 1)*(J (![1,0] : Base) 1)) + (hs : s ∈ Icc (0:ℝ) 1) : Function.Bijective ((1-s) • L+s • J) := by + apply plane_jet_bijective_of_columns _ hc + · simp only [add_apply,smul_apply,hL,hJ] + rw [←add_smul] + simp + · change (1-s)*(L (![1,0] : Base) 1)+s*(J (![1,0] : Base) 1) ≠ 0 + exact convex_same_sign_ne_zero hprod hs + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseReflection.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseReflection.lean new file mode 100644 index 0000000000000000000000000000000000000000..7014dab04cabe8889bf28fe1c55fba39562b6b8b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseReflection.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ArcTimeChartPartition +import OAI.Geometry.SurfaceImmersion.Atlas.TimeCoordinateTransition + +namespace OAI + +/-! Reversing only the transverse coordinate keeps the global arc time +and all axis points unchanged. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def transverseReflection : Base ≃L[ℝ] Base := + LinearEquiv.toContinuousLinearEquiv { + toFun := fun x => ![-x 0,x 1] + invFun := fun x => ![-x 0,x 1] + left_inv := by intro x; ext i; fin_cases i <;> simp + right_inv := by intro x; ext i; fin_cases i <;> simp + map_add' := by intro x y; ext i; fin_cases i <;> simp [add_comm] + map_smul' := by intro a x; ext i; fin_cases i <;> simp + } + +lemma transverseReflection_apply (x : Base) : transverseReflection x = ![-x 0,x 1] := rfl + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] {F : M → ℝ} +namespace SurfaceTimeChart + +def reflect (c : SurfaceTimeChart F) : SurfaceTimeChart F where + coord := c.coord.transHomeomorph transverseReflection.toHomeomorph + smooth := transverseReflection.contDiff.contMDiff.comp_contMDiffOn c.smooth + inverse_smooth := c.inverse_smooth.comp transverseReflection.symm.contDiff.contMDiff.contMDiffOn + (fun _ hx => hx) + time := by + intro x hx + change (transverseReflection (c.coord x)) 1 = F x + exact c.time x hx + +omit [IsManifold planeModel ∞ M] in +lemma reflect_axis (c : SurfaceTimeChart F) {x : M} {t : ℝ} + (hx : c.coord x = ![0,t]) : c.reflect.coord x = ![0,t] := by + change transverseReflection (c.coord x) = ![0,t] + rw [hx,transverseReflection_apply] + simp + +omit [IsManifold planeModel ∞ M] in +lemma reflect_transition (c d : SurfaceTimeChart F) (x : M) + (h : DifferentiableAt ℝ (d.coord ∘ c.coord.symm) (c.coord x)) : + fderiv ℝ (d.reflect.coord ∘ c.coord.symm) (c.coord x) = + transverseReflection.toContinuousLinearMap.comp + (fderiv ℝ (d.coord ∘ c.coord.symm) (c.coord x)) := by + change fderiv ℝ (transverseReflection ∘ (d.coord ∘ c.coord.symm)) (c.coord x) = _ + exact (transverseReflection.hasFDerivAt.comp (c.coord x) h.hasFDerivAt).fderiv + +end SurfaceTimeChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSmallFunction.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSmallFunction.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7488d09c03ccf5e8a4442e05af8cd107b1a3e74 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSmallFunction.lean @@ -0,0 +1,110 @@ +import Mathlib + +namespace OAI + +/-! A narrow transverse correction with arbitrarily small values and a fixed first jet. -/ +noncomputable section +open Set Metric +open scoped ContDiff + +namespace ClosedSurfaceR4.TransverseSmallFunction + +def cutoff : ContDiffBump (0 : ℝ) := ⟨1 / 2, 1, by norm_num, by norm_num⟩ + +lemma cutoff_zero : cutoff 0 = 1 := + cutoff.one_of_mem_closedBall (mem_closedBall_self cutoff.rIn_pos.le) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def correction (f g : E → ℝ) (δ : ℝ) (x : E) : ℝ := + f x * g x * cutoff (f x / δ) + +lemma correction_smooth {f g : E → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (δ : ℝ) : + ContDiff ℝ ∞ (correction f g δ) := + (hf.mul hg).mul (cutoff.contDiff.comp (hf.div_const δ)) + +/-- At the defining curve the cutoff introduces no change in the prescribed first jet. -/ +lemma correction_hasFDerivAt {f g : E → ℝ} {x : E} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) (hf0 : f x = 0) (δ : ℝ) : + HasFDerivAt (correction f g δ) (g x • fderiv ℝ f x) x := by + have hcd : Differentiable ℝ (cutoff : ℝ → ℝ) := + (cutoff.contDiff : ContDiff ℝ ∞ (cutoff : ℝ → ℝ)).differentiable (by simp) + have hdiv : DifferentiableAt ℝ (fun y => f y / δ) x := by + simpa only [div_eq_mul_inv] using hf.mul_const δ⁻¹ + have hc : DifferentiableAt ℝ (fun y => cutoff (f y / δ)) x := + DifferentiableAt.comp x (g := (cutoff : ℝ → ℝ)) (f := fun y => f y / δ) + (hcd (f x / δ)) hdiv + have hd := (hf.hasFDerivAt.mul hg.hasFDerivAt).mul hc.hasFDerivAt + convert! hd using 1 + simp only [Pi.mul_apply, hf0, zero_div, cutoff_zero, zero_mul, zero_smul, zero_add, one_smul] + +lemma correction_derivative {f g : E → ℝ} {x : E} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) (hf0 : f x = 0) + (δ : ℝ) (v : E) : + fderiv ℝ (correction f g δ) x v = g x * fderiv ℝ f x v := by + rw [(correction_hasFDerivAt hf hg hf0 δ).fderiv] + rfl + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma correction_abs_le {f g : E → ℝ} {δ G : ℝ} (hδ : 0 < δ) (hG : 0 ≤ G) + (hg : ∀ x, |g x| ≤ G) (x : E) : |correction f g δ x| ≤ δ * G := by + by_cases hz : cutoff (f x / δ) = 0 + · simp only [correction, hz, mul_zero, abs_zero] + exact mul_nonneg hδ.le hG + have hmem : f x / δ ∈ ball (0 : ℝ) cutoff.rOut := by + rw [← cutoff.support_eq] + exact hz + have hr : |f x / δ| < 1 := by + change dist (f x / δ) 0 < 1 at hmem + simpa only [Real.dist_eq, sub_zero] using hmem + have hf : |f x| ≤ δ := by + rw [abs_div, abs_of_pos hδ] at hr + exact ((div_lt_one hδ).mp hr).le + have hc : |cutoff (f x / δ)| ≤ 1 := by + rw [abs_of_nonneg cutoff.nonneg] + exact cutoff.le_one + calc + |correction f g δ x| = |f x| * |g x| * |cutoff (f x / δ)| := by + simp only [correction, abs_mul] + _ ≤ δ * G * 1 := mul_le_mul (mul_le_mul hf (hg x) (abs_nonneg _) hδ.le) + hc (abs_nonneg _) (mul_nonneg hδ.le hG) + _ = δ * G := mul_one _ + +omit [NormedSpace ℝ E] in +lemma correction_support (f g : E → ℝ) (δ : ℝ) : + tsupport (correction f g δ) ⊆ tsupport g := by + change tsupport ((f * g) * (fun x => cutoff (f x / δ))) ⊆ tsupport g + exact tsupport_mul_subset_left.trans tsupport_mul_subset_right + +omit [NormedSpace ℝ E] in +lemma correction_compactSupport (f : E → ℝ) {g : E → ℝ} (hg : HasCompactSupport g) (δ : ℝ) : + HasCompactSupport (correction f g δ) := by + change HasCompactSupport ((f * g) * (fun x => cutoff (f x / δ))) + exact hg.mul_left.mul_right + +/-- Narrowing the support in the defining-function direction makes the value +arbitrarily small without changing any prescribed derivative along its zero set. -/ +theorem exists_small_correction {f g : E → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + {G ε : ℝ} (hG : 0 ≤ G) (hgb : ∀ x, |g x| ≤ G) (hε : 0 < ε) : + ∃ H : E → ℝ, ContDiff ℝ ∞ H ∧ tsupport H ⊆ tsupport g ∧ + (∀ x, |H x| < ε) ∧ + ∀ x, f x = 0 → fderiv ℝ H x = g x • fderiv ℝ f x := by + let δ := ε / (G + 1) + have hden : 0 < G + 1 := by linarith + have hδ : 0 < δ := div_pos hε hden + have hδG : δ * G < ε := by + change ε / (G + 1) * G < ε + rw [div_mul_eq_mul_div] + apply (div_lt_iff₀ hden).mpr + nlinarith + refine ⟨correction f g δ, correction_smooth hf hg δ, correction_support f g δ, + (fun x => lt_of_le_of_lt (correction_abs_le hδ hG hgb x) hδG), ?_⟩ + intro x hx + exact (correction_hasFDerivAt (hf.differentiable (by simp) x) + (hg.differentiable (by simp) x) hx δ).fderiv + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..4dda9c67203078cf4c4e1f8bb007904f3f4a86a3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TransverseSupport.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RulingRemainder + +namespace OAI + +/-! The same longitudinal compact set bounds every narrowed transverse correction. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def narrowedRuling (f : Base → ProjectionTarget 3) (η : ℝ → ℝ) (r : ℝ) (x : Base) := + transverseCutoff r x • rulingRemainder f η x + +lemma narrowedRuling_smooth {f : Base → ProjectionTarget 3} {η : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hη : ContDiff ℝ ∞ η) (r : ℝ) : + ContDiff ℝ ∞ (narrowedRuling f η r) := + (transverseCutoff_smooth r).smul (rulingRemainder_smooth hf hη) + +lemma narrowedRuling_support (f : Base → ProjectionTarget 3) (η : ℝ → ℝ) + {r : ℝ} (hr : 0 < r) : + tsupport (narrowedRuling f η r) ⊆ {x | |x 0| ≤ r ∧ x 1 ∈ tsupport η} := by + intro x hx + have hleft : x ∈ tsupport (transverseCutoff r) := tsupport_smul_subset_left _ _ hx + have hright : x ∈ tsupport (rulingRemainder f η) := tsupport_smul_subset_right _ _ hx + exact ⟨transverseCutoff_tsupport hr hleft,rulingRemainder_support f η hright⟩ + +lemma narrowedRuling_compact (f : Base → ProjectionTarget 3) {η : ℝ → ℝ} + (hη : HasCompactSupport η) {r : ℝ} (hr : 0 < r) : + HasCompactSupport (narrowedRuling f η r) := by + let T : ℝ × ℝ → Base := fun z => ![z.1,z.2] + have hT : Continuous T := by + apply continuous_pi + intro i + fin_cases i + · exact continuous_fst + · exact continuous_snd + have hK : IsCompact (T '' (Icc (-r) r ×ˢ tsupport η)) := + (isCompact_Icc.prod hη).image hT + apply hK.of_isClosed_subset (isClosed_tsupport _) _ + intro x hx + obtain ⟨h0,h1⟩ := narrowedRuling_support f η hr hx + refine ⟨(x 0,x 1),⟨abs_le.mp h0,h1⟩,?_⟩ + ext i; fin_cases i <;> rfl + +lemma narrowedRuling_fixed_ball (f : Base → ProjectionTarget 3) {η : ℝ → ℝ} + (hη : HasCompactSupport η) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ r : ℝ, 0 < r → r ≤ 1 → + tsupport (narrowedRuling f η r) ⊆ closedBall (0 : Base) ρ := by + obtain ⟨C,hC⟩ := hη.exists_bound_of_continuousOn continuous_id.continuousOn + let ρ := |C|+2 + have hρ : 0 < ρ := by dsimp [ρ]; positivity + refine ⟨ρ,hρ,?_⟩ + intro r hr hr1 x hx + obtain ⟨h0,h1⟩ := narrowedRuling_support f η hr hx + rw [mem_closedBall,dist_zero_right] + apply (pi_norm_le_iff_of_nonneg hρ.le).mpr + intro i + fin_cases i + · rw [Real.norm_eq_abs] + exact h0.trans (hr1.trans (by dsimp [ρ]; linarith [abs_nonneg C])) + · exact (hC (x 1) h1).trans (by dsimp [ρ]; linarith [le_abs_self C]) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TriangularSurfaceImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TriangularSurfaceImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..57d52c10ec1d949d8cb2aed437bef84d47e92fa8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TriangularSurfaceImmersion.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapPairModel + +namespace OAI + +/-! Immersion criterion for the local surface (x, xy, h(x,y)). This isolates +the single derivative that must stay positive in a supported cancellation. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma planeLinear_apply (L : Base →L[ℝ] ℝ) (v : Base) : + L v = v 0 * L ![1,0] + v 1 * L ![0,1] := by + have he : v = v 0 • (![1,0] : Base) + v 1 • (![0,1] : Base) := by + ext i + fin_cases i <;> simp + conv_lhs => rw [he] + simp only [map_add,map_smul,smul_eq_mul] + +def triangularSurfaceCoordinates (h : Base → ℝ) (x : Base) : Fin 3 → ℝ := + ![x 0,x 0*x 1,h x] + +def triangularSurfaceDerivative (x : Base) (D : Base →L[ℝ] ℝ) : + Base →L[ℝ] (Fin 3 → ℝ) := + ContinuousLinearMap.pi ![ContinuousLinearMap.proj 0, + x 0 • ContinuousLinearMap.proj 1 + x 1 • ContinuousLinearMap.proj 0,D] + +lemma triangularSurfaceCoordinates_hasFDerivAt {h : Base → ℝ} {x : Base} + (hh : DifferentiableAt ℝ h x) : + HasFDerivAt (triangularSurfaceCoordinates h) + (triangularSurfaceDerivative x (fderiv ℝ h x)) x := by + apply hasFDerivAt_pi.mpr + intro i + fin_cases i + · exact hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) x + · exact (hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) x).mul + (hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) x) + · exact hh.hasFDerivAt + +lemma triangularSurfaceDerivative_injective {x : Base} {D : Base →L[ℝ] ℝ} + (h : x 0 ≠ 0 ∨ D ![0,1] ≠ 0) : + Function.Injective (triangularSurfaceDerivative x D) := by + intro v w he + have h0 : v 0 = w 0 := congrFun he 0 + have h1 : x 0*v 1 + x 1*v 0 = x 0*w 1 + x 1*w 0 := congrFun he 1 + have h2 : D v = D w := congrFun he 2 + have hvw : v 1 = w 1 := by + rcases h with hx | hd + · rw [h0] at h1 + exact mul_left_cancel₀ hx (add_right_cancel h1) + · rw [planeLinear_apply D v,planeLinear_apply D w,h0] at h2 + have hh : (v 1-w 1)*D ![0,1] = 0 := by nlinarith + exact sub_eq_zero.mp ((mul_eq_zero.mp hh).resolve_right hd) + ext i + fin_cases i + · exact h0 + · exact hvw + +def triangularSurface (h : Base → ℝ) : Base → ProjectionTarget 3 := + (EuclideanSpace.equiv (Fin 3) ℝ).symm ∘ triangularSurfaceCoordinates h + +lemma triangularSurface_smooth {h : Base → ℝ} (hh : ContDiff ℝ ∞ h) : + ContDiff ℝ ∞ (triangularSurface h) := by + apply (EuclideanSpace.equiv (Fin 3) ℝ).symm.contDiff.comp + apply contDiff_pi.mpr + intro i + fin_cases i + · exact (ContinuousLinearMap.proj (0 : Fin 2) : Base →L[ℝ] ℝ).contDiff + · exact ((ContinuousLinearMap.proj (0 : Fin 2) : Base →L[ℝ] ℝ).contDiff).mul ((ContinuousLinearMap.proj (1 : Fin 2) : Base →L[ℝ] ℝ).contDiff) + · exact hh + +theorem triangularSurface_immersion {h : Base → ℝ} (hh : ContDiff ℝ ∞ h) + (hpositive : ∀ x : Base, x 0 = 0 → 0 < fderiv ℝ h x ![0,1]) (x : Base) : + Function.Injective (fderiv ℝ (triangularSurface h) x) := by + have hd := triangularSurfaceCoordinates_hasFDerivAt (hh.differentiable (by simp) x) + have hi : Function.Injective (triangularSurfaceDerivative x (fderiv ℝ h x)) := by + apply triangularSurfaceDerivative_injective + by_cases hx : x 0 = 0 + · exact Or.inr (ne_of_gt (hpositive x hx)) + · exact Or.inl hx + rw [triangularSurface,fderiv_comp x + (EuclideanSpace.equiv (Fin 3) ℝ).symm.differentiableAt hd.differentiableAt, + (EuclideanSpace.equiv (Fin 3) ℝ).symm.fderiv,hd.fderiv] + exact (EuclideanSpace.equiv (Fin 3) ℝ).symm.injective.comp hi + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedAxisDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedAxisDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..36ec0fbb3cc3c092bb667babcdb3e42241b7b914 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedAxisDerivative.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TwistedTargetTube + +namespace OAI + +/-! The supported twist turns the transverse derivative while retaining + the whole longitudinal axis and its derivative. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma twistedRuledCoordinates_axis_fderiv {θ : Base → ℝ} + (hθ : ContDiff ℝ ∞ θ) (t : ℝ) (v : Base) : + fderiv ℝ (twistedRuledCoordinates θ) (crosscapAxis t) v = + (![Real.cos (θ (crosscapAxis t))*v 0,Real.sin (θ (crosscapAxis t))*v 0],v 1) := by + rw [(twistedRuledCoordinates_hasFDerivAt hθ _).fderiv,twistedRuledDerivative_apply] + simp [crosscapAxis_apply] + +lemma twistedTubeSurface_axis (T : Base × ℝ → Fin 3 → ℝ) (θ : Base → ℝ) (t : ℝ) : + twistedTubeSurface T θ (crosscapAxis t) = twistedTubeSurface T 0 (crosscapAxis t) := by + simp only [twistedTubeSurface,Function.comp_apply,twistedRuledCoordinates_axis] + +lemma twistedTubeSurface_axis_fderiv {T : Base × ℝ → Fin 3 → ℝ} {θ : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hθ : ContDiff ℝ ∞ θ) (t : ℝ) (v : Base) : + fderiv ℝ (twistedTubeSurface T θ) (crosscapAxis t) v = + (EuclideanSpace.equiv (Fin 3) ℝ).symm + (fderiv ℝ T (0,t) (![Real.cos (θ (crosscapAxis t))*v 0, + Real.sin (θ (crosscapAxis t))*v 0],v 1)) := by + rw [twistedTubeSurface,fderiv_comp _ (EuclideanSpace.equiv (Fin 3) ℝ).symm.differentiableAt + ((hT.comp (twistedRuledCoordinates_smooth hθ)).differentiable (by simp) _), + (EuclideanSpace.equiv (Fin 3) ℝ).symm.fderiv, + fderiv_comp _ (hT.differentiable (by simp) _) + ((twistedRuledCoordinates_smooth hθ).differentiable (by simp) _)] + simp only [ContinuousLinearMap.comp_apply,twistedRuledCoordinates_axis, + twistedRuledCoordinates_axis_fderiv hθ] + rfl + +lemma twistedTubeSurface_longitudinal {T : Base × ℝ → Fin 3 → ℝ} {θ : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hθ : ContDiff ℝ ∞ θ) (t : ℝ) : + fderiv ℝ (twistedTubeSurface T θ) (crosscapAxis t) (![0,1] : Base) = + fderiv ℝ (twistedTubeSurface T 0) (crosscapAxis t) (![0,1] : Base) := by + rw [twistedTubeSurface_axis_fderiv hT hθ,twistedTubeSurface_axis_fderiv (θ := 0) hT contDiff_const] + simp + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedTargetTube.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedTargetTube.lean new file mode 100644 index 0000000000000000000000000000000000000000..164781249d802b6a6bd5de859df218300e1ba025 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwistedTargetTube.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.TwistedRuledCoordinates + +namespace OAI + +/-! A twist stays in the same transverse tube and gives a genuine + immersed surface after composition with the constructed target tube. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma twistedRuledCoordinates_bound (θ : Base → ℝ) (x : Base) : + ‖(twistedRuledCoordinates θ x).1‖ ≤ |x 0| := by + apply (pi_norm_le_iff_of_nonneg (abs_nonneg (x 0))).mpr + intro i + fin_cases i + · change |x 0*Real.cos (θ x)| ≤ |x 0| + rw [abs_mul] + exact mul_le_of_le_one_right (abs_nonneg _) (abs_le.mpr ⟨Real.neg_one_le_cos _,Real.cos_le_one _⟩) + · change |x 0*Real.sin (θ x)| ≤ |x 0| + rw [abs_mul] + exact mul_le_of_le_one_right (abs_nonneg _) (abs_le.mpr ⟨Real.neg_one_le_sin _,Real.sin_le_one _⟩) + +def twistedTubeSurface (T : Base × ℝ → Fin 3 → ℝ) (θ : Base → ℝ) : Base → ProjectionTarget 3 := + (EuclideanSpace.equiv (Fin 3) ℝ).symm ∘ T ∘ twistedRuledCoordinates θ + +lemma twistedTubeSurface_smooth {T : Base × ℝ → Fin 3 → ℝ} {θ : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hθ : ContDiff ℝ ∞ θ) : ContDiff ℝ ∞ (twistedTubeSurface T θ) := + (EuclideanSpace.equiv (Fin 3) ℝ).symm.contDiff.comp (hT.comp (twistedRuledCoordinates_smooth hθ)) + +lemma twistedTubeSurface_immersion {T : Base × ℝ → Fin 3 → ℝ} {θ : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hθ : ContDiff ℝ ∞ θ) {x : Base} + (hI : Function.Injective (fderiv ℝ T (twistedRuledCoordinates θ x))) : + Function.Injective (fderiv ℝ (twistedTubeSurface T θ) x) := by + rw [twistedTubeSurface,fderiv_comp x + (EuclideanSpace.equiv (Fin 3) ℝ).symm.differentiableAt + ((hT.comp (twistedRuledCoordinates_smooth hθ)).differentiable (by simp) x), + (EuclideanSpace.equiv (Fin 3) ℝ).symm.fderiv, + fderiv_comp x (hT.differentiable (by simp) _) + ((twistedRuledCoordinates_smooth hθ).differentiable (by simp) x)] + intro v w hvw + apply twistedRuledCoordinates_immersion hθ x + apply hI + exact (EuclideanSpace.equiv (Fin 3) ℝ).symm.injective hvw + +lemma twistedTubeSurface_eq_zero {T : Base × ℝ → Fin 3 → ℝ} {θ : Base → ℝ} + {x : Base} (hx : θ x = 0) : twistedTubeSurface T θ x = twistedTubeSurface T 0 x := by + simp only [twistedTubeSurface,Function.comp_apply,twistedRuledCoordinates_zero hx] + rw [twistedRuledCoordinates_zero (show (0 : Base → ℝ) x = 0 from rfl)] + +lemma twistedTubeSurface_difference_support (T : Base × ℝ → Fin 3 → ℝ) (θ : Base → ℝ) : + tsupport (twistedTubeSurface T θ-twistedTubeSurface T 0) ⊆ tsupport θ := by + apply closure_minimal _ isClosed_closure + intro x hx + apply subset_tsupport + intro hz + apply hx + exact sub_eq_zero.mpr (twistedTubeSurface_eq_zero hz) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwoZeroAxisFactor.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwoZeroAxisFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..59bcb25342e2373ad26666e50300f80353337008 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/TwoZeroAxisFactor.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothZeroFactor + +namespace OAI + +/-! Removing two simple zero factors from a vector-valued axis curve. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +variable {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] [CompleteSpace V] + +theorem nonzero_two_zero_factor {f : ℝ → V} (hf : ContDiff ℝ ∞ f) + {p q : ℝ} (hpq : p ≠ q) (hp : f p = 0) (hq : f q = 0) + (hdp : deriv f p ≠ 0) (hdq : deriv f q ≠ 0) + {K : Set ℝ} (hz : ∀ t ∈ K, f t = 0 → t = p ∨ t = q) : + ∃ d : ℝ → V, ContDiff ℝ ∞ d ∧ (∀ t, f t = ((t-p)*(t-q)) • d t) ∧ + (∀ t ∈ K, d t ≠ 0) ∧ + deriv f p = (p-q) • d p ∧ deriv f q = (q-p) • d q := by + obtain ⟨d,hd,he,hep,heq⟩ := two_zero_smooth_factor hf hpq hp hq + refine ⟨d,hd,he,?_,hep,heq⟩ + intro t ht hdt + have hft : f t = 0 := by rw [he t,hdt,smul_zero] + rcases hz t ht hft with rfl | rfl + · exact hdp (by rw [hep,hdt,smul_zero]) + · exact hdq (by rw [heq,hdt,smul_zero]) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UncleanPairPatchCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UncleanPairPatchCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e0b5b9013654b0760953e40c08556180d1dee0f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UncleanPairPatchCover.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover +import OAI.Geometry.SurfaceImmersion.Whitney.CleanSurfacePairs + +namespace OAI + +/-! Cover only pairs that fail transversality or finite-point avoidance; +the compact remainder already satisfies both properties. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] + +theorem unclean_pair_patch_cover + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) (hne : ∀ z ∈ K, z.1 ≠ z.2) + (S : Set M) (hS : S.Finite) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hAreg : ∀ z ∈ K, (∃ i, z.1 ∈ A i ∧ z.2 ∈ A i) → z ∈ cleanSurfacePairs f S) : + let D := K \ cleanSurfacePairs f S + ∃ (P : ∀ z : D, SurfacePairTranslationPatch z.val.1 z.val.2) + (T : D → Set (M × M)) (s : Finset D) (J : Set (M × M)), + (∀ z, IsCompact (T z) ∧ T z ⊆ (P z).U ×ˢ (P z).V) ∧ + (∀ z i, ((P z).χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ + ((P z).χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1))) ∧ + IsCompact J ∧ J ⊆ cleanSurfacePairs f S ∧ K ⊆ J ∪ ⋃ z ∈ s, T z := by + classical + dsimp only + let D := K \ cleanSurfacePairs f S + have hD : IsCompact D := hK.diff (cleanSurfacePairs_open hf hS) + have hex (z : D) : ∃ (P : SurfacePairTranslationPatch z.val.1 z.val.2) + (T : Set (M × M)), IsCompact T ∧ z.val ∈ interior T ∧ + T ⊆ P.U ×ˢ P.V ∧ ∀ i, + (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1)) := by + have hout : ∀ i, ¬ (z.val.1 ∈ A i ∧ z.val.2 ∈ A i) := by + intro i hi + exact z.property.2 (hAreg z z.property.1 ⟨i,hi⟩) + obtain ⟨P,hP⟩ := exists_fixed_surface_pair_patch A hA hdis z.val.1 z.val.2 + (hne z z.property.1) hout + obtain ⟨T,hT,hzT,hTP⟩ := exists_compact_subset (P.openU.prod P.openV) ⟨P.memU,P.memV⟩ + exact ⟨P,T,hT,hzT,hTP,hP⟩ + choose P T hT hzT hTP hP using hex + have hcover : D ⊆ ⋃ z : D, interior (T z) := + fun z hz => mem_iUnion.mpr ⟨⟨z,hz⟩,hzT ⟨z,hz⟩⟩ + obtain ⟨s,hs⟩ := hD.elim_finite_subcover (fun z => interior (T z)) (fun _ => isOpen_interior) hcover + let J := K \ ⋃ z ∈ s, interior (T z) + have hJ : IsCompact J := hK.diff (isOpen_iUnion fun _ => isOpen_iUnion fun _ => isOpen_interior) + have hJgood : J ⊆ cleanSurfacePairs f S := by + intro z hz + by_contra hbad + exact hz.2 (hs ⟨hz.1,hbad⟩) + refine ⟨P,T,s,J,fun z => ⟨hT z,hTP z⟩,hP,hJ,hJgood,?_⟩ + intro z hz + by_cases hu : z ∈ ⋃ i ∈ s, interior (T i) + · obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp hu + exact Or.inr (mem_iUnion₂.mpr ⟨i,hi,interior_subset hzi⟩) + · exact Or.inl ⟨hz,hu⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformActualAmplitudeC1.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformActualAmplitudeC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..36ae92bcc68bbed4b4191e6192233099a9e8c47a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformActualAmplitudeC1.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceAmplitudeParameterBounds +import OAI.Geometry.SurfaceImmersion.Atlas.ReferencePhaseC1 +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateDerivative +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeZero +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateC1Bounds + +namespace OAI + +/-! Uniform first-derivative bounds for the genuine corrected amplitudes. +The tolerances and bounds precede all later finite cycles and boundary choices. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance actualC1FiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualC1FiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance actualC1FiberAdd : AddCommGroup TensorFiber := actualC1FiberNormed.toAddCommGroup +local instance actualC1TensorDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance actualC1TensorDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance actualC1CovectorNormed : NormedAddCommGroup (Plane →L[ℝ] ℝ) := inferInstance +local instance actualC1CovectorSpace : NormedSpace ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance actualC1FiberT2 : T2Space TensorFiber := inferInstance +local instance actualC1TensorDualT2 : T2Space (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance actualC1CovectorT2 : T2Space (Plane →L[ℝ] ℝ) := inferInstance +local instance actualC1DataNormed (ι : Type*) [Fintype ι] : NormedAddCommGroup (PrimitiveAmplitudeData ι) := inferInstance +local instance actualC1DataSpace (ι : Type*) [Fintype ι] : NormedSpace ℝ (PrimitiveAmplitudeData ι) := inferInstance +local instance actualC1DataT2 (ι : Type*) [Fintype ι] : T2Space (PrimitiveAmplitudeData ι) := inferInstance +local instance actualC1DataDualNormed (ι : Type*) [Fintype ι] : NormedAddCommGroup (PrimitiveAmplitudeData ι →L[ℝ] ℝ) := inferInstance +local instance actualC1DataDualSpace (ι : Type*) [Fintype ι] : NormedSpace ℝ (PrimitiveAmplitudeData ι →L[ℝ] ℝ) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance actualC1DualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualC1DualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualC1SectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualC1SectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem uniform_actual_amplitude_C1 {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) : + ∃ pt wt mt : ℝ, 0 < pt ∧ 0 < wt ∧ 0 < mt ∧ + ∀ Dw Du : ℝ, 0 ≤ Dw → 0 ≤ Du → ∃ E : ℝ, 1 ≤ E ∧ + ∀ (ell : d.B.centers → Fin 3 → SmallModes.Base) (psi : (d.B.centers × Fin 3) → M → ℝ), + (∀ i j, ‖ell i j-(d.P i).ξ j‖ < pt) → + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) → + (∀ a, tsupport (psi a) ⊆ tsupport (d.B.weight a.1)) → + (∀ a p, |psi a p-d.B.weight a.1 p| < wt) → + (∀ a, d.B.WeightedBound 1 1 Dw (psi a)) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mt (G-F) → + d.B.TensorWeightedBound 1 1 Du (g.inner-inducedTensor (r • G)) → + ∀ i a p, p ∈ tsupport (d.B.weight i) → + let amp := d.B.correctedPrimitiveAmplitude d.basis psi (d.perturbedPhases ell) + (g.inner-inducedTensor (r • G)) a + |amp p| ≤ E ∧ ‖fderiv ℝ (amp ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ E := by + obtain ⟨pt,wt,mt,R,hpt,hwt,hmt,hR,hparam⟩ := d.actual_amplitude_parameter_bound hF r href + refine ⟨min pt 1,wt,mt,lt_min hpt zero_lt_one,hwt,hmt,?_⟩ + intro Dw Du hDw hDu + obtain ⟨Dq,hDq,hq⟩ := d.B.coefficientFrameRead_C1_bound d.basis + (fun a _p hp => d.basis_smooth a.1 hp a.2) + obtain ⟨W,hW,hw⟩ := d.B.coordinate_C1_bound (V := ℝ) hDw + obtain ⟨V,hV,hv⟩ := d.perturbed_phase_C1_bound + obtain ⟨H,hH,hHbound⟩ := d.B.tensorFrameRead_C1_bound hDu + let D := Dq+W+V+H + have hD : 0 ≤ D := by dsimp only [D]; linarith + have hqD : Dq ≤ D := by dsimp only [D]; linarith + have hWD : W ≤ D := by dsimp only [D]; linarith + have hVD : V ≤ D := by dsimp only [D]; linarith + have hHD : H ≤ D := by dsimp only [D]; linarith + let E := R*(1+D) + have hRE : R ≤ E := by dsimp only [E]; nlinarith + have hDE : R*D ≤ E := by dsimp only [E]; nlinarith + refine ⟨E,hR.trans hRE,?_⟩ + intro ell psi hell hpsi hs hclose hbpsi G hG hnear hbu i a p hp + let u := g.inner-inducedTensor (r • G) + let phi := d.perturbedPhases ell + have hphi (b : d.B.centers × Fin 3) : ContMDiff planeModel 𝓘(ℝ) ∞ (phi b) := + d.B.curvedAtlasPhase_smooth (d.B.centeredPhaseFamily ell d.L) + (fun _ _ => PhaseGeometry.centeredConvexPhase_smooth _ _ _) b + have hscaled : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) := + g.contMDiff.sub_section (A.inducedTensor_smooth hscaled) + have hsym : ∀ p v w, u p v w = u p w v := by + intro p v w + change g.inner p v w-inner ℝ (mfderiv planeModel spaceModel (r • G) p v) + (mfderiv planeModel spaceModel (r • G) p w) = + g.inner p w v-inner ℝ (mfderiv planeModel spaceModel (r • G) p w) + (mfderiv planeModel spaceModel (r • G) p v) + rw [g.symm,real_inner_comm] + have hell1 : ∀ i j, ‖ell i j-(d.P i).ξ j‖ ≤ 1 := + fun i j => (hell i j).le.trans (min_le_right _ _) + by_cases ha : p ∈ tsupport (d.B.weight a.1) + · have hd : ‖fderiv ℝ (d.B.primitiveCoordinateData d.basis psi phi u i + {b | p ∈ tsupport (d.B.weight b.1)}) (chart (i : M) p)‖ ≤ D := by + apply d.B.primitiveCoordinateData_fderiv_bound d.basis psi phi hpsi hphi + (fun b _p hb => d.basis_smooth b.1 hb b.2) u hu i hp hD + · intro b hb + exact (hq i b p hp hb).2.trans hqD + · intro b + exact (hw (psi b) (hpsi b) (hbpsi b) i p hp).2.trans hWD + · intro b _hb + exact (hv ell hell1 i b p hp).2.trans hVD + · exact (hHbound u hu hsym hbu i p hp).2.trans hHD + have hpa := hparam ell psi (fun i j => (hell i j).trans_le (min_le_left _ _)) + hclose G hG hnear i p hp a ha + have hh := d.B.correctedAmplitude_coordinate_bound d.basis psi phi hpsi hphi + (fun b _p hb => d.basis_smooth b.1 hb b.2) hs u hu i hp a ha R D hd hpa + exact ⟨hh.1.trans hRE,hh.2.trans hDE⟩ + · have hz := d.B.correctedAmplitude_zero_coordinate d.basis psi phi u hs i a + (d.B.weight_support i hp) ha + change |d.B.correctedPrimitiveAmplitude d.basis psi phi u a p| ≤ E ∧ _ + rw [hz.1,hz.2,abs_zero,norm_zero] + exact ⟨zero_le_one.trans (hR.trans hRE),zero_le_one.trans (hR.trans hRE)⟩ + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformAngularNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformAngularNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..f83370322287cb926f10702b5615139cc7a1778d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformAngularNormal.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocitySpatialBounds + +namespace OAI + +/-! Normal length bounds over every angle, fixed before the turn translation +or any of its derivatives is chosen. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem uniform_angular_normal_bounds {X Y C e₁ e₂ : E → Vec} {R : E → ℝ} {U K : Set E} + (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) (hR : ContDiffOn ℝ ∞ R U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (he₁ : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1) (he₂ : ∀ x ∈ U, e₂ x ⬝ᵥ e₂ x = 1) + (he₁₂ : ∀ x ∈ U, e₁ x ⬝ᵥ e₂ x = 0) + (hYe₁ : ∀ x ∈ U, Y x ⬝ᵥ e₁ x = 0) (hYe₂ : ∀ x ∈ U, Y x ⬝ᵥ e₂ x = 0) + (hCe₁ : ∀ x ∈ U, C x ⬝ᵥ e₁ x = 0) (hCe₂ : ∀ x ∈ U, C x ⬝ᵥ e₂ x = 0) + (hR0 : ∀ x ∈ U, R x ≠ 0) : + ∃ c D : ℝ, 0 < c ∧ 0 < D ∧ ∀ x ∈ K, ∀ α : ℝ, + c ≤ normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) α) ∧ + normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) α) ≤ D ∧ + 1 / normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) α) ≤ 1 / c := by + let V : E × ℝ → Vec := fun z => R z.1 • direction (e₁ z.1) (e₂ z.1) z.2 + have hV : ContDiffOn ℝ ∞ V (U ×ˢ univ) := + (hR.comp contDiffOn_fst (fun z hz => hz.1)).smul + ((contDiffOn_snd.cos.smul (h₁.comp contDiffOn_fst (fun z hz => hz.1))).add + (contDiffOn_snd.sin.smul (h₂.comp contDiffOn_fst (fun z hz => hz.1)))) + have hYV (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : Y z.1 ⬝ᵥ V z = 0 := by + simp only [V, direction, dotProduct_smul, dotProduct_add, hYe₁ z.1 hz.1, + hYe₂ z.1 hz.1, smul_zero, add_zero] + have hCV (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : C z.1 ⬝ᵥ V z = 0 := by + simp only [V, direction, dotProduct_smul, dotProduct_add, hCe₁ z.1 hz.1, + hCe₂ z.1 hz.1, smul_zero, add_zero] + have hV0 (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : V z ≠ 0 := by + apply smul_ne_zero (hR0 z.1 hz.1) + intro hh + have hu := direction_unit (he₁ z.1 hz.1) (he₂ z.1 hz.1) (he₁₂ z.1 hz.1) z.2 + rw [hh] at hu + simp at hu + have hp : 0 < 2 * Real.pi := by positivity + obtain ⟨c, D, hc, hDD, hb⟩ := compact_normalSize_bounds + (hU.prod isOpen_univ) (hX.comp contDiffOn_fst (fun z hz => hz.1)) + (hY.comp contDiffOn_fst (fun z hz => hz.1)) + (hC.comp contDiffOn_fst (fun z hz => hz.1)) hV + (fun z hz => hD z.1 hz.1) hYV hCV hV0 + (hK.prod (isCompact_Icc : IsCompact (Icc (0 : ℝ) (2 * Real.pi)))) + (prod_mono hKU (subset_univ _)) + refine ⟨c, D, hc, hDD, ?_⟩ + intro x hx α + let β := toIcoMod hp 0 α + have hβ : β ∈ Icc (0 : ℝ) (2 * Real.pi) := by + have hm := toIcoMod_mem_Ico hp 0 α + exact ⟨hm.1, by simpa only [zero_add] using hm.2.le⟩ + have hcos : Real.cos β = Real.cos α := + Real.cos_periodic.sub_zsmul_eq (toIcoDiv hp 0 α) + have hsin : Real.sin β = Real.sin α := + Real.sin_periodic.sub_zsmul_eq (toIcoDiv hp 0 α) + have hdir : direction (e₁ x) (e₂ x) β = direction (e₁ x) (e₂ x) α := by + simp only [direction, hcos, hsin] + have hh := hb (x, β) ⟨hx, hβ⟩ + change c ≤ normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) β) ∧ + normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) β) ≤ D ∧ + 1 / normalSize (X x) (Y x) (C x) (R x • direction (e₁ x) (e₂ x) β) ≤ 1 / c at hh + rwa [hdir] at hh + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCoefficientMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCoefficientMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..92e30c13b1a90aaed19e43877ba7dcb0d9c7dfd8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCoefficientMargins.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! A common quantitative trial radius for varying grid coefficient forms. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PhaseMean +open SmallModes (Base) + +theorem uniform_coefficient_margins {a C H : ℝ} + (ha : 0 < a) (hC : 0 ≤ C) (hH : 0 ≤ H) : + ∃ r ρ R : ℝ, 0 < r ∧ 0 < ρ ∧ 0 < R ∧ + ∀ (Q : Tensor →L[ℝ] ℝ), ‖Q‖ ≤ C → + ∀ reference : Base → Tensor, Continuous reference → + (∀ x, Q (reference x) ≤ H) → ∀ K : Set Base, + (∀ x ∈ K, a ≤ Q (reference x)) → + ∃ W : Set Base, IsOpen W ∧ K ⊆ W ∧ + ∀ x ∈ W, ρ+‖Q‖*r ≤ Q (reference x) ∧ + Q (reference x) ≤ R-‖Q‖*r := by + let r : ℝ := (a/8)/(C+1) + have hr : 0 < r := div_pos (by linarith) (by linarith) + have hCr : (C+1)*r = a/8 := by + dsimp [r] + field_simp + refine ⟨r,a/8,H+a/8+1,hr,by linarith,by linarith,?_⟩ + intro Q hQ reference href hu K hl + let W : Set Base := {x | a/2 < Q (reference x)} + have hW : IsOpen W := isOpen_lt continuous_const (Q.continuous.comp href) + have hKW : K ⊆ W := fun x hx => lt_of_lt_of_le (by linarith) (hl x hx) + have hnr : ‖Q‖*r ≤ a/8 := + (mul_le_mul_of_nonneg_right hQ hr.le).trans (by nlinarith) + refine ⟨W,hW,hKW,?_⟩ + intro x hx + have hlx : a/2 < Q (reference x) := hx + have hux := hu x + constructor <;> linarith + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCorrectedTermC1.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCorrectedTermC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dbdb398dc37b3448310659a5edaf3e2acbe7a5e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCorrectedTermC1.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformActualAmplitudeC1 +import OAI.Geometry.SurfaceImmersion.Geometry.UniformRemainderBound +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveTermC1Bounds + +namespace OAI + +/-! A uniform background C1 bound for every actual corrected primitive term. +The bound is chosen before the cycle count and before the finite-point map. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance uniformTermFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformTermFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem uniform_corrected_term_C1 {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) + (href : gref.inner = g.inner-inducedTensor (r • F)) {D : ℝ} (hD : 0 ≤ D) : + ∃ pt wt mt : ℝ, 0 < pt ∧ 0 < wt ∧ 0 < mt ∧ + ∀ Dw : ℝ, 0 ≤ Dw → ∃ E : ℝ, 0 ≤ E ∧ + ∀ (ell : d.B.centers → Fin 3 → SmallModes.Base) (psi : (d.B.centers × Fin 3) → M → ℝ), + (∀ i j, ‖ell i j-(d.P i).ξ j‖ < pt) → + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) → + (∀ a, tsupport (psi a) ⊆ tsupport (d.B.weight a.1)) → + (∀ a p, |psi a p-d.B.weight a.1 p| < wt) → + (∀ a, d.B.WeightedBound 1 1 Dw (psi a)) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 mt (G-F) → A.WeightedBound 1 2 D G → + ∀ f : SmoothPrimitiveFamily (d.B.centers × Fin 3) (g.inner-inducedTensor (r • G)), + f.phase = d.perturbedPhases ell → + f.amplitude = d.B.correctedPrimitiveAmplitude d.basis psi (d.perturbedPhases ell) + (g.inner-inducedTensor (r • G)) → + ∀ a, A.TensorWeightedBound 1 1 E (f.term a) := by + obtain ⟨pt,wt,mt,hpt,hwt,hmt,hamp⟩ := d.uniform_actual_amplitude_C1 hF r href + obtain ⟨Du,hDu,hu⟩ := A.uniform_remainder_C1_bound d.B g r hD + obtain ⟨V,hV,hv⟩ := d.perturbed_phase_C1_bound + refine ⟨min pt 1,wt,mt,lt_min hpt zero_lt_one,hwt,hmt,?_⟩ + intro Dw hDw + obtain ⟨R,hR,hampBound⟩ := hamp Dw Du hDw hDu + let T := max R V + have hT : 0 ≤ T := (zero_le_one.trans hR).trans (le_max_left _ _) + obtain ⟨E,hE,hterm⟩ := d.B.primitive_term_background_C1_bound A hT + refine ⟨E,hE,?_⟩ + intro ell psi hell hpsi hs hclose hbpsi G hG hnear hGbound f hfphase hfamp a + have hampa := hampBound ell psi (fun i j => (hell i j).trans_le (min_le_left _ _)) + hpsi hs hclose hbpsi G hG hnear (hu G hG hGbound) + apply hterm (f.amplitude a) (f.phase a) (f.smoothAmplitude a) (f.smoothPhase a) + · intro i p hp + rw [hfamp] + have h := hampa i a p hp + exact ⟨h.1.trans (le_max_left _ _),h.2.trans (le_max_left _ _)⟩ + · intro i y hy + obtain ⟨p,hp,rfl⟩ := hy + rw [hfphase] + have h := hv ell (fun i j => (hell i j).le.trans (min_le_right _ _)) i a p hp + exact ⟨h.1.trans (le_max_right _ _),h.2.trans (le_max_right _ _)⟩ + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCycleConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCycleConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc05063afdcc888e672b3ef2118ae8e5c780d0fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformCycleConvexity.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCycleBounds +import OAI.Geometry.SurfaceImmersion.Atlas.UniformAtlasConvexPhases + +namespace OAI + +/-! Choose convex phases first, then choose the number of cycles from a +uniform primitive budget. Every partial metric has the required positive +Hessian, including when the primitive family differs between cycles. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_cycle_convexity {ι : Type*} [Fintype ι] + (g : SmoothMetric M) {c C K : ℝ} (hc : 0 < c) (hC : 0 ≤ C) (hK : 0 ≤ K) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ ∀ D : ℝ, 0 ≤ D → + ∃ N : ℕ, 0 < N ∧ ∀ (g₀ : SmoothMetric M), + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) → + ∀ (u : ∀ p : M, CovariantTwoTensor p) (d : SmoothPrimitiveFamily ι u), + (∀ a, A.TensorWeightedBound 1 1 D (d.term a)) → + ∀ (k : ℕ) (s : Finset ι), + A.TensorWeightedBound 1 1 C (g₀.inner+((k : ℝ)/(N : ℝ)) • u) → + ∀ (i : A.centers) (p : M), p ∈ tsupport (A.weight i) → + ‖coordinateChart (i : M) p-coordinateChart (i : M) (i : M)‖ ≤ r → + ∀ ell : SmallModes.Base, ‖ell‖ ≤ K → ∀ v : SmallModes.Base, + (L/2)*(v.1^2+v.2^2) ≤ coordinateMetricHessian + (coordinateMetric (d.cycleMetric A g₀ N k s) (i : M)) + (centeredConvexPhase ell L (coordinateChart (i : M) (i : M))) + (coordinateChart (i : M) p) v v := by + obtain ⟨L,r,hL,hr,hphase⟩ := A.uniform_atlas_convex_phases g hc + (show 0 ≤ C+1 by linarith) hK houter + refine ⟨L,r,hL,hr,fun D hD => ?_⟩ + obtain ⟨N,hN,hcount⟩ := SmoothPrimitiveFamily.exists_cycle_count (ι := ι) D + refine ⟨N,hN,?_⟩ + intro g₀ hlower u d hb k s hpath i p hp hsmall ell hell v + have hbudget := d.cycleMetric_bound A hD 1 hb g₀ N k s hpath + have hbudget' : A.TensorWeightedBound 1 1 (C+1) (d.cycleMetric A g₀ N k s).inner := by + intro j + exact (hbudget j).mono_const (by linarith) + have hlower' : ∀ q w, c*g.inner q w w ≤ (d.cycleMetric A g₀ N k s).inner q w w := by + intro q w + exact (hlower q w).trans (d.cycleMetric_lower A g₀ N k s q w) + exact hphase _ hbudget' hlower' i p hp hsmall ell hell v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformFastNormalMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformFastNormalMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2f9be77fe55c19d791313553b93dd4560386607 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformFastNormalMargin.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.Immersion.ClosedSurface.DirectionStability +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets + +namespace OAI + +/-! The nonzero second-form margin persists at the polynomial C2 radius. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates PhaseGeometry + +theorem uniform_fast_normal_margin (R c A b : ℝ) (hc : 0 < c) (hA : 0 ≤ A) (hb : 0 < b) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ s : ℝ, 0 < s → s ≤ η → + ∀ F G : RField 4, ContDiff ℝ ∞ F → WeightedBound univ s 3 A F → ∀ x : Base, + ‖firstJetPair F x‖ ≤ R → + c ≤ NormalFrame.gramDet (firstJetPair F x).1 (firstJetPair F x).2 → + b ≤ ‖realSecondTensor F x‖ → + ‖firstJetPair F x-firstJetPair G x‖ ≤ s^4 → + ‖secondJetTriple F x-secondJetTriple G x‖ ≤ s^4 → + Function.Injective (fderiv ℝ G x) ∧ b/2 ≤ ‖realSecondTensor G x‖ := by + obtain ⟨ηn,C,hηn,hC,hn⟩ := secondTensor_z4_stability R c A hc hA + obtain ⟨ηg,hηg,_,hg⟩ := uniform_gram_neighborhood R c hc + let η := min 1 (min ηn (min ηg (b/(2*(C+1))))) + have hη : 0 < η := lt_min zero_lt_one (lt_min hηn (lt_min hηg (by positivity))) + refine ⟨η,hη,min_le_left _ _,?_⟩ + intro s hs hsη F G hF hFb x hR hcF hbF hdiff hsecond + have hs1 : s ≤ 1 := hsη.trans (min_le_left _ _) + have hs4 : s^4 ≤ s := by simpa only [pow_one] using pow_le_pow_of_le_one hs.le hs1 (by norm_num : 1 ≤ 4) + have hs2 : s^2 ≤ s := by simpa only [pow_one] using pow_le_pow_of_le_one hs.le hs1 (by norm_num : 1 ≤ 2) + have hsn : s^4 ≤ ηn := hs4.trans (hsη.trans ((min_le_right _ _).trans (min_le_left _ _))) + have hsg : s^4 ≤ ηg := hs4.trans (hsη.trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))) + have hsb : s ≤ b/(2*(C+1)) := hsη.trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + have hsmall : C*s^2 ≤ b/2 := by + have hh := (le_div_iff₀ (by positivity : 0 < 2*(C+1))).mp hsb + nlinarith [mul_le_mul_of_nonneg_left hs2 hC] + have hnormjet := (coordinate_jets_variation isOpen_univ (convex_univ : Convex ℝ (univ : Set Base)) + hF.contDiffOn hs hA hFb (mem_univ x) (mem_univ x)).2.1 + have hbound := hn s hs hs1 hsn F G x hR hcF hdiff hnormjet hsecond + have hgram := (hg _ _ hR hcF (hdiff.trans hsg)).2 + refine ⟨injective_of_gramDet_ne_zero _ ((half_pos hc).trans_le hgram).ne',?_⟩ + have hh := norm_sub_norm_le (realSecondTensor F x) (realSecondTensor G x) + linarith [hbound.trans hsmall] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformGlobalQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformGlobalQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..874196ba5eafac69ccf9d10b434f944e41f6c873 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformGlobalQuadraticCancellation.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledGlobalQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticSolverInputBounds +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseReadBounds + +namespace OAI + +/-! Fixed geometric phase solvers give uniform quadratic correction constants. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance uniformQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem uniform_global_quadratic_cancellation + {n : A.centers → ℕ} + (P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (hφ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (φ i)) + (S : ι → Set M) (hS : ∀ i, IsClosed (S i)) + (c₀ : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) 1 1) + (I : A.centers → RealModes.QuadraticLabel ι → ℕ → ℝ) + (hI : ∀ k l m, 1 ≤ I k l m) + (hi : ∀ k l m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c₀ k l).e.target, + ‖iteratedFDerivWithin ℝ j (c₀ k l).e.symm (c₀ k l).e.target x‖ ≤ I k l m) + (a : ℕ → ℝ) (ha : ∀ m, 0 ≤ a m) (q : ℕ) : + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (τ δ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → + ∀ (Z : ι → M → Fin 4 → ℂ) (_hZ : ∀ i, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z i)), + (∀ i, tsupport (Z i) ⊆ S i) → + (∀ k i m, WeightedEstimates.WeightedBound univ s (m+1) (a m*(δ*τ)) (A.vectorPlaneRead k (Z i))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2 * Cv m) W) ∧ + (∀ m, A.TensorWeightedBound τ m (δ^2 * (τ/s)^(q+1) * Ct m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun i => A.vectorPlaneRead k (φ i)) + (fun i => A.vectorPlaneRead k (Z i)) x))) := by + classical + choose R hR hr using fun m => A.phase_read_gradient_bound φ hφ m + choose B hB hb using fun k m => A.global_quadratic_solver_input_bound (ι := ι) k m (a m) (R m) + obtain ⟨Dv,Dt,hDv,hDt,hsolve⟩ := A.scaled_global_quadratic_cancellation (ι := ι) P + let b := fun k l m => tensorChartBudget m (I k l m) (I k l (m+1)) * B k m + have hbn (k l m) : 0 ≤ b k l m := mul_nonneg + (tensorChartBudget_nonneg m (zero_le_one.trans (hI k l m)) (zero_le_one.trans (hI k l (m+1)))) (hB k m) + let cbase := fun k l => (c₀ k l).atUnperturbedScale 1 1 le_rfl + let Cv := fun m => Dv m * ∑ k : A.centers, ∑ l, + (cbase k l).sizeFactor q m * b k l (PolynomialSolveData.inputOrder (P := P k) q m) + let Ct := fun m => Dt m * ∑ k : A.centers, ∑ l, + (cbase k l).residualFactor q m * b k l (PolynomialSolveData.inputOrder (P := P k) q m) + refine ⟨Cv,Ct,?_,?_,?_⟩ + · intro m + exact mul_nonneg (hDv m) (Finset.sum_nonneg (fun k _ => Finset.sum_nonneg + (fun l _ => mul_nonneg ((cbase k l).sizeFactor_nonneg q m) (hbn k l _)))) + · intro m + exact mul_nonneg (hDt m) (Finset.sum_nonneg (fun k _ => Finset.sum_nonneg + (fun l _ => mul_nonneg ((cbase k l).residualFactor_nonneg q m) (hbn k l _)))) + · intro τ δ s hτ hs hτs hs1 hδ Z hZ hSZ hz + let c := fun k l => (c₀ k l).atUnperturbedScale τ s hs1 + have hn (k l m) : (c k l).norm + (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m ≤ δ^2 * b k l m := by + exact hb k m τ δ s φ Z hφ hZ S hS hSZ hτ hs hτs hs1 hδ (ha m) (hR m) + (fun i => hz k i m) (fun i v hv => hr m k i s hs.le hs1 v hv) + l (c k l) (I k l) (hI k l) (hi k l) + obtain ⟨W,hW,hsize,hres⟩ := hsolve F hF φ Z hφ hZ S hS hSZ c hτ hs hτs hs1 δ q b hn + exact ⟨W,hW,hsize,hres⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformInitialScale.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformInitialScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..812fc10c52ca7b793a569454a939a034bff7fb15 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformInitialScale.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPositiveTensorBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasBackgroundLowerBound +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap + +namespace OAI + +/-! One scalar makes every immersion with the fixed atlas budget short. +The scale is selected before any finite boundary-intersection set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_induced_metric_upper_bound (g : SmoothMetric M) {C : ℝ} (hC : 0 ≤ C) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F : M → Space, ContMDiff planeModel spaceModel ∞ F → + A.WeightedBound 1 1 C F → ∀ (p : M) (v : TangentSpace planeModel p), + inducedForm F p v v ≤ D*g.inner p v v := by + classical + obtain ⟨T,B,hT,hpos,hdet,_,hmem,_,_⟩ := A.metric_plane_read_bounds g + obtain ⟨c,hc,hcoercive⟩ := PhaseMean.compact_positive_tensor_lower_bound hT (by + intro H hH + exact (tensor_positive_iff H).mpr ⟨hpos H hH,hdet H hH⟩) + choose R hR hread using fun i : A.centers => A.vectorChartRead_bound (V := Space) i 1 + let R0 : ℝ := ∑ i : A.centers, R i + have hR0 : 0 ≤ R0 := Finset.sum_nonneg (fun i _ => hR i) + let D := (R0*C)^2/c + have hD : 0 ≤ D := div_nonneg (sq_nonneg _) hc.le + refine ⟨D,hD,?_⟩ + intro F hF hb p v + obtain ⟨i,hi⟩ := A.mem_some_weightCore p + have hp : p ∈ tsupport (A.weight i) := subset_tsupport _ (A.weightCore_nonzero i hi) + let u := surfaceDifferential (chart (i : M)) p v + have hlower : c*‖u‖^2 ≤ g.inner p v v := by + have hm := hcoercive (A.tensorPlaneRead i g.inner + (planeCoordinateIsometry (chart (i : M) p))) + (hmem i _ ⟨chart (i : M) p,⟨p,hp,rfl⟩,rfl⟩) (planeCoordinateIsometry u) + have hs : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i hp + rw [A.tensorPlaneRead_metric_on_weight g i hp] at hm + have he := coordinateMetric_pullback_chart g (i : M) hs v v + rw [A.coordinateChart_differential i (A.weight_support i hp)] at he + change PhaseMean.evaluate _ (planeCoordinateIsometry u) (planeCoordinateIsometry u) = _ at he + rw [he,planeCoordinateIsometry.norm_map] at hm + exact hm + have hdr := hread i F 1 C zero_lt_one le_rfl hC hF hb + have hdn := hdr 1 le_rfl (chart (i : M) p) (mem_univ _) + simp only [one_pow,one_mul,iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] at hdn + have hRi : R i ≤ R0 := Finset.single_le_sum (fun j _ => hR j) (Finset.mem_univ i) + have hdiff : ‖surfaceDifferential F p v‖ ≤ (R0*C)*‖u‖ := by + rw [A.vectorChartRead_differential i hF hp] + change ‖fderiv ℝ (A.vectorChartRead i F) (chart (i : M) p) u‖ ≤ _ + exact ((fderiv ℝ (A.vectorChartRead i F) (chart (i : M) p)).le_opNorm u).trans + (mul_le_mul_of_nonneg_right (hdn.trans (mul_le_mul_of_nonneg_right hRi hC)) (norm_nonneg u)) + have hsq : ‖surfaceDifferential F p v‖^2 ≤ (R0*C)^2*‖u‖^2 := by + nlinarith [norm_nonneg (surfaceDifferential F p v),mul_nonneg (mul_nonneg hR0 hC) (norm_nonneg u)] + calc + inducedForm F p v v = ‖surfaceDifferential F p v‖^2 := real_inner_self_eq_norm_sq _ + _ ≤ (R0*C)^2*‖u‖^2 := hsq + _ = D*(c*‖u‖^2) := by dsimp [D]; field_simp + _ ≤ D*g.inner p v v := mul_le_mul_of_nonneg_left hlower hD + +theorem uniform_initial_short_scale (g : SmoothMetric M) {C : ℝ} (hC : 0 ≤ C) : + ∃ r : ℝ, 0 < r ∧ ∀ F : M → Space, ContMDiff planeModel spaceModel ∞ F → + A.WeightedBound 1 1 C F → ∀ (p : M) (v : TangentSpace planeModel p), + inducedForm (r • F) p v v ≤ (1/2 : ℝ)*g.inner p v v := by + obtain ⟨D,hD,hbound⟩ := A.uniform_induced_metric_upper_bound g hC + let r := Real.sqrt (1/(2*(D+1))) + have hr : 0 < r := Real.sqrt_pos.mpr (by positivity) + have hr2 : r^2 = 1/(2*(D+1)) := Real.sq_sqrt (by positivity) + have hsmall : r^2*D ≤ (1/2 : ℝ) := by + rw [hr2,div_mul_eq_mul_div,one_mul] + apply (div_le_iff₀ (by positivity : 0 < 2*(D+1))).2 + nlinarith + refine ⟨r,hr,?_⟩ + intro F hF hb p v + have he := congrArg (fun T : ∀ p : M, CovariantTwoTensor p => T p v v) + (inducedTensor_const_smul hF r) + change inducedForm (r • F) p v v = r^2*inducedForm F p v v at he + rw [he] + have hg : 0 ≤ g.inner p v v := by + by_cases hv : v = 0 + · simp [hv] + · exact (g.pos p v hv).le + exact (mul_le_mul_of_nonneg_left (hbound F hF hb p v) (sq_nonneg r)).trans + (by rw [← mul_assoc]; exact mul_le_mul_of_nonneg_right hsmall hg) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLinearQuadraticSolvers.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLinearQuadraticSolvers.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a6e7fae309e31dfc50b583ca69bf6ab8945f0a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLinearQuadraticSolvers.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearPolynomialSolver +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticFamily +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedQuadraticFamily +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! One fixed family of actual polynomial solvers for every doubled and +mixed phase in the local three-phase construction. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseGeometry + +theorem uniform_linear_quadratic_solvers {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + (φ : Fin 3 → Base → ℝ) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (S : Fin 3 → Compacts Base) + (Ω U K : QuadraticLabel (Fin 3) → Set SmallModes.Base) + (hΩ : ∀ l, IsOpen (Ω l)) (hU : ∀ l, IsOpen (U l)) (hK : ∀ l, IsCompact (K l)) + (hUK : ∀ l, U l ⊆ K l) (hKΩ : ∀ l, K l ⊆ Ω l) + (ξ : QuadraticLabel (Fin 3) → SmallModes.Base) (hξ : ∀ l, ξ l ≠ 0) + (hImm : ∀ l x, x ∈ Ω l → Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ l x, x ∈ Ω l → Good + (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) (ξ l)) + (hS : ∀ l, (modeSupport (quadraticCompacts S l) : Set SmallModes.Base) ⊆ U l) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) (hU₀K : U₀ ⊆ K₀) + (hSU₀ : ∀ l, (quadraticCompacts S l : Set Base) ⊆ U₀) + (hphase : ∀ l, coordinatePhase (quadraticFamilyPhase φ l) = phaseLinear (ξ l)) : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ (H : QuadraticLabel (Fin 3) → ℕ → ℝ) (Pjet : ℕ → ℝ), + (∀ l m, 1 ≤ H l m) → (∀ m, 0 ≤ Pjet m) → + ∃ C D J I : QuadraticLabel (Fin 3) → ℕ → ℝ, + (∀ l m, 0 ≤ C l m) ∧ (∀ l m, 0 ≤ D l m) ∧ + (∀ l m, 1 ≤ J l m) ∧ (∀ l m, 1 ≤ I l m) ∧ + ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) (C₀ : ℝ), + 0 ≤ C₀ → C₀ < ρ₀ → + WeightedBound univ 1 2 C₀ + ((G ∘ planeCoordinateIsometry.symm)-(F ∘ planeCoordinateIsometry.symm)) → + ∀ s : ℝ≥0, 0 < (s : ℝ) → s ≤ 1 → + (∀ l m, WeightedBound (linearPhaseChart (ξ l) (hξ l) (U l) (hU l)).target + s (m+1) (H l (m+1)) (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart (ξ l) (hξ l) (U l) (hU l)).symm))) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j (Pjet m/(s : ℝ)^(j-2)) G) → + ∀ τ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + ∃ c : ∀ l, PolynomialSolveData P ε G hG (quadraticFamilyPhase φ l) + (quadraticCompacts S l) τ s, + (∀ l, (c l).C = C l) ∧ (∀ l, (c l).D = D l) ∧ (∀ l, (c l).J = J l) ∧ + (∀ l m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c l).e.target, + ‖iteratedFDerivWithin ℝ j (c l).e.symm (c l).e.target x‖ ≤ I l m) := by + classical + choose a ha hall using fun l => uniform_linear_polynomial_solver_all_profiles P hP hF + (hΩ l) (hU l) (hK l) (hUK l) (hKΩ l) (hξ l) (hImm l) (hgood l) + (quadraticCompacts S l) (hS l) hU₀ K₀ hU₀K (hSU₀ l) + (quadraticFamilyPhase_smooth hφ l) (hphase l) + obtain ⟨ρ,hρ,_,hρa⟩ := finite_positive_threshold a ha + refine ⟨ρ,hρ,?_⟩ + intro H Pjet hH hPjet + choose Q C D J I hQ hC hD hJ hI hd using fun l => hall l (H l) Pjet (hH l) hPjet + refine ⟨C,D,J,I,hC,hD,hJ,hI,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ ε hτ hτs hε hε1 + have hex (l : QuadraticLabel (Fin 3)) := + (hd l G hG C₀ hC₀ (hCρ.trans_le (hρa l)) hclose s hs hs1 + (hjet l) hpref τ ε hτ hτs hε hε1).2 + choose c _ _ _ hc hd hj hi using hex + exact ⟨c,hc,hd,hj,hi⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLocalQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLocalQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0506d97bec16669127bbbc35d0c757b4c8c4e555 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformLocalQuadraticCancellation.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CombinedQuadraticSolverInput +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialProfileTransfer + +namespace OAI + +/-! Uniform cancellation of the actual perturbed quadratic modes on a local +domain. Numeric profiles and the compact jet range determine the constants +before the map, amplitudes and scales are supplied. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem uniform_local_quadratic_cancellation {n : ℕ} {ι : Type*} + [Fintype ι] [DecidableEq ι] {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs O) + (B F M A : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hF : ∀ m, 0 ≤ F m) + (hM : ∀ m, 0 ≤ M m) (hA : ∀ m, 0 < A m) + (C D J I : QuadraticLabel ι → ℕ → ℝ) + (hC : ∀ l m, 0 ≤ C l m) (hJ : ∀ l m, 1 ≤ J l m) + (hI : ∀ l m, 1 ≤ I l m) (q : ℕ) : + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (φ : ι → Base → ℝ) (_hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (K : ι → Compacts Base) (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) + (s : ℝ≥0) (δ τ ε : ℝ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ tensorLoss P ≤ 1 → + Set.MapsTo (lowJet G) U Q → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + (∀ i m, WeightedBound Set.univ s (m + tensorOrder P + 1) + (A m * (δ * τ)) (H i)) → + (∀ i m v, WeightedBound U s (m + tensorOrder P) (F m) + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) → + (∀ i m v, ‖v‖ ≤ 1 → WeightedBound Set.univ s m (M m) + (SmallModes.coordDeriv v (coordinatePhase (φ i)))) → + (∀ l, (quadraticCompacts K l : Set Base) ⊆ U) → + ∀ (c : ∀ l, PolynomialSolveData P ε G hG (quadraticFamilyPhase φ l) + (quadraticCompacts K l) τ s), + (∀ l, (c l).C = C l) → (∀ l, (c l).D = D l) → (∀ l, (c l).J = J l) → + (∀ l m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c l).e.target, + ‖iteratedFDerivWithin ℝ j (c l).e.symm (c l).e.target x‖ ≤ I l m) → + ∃ V : RField 4, ContDiff ℝ ∞ V ∧ + tsupport V ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m (δ ^ 2 * Cv m) V) ∧ + (∀ m, WeightedBound Set.univ τ m + (δ ^ 2 * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * Ct m) + (coordinateFullLinearized P ε G V + + combinedNonzeroQuadratic P ε G φ (fun i => H i) τ)) := by + classical + choose E hE he using fun m => combined_quadratic_solver_input_bound (ι := ι) + hU hO hQ hQO P hP m (B m) (F m) (M m) (A m) (hB m) (hF m) (hM m) (hA m) + let b : QuadraticLabel ι → ℕ → ℝ := fun l m => + tensorChartBudget m (I l m) (I l (m + 1)) * E m + have hb (l : QuadraticLabel ι) (m : ℕ) : 0 ≤ b l m := + mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans (hI l m)) + (zero_le_one.trans (hI l (m + 1)))) (hE m) + let Cv : ℕ → ℝ := fun m => ∑ l, + PolynomialSolveData.sizeProfile P (C l) (D l) (J l) q m * + b l (PolynomialSolveData.inputOrder (P := P) q m) + let Ct : ℕ → ℝ := fun m => ∑ l, + PolynomialSolveData.residualProfile P (C l) (D l) (J l) q m * + b l (PolynomialSolveData.inputOrder (P := P) q m) + refine ⟨Cv,Ct,?_,?_,?_⟩ + · intro m + exact Finset.sum_nonneg (fun l _ => mul_nonneg + (PolynomialSolveData.sizeProfile_nonneg P (C l) (D l) (J l) (hC l) + (fun j => zero_le_one.trans (hJ l j)) q m) (hb l _)) + · intro m + exact Finset.sum_nonneg (fun l _ => mul_nonneg + (PolynomialSolveData.residualProfile_nonneg P (C l) (D l) (J l) (hC l) + (fun j => zero_le_one.trans (hJ l j)) q m) (hb l _)) + · intro G hG φ hφ K H s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall + hGQ hGb hHb hφb hφm hKU c hc hd hj hi + let f := fun l => combinedQuadraticTarget (c l).openU (c l).openO P + (c l).smoothP hG φ hφ H (c l).mapsG l (c l).supportU ε τ 0 + have hf (l : QuadraticLabel ι) : f l = + combinedQuadraticTarget hU hO P hP hG φ hφ H + (fun _ hx => hQO (hGQ hx)) l (hKU l) ε τ 0 := + combinedQuadraticTarget_domain_independent (c l).openU hU (c l).openO hO + P (c l).smoothP hP hG φ hφ H (c l).mapsG + (fun _ hx => hQO (hGQ hx)) l (c l).supportU (hKU l) ε τ 0 + have hn (l : QuadraticLabel ι) (m : ℕ) : + (c l).norm (f l) m ≤ δ ^ 2 * b l m := by + rw [hf l] + simpa only [b, mul_assoc] using he m hG φ hφ K H s δ τ ε + hδ hτ hs hτs hs1 hε hε1 hsmall hGQ (hGb m) (fun i => hHb i m) + (fun i => hφb i m) (fun i => hφm i m) l (hKU l) (c l) (I l) (hI l) (hi l) + obtain ⟨V,hV,hsp,hsize,hres⟩ := scaled_polynomial_quadratic_cancellation + P ε δ hG φ hφ K H c hτ hs hτs hs1 hε hsmall q b hn + have hcv (m : ℕ) : (∑ l, (c l).sizeFactor q m * + b l (PolynomialSolveData.inputOrder (P := P) q m)) = Cv m := by + apply Finset.sum_congr rfl + intro l _ + rw [(c l).sizeFactor_eq_sizeProfile (hc l) (hd l) (hj l)] + have hct (m : ℕ) : (∑ l, (c l).residualFactor q m * + b l (PolynomialSolveData.inputOrder (P := P) q m)) = Ct m := by + apply Finset.sum_congr rfl + intro l _ + rw [(c l).residualFactor_eq_residualProfile (hc l) (hd l) (hj l)] + exact ⟨V,hV,hsp,(fun m => by simpa only [hcv m] using hsize m), + (fun m => by simpa only [hct m] using hres m)⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformMetricPathBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformMetricPathBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..761b3c148ac48fa94ab26311756afe6e8bb3c1ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformMetricPathBounds.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ShortMetricPath +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalizationBounds + +namespace OAI + +/-! First-order metric bounds fixed before finite spherical modifications. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance pathBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance pathBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance pathBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance pathBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance pathBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance pathBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma exists_tensorWeighted_bound (m : ℕ) {T : ∀ p : M, CovariantTwoTensor p} + (hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p))) : + ∃ C : ℝ, 0 ≤ C ∧ A.TensorWeightedBound 1 m C T := by + classical + choose C hC hb using fun i : A.centers => compact_smooth_bound + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hT) + (localize_compact (i : M) (A.weight_support i) (A.bundleComponent A.tensorTriv i T)) m + refine ⟨∑ i, C i, Finset.sum_nonneg (fun i _ => hC i), fun i => ?_⟩ + exact (hb i).mono_const (Finset.single_le_sum (fun j _ => hC j) (Finset.mem_univ i)) + +lemma uniform_induced_tensor_bound {C : ℝ} (hC : 0 ≤ C) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F : M → Space, ContMDiff planeModel spaceModel ∞ F → + A.WeightedBound 1 (m+1) C F → A.TensorWeightedBound 1 m D (inducedTensor F) := by + obtain ⟨D,hD,hbound⟩ := A.global_cubic_remainder_bound m 0 C le_rfl hC + refine ⟨D,hD,fun F hF hb => ?_⟩ + have hz : A.WeightedBound 1 (m+1) (0*(1*1)) (0 : M → Space) := by + intro i + simp only [zero_mul] + change WeightedEstimates.WeightedBound univ 1 (m+1) 0 (localize (i : M) (A.weight i) 0) + have he : localize (i : M) (A.weight i) (0 : M → Space) = 0 := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> simp [localize,hx] + rw [he] + exact weightedBound_zero univ 1 (m+1) + have ht := hbound 1 1 zero_lt_one le_rfl zero_le_one le_rfl 0 F + contMDiff_const hF hz (by simpa only [one_pow,mul_one] using hb) + have he : linearMetricTensor (0 : M → Space) F = 0 := by + funext p + ext v w + change inner ℝ (show Space from mfderiv planeModel spaceModel (0 : M → Space) p v) + (show Space from mfderiv planeModel spaceModel F p w) + + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) + (show Space from mfderiv planeModel spaceModel (0 : M → Space) p w) = 0 + have hd : (mfderiv planeModel spaceModel (fun _ : M => (0 : Space)) p : + TangentSpace planeModel p →L[ℝ] Space) = 0 := mfderiv_const + change inner ℝ ((mfderiv planeModel spaceModel (fun _ : M => (0 : Space)) p) v) + (show Space from mfderiv planeModel spaceModel F p w) + + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) + ((mfderiv planeModel spaceModel (fun _ : M => (0 : Space)) p) w) = 0 + rw [hd] + change inner ℝ (0 : Space) (show Space from mfderiv planeModel spaceModel F p w) + + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (0 : Space) = 0 + rw [inner_zero_left,inner_zero_right,add_zero] + simpa only [he,zero_add,one_pow,div_one,mul_one] using ht + +lemma uniform_short_path_tensor_bound (g : SmoothMetric M) {C : ℝ} (hC : 0 ≤ C) + (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (hshort : ∀ p v, inducedForm F p v v ≤ (1/2 : ℝ)*g.inner p v v), + A.WeightedBound 1 (m+1) C F → ∀ s : ℝ, ∀ hs : 0 ≤ s, s ≤ 1 → + A.TensorWeightedBound 1 m D (A.shortPathMetric g hF hshort hI s hs).inner := by + obtain ⟨D,hD,hb⟩ := A.uniform_induced_tensor_bound hC m + obtain ⟨E,hE,he⟩ := A.exists_tensorWeighted_bound m g.contMDiff + refine ⟨D+E,add_nonneg hD hE,?_⟩ + intro F hF hI hshort hFC s hs hs1 + have hleft := A.tensorWeightedBound_const_smul (A.inducedTensor_smooth hF) (hb F hF hFC) (1-s) + have hright := A.tensorWeightedBound_const_smul g.contMDiff he s + have hsum := A.tensorWeightedBound_add (A.inducedTensor_smooth hF).const_smul_section + g.contMDiff.const_smul_section zero_le_one hleft hright + have hid : (A.shortPathMetric g hF hshort hI s hs).inner = + (1-s) • inducedTensor F+s • g.inner := by + funext p + ext v w + exact A.shortPathMetric_apply g hF hshort hI s hs p v w + rw [hid] + intro i + apply (hsum i).mono_const + rw [abs_of_nonneg (sub_nonneg.mpr hs1),abs_of_nonneg hs] + nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformOrderedCycleConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformOrderedCycleConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..87c249e7a827e4981847b3a68267574ded97670e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformOrderedCycleConvexity.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularCycleMetrics +import OAI.Geometry.SurfaceImmersion.Geometry.UniformCycleConvexity + +namespace OAI + +/-! The preselected convex phases apply to the actual ordered prefix metrics. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + theorem uniform_ordered_cycle_convexity (m : ℕ) + (g : SmoothMetric M) {c C K : ℝ} (hc : 0 < c) (hC : 0 ≤ C) (hK : 0 ≤ K) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ ∀ D : ℝ, 0 ≤ D → + ∃ N : ℕ, 0 < N ∧ ∀ (g₀ : SmoothMetric M), + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) → + ∀ (u : ∀ p : M, CovariantTwoTensor p) + (f : Fin N → SmoothPrimitiveFamily (Fin m) u), + (∀ k a, A.TensorWeightedBound 1 1 D ((f k).term a)) → + (∀ k : Fin N, A.TensorWeightedBound 1 1 C (g₀.inner+((k.val : ℝ)/(N : ℝ)) • u)) → + ∀ d : CircularPrimitiveFamily A (Fin (N*m)), + (∀ a p, d.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) → + (∀ a, d.phase a = (f a.divNat).phase a.modNat) → + (∀ a, d.convexPart a = L) → (∀ a, ‖d.linearPart a‖ ≤ K) → + (∀ a, d.chartRadius a ≤ r) → + ∀ a, d.ConvexMetric (d.prefixMetric g₀ a.castSucc) a := by + obtain ⟨L,r,hL,hr,hchoose⟩ := A.uniform_cycle_convexity (ι := Fin m) g hc hC hK houter + refine ⟨L,r,hL,hr,?_⟩ + intro D hD + obtain ⟨N,hN,hconvex⟩ := hchoose D hD + refine ⟨N,hN,?_⟩ + intro g₀ hlower u f hb hpath d ha hp hLpart hlinear hradius a + obtain ⟨⟨k,j⟩,rfl⟩ := finProdFinEquiv.surjective a + change ∀ p ∈ tsupport (A.weight (d.curves (finProdFinEquiv (k,j))).index), + ‖coordinateChart ((d.curves (finProdFinEquiv (k,j))).index : M) p- + coordinateChart ((d.curves (finProdFinEquiv (k,j))).index : M) (d.curves (finProdFinEquiv (k,j))).index‖ ≤ _ → + ∀ v : Base, v ≠ 0 → _ + intro p hpa hpr v hv + rw [d.prefixMetric_cycle f ha hp g₀ k j,hLpart] + have hbound := hconvex g₀ hlower u (f k) (hb k) k.val + (CircularPrimitiveFamily.prefixIndices j.castSucc) (hpath k) + (d.curves (finProdFinEquiv (k,j))).index p hpa (hpr.trans (hradius _)) + (d.linearPart (finProdFinEquiv (k,j))) (hlinear _) v + have hsq : 0 < v.1^2+v.2^2 := by + by_contra hn + have h1 : v.1 = 0 := sq_eq_zero_iff.mp (by nlinarith [sq_nonneg v.2]) + have h2 : v.2 = 0 := sq_eq_zero_iff.mp (by nlinarith [sq_nonneg v.1]) + exact hv (Prod.ext h1 h2) + exact (mul_pos (half_pos hL) hsq).trans_le hbound + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPerturbedLocalStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPerturbedLocalStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b8eed3a2c49863ef9f5de551c15d6f66f98381d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPerturbedLocalStep.lean @@ -0,0 +1,186 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalPerturbedMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeFamily +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformSeed +import OAI.Geometry.SurfaceImmersion.Geometry.UniformLocalQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedIncrementEstimate +import OAI.Geometry.SurfaceImmersion.Atlas.FastPhaseBounds + +namespace OAI + +/-! An actual supported increment for a polynomial perturbation of the metric. +All thresholds and derivative profiles precede the map and the slow scales. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_perturbed_local_step {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + {U D : Set Base} {Q : Set LowJet} (hU : IsOpen U) (hD : IsOpen D) + (hDU : D ⊆ U) (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + (p : ι → ChartedMeanProfile P) {ρ R r r₀ : ℝ} + (hρ : 0 < ρ) (hgap : r₀ < r) (q : ℕ) + (B F M C : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hF : ∀ m, 0 ≤ F m) + (hM : ∀ m, 0 ≤ M m) (hC : ∀ m, 1 ≤ C m) + (Cq Dq Jq Iq : QuadraticLabel ι → ℕ → ℝ) + (hCq : ∀ l m, 0 ≤ Cq l m) (hJq : ∀ l m, 1 ≤ Jq l m) + (hIq : ∀ l m, 1 ≤ Iq l m) : + ∃ ν η₀ : ℝ, 0 < ν ∧ 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∃ S E : ℕ → ℝ, (∀ m, 0 ≤ S m) ∧ (∀ m, 0 ≤ E m) ∧ + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (reference H : SmallModes.Base → Tensor), ContDiff ℝ ∞ H → + (∀ x, ‖H x - reference x‖ ≤ r₀) → + (∀ m, WeightedBound univ s m (C m) H) → + ∀ {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (φ : ι → Base → ℝ) (_hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (K : ι → Compacts Base) (ε τ δ : ℝ), + 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → 0 < δ → δ ≤ τ → δ / τ ≤ ν → + τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + MapsTo (lowJet G) U Q → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + (∀ i m v, WeightedBound U s (m + tensorOrder P) (F m) + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) → + (∀ i m v, ‖v‖ ≤ 1 → WeightedBound univ s m (M m) + (SmallModes.coordDeriv v (coordinatePhase (φ i)))) → + (∀ l, (quadraticCompacts K l : Set Base) ⊆ U) → + ∀ (c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s) + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), + (∀ i, (p i).Fits (d i)) → + (∀ A, ContDiff ℝ ∞ A → InTrialBall univ reference r A → + ∀ x ∈ planeCoordinateIsometry.symm ⁻¹' D, chartedFamilyLeading d hρ A x = A x) → + ∀ (cq : ∀ l, PolynomialSolveData P ε G hG (quadraticFamilyPhase φ l) + (quadraticCompacts K l) τ s), + (∀ l, (cq l).C = Cq l) → (∀ l, (cq l).D = Dq l) → (∀ l, (cq l).J = Jq l) → + (∀ l m j, 1 ≤ j → j ≤ m → ∀ x ∈ (cq l).e.target, + ‖iteratedFDerivWithin ℝ j (cq l).e.symm (cq l).e.target x‖ ≤ Iq l m) → + ∃ W : RField 4, ContDiff ℝ ∞ W ∧ + tsupport W ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound univ τ m (S m * δ * τ) W) ∧ + (∀ m, WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (E m * (δ * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) + δ ^ 3 / τ)) + (coordinateMetricMap P ε (fun x => G x + W (planeCoordinateIsometry x)) - + coordinateMetricMap P ε G - δ ^ 2 • H)) := by + classical + obtain ⟨β,κ,η₀,hη₀,hη₁,hm⟩ := uniform_perturbed_mean_on (hD.preimage planeCoordinateIsometry.symm.continuous) + (R := R) p hρ hgap q q hC + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + let T : ℕ → ℝ := fun m => max 1 (sizeBound L C β q (PolynomialSolveData.inputOrder (P := P) q m)) + have hT (m : ℕ) : 0 ≤ T m := zero_le_one.trans (le_max_left _ _) + choose Xb Xe hXb hXe hx using fun m => uniform_charted_free_family_all_inputs + (R := R) p hρ q m (T m) + choose Ab hAb ha using fun i m => uniform_charted_seed_bound (R := R) (p i) hρ q m (T m) + let A : ℕ → ℝ := fun m => 1 + ∑ i, Ab i (m + tensorOrder P + 1) + have hA (m : ℕ) : 0 < A m := by + dsimp [A] + exact add_pos_of_pos_of_nonneg zero_lt_one + (Finset.sum_nonneg fun i _ => zero_le_one.trans (hAb i _)) + obtain ⟨Yb,Ye,hYb,hYe,hy⟩ := uniform_local_quadratic_cancellation hU isOpen_univ hQ + (subset_univ _) P hP B F M A hB hF hM hA Cq Dq Jq Iq hCq hJq hIq q + let Zb : ℕ → ℝ := fun m => 1 + Yb m + have hZb (m : ℕ) : 0 < Zb m := add_pos_of_pos_of_nonneg zero_lt_one (hYb m) + obtain ⟨ν₀,Q',hν₀,hQ',hQQ',_,hsegment⟩ := + free_forced_segment_margin hQ isOpen_univ (subset_univ _) + let ν := ν₀ / (Xb 2 + Zb 2) + have hν : 0 < ν := div_pos hν₀ (add_pos (lt_of_lt_of_le zero_lt_one (hXb 2)) (hZb 2)) + let j : ℕ → ℕ := fun m => m + tensorOrder P + 2 + choose N hN hd using fun m => perturbed_increment_estimate (ι := ι) hD hQ' P hP m + (B m + Xb (j m) + Zb (j m)) (Xb (j m)) (Zb (j m)) + (by have := hXb (j m); have := hZb (j m); have := hB m; linarith) + (lt_of_lt_of_le zero_lt_one (hXb (j m))) (hZb (j m)) + let E : ℕ → ℝ := fun m => Xe m + Ye m + |differenceBound L C β κ q m| + N m + refine ⟨ν,η₀,hν,hη₀,hη₁,(fun m => Xb m + Zb m),E,?_,?_,?_⟩ + · intro m + exact add_nonneg (zero_le_one.trans (hXb m)) (hZb m).le + · intro m + dsimp [E] + exact add_nonneg (add_nonneg (add_nonneg (zero_le_one.trans (hXe m)) (hYe m)) + (abs_nonneg _)) (hN m) + · intro s hs hs1 reference H hH hH0 hbH G hG φ hφ K ε τ δ hτ hτs hε hε1 + hδ hδτ hδν hsmall hGQ hGb hφb hφm hKU c d hfit hdecomp cq hcq hdq hjq hiq + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hηsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1 := hsmall.trans hη₁ + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨a,haS,haBall,haBound,haMean⟩ := + hm s hs hs1 reference H hH hH0 hbH d hfit hτ hτs hε hε1 hsmall hdecomp δ hδ q le_rfl + have haT (m : ℕ) : WeightedBound univ s (PolynomialSolveData.inputOrder (P := P) q m) + (T m) a := (haBound _).mono_const (le_max_right _ _) + let X := chartedFreeSum d hρ δ q a + have hXS : ContDiff ℝ ∞ X := (chartedFreeSum_smooth_support d hρ δ q a).1 + have hXsp := (chartedFreeSum_smooth_support d hρ δ q a).2 + have hx' (m : ℕ) := hx m d hfit hτ hs hτs hs1 hε hηsmall δ hδ.le a (hT m) haS haBall (haT m) + have hAb (i : ι) (m : ℕ) : WeightedBound univ s (m + tensorOrder P + 1) + (A m * (δ * τ)) ((d i).freeAmplitude hρ δ q a) := by + have hh := ha i (m + tensorOrder P + 1) (d i) (hfit i) hτ hs hτs hs1 hε hηsmall + δ hδ.le a (hT _) haS haBall (haT _) + apply hh.mono_const + apply mul_le_mul_of_nonneg_right _ (mul_nonneg hδ.le hτ.le) + exact (Finset.single_le_sum (fun i _ => zero_le_one.trans (hAb i _)) + (Finset.mem_univ i)).trans (le_add_of_nonneg_left zero_le_one) + obtain ⟨Y,hYS,hYsp,hYsize,hYres⟩ := hy hG φ hφ K + (fun i => (d i).freeAmplitude hρ δ q a) s δ τ ε hδ hτ hs hτs hs1 hε hε1 hηsmall + hGQ hGb hAb hφb hφm hKU cq hcq hdq hjq hiq + have hYbound (m : ℕ) : WeightedBound univ τ m (Zb m * δ ^ 2) Y := by + apply (hYsize m).mono_const + calc + δ ^ 2 * Yb m = Yb m * δ ^ 2 := mul_comm _ _ + _ ≤ Zb m * δ ^ 2 := mul_le_mul_of_nonneg_right + (le_add_of_nonneg_left zero_le_one) (sq_nonneg δ) + have hXbound (m : ℕ) : WeightedBound univ τ m (Xb m * δ * τ) X := by + simpa only [mul_assoc] using (hx' m).1 + have hseg := hsegment hU hG hXS hYS hGQ hτ hτ1 hδ.le hδτ + (zero_le_one.trans (hXb 2)) (hZb 2).le + ((mul_le_mul_of_nonneg_left hδν (add_nonneg (zero_le_one.trans (hXb 2)) (hZb 2).le)).trans + (by dsimp [ν]; rw [mul_div_cancel₀ _ (ne_of_gt (add_pos + (lt_of_lt_of_le zero_lt_one (hXb 2)) (hZb 2))) ])) + (hXbound 2) (hYbound 2) + refine ⟨X+Y,hXS.add hYS,(tsupport_add X Y).trans (union_subset hXsp hYsp),?_,?_⟩ + · intro m + exact free_forced_size hXS hYS hτ hδ.le hδτ (hZb m).le (hXbound m) (hYbound m) + · intro m + have hGτ := ((hGb m).shrink_scale hτ.le hτs).restrict_open_domain hU hD hDU + have hsegB := free_forced_lowJet_bounds hD hG hXS hYS hτ hτ1 hδ.le hδτ + (zero_le_one.trans (hXb (j m))) (hZb (j m)).le hGτ (hXbound (j m)) (hYbound (j m)) + have hGτ' : WeightedBound D τ (m + tensorOrder P) + (B m + Xb (j m) + Zb (j m)) (lowJet G) := + hGτ.mono_const (by have := hXb (j m); have := hZb (j m); linarith) + have hlin := ((hx' m).2).restrict_open (hD.preimage planeCoordinateIsometry.symm.continuous) + have hforced := (hYres m).restrict_open (hD.preimage planeCoordinateIsometry.symm.continuous) + have hmean := haMean m + have hmean' : WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (|differenceBound L C β κ q m| * δ ^ 2 * + (τ / s + ε / τ ^ tensorLoss P) ^ (q+1)) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q a) τ 0 - δ ^ 2 • H) := by + apply (hmean.shrink_scale hτ.le hτs).mono_const + calc + _ = differenceBound L C β κ q m * δ ^ 2 * + (τ / s + ε / τ ^ tensorLoss P) ^ (q+1) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_abs_self _) (sq_nonneg δ)) (pow_nonneg hη _) + have hforced' : WeightedBound (planeCoordinateIsometry.symm ⁻¹' D) τ m + (Ye m * δ^2 * (τ / s + ε / τ ^ tensorLoss P) ^ (q+1)) + (coordinateFullLinearized P ε G Y + + combinedNonzeroQuadratic P ε G φ (fun i => (d i).freeAmplitude hρ δ q a) τ) := by + convert hforced using 1 + ring + have hscaledH : ContDiff ℝ ∞ (δ ^ 2 • H) := by + change ContDiff ℝ ∞ (fun x => (δ ^ 2 : ℝ) • H x) + exact hH.const_smul (δ ^ 2 : ℝ) + exact hd m G φ (fun i => (d i).freeAmplitude hρ δ q a) Y (δ^2 • H) + hG hφ (fun i => ((d i).freeAmplitude hρ δ q a).contDiff) hYS + hscaledH + τ ε δ (τ / s + ε / τ ^ tensorLoss P) (Xe m) (Ye m) + |differenceBound L C β κ q m| q hτ hτ1 hε hε1 hδ hδτ hη + (zero_le_one.trans (hXe m)) (hYe m) (abs_nonneg _) + ((le_add_of_nonneg_left (div_nonneg hτ.le hs.le)).trans hηsmall) + (fun _ hx => hQQ' (hGQ (hDU hx))) hGτ' + (fun t ht x hx => hseg t ht (hDU hx)) hsegB + ((hXbound (j m)).mono_order (by dsimp [j]; omega)) + ((hYbound (j m)).mono_order (by dsimp [j]; omega)) hlin hforced' hmean' + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPreparedSphericalImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPreparedSphericalImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..258f4654ffdade2a2ebd78f3ace14582c36c6a7c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformPreparedSphericalImmersion.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedSphericalImmersion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasBackgroundLowerBound + +namespace OAI + +/-! Finite-point spherical preparation with all constants chosen before the +finite set, including domination of a fixed background metric. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_prepared_spherical_immersion (g : SmoothMetric M) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + ∃ D c : ℝ, 0 ≤ D ∧ 0 < c ∧ ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (a : P → A.centers) (G : M → Space), + (∀ p, A.weight (a p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel G p)) ∧ + A.WeightedBound 1 1 ε (G-F) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + ∀ p : P, G p = F p ∧ + fderiv ℝ (G ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) = + fderiv ℝ (F ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (a p : M)).symm) + (chartAt Plane (a p : M) p) v w = 0 := by + obtain ⟨D,hD,hprep⟩ := A.prepared_spherical_immersion hF hunit hImm + obtain ⟨δ,c,hδ,hc,hlower⟩ := A.uniform_background_metric_lower_bound g hF hImm + refine ⟨D,c,hD,hc,?_⟩ + intro P ε hε + obtain ⟨a,G,ha,hG,hu,hI,hclose,hC,hflat⟩ := hprep P (min ε δ) (lt_min hε hδ) + exact ⟨a,G,ha,hG,hu,hI,fun i => (hclose i).mono_const (min_le_left _ _),hC, + hlower G hG (fun i => (hclose i).mono_const (min_le_right _ _)),hflat⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformQuadraticLabelCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformQuadraticLabelCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..adbebc24a1a776b9cb6ec7261c0bdd85739cd281 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformQuadraticLabelCancellation.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformFiniteAtlasCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports + +namespace OAI + +/-! Quadratic cancellation with constants fixed before the finite phase labels. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance uniformLabelCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformLabelCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformLabelCancellationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformLabelCancellationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformLabelCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformLabelCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_global_quadratic_cancellation_on + {n : A.centers → ℕ} + (P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression) : + ∃ Dv Dt : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ {ι : Type*} [Fintype ι] [DecidableEq ι], + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) (hSZ : ∀ a, tsupport (Z a) ⊆ S a) + {τ : ℝ} {s : ℝ≥0} + (c : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.quadraticOverlapCompact S hS k l) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → ∀ q : ℕ, + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (Dv m * ∑ k : A.centers, ∑ l, (c k l).size (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ k : A.centers, ∑ l, (c k l).residual (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) x))) := by + classical + obtain ⟨Dv,Dt,hDv,hDt,h⟩ := A.uniform_finite_atlas_cancellation P + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro ι inst dec F hF φ Z hφ hZ S hS hSZ τ s c hτ hs hτs hs1 q + obtain ⟨W,hW,hsize,hres⟩ := h (ι := fun _ => RealModes.QuadraticLabel ι) F hF (A.globalQuadraticPhase φ) + (A.quadraticOverlapCompact S hS) c hτ hs hτs hs1 + (fun k l => Set.image_mono (A.quadraticOverlapCompact_subset S hS k l)) + (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ) q + refine ⟨W,hW,hsize,?_⟩ + intro m + rw [A.globalQuadraticTarget_expansion τ φ Z hφ hZ] + exact hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusActualStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusActualStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9523ca9d1ef896b6e8907034576c602b67df17b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusActualStep.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformRadiusSmoothedMetricIncrement +import OAI.Geometry.SurfaceImmersion.Correction.ActualSmoothedStep +import OAI.Geometry.SurfaceImmersion.Correction.UniformSmoothingInputProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds +import OAI.Geometry.SurfaceImmersion.Correction.GlobalSmoothedMetricStep +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothingSymmetry +import OAI.Geometry.SurfaceImmersion.Correction.SmoothedInputAdmissibility +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalInputRecurrence + +namespace OAI + +/-! Actual smoothed correction with one geometric neighborhood for all orders. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance uniformRadiusActualFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformRadiusActualFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformRadiusActualDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformRadiusActualDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformRadiusActualSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformRadiusActualSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The map and tensor radii and the metric norm bound are chosen once; +only analytic profiles and scale thresholds vary with the orders. -/ +theorem uniform_radius_actual_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ a ρ K : ℝ, 0 < a ∧ 0 < ρ ∧ 0 ≤ K ∧ + ∀ r : ℕ, ∃ D : ℝ, 0 ≤ D ∧ + ∀ (q : ℕ) (B₀ : ℝ), 0 ≤ B₀ → + ∃ (η : ℝ) (B T Dm Em : ℕ → ℝ), 0 < η ∧ η ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ (∀ m, 0 ≤ Dm m) ∧ (∀ m, 0 ≤ Em m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ δ δ' t s τ : ℝ, 0 < δ → 0 < δ' → δ' ≤ δ → + 0 < t → t ≤ 1 → 0 < s → s ≤ t → 0 < τ → τ ≤ s → τ/s ≤ η → δ ≤ τ → + d.A.InputBound t r B₀ G (normalizedTensorDefect g.inner δ G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner δ G) x - + d.A.tensorEncode g.inner x‖ ≤ a/8) → + D*B₀*(s/t)^r ≤ min (ρ/4) (a/8) → (δ'/δ)^2*K ≤ a/8 → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) U) ∧ + ∀ m C, 0 ≤ C → d.A.InputBound t m C G (normalizedTensorDefect g.inner δ G) → + d.A.TensorWeightedBound τ m + (normalizedStepBound r q B₀ (Dm m) (Em m) (B (m+1)) (T m) C δ δ' τ s t) + (normalizedTensorDefect g.inner δ' (G+U)-g.inner) := by + classical + obtain ⟨a,ρ,K,ha,hρ,hK,hall⟩ := d.uniform_radius_smoothed_increment_of_input hF + refine ⟨a,ρ,K,ha,hρ,hK,?_⟩ + intro r + obtain ⟨D,hD,hr⟩ := hall r + refine ⟨D,hD,?_⟩ + intro q B₀ hB₀ + obtain ⟨η,B,T,hη,hη1,hB,hT,hbuild⟩ := hr q B₀ hB₀ + choose Dm Em hDm hEm hmetric using fun m => d.A.smoothed_normalized_metric_step_bound r m + refine ⟨η,B,T,Dm,Em,hη,hη1,hB,hT,hDm,hEm,?_⟩ + intro G hG δ δ' t s τ hδ hδ' hδ'δ ht ht1 hs hst hτ hτs hτη hδτ + hinput hnear hHnear htail hratio + let H := normalizedTensorDefect g.inner δ G + have hH := d.A.normalizedTensorDefect_smooth g.contMDiff δ hG + have hsym : ∀ p v w, H p v w = H p w v := by + intro p v w + change (δ^2)⁻¹ * (g.inner p v w - inducedTensor G p v w) = + (δ^2)⁻¹ * (g.inner p w v - inducedTensor G p w v) + rw [g.symm p v w,inducedTensor_symmetric G p v w] + obtain ⟨U,hU,hUB,hUE⟩ := hbuild G H hG hH hsym t s ht ht1 hs hst hinput + hnear hHnear htail δ δ' τ hδ hδ'.le hδ'δ hτ hτs hτη hδτ hratio + refine ⟨U,hU,hUB,?_⟩ + intro m C hC hCm + exact hmetric m g.inner g.contMDiff G U hG hU δ δ' τ s t B₀ C + (B (m+1)*(δ*τ)) (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + hδ.ne' hδ'.ne' hτ hτs hst ht1 hB₀ hC + (mul_nonneg (hB _) (mul_nonneg hδ.le hτ.le)) hinput hCm (hUB (m+1)) (hUE m) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusFixedOrderStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusFixedOrderStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d211e50ba564fd7d17d3ce396151e2532609b80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusFixedOrderStep.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformRadiusActualStep +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedStepEnvelope +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitFixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.ExactScaleOrdering + +namespace OAI + +/-! Fixed-order corrections and hold/advance scales in a common geometric neighborhood. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance uniformRadiusFixedOrderFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformRadiusFixedOrderFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformRadiusFixedOrderDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformRadiusFixedOrderDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformRadiusFixedOrderSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformRadiusFixedOrderSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- One map and tensor neighborhood supports all fixed orders. At each order, +a threshold permits either holding the order or increasing it by one. -/ +theorem uniform_radius_fixed_order_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ a ρ : ℝ, 0 < a ∧ 0 < ρ ∧ + ∀ k : ℕ, 10 ≤ k → ∀ B₀ : ℝ, 0 ≤ B₀ → + ∃ (ε : ℝ) (B L : ℕ → ℝ), 0 < ε ∧ ε ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ L m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + d.A.InputBound t (40*(k+1)) B₀ G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x - + d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound (t^(6/5 : ℝ)) m + (B m*(t^(k : ℝ)*t^(6/5 : ℝ))) U) ∧ + (∀ m ≤ k/2, d.A.WeightedBound 1 m (ρ*t) U) ∧ + ∀ m C, 0 ≤ C → d.A.InputBound t m C G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.TensorWeightedBound (t^(6/5 : ℝ)) m + (L m*(1+B₀+C)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)-g.inner) := by + classical + obtain ⟨a,ρ,K,ha,hρ,hK,hall⟩ := d.uniform_radius_actual_step hF + refine ⟨a,ρ,ha,hρ,?_⟩ + intro k hk B₀ hB₀ + let r := 40*(k+1) + obtain ⟨D,hD,hr⟩ := hall r + obtain ⟨η,B,T,Dm,Em,hη,_,hB,hT,hDm,hEm,hstep⟩ := hr r B₀ hB₀ + let ε := ExactCorrection.fixedOrderThreshold k ρ a η D B₀ K B + obtain ⟨hε,hε1,hthreshold⟩ := + ExactCorrection.fixedOrderThreshold_spec k hk ρ a η D B₀ K hρ ha hη hD hB₀ hK B + let L := fun m => Dm m*tailConstant r + Em m*B (m+1)*(Dm m*tailConstant r) + 2*T m + have hL (m : ℕ) : 0 ≤ L m := by + dsimp [L] + exact add_nonneg (add_nonneg + (mul_nonneg (hDm m) (tailConstant_nonneg r)) + (mul_nonneg (mul_nonneg (hEm m) (hB (m+1))) + (mul_nonneg (hDm m) (tailConstant_nonneg r)))) + (mul_nonneg (by norm_num) (hT m)) + refine ⟨ε,B,L,hε,hε1,hB,hL,?_⟩ + intro G hG t ht htε j hkj hjk hinput hnear hmetric + have ht1 : t ≤ 1 := htε.le.trans hε1 + obtain ⟨hτη,htail,hratio,hlow,hδ'δ,hmin⟩ := hthreshold t ht htε j hkj hjk + obtain ⟨hminpos,hδ,hτ,hs⟩ := ExactCorrection.exact_scale_positive ht k + have hδ' : 0 < t^((6/5 : ℝ)*(j : ℝ)) := Real.rpow_pos_of_pos ht _ + obtain ⟨_,hδτ,hτs,hst⟩ := ExactCorrection.exact_scale_order ht ht1 hk + obtain ⟨U,hU,hUB,herror⟩ := hstep G hG (t^(k : ℝ)) + (t^((6/5 : ℝ)*(j : ℝ))) t (t^(11/10 : ℝ)) (t^(6/5 : ℝ)) + hδ hδ' hδ'δ ht ht1 hs hst hτ hτs hτη hδτ hinput hnear hmetric htail hratio + refine ⟨U,hU,hUB,?_,?_⟩ + · intro m hm i j hj x hx + have hb := (hUB j i).deriv_le hτ (le_refl j) hx + have hh := hb.trans (hlow j (hj.trans hm)) + simpa only [one_pow,one_mul] using hh + · intro m C hC hCm i + apply (herror m C hC hCm i).mono_const + have he : normalizedStepBound r r B₀ (Dm m) (Em m) (B (m+1)) (T m) C + (t^(k : ℝ)) (t^((6/5 : ℝ)*(j : ℝ))) + (t^(6/5 : ℝ)) (t^(11/10 : ℝ)) t = + ((t^((6/5 : ℝ)*(j : ℝ)))^2)⁻¹ * + (((t^(k : ℝ))^2 + Em m*B (m+1)*t^(k : ℝ)) * (Dm m*tailConstant r) * + (B₀*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + T m*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(r+1)+ + (t^(k : ℝ))^3/t^(6/5 : ℝ))) := by + unfold normalizedStepBound + field_simp [hτ.ne'] + rw [he] + have hden : ((t^((6/5 : ℝ)*(j : ℝ)))^2)⁻¹ ≤ + ((t^((6/5 : ℝ)*((k : ℝ)+1)))^2)⁻¹ := by + apply (inv_le_inv₀ (sq_pos_of_pos hδ') (sq_pos_of_pos hminpos)).mpr + nlinarith + have hdm := hDm m + have hem := hEm m + have hbm := hB (m+1) + have htm := hT m + have htc := tailConstant_nonneg r + have hnum : 0 ≤ + (((t^(k : ℝ))^2 + Em m*B (m+1)*t^(k : ℝ)) * (Dm m*tailConstant r) * + (B₀*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + T m*(t^(k : ℝ)*(t^(6/5 : ℝ)/t^(11/10 : ℝ))^(r+1)+ + (t^(k : ℝ))^3/t^(6/5 : ℝ))) := by positivity + exact (mul_le_mul_of_nonneg_right hden hnum).trans + (ExactCorrection.normalized_step_envelope_nat_succ ht ht1 hk hB₀ hC + (mul_nonneg (hDm m) (tailConstant_nonneg r)) (hEm m) (hB (m+1)) (hT m)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusInputStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusInputStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d239eb28ca115f4947c7e0652a5bfe98fad929f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRadiusInputStep.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformRadiusFixedOrderStep +import OAI.Geometry.SurfaceImmersion.Geometry.ExactInputRecurrence +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasInputBaseline +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedStepEnvelope +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.ExactScaleOrdering + +namespace OAI + +/-! A genuine correction at the paper's fixed-order scales. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance uniformInputStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformInputStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformInputStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformInputStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformInputStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformInputStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The actual correction step controls the complete next input in every +order, including orders beyond the finite construction budget. -/ +theorem uniform_radius_input_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ a ρ A₀ : ℝ, 0 < a ∧ 0 < ρ ∧ 0 ≤ A₀ ∧ + ∀ k : ℕ, 10 ≤ k → ∀ B₀ : ℝ, 0 ≤ B₀ → + ∃ (ε : ℝ) (B L N : ℕ → ℝ), 0 < ε ∧ ε ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ L m) ∧ (∀ m, 0 ≤ N m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + d.A.InputBound t (40*(k+1)) B₀ G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x - + d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound (t^(6/5 : ℝ)) m + (B m*(t^(k : ℝ)*t^(6/5 : ℝ))) U) ∧ + (∀ m ≤ k/2, d.A.WeightedBound 1 m (ρ*t) U) ∧ + (∀ m C, 0 ≤ C → d.A.InputBound t m C G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.TensorWeightedBound (t^(6/5 : ℝ)) m + (L m*(1+B₀+C)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)-g.inner)) ∧ + ∀ m C, 0 ≤ C → d.A.InputBound t m C G + (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + d.A.InputBound (t^(6/5 : ℝ)) m + (A₀+N m*t^(1/5 : ℝ)*(1+C)) (G+U) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)) := by + classical + obtain ⟨a,ρ,ha,hρ,hall⟩ := d.uniform_radius_fixed_order_step hF + obtain ⟨P,hP,hbaseline⟩ := d.A.shifted_zero_bound_of_near hF + choose Pg hPg hgb using fun m => d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain m g.contMDiff + refine ⟨a,ρ,P+ρ/4+Pg 0,ha,hρ,add_nonneg (add_nonneg hP (by positivity)) (hPg 0),?_⟩ + intro k hk B₀ hB₀ + obtain ⟨ε,B,L,hε,hε1,hB,hL,hstep⟩ := hall k hk B₀ hB₀ + let N := fun m => Pg m+B (m+2)+L m*(1+B₀)+1+L m + have hN (m : ℕ) : 0 ≤ N m := by + dsimp [N] + exact add_nonneg (add_nonneg (add_nonneg (add_nonneg (hPg m) (hB (m+2))) + (mul_nonneg (hL m) (by linarith))) zero_le_one) (hL m) + refine ⟨ε,B,L,N,hε,hε1,hB,hL,hN,?_⟩ + intro G hG t ht htε j hkj hjk hinput hnear hmetric + obtain ⟨U,hU,hUB,hsmall,herror⟩ := hstep G hG t ht htε j hkj hjk hinput hnear hmetric + refine ⟨U,hU,hUB,hsmall,herror,?_⟩ + intro m C hC hCm + have hb := hbaseline G hG (ρ/4) hnear t + have hUB' : d.A.WeightedBound (t^(6/5 : ℝ)) (2+m) + (B (m+2)*(t^(k : ℝ)*t^(6/5 : ℝ))) U := by + simpa only [Nat.add_comm] using hUB (m+2) + exact d.A.exact_scale_input_recurrence hG hU ht (htε.le.trans hε1) hk + (by positivity) (hPg 0) (hPg m) (hB (m+2)) hC (hL m) hB₀ + hb hCm.1 hUB' (hgb 0) (hgb m) (herror m C hC hCm) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRemainderBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRemainderBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc400f108e35ae133ad722189063a4885147e4aa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformRemainderBound.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformMetricPathBounds +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds +import OAI.Geometry.SurfaceImmersion.Geometry.InitialInputBounds + +namespace OAI + +/-! A fixed C2 budget for starting maps gives one C1 remainder bound in +any fixed primitive atlas, before choosing finite modifications. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance remainderBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance remainderBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance remainderBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance remainderBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance remainderBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance remainderBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem uniform_remainder_C1_bound (g : SmoothMetric M) (r : ℝ) {D : ℝ} (hD : 0 ≤ D) : + ∃ U : ℝ, 0 ≤ U ∧ ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 2 D G → B.TensorWeightedBound 1 1 U (g.inner-inducedTensor (r • G)) := by + obtain ⟨U,hU,hinduced⟩ := A.uniform_induced_tensor_bound (mul_nonneg (abs_nonneg r) hD) 1 + obtain ⟨E,hE,hmetric⟩ := A.exists_tensorWeighted_bound 1 g.contMDiff + obtain ⟨T,hT,hchange⟩ := A.tensorWeightedBound_change_atlas B 1 + refine ⟨T*(E+U),mul_nonneg hT (add_nonneg hE hU),?_⟩ + intro G hG hbound + have hscaled := space_smul_contMDiff hG r + have hmap := A.weightedBound_const_smul hG hbound r + have hi := hinduced (r • G) hscaled hmap + have hsmooth := A.inducedTensor_smooth hscaled + have hneg : A.TensorWeightedBound 1 1 U (-inducedTensor (r • G)) := by + simpa only [neg_one_smul,abs_neg,abs_one,one_mul] using + A.tensorWeightedBound_const_smul hsmooth hi (-1) + have hsum := A.tensorWeightedBound_add g.contMDiff hsmooth.neg_section zero_le_one hmetric hneg + apply hchange (g.inner-inducedTensor (r • G)) 1 (E+U) zero_lt_one le_rfl + (add_nonneg hE hU) (g.contMDiff.sub_section hsmooth) + simpa only [sub_eq_add_neg] using hsum + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformScaledPathBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformScaledPathBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..da36c77a020dbdf5ec60b63482621dbef904f420 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformScaledPathBounds.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformMetricPathBounds +import OAI.Geometry.SurfaceImmersion.Geometry.InitialInputBounds + +namespace OAI + +/-! The actual straight metric path has one budget for the whole fixed +scaled starting family, before choosing any finite crossing set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_scaled_path_bound (g : SmoothMetric M) (r : ℝ) {D : ℝ} (hD : 0 ≤ D) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → A.WeightedBound 1 2 D G → + (∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) → + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) → + ∀ s : ℝ, 0 ≤ s → s ≤ 1 → + A.TensorWeightedBound 1 1 C + (inducedTensor (r • G)+s • (g.inner-inducedTensor (r • G))) := by + obtain ⟨C,hC,hbound⟩ := A.uniform_short_path_tensor_bound g (mul_nonneg (abs_nonneg r) hD) 1 + refine ⟨C,hC,?_⟩ + intro G hG hb hI hshort s hs hs1 + have hscaled := space_smul_contMDiff hG r + have hgb := A.weightedBound_const_smul hG hb r + have hh := hbound (r • G) hscaled hI hshort hgb s hs hs1 + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSecondFormMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSecondFormMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ad16c8cab32fc684485066232d2858fad26040b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSecondFormMargin.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseC2Stability + +namespace OAI + +/-! A fixed compact family of immersed jets with nonzero second form has +a positive second-form margin throughout one uniform C2 neighborhood. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +lemma isOpen_secondFormMargin (c : ℝ) : IsOpen + {J : RealTwoJet | NormalFrame.gramDet (J 0) (J 1) ≠ 0 ∧ c < ‖secondTensorFromJet J‖} := by + apply isOpen_iff_mem_nhds.mpr + intro J hJ + have hd : Continuous (fun K : RealTwoJet => NormalFrame.gramDet (K 0) (K 1)) := by + unfold NormalFrame.gramDet dotProduct + fun_prop + exact (hd.continuousAt.eventually_ne hJ.1).and + ((contDiffAt_secondTensorFromJet hJ.1).continuousAt.norm.preimage_mem_nhds + (isOpen_Ioi.mem_nhds hJ.2)) + +theorem compact_secondForm_margin {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K : Set Base} (hK : IsCompact K) + (hI : ∀ p ∈ K, Function.Injective (fderiv ℝ F p)) + (hB : ∀ p ∈ K, realSecondTensor F p ≠ 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ G : RField 4, + (∀ p ∈ K, ‖realTwoJet G p-realTwoJet F p‖ < ε) → + ∀ p ∈ K, Function.Injective (fderiv ℝ G p) ∧ c < ‖realSecondTensor G p‖ := by + let Q := realTwoJet F '' K + have hQ : IsCompact Q := hK.image (contDiff_realTwoJet hF).continuous + have hD : ∀ J ∈ Q, NormalFrame.gramDet (J 0) (J 1) ≠ 0 := by + rintro J ⟨p,hp,rfl⟩ + exact gramDet_ne_zero_of_injective _ (hI p hp) + have hN : ∀ J ∈ Q, 0 < ‖secondTensorFromJet J‖ := by + rintro J ⟨p,hp,rfl⟩ + exact norm_pos_iff.mpr (hB p hp) + by_cases hQne : Q.Nonempty + · have hcont : ContinuousOn (fun J => ‖secondTensorFromJet J‖) Q := + fun J hJ => ((contDiffAt_secondTensorFromJet (hD J hJ)).continuousAt.norm).continuousWithinAt + obtain ⟨J,hJ,hmin⟩ := hQ.exists_isMinOn hQne hcont + let c := ‖secondTensorFromJet J‖/2 + have hc : 0 < c := half_pos (hN J hJ) + have hsub : Q ⊆ {H : RealTwoJet | + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖secondTensorFromJet H‖} := by + intro H hH + exact ⟨hD H hH,(half_lt_self (hN J hJ)).trans_le (hmin hH)⟩ + obtain ⟨ε,hε,he⟩ := hQ.exists_thickening_subset_open (isOpen_secondFormMargin c) hsub + refine ⟨ε,c,hε,hc,?_⟩ + intro G hGF p hp + have hmem := he (Metric.mem_thickening_iff.mpr + ⟨realTwoJet F p,mem_image_of_mem _ hp,by simpa only [dist_eq_norm] using hGF p hp⟩) + exact ⟨injective_of_gramDet_ne_zero _ hmem.1,hmem.2⟩ + · refine ⟨1,1,zero_lt_one,zero_lt_one,?_⟩ + intro G _ p hp + exact False.elim (hQne ⟨realTwoJet F p,mem_image_of_mem _ hp⟩) + +theorem compact_secondForm_C2_margin {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K : Set Base} (hK : IsCompact K) + (hI : ∀ p ∈ K, Function.Injective (fderiv ℝ F p)) + (hB : ∀ p ∈ K, realSecondTensor F p ≠ 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ G : RField 4, ContDiff ℝ ∞ G → + ∀ b : ℝ, 0 ≤ b → b < ε → WeightedBound univ 1 2 b (G-F) → + ∀ p ∈ K, Function.Injective (fderiv ℝ G p) ∧ c < ‖realSecondTensor G p‖ := by + obtain ⟨ε,c,hε,hc,he⟩ := compact_secondForm_margin hF hK hI hB + refine ⟨ε,c,hε,hc,?_⟩ + intro G hG b hb hbε hclose + apply he G + intro p _ + have hh := norm_realTwoJet_le (hG.sub hF) hb hclose p + change ‖realTwoJet (G-F) p‖ ≤ b at hh + rw [realTwoJet_sub hG hF] at hh + exact hh.trans_lt hbε + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSmallStartingMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSmallStartingMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..9631800ade5a817d9ce38346939a10bfd3db67dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformSmallStartingMetric.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformMetricPathBounds +import OAI.Geometry.SurfaceImmersion.Geometry.UniformInitialScale +import OAI.Geometry.SurfaceImmersion.Geometry.UniformStartingFamily + +namespace OAI + +/-! The initial spherical scale can be fixed before all finite modifications +so that the entire family of induced metrics is small in C1. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance smallStartFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance smallStartFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance smallStartDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance smallStartDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance smallStartSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance smallStartSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_small_scaled_metric (g : SmoothMetric M) {C ε : ℝ} + (hC : 0 ≤ C) (hε : 0 < ε) : + ∃ r : ℝ, 0 < r ∧ r ≤ 1 ∧ + ∀ F : M → Space, ContMDiff planeModel spaceModel ∞ F → + A.WeightedBound 1 2 C F → + A.TensorWeightedBound 1 1 ε (inducedTensor (r • F)) ∧ + ∀ p v, inducedForm (r • F) p v v ≤ (1/2 : ℝ)*g.inner p v v := by + obtain ⟨E,hE,hbound⟩ := A.uniform_induced_tensor_bound hC 1 + obtain ⟨D,hD,hupper⟩ := A.uniform_induced_metric_upper_bound g hC + let a := min 1 (min (ε/(E+1)) (1/(2*(D+1)))) + have ha : 0 < a := lt_min zero_lt_one (lt_min (by positivity) (by positivity)) + let r := Real.sqrt a + have hr : 0 < r := Real.sqrt_pos.mpr ha + have hr2 : r^2 = a := Real.sq_sqrt ha.le + have hr1 : r ≤ 1 := by + have : r^2 ≤ 1 := hr2 ▸ min_le_left _ _ + nlinarith + have hsmall : r^2*E ≤ ε := by + have hs : r^2 ≤ ε/(E+1) := hr2 ▸ (min_le_right _ _).trans (min_le_left _ _) + have hh := (le_div_iff₀ (by positivity : 0 < E+1)).mp hs + nlinarith [sq_nonneg r] + have hshort : r^2*D ≤ (1/2 : ℝ) := by + have hs : r^2 ≤ 1/(2*(D+1)) := hr2 ▸ (min_le_right _ _).trans (min_le_right _ _) + have hh := (le_div_iff₀ (by positivity : 0 < 2*(D+1))).mp hs + nlinarith [sq_nonneg r] + refine ⟨r,hr,hr1,?_⟩ + intro F hF hb + constructor + · rw [inducedTensor_const_smul hF] + have hs := A.tensorWeightedBound_const_smul (A.inducedTensor_smooth hF) + (hbound F hF hb) (r^2) + intro i + apply (hs i).mono_const + simpa only [abs_of_nonneg (sq_nonneg r)] using hsmall + · intro p v + have he := congrArg (fun T : ∀ p : M, CovariantTwoTensor p => T p v v) + (inducedTensor_const_smul hF r) + change inducedForm (r • F) p v v = r^2*inducedForm F p v v at he + rw [he] + have hu := hupper F hF (fun i => (hb i).mono_order (by omega)) p v + have hg : 0 ≤ g.inner p v v := by + by_cases hv : v = 0 + · simp [hv] + · exact (g.pos p v hv).le + exact (mul_le_mul_of_nonneg_left hu (sq_nonneg r)).trans + (by rw [← mul_assoc]; exact mul_le_mul_of_nonneg_right hshort hg) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..15ef6eb4e555d1d78e32139f3ca7d7a1d5d55de5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformStartingFamily.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformPreparedSphericalImmersion +import OAI.Geometry.SurfaceImmersion.Geometry.UniformInitialScale +import OAI.Geometry.SurfaceImmersion.Whitney.WhitneyStartingGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormal + +namespace OAI + +/-! The starting family for the global preparation, conditional only on +Whitney's published compact-surface immersion theorem. All uniform constants +are fixed before the boundary intersections are specified. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4 +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def PreferredNormal.const_smul {F : M → Space} (n : PreferredNormal F) + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) : PreferredNormal (r • F) where + vector := n.vector + smooth := n.smooth + unit := n.unit + normal p v := by + have hd := const_smul_mfderiv ((hF p).mdifferentiableAt (by simp)) r + change inner ℝ (show Space from mfderiv planeModel spaceModel (r • F) p v) (n.vector p) = 0 + rw [hd] + change inner ℝ (r • (show Space from mfderiv planeModel spaceModel F p v)) (n.vector p) = 0 + rw [real_inner_smul_left,n.normal,mul_zero] + +namespace FiniteOrderSmoothing +open SphericalJets +variable [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [SecondCountableTopology M] + +theorem uniform_starting_family (g : SmoothMetric M) + (hW : PublishedInputs.WhitneySurfaceInput M) : + ∃ (I : M → Space) (A : SmoothingAtlas M) (r D c : ℝ), + ContMDiff planeModel spaceModel ∞ I ∧ (∀ p, ‖I p‖ = 1) ∧ + 0 < r ∧ 0 ≤ D ∧ 0 < c ∧ + ∀ (P : Finset M) (ε : ℝ), 0 < ε → + ∃ (a : P → A.centers) (G : M → Space) (n : PreferredNormal (r • G)), + (∀ p, A.weight (a p) p ≠ 0) ∧ ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) ∧ + n.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ inducedForm G p v v) ∧ + (∀ p v, inducedForm (r • G) p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + ∀ p : P, G p = I p ∧ + fderiv ℝ (G ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) = + fderiv ℝ (I ∘ (chartAt Plane (a p : M)).symm) (chartAt Plane (a p : M) p) ∧ + ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (a p : M)).symm) + (chartAt Plane (a p : M) p) v w = 0 := by + obtain ⟨I,hI,hunit,hImm,⟨data⟩⟩ := metricPhaseData_of_whitney g hW + let A := data.A + obtain ⟨D,c,hD,hc,hprep⟩ := A.uniform_prepared_spherical_immersion g hI hunit hImm + obtain ⟨r,hr,hshort⟩ := A.uniform_initial_short_scale g hD + refine ⟨I,A,r,D,c,hI,hunit,hr,hD,hc,?_⟩ + intro P ε hε + obtain ⟨a,G,ha,hG,hu,hGI,hclose,hbound,hlower,hflat⟩ := hprep P ε hε + let n := (sphericalPreferredNormal hG hu).const_smul hG r + have hscaled : ∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p) := by + intro p v w h + have hd := const_smul_mfderiv ((hG p).mdifferentiableAt (by simp)) r + have he := congrArg (fun z : Space => r⁻¹ • z) h + rw [hd] at he + change r⁻¹ • (r • (mfderiv planeModel spaceModel G p v)) = + r⁻¹ • (r • (mfderiv planeModel spaceModel G p w)) at he + simp only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul] at he + exact hGI p he + exact ⟨a,G,n,ha,hG,hu,hscaled,rfl,hclose,hbound,hlower, + hshort G hG (fun i => (hbound i).mono_order (by omega)),hflat⟩ + +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformTrialAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformTrialAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..dfa7bf318f5638fdf29c4ec27caae55540007839 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UniformTrialAmplitude.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.Immersion.ClosedSurface.LocalMean + +namespace OAI + +/-! Uniform square-root amplitude constants from numerical coordinate, +cutoff and form bounds. In particular they precede the scale and map. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean + +theorem uniform_local_amplitude_bounds {V : Set Base} (hV : IsOpen V) + {ρ R : ℝ} (hρ : 0 < ρ) (m : ℕ) (C I Q Ψ : ℝ) + (hI : 1 ≤ I) (hQ : 1 ≤ Q) (hΨ : 1 ≤ Ψ) : + let J := 2 ^ m * Q * (m.factorial : ℝ) * I ^ m + ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ (U : Set Base) (s r : ℝ) + (reference : Base → Tensor) (F : RField 4) (ψ : Base → ℝ) + (forms : Base → Tensor →L[ℝ] ℝ) (χ e : Base → Base) + (_h : LocalBounds U V s r ρ R reference F ψ forms χ e) + (d : Budgets U V s F ψ forms χ e), + d.inv m = I → d.forms m = Q → d.psi m = Ψ → 0 < s → s ≤ 1 → + ∀ (A B : Base → Tensor) (D : ℝ), 0 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ A U → ContDiffOn ℝ ∞ B U → + InTrialBall U reference r A → InTrialBall U reference r B → + WeightedBound U s m C A → WeightedBound U s m C B → + WeightedBound U s m D (A - B) → + WeightedBound V s m A₀ (phaseAmplitude ψ (coefficient forms e A)) ∧ + WeightedBound V s m A₀ (phaseAmplitude ψ (coefficient forms e B)) ∧ + WeightedBound V s m (A₀ * J * D) + (fun x => phaseAmplitude ψ (coefficient forms e A) x - + phaseAmplitude ψ (coefficient forms e B) x) := by + dsimp only + let J := 2 ^ m * Q * (m.factorial : ℝ) * I ^ m + let C' := max 1 (J * C) + obtain ⟨A₀,hA₀,ha⟩ := compact_amplitude_bounds (R := R) hV.uniqueDiffOn hρ + (show 1 ≤ C' from le_max_left _ _) (zero_le_one.trans hΨ) m + refine ⟨A₀,hA₀,?_⟩ + intro U s r reference F ψ forms χ e h d hi hq hψ hs hs1 A B D hC hD hA hB hballA hballB hbA hbB hbD + have heq : inputFactor d m = J := by simp only [inputFactor, hi, hq, J] + have hcoeff (X : Base → Tensor) (hX : ContDiffOn ℝ ∞ X U) + (hbX : WeightedBound U s m C X) : WeightedBound V s m C' (coefficient forms e X) := by + have hh := weighted_coefficient h.openU.uniqueDiffOn hV.uniqueDiffOn hs hs1 + (d.inv_pos m) (zero_le_one.trans (d.forms_pos m)) hC h.smoothQ h.smoothInv + h.invInto hX (d.inv_bound m) (d.forms_bound m) hbX + change WeightedBound V s m (inputFactor d m * C) _ at hh + rw [heq] at hh + exact hh.mono_const (le_max_right _ _) + have hdiff := weighted_coefficient_difference h.openU.uniqueDiffOn hV.uniqueDiffOn + hs hs1 (d.inv_pos m) (zero_le_one.trans (d.forms_pos m)) hD h.smoothQ h.smoothInv + h.invInto hA hB (d.inv_bound m) (d.forms_bound m) hbD + change WeightedBound V s m (inputFactor d m * D) _ at hdiff + rw [heq] at hdiff + have hJ : 0 ≤ J := by dsimp [J]; positivity + have hcut : WeightedBound V s m Ψ ψ := by simpa only [hψ] using d.psi_bound m + have hh := ha s (J * D) ψ (coefficient forms e A) (coefficient forms e B) hs + (mul_nonneg hJ hD) h.smoothPsi + (contDiffOn_coefficient h.smoothQ h.smoothInv h.invInto hA) + (contDiffOn_coefficient h.smoothQ h.smoothInv h.invInto hB) + (coefficient_trial_range h.invInto h.margin hballA) + (coefficient_trial_range h.invInto h.margin hballB) hcut (hcoeff A hA hbA) + (hcoeff B hB hbB) hdiff + exact ⟨hh.1,hh.2.1,by simpa only [J, mul_assoc] using hh.2.2⟩ + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedLinePair.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedLinePair.lean new file mode 100644 index 0000000000000000000000000000000000000000..83de252689204f5d6c45c50d2fa8f66d96272834 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedLinePair.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.UnorderedSurfacePairs + +namespace OAI + +/-! The two sides of a line become a half-line after forgetting their +ordering. This is the endpoint coordinate for a prepared crosscap. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def unorderedLinePair (a w : Base) (t : ℝ) : UnorderedSurfacePairs Base := + unorderedPair (a+t • w,a-t • w) + +lemma unorderedLinePair_continuous (a w : Base) : Continuous (unorderedLinePair a w) := by + apply unorderedPair_continuous.comp + exact (continuous_const.add (continuous_id.smul continuous_const)).prodMk + (continuous_const.sub (continuous_id.smul continuous_const)) + +lemma unorderedLinePair_eq_iff (a w : Base) (hw : w ≠ 0) (s t : ℝ) : + unorderedLinePair a w s = unorderedLinePair a w t ↔ s = t ∨ s = -t := by + constructor + · intro h + rcases unorderedPair_eq.mp h with h | h + · apply Or.inl + have he := congrArg Prod.fst h + have hs : (s-t) • w = 0 := by + rw [sub_smul,sub_eq_zero] + exact add_left_cancel he + exact sub_eq_zero.mp ((smul_eq_zero.mp hs).resolve_right hw) + · apply Or.inr + have he := congrArg Prod.fst h + have hs : (s+t) • w = 0 := by + calc + _ = (a+s • w)-(a-t • w) := by module + _ = 0 := sub_eq_zero.mpr he + exact eq_neg_iff_add_eq_zero.mpr ((smul_eq_zero.mp hs).resolve_right hw) + · rintro (rfl | rfl) + · rfl + · apply unorderedPair_eq.mpr + right + apply Prod.ext <;> simp only [Prod.swap_prod_mk,neg_smul,sub_eq_add_neg,neg_neg] + +lemma unorderedLinePair_injOn_nonneg (a w : Base) (hw : w ≠ 0) : + (Ici (0 : ℝ)).InjOn (unorderedLinePair a w) := by + intro s hs t ht he + rcases (unorderedLinePair_eq_iff a w hw s t).mp he with h | h + · exact h + · change 0 ≤ s at hs + change 0 ≤ t at ht + have : s = 0 ∧ t = 0 := by constructor <;> linarith + exact this.1.trans this.2.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairCovering.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairCovering.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c7494c9a34820696e55e37d9aacf0b0145311c1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairCovering.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UnorderedPairChart +import Mathlib.Topology.Homotopy.Lifting + +namespace OAI + +/-! The unordered-pair quotient is a two-sheeted covering away from +the diagonal. At a diagonal point its fiber is a singleton. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} + +def unorderedDistinctPairs (M : Type*) : Set (UnorderedSurfacePairs M) := + {z | ¬ ∃ p : M, unorderedPair (p,p) = z} + +lemma unorderedPair_diagonal_iff (z : M × M) (p : M) : + unorderedPair z = unorderedPair (p,p) ↔ z = (p,p) := by + rw [unorderedPair_eq] + simp only [Prod.swap_prod_mk,or_self] + +lemma unorderedPair_mem_distinct_iff (z : M × M) : + unorderedPair z ∈ unorderedDistinctPairs M ↔ z.1 ≠ z.2 := by + constructor + · intro hz he + exact hz ⟨z.1,by rw [show (z.1,z.1) = z from Prod.ext rfl he]⟩ + · intro hz ⟨p,hp⟩ + have he := (unorderedPair_diagonal_iff z p).mp hp.symm + exact hz (by rw [he]) + +variable [TopologicalSpace M] [T2Space M] [CompactSpace M] +theorem unorderedPair_covering : + IsCoveringMapOn (unorderedPair : M × M → UnorderedSurfacePairs M) (unorderedDistinctPairs M) := by + apply IsCoveringMapOn.of_isLocalHomeomorphOn unorderedPair_continuous + intro z hz + have hne : z.1 ≠ z.2 := (unorderedPair_mem_distinct_iff z).mp hz + obtain ⟨e,he,heq,_⟩ := unordered_pair_local_chart z.1 z.2 hne + exact ⟨e,he,funext fun z => (heq z).symm⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..323caeac93f263447c3f0a59aa30f0a583ac04a9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnorderedPairMap.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnorderedLinePair + +namespace OAI + +/-! Applying a function to both entries of an unordered pair. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def unorderedPairMap {M N : Type*} (f : M → N) : UnorderedSurfacePairs M → UnorderedSurfacePairs N := + Quotient.map (Prod.map f f) (by + intro x y h + rcases h with h | h + · exact Or.inl (congrArg (Prod.map f f) h) + · right + rw [h] + rfl) + +lemma unorderedPairMap_mk {M N : Type*} (f : M → N) (x : M × M) : + unorderedPairMap f (unorderedPair x) = unorderedPair (Prod.map f f x) := rfl + +lemma unorderedPairMap_comp {M N P : Type*} (f : M → N) (g : N → P) + (x : UnorderedSurfacePairs M) : + unorderedPairMap g (unorderedPairMap f x) = unorderedPairMap (g ∘ f) x := by + induction x using Quotient.inductionOn with + | h x => rfl + +lemma unorderedLinePair_interval_embedding (a w : Base) (hw : w ≠ 0) (R : ℝ) : + IsClosedEmbedding (fun s : Icc (0 : ℝ) R => unorderedLinePair a w s) := by + apply ((unorderedLinePair_continuous a w).comp continuous_subtype_val).isClosedEmbedding + intro s t h + apply Subtype.ext + exact unorderedLinePair_injOn_nonneg a w hw s.property.1 t.property.1 h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedGeometricSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedGeometricSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..09338fe6b5846fc015c877ddaa10868d79c0dafa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedGeometricSolver.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale +import OAI.Geometry.SurfaceImmersion.Correction.CompactModeCoefficients + +namespace OAI + +/-! Actual unperturbed solvers require only compact good-mode geometry. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes + +/-- The exact-correction stage has no polynomial perturbation. -/ +def emptyMetricPolynomial : Fin 3 → Fin 0 → Expression := fun _ => Fin.elim0 + +/-- Construct the unit-scale data from a good phase chart; no higher-jet +compactness assumption is needed for a polynomial term that is absent. -/ +theorem geometric_unperturbed_solver + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hKe : (modeSupport K : Set SmallModes.Base) ⊆ e.source) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + {KE KV Ω : Set SmallModes.Base} + (hKE : IsCompact KE) (hKV : IsCompact KV) + (hEK : e.source ⊆ KE) (hVK : e.target ⊆ KV) (hKVΩ : KV ⊆ Ω) + (hdom : RealModeDomain ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) Ω) : + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K 1 1, + c.e = e ∧ (∀ m, c.D m = 0) := by + have hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) := + (hG.comp planeCoordinateIsometry.symm.contDiff).comp hi + choose J hJ hj using fun m => compact_local_weighted_bound e.open_source isOpen_univ + hKE hEK (subset_univ KE) he.contDiffOn m + choose C hC hc using fun m => (hdom.complexDomain hmap).compact_reconstruction_bounds + e.open_target hKV hVK hKVΩ (m+1) + have hdomain : RealModeDomain ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) e.target := + ⟨e.open_target,fun x hx => hdom.determinant x (hKVΩ (hVK hx)), + fun x hx => hdom.good x (hKVΩ (hVK hx))⟩ + have hP : ∀ k l, (emptyMetricPolynomial k l).SmoothCoeffs univ := fun _ l => Fin.elim0 l + refine ⟨{ + U := univ + O := univ + openU := isOpen_univ + openO := isOpen_univ + smoothP := hP + mapsG := mapsTo_univ _ _ + supportU := subset_univ _ + smoothPhase := hφ + e := e + smoothForward := he.contDiffOn + smoothInverse := hi.contDiffOn + supportChart := hKe + phase := hphase + smoothMap := hmap + domain := hdomain.complexDomain hmap + C := C + D := fun _ => 0 + J := J + nonnegC := fun m => zero_le_one.trans (hC m) + nonnegD := fun _ => le_rfl + oneLEJ := hJ + coordinates := ?_ + coefficients := fun m => hc m 1 zero_lt_one le_rfl + polynomial := ?_ + },rfl,fun _ => rfl⟩ + · intro m j _ hjm x hx + simpa only [one_pow,one_mul] using hj m 1 zero_le_one le_rfl j hjm x hx + · intro m Z + rw [phaseChartPolynomialOperator_zero] + simp + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedScaleNorm.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedScaleNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f5677afc6e74104d54e211077936de23dee600c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedScaleNorm.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFacts + +namespace OAI + +/-! Monotonicity of the input seminorm at smaller unperturbed scales. -/ +noncomputable section +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open WeightedEstimates PhaseMean + +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : TopologicalSpace.Compacts Base} + +lemma norm_atUnperturbedScale_le (c : PolynomialSolveData P 0 G hG φ K 1 1) + (τ : ℝ) (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) (m : ℕ) : + (c.atUnperturbedScale τ s hs1).norm f m ≤ c.norm f m := by + change supportedWeightedSeminorm _ s m _ ≤ supportedWeightedSeminorm _ 1 m _ + apply supportedSeminorm_le_of_weightedBound hs (apply_nonneg _ _) + exact (weightedBound_of_supportedSeminorm 1 m _).shrink_scale s.coe_nonneg hs1 + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..e509167b423e052cd36bcb323b7a2ff70bc5fc55 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverDomain.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale + +namespace OAI + +/-! Restrict the coefficient domain without changing an unperturbed phase solver. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} {s : ℝ≥0} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} {K : Compacts Base} + +/-- Only the domain in which the polynomial coefficients are read changes. +The phase chart, reconstruction bounds and every numeric profile are retained. -/ +def onDomain (c : PolynomialSolveData P 0 G hG φ K τ s) + (U : Set Base) (hU : IsOpen U) (hUc : U ⊆ c.U) (hKU : (K : Set Base) ⊆ U) : + PolynomialSolveData P 0 G hG φ K τ s where + U := U + O := c.O + openU := hU + openO := c.openO + smoothP := c.smoothP + mapsG := fun x hx => c.mapsG (hUc hx) + supportU := hKU + smoothPhase := c.smoothPhase + e := c.e + smoothForward := c.smoothForward + smoothInverse := c.smoothInverse + supportChart := c.supportChart + phase := c.phase + smoothMap := c.smoothMap + domain := c.domain + C := c.C + D := c.D + J := c.J + nonnegC := c.nonnegC + nonnegD := c.nonnegD + oneLEJ := c.oneLEJ + coordinates := c.coordinates + coefficients := c.coefficients + polynomial := by + intro m Z + have hz := phaseChartPolynomialOperator_zero c.openO hU P c.smoothP hG + (fun x hx => c.mapsG (hUc hx)) K hKU c.smoothPhase τ c.e c.smoothForward + c.smoothInverse c.supportChart + rw [hz] + simp + +@[simp] lemma onDomain_e (c : PolynomialSolveData P 0 G hG φ K τ s) + (U : Set Base) (hU : IsOpen U) (hUc : U ⊆ c.U) (hKU : (K : Set Base) ⊆ U) : + (c.onDomain U hU hUc hKU).e = c.e := rfl + +@[simp] lemma onDomain_U (c : PolynomialSolveData P 0 G hG φ K τ s) + (U : Set Base) (hU : IsOpen U) (hUc : U ⊆ c.U) (hKU : (K : Set Base) ⊆ U) : + (c.onDomain U hU hUc hKU).U = U := rfl + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFacts.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFacts.lean new file mode 100644 index 0000000000000000000000000000000000000000..acc127a405bb053b16d57f4ff7d2ca984d20f5ee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFacts.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedCalculus + +namespace OAI + +/-! The finite polynomial solver at parameter zero is exactly the metric +linearization; its explicit size and residual budgets are nonnegative. -/ +noncomputable section +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean + +lemma coordinateFullLinearized_unperturbed {n : ℕ} (P : Fin 3 → Fin n → Expression) + (G : Base → Space) (X : RealModes.RField 4) : + coordinateFullLinearized P 0 G X = + RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X := by + funext x k + simp [coordinateFullLinearized,coordinateRealLinearized,linearized] + +namespace PolynomialSolveData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : TopologicalSpace.Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +lemma size_nonneg (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q m : ℕ) : + 0 ≤ c.size f q m := by + rw [c.size_eq_factor] + exact mul_nonneg (c.sizeFactor_nonneg q m) (apply_nonneg _ _) + +lemma residual_nonneg (hη : 0 ≤ τ/s + ε/τ^tensorLoss P) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q m : ℕ) : + 0 ≤ c.residual f q m := by + rw [c.residual_eq_factor] + exact mul_nonneg (mul_nonneg (pow_nonneg hη _) (c.residualFactor_nonneg q m)) (apply_nonneg _ _) + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFromBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFromBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7b211fcabb4b5fc791cd957e6de75ec7a7720bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverFromBounds.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver + +namespace OAI + +/-! Construct the actual metric solver with specified numerical bounds. +No compactness choice of coefficients is used by this constructor. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes + +noncomputable def unperturbedSolverOfBounds + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hKe : (modeSupport K : Set SmallModes.Base) ⊆ e.source) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (hdom : RealModeDomain ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) e.target) + (τ : ℝ) (s : ℝ≥0) (C J : ℕ → ℝ) + (hC : ∀ m, 0 ≤ C m) (hJ : ∀ m, 1 ≤ J m) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound + (fun p => complexify (G (planeCoordinateIsometry.symm (e.symm p)))) e.target s (m+1) (C m)) + (hj : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m) : + PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s where + U := univ + O := univ + openU := isOpen_univ + openO := isOpen_univ + smoothP := fun _ l => Fin.elim0 l + mapsG := mapsTo_univ _ _ + supportU := subset_univ _ + smoothPhase := hφ + e := e + smoothForward := he.contDiffOn + smoothInverse := hi.contDiffOn + supportChart := hKe + phase := hphase + smoothMap := (hG.comp planeCoordinateIsometry.symm.contDiff).comp hi + domain := hdom.complexDomain ((hG.comp planeCoordinateIsometry.symm.contDiff).comp hi) + C := C + D := fun _ => 0 + J := J + nonnegC := hC + nonnegD := fun _ => le_rfl + oneLEJ := hJ + coordinates := hj + coefficients := hc + polynomial := by + intro m Z + rw [phaseChartPolynomialOperator_zero] + simp + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverRestrictedDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverRestrictedDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffe7b04acd31ff1f637a902bed40e85a490ec4d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverRestrictedDomain.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFromBounds + +namespace OAI + +/-! Restrict the positional domain of an unperturbed supported solver. +Its phase chart, operator, and numerical coefficient budgets stay fixed. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +namespace PolynomialSolveData +variable {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + +def onSourceDomain (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (U : Set Base) (hU : IsOpen U) (hKU : (K : Set Base) ⊆ U) : + PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s where + U := U + O := univ + openU := hU + openO := isOpen_univ + smoothP := fun _ j => Fin.elim0 j + mapsG := mapsTo_univ _ _ + supportU := hKU + smoothPhase := c.smoothPhase + e := c.e + smoothForward := c.smoothForward + smoothInverse := c.smoothInverse + supportChart := c.supportChart + phase := c.phase + smoothMap := c.smoothMap + domain := c.domain + C := c.C + D := fun _ => 0 + J := c.J + nonnegC := c.nonnegC + nonnegD := fun _ => le_rfl + oneLEJ := c.oneLEJ + coordinates := c.coordinates + coefficients := c.coefficients + polynomial := by + intro m Z + rw [phaseChartPolynomialOperator_zero] + simp + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverScale.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c54d63fcfb4425ca39556378945aaf471c1c610 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/UnperturbedSolverScale.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveData +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds +import OAI.Geometry.SurfaceImmersion.Correction.CompactMeanBudgets + +namespace OAI + +/-! A fixed geometric metric solver works at every smaller slow scale. +Its geometry and coefficient profiles do not depend on the frequency. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean SmallModes + +lemma phaseChartPolynomialOperator_zero {n : ℕ} {U : Set Base} {O : Set LowJet} + {G : Base → Space} (hO : IsOpen O) (hU : IsOpen U) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + (hKe : (modeSupport K : Set SmallModes.Base) ⊆ e.source) : + phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ 0 e he hi hKe = 0 := by + have hz : tensorConjugatedLM hO hU P hP hG hQ K hKU hφ τ 0 0 = 0 := by + ext Z x k + simp [tensorConjugatedLM,tupleSupportedLM,conjugatedLM] + rfl + simp only [phaseChartPolynomialOperator,phaseCoordinatePolynomialOperator,hz, + transportSupportedLM,chartTensorTransportLM,LinearMap.zero_comp,LinearMap.comp_zero] + +namespace PolynomialSolveData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} {K : Compacts Base} + +/-- Only the numerical scale changes; the actual chart and inverse are fixed. -/ +def atUnperturbedScale (c : PolynomialSolveData P 0 G hG φ K 1 1) + (τ : ℝ) (s : ℝ≥0) (hs : s ≤ 1) : PolynomialSolveData P 0 G hG φ K τ s where + U := c.U + O := c.O + openU := c.openU + openO := c.openO + smoothP := c.smoothP + mapsG := c.mapsG + supportU := c.supportU + smoothPhase := c.smoothPhase + e := c.e + smoothForward := c.smoothForward + smoothInverse := c.smoothInverse + supportChart := c.supportChart + phase := c.phase + smoothMap := c.smoothMap + domain := c.domain + C := c.C + D := fun _ => 0 + J := c.J + nonnegC := c.nonnegC + nonnegD := fun _ => le_rfl + oneLEJ := c.oneLEJ + coordinates := c.coordinates + coefficients := fun m => reconstruction_shrink_scale (c.coefficients m) s.coe_nonneg hs + polynomial := by + intro m Z + rw [phaseChartPolynomialOperator_zero] + simp only [LinearMap.zero_apply,map_zero,zero_div,zero_mul,le_refl] + +@[simp] lemma atUnperturbedScale_e (c : PolynomialSolveData P 0 G hG φ K 1 1) + (τ : ℝ) (s : ℝ≥0) (hs : s ≤ 1) : (c.atUnperturbedScale τ s hs).e = c.e := rfl + +@[simp] lemma atUnperturbedScale_C (c : PolynomialSolveData P 0 G hG φ K 1 1) + (τ : ℝ) (s : ℝ≥0) (hs : s ≤ 1) : (c.atUnperturbedScale τ s hs).C = c.C := rfl + +@[simp] lemma atUnperturbedScale_J (c : PolynomialSolveData P 0 G hG φ K 1 1) + (τ : ℝ) (s : ℝ≥0) (hs : s ≤ 1) : (c.atUnperturbedScale τ s hs).J = c.J := rfl + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorPlaneRestore.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorPlaneRestore.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4ef4acddbaf92893521ba2fa17a8c7365c96f05 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorPlaneRestore.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedCoordinateChange + +namespace OAI + +/-! Restore coordinate-plane vector fields to a smooth global displacement, +with a fixed-atlas weighted estimate and no derivative loss. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold +open JetPolynomial (Base planeCoordinateIsometry weightedBound_comp_isometry) +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [NormedAddCommGroup V] [NormedSpace ℝ V] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def vectorPlaneRestore (f : A.centers → SmallModes.Base → V) : M → V := + ∑ i : A.centers, restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry) + +lemma vectorPlaneRestore_smooth (f : A.centers → SmallModes.Base → V) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) : ContMDiff planeModel 𝓘(ℝ, V) ∞ (A.vectorPlaneRestore f) := by + have hh : ContMDiff planeModel 𝓘(ℝ, V) ∞ + (fun x => ∑ i : A.centers, restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry) x) := + ContMDiff.sum (fun i _ => restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((hf i).comp planeCoordinateIsometry.contDiff)) + convert hh using 1 + funext x + simp only [vectorPlaneRestore, Finset.sum_apply] + +variable [CompactSpace M] + +theorem vectorPlaneRestore_bound (m : ℕ) : ∃ D : ℝ, 0 ≤ D ∧ + ∀ (f : A.centers → SmallModes.Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (f i)) → + (∀ i, WeightedEstimates.WeightedBound univ s m C (f i)) → + A.WeightedBound s m (D*C) (A.vectorPlaneRestore f) := by + obtain ⟨D,hD,hd⟩ := A.restoration_bound (V := V) m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hb + exact hd (fun i => f i ∘ planeCoordinateIsometry) s C hs hs1 hC + (fun i => (hf i).comp planeCoordinateIsometry.contDiff) + (fun i => weightedBound_comp_isometry planeCoordinateIsometry (hf i) (hb i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..1204d9d84799ed5785d6557ab26568f7b30a499f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadBounds.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.VectorChartRead +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedCoordinateChange + +namespace OAI + +/-! Fixed atlas bounds for the genuine smooth coordinate representatives. +The constants precede the map and scale, and no derivative order is lost. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma localize_outer_restore (i j : A.centers) (f : JetPolynomial.Base → V) : + localize (i : M) (A.outer i) (restore (j : M) (A.outer j) f) = + fun x => localize (i : M) (A.outer i) (A.outer j) x • + f (transition (i : M) (j : M) x) := by + funext x + by_cases hi : x ∈ (chart (i : M)).target + · by_cases hj : (chart (i : M)).symm x ∈ (chart (j : M)).source + · simp only [localize,restore,indicator_of_mem hi,indicator_of_mem hj] + rw [smul_smul] + rfl + · have hz : A.outer j ((chart (i : M)).symm x) = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hj (A.outer_support j h)) + simp only [localize,restore,indicator_of_mem hi,indicator_of_notMem hj,hz,smul_zero,zero_smul] + · simp only [localize,indicator_of_notMem hi,zero_smul] + +lemma localize_outer_restore_bound (i j : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : JetPolynomial.Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → + WeightedEstimates.WeightedBound univ s m C f → + WeightedEstimates.WeightedBound univ s m (D*C) + (localize (i : M) (A.outer i) (restore (j : M) (A.outer j) f)) := by + let K := (chart (i : M)) '' (tsupport (A.outer i) ∩ tsupport (A.outer j)) + have hK : IsCompact K := + ((isClosed_tsupport _).inter (isClosed_tsupport _)).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ h => A.outer_support i h.1)) + have hKO : K ⊆ (transition (i : M) (j : M)).source := by + rintro x ⟨p,hp,rfl⟩ + refine ⟨(chart (i : M)).map_source (A.outer_support i hp.1),?_⟩ + change (chart (i : M)).symm (chart (i : M) p) ∈ (chart (j : M)).source + rw [(chart (i : M)).left_inv (A.outer_support i hp.1)] + exact A.outer_support j hp.2 + obtain ⟨D,hD,hd⟩ := compact_localized_composition_bound (V := V) + (transition (i : M) (j : M)).open_source hK hKO + (localize_smooth (i : M) (A.outer_smooth i) (A.outer_support i) (A.outer_smooth j)) + (localize_tsupport_inter (i : M) (A.outer_support i) (A.outer j)) + (transition_smooth (i : M) (j : M)) m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hb + rw [A.localize_outer_restore] + exact hd f s C hs hs1 hC hf hb + +theorem vectorChartRead_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ,V) ∞ F → + A.WeightedBound s m C F → + WeightedEstimates.WeightedBound univ s m (D*C) (A.vectorChartRead i F) := by + classical + choose D hD hd using fun j : A.centers => A.localize_outer_restore_bound (V := V) i j m + refine ⟨∑ j : A.centers, D j,Finset.sum_nonneg (fun j _ => hD j),?_⟩ + intro F s C hs hs1 hC hF hb + have he : A.vectorChartRead i F = fun x => ∑ j : A.centers, + localize (i : M) (A.outer i) + (restore (j : M) (A.outer j) (localize (j : M) (A.weight j) F)) x := by + unfold vectorChartRead + conv_lhs => rw [← A.sum_restore_localize F] + exact localize_sum Finset.univ _ _ _ + rw [he,Finset.sum_mul] + apply WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hs.le + · intro j _ + exact (localize_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (restore_smooth (j : M) (A.outer_smooth j) (A.outer_support j) + (localize_smooth (j : M) (A.weight_smooth j) (A.weight_support j) hF))).contDiffOn + · intro j _ + exact hd j _ s C hs hs1 hC + (localize_smooth (j : M) (A.weight_smooth j) (A.weight_support j) hF) (hb j) + +theorem vectorPlaneRead_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ,V) ∞ F → + A.WeightedBound s m C F → + WeightedEstimates.WeightedBound univ s m (D*C) (A.vectorPlaneRead i F) := by + obtain ⟨D,hD,hd⟩ := A.vectorChartRead_bound (V := V) i m + refine ⟨D,hD,?_⟩ + intro F s C hs hs1 hC hF hb + exact weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth i hF) (hd F s C hs hs1 hC hF hb) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..099a28dfd2039afd200cd9bc28fb89519c1f060f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadDifferential.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasDifferential +import OAI.Geometry.SurfaceImmersion.Geometry.ManifoldMetricCalculus + +namespace OAI + +/-! Coordinate representatives recover the actual manifold differential +on each original phase support. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma vectorChartRead_fderiv (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) + {x : JetPolynomial.Base} (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + fderiv ℝ (A.vectorChartRead i F) x = fderiv ℝ (F ∘ (chart (i : M)).symm) x := by + ext v + have hh := congrArg (fun T => T (fun _ : Fin 1 => v)) (A.vectorChartRead_jets i hF 1 hx) + simpa only [iteratedFDeriv_one_apply] using hh + +lemma vectorChartRead_differential (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) {p : M} (hp : p ∈ tsupport (A.weight i)) : + surfaceDifferential F p = (fderiv ℝ (A.vectorChartRead i F) (chart (i : M) p)).comp + (surfaceDifferential (chart (i : M)) p) := by + have hs := A.weight_support i hp + have hx := (chart (i : M)).map_source hs + have hc := ((chart_smooth (i : M)) p hs).contMDiffAt + ((chart (i : M)).open_source.mem_nhds hs) + have hi : DifferentiableAt ℝ (F ∘ (chart (i : M)).symm) (chart (i : M) p) := + (((hF.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn).contDiffAt + ((chart (i : M)).open_target.mem_nhds hx)).differentiableAt (by simp) + rw [A.vectorChartRead_fderiv i hF ⟨p,hp,rfl⟩] + have he : F =ᶠ[𝓝 p] (F ∘ (chart (i : M)).symm) ∘ chart (i : M) := by + filter_upwards [(chart (i : M)).open_source.mem_nhds hs] with q hq + simp only [Function.comp_apply,(chart (i : M)).left_inv hq] + unfold surfaceDifferential + rw [he.mfderiv_eq] + change surfaceDifferential ((F ∘ (chart (i : M)).symm) ∘ chart (i : M)) p = _ + have hm := mfderiv_comp p hi.mdifferentiableAt (hc.mdifferentiableAt (by simp)) + rw [mfderiv_eq_fderiv] at hm + exact hm + +lemma vectorPlaneRead_chain (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) (x : JetPolynomial.Base) : + (fderiv ℝ (A.vectorPlaneRead i F) (planeCoordinateIsometry x)).comp + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap = + fderiv ℝ (A.vectorChartRead i F) x := by + have hh := (((A.vectorChartRead_smooth i hF).differentiable (by simp) + (planeCoordinateIsometry.symm (planeCoordinateIsometry x))).hasFDerivAt.comp (planeCoordinateIsometry x) + planeCoordinateIsometry.symm.toContinuousLinearEquiv.hasFDerivAt).fderiv + simp only [LinearIsometryEquiv.symm_apply_apply] at hh + change fderiv ℝ (A.vectorPlaneRead i F) (planeCoordinateIsometry x) = _ at hh + rw [hh] + ext v + simp only [ContinuousLinearMap.comp_apply,LinearIsometryEquiv.coe_toContinuousLinearEquiv, + ContinuousLinearEquiv.coe_coe,LinearIsometryEquiv.symm_apply_apply] + +lemma vectorPlaneRead_differential (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) {p : M} (hp : p ∈ tsupport (A.weight i)) : + surfaceDifferential F p = + (fderiv ℝ (A.vectorPlaneRead i F) (planeCoordinateIsometry (chart (i : M) p))).comp + (planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + (surfaceDifferential (chart (i : M)) p)) := by + rw [← ContinuousLinearMap.comp_assoc,A.vectorPlaneRead_chain i hF] + exact A.vectorChartRead_differential i hF hp + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadPrefixBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadPrefixBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..21e37e1d1ba2123d9cbb1ddf624a3fa0e6ee19cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/VectorReadPrefixBounds.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Correction.GlobalShiftedSmoothing + +namespace OAI + +/-! Chart readings retain the unweighted derivative prefix of the true map. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] +lemma prefix_directional_bound {f : SmallModes.Base → V} (hf : ContDiff ℝ ∞ f) + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hC : 0 ≤ C) + (hb : ∀ j ≤ m+1, WeightedEstimates.WeightedBound univ 1 j (C/s^(j-1)) f) + (v : SmallModes.Base) (hv : ‖v‖ ≤ 1) : + WeightedEstimates.WeightedBound univ s m C (SmallModes.coordDeriv v f) := by + intro j hj x _ + have hh := ((hb (j+1) (by omega)).directional isOpen_univ zero_lt_one hf.contDiffOn v) j le_rfl x (mem_univ x) + simp only [one_pow,one_mul,div_one,Nat.add_sub_cancel] at hh + calc + _ ≤ s^j*(‖v‖*(C/s^j)) := mul_le_mul_of_nonneg_left hh (pow_nonneg hs.le _) + _ = ‖v‖*C := by field_simp + _ ≤ C := mul_le_of_le_one_left hC hv + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma shiftedBound_lower_prefix {q q' m m' : ℕ} {s C : ℝ} {F : M → V} + (hb : A.ShiftedBound q m s C F) (hs : 0 ≤ s) (hs1 : s ≤ 1) + (hq : q' ≤ q) (hm : q'+m' ≤ q+m) : A.ShiftedBound q' m' s C F := by + intro i j hj x + apply le_trans _ (hb i j (hj.trans hm) x) + exact mul_le_mul_of_nonneg_right + (pow_le_pow_of_le_one hs hs1 (Nat.sub_le_sub_left hq j)) (norm_nonneg _) + +theorem vectorPlaneRead_prefix_bounds (i : A.centers) (q m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ,V) ∞ F → + A.ShiftedBound q m s C F → ∀ j ≤ q+m, + WeightedEstimates.WeightedBound univ 1 j (D*C/s^(j-q)) (A.vectorPlaneRead i F) := by + classical + choose D hD hd using fun j => A.vectorPlaneRead_bound (V := V) i j + let T := ∑ j ∈ Finset.range (q+m+1), D j + have hT : 0 ≤ T := Finset.sum_nonneg (fun j _ => hD j) + refine ⟨T,hT,?_⟩ + intro F s C hs hs1 hC hF hb j hj + have hp : A.WeightedBound 1 j (C/s^(j-q)) F := fun k => (hb k).prefix hs hs1 hC hj + have hh := hd j F 1 (C/s^(j-q)) zero_lt_one le_rfl (by positivity) hF hp + apply hh.mono_const + calc + D j*(C/s^(j-q)) = D j*C/s^(j-q) := by ring + _ ≤ T*C/s^(j-q) := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun k _ => hD k) (Finset.mem_range.mpr (by omega))) hC) + (pow_nonneg hs.le _) + +theorem vectorPlaneRead_directional_prefix_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ,V) ∞ F → + A.ShiftedBound 1 m s C F → ∀ v : SmallModes.Base, ‖v‖ ≤ 1 → + WeightedEstimates.WeightedBound univ s m (D*C) (SmallModes.coordDeriv v (A.vectorPlaneRead i F)) := by + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_prefix_bounds (V := V) i 1 m + refine ⟨D,hD,?_⟩ + intro F s C hs hs1 hC hF hb v hv + exact prefix_directional_bound (A.vectorPlaneRead_smooth i hF) hs (mul_nonneg hD hC) + (fun j hj => hd F s C hs hs1 hC hF hb j (by omega)) v hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeBoundary.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeBoundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..082ebdfe626cbf6b64d47ad4e03e6cf6584bd5f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeBoundary.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ZeroAmplitudeJet +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryNormalMatch + +namespace OAI + +/-! The frozen boundary coefficients at zero amplitude are the old mixed +second derivative and old pure normal length. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma zero_amplitude_boundary_coefficients {X Y C v e₁ e₂ : E → Vec} {a : E → ℝ} {x : E} + (hX : ContDiffAt ℝ ∞ X x) (hv : ContDiffAt ℝ ∞ v x) (ha : ContDiffAt ℝ ∞ a x) + (h₁ : ContDiffAt ℝ ∞ e₁ x) (h₂ : ContDiffAt ℝ ∞ e₂ x) + (hn : v x ≠ 0) (hax : a x = 0) + (he₁ : e₁ =ᶠ[𝓝 x] fun y => normalize (v y)) + (hproj : v x = realNormalPart (Y x) (C x) (X x)) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (d : E) : + frozenFirst (X-v) X Y C (fun y => velocityRadius (v y) (a y)) e₁ e₂ d (x,0) = + fderiv ℝ X x d ⬝ᵥ normalize (realNormalPart (X x) (Y x) (C x)) ∧ + frozenSize X Y C (fun y => velocityRadius (v y) (a y)) e₁ e₂ (x,0) = + Real.sqrt (realNormalPart (X x) (Y x) (C x) ⬝ᵥ realNormalPart (X x) (Y x) (C x)) := by + let R := fun y => velocityRadius (v y) (a y) + have hs : ContDiffAt ℝ ∞ (fun y => v y ⬝ᵥ v y) x := + ContDiffAt.sum (fun i _ => (contDiffAt_pi.mp hv i).mul (contDiffAt_pi.mp hv i)) + have hR : ContDiffAt ℝ ∞ R x := (hs.add (ha.pow 2)).sqrt (by + simpa [hax] using (dot_self_pos hn).ne') + have hjet := velocityRadius_normalize_jet hv ha hn hax + have hV : R x • direction (e₁ x) (e₂ x) 0 = realNormalPart (Y x) (C x) (X x) := by + simpa only [direction,Real.cos_zero,Real.sin_zero,one_smul,zero_smul,add_zero, + he₁.eq_of_nhds,← hproj] using hjet.1 + have hsmall : (fun y => R y • e₁ y) =ᶠ[𝓝 x] (fun y => R y • normalize (v y)) := by + filter_upwards [he₁] with y hy + rw [hy] + have hd : fderiv ℝ (fun y => R y • e₁ y) x = fderiv ℝ v x := + hsmall.fderiv_eq.trans hjet.2 + have hT : fderiv ℝ (fun y => X y-v y + R y • direction (e₁ y) (e₂ y) 0) x = fderiv ℝ X x := by + simp only [direction,Real.cos_zero,Real.sin_zero,one_smul,zero_smul,add_zero] + rw [fderiv_fun_add (f := fun y => X y-v y) (g := fun y => R y • e₁ y) ((hX.sub hv).differentiableAt (by simp)) + ((hR.smul h₁).differentiableAt (by simp)), + fderiv_fun_sub (hX.differentiableAt (by simp)) (hv.differentiableAt (by simp)),hd,sub_add_cancel] + have hN : frozenNormal X Y C R e₁ e₂ (x,0) = + normalize (realNormalPart (X x) (Y x) (C x)) := by + change normalize (leadingNormal (X x) (Y x) (C x) _) = _ + rw [hV,leadingNormal_at_projection] + constructor + · have hf := actual_first_eq_frozen (Q := X-v) (X := X) (Y := Y) (C := C) (R := R) + (e₁ := e₁) (e₂ := e₂) (α := fun _ => 0) (d := d) + ((hX.sub hv).differentiableAt (by simp)) (hR.differentiableAt (by simp)) + (h₁.differentiableAt (by simp)) (h₂.differentiableAt (by simp)) (differentiableAt_const 0) hframe + rw [← hf,hN] + exact congrArg (fun A : E →L[ℝ] Vec => A d ⬝ᵥ normalize (realNormalPart (X x) (Y x) (C x))) hT + · change Real.sqrt (leadingNormal (X x) (Y x) (C x) _ ⬝ᵥ + leadingNormal (X x) (Y x) (C x) _) = _ + rw [hV,leadingNormal_at_projection] + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d432b464e1c2eb25950c8f1754ce05fb56306be --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ZeroAmplitudeJet.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData + +namespace OAI + +/-! At zero amplitude the radial velocity has the original value and +first derivative, without an extra exterior-neighborhood hypothesis. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma velocityRadius_normalize_jet {v : E → Vec} {a : E → ℝ} {x : E} + (hv : ContDiffAt ℝ ∞ v x) (ha : ContDiffAt ℝ ∞ a x) + (hn : v x ≠ 0) (hax : a x = 0) : + velocityRadius (v x) (a x) • normalize (v x) = v x ∧ + fderiv ℝ (fun y => velocityRadius (v y) (a y) • normalize (v y)) x = fderiv ℝ v x := by + have hs : ContDiffAt ℝ ∞ (fun y => v y ⬝ᵥ v y) x := + ContDiffAt.sum (fun i _ => (contDiffAt_pi.mp hv i).mul (contDiffAt_pi.mp hv i)) + have ha2 : HasFDerivAt (fun y => a y^2) (0 : E →L[ℝ] ℝ) x := by + simpa [hax] using (ha.differentiableAt (by simp)).hasFDerivAt.pow 2 + have hspos : 0 < v x ⬝ᵥ v x := dot_self_pos hn + have hrad := (hs.differentiableAt (by simp)).hasFDerivAt.add ha2 + have hrad' := hrad.sqrt (by simpa [hax] using hspos.ne') + have hnorm := (hs.differentiableAt (by simp)).hasFDerivAt.sqrt hspos.ne' + have hunit := (normalize_smoothAt hv hn).differentiableAt (by simp) + constructor + · simpa only [velocityRadius,hax,zero_pow (by decide : 2 ≠ 0),add_zero] using norm_smul_normalize hn + · have hsame : fderiv ℝ (fun y => velocityRadius (v y) (a y) • normalize (v y)) x = + fderiv ℝ (fun y => Real.sqrt (v y ⬝ᵥ v y) • normalize (v y)) x := by + change fderiv ℝ ((fun y => velocityRadius (v y) (a y)) • (fun y => normalize (v y))) x = + fderiv ℝ ((fun y => Real.sqrt (v y ⬝ᵥ v y)) • (fun y => normalize (v y))) x + calc + _ = _ := (hrad'.smul hunit.hasFDerivAt).fderiv + _ = _ := by + simpa [hax,velocityRadius] using (hnorm.smul hunit.hasFDerivAt).fderiv.symm + have he : (fun y => Real.sqrt (v y ⬝ᵥ v y) • normalize (v y)) =ᶠ[𝓝 x] v := by + filter_upwards [hv.continuousAt.eventually_ne hn] with y hy + exact norm_smul_normalize hy + exact hsame.trans he.fderiv_eq + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Main.lean b/lean/OAI/Geometry/SurfaceImmersion/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f315484a9631020214bac559541345090311d44 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Main.lean @@ -0,0 +1,24 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConditionalMain +import OAI.Geometry.SurfaceImmersion.Whitney.WhitneySurfaceImmersion + +namespace OAI + +/-! Every compact smooth Riemannian surface, including nonorientable and +disconnected surfaces, admits a smooth isometric immersion into Euclidean +four-space. -/ +noncomputable section +open Manifold +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [SecondCountableTopology M] + +theorem smooth_isometric_immersion (g : SmoothMetric M) : + ∃ F : M → Space, IsSmoothIsometricImmersion M g F := + smooth_isometric_immersion_conditional g PublishedInputs.whitneySurfaceInput + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticProfiledLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticProfiledLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..25e27710b8988d73f9c452f183ed09869771d507 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticProfiledLoop.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfiledSurfaceLoop +import OAI.Geometry.SurfaceImmersion.Primitive.RestrictedSurfaceLoop + +namespace OAI + +/-! The constructed geometric loop in the exact coordinates and support +form used by the primitive polynomial expansion. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates GeometryPreservation + +theorem actual_analytic_surface_loop_profiles {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U K P : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → + ∃ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Z ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ + (∀ j ∈ Z, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∃ O : TopologicalSpace.Opens JetPolynomial.LowJet, (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z ∧ + ∃ l : Loop O, + IsCompact (JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T)) ∧ + JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) ⊆ O ∧ + l.HasSpatialAmplitude (a ∘ baseEquiv) ∧ + (∀ J ∈ O, a (baseEquiv (JetPolynomial.lowJetPosition J)) = 0 → + ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, + let J := surfaceCircularProfile F a e₁ e₂ α (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (profileCoefficients J 3 = 0 → H+2 < |profileCoefficients J 2|) := by + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hloop⟩ := + actual_supported_surface_loop_profiles hF ha hT hU hTU hn hI hN hHess haT hboundary + hK hKT haK hP hPK hlocal + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro H hH + obtain ⟨Z,hTZ,e₁,e₂,h₁,h₂,hframe,l,hl,⟨W,hW,hCW,hzero⟩,α,hα,hper,hvel,hprofiles⟩ := hloop H hH + let Q := JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) + have hQ : Q ⊆ jetDomain Z := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem hF (hTZ (mem_image_of_mem _ hp)) + have hepos (J : JetPolynomial.LowJet) : + (decode J).1 = baseEquiv (JetPolynomial.lowJetPosition J) := rfl + have hamp : l.HasSpatialAmplitude (a ∘ baseEquiv) := by + intro J _ + exact hl J + have hQW : ∀ J ∈ Q, (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + J ∈ decode ⁻¹' W := by + rintro _ ⟨p,hp,rfl⟩ hz + rw [JetPolynomial.lowJetPosition_lowJet] at hz + change decode (JetPolynomial.lowJet (F ∘ baseEquiv) p) ∈ W + rw [decode_lowJet hF] + exact hCW (mem_image_of_mem _ ⟨hp,hz⟩) + have hz : ∀ J ∈ decode ⁻¹' W, + (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + ∀ t, l.velocity (J,t) = normal J := by + intro J hJ haJ t + apply hzero J hJ _ t + rw [hepos] + exact haJ + obtain ⟨O,hQO,hOZ,l',ha',hvel',hz'⟩ := l.restrict_zero_collar (ha.comp baseEquiv.contDiff) hamp + hQ (hW.preimage decode_smooth.continuous) hQW hz + refine ⟨Z,hTZ,e₁,e₂,h₁,h₂,hframe,O,hOZ,l',?_,hQO,ha',hz',α,hα,hper,?_,hprofiles⟩ + · have hc : IsCompact (baseEquiv ⁻¹' T) := baseEquiv.toHomeomorph.isCompact_preimage.mpr hT + exact hc.image (JetPolynomial.lowJet_smooth (hF.comp baseEquiv.contDiff)).continuous + + · intro J t + rw [hvel'] + exact hvel J t + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3217fb705994792b9459b58a4fd3135ac7f3545 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualAnalyticSurfaceLoop.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualSupportedSurfaceLoop +import OAI.Geometry.SurfaceImmersion.Primitive.RestrictedSurfaceLoop + +namespace OAI + +/-! The constructed geometric loop in the exact coordinates and support +form used by the primitive polynomial expansion. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates + +theorem actual_analytic_surface_loop {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U K P : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) : + ∃ O : TopologicalSpace.Opens JetPolynomial.LowJet, ∃ l : Loop O, + IsCompact (JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T)) ∧ + JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) ⊆ O ∧ + l.HasSpatialAmplitude (a ∘ baseEquiv) ∧ + ∀ J ∈ O, a (baseEquiv (JetPolynomial.lowJetPosition J)) = 0 → + ∀ t, l.velocity (J,t) = normal J := by + obtain ⟨Z,hTZ,e₁,e₂,_,_,_,l,hl,⟨W,hW,hCW,hzero⟩,_⟩ := + actual_supported_surface_loop hF ha hT hU hTU hn hI hN hHess haT hboundary + hK hKT haK hP hPK hlocal 0 + let Q := JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) + have hQ : Q ⊆ jetDomain Z := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem hF (hTZ (mem_image_of_mem _ hp)) + have hepos (J : JetPolynomial.LowJet) : + (decode J).1 = baseEquiv (JetPolynomial.lowJetPosition J) := rfl + have hamp : l.HasSpatialAmplitude (a ∘ baseEquiv) := by + intro J _ + exact hl J + have hQW : ∀ J ∈ Q, (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + J ∈ decode ⁻¹' W := by + rintro _ ⟨p,hp,rfl⟩ hz + rw [JetPolynomial.lowJetPosition_lowJet] at hz + change decode (JetPolynomial.lowJet (F ∘ baseEquiv) p) ∈ W + rw [decode_lowJet hF] + exact hCW (mem_image_of_mem _ ⟨hp,hz⟩) + have hz : ∀ J ∈ decode ⁻¹' W, + (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + ∀ t, l.velocity (J,t) = normal J := by + intro J hJ haJ t + apply hzero J hJ _ t + rw [hepos] + exact haJ + obtain ⟨O,hQO,_,l',ha',_,hz'⟩ := l.restrict_zero_collar (ha.comp baseEquiv.contDiff) hamp + hQ (hW.preimage decode_smooth.continuous) hQW hz + refine ⟨O,l',?_,hQO,ha',hz'⟩ + have hc : IsCompact (baseEquiv ⁻¹' T) := baseEquiv.toHomeomorph.isCompact_preimage.mpr hT + exact hc.image (JetPolynomial.lowJet_smooth (hF.comp baseEquiv.contDiff)).continuous + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularPeriod.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularPeriod.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d7383a7aebfa4ddbbe583f9cefdbfb0527a261d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularPeriod.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCircularProfile + +namespace OAI + +/-! Representatives in one compact period transfer the constructed surface +profile estimates to the analytic loop at every phase. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation SurfaceJetCoordinates +open JetVelocityCoordinates + +lemma actual_circular_period_profile {F : SmallModes.Base → Vec} (hF : ContDiff ℝ ∞ F) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {Z : TopologicalSpace.Opens GeometricJet} {O : TopologicalSpace.Opens JetPolynomial.LowJet} + (hOZ : (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z) (l : Loop O) + (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {e₁ e₂ : GeometricJet → Vec} (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hGO : MapsTo (JetPolynomial.lowJet (F ∘ baseEquiv)) S O) + {p : JetPolynomial.Base} (hp : p ∈ S) (t : CovarianceCorrector.Period) : + ∃ s : ℝ, s ∈ Icc (0 : ℝ) 1 ∧ + boundaryProfileMap (l.geometricLeadingProfile (F ∘ baseEquiv) (hF.comp baseEquiv.contDiff) + hGO p t) = surfaceCircularProfile F a e₁ e₂ α (baseEquiv p,s) := by + have ht : t ∈ ((↑) : ℝ → CovarianceCorrector.Period) '' Icc (0 : ℝ) (0+1) := by + rw [AddCircle.coe_image_Icc_eq] + trivial + obtain ⟨s,hs,hst⟩ := ht + refine ⟨s,by simpa only [zero_add] using hs,?_⟩ + rw [← hst] + exact l.actual_circular_geometric_profile hF ha hOZ hamp h₁ h₂ hα hvel hGO hp s + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..2378ebc3cd9ceb67b49fd8ed2a5095759f246d0e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCircularProfile.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCircularThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.CircularSectionProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.SpatialLoopAmplitude + +namespace OAI + +/-! The constructed real surface profile is exactly the analytic loop's +five-profile map, including its transverse mixed derivative. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation SurfaceJetCoordinates +open JetVelocityCoordinates + +lemma actual_circular_geometric_profile {F : SmallModes.Base → Vec} (hF : ContDiff ℝ ∞ F) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {Z : TopologicalSpace.Opens GeometricJet} {O : TopologicalSpace.Opens JetPolynomial.LowJet} + (hOZ : (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z) (l : Loop O) + (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {e₁ e₂ : GeometricJet → Vec} (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hGO : MapsTo (JetPolynomial.lowJet (F ∘ baseEquiv)) S O) + {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + boundaryProfileMap (l.geometricLeadingProfile (F ∘ baseEquiv) (hF.comp baseEquiv.contDiff) + hGO p (t : CovarianceCorrector.Period)) = + surfaceCircularProfile F a e₁ e₂ α (baseEquiv p,t) := by + let σ := JetPolynomial.lowJet (F ∘ baseEquiv) + let R₀ : JetPolynomial.LowJet → ℝ := fun J => velocityRadius (normal J) (a (decode J).1) + have hA : ContDiff ℝ ∞ (fun J : JetPolynomial.LowJet => a (decode J).1) := + ha.comp (contDiff_fst.comp decode_smooth) + have hR₀ : ContDiffOn ℝ ∞ R₀ O := velocityRadius_smoothOn l.smoothNormal hA.contDiffOn (by + intro J hJ + have hh := l.nonzero J hJ + rw [hamp J hJ] at hh + exact hh) + have he₁ := h₁.comp decode_smooth.contDiffOn hOZ + have he₂ := h₂.comp decode_smooth.contDiffOn hOZ + have hα₀ : ContDiffOn ℝ ∞ (fun z : JetPolynomial.LowJet × ℝ => α (decode z.1,z.2)) + (O ×ˢ univ) := hα.comp ((decode_smooth.comp contDiff_fst).prodMk contDiff_snd).contDiffOn + (fun _ hz => ⟨hOZ hz.1,hz.2⟩) + rw [l.circular_geometricLeadingProfile hR₀ he₁ he₂ hα₀ hvel + (hF.comp baseEquiv.contDiff) hGO hp t] + let X := coordDeriv dx F + let Y := coordDeriv dy F + let C := coordDeriv dy (coordDeriv dy F) + let v : SmallModes.Base → Vec := fun x => jetNormal (CollarVelocity.jetSection F x) + let Q := X-v + let R : SmallModes.Base → ℝ := fun x => velocityRadius (v x) (a x) + let E₁ := e₁ ∘ CollarVelocity.jetSection F + let E₂ := e₂ ∘ CollarVelocity.jetSection F + let β : SmallModes.Base × ℝ → ℝ := fun z => α (CollarVelocity.jetSection F z.1,z.2) + have hq : tangent ∘ σ = Q ∘ baseEquiv := by + funext x + change (decode (σ x)).2 0 - jetNormal (decode (σ x)) = _ + rw [show decode (σ x) = CollarVelocity.jetSection F (baseEquiv x) from decode_lowJet hF x] + rfl + have hx : (slot 1) ∘ σ = X ∘ baseEquiv := by + funext x + change (decode (σ x)).2 0 = _ + rw [show decode (σ x) = CollarVelocity.jetSection F (baseEquiv x) from decode_lowJet hF x] + rfl + have hy : (slot 2) ∘ σ = Y ∘ baseEquiv := by + funext x + change (decode (σ x)).2 1 = _ + rw [show decode (σ x) = CollarVelocity.jetSection F (baseEquiv x) from decode_lowJet hF x] + rfl + have hc : (slot 6) ∘ σ = C ∘ baseEquiv := by + funext x + change (decode (σ x)).2 4 = _ + rw [show decode (σ x) = CollarVelocity.jetSection F (baseEquiv x) from decode_lowJet hF x] + rfl + have hr : R₀ ∘ σ = R ∘ baseEquiv := by + funext x + change velocityRadius (jetNormal (decode (σ x))) (a (decode (σ x)).1) = _ + rw [show decode (σ x) = CollarVelocity.jetSection F (baseEquiv x) from decode_lowJet hF x] + rfl + have he1 : (e₁ ∘ decode) ∘ σ = E₁ ∘ baseEquiv := by + funext x + exact congrArg e₁ (decode_lowJet hF x) + have he2 : (e₂ ∘ decode) ∘ σ = E₂ ∘ baseEquiv := by + funext x + exact congrArg e₂ (decode_lowJet hF x) + have hb : (fun z : JetPolynomial.Base × ℝ => α (decode (σ z.1),z.2)) = + fun z => β (baseEquiv z.1,z.2) := by + funext z + rw [show decode (σ z.1) = CollarVelocity.jetSection F (baseEquiv z.1) from decode_lowJet hF z.1] + change circularFamilyProfile (tangent ∘ σ) ((slot 1) ∘ σ) ((slot 2) ∘ σ) ((slot 6) ∘ σ) + (R₀ ∘ σ) ((e₁ ∘ decode) ∘ σ) ((e₂ ∘ decode) ∘ σ) + (fun z => α (decode (σ z.1),z.2)) (JetPolynomial.coordinateVector 1) (p,t) = _ + rw [hq,hx,hy,hc,hr,he1,he2,hb] + have hJ := hGO hp + have hZp : CollarVelocity.jetSection F (baseEquiv p) ∈ Z := by + rw [← decode_lowJet hF p] + exact hOZ hJ + have hD : gramDet (Y (baseEquiv p)) (C (baseEquiv p)) ≠ 0 := by + have hh := l.gram_ne _ hJ + change gramDet ((decode (σ p)).2 1) ((decode (σ p)).2 4) ≠ 0 at hh + rw [show decode (σ p) = CollarVelocity.jetSection F (baseEquiv p) from decode_lowJet hF p] at hh + exact hh + have hv : ContDiffAt ℝ ∞ v (baseEquiv p) := + contDiffAt_realNormalPart (contDiff_real_coordDeriv hF dy).contDiffAt + (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dy).contDiffAt + (contDiff_real_coordDeriv hF dx).contDiffAt hD + have hn : v (baseEquiv p) ≠ 0 ∨ a (baseEquiv p) ≠ 0 := by + have hh := l.nonzero _ hJ + rw [hamp _ hJ] at hh + change jetNormal (decode (σ p)) ≠ 0 ∨ a (baseEquiv p) ≠ 0 at hh + rw [show decode (σ p) = CollarVelocity.jetSection F (baseEquiv p) from decode_lowJet hF p] at hh + exact hh + have hdot : ContDiffAt ℝ ∞ (fun x => v x ⬝ᵥ v x) (baseEquiv p) := + ContDiffAt.sum (fun i _ => (contDiffAt_pi.mp hv i).mul (contDiffAt_pi.mp hv i)) + have hR : ContDiffAt ℝ ∞ R (baseEquiv p) := + (hdot.add (ha.contDiffAt.pow 2)).sqrt (Real.sqrt_pos.mp (velocityRadius_pos hn)).ne' + have hσ := CollarVelocity.jetSection_smooth hF + have hE1 := (h₁.contDiffAt (Z.isOpen.mem_nhds hZp)).comp _ hσ.contDiffAt + have hE2 := (h₂.contDiffAt (Z.isOpen.mem_nhds hZp)).comp _ hσ.contDiffAt + have hβ : ContDiffAt ℝ ∞ β (baseEquiv p,t) := + (hα.contDiffAt ((Z.isOpen.prod isOpen_univ).mem_nhds ⟨hZp,mem_univ t⟩)).comp _ + ((hσ.comp contDiff_fst).prodMk contDiff_snd).contDiffAt + rw [circularFamilyProfile_comp (Q := Q) (X := X) (Y := Y) (C := C) (R := R) + (e₁ := E₁) (e₂ := E₂) (α := β) baseEquiv.differentiableAt + (((contDiff_real_coordDeriv hF dx).contDiffAt.sub hv).differentiableAt (by simp)) + (hR.differentiableAt (by simp)) (hE1.differentiableAt (by simp)) + (hE2.differentiableAt (by simp)) (hβ.differentiableAt (by simp)),baseEquiv.fderiv] + have hd : baseEquiv.toContinuousLinearMap (JetPolynomial.coordinateVector 1) = dy := baseEquiv_one + rw [hd] + rfl + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingInvariant.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingInvariant.lean new file mode 100644 index 0000000000000000000000000000000000000000..73171d6c2b9f3be0bddfeedb83f297775b9e97ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingInvariant.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SecondFormComponents +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingInvariantThreshold + +namespace OAI + +/-! Identify the actual ordered boundary invariant with the normal-coordinate +formula. Euclidean normalization is preserved by the coordinate conversion. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes VelocityFrame + +lemma spaceCoordinates_norm (v : RVec 4) : + ‖spaceCoordinates.symm v‖ = Real.sqrt (v ⬝ᵥ v) := by + rw [← spaceCoordinates_symm_inner,real_inner_self_eq_norm_sq,Real.sqrt_sq (norm_nonneg _)] + +lemma spaceCoordinates_symm_normalize (v : RVec 4) : + spaceCoordinates.symm (normalize v) = ‖spaceCoordinates.symm v‖⁻¹ • spaceCoordinates.symm v := by + simp only [VelocityFrame.normalize,map_smul,spaceCoordinates_norm] + +namespace SecondFormFrame +variable {F : RField 4} {p : Base} {k : ℝ} (d : SecondFormFrame F p k) + +lemma orderedCrossing_eq (hF : ContDiff ℝ ∞ F) (κ t u : ℝ) + (hk : k = κ*NormalFrame.gramDet (coordDeriv dx F p) (coordDeriv dy F p)) : + orderedCrossing F (1,t) (1,u) p κ = + modelOrderedCrossing (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + d.S d.D d.N d.L k t u := by + have hg : NormalFrame.gramDet (coordDeriv (1,t) F p) (coordDeriv (1,u) F p) = + (u-t)^2*NormalFrame.gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + rw [coordDeriv_eq_basis F (1,t),coordDeriv_eq_basis F (1,u)] + simpa only [one_mul,mul_one] using gramDet_change_basis (coordDeriv dx F p) + (coordDeriv dy F p) 1 t 1 u + unfold orderedCrossing + rw [← spaceCoordinates_symm_inner,spaceCoordinates_symm_normalize, + d.mixed_space_components hF,d.slope_space_components hF,hg] + unfold modelOrderedCrossing + congr 1 + rw [hk] + ring + +end SecondFormFrame +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d2c1467ad55a96a94cb41e0f5246d498613dbc1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualCrossingPath.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AdmissibleCrossingPath +import OAI.Geometry.SurfaceImmersion.Primitive.CompactCrossingNormal + +namespace OAI + +/-! The admissible crossing path is a unit section of the actual normal +plane, and its endpoint pairs positively with both actual pure forms. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame +namespace SecondFormFrame +variable {F : RField 4} {p : Base} {k : ℝ} (d : SecondFormFrame F p k) + +theorem actual_crossing_path (hF : ContDiff ℝ ∞ F) (t u : ℝ) + (hchoice : + (0 < inner ℝ (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k t)) (spaceCoordinates.symm d.n) ∧ + 0 < inner ℝ (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k u)) (spaceCoordinates.symm d.n)) ∨ + (0 < inner ℝ (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k t)) + (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k u)) ∧ + ∃ w : Space, inner ℝ (spaceCoordinates.symm d.n) w = 0 ∧ + 0 < inner ℝ (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k t)) w ∧ + 0 < inner ℝ (frameVector (spaceCoordinates.symm d.n) (spaceCoordinates.symm d.m) + (slopePure d.S d.D d.N d.L k u)) w)) : + ∃ γ : ℝ → Vec, ContDiffOn ℝ ∞ γ (Icc (0 : ℝ) 1) ∧ γ 0 = d.n ∧ + (∀ s ∈ Icc (0 : ℝ) 1, + γ s ⬝ᵥ γ s = 1 ∧ + γ s ≠ -normalize (realSecondForm F (1,t) (1,t) p) ∧ + γ s ≠ -normalize (realSecondForm F (1,u) (1,u) p) ∧ + coordDeriv dx F p ⬝ᵥ γ s = 0 ∧ coordDeriv dy F p ⬝ᵥ γ s = 0) ∧ + 0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ γ 1 ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ γ 1 := by + rw [← d.slope_space_components hF t,← d.slope_space_components hF u] at hchoice + have hraw : + (0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ d.n ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ d.n) ∨ + (0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ realSecondForm F (1,u) (1,u) p ∧ + ∃ w : Vec, d.n ⬝ᵥ w = 0 ∧ + 0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ w ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ w) := by + rcases hchoice with hpos | ⟨hpq,w,hnw,hpw,hqw⟩ + · left + simpa only [spaceCoordinates_symm_inner] using hpos + · right + refine ⟨by simpa only [spaceCoordinates_symm_inner] using hpq,spaceCoordinates w,?_,?_,?_⟩ + · simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hnw + · simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hpw + · simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hqw + obtain ⟨γ,hγ,hzero,hunit,hend⟩ := admissible_crossing_path d.unit_n hraw + refine ⟨γ,hγ,hzero,?_,hend⟩ + intro s hs + obtain ⟨hu,hp,hq,hperp⟩ := hunit s hs + have htangent (v : Base) (hv : coordDeriv v F p ⬝ᵥ d.n = 0) + (hvm : coordDeriv v F p ⬝ᵥ d.m = 0) : coordDeriv v F p ⬝ᵥ γ s = 0 := by + apply hperp _ hv + rw [d.pure_components hF] + simp only [dotProduct_add,dotProduct_smul,smul_eq_mul,hv,hvm,mul_zero,add_zero] + exact ⟨hu,hp,hq,htangent dx d.tangent_n.1 d.tangent_m.1, + htangent dy d.tangent_n.2 d.tangent_m.2⟩ + +end SecondFormFrame +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFiniteCrossingNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFiniteCrossingNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..025d4386c21f64ff8b624215fcc769a985821ae6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFiniteCrossingNormal.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteCrossingNormals +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteCrossingNeighborhoods +import OAI.Geometry.SurfaceImmersion.Geometry.SecondFormNormalFields + +namespace OAI + +/-! The finite crossing construction applied to the actual second form of +one immersion, with its canonical transverse preferred normal. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame +variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] + +theorem actual_finite_crossing_normal {F : RField 4} (hF : ContDiff ℝ ∞ F) (z : ℝ) + {U V : Set Base} (hV : IsOpen V) + (hreg : ∀ y ∈ U, realBoundaryProfile F z y ∈ regularBoundaryProfiles) + (Y : κ → Base → Base) (hY : ∀ k, ContDiffOn ℝ ∞ (Y k) U) + (left right : ι → κ) (x : ι → Base) (hxinj : Function.Injective x) + (hxU : ∀ i, x i ∈ U) (hxV : ∀ i, x i ∈ V) + (C : κ → Set Base) (hC : ∀ k, IsClosed (C k)) + (honly : ∀ i k, x i ∈ C k → k = left i ∨ k = right i) + (hchoice : ∀ i, + (0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ + profilePreferred (realBoundaryProfile F z (x i)) ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ + profilePreferred (realBoundaryProfile F z (x i))) ∨ + (0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ + realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile F z (x i)) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ w ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ w)) + (hU : IsOpen U) : + ∃ g : Base → Vec, ContDiffOn ℝ ∞ g U ∧ + (∀ y ∈ U, g y ⬝ᵥ g y = 1) ∧ + (∀ y ∈ U, ∀ w : Base, coordDeriv w F y ⬝ᵥ g y = 0) ∧ + (∀ y ∈ U, y ∉ V → g y = profilePreferred (realBoundaryProfile F z y)) ∧ + (∀ k y, y ∈ U → y ∈ C k → + profilePreferred (realBoundaryProfile F z y) ≠ + -normalize (realSecondForm F (Y k y) (Y k y) y) → + g y ≠ -normalize (realSecondForm F (Y k y) (Y k y) y)) ∧ + ∀ i, 0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ g (x i) ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ g (x i) := by + let n : Base → Vec := fun y => profilePreferred (realBoundaryProfile F z y) + let P : κ → Base → Vec := fun k y => realSecondForm F (Y k y) (Y k y) y + have hD : ∀ y ∈ U, gramDet (coordDeriv dx F y) (coordDeriv dy F y) ≠ 0 := + fun y hy => (hreg y hy).1 + have hPs : ∀ k, ContDiffOn ℝ ∞ (P k) U := + fun k => realSecondForm_variable_smoothOn hF hD (hY k) + have hns : ContDiffOn ℝ ∞ n U := profilePreferred_field_smoothOn hF z hreg + have hnu : ∀ y ∈ U, n y ⬝ᵥ n y = 1 := fun y hy => profilePreferred_unit (hreg y hy) + obtain ⟨O,hO,hxo,hOV,hdisj,hcurve⟩ := finite_crossing_neighborhoods x hxinj left right C hC honly + (fun _ => V) (fun _ => hV) hxV + obtain ⟨g,hg,hgu,hge,hga,hgn,hgp⟩ := finite_crossing_normals hU hns hnu P hPs left right x hxU + O hO hxo hdisj C hcurve hchoice + refine ⟨g,hg,hgu,?_,?_,hga,hgp⟩ + · intro y hy w + have hnperp := profilePreferred_perp (hreg y hy) + have hperp (d : Base) (hd : coordDeriv d F y ⬝ᵥ n y = 0) + (hsecond : ∀ k, coordDeriv d F y ⬝ᵥ P k y = 0) : coordDeriv d F y ⬝ᵥ g y = 0 := + hgn y hy _ hd hsecond + have hxg := hperp dx hnperp.1 + (fun k => (realSecondForm_field_perp (hD y hy) (Y k y) (Y k y)).1) + have hyg := hperp dy hnperp.2 + (fun k => (realSecondForm_field_perp (hD y hy) (Y k y) (Y k y)).2) + rw [coordDeriv_eq_basis F w y] + simp only [add_dotProduct,smul_dotProduct,smul_eq_mul,hxg,hyg,mul_zero,add_zero] + · intro y hy hyV + exact hge y hy (fun i h => hyV (hOV i h)) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFixedFrameLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFixedFrameLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..390e5a93c9477625df7a42b96c6f220f48698e7a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualFixedFrameLoop.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualSupportedSurfaceLoop + +namespace OAI + +/-! The preferred frame and its domain are fixed before prescribing the +transverse turn size in the actual supported loop construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates + +theorem actual_supported_surface_loop_fixed_frame {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U K P : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) : + ∃ Ω : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Ω ∧ + (Ω : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Ω ∧ ContDiffOn ℝ ∞ e₂ Ω ∧ + (∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∀ turn : ℝ, ∃ Z : TopologicalSpace.Opens GeometricJet, + CollarVelocity.jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,0)) x dy ∧ + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,τ x)) x dy := by + let C₀ : Set Base := {p ∈ T | a p = 0} + have hC : IsCompact C₀ := hT.inter_right (isClosed_eq ha.continuous continuous_const) + have hCU : C₀ ⊆ U := fun _ hp => hTU hp.1 + obtain ⟨W,hW,hCW,hWΩ,e₁,e₂,he₁,he₂,hframe,hcollar⟩ := exists_preferred_jet_frame + hF hU hn hC hCU hI hN hHess (fun p hp => hboundary p hp.1 hp.2) + let Ω := supportedJetDomain U n a + have hΩ : IsOpen Ω := supportedJetDomain_open hU hn ha + let L := CollarVelocity.jetSection F '' T + let Cj := CollarVelocity.jetSection F '' C₀ + have hL : IsCompact L := hT.image (CollarVelocity.jetSection_smooth hF).continuous + have hCj : IsCompact Cj := hC.image (CollarVelocity.jetSection_smooth hF).continuous + have hLΩ : L ⊆ Ω := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem_supported_domain hF (hTU hp) (hI p (hTU hp)) + (hN p (hTU hp)) (hHess p (hTU hp)) (fun h => (hboundary p hp h).1) + obtain ⟨O,hO,hKO,_,hOpos⟩ := CollarVelocity.compact_open_thickening hK + (isOpen_lt continuous_const ha.continuous) haK + let V : Set GeometricJet := W ∩ ((Prod.fst ⁻¹' closure O)ᶜ ∩ Ω) + have hV : IsOpen V := hW.inter ((isClosed_closure.preimage continuous_fst).isOpen_compl.inter hΩ) + have hCV : Cj ⊆ V := by + rintro _ ⟨p,hp,rfl⟩ + refine ⟨hCW (mem_image_of_mem _ hp),?_,hLΩ (mem_image_of_mem _ hp.1)⟩ + change p ∉ closure O + intro hx + have := hOpos hx + change 0 < a p at this + rw [hp.2] at this + exact lt_irrefl _ this + have hAmp : ∀ j ∈ L \ Cj, 0 < a j.1 := by + rintro j ⟨⟨p,hp,rfl⟩,hj⟩ + apply lt_of_le_of_ne (haT p hp) + intro hz + exact hj (mem_image_of_mem _ ⟨hp,hz.symm⟩) + have hCL : Cj ⊆ L := image_mono (fun _ hp => hp.1) + have hKL : MapsTo (CollarVelocity.jetSection F) K L := + fun _ hx => mem_image_of_mem _ (hKT hx) + have hVΩ : V ⊆ Ω := fun _ hj => hj.2.2 + have he1 : ContDiffOn ℝ ∞ e₁ Ω := he₁.mono (fun _ hj => hj.1) + have he2 : ContDiffOn ℝ ∞ e₂ Ω := he₂.mono (fun _ hj => hj.1) + have hfr := fun j (hj : j ∈ Ω) => hframe j hj.1 + refine ⟨⟨Ω,hΩ⟩,hLΩ,Subset.rfl,e₁,e₂,he1,he2,hfr,?_⟩ + intro turn + obtain ⟨Z,hLZ,hZΩ,l,hl,hzero,α,hα,hper,hvel,τ,hturn,hlarge⟩ := constructed_surface_loop + hF hCj hK hL hCL hKL hO hKO + (fun j hj hjo => hj.2.1 (subset_closure hjo)) + hV hΩ hCV hVΩ hLΩ hP hPK hlocal he1 he2 + (ha.comp contDiff_fst).contDiffOn + (fun j hj => preferredJetDomain_velocity_gram hj.1) hfr + (fun j hj => hcollar j hj.1) (fun j hj => hj.2) hAmp turn + refine ⟨Z,hLZ,hZΩ,l,hl,?_,α,hα,hper,hvel,τ,hturn,hlarge⟩ + obtain ⟨W',hW',hCW',_,hzero'⟩ := hzero + exact ⟨W',hW',hCW',hzero'⟩ + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d009bc3b2190912d68a505c13e17fbe579c5e2c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCrossing.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCrossingInvariant +import OAI.Geometry.SurfaceImmersion.Primitive.CompactCrossingPreservation + +namespace OAI + +/-! Transfer the compact turn/nonturn argument all the way to the two +ordered crossing invariants of an actual smooth surface. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +lemma profileCoefficient_sub_le (H J : BoundaryProfile) (i : Fin 4) : + |profileCoefficients H i-profileCoefficients J i| ≤ + ‖profileGeometry H-profileGeometry J‖ := by + have h := (norm_le_pi_norm ((profileGeometry H-profileGeometry J).2) i).trans + (norm_snd_le (profileGeometry H-profileGeometry J)) + simpa only [profileGeometry,Prod.snd_sub,Pi.sub_apply,Real.norm_eq_abs] using h + +variable {X : Type*} [TopologicalSpace X] [CompactSpace X] + +/-- The turn threshold is chosen from the fixed metric and slope bounds, +before the loop and its mixed/longitudinal derivatives are supplied. -/ +theorem compact_actual_profile_crossings (sLo sHi K d T : ℝ) + (hsLo : 0 < sLo) (hsHi : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ J : X → BoundaryProfile, Continuous J → + (∀ x, J x ∈ regularBoundaryProfiles) → + (∀ x, sLo ≤ profileCoefficients (J x) 0) → + (∀ x, profileCoefficients (J x) 0 ≤ sHi) → + (∀ x, |profileCoefficients (J x) 1| ≤ d) → + (∀ x, profileCoefficients (J x) 3 = 0 → H+2 < |profileCoefficients (J x) 2|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x : X, + ∀ F : RField 4, ContDiff ℝ ∞ F → ∀ p : Base, + ‖realBoundaryProfile F z p-J x‖ < η → + ∀ κ : ℝ, + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + κ*gramDet (coordDeriv dx F p) (coordDeriv dy F p) → + -K ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ t u : ℝ, |t| ≤ T → |u| ≤ T → + 0 < orderedCrossing F (1,t) (1,u) p κ ∧ + 0 < orderedCrossing F (1,u) (1,t) p κ := by + obtain ⟨H,hH,hcross⟩ := compact_crossing_preservation (E := Space) (X := X) + (sLo/2) (sHi+1) K (d+1) T (half_pos hsLo) (by linarith) hK (by linarith) hT + refine ⟨H,hH,?_⟩ + intro J hJ hreg hlo hhi hD hturn + have hc : Continuous (fun x => profileCoefficients (J x)) := by + apply continuous_iff_continuousAt.mpr + intro x + exact (contDiffAt_profileCoefficients (hreg x)).continuousAt.comp hJ.continuousAt + let A : X → ℝ := fun x => profileCoefficients (J x) 3 + let N₀ : X → ℝ := fun x => profileCoefficients (J x) 2 + have hA : Continuous A := (continuous_apply 3).comp hc + have hN₀ : Continuous N₀ := (continuous_apply 2).comp hc + obtain ⟨η₀,hη₀,hpreserve⟩ := hcross univ isCompact_univ A N₀ hA hN₀ + (fun x _ hx => hturn x hx) + let ε := min 1 (min (sLo/2) η₀) + have hε : 0 < ε := lt_min zero_lt_one (lt_min (half_pos hsLo) hη₀) + obtain ⟨δ,hδ,hprofile⟩ := compact_boundary_profile_stability + (isCompact_univ.image hJ) (by rintro _ ⟨x,_,rfl⟩; exact hreg x) ε hε + refine ⟨min δ η₀,lt_min hδ hη₀,?_⟩ + intro z hz hzη x F hF p herror κ hk hcurv t u ht hu + obtain ⟨hactual,hnear⟩ := hprofile (J x) (mem_image_of_mem J (mem_univ x)) + (realBoundaryProfile F z p) (herror.trans_le (min_le_left _ _)) + obtain ⟨f,hn,hm,hcoef⟩ := exists_profile_secondFormFrame hF z p hactual + have hdiff (j : Fin 4) : + |(![f.S,f.D,f.N,z*f.L] j)-profileCoefficients (J x) j| < ε := by + rw [← hcoef] + exact (profileCoefficient_sub_le _ _ j).trans_lt hnear + have hS : |f.S-profileCoefficients (J x) 0| < ε := by simpa using hdiff 0 + have hD' : |f.D-profileCoefficients (J x) 1| < ε := by simpa using hdiff 1 + have hN : |f.N-N₀ x| < η₀ := by + exact (show |f.N-N₀ x| < ε by simpa [N₀] using hdiff 2).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hL : |z*f.L-A x| < η₀ := by + exact (show |z*f.L-A x| < ε by simpa [A] using hdiff 3).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hεone : ε ≤ 1 := min_le_left _ _ + have hεS : ε ≤ sLo/2 := (min_le_right 1 _).trans (min_le_left _ _) + have hsmin : sLo/2 ≤ f.S := by + have hh := (abs_lt.mp hS).1 + linarith [hlo x] + have hsmax : f.S ≤ sHi+1 := by + have hh := (abs_lt.mp hS).2 + linarith [hhi x] + have hdbound : |f.D| ≤ d+1 := by + have hh := abs_sub_le f.D (profileCoefficients (J x) 1) 0 + simp only [sub_zero] at hh + linarith [hD x] + have hmn : inner ℝ (spaceCoordinates.symm f.m) (spaceCoordinates.symm f.n) = 0 := by + rw [spaceCoordinates_symm_inner,dotProduct_comm] + exact f.orthogonal + have hh := hpreserve z hz (hzη.trans_le (min_le_right _ _)) x (mem_univ x) + (spaceCoordinates.symm f.n) (spaceCoordinates.symm f.m) + (spaceCoordinates_norm_unit f.unit_n) (spaceCoordinates_norm_unit f.unit_m) hmn + f.S f.D f.N f.L _ t u hsmin hsmax hcurv hdbound ht hu hN hL + rw [f.orderedCrossing_eq hF κ t u hk,f.orderedCrossing_eq hF κ u t hk] + exact hh + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..47dafc5f603f3b0e1afaaf4da9c78dd4200c8637 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurve.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCrossing +import OAI.Geometry.SurfaceImmersion.Geometry.ActualCurveAvoidance + +namespace OAI + +/-! Nonvanishing and avoidance of the negative preferred normal for every +nonzero curve direction, transferred from the five leading profiles. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame +variable {X : Type*} [TopologicalSpace X] [CompactSpace X] + +theorem compact_actual_profile_curves (sLo K d : ℝ) + (hsLo : 0 < sLo) (hK : 0 ≤ K) (hd : 0 ≤ d) : + ∃ H : ℝ, 0 < H ∧ ∀ J : X → BoundaryProfile, Continuous J → + (∀ x, J x ∈ regularBoundaryProfiles) → + (∀ x, sLo ≤ profileCoefficients (J x) 0) → + (∀ x, |profileCoefficients (J x) 1| ≤ d) → + (∀ x, profileCoefficients (J x) 3 = 0 → H+2 < |profileCoefficients (J x) 2|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x : X, + ∀ F : RField 4, ContDiff ℝ ∞ F → ∀ p : Base, + ‖realBoundaryProfile F z p-J x‖ < η → + -K ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ b c : ℝ, (b ≠ 0 ∨ c ≠ 0) → + realSecondForm F (b,c) (b,c) p ≠ 0 ∧ + normalize (realSecondForm F (b,c) (b,c) p) ≠ + -profilePreferred (realBoundaryProfile F z p) := by + obtain ⟨H,hH,hcurve⟩ := compact_curve_avoidance (X := X) + (sLo/2) K (d+1) (half_pos hsLo) hK (by linarith) + refine ⟨H,hH,?_⟩ + intro J hJ hreg hlo hD hturn + have hc : Continuous (fun x => profileCoefficients (J x)) := by + apply continuous_iff_continuousAt.mpr + intro x + exact (contDiffAt_profileCoefficients (hreg x)).continuousAt.comp hJ.continuousAt + let A : X → ℝ := fun x => profileCoefficients (J x) 3 + let N₀ : X → ℝ := fun x => profileCoefficients (J x) 2 + have hA : Continuous A := (continuous_apply 3).comp hc + have hN₀ : Continuous N₀ := (continuous_apply 2).comp hc + obtain ⟨η₀,hη₀,hpreserve⟩ := hcurve univ isCompact_univ A N₀ hA hN₀ + (fun x _ hx => hturn x hx) + let ε := min 1 (min (sLo/2) η₀) + have hε : 0 < ε := lt_min zero_lt_one (lt_min (half_pos hsLo) hη₀) + obtain ⟨δ,hδ,hprofile⟩ := compact_boundary_profile_stability + (isCompact_univ.image hJ) (by rintro _ ⟨x,_,rfl⟩; exact hreg x) ε hε + refine ⟨min δ η₀,lt_min hδ hη₀,?_⟩ + intro z hz hzη x F hF p herror hcurv b c hbc + obtain ⟨hactual,hnear⟩ := hprofile (J x) (mem_image_of_mem J (mem_univ x)) + (realBoundaryProfile F z p) (herror.trans_le (min_le_left _ _)) + obtain ⟨f,hn,hm,hcoef⟩ := exists_profile_secondFormFrame hF z p hactual + have hdiff (j : Fin 4) : + |(![f.S,f.D,f.N,z*f.L] j)-profileCoefficients (J x) j| < ε := by + rw [← hcoef] + exact (profileCoefficient_sub_le _ _ j).trans_lt hnear + have hS : |f.S-profileCoefficients (J x) 0| < ε := by simpa using hdiff 0 + have hD' : |f.D-profileCoefficients (J x) 1| < ε := by simpa using hdiff 1 + have hN : |f.N-N₀ x| < η₀ := by + exact (show |f.N-N₀ x| < ε by simpa [N₀] using hdiff 2).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hL : |z*f.L-A x| < η₀ := by + exact (show |z*f.L-A x| < ε by simpa [A] using hdiff 3).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hεone : ε ≤ 1 := min_le_left _ _ + have hεS : ε ≤ sLo/2 := (min_le_right 1 _).trans (min_le_left _ _) + have hsmin : sLo/2 ≤ f.S := by + have hh := (abs_lt.mp hS).1 + linarith [hlo x] + have hdbound : |f.D| ≤ d+1 := by + have hh := abs_sub_le f.D (profileCoefficients (J x) 1) 0 + simp only [sub_zero] at hh + linarith [hD x] + have hh := hpreserve z hz (hzη.trans_le (min_le_right _ _)) x (mem_univ x) + f.S f.D f.N f.L _ b c hsmin hcurv hdbound hbc hN hL + simpa only [hn] using f.actual_curve_avoidance hF b c hh + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurveCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurveCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e3e4bc0242037d8fd3be15926f8e44397f7756c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfileCurveCover.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualProfileCollar + +namespace OAI + +/-! Combine the zero-amplitude collar with the interior turn estimate on a +compact curve. The turn threshold is fixed before the loop is selected. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +variable {X : Type*} [TopologicalSpace X] [CompactSpace X] + +theorem compact_actual_profile_curve_cover {C D : Set X} + (hC : IsClosed C) (hD : IsClosed D) (hcover : ∀ x, x ∈ C ∨ x ∈ D) + (sLo K d : ℝ) (hsLo : 0 < sLo) (hK : 0 ≤ K) (hd : 0 ≤ d) : + ∃ H : ℝ, 0 < H ∧ ∀ J : X → BoundaryProfile, Continuous J → + (∀ x, J x ∈ regularBoundaryProfiles) → + (∀ x, sLo ≤ profileCoefficients (J x) 0) → + (∀ x, |profileCoefficients (J x) 1| ≤ d) → + (∀ x ∈ D, profileCoefficients (J x) 3 = 0 → H+2 < |profileCoefficients (J x) 2|) → + ∀ b c k : X → ℝ, Continuous b → Continuous c → Continuous k → + (∀ x, b x ≠ 0 ∨ c x ≠ 0) → (∀ x, -K ≤ k x) → + (∀ x ∈ C, 0 < (profileCoefficients (J x) 1 * b x + + profileCoefficients (J x) 0 * c x)^2 + k x*b x^2) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x : X, + ∀ F : RField 4, ContDiff ℝ ∞ F → ∀ p : Base, + ‖realBoundaryProfile F z p-J x‖ < η → + k x ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + realSecondForm F (b x,c x) (b x,c x) p ≠ 0 ∧ + normalize (realSecondForm F (b x,c x) (b x,c x) p) ≠ + -profilePreferred (realBoundaryProfile F z p) := by + let : CompactSpace C := isCompact_iff_compactSpace.mp hC.isCompact + let : CompactSpace D := isCompact_iff_compactSpace.mp hD.isCompact + obtain ⟨H,hH,hcurve⟩ := compact_actual_profile_curves (X := D) sLo K d hsLo hK hd + refine ⟨H,hH,?_⟩ + intro J hJ hreg hS hDb hturn b c k hb hc hk hbc hkb hcollar + obtain ⟨ηd,hηd,hinterior⟩ := hcurve (fun x => J x.val) (hJ.comp continuous_subtype_val) + (fun x => hreg x.val) (fun x => hS x.val) (fun x => hDb x.val) + (fun x => hturn x.val x.property) + obtain ⟨ηc,hηc,hcollar'⟩ := compact_actual_profile_collar (X := C) + (hJ.comp continuous_subtype_val) (fun x => hreg x.val) + (hb.comp continuous_subtype_val) (hc.comp continuous_subtype_val) (hk.comp continuous_subtype_val) + (fun x => hcollar x.val x.property) + refine ⟨min ηc ηd,lt_min hηc hηd,?_⟩ + intro z hz hzη x F hF p herr hcurv + rcases hcover x with hx | hx + · exact hcollar' ⟨x,hx⟩ F hF z p (herr.trans_le (min_le_left _ _)) hcurv + · exact hinterior z hz (hzη.trans_le (min_le_right _ _)) ⟨x,hx⟩ F hF p + (herr.trans_le (min_le_right _ _)) ((hkb x).trans hcurv) (b x) (c x) (hbc x) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfiledSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfiledSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..50414fef67f03fbc1aab71e2599ad32d8ab6bc36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualProfiledSurfaceLoop.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCircularThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.ClosedIntervalTurns + +namespace OAI + +/-! Construct a supported periodic surface loop from an actual immersion, +a preferred normal, a positive phase Hessian and the prescribed amplitude. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates GeometryPreservation + +theorem actual_supported_surface_loop_profiles {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U K P : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → + ∃ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Z ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ + (∀ j ∈ Z, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, + let J := surfaceCircularProfile F a e₁ e₂ α (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (profileCoefficients J 3 = 0 → H+2 < |profileCoefficients J 2|) := by + obtain ⟨Ω,hTΩ,hΩ,e₁,e₂,h₁,h₂,hframe,hloop⟩ := + actual_supported_surface_loop_fixed_frame hF ha hT hU hTU hn hI hN hHess haT hboundary + hK hKT haK hP hPK hlocal + have hKΩ : CollarVelocity.jetSection F '' K ⊆ Ω := (image_mono hKT).trans hTΩ + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hthreshold⟩ := + compact_surface_circular_threshold hF ha hΩ hK hKΩ h₁ h₂ hframe + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro H hH + obtain ⟨Λ,hΛ,hprofile⟩ := hthreshold H hH + obtain ⟨Z,hTZ,hZΩ,l,hamp,hzero,α,hα,hper,hvel,τ,hturn,hlarge⟩ := hloop Λ + refine ⟨Z,hTZ,e₁,e₂,h₁.mono hZΩ,h₂.mono hZΩ, + (fun j hj => hframe j (hZΩ hj)),l,hamp,hzero,α,hα,hper,hvel,?_⟩ + have hKZ : CollarVelocity.jetSection F '' K ⊆ Z := (image_mono hKT).trans hTZ + let W : Set Base := CollarVelocity.jetSection F ⁻¹' Z + have hσ := CollarVelocity.jetSection_smooth hF + have hW : IsOpen W := Z.isOpen.preimage hσ.continuous + have hKW : K ⊆ W := fun x hx => hKZ (mem_image_of_mem _ hx) + have hα' : ContDiffOn ℝ ∞ (fun z : Base × ℝ => α (CollarVelocity.jetSection F z.1,z.2)) + (W ×ˢ univ) := + hα.comp ((hσ.comp contDiff_fst).prodMk contDiff_snd).contDiffOn (fun _ hz => ⟨hz.1,hz.2⟩) + have hturn' := closed_interval_turns hW hKW hα' + (fun x hx => hper (CollarVelocity.jetSection F x) hx) hturn hlarge + intro x hx t ht + obtain ⟨hreg,hlo,hhi,hd,hN⟩ := hprofile Z hKZ hZΩ α hα x hx t + refine ⟨hreg,hlo,hhi,hd,?_⟩ + intro hz + apply hN + apply hturn' x hx t ht + exact (surfaceCircularProfile_turn_iff hΩ hframe α + (hKΩ (mem_image_of_mem _ hx)) t).mp hz + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualSupportedSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualSupportedSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f60bb55553e007005a1d6cdeb2c59d4c3c896c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ActualSupportedSurfaceLoop.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedJetDomain + +namespace OAI + +/-! Construct a supported periodic surface loop from an actual immersion, +a preferred normal, a positive phase Hessian and the prescribed amplitude. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates + +theorem actual_supported_surface_loop {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U K P : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) (turn : ℝ) : + ∃ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Z ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ + (∀ j ∈ Z, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,0)) x dy ∧ + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,τ x)) x dy := by + let C₀ : Set Base := {p ∈ T | a p = 0} + have hC : IsCompact C₀ := hT.inter_right (isClosed_eq ha.continuous continuous_const) + have hCU : C₀ ⊆ U := fun _ hp => hTU hp.1 + obtain ⟨W,hW,hCW,hWΩ,e₁,e₂,he₁,he₂,hframe,hcollar⟩ := exists_preferred_jet_frame + hF hU hn hC hCU hI hN hHess (fun p hp => hboundary p hp.1 hp.2) + let Ω := supportedJetDomain U n a + have hΩ : IsOpen Ω := supportedJetDomain_open hU hn ha + let L := CollarVelocity.jetSection F '' T + let Cj := CollarVelocity.jetSection F '' C₀ + have hL : IsCompact L := hT.image (CollarVelocity.jetSection_smooth hF).continuous + have hCj : IsCompact Cj := hC.image (CollarVelocity.jetSection_smooth hF).continuous + have hLΩ : L ⊆ Ω := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem_supported_domain hF (hTU hp) (hI p (hTU hp)) + (hN p (hTU hp)) (hHess p (hTU hp)) (fun h => (hboundary p hp h).1) + obtain ⟨O,hO,hKO,_,hOpos⟩ := CollarVelocity.compact_open_thickening hK + (isOpen_lt continuous_const ha.continuous) haK + let V : Set GeometricJet := W ∩ ((Prod.fst ⁻¹' closure O)ᶜ ∩ Ω) + have hV : IsOpen V := hW.inter ((isClosed_closure.preimage continuous_fst).isOpen_compl.inter hΩ) + have hCV : Cj ⊆ V := by + rintro _ ⟨p,hp,rfl⟩ + refine ⟨hCW (mem_image_of_mem _ hp),?_,hLΩ (mem_image_of_mem _ hp.1)⟩ + change p ∉ closure O + intro hx + have := hOpos hx + change 0 < a p at this + rw [hp.2] at this + exact lt_irrefl _ this + have hAmp : ∀ j ∈ L \ Cj, 0 < a j.1 := by + rintro j ⟨⟨p,hp,rfl⟩,hj⟩ + apply lt_of_le_of_ne (haT p hp) + intro hz + exact hj (mem_image_of_mem _ ⟨hp,hz.symm⟩) + have hCL : Cj ⊆ L := image_mono (fun _ hp => hp.1) + have hKL : MapsTo (CollarVelocity.jetSection F) K L := + fun _ hx => mem_image_of_mem _ (hKT hx) + have hVΩ : V ⊆ Ω := fun _ hj => hj.2.2 + have he1 : ContDiffOn ℝ ∞ e₁ Ω := he₁.mono (fun _ hj => hj.1) + have he2 : ContDiffOn ℝ ∞ e₂ Ω := he₂.mono (fun _ hj => hj.1) + have hfr := fun j (hj : j ∈ Ω) => hframe j hj.1 + obtain ⟨Z,hLZ,hZΩ,l,hl,hzero,α,hα,hper,hvel,τ,hturn,hlarge⟩ := constructed_surface_loop + hF hCj hK hL hCL hKL hO hKO + (fun j hj hjo => hj.2.1 (subset_closure hjo)) + hV hΩ hCV hVΩ hLΩ hP hPK hlocal he1 he2 + (ha.comp contDiff_fst).contDiffOn + (fun j hj => preferredJetDomain_velocity_gram hj.1) hfr + (fun j hj => hcollar j hj.1) (fun j hj => hj.2) hAmp turn + refine ⟨Z,hLZ,e₁,e₂,he1.mono hZΩ,he2.mono hZΩ, + (fun j hj => hfr j (hZΩ hj)),l,hl,?_,α,hα,hper,hvel,τ,hturn,hlarge⟩ + obtain ⟨W',hW',hCW',_,hzero'⟩ := hzero + exact ⟨W',hW',hCW',hzero'⟩ + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPhasePrimitiveAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPhasePrimitiveAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..b32b60f87209a7b6c1c2a65511ae0ae87fac5e95 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPhasePrimitiveAtlas.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PrescribedAtlasPlateau +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import Mathlib.Topology.OpenPartialHomeomorph.IsImage + +namespace OAI + +/-! Restrict the primitive's phase domain and choose its analytic atlas +inside the already prepared exterior collar. The phase functions are unchanged. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem adapted_phase_primitive_atlas (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {K : Set M} (hK : IsCompact K) (hqK : q ∈ K) + (hKs : K ⊆ (surfacePhaseChart q e).source) + {V : Set Base} (hV : IsOpen V) (hVc : IsCompact (closure V)) + (hKV : (surfacePhaseChart q e) '' K ⊆ V) + (hVs : closure V ⊆ (surfacePhaseChart q e).target) : + ∃ (A : SmoothingAtlas M) (i : A.centers) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base), + (i : M) = q ∧ (∀ x, f x = e x) ∧ (∀ x, f.symm x = e.symm x) ∧ + ContDiff ℝ ∞ f ∧ ContDiff ℝ ∞ f.symm ∧ + (∀ p ∈ K, 0 < A.weight i p) ∧ + (∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) ∧ + (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ f.source ∧ + MapsTo f f.source (baseEquiv ⁻¹' V) ∧ + K ⊆ (surfacePhaseChart (i : M) f).source ∧ + ∀ x ∈ closure V, A.outer i =ᶠ[𝓝 ((surfacePhaseChart q e).symm x)] (fun _ => 1) := by + let E := surfacePhaseChart q e + let U := E.source ∩ E ⁻¹' V + have hU : IsOpen U := E.isOpen_inter_preimage hV + have hKU : K ⊆ U := fun p hp => ⟨hKs hp,hKV (mem_image_of_mem E hp)⟩ + let P := E.symm '' closure V + have hP : IsCompact P := hVc.image_of_continuousOn (E.symm.continuousOn.mono hVs) + have hPs : P ⊆ (chart q).source := by + rintro _ ⟨x,hx,rfl⟩ + exact (E.map_target (hVs hx)).1 + obtain ⟨A,i,hiq,hpos,hweight,ho,hplateau⟩ := exists_smoothingAtlas_prescribed_plateau q + hK hqK hU hKU (fun _ hp => hp.1.1) hP hPs + let W := (fun x : JetPolynomial.Base => baseEquiv (e x)) ⁻¹' V + have hW : IsOpen W := hV.preimage (baseEquiv.continuous.comp he.continuous) + let f := e.restrOpen W hW + have hsource : (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ f.source := by + rintro x ⟨p,hp,rfl⟩ + have hpU := hweight hp + change chart (i : M) p ∈ e.source ∩ W + rw [hiq] + exact ⟨hpU.1.2,hpU.2⟩ + refine ⟨A,i,f,hiq,(fun _ => rfl),(fun _ => rfl),he,hi,hpos,ho,hsource,?_,?_,?_⟩ + · intro x hx + exact hx.2 + · intro p hp + have hu := hKU hp + change p ∈ (chart (i : M)).source ∧ chart (i : M) p ∈ f.source + rw [hiq] + exact ⟨hu.1.1,hu.1.2,hu.2⟩ + · intro x hx + exact hplateau _ ⟨x,hx,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPrimitiveGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPrimitiveGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..faf0759458f8f8fbf98d9b2c8c752edff380ffa2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdaptedPrimitiveGeometry.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AdaptedPhasePrimitiveAtlas +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOuterGeometry +import OAI.Geometry.SurfaceImmersion.Whitney.PrimitiveBoundaryCollar +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasOuterGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorDomain + +namespace OAI + +/-! Construct the entire analytic chart neighborhood from the actual +surface metric, preferred normal and primitive boundary. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem adapted_primitive_geometry (j : B.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hD : IsOpen D) (hqD : (j : M) ∈ D) + (hDs : closure D ⊆ (surfacePhaseChart (j : M) e).source) + {Ω : Set Base} (hΩ : IsOpen Ω) + (hDΩ : (surfacePhaseChart (j : M) e) '' closure D ⊆ Ω) + (hΩe : Ω ⊆ (surfacePhaseChart (j : M) e).target) + (hactive : ∀ x ∈ Ω, B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0) + {phi : Base → ℝ} (hphi : ContDiff ℝ ∞ phi) + (hphase : ∀ x, (JetPolynomial.realPhaseChart e x).1 = phi x) + (hconvex : ∀ x ∈ Ω, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (j : M)) phi + (coordinateChart (j : M) ((surfacePhaseChart (j : M) e).symm x)) v v) + (hboundary : ∀ x ∈ frontier ((surfacePhaseChart (j : M) e) '' D), + realSecondForm (B.phaseRealChartMap j e.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (B.phaseRealChartMap j e.symm F) dy dy x) ≠ -n.inPhase (j : M) e x) : + ∃ (V : Set Base) (A : SmoothingAtlas M) (i : A.centers) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (U : Set Base), + IsOpen V ∧ IsCompact (closure V) ∧ + (surfacePhaseChart (j : M) e) '' closure D ⊆ V ∧ closure V ⊆ Ω ∧ + (i : M) = (j : M) ∧ (∀ x, f x = e x) ∧ (∀ x, f.symm x = e.symm x) ∧ + ContDiff ℝ ∞ f ∧ ContDiff ℝ ∞ f.symm ∧ + (∀ p ∈ closure D, 0 < A.weight i p) ∧ + (∀ k p, p ∈ tsupport (A.weight k) → A.outer k =ᶠ[𝓝 p] (fun _ => 1)) ∧ + (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ f.source ∧ + MapsTo f f.source (baseEquiv ⁻¹' V) ∧ + closure D ⊆ (surfacePhaseChart (i : M) f).source ∧ + IsOpen U ∧ closure V ⊆ U ∧ U ⊆ Ω ∧ + ContDiffOn ℝ ∞ (n.inPhase (j : M) e) U ∧ + (∀ x ∈ U, Function.Injective (fderiv ℝ (A.phaseRealChartMap i f.symm F) x)) ∧ + (∀ x ∈ U, coordDeriv dx (A.phaseRealChartMap i f.symm F) x ⬝ᵥ n.inPhase (j : M) e x = 0 ∧ + coordDeriv dy (A.phaseRealChartMap i f.symm F) x ⬝ᵥ n.inPhase (j : M) e x = 0 ∧ + n.inPhase (j : M) e x ⬝ᵥ n.inPhase (j : M) e x = 1) ∧ + (∀ x ∈ U, 0 < coordinateMetricHessian + (inducedCoordinateMetric (A.phaseRealChartMap i f.symm F)) Prod.fst x dy dy) ∧ + ∀ x ∈ closure V \ ((surfacePhaseChart (j : M) e) '' D), + realSecondForm (A.phaseRealChartMap i f.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (A.phaseRealChartMap i f.symm F) dy dy x) ≠ -n.inPhase (j : M) e x := by + let E := surfacePhaseChart (j : M) e + have hDc : IsCompact (closure D) := isClosed_closure.isCompact + obtain ⟨hED,hEDcl,_hEDfront,hEDc⟩ := compact_phase_disk_geometry E hD hDc hDs + have hEDΩ : closure (E '' D) ⊆ Ω := by rwa [hEDcl] + have hgram : ∀ x ∈ Ω, NormalFrame.gramDet + (coordDeriv dx (B.phaseRealChartMap j e.symm F) x) + (coordDeriv dy (B.phaseRealChartMap j e.symm F) x) ≠ 0 := by + intro x hx + have hh := B.phase_gram_at_source j e he hi hF + (E.map_target (hΩe hx)) (hactive x hx) + change NormalFrame.gramDet _ _ ≠ 0 at hh + have heq := E.right_inv (hΩe hx) + change baseEquiv (e (chart (j : M) (E.symm x))) = x at heq + rwa [heq] at hh + obtain ⟨V,hV,hVc,hDV,hVΩ,hzero,_hcross⟩ := GeometryPreservation.primitive_boundary_collar + (B.phaseRealChartMap_smooth j hi hF.1) hΩ hED hEDc hEDΩ hgram + ((n.inPhase_smooth (j : M) e hi).mono hΩe) hboundary + (fun _ : Fin 0 => (∅ : Set Base)) (fun _ => isClosed_empty) + (fun _ : Fin 0 => (fun _ : Base => (0 : Base))) (fun _ => contDiff_const) + (fun i => Fin.elim0 i) + have hDV' : E '' closure D ⊆ V := by rwa [← hEDcl] + obtain ⟨A,i,f,hij,hfe,hfi,hfs,hfis,hw,houter,hcover,hsource,hDf,hplateau⟩ := + adapted_phase_primitive_atlas (j : M) e he hi hDc (subset_closure hqD) hDs hV hVc hDV' + (hVΩ.trans hΩe) + have hΩA : Ω ⊆ (surfacePhaseChart (i : M) e).target := by rwa [hij] + have hpA : ∀ x ∈ closure V, + A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1) := by + simpa only [hij] using hplateau + have hcvA : ∀ x ∈ Ω, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (i : M)) phi + (coordinateChart (i : M) ((surfacePhaseChart (i : M) e).symm x)) v v := by + simpa only [hij] using hconvex + obtain ⟨U,hU,hVU,hUΩ,hn,hI,hN,hH⟩ := A.primitive_outer_geometry i hF n e he hi + hphi hphase hΩ hVΩ hΩA hpA hcvA + have hm : A.phaseRealChartMap i f.symm F = A.phaseRealChartMap i e.symm F := by + rw [show (f.symm : JetPolynomial.Base → JetPolynomial.Base) = e.symm from funext hfi] + have hn' : n.inPhase (i : M) e = n.inPhase (j : M) e := by rw [hij] + refine ⟨V,A,i,f,U,hV,hVc,hDV',hVΩ,hij,hfe,hfi,hfs,hfis,hw,houter,hcover,hsource,hDf, + hU,hVU,hUΩ,?_,?_,?_,?_,?_⟩ + · rwa [hn'] at hn + · rwa [hm] + · rw [hm] + simpa only [hn'] using hN + · rwa [hm] + · intro x hx + rw [hm,A.phase_second_of_common_outer B i j hij e F (hΩe (hVΩ hx.1)) + (hplateau x hx.1) (hactive x (hVΩ hx.1)) dy dy] + exact hzero x hx + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdmissibleCrossingPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdmissibleCrossingPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..28d8183e886bb356fcd9fa6ba2a3b6c1ef13773d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AdmissibleCrossingPath.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingNormalPath + +namespace OAI + +/-! A complete local path, including its normal-plane constraint, from the +preferred normal to one having positive pairing with both crossing vectors. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +lemma unit_not_negative_normalize {n p : Vec} (hp : 0 < p ⬝ᵥ n) : + n ≠ -normalize p := by + intro he + have h := normalize_dot_pos hp + rw [he,dotProduct_neg,normalize_unit (nonzero_of_dot_pos hp)] at h + norm_num at h + +/-- The path remains in every linear hyperplane containing the original +normal and the first pure vector. Thus it remains in the normal plane. -/ +theorem admissible_crossing_path {n p q : Vec} (hn : n ⬝ᵥ n = 1) + (hchoice : (0 < p ⬝ᵥ n ∧ 0 < q ⬝ᵥ n) ∨ + (0 < p ⬝ᵥ q ∧ ∃ m : Vec, n ⬝ᵥ m = 0 ∧ 0 < p ⬝ᵥ m ∧ 0 < q ⬝ᵥ m)) : + ∃ γ : ℝ → Vec, ContDiffOn ℝ ∞ γ (Icc (0 : ℝ) 1) ∧ γ 0 = n ∧ + (∀ t ∈ Icc (0 : ℝ) 1, + γ t ⬝ᵥ γ t = 1 ∧ γ t ≠ -normalize p ∧ γ t ≠ -normalize q ∧ + ∀ v : Vec, v ⬝ᵥ n = 0 → v ⬝ᵥ p = 0 → v ⬝ᵥ γ t = 0) ∧ + 0 < p ⬝ᵥ γ 1 ∧ 0 < q ⬝ᵥ γ 1 := by + rcases hchoice with hpos | ⟨hacute,m,hnm,hpm,hqm⟩ + · refine ⟨fun _ => n,contDiffOn_const,rfl,?_,hpos.1,hpos.2⟩ + exact fun _ _ => ⟨hn,unit_not_negative_normalize hpos.1, + unit_not_negative_normalize hpos.2,fun _ hv _ => hv⟩ + · let γ : ℝ → Vec := fun t => first n (normalize p) t + have hγ : ContDiffOn ℝ ∞ γ (Icc (0 : ℝ) 1) := by + intro t ht + exact (crossing_normal_path_smoothAt + (n := fun _ : ℝ => n) (p := fun _ : ℝ => p) (m := fun _ : ℝ => m) + contDiffAt_const contDiffAt_const contDiffAt_id hn hnm hpm ht).contDiffWithinAt + refine ⟨γ,hγ,first_zero hn,?_,?_⟩ + · intro t ht + obtain ⟨hunit,hp,hq⟩ := crossing_normal_path hn hnm hpm hqm ht + refine ⟨hunit,hp,hq,?_⟩ + intro v hvn hvp + change v ⬝ᵥ normalize (blend n (normalize p) t) = 0 + apply dot_normalize_zero + simp only [blend,dotProduct_add,dotProduct_smul,smul_eq_mul,hvn, + show v ⬝ᵥ normalize p = 0 from dot_normalize_zero hvp,mul_zero,add_zero] + · exact crossing_normal_path_endpoint hpm hacute + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AnalyticCurveCrossingLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AnalyticCurveCrossingLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..e61d63cc2afd44ff9e65b5a318dead82e635b13a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AnalyticCurveCrossingLoop.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Primitive.ActualAnalyticProfiledLoop +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCircularPeriod + +namespace OAI + +/-! Retain the finite-curve and crossing conclusions while restricting to +the low-jet domain required by the exact primitive construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation CollarVelocity PhaseGeometry SurfaceJetCoordinates + +variable {ι : Type*} [Finite ι] + +theorem actual_analytic_curve_crossing_loop {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + {K : ι → Set Base} (hK : ∀ i, IsCompact (K i)) (hKT : ∀ i, K i ⊆ T) + {P : Set Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ i, K i) \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ (⋃ i, K i) ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) + {E : Set Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c k : ι → Base → ℝ} + (hb : ∀ i, ContDiff ℝ ∞ (b i)) (hc : ∀ i, ContDiff ℝ ∞ (c i)) + (hk : ∀ i, ContDiff ℝ ∞ (k i)) + (hbc : ∀ i, ∀ x ∈ K i, b i x ≠ 0 ∨ c i x ≠ 0) + (B : ℝ) (hB : 0 ≤ B) (hkb : ∀ i, ∀ x ∈ K i, -B ≤ k i x) + (hold : ∀ i, ∀ x ∈ K i, a x = 0 → + 0 < ((coordDeriv dy (coordDeriv dx F) x ⬝ᵥ normalize (realSecondForm F dy dy x))*b i x + + Real.sqrt (realSecondForm F dy dy x ⬝ᵥ realSecondForm F dy dy x)*c i x)^2 + k i x*(b i x)^2) : + ∃ Z : TopologicalSpace.Opens GeometricJet, + jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ O : TopologicalSpace.Opens JetPolynomial.LowJet, (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z ∧ + ∃ l : Loop O, + IsCompact (JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T)) ∧ + JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) ⊆ O ∧ + l.HasSpatialAmplitude (a ∘ baseEquiv) ∧ + (∀ J ∈ O, a (baseEquiv (JetPolynomial.lowJetPosition J)) = 0 → + ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ e₁ e₂ : GeometricJet → Vec, ∃ α : GeometricJet × ℝ → ℝ, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + (∀ x ∈ T, ∀ t : ℝ, surfaceCircularProfile F a e₁ e₂ α (x,t) ∈ regularBoundaryProfiles) ∧ + ∃ η : ℝ, 0 < η ∧ + (∀ z : ℝ, 0 < z → z < η → + ∀ i, ∀ x ∈ K i, ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α (x,t)‖ < η → + k i x ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + realSecondForm G (b i x,c i x) (b i x,c i x) p ≠ 0 ∧ + normalize (realSecondForm G (b i x,c i x) (b i x,c i x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) ∧ + ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ E, ∀ t ∈ Icc (0 : ℝ) 1, + ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α (x,t)‖ < η → + ∀ κ : ℝ, + coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p = + κ*gramDet (coordDeriv dx G p) (coordDeriv dy G p) → + -B ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + 0 < orderedCrossing G (1,r) (1,s) p κ ∧ + 0 < orderedCrossing G (1,s) (1,r) p κ ∧ + ((0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p) ∧ + 0 < realSecondForm G (1,s) (1,s) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p)) ∨ + (0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ realSecondForm G (1,s) (1,s) p ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile G z p) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ w ∧ + 0 < realSecondForm G (1,s) (1,s) p ⬝ᵥ w)) := by + obtain ⟨Z,hTZ,hZU,l,hl,⟨W,hW,hCW,hzero⟩,e₁,e₂,α,h₁,h₂,hα,hper,hvel,hreg,η,hη,hcurves,hcross⟩ := + actual_supported_curve_crossing_loop hF ha hT hU hTU hn hI hN hHess haT hboundary + hK hKT hP hlocal hE hET haE slopeBound hSlope hb hc hk hbc B hB hkb hold + let Q := JetPolynomial.lowJet (F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) + have hQ : Q ⊆ jetDomain Z := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem hF (hTZ (mem_image_of_mem _ hp)) + have hepos (J : JetPolynomial.LowJet) : + (decode J).1 = baseEquiv (JetPolynomial.lowJetPosition J) := rfl + have hamp : l.HasSpatialAmplitude (a ∘ baseEquiv) := by + intro J _ + exact hl J + have hQW : ∀ J ∈ Q, (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + J ∈ decode ⁻¹' W := by + rintro _ ⟨p,hp,rfl⟩ hz + rw [JetPolynomial.lowJetPosition_lowJet] at hz + change decode (JetPolynomial.lowJet (F ∘ baseEquiv) p) ∈ W + rw [decode_lowJet hF] + exact hCW (mem_image_of_mem _ ⟨hp,hz⟩) + have hz : ∀ J ∈ decode ⁻¹' W, + (a ∘ baseEquiv) (JetPolynomial.lowJetPosition J) = 0 → + ∀ t, l.velocity (J,t) = normal J := by + intro J hJ haJ t + apply hzero J hJ _ t + rw [hepos] + exact haJ + obtain ⟨O,hQO,hOZ,l',ha',hvel',hz'⟩ := l.restrict_zero_collar (ha.comp baseEquiv.contDiff) hamp + hQ (hW.preimage decode_smooth.continuous) hQW hz + refine ⟨Z,hTZ,hZU,O,hOZ,l',?_,hQO,ha',hz',e₁,e₂,α,h₁,h₂,hα,hper,?_,hreg,η,hη,hcurves,hcross⟩ + · exact (baseEquiv.toHomeomorph.isCompact_preimage.mpr hT).image + (JetPolynomial.lowJet_smooth (hF.comp baseEquiv.contDiff)).continuous + · intro J t + rw [hvel'] + exact hvel J t + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasBoundaryProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasBoundaryProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea8f09cb21eb625e24fe605e36228bbe17197629 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasBoundaryProfile.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularSectionProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasLeadingProfileStability + +namespace OAI + +/-! Read the exact immersion's five profiles in the real coordinate chart +used by the Gauss and boundary calculations. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def realChartMap (i : A.centers) (F : M → Space) : RField 4 := + A.jetChartMap i F ∘ baseEquiv.symm + +lemma realChartMap_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : + ContDiff ℝ ∞ (A.realChartMap i F) := + (A.jetChartMap_smooth i hF).comp baseEquiv.symm.contDiff + +lemma realChartMap_profile (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (z : ℝ) (p : JetPolynomial.Base) : + boundaryProfileMap (SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F) z p) = + realBoundaryProfile (A.realChartMap i F) z (baseEquiv p) := by + have he : (fun q => JetVelocityCoordinates.toEuclidean (A.realChartMap i F (baseEquiv q))) = + A.vectorChartRead i F := by + funext q + change spaceCoordinates.symm + (A.jetChartMap i F (baseEquiv.symm (baseEquiv q))) = A.vectorChartRead i F q + rw [baseEquiv.symm_apply_apply] + exact spaceCoordinates.symm_apply_apply _ + simpa only [he] using boundaryProfileMap_chart (A.realChartMap_smooth i hF) z p + +/-- The exact primitive's Euclidean profile estimate gives the real-coordinate +estimate used by the boundary preservation lemmas. -/ +lemma realChartMap_profile_error (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (z : ℝ) (p : JetPolynomial.Base) + (J : EuclideanBoundaryProfile) {ε : ℝ} (hε : 0 < ε) + (hclose : ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F) z p - J‖ < + ε / (‖boundaryProfileMap‖ + 1)) : + ‖realBoundaryProfile (A.realChartMap i F) z (baseEquiv p) - boundaryProfileMap J‖ < ε := by + rw [← A.realChartMap_profile i hF z p, ← map_sub] + calc + ‖boundaryProfileMap _‖ ≤ ‖boundaryProfileMap‖ * + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F) z p - J‖ := + boundaryProfileMap.le_opNorm _ + _ < (‖boundaryProfileMap‖ + 1) * (ε / (‖boundaryProfileMap‖ + 1)) := by + have hn := norm_nonneg boundaryProfileMap + have hd : 0 < ‖boundaryProfileMap‖ + 1 := by positivity + have he : 0 < ε / (‖boundaryProfileMap‖ + 1) := div_pos hε hd + nlinarith [mul_le_mul_of_nonneg_left hclose.le hn] + _ = ε := mul_div_cancel₀ ε (by positivity) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasJetProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasJetProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..f7bf993fc292ddfac9d374dbab1a19751cebcf66 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasJetProfiles.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseStability +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetCompactRange + +namespace OAI + +/-! Compact jet ranges and coefficient bounds derived from the actual atlas input norms. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_jet_profiles + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hUK : ∀ i, U i ⊆ KU i) + (R : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) : + ∃ (Q : A.centers → Set LowJet) (B : A.centers → ℕ → ℝ), + (∀ i, IsCompact (Q i)) ∧ (∀ i m, 1 ≤ B i m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ s : ℝ≥0, 0 < (s : ℝ) → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (R m) G) → + (∀ i, MapsTo (lowJet (A.jetChartMap i G)) (U i) (Q i)) ∧ + ∀ i m, WeightedEstimates.WeightedBound (U i) s m (B i m) (lowJet (A.jetChartMap i G)) := by + classical + choose E hE he using fun i m => A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + let C := fun i m => ‖spaceCoordinates.toContinuousLinearMap‖ * E i m * R m + have hC (i m) : 0 ≤ C i m := mul_nonneg + (mul_nonneg (norm_nonneg _) (hE i m)) (hR m) + have hpref (G : M → Space) (hG : ContMDiff planeModel spaceModel ∞ G) + (s : ℝ≥0) (hs : 0 < (s:ℝ)) (hs1 : s ≤ 1) + (hb : ∀ m, A.ShiftedBound 2 m s (R m) G) (i m j) (hj : j ≤ m+2) : + WeightedEstimates.WeightedBound (U i) 1 j (C i m/(s:ℝ)^(j-2)) (A.jetChartMap i G) := by + have hh := (he i m G s (R m) hs hs1 (hR m) hG (hb m) j (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hc := weightedBound_comp_isometry planeCoordinateIsometry + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) hh + have heq : (spaceCoordinates ∘ A.vectorPlaneRead i G) ∘ planeCoordinateIsometry = + A.jetChartMap i G := by + funext x + have hx := congrFun (A.jetChartMap_plane i G) (planeCoordinateIsometry x) + simpa only [Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] using hx.symm + change WeightedEstimates.WeightedBound univ 1 j _ + ((spaceCoordinates ∘ A.vectorPlaneRead i G) ∘ planeCoordinateIsometry) at hc + rw [heq] at hc + have hb' : WeightedEstimates.WeightedBound univ 1 j (C i m/(s:ℝ)^(j-2)) (A.jetChartMap i G) := by + simpa only [C,mul_div_assoc,mul_assoc] using hc + exact hb'.restrict_open (hU i) + choose Q hQ hmaps using fun i => bounded_lowJet_range (hU i) (KU i) (hUK i) (hC i 0) + choose D hD hd using fun i m => bounded_lowJet_prefix (hU i) (KU i) (hUK i) m + refine ⟨Q,fun i m => D i m+C i m,hQ,fun i m => (hD i m).trans + (le_add_of_nonneg_right (hC i m)),?_⟩ + intro G hG s hs hs1 hb + constructor + · intro i + apply hmaps i _ (A.jetChartMap_smooth i hG) + simpa only [Nat.sub_self,pow_zero,div_one] using hpref G hG s hs hs1 hb i 0 2 (by omega) + · intro i m + exact hd i m (A.jetChartMap i G) (A.jetChartMap_smooth i hG) s (C i m) + hs hs1 (hC i m) (hpref G hG s hs hs1 hb i m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasLeadingProfileStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasLeadingProfileStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4dad0af8ff19646372480c817d814f62e75da84 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasLeadingProfileStability.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood + +namespace OAI + +/-! The global C3 displacement controls all five geometric leading profiles +in a fixed atlas chart, uniformly on compact sets and all periodic phases. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetVelocityCoordinates WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma jetChartMap_sub (i : A.centers) (F G : M → Space) : + A.jetChartMap i (G-F) = fun p => A.jetChartMap i G p-A.jetChartMap i F p := by + unfold jetChartMap + rw [A.vectorChartRead_sub] + funext p + exact map_sub spaceCoordinates _ _ + +theorem jetChartMap_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ C : ℝ, 0 ≤ C → A.WeightedBound 1 m C F → + WeightedEstimates.WeightedBound univ 1 m (D*C) (A.jetChartMap i F) := by + obtain ⟨D,hD,hd⟩ := A.vectorChartRead_bound (V := Space) i m + refine ⟨‖spaceCoordinates.toContinuousLinearMap‖*D,mul_nonneg (norm_nonneg _) hD,?_⟩ + intro F hF C hC hb + have hh := (hd F 1 C zero_lt_one le_rfl hC hF hb).linear uniqueDiffOn_univ zero_le_one + (A.vectorChartRead_smooth i hF).contDiffOn spaceCoordinates.toContinuousLinearMap + simpa only [jetChartMap,Function.comp_def,mul_assoc,ContinuousLinearEquiv.coe_coe] using hh + +theorem geometricLeadingProfile_stability (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hFO : MapsTo (lowJet (A.jetChartMap i F)) S O) {K : Set JetPolynomial.Base} + (hK : IsCompact K) (hKS : K ⊆ S) (ε : ℝ) (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G : M → Space, ∀ hG : ContMDiff planeModel spaceModel ∞ G, + ∀ hGO : MapsTo (lowJet (A.jetChartMap i G)) S O, + A.WeightedBound 1 3 ρ (G-F) → ∀ p ∈ K, ∀ t : CovarianceCorrector.Period, + ‖l.geometricLeadingProfile (A.jetChartMap i G) (A.jetChartMap_smooth i hG) hGO p t- + l.geometricLeadingProfile (A.jetChartMap i F) (A.jetChartMap_smooth i hF) hFO p t‖ < ε := by + obtain ⟨δ,hδ,hclose⟩ := l.geometricLeadingProfile_stability + (A.jetChartMap_smooth i hF) hFO hK hKS ε hε + obtain ⟨D,hD,hd⟩ := A.jetChartMap_bound i 3 + let ρ := δ/(D+1) + have hρ : 0 < ρ := div_pos hδ (by positivity) + refine ⟨ρ,hρ,?_⟩ + intro G hG hGO hb p hp t + have hbound := hd (G-F) (hG.sub hF) ρ hρ.le hb + rw [A.jetChartMap_sub] at hbound + apply hclose _ (A.jetChartMap_smooth i hG) hGO _ p hp t + apply (hbound.restrict_open S.isOpen).mono_const + have he : ρ*(D+1) = δ := div_mul_cancel₀ δ (by positivity) + nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicAnsatz.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicAnsatz.lean new file mode 100644 index 0000000000000000000000000000000000000000..483541f81e74670b02e367643b3c52c715d082d8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicAnsatz.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasRestoredPolynomialDirection +import OAI.Geometry.SurfaceImmersion.Geometry.LocalAnsatzSupport + +namespace OAI + +/-! The supported finite periodic ansatz is a genuine global smooth map, +with exactly the intended coordinate jets on its chosen chart. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def periodicAtlasAnsatz (i : A.centers) (F : M → Space) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : M → Space := + F+restore (i : M) (A.outer i) + (finiteAnsatz (A.vectorChartRead i F) U ℓ L z-A.vectorChartRead i F) + +lemma jetChartMap_restored_supported (i : A.centers) (H : JetPolynomial.Base → Space) + (hH : tsupport H ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + A.jetChartMap i (restore (i : M) (A.outer i) H) = spaceCoordinates ∘ H := by + let X : RealModes.RField 4 := spaceCoordinates ∘ H ∘ planeCoordinateIsometry.symm + have hx : tsupport X ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + have hs := tsupport_comp_subset (g := spaceCoordinates) (map_zero _) + (H ∘ planeCoordinateIsometry.symm) + have ht := tsupport_comp_preimage H planeCoordinateIsometry.symm planeCoordinateIsometry.symm.continuous + intro x hxx + have hh := hH (ht (hs hxx)) + exact ⟨planeCoordinateIsometry.symm x,hh,planeCoordinateIsometry.apply_symm_apply x⟩ + have he : (spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry = H := by + funext x + simp [X] + have hh := A.jetChartMap_restored_direction i X hx + rw [he] at hh + funext x + simpa only [X,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] using congrFun hh x + +lemma periodicAtlasAnsatz_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) (hKO : K ⊆ O) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + ContMDiff planeModel spaceModel ∞ (A.periodicAtlasAnsatz i F U ℓ L z) := by + have hlocal := finiteAnsatz_smooth_global (A.vectorChartRead_smooth i hF) U hK hKO + (fun j x _ hx => hzero j x hx) ℓ L z + exact hF.add (restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (hlocal.sub (A.vectorChartRead_smooth i hF))) + +/-- This equality is global in the chart coordinates and therefore also +identifies every derivative used by the periodic metric expansion. -/ +lemma periodicAtlasAnsatz_coordinate (i : A.centers) (F : M → Space) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) + (hKA : K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + A.jetChartMap i (A.periodicAtlasAnsatz i F U ℓ L z) = + spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F) U ℓ L z := by + have hs := (finiteAnsatz_tsupport_sub (A.vectorChartRead i F) U hK hzero ℓ L z).trans hKA + unfold periodicAtlasAnsatz + have hr := A.jetChartMap_restored_supported i + (finiteAnsatz (A.vectorChartRead i F) U ℓ L z-A.vectorChartRead i F) hs + rw [A.jetChartMap_add,hr] + funext x + change spaceCoordinates (A.vectorChartRead i F x)+ + spaceCoordinates (finiteAnsatz (A.vectorChartRead i F) U ℓ L z x-A.vectorChartRead i F x) = _ + rw [map_sub] + change _ = spaceCoordinates (finiteAnsatz (A.vectorChartRead i F) U ℓ L z x) + abel + +/-- Outside the original chart support the global ansatz retains the exact +baseline germ, including all boundary jets on the exterior. -/ +lemma periodicAtlasAnsatz_eventuallyEq (i : A.centers) (F : M → Space) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) + (hKA : K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {p : M} (hp : p ∉ tsupport (A.weight i)) : + A.periodicAtlasAnsatz i F U ℓ L z =ᶠ[𝓝 p] F := by + let H := finiteAnsatz (A.vectorChartRead i F) U ℓ L z-A.vectorChartRead i F + have hs := (finiteAnsatz_tsupport_sub (A.vectorChartRead i F) U hK hzero ℓ L z).trans hKA + have hs' : tsupport (H ∘ planeCoordinateIsometry.symm) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + have hh := hs (tsupport_comp_preimage H planeCoordinateIsometry.symm planeCoordinateIsometry.symm.continuous hx) + exact ⟨planeCoordinateIsometry.symm x,hh,planeCoordinateIsometry.apply_symm_apply x⟩ + have he : (H ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = H := by + funext x + simp + have ht := A.restore_plane_tsupport i (H ∘ planeCoordinateIsometry.symm) hs' + rw [he] at ht + have hz := notMem_tsupport_iff_eventuallyEq.mp (fun hx => hp (ht hx)) + filter_upwards [hz] with x hx + change F x+restore (i : M) (A.outer i) H x = F x + rw [hx] + exact add_zero _ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a00fc24ab9af6c10a2e35ea4e9c459b5d4a2958 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPeriodicMetric.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPeriodicAnsatz +import OAI.Geometry.SurfaceImmersion.Correction.RestoredLinearizedMetric +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothingLinearity + +namespace OAI + +/-! The metric of the supported global periodic map is exactly the +restoration of the metric of its local periodic ansatz. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +local instance periodicMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance periodicMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance periodicMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance periodicMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance periodicMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance periodicMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma restored_metric_increment (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (f : SmallModes.Base → Space) + (hf : ContDiff ℝ ∞ f) + (hsp : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (F+restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry))-inducedTensor F = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor (spaceCoordinates ∘ (A.vectorPlaneRead i F+f)) (planeCoordinateIsometry y)- + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry y))) := by + have hrest := restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (hf.comp planeCoordinateIsometry.contDiff) + rw [inducedTensor_add hF hrest] + have he : (inducedTensor F+linearMetricTensor F (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry))+ + inducedTensor (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)))-inducedTensor F = + linearMetricTensor F (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry))+ + inducedTensor (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) := by abel + rw [he,A.restored_linearized_metric i hF f hf hsp,A.restored_metric_tensor i f hf hsp, + ← A.bundleRestore_add] + congr 1 + funext y + have hcoord : spaceCoordinates ∘ (A.vectorPlaneRead i F+f) = + (fun x => spaceCoordinates (A.vectorPlaneRead i F x)+spaceCoordinates (f x)) := by + funext x + exact map_add spaceCoordinates _ _ + rw [hcoord] + have hadd := RealModes.realMetricTensor_add + ((spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).differentiable + (by simp) (planeCoordinateIsometry y)) + ((spaceCoordinates.contDiff.comp hf).differentiable (by simp) (planeCoordinateIsometry y)) + change RealModes.realMetricTensor + (fun x => spaceCoordinates (A.vectorPlaneRead i F x)+spaceCoordinates (f x)) + (planeCoordinateIsometry y) = _ at hadd + rw [hadd] + simp only [Pi.add_apply] + rw [← map_add] + congr 1 + abel + +lemma periodicAtlasAnsatz_metric (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) (hKO : K ⊆ O) + (hKA : K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + inducedTensor (A.periodicAtlasAnsatz i F U ℓ L z)-inducedTensor F = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F) U ℓ L z ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y)- + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry y))) := by + let H := finiteAnsatz (A.vectorChartRead i F) U ℓ L z-A.vectorChartRead i F + have hH := (finiteAnsatz_smooth_global (A.vectorChartRead_smooth i hF) U hK hKO + (fun j x _ hx => hzero j x hx) ℓ L z).sub (A.vectorChartRead_smooth i hF) + have hs := (finiteAnsatz_tsupport_sub (A.vectorChartRead i F) U hK hzero ℓ L z).trans hKA + have hsp : tsupport (H ∘ planeCoordinateIsometry.symm) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + have hh := hs (tsupport_comp_preimage H planeCoordinateIsometry.symm + planeCoordinateIsometry.symm.continuous hx) + exact ⟨planeCoordinateIsometry.symm x,hh,planeCoordinateIsometry.apply_symm_apply x⟩ + have hr := A.restored_metric_increment i hF (H ∘ planeCoordinateIsometry.symm) + (hH.comp planeCoordinateIsometry.symm.contDiff) hsp + have he : (H ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = H := by + funext x + simp + have hb : A.vectorPlaneRead i F+H ∘ planeCoordinateIsometry.symm = + finiteAnsatz (A.vectorChartRead i F) U ℓ L z ∘ planeCoordinateIsometry.symm := by + funext x + change A.vectorChartRead i F (planeCoordinateIsometry.symm x)+ + (finiteAnsatz (A.vectorChartRead i F) U ℓ L z (planeCoordinateIsometry.symm x)- + A.vectorChartRead i F (planeCoordinateIsometry.symm x)) = _ + simp only [Function.comp_apply] + abel + rw [he,hb] at hr + exact hr + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveError.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveError.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a7a626543f491ad97bff42d2d95c16aa98af414 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveError.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPeriodicMetric +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPrimitivePolynomial + +namespace OAI + +/-! Exact decomposition of a global primitive's metric defect into the +solved polynomial mean error and the finite periodic remainder. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +local instance primitiveErrorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveErrorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveErrorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveErrorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveErrorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveErrorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- All terms refer to the same local ansatz and its actual global extension. -/ +lemma periodicAtlasAnsatz_defect (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) (hKO : K ⊆ O) + (hKA : K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {n : ℕ} (P : Fin 3 → Fin n → Expression) + (γ : ∀ x : M, CovariantTwoTensor x) (H : SmallModes.Base → PhaseMean.Tensor) : + inducedTensor (A.periodicAtlasAnsatz i F U ℓ L z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (H (planeCoordinateIsometry y)))) = + (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i P) z F-γ)+ + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F) U ℓ L z ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y)- + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry y)- + coordinatePolynomialValue P z (A.jetChartMap i F) 0 (planeCoordinateIsometry y)- + H (planeCoordinateIsometry y))) := by + have hm := A.periodicAtlasAnsatz_metric i hF U hK hKO hKA hzero ℓ L z + have hp := A.atlasPolynomialValue_primitive i P z F + have he : inducedTensor (A.periodicAtlasAnsatz i F U ℓ L z) = inducedTensor F+ + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F) U ℓ L z ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y)- + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry y))) := by + rw [← hm] + abel + rw [he,atlasPolynomialMetric,hp] + funext p + simp only [Pi.add_apply,Pi.sub_apply,bundleRestore,map_sub,smul_sub] + abel + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveErrorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveErrorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..bdc146505a0cdcd4f97981627b444b9cc83f3690 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveErrorBound.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveError +import OAI.Geometry.SurfaceImmersion.Geometry.SingleTensorRestoreBound + +namespace OAI + +/-! A local finite periodic remainder and a global solved mean error control +the metric of the actual globally restored primitive. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance primitiveBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def periodicAtlasRemainder (i : A.centers) (F : M → Space) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {n : ℕ} (P : Fin 3 → Fin n → Expression) (H : SmallModes.Base → PhaseMean.Tensor) : + SmallModes.Base → PhaseMean.Tensor := + RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F) U ℓ L z ∘ planeCoordinateIsometry.symm)- + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F)- + coordinatePolynomialValue P z (A.jetChartMap i F) 0-H + +lemma periodicAtlasRemainder_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsClosed K) (hKO : K ⊆ O) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {n : ℕ} {P : Fin 3 → Fin n → Expression} (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {H : SmallModes.Base → PhaseMean.Tensor} (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (A.periodicAtlasRemainder i F U ℓ L z P H) := by + have ha := finiteAnsatz_smooth_global (A.vectorChartRead_smooth i hF) U hK hKO + (fun j x _ hx => hzero j x hx) ℓ L z + have hmetric (f : SmallModes.Base → RealModes.RVec 4) (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (RealModes.realMetricTensor f) := + contDiffOn_univ.mp (RealModes.contDiffOn_realMetricTensor isOpen_univ hf.contDiffOn) + exact (((hmetric _ (spaceCoordinates.contDiff.comp (ha.comp planeCoordinateIsometry.symm.contDiff))).sub + (hmetric _ (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)))).sub + (coordinatePolynomialValue_smooth hP (A.jetChartMap_smooth i hF) z)).sub hH + +/-- No error is lost in globalization; the only new constant is the fixed +single-patch tensor restoration norm. -/ +theorem periodicAtlasAnsatz_error_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (O : TopologicalSpace.Opens JetPolynomial.Base) (U : ℕ → Family O Space) + (K : Set JetPolynomial.Base), IsClosed K → K ⊆ O → + K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) → + (∀ j x, x ∉ K → (U j).val x = 0) → + ∀ (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) (n : ℕ) + (P : Fin 3 → Fin n → Expression), (∀ k r, (P k r).SmoothCoeffs univ) → + ∀ (γ : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x)) → + ∀ (H : SmallModes.Base → PhaseMean.Tensor), ContDiff ℝ ∞ H → + ∀ (s C E : ℝ), 0 < s → s ≤ 1 → 0 ≤ E → + A.TensorWeightedBound s m C (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i P) z F-γ) → + WeightedEstimates.WeightedBound univ s m E (A.periodicAtlasRemainder i F U ℓ L z P H) → + A.TensorWeightedBound s m (C+D*E) + (inducedTensor (A.periodicAtlasAnsatz i F U ℓ L z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (H (planeCoordinateIsometry y))))) := by + obtain ⟨D,hD,hd⟩ := A.single_tensor_restore_bound i m + refine ⟨D,hD,?_⟩ + intro F hF O U K hK hKO hKA hzero ℓ L z n P hP γ hγ H hH s C E hs hs1 hE hmean hrem + have hR := A.periodicAtlasRemainder_smooth i hF U hK hKO hzero ℓ L z hP hH + have hr := hd _ s E hs hs1 hE hR hrem + have hRs := A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + (fiberFromThree.contDiff.comp (hR.comp planeCoordinateIsometry.contDiff)) + have hm := (A.atlasPolynomialMetric_smooth (A.primitiveAtlasPolynomial_smooth i hP) hF z).sub_section hγ + have hb := A.tensorWeightedBound_add hm hRs hs.le hmean hr + rw [A.periodicAtlasAnsatz_defect i hF U hK hKO hKA hzero ℓ L z P γ H] + exact hb + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6cb1f3ecb9c5a8da9b106801bd655188b7fb956 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveExpansion.lean @@ -0,0 +1,150 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveLocalErrorBound +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveMapBound + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance primitiveExpansionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveExpansionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveExpansionDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveExpansionDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveExpansionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveExpansionSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma euclidean_jetChartMap (i : A.centers) (G : M → Space) : + (fun p => JetVelocityCoordinates.toEuclidean (A.jetChartMap i G p)) = + A.vectorChartRead i G := by + funext p + exact spaceCoordinates.symm_apply_apply _ + +omit [CompactSpace M] in +lemma periodicAtlasRemainder_mean (i : A.centers) (G : M → Space) + {S : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family S Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {n : ℕ} (P : Fin 3 → Fin n → Expression) (H : SmallModes.Base → PhaseMean.Tensor) + (p : SmallModes.Base) : + A.periodicAtlasRemainder i G U ℓ L z P H p = + RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i G) U ℓ L z ∘ planeCoordinateIsometry.symm) p- + coordinateMetricMap P z (A.jetChartMap i G) p-H p := by + unfold periodicAtlasRemainder coordinateMetricMap + rw [A.jetChartMap_plane] + simp only [Pi.sub_apply,Pi.add_apply] + abel + +/-- The extended mean is chosen once. Its actual periodic realization is +then available uniformly for all admissible nearby maps and small scales. -/ +theorem supported_primitive_metric (i : A.centers) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (houter : (chart (i : M)) '' tsupport (A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ P : Fin 3 → Fin n → Expression, (∀ k r, (P k r).SmoothCoeffs univ) ∧ + ∃ loss : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ Dv D : ℝ, 0 ≤ Dv ∧ 0 ≤ D ∧ + ∀ (G : M → Space) (hG : ContMDiff planeModel spaceModel ∞ G) + (hGQ : MapsTo (lowJet (A.jetChartMap i G)) S Q), + ∀ K : Set JetPolynomial.Base, IsClosed K → K ⊆ S → + K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) → + (∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (A.jetChartMap i G) p,t) = SurfaceVelocityFamily.normal (lowJet (A.jetChartMap i G) p)) → + ∃ U : ℕ → Family S Space, + (∀ j p, p ∉ K → (U j).val p = 0) ∧ + (∀ j, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U j).val y.1 (y.2 : Period))) ∧ + (∀ j, VectorExpression.Represents (A.jetChartMap i G) (l.coefficientExpressions n j) (U j)) ∧ + U 0 = (l.geometry (A.jetChartMap i G) (A.jetChartMap_smooth i hG) + (fun _ hp => hQO (hGQ hp))).initial ∧ + (∀ z, ContMDiff planeModel spaceModel ∞ (A.periodicAtlasAnsatz i G U ℓ (n+1) z)) ∧ + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedEstimates.WeightedBound S s (m+(2*(n+1)+1)) B (lowJet (A.jetChartMap i G)) → + A.WeightedBound z m (Dv*z/s^loss) (A.periodicAtlasAnsatz i G U ℓ (n+1) z-G) ∧ + ∀ (γ : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x)) → + ∀ C : ℝ, A.TensorWeightedBound z m C + (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i P) z G-γ) → + A.TensorWeightedBound z m (C+D*z^(n+1)/s^loss) + (inducedTensor (A.periodicAtlasAnsatz i G U ℓ (n+1) z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree ![a y^2,0,0]))) := by + obtain ⟨P,hP,_,_,hmean⟩ := l.meanTensorPolynomial_global_extension hQ hQO n + obtain ⟨loss,hloss⟩ := l.supported_primitive_expansion (S := S) ha hamp hQ hQO n ℓ hℓx hℓy + refine ⟨P,hP,loss,?_⟩ + intro m B hB + obtain ⟨C₀,D₀,hC₀,hD₀,hconstruct⟩ := hloss m B hB + obtain ⟨Dr,hDr,hr⟩ := A.periodicAtlasAnsatz_error_bound_on_outer i S.isOpen houter m + obtain ⟨Dv,hDv,hvb⟩ := A.periodicAtlasAnsatz_increment_bound i m + refine ⟨Dv*C₀,Dr*D₀,mul_nonneg hDv hC₀,mul_nonneg hDr hD₀,?_⟩ + intro G hG hGQ K hK hKS hKA hv + have hGj := A.jetChartMap_smooth i hG + obtain ⟨U,hU,hzero,hrep,hinit,hrem⟩ := hconstruct (A.jetChartMap i G) hGj hGQ K hK hKS hv + refine ⟨U,hzero,hU,hrep,hinit, + fun z => A.periodicAtlasAnsatz_smooth i hG U hK hKS hzero ℓ (n+1) z,?_⟩ + intro s z hz hzs hs1 hGb + have hs : 0 < s := hz.trans_le hzs + have hz1 : z ≤ 1 := hzs.trans hs1 + have hlocalIncrement : WeightedEstimates.WeightedBound S z m (C₀*z/s^loss) + (finiteAnsatz (A.vectorChartRead i G) U ℓ (n+1) z-A.vectorChartRead i G) := by + apply (hrem s z hz hzs hs1 hGb).1.congr + intro p _ + simp only [JetVelocityCoordinates.toEuclidean,jetChartMap,Function.comp_apply, + ContinuousLinearEquiv.symm_apply_apply,Pi.sub_apply] + refine ⟨?_,?_⟩ + · have hv := hvb G hG S U K hK hKS hzero ℓ (n+1) z z (C₀*z/s^loss) hz hz1 + (div_nonneg (mul_nonneg hC₀ hz.le) (pow_nonneg hs.le _)) hlocalIncrement + simpa only [mul_div_assoc,mul_assoc] using hv + intro γ hγ C hsolved + let H : SmallModes.Base → PhaseMean.Tensor := fun x => ![a (planeCoordinateIsometry.symm x)^2,0,0] + have hH : ContDiff ℝ ∞ H := by + apply contDiff_pi.mpr + intro k + fin_cases k + · exact (ha.comp planeCoordinateIsometry.symm.contDiff).pow 2 + · exact contDiff_const + · exact contDiff_const + have hR := A.periodicAtlasRemainder_smooth i hG U hK hKS hzero ℓ (n+1) z hP hH + have hlocal : WeightedEstimates.WeightedBound S z m (D₀*z^(n+1)/s^loss) + (A.periodicAtlasRemainder i G U ℓ (n+1) z P H ∘ planeCoordinateIsometry) := by + apply (hrem s z hz hzs hs1 hGb).2.congr + intro p hp + rw [Function.comp_apply,A.periodicAtlasRemainder_mean, + hmean _ hGj z p (hGQ hp),← A.euclidean_jetChartMap i G] + simp only [H,planeCoordinateIsometry.symm_apply_apply] + have htransport := weightedBound_comp_isometry_on planeCoordinateIsometry.symm S.isOpen + (hR.comp planeCoordinateIsometry.contDiff) hlocal + have heq : (A.periodicAtlasRemainder i G U ℓ (n+1) z P H ∘ planeCoordinateIsometry) ∘ + planeCoordinateIsometry.symm = A.periodicAtlasRemainder i G U ℓ (n+1) z P H := by + funext p + simp + change WeightedEstimates.WeightedBound (planeCoordinateIsometry.symm ⁻¹' (S : Set JetPolynomial.Base)) + z m (D₀*z^(n+1)/s^loss) ((A.periodicAtlasRemainder i G U ℓ (n+1) z P H ∘ + planeCoordinateIsometry) ∘ planeCoordinateIsometry.symm) at htransport + rw [heq] at htransport + have hb := hr G hG S U K hK hKS hKA hzero ℓ (n+1) z n P hP γ hγ H hH + z C (D₀*z^(n+1)/s^loss) hz hz1 + (div_nonneg (mul_nonneg hD₀ (pow_nonneg hz.le _)) (pow_nonneg hs.le _)) hsolved htransport + simpa only [H,planeCoordinateIsometry.symm_apply_apply,mul_div_assoc,mul_assoc] using hb + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveLocalErrorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveLocalErrorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d92e29ff4cb6610c0a878b0ce36c2780d7dd83a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveLocalErrorBound.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveErrorBound +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSingleTensorRestoreBound + +namespace OAI + +/-! A local finite periodic remainder and a global solved mean error control +the metric of the actual globally restored primitive. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance primitiveLocalBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveLocalBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveLocalBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveLocalBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveLocalBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveLocalBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- No error is lost in globalization; the only new constant is the fixed +single-patch tensor restoration norm. -/ +theorem periodicAtlasAnsatz_error_bound_on_outer (i : A.centers) + {V : Set JetPolynomial.Base} (hV : IsOpen V) + (houter : (chart (i : M)) '' tsupport (A.outer i) ⊆ V) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (O : TopologicalSpace.Opens JetPolynomial.Base) (U : ℕ → Family O Space) + (K : Set JetPolynomial.Base), IsClosed K → K ⊆ O → + K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) → + (∀ j x, x ∉ K → (U j).val x = 0) → + ∀ (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) (n : ℕ) + (P : Fin 3 → Fin n → Expression), (∀ k r, (P k r).SmoothCoeffs univ) → + ∀ (γ : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x)) → + ∀ (H : SmallModes.Base → PhaseMean.Tensor), ContDiff ℝ ∞ H → + ∀ (s C E : ℝ), 0 < s → s ≤ 1 → 0 ≤ E → + A.TensorWeightedBound s m C (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i P) z F-γ) → + WeightedEstimates.WeightedBound (planeCoordinateIsometry.symm ⁻¹' V) s m E (A.periodicAtlasRemainder i F U ℓ L z P H) → + A.TensorWeightedBound s m (C+D*E) + (inducedTensor (A.periodicAtlasAnsatz i F U ℓ L z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (H (planeCoordinateIsometry y))))) := by + obtain ⟨D,hD,hd⟩ := A.single_tensor_restore_bound_on_outer i hV houter m + refine ⟨D,hD,?_⟩ + intro F hF O U K hK hKO hKA hzero ℓ L z n P hP γ hγ H hH s C E hs hs1 hE hmean hrem + have hR := A.periodicAtlasRemainder_smooth i hF U hK hKO hzero ℓ L z hP hH + have hr := hd _ s E hs hs1 hE hR hrem + have hRs := A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + (fiberFromThree.contDiff.comp (hR.comp planeCoordinateIsometry.contDiff)) + have hm := (A.atlasPolynomialMetric_smooth (A.primitiveAtlasPolynomial_smooth i hP) hF z).sub_section hγ + have hb := A.tensorWeightedBound_add hm hRs hs.le hmean hr + rw [A.periodicAtlasAnsatz_defect i hF U hK hKO hKA hzero ℓ L z P γ H] + exact hb + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveMapBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveMapBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..a749ab2e67a1bb26dcd7287a98e9d9b638867018 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveMapBound.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPeriodicAnsatz +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds + +namespace OAI + +/-! The same compactly supported local increment controls the derivatives +of its actual global restoration. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial LocalPeriodicExpansion WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem single_map_restore_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : JetPolynomial.Base → Space), ContDiff ℝ ∞ f → + ∀ (s C : ℝ), 0 < s → s ≤ 1 → 0 ≤ C → + WeightedEstimates.WeightedBound univ s m C f → + A.WeightedBound s m (D*C) (restore (i : M) (A.outer i) f) := by + classical + obtain ⟨D,hD,hd⟩ := A.restoration_bound (V := Space) m + refine ⟨D,hD,?_⟩ + intro f hf s C hs hs1 hC hb + have hh := hd (fun j => if j = i then f else 0) s C hs hs1 hC + (by intro j; split_ifs; exact hf; exact contDiff_const) + (by + intro j + split_ifs + · exact hb + · exact (weightedBound_zero _ s m).mono_const hC) + have he : (∑ j : A.centers, restore (j : M) (A.outer j) (if j = i then f else 0)) = + restore (i : M) (A.outer i) f := by + funext p + rw [Finset.sum_apply,Finset.sum_eq_single i] + · simp + · intro j _ hji + simp [hji,restore] + · exact fun hi => False.elim (hi (Finset.mem_univ _)) + rw [he] at hh + exact hh + +theorem periodicAtlasAnsatz_increment_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ (S : TopologicalSpace.Opens JetPolynomial.Base) (U : ℕ → Family S Space) + (K : Set JetPolynomial.Base), IsClosed K → K ⊆ S → + (∀ j p, p ∉ K → (U j).val p = 0) → + ∀ (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + WeightedEstimates.WeightedBound S s m C + (finiteAnsatz (A.vectorChartRead i G) U ℓ L z-A.vectorChartRead i G) → + A.WeightedBound s m (D*C) (A.periodicAtlasAnsatz i G U ℓ L z-G) := by + obtain ⟨D,hD,hd⟩ := A.single_map_restore_bound i m + refine ⟨D,hD,?_⟩ + intro G hG S U K hK hKS hzero ℓ L z s C hs hs1 hC hb + let f := finiteAnsatz (A.vectorChartRead i G) U ℓ L z-A.vectorChartRead i G + have hf : ContDiff ℝ ∞ f := + (finiteAnsatz_smooth_global (A.vectorChartRead_smooth i hG) U hK hKS + (fun j p _ hp => hzero j p hp) ℓ L z).sub (A.vectorChartRead_smooth i hG) + have hsupport : tsupport f ⊆ S := + (finiteAnsatz_tsupport_sub (A.vectorChartRead i G) U hK hzero ℓ L z).trans hKS + have hglobal := hb.extend_support S.isOpen hsupport hC + have hout := hd f hf s C hs hs1 hC hglobal + have he : A.periodicAtlasAnsatz i G U ℓ L z-G = restore (i : M) (A.outer i) f := by + funext p + exact add_sub_cancel_left _ _ + rw [he] + exact hout + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..e597a7232e46f1a980a40c62ef67325ae6f8deef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveNormal.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveNormalCoordinates +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential + +namespace OAI + +/-! Transfer the primitive's normal bound to the actual local phase data +used by the manifold correction. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetVelocityCoordinates RealModes SurfaceJetCoordinates +open SurfaceVelocityFamily.Loop +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma vectorChartRead_from_plane (i : A.centers) (F : M → Space) : + (fun q => JetVelocityCoordinates.toEuclidean + ((spaceCoordinates ∘ A.vectorPlaneRead i F) (baseEquiv q))) = A.vectorChartRead i F := by + funext q + change spaceCoordinates.symm (spaceCoordinates + (A.vectorChartRead i F (planeCoordinateIsometry.symm (baseEquiv q)))) = _ + rw [ContinuousLinearEquiv.symm_apply_apply] + rw [show baseEquiv q = planeCoordinateIsometry q from rfl, + LinearIsometryEquiv.symm_apply_apply] + +theorem phase_of_primitive_normal (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (p : JetPolynomial.Base) {c : ℝ} (hc : 0 < c) + (hD : + let H := primitiveNormalTriple (A.vectorChartRead i F) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0) + (hN : + let H := primitiveNormalTriple (A.vectorChartRead i F) p + c < ‖realNormalPart (H 0) (H 1) (H 2)‖) : + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) (baseEquiv p)) ∧ + PhaseGeometry.Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (baseEquiv p)) + SmallModes.dx ∧ + c < ‖realSecondForm (spaceCoordinates ∘ A.vectorPlaneRead i F) + SmallModes.dy SmallModes.dy (baseEquiv p)‖ := by + have hFs := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF) + have hn : realNormalPart (primitiveNormalTriple (A.vectorChartRead i F) p 0) + (primitiveNormalTriple (A.vectorChartRead i F) p 1) + (primitiveNormalTriple (A.vectorChartRead i F) p 2) ≠ 0 := norm_pos_iff.mp (hc.trans hN) + have hg := good_phase_of_primitive_normal hFs p + (by rw [A.vectorChartRead_from_plane]; exact hD) + (by rw [A.vectorChartRead_from_plane]; exact hn) + refine ⟨hg.1,hg.2,?_⟩ + have he := primitiveNormalTriple_chart hFs p + rw [A.vectorChartRead_from_plane] at he + dsimp only at hN + rw [he] at hN + exact hN + +theorem secondTensor_margin_of_primitive_normal (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (p : JetPolynomial.Base) {c : ℝ} (hc : 0 < c) + (hD : + let H := primitiveNormalTriple (A.vectorChartRead i F) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0) + (hN : + let H := primitiveNormalTriple (A.vectorChartRead i F) p + c < ‖realNormalPart (H 0) (H 1) (H 2)‖) : + c < ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (baseEquiv p)‖ := by + have h := (A.phase_of_primitive_normal i hF p hc hD hN).2.2 + exact h.trans_le (norm_le_pi_norm + (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (baseEquiv p)) (2 : Fin 3)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..7333c649ac66fe74a3cf2070c660dbc92ee04913 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveOperator.lean @@ -0,0 +1,251 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFiberInverse +import OAI.Geometry.SurfaceImmersion.Geometry.TensorBundleInverse +import OAI.Geometry.SurfaceImmersion.Primitive.CurvedAtlasPrimitives + +namespace OAI + +/-! The actual fiberwise correction operator for independently perturbed +primitive cutoffs. Its reference value is the identity, and its inverse +solves the finite rank-one equation on the original tensor bundle. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance atlasOperatorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasOperatorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance atlasOperatorFiberComplete : CompleteSpace TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance atlasOperatorDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasOperatorDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasOperatorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasOperatorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +local instance atlasOperatorSectionGroup (p : M) : AddCommGroup (CovariantTwoTensor p) := + (atlasOperatorSectionNormed p).toAddCommGroup + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def primitiveCoefficientField (P : A.centers → JetPolynomial.Base → PhaseBasis) + (a : A.centers × Fin 3) (p : M) : TensorFiber →L[ℝ] ℝ := + ((P a.1 (chart (a.1 : M) p)).Q a.2).comp + (fiberToThree.comp (show TensorFiber →L[ℝ] TensorFiber from + (A.tensorTriv a.1).continuousLinearMapAt ℝ p)) + +def primitivePhaseCovector (phi : (A.centers × Fin 3) → M → ℝ) + (a : A.centers × Fin 3) (p : M) : Plane →L[ℝ] ℝ := + mfderiv planeModel 𝓘(ℝ) (phi a) p + +def primitiveFullOperator (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (p : M) : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p := + completedPrimitiveOperator (fun a => A.primitiveCoefficientField P a p) + (fun a => psi a p) (fun a => A.primitivePhaseCovector phi a p) + +lemma local_primitive_operator_decomposition + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (hphi : ∀ i j, ContDiff ℝ ∞ (phi i j)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hfit : ∀ i j p, p ∈ tsupport (A.weight i) → + (P i (chart (i : M) p)).ξ j = phaseDerivative (phi i j) (coordinateChart (i : M) p)) + (i : A.centers) {p : M} (hp : p ∈ tsupport (A.weight i)) + (B : CovariantTwoTensor p) (hB : ∀ v w, B v w = B w v) : + ∑ j : Fin 3, A.primitiveCoefficientField P (i,j) p B • + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p).smulRight + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p) = B := by + let C : TensorFiber := (A.tensorTriv i).continuousLinearMapAt ℝ p B + let T := (trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p + let u : ∀ x : M, CovariantTwoTensor x := fun _ => (show TensorFiber from B) + have hpS := A.weight_support i hp + have hC : ∀ v w, C v w = C w v := by + intro v w + change A.bundleComponent A.tensorTriv i u p v w = A.bundleComponent A.tensorTriv i u p w v + rw [A.tensorComponent_apply i u hpS,A.tensorComponent_apply i u hpS] + exact hB _ _ + have hd := congrArg fiberFromThree ((P i (chart (i : M) p)).decomposition (fiberToThree C)) + simp only [map_sum,map_smul] at hd + rw [fiberFromThree_toThree C hC] at hd + have hval (j : Fin 3) (v : Plane) : + A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p v = + phaseLinear ((P i (chart (i : M) p)).ξ j) (planeCoordinates (T v)) := by + rw [primitivePhaseCovector,A.curvedAtlasPhase_mfderiv phi hphi (i,j) (houter i) hp, + A.coordinateChart_tangentCoordinates i hpS] + change fderiv ℝ (phi i j) (coordinateChart (i : M) p) (planeCoordinates (T v)) = _ + rw [hfit i j p hp,phaseLinear_phaseDerivative] + ext v w + have he := congrArg (fun D : TensorFiber => D (T v) (T w)) hd + simp only [sum_apply,smul_apply,smul_eq_mul,fiberFromThree_apply,covectorSquare_evaluate] at he + have heB : C (T v) (T w) = B v w := A.tensorComponent_tangentCoordinates i u hpS v w + simp only [sum_apply,smul_apply,ContinuousLinearMap.smulRight_apply,smul_eq_mul,hval] + change (∑ j : Fin 3, (P i (chart (i : M) p)).Q j (fiberToThree C) * + (phaseLinear ((P i (chart (i : M) p)).ξ j) (planeCoordinates (T v)) * + phaseLinear ((P i (chart (i : M) p)).ξ j) (planeCoordinates (T w)))) = _ + exact he.trans heB + +/-- At the original square partition the completed operator is exactly the +identity, on the full tensor fiber rather than only on a quotient. -/ +theorem primitiveFullOperator_reference + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (hphi : ∀ i j, ContDiff ℝ ∞ (phi i j)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hfit : ∀ i j p, p ∈ tsupport (A.weight i) → + (P i (chart (i : M) p)).ξ j = phaseDerivative (phi i j) (coordinateChart (i : M) p)) + (p : M) : + A.primitiveFullOperator P (fun a => A.weight a.1) (A.curvedAtlasPhase phi) p = + ContinuousLinearMap.id ℝ (CovariantTwoTensor p) := by + apply completedPrimitiveOperator_eq_id + intro B hB + rw [finitePrimitiveOperator_apply,tensorSymmetrizer_eq_self hB, + ← Finset.univ_product_univ,Finset.sum_product] + have hi (i : A.centers) : + (∑ j : Fin 3, ((A.weight i p)^2*A.primitiveCoefficientField P (i,j) p B) • + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p).smulRight + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p)) = (A.weight i p)^2 • B := by + by_cases hw : A.weight i p = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_mul,zero_smul,Finset.sum_const_zero] + · rw [show (∑ j : Fin 3, ((A.weight i p)^2*A.primitiveCoefficientField P (i,j) p B) • + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p).smulRight + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p)) = + (A.weight i p)^2 • (∑ j : Fin 3, A.primitiveCoefficientField P (i,j) p B • + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p).smulRight + (A.primitivePhaseCovector (A.curvedAtlasPhase phi) (i,j) p)) by + simp only [Finset.smul_sum,smul_smul]] + rw [A.local_primitive_operator_decomposition P phi hphi houter hfit i + (subset_tsupport _ hw) B hB] + simp_rw [hi] + rw [← Finset.sum_smul,A.partition p,one_smul] + +/-- The corrected tensor is obtained by actual pointwise inverse. -/ +def correctedPrimitiveTensor (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) (p : M) : CovariantTwoTensor p := + (A.primitiveFullOperator P psi phi p).inverse (u p) + +theorem correctedPrimitiveTensor_reconstruct + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (hinv : ∀ p, (A.primitiveFullOperator P psi phi p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) (hsymm : ∀ p v w, u p v w = u p w v) (p : M) : + (∀ v w, A.correctedPrimitiveTensor P psi phi u p v w = + A.correctedPrimitiveTensor P psi phi u p w v) ∧ + (∑ a : A.centers × Fin 3, ((psi a p)^2 * A.primitiveCoefficientField P a p + (A.correctedPrimitiveTensor P psi phi u p)) • + (A.primitivePhaseCovector phi a p).smulRight (A.primitivePhaseCovector phi a p)) = u p := by + obtain ⟨hs,he⟩ := completedPrimitiveOperator_inverse_symmetric + (fun a => A.primitiveCoefficientField P a p) (fun a => psi a p) + (fun a => A.primitivePhaseCovector phi a p) (hinv p) (hsymm p) + refine ⟨hs,?_⟩ + rw [finitePrimitiveOperator_apply] at he + simpa only [correctedPrimitiveTensor,primitiveFullOperator,tensorSymmetrizer_eq_self hs] using! he + +/-- Smoothness is the ordinary smooth inverse theorem on the tensor bundle. -/ +theorem correctedPrimitiveTensor_smooth + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (hoperator : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun p => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) p (A.primitiveFullOperator P psi phi p))) + (hinv : ∀ p, (A.primitiveFullOperator P psi phi p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.correctedPrimitiveTensor P psi phi u p)) := + tensorBundle_inverse_apply_smooth _ hoperator hinv u hu + +def correctedPrimitiveAmplitude (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) (a : A.centers × Fin 3) (p : M) : ℝ := + psi a p * Real.sqrt (A.primitiveCoefficientField P a p + (A.correctedPrimitiveTensor P psi phi u p)) + +lemma correctedPrimitiveAmplitude_square + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) + (hpos : ∀ a p, p ∈ tsupport (psi a) → + 0 ≤ A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi phi u p)) + (a : A.centers × Fin 3) (p : M) : + (A.correctedPrimitiveAmplitude P psi phi u a p)^2 = + (psi a p)^2*A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi phi u p) := by + by_cases hp : psi a p = 0 + · simp only [correctedPrimitiveAmplitude,hp,zero_mul,zero_pow (by decide : 2 ≠ 0)] + · rw [correctedPrimitiveAmplitude,mul_pow,Real.sq_sqrt (hpos a p (subset_tsupport _ hp))] + +/-- Independent supports retain the exact global rank-one tensor identity. -/ +theorem correctedPrimitiveAmplitude_reconstruct + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (hinv : ∀ p, (A.primitiveFullOperator P psi phi p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) (hsymm : ∀ p v w, u p v w = u p w v) + (hpos : ∀ a p, p ∈ tsupport (psi a) → + 0 ≤ A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi phi u p)) + (p : M) : + (∑ a : A.centers × Fin 3, (A.correctedPrimitiveAmplitude P psi phi u a p)^2 • + (A.primitivePhaseCovector phi a p).smulRight (A.primitivePhaseCovector phi a p)) = u p := by + simp_rw [A.correctedPrimitiveAmplitude_square P psi phi u hpos] + exact (A.correctedPrimitiveTensor_reconstruct P psi phi hinv u hsymm p).2 + +lemma correctedPrimitiveAmplitude_pos_iff + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) + (hpos : ∀ a p, p ∈ tsupport (psi a) → + 0 < A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi phi u p)) + (a : A.centers × Fin 3) (p : M) : + 0 < A.correctedPrimitiveAmplitude P psi phi u a p ↔ 0 < psi a p := by + constructor + · intro h + exact (mul_pos_iff.mp h).resolve_right + (fun hh => (Real.sqrt_nonneg _).not_gt hh.2) |>.1 + · intro h + exact mul_pos h (Real.sqrt_pos.mpr (hpos a p (subset_tsupport _ h.ne'))) + +lemma correctedPrimitiveAmplitude_smooth + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) (phi : (A.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hsupport : ∀ a, tsupport (psi a) ⊆ (chart (a.1 : M)).source) + (hQ : ∀ a p, p ∈ tsupport (psi a) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) + (hoperator : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun p => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) p (A.primitiveFullOperator P psi phi p))) + (hinv : ∀ p, (A.primitiveFullOperator P psi phi p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hpos : ∀ a p, p ∈ tsupport (psi a) → + 0 < A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi phi u p)) + (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.correctedPrimitiveAmplitude P psi phi u a) := by + have hu' := A.correctedPrimitiveTensor_smooth P psi phi hoperator hinv u hu + apply contMDiff_of_tsupport + intro p hp + have hps : p ∈ tsupport (psi a) := tsupport_mul_subset_left hp + have hpchart := hsupport a hps + have hc := ((chart_smooth (a.1 : M)) p hpchart).contMDiffAt + ((chart (a.1 : M)).open_source.mem_nhds hpchart) + have hq := (hQ a p hps).contMDiffAt.comp p hc + have hb := ((A.bundleComponent_smooth_on A.tensorTriv A.tensorTriv_domain a.1 hu') p hpchart).contMDiffAt + ((chart (a.1 : M)).open_source.mem_nhds hpchart) + have hf := (fiberToThree.contDiff (n := ∞)).contDiffAt.contMDiffAt.comp p hb + have he := hq.clm_apply hf + have hr := (Real.contDiffAt_sqrt (hpos a p hps).ne').contMDiffAt.comp p he + exact (hpsi a p).mul hr + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveSeedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveSeedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f1c496b12e83124807c52b825d4d975fe31a08b2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveSeedBounds.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSeedBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialValueBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPrimitiveMean +import OAI.Geometry.SurfaceImmersion.Geometry.InitialInputBounds + +namespace OAI + +/-! Uniform local jets and global displacement of the actual contracted +primitive seed, and its initial normalized polynomial defect. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates PrimitiveRealization +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance primitiveSeedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveSeedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance primitiveSeedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveSeedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveSeedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveSeedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma jetChartMap_const_smul (i : A.centers) (c : ℝ) (F : M → Space) : + A.jetChartMap i (c • F) = c • A.jetChartMap i F := by + funext x + change spaceCoordinates (localize (i : M) (A.outer i) (c • F) x) = + c • spaceCoordinates (localize (i : M) (A.outer i) F x) + rw [localize_smul] + exact map_smul spaceCoordinates c _ + +omit [CompactSpace M] in +lemma jetChartMap_primitiveSeed (i : A.centers) (δ : ℝ) (F : M → Space) : + A.jetChartMap i (Real.sqrt (1-δ^2) • F) = primitiveSeed δ (A.jetChartMap i F) := by + rw [A.jetChartMap_const_smul] + rfl + +/-- The compact low-jet range, all local derivative profiles, and the global +quadratic displacement profile are chosen before the contraction parameter. -/ +theorem atlas_primitive_seed_bounds + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (K : A.centers → Compacts JetPolynomial.Base) (hUK : ∀ i, U i ⊆ K i) : + ∃ Q : Set LowJet, IsCompact Q ∧ + ∃ J B : A.centers → ℕ → ℝ, ∃ D : ℕ → ℝ, + (∀ i m, 1 ≤ J i m) ∧ (∀ i m, 1 ≤ B i m) ∧ (∀ m, 0 ≤ D m) ∧ + ∀ δ : ℝ, δ^2 ≤ 1 → + ContMDiff planeModel spaceModel ∞ (Real.sqrt (1-δ^2) • F) ∧ + (∀ i, MapsTo (lowJet (A.jetChartMap i (Real.sqrt (1-δ^2) • F))) (U i) Q) ∧ + (∀ i m, WeightedEstimates.WeightedBound (U i) 1 m (B i m) + (lowJet (A.jetChartMap i (Real.sqrt (1-δ^2) • F)))) ∧ + (∀ i m, WeightedEstimates.WeightedBound (U i) 1 (m+2) (J i m) + (A.jetChartMap i (Real.sqrt (1-δ^2) • F))) ∧ + (∀ m, A.WeightedBound 1 m (D m * δ^2) (Real.sqrt (1-δ^2) • F-F)) := by + classical + choose Q hQ J B hJ hB hlocal using fun i => + compact_primitiveSeed_bounds (hU i) (K i) (hUK i) (A.jetChartMap_smooth i hF) + choose D hD hglobal using fun m => A.exists_shifted_bound m 0 hF + let Q₀ : Set LowJet := ⋃ i, Q i + refine ⟨Q₀,isCompact_iUnion hQ,J,B,D,hJ,hB,hD,?_⟩ + intro δ hδ + have hseed (i) := hlocal i δ hδ + have hid (i) := A.jetChartMap_primitiveSeed i δ F + refine ⟨space_smul_contMDiff hF _,?_,?_,?_,?_⟩ + · intro i x hx + rw [hid i] + exact mem_iUnion.mpr ⟨i,(hseed i).1 hx⟩ + · intro i m + rw [hid i] + exact (hseed i).2.1 m + · intro i m + rw [hid i] + exact (hseed i).2.2.1 m + · intro m + have hb : A.WeightedBound 1 m (D m) F := A.shifted_zero_to_weighted (hglobal m) + have hh := A.weightedBound_const_smul hF hb (Real.sqrt (1-δ^2)-1) + have heq : Real.sqrt (1-δ^2) • F-F = (Real.sqrt (1-δ^2)-1) • F := by + rw [sub_smul,one_smul] + rw [heq] + intro i + apply (hh i).mono_const + calc + |Real.sqrt (1-δ^2)-1| * D m ≤ δ^2 * D m := + mul_le_mul_of_nonneg_right (primitiveSeed_factor_bound hδ).2 (hD m) + _ = D m * δ^2 := mul_comm _ _ + +/-- The normalized defect of the contracted seed is globally of order +`ε/δ²`, with a fixed all-order profile. -/ +theorem atlas_primitive_seed_defect_bounds {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (K : A.centers → Compacts JetPolynomial.Base) (hUK : ∀ i, U i ⊆ K i) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) : + ∃ D E : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ (∀ m, 0 ≤ E m) ∧ + ∀ (δ ε : ℝ), δ ≠ 0 → δ^2 ≤ 1 → 0 ≤ ε → ε ≤ 1 → + (∀ m, A.WeightedBound 1 m (D m * δ^2) (Real.sqrt (1-δ^2) • F-F)) ∧ + (∀ m, A.TensorWeightedBound 1 m (E m * ε / δ^2) + (A.normalizedPolynomialDefect P ε δ (inducedTensor F) + (Real.sqrt (1-δ^2) • F))) := by + obtain ⟨Q,hQ,J,B,D,hJ,hB,hD,hseed⟩ := A.atlas_primitive_seed_bounds F hF U hU K hUK + obtain ⟨E,hE,hvalue⟩ := A.atlas_polynomial_value_bounds P hP U hU houter (fun _ => Q) + (fun _ => hQ) (fun i m => B i (m+tensorOrder (P i))) + (fun i m => hB i (m+tensorOrder (P i))) + refine ⟨D,E,hD,hE,?_⟩ + intro δ ε hδ hδ1 hε hε1 + obtain ⟨hG,hGQ,hGb,_,hdisp⟩ := hseed δ hδ1 + refine ⟨hdisp,?_⟩ + intro m + have hv := hvalue (Real.sqrt (1-δ^2) • F) hG hGQ 1 ε zero_lt_one le_rfl hε hε1 + (fun i m => hGb i (m+tensorOrder (P i))) m + have hh := A.tensorWeightedBound_const_smul (A.atlasPolynomialValue_smooth hP hG ε) hv + (-(δ^2)⁻¹) + rw [← A.normalizedPolynomialDefect_seed P ε hF hδ hδ1] at hh + convert hh using 1 + rw [abs_neg,abs_of_pos (inv_pos.mpr (sq_pos_of_ne_zero hδ))] + simp only [one_pow,div_one] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveUpdate.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveUpdate.lean new file mode 100644 index 0000000000000000000000000000000000000000..454c3b714527af5f63dbd050528643cca21525ca --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/AtlasPrimitiveUpdate.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPrimitiveMean +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalInputRecurrence + +namespace OAI + +/-! Propagation of the actual slow-map norms and normalized polynomial +error through one primitive increment. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma weighted_increment_unscaled {X : M → Space} {τ C : ℝ} {m : ℕ} + (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hC : 0 ≤ C) + (hX : A.WeightedBound τ m C X) : A.WeightedBound 1 m (C/τ^m) X := by + intro i j hj x hx + simp only [one_pow,one_mul] + exact ((hX i).deriv_le hτ hj hx).trans + (div_le_div_of_nonneg_left hC (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le hτ1 hj)) + +/-- The output bounds concern the map that is actually added, and the +normalized defect of its actual polynomial metric. -/ +theorem polynomial_increment_propagation {n : A.centers → ℕ} + {Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + {γ : ∀ x : M, CovariantTwoTensor x} + (hγ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x))) + {F G X : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hG : ContMDiff planeModel spaceModel ∞ G) (hX : ContMDiff planeModel spaceModel ∞ X) + {s τ δ δ' ε c : ℝ} (hs : 0 < s) (hτ : 0 < τ) (hτs : τ ≤ s) (hτ1 : τ ≤ 1) + (hδ : 0 < δ) (hδ' : 0 < δ') + (P B E : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) (hB : ∀ m, 0 ≤ B m) + (hclose : A.WeightedBound 1 2 c (G-F)) + (hmap : ∀ m, A.ShiftedBound 2 m s (P m) G) + (hinc : ∀ m, A.WeightedBound τ m (B m*(δ*τ)) X) + (herr : ∀ m, A.TensorWeightedBound τ m (E m) + (A.atlasPolynomialMetric Pol ε (G+X)-A.atlasPolynomialMetric Pol ε G- + δ^2 • A.polynomialMeanTarget Pol ε δ δ' γ G)) : + A.WeightedBound 1 2 (c+B 2*δ/τ) (G+X-F) ∧ + (∀ m, A.ShiftedBound 2 m τ (P 0+P m+B (2+m)*δ/τ) (G+X)) ∧ + (∀ m, A.TensorWeightedBound τ m (E m/δ'^2) + (A.normalizedPolynomialDefect Pol ε δ' γ (G+X))) := by + have htC (m : ℕ) : 0 ≤ B m*(δ*τ) := mul_nonneg (hB m) (mul_nonneg hδ.le hτ.le) + have hcX := A.weighted_increment_unscaled hτ hτ1 (htC 2) (hinc 2) + have hcX' : A.WeightedBound 1 2 (B 2*δ/τ) X := by + convert hcX using 1 + field_simp + have hc := A.weightedBound_add (hG.sub hF) hX zero_le_one hclose hcX' + have heq : G+X-F = (G-F)+X := by abel + rw [heq] + refine ⟨hc,?_,?_⟩ + · intro m + have hx := A.weighted_to_shifted hτ hτ1 (htC (2+m)) (hinc (2+m)) + have hx' : A.ShiftedBound 2 m τ (B (2+m)*δ/τ) X := by + convert hx using 1 + field_simp + have hm := A.shifted_map_recurrence hG hX (hmap 0) (hmap m) hx' + hs hτ.le hτs (hP 0) (hP m) + intro i j hj x + exact (hm i j hj x).trans (by + have hr : τ/s ≤ 1 := (div_le_one hs).2 hτs + have hh := mul_le_of_le_one_left (hP m) hr + linarith) + · intro m + exact A.normalizedPolynomialDefect_after_step hPol hδ.ne' hδ'.ne' + hγ hG (hG.add hX) (herr m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedNormalizedLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedNormalizedLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..7af5fccf727901f216c5392576fad23b64373c46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedNormalizedLoop.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BlendedDensityCompact +import OAI.Geometry.SurfaceImmersion.Geometry.DensityNormalizedPath + +namespace OAI + +/-! Construct the normalized leading loop across all three parameter regions. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem blended_normalized_loop + {a A s h : B → ℝ} {c : B → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) (hc : ContDiff ℝ ∞ c) + {U C K : Set B} (hU : IsOpen U) (hC : IsClosed C) (hCU : C ⊆ U) (hK : IsCompact K) + (hcollar : ∀ b ∈ U, s b = 0 ∧ h b = 0 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) + (hrest : ∀ b ∈ K \ U, + (0 < a b ∧ 2 * Real.arctan (a b) ≤ A b ∧ s b ∈ Icc (0 : ℝ) 1 ∧ h b = 0 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) ∨ + (s b = 1 ∧ Real.pi + |h b| < A b ∧ c b 0 ^ 2 + c b 1 ^ 2 < 1)) : + ∃ V : Set B, IsOpen V ∧ K ⊆ V ∧ ∃ q : B × ℝ → LoopDensity.Plane, + ContDiffOn ℝ ∞ q (V ×ˢ univ) ∧ + (∀ b ∈ V, Function.Periodic (fun t => q (b, t)) 1) ∧ + (∀ b ∈ V, (∫ t in 0..1, q (b, t)) = c b) ∧ + (∀ b ∈ V, ∀ t, q (b, t) 0 ^ 2 + q (b, t) 1 ^ 2 = 1) ∧ + ∀ b ∈ V ∩ C, a b = 0 → ∀ t, q (b, t) = ![1, 0] := by + obtain ⟨V, hV, hKV, ρ, hρ, hpos, hper, hmom, _hfixed⟩ := + blended_density_compact ha hA hs hh hc hU hC hCU hK hcollar hrest + let p : B → ℝ → LoopDensity.Plane := fun b t => blendedPath (a b) (A b) (s b) (h b) t + have hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2) := blendedPath_smooth ha hA hs hh + have hunit (b : B) (_hb : b ∈ V) (t : ℝ) : p b t 0 ^ 2 + p b t 1 ^ 2 = 1 := + Real.cos_sq_add_sin_sq _ + have hq := LoopDensity.normalizedPath_properties hV hρ hp.contDiffOn hpos + (fun b _ => hper b) (fun b _ => blendedPath_periodic _ _ _ _) hmom hunit + refine ⟨V, hV, hKV, LoopDensity.normalizedPath ρ p, + hq.1, hq.2.1, hq.2.2.1, hq.2.2.2, ?_⟩ + intro b hb haz t + obtain ⟨hsb, hhb, _⟩ := hcollar b (hCU hb.2) + simp [LoopDensity.normalizedPath, PositiveDensity.reparametrize, + p, blendedPath, blendedAngle, baseAngle, haz, hsb, hhb] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedReparamTurns.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedReparamTurns.lean new file mode 100644 index 0000000000000000000000000000000000000000..900cd96b31f8ebfde3af1de53db77eb8e59d5cb9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedReparamTurns.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BlendedVelocityPath +import OAI.Geometry.SurfaceImmersion.Primitive.PositiveDensityTurns + +namespace OAI + +/-! Exact two-turn geometry for the blended path after positive reparametrization. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def unitAngle (a A s h t : ℝ) : ℝ := blendedAngle a A s h (2 * Real.pi * t) + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] + +lemma unitAngle_smooth {a A s h : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) : + ContDiff ℝ ∞ (fun z : B × ℝ => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2) := by + have hb : ContDiff ℝ ∞ (fun z : B × ℝ => baseAngle (a z.1) (2 * Real.pi * z.2)) := + baseAngle_smooth.comp ((ha.comp contDiff_fst).prodMk (contDiff_const.mul contDiff_snd)) + exact ((hh.comp contDiff_fst).add + ((contDiff_const.sub (hs.comp contDiff_fst)).mul hb)).add + ((hs.comp contDiff_fst).mul ((hA.comp contDiff_fst).mul + (contDiff_const.mul contDiff_snd).cos)) + +lemma unitAngle_deriv_zero_iff {a A s : ℝ} (ha : 0 < a) (hA : 0 < A) + (hs : s ∈ Icc (0 : ℝ) 1) (h t : ℝ) : + deriv (unitAngle a A s h) t = 0 ↔ Real.sin (2 * Real.pi * t) = 0 := by + have hd := (hasDerivAt_blendedAngle a A s h (2 * Real.pi * t)).comp t + ((hasDerivAt_id t).const_mul (2 * Real.pi)) + change deriv ((blendedAngle a A s h) ∘ fun u => 2 * Real.pi * u) t = 0 ↔ _ + rw [hd.deriv] + have hspeed := (blended_speed_positive ha hA hs.1 hs.2 (2 * Real.pi * t)).ne' + simp [hspeed, Real.pi_ne_zero] + +lemma unit_sin_zero_iff {t : ℝ} (ht : t ∈ Ico (0 : ℝ) 1) : + Real.sin (2 * Real.pi * t) = 0 ↔ t = 0 ∨ t = 1 / 2 := by + have hp : 0 < 2 * Real.pi := by positivity + have hperiod : 2 * Real.pi * t ∈ Ico (0 : ℝ) (2 * Real.pi) := + ⟨mul_nonneg hp.le ht.1, by nlinarith [ht.2]⟩ + have hzero := (deriv_angle_eq_zero_iff_sin (a := 1) (θ := 2 * Real.pi * t) one_ne_zero).symm.trans + (angle_two_turns (a := 1) one_ne_zero hperiod) + rw [hzero] + constructor + · rintro (hz | hz) + · left; nlinarith + · right; nlinarith [Real.pi_pos] + · rintro (rfl | rfl) + · simp + · right; ring + +variable [FiniteDimensional ℝ B] {ρ : B × ℝ → ℝ} {U : Set B} + +omit [FiniteDimensional ℝ B] in +lemma inverseClock_mem_period (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {b : B} (hb : b ∈ U) {θ : ℝ} (hθ : θ ∈ Ico (0 : ℝ) 1) : + PositiveDensity.inverseClock ρ b θ ∈ Ico (0 : ℝ) 1 := by + have hm := PositiveDensity.clock_strictMono hU hρ hpos hb + have hi := PositiveDensity.clock_inverseClock hU hρ hper hmass hb θ + have hc1 : PositiveDensity.clock ρ b 1 = 1 := hmass b hb + constructor + · apply hm.le_iff_le.mp + simpa only [PositiveDensity.clock_zero, hi] using hθ.1 + · apply hm.lt_iff_lt.mp + rw [hi, hc1] + exact hθ.2 + +theorem reparametrized_two_turns + {a A s h : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) + (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {b : B} (hb : b ∈ U) (hab : 0 < a b) (hAb : 0 < A b) + (hsb : s b ∈ Icc (0 : ℝ) 1) {θ : ℝ} (hθ : θ ∈ Ico (0 : ℝ) 1) : + deriv (fun t => PositiveDensity.reparametrize ρ + (fun z => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2) (b, t)) θ = 0 ↔ + θ = 0 ∨ θ = PositiveDensity.clock ρ b (1 / 2) := by + rw [PositiveDensity.deriv_reparametrize_eq_zero_iff hU hρ hpos hper hmass + (unitAngle_smooth ha hA hs hh).contDiffOn hb θ] + change deriv (unitAngle (a b) (A b) (s b) (h b)) (PositiveDensity.inverseClock ρ b θ) = 0 ↔ _ + rw [unitAngle_deriv_zero_iff hab hAb hsb, + unit_sin_zero_iff (inverseClock_mem_period hU hρ hpos hper hmass hb hθ)] + constructor + · rintro (hz | hz) + · left + have hi := PositiveDensity.clock_inverseClock hU hρ hper hmass hb θ + simpa only [hz, PositiveDensity.clock_zero] using hi.symm + · right + have hi := PositiveDensity.clock_inverseClock hU hρ hper hmass hb θ + simpa only [hz] using hi.symm + · rintro (rfl | rfl) + · left + have hi := PositiveDensity.inverseClock_clock hU hρ hpos hb 0 + simpa only [PositiveDensity.clock_zero] using hi + · exact Or.inr (PositiveDensity.inverseClock_clock hU hρ hpos hb (1 / 2)) + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedSpatialTurns.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedSpatialTurns.lean new file mode 100644 index 0000000000000000000000000000000000000000..e543df18aefb18389ff471695351405ca6a675b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedSpatialTurns.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BlendedReparamTurns +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus + +namespace OAI + +/-! The actual spatial derivative at each turn of the normalized blended loop. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def blendedAmplitude (a A s : ℝ) : ℝ := (1 - s) * (2 * Real.arctan a) + s * A + +lemma unitAngle_zero (a A s h : ℝ) : + unitAngle a A s h 0 = h + blendedAmplitude a A s := by + simpa only [unitAngle, mul_zero, blendedAmplitude] using blendedAngle_zero a A s h + +lemma unitAngle_half (a A s h : ℝ) : + unitAngle a A s h (1 / 2) = h - blendedAmplitude a A s := by + have he : 2 * Real.pi * (1 / 2 : ℝ) = Real.pi := by ring + simpa only [unitAngle, he, blendedAmplitude] using blendedAngle_pi a A s h + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] + +lemma blendedAmplitude_smooth {a A s : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) (hs : ContDiff ℝ ∞ s) : + ContDiff ℝ ∞ (fun x => blendedAmplitude (a x) (A x) (s x)) := + ((contDiff_const.sub hs).mul (contDiff_const.mul ha.arctan)).add (hs.mul hA) + +lemma unitAngle_angular_zero {a A s h : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) (b : B) {t : ℝ} + (ht : Real.sin (2 * Real.pi * t) = 0) : + fderiv ℝ (fun z : B × ℝ => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2) + (b, t) (0, 1) = 0 := by + have hd := (hasDerivAt_blendedAngle (a b) (A b) (s b) (h b) (2 * Real.pi * t)).comp t + ((hasDerivAt_id t).const_mul (2 * Real.pi)) + have hf := SmoothPeriodicCalculus.angle_hasDerivAt (unitAngle_smooth ha hA hs hh) b t + have he := hf.unique hd + simpa only [ht, neg_zero, zero_mul, SmoothPeriodicCalculus.angleDerivative] using he + +variable [FiniteDimensional ℝ B] {ρ : B × ℝ → ℝ} {U : Set B} + +theorem reparametrized_spatial_turns {a A s h : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) + (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {b : B} (hb : b ∈ U) (v : B) : + let F := fun z : B × ℝ => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2 + let amp := fun x => blendedAmplitude (a x) (A x) (s x) + fderiv ℝ (fun x => PositiveDensity.reparametrize ρ F (x, 0)) b v = + fderiv ℝ h b v + fderiv ℝ amp b v ∧ + fderiv ℝ (fun x => PositiveDensity.reparametrize ρ F + (x, PositiveDensity.clock ρ b (1 / 2))) b v = + fderiv ℝ h b v - fderiv ℝ amp b v := by + dsimp only + let F := fun z : B × ℝ => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2 + let amp := fun x => blendedAmplitude (a x) (A x) (s x) + have hF : ContDiff ℝ ∞ F := unitAngle_smooth ha hA hs hh + have hamp : ContDiff ℝ ∞ amp := blendedAmplitude_smooth ha hA hs + have hi₀ : PositiveDensity.inverseClock ρ b 0 = 0 := by + simpa only [PositiveDensity.clock_zero] using + PositiveDensity.inverseClock_clock hU hρ hpos hb 0 + have hi₁ := PositiveDensity.inverseClock_clock hU hρ hpos hb (1 / 2) + have hz₀ : fderiv ℝ F (b, PositiveDensity.inverseClock ρ b 0) (0, 1) = 0 := by + rw [hi₀] + exact unitAngle_angular_zero ha hA hs hh b (by simp) + have hz₁ : fderiv ℝ F + (b, PositiveDensity.inverseClock ρ b (PositiveDensity.clock ρ b (1 / 2))) (0, 1) = 0 := by + rw [hi₁] + apply unitAngle_angular_zero ha hA hs hh b + have he : 2 * Real.pi * (1 / 2 : ℝ) = Real.pi := by ring + rw [he, Real.sin_pi] + have hd₀ := PositiveDensity.spatial_derivative_at_turn hU hρ hpos hper hmass + hF.contDiffOn hb 0 hz₀ v + have hd₁ := PositiveDensity.spatial_derivative_at_turn hU hρ hpos hper hmass + hF.contDiffOn hb (PositiveDensity.clock ρ b (1 / 2)) hz₁ v + rw [hi₀] at hd₀ + rw [hi₁] at hd₁ + have he₀ : (fun x => F (x, 0)) = (fun x => h x + amp x) := + funext (fun x => unitAngle_zero (a x) (A x) (s x) (h x)) + have he₁ : (fun x => F (x, 1 / 2)) = (fun x => h x - amp x) := + funext (fun x => unitAngle_half (a x) (A x) (s x) (h x)) + rw [he₀, fderiv_fun_add (hh.differentiable (by simp) b) + (hamp.differentiable (by simp) b), add_apply] at hd₀ + rw [he₁, fderiv_fun_sub (hh.differentiable (by simp) b) + (hamp.differentiable (by simp) b), sub_apply] at hd₁ + exact ⟨hd₀, hd₁⟩ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedVelocityPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedVelocityPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1a298a0b94e85224c885263ae1ae64020df775e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BlendedVelocityPath.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityAngleInterpolation +import OAI.Geometry.SurfaceImmersion.Whitney.ArcDensityLocal + +namespace OAI + +/-! Smooth transition paths and their strict convex-hull margin. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def blendedPath (a A s h t : ℝ) : LoopDensity.Plane := + ![Real.cos (blendedAngle a A s h (2 * Real.pi * t)), + Real.sin (blendedAngle a A s h (2 * Real.pi * t))] + +lemma blendedPath_periodic (a A s h : ℝ) : Function.Periodic (blendedPath a A s h) 1 := by + intro t + simp [blendedPath, blendedAngle, baseAngle, mul_add, Real.cos_add_two_pi] + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] + +lemma blendedPath_smooth {a A s h : B → ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) : + ContDiff ℝ ∞ (fun z : B × ℝ => blendedPath (a z.1) (A z.1) (s z.1) (h z.1) z.2) := by + have hangle : ContDiff ℝ ∞ (fun z : B × ℝ => + blendedAngle (a z.1) (A z.1) (s z.1) (h z.1) (2 * Real.pi * z.2)) := by + have hb : ContDiff ℝ ∞ (fun z : B × ℝ => baseAngle (a z.1) (2 * Real.pi * z.2)) := + baseAngle_smooth.comp ((ha.comp contDiff_fst).prodMk (contDiff_const.mul contDiff_snd)) + exact ((hh.comp contDiff_fst).add + ((contDiff_const.sub (hs.comp contDiff_fst)).mul hb)).add + ((hs.comp contDiff_fst).mul ((hA.comp contDiff_fst).mul + (contDiff_const.mul contDiff_snd).cos)) + apply contDiff_pi.mpr + intro i + fin_cases i + · exact hangle.cos + · exact hangle.sin + +lemma blendedPath_covers {a A s β : ℝ} + (hβ : β ∈ Ioo (-((1 - s) * (2 * Real.arctan a) + s * A)) + ((1 - s) * (2 * Real.arctan a) + s * A)) : + ∃ t ∈ Ioo (0 : ℝ) 1, blendedPath a A s 0 t = ![Real.cos β, Real.sin β] := by + have hf : Continuous (blendedAngle a A s 0) := by + unfold blendedAngle baseAngle + fun_prop + have hmem : β ∈ Icc (blendedAngle a A s 0 Real.pi) (blendedAngle a A s 0 0) := by + rw [blendedAngle_pi, blendedAngle_zero] + simpa only [zero_add, zero_sub] using ⟨hβ.1.le, hβ.2.le⟩ + obtain ⟨u, hu, heq⟩ := intermediate_value_Icc' Real.pi_pos.le hf.continuousOn hmem + have hu0 : 0 < u := by + by_contra hn + have hz : u = 0 := le_antisymm (le_of_not_gt hn) hu.1 + rw [hz, blendedAngle_zero, zero_add] at heq + linarith [hβ.2] + have huπ : u < Real.pi := by + by_contra hn + have hz : u = Real.pi := le_antisymm hu.2 (le_of_not_gt hn) + rw [hz, blendedAngle_pi, zero_sub] at heq + linarith [hβ.1] + refine ⟨u / (2 * Real.pi), ⟨div_pos hu0 (by positivity), ?_⟩, ?_⟩ + · apply (div_lt_one (by positivity : 0 < 2 * Real.pi)).mpr + linarith [Real.pi_pos] + · have hsimp : 2 * Real.pi * (u / (2 * Real.pi)) = u := by field_simp + simp only [blendedPath, hsimp, heq] + +lemma collar_mean_arc_margin {a : ℝ} (ha : 0 < a) : + Real.arccos ((1 - a ^ 2 / 2) / (1 + a ^ 2 / 2)) < 2 * Real.arctan a := by + have hd : 0 < 1 + a ^ 2 := by positivity + have hd' : 0 < 1 + a ^ 2 / 2 := by positivity + have hsq : 0 < a ^ 2 := sq_pos_of_pos ha + have hcos : Real.cos (2 * Real.arctan a) = (1 - a ^ 2) / (1 + a ^ 2) := by + simpa [baseAngle, arcX] using cos_baseAngle a 0 + have hlt : (1 - a ^ 2) / (1 + a ^ 2) < (1 - a ^ 2 / 2) / (1 + a ^ 2 / 2) := by + apply (div_lt_div_iff₀ hd hd').mpr + nlinarith + have hangle0 : 0 ≤ 2 * Real.arctan a := by + have := Real.arctan_pos.mpr ha + positivity + have hangleπ : 2 * Real.arctan a ≤ Real.pi := by + have := Real.arctan_lt_pi_div_two a + linarith + have hm1 : (1 - a ^ 2 / 2) / (1 + a ^ 2 / 2) ≤ 1 := by + apply (div_le_one hd').mpr + linarith + have hleft : -1 ≤ Real.cos (2 * Real.arctan a) := Real.neg_one_le_cos _ + have hh := Real.arccos_lt_arccos hleft (hcos ▸ hlt) hm1 + rwa [Real.arccos_cos hangle0 hangleπ] at hh + +theorem blended_positive_density_near [FiniteDimensional ℝ B] + {a A s h : B → ℝ} {c : B → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) (hc : ContDiff ℝ ∞ c) + {b₀ : B} (ha₀ : 0 < a b₀) (hA₀ : 2 * Real.arctan (a b₀) ≤ A b₀) + (hs₀ : s b₀ ∈ Icc (0 : ℝ) 1) (hh₀ : h b₀ = 0) + (hc₀ : c b₀ = ![(1 - a b₀ ^ 2 / 2) / (1 + a b₀ ^ 2 / 2), 0]) : + ∃ U : Set B, IsOpen U ∧ b₀ ∈ U ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (U ×ˢ univ) ∧ + (∀ b ∈ U, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • + LoopDensity.augment (blendedPath (a b) (A b) (s b) (h b) t)) = LoopDensity.augment (c b) := by + have hd : 0 < 1 + a b₀ ^ 2 / 2 := by positivity + have hsq : 0 < a b₀ ^ 2 := sq_pos_of_pos ha₀ + have hml : -1 < (1 - a b₀ ^ 2 / 2) / (1 + a b₀ ^ 2 / 2) := by + apply (lt_div_iff₀ hd).mpr + linarith + have hmu : (1 - a b₀ ^ 2 / 2) / (1 + a b₀ ^ 2 / 2) < 1 := by + apply (div_lt_one hd).mpr + linarith + have hamplitude : 2 * Real.arctan (a b₀) ≤ + (1 - s b₀) * (2 * Real.arctan (a b₀)) + s b₀ * A b₀ := by + nlinarith [mul_nonneg hs₀.1 (sub_nonneg.mpr hA₀)] + apply LoopDensity.positive_density_near_of_arc_coverage (blendedPath_smooth ha hA hs hh) + hc hc₀ hml hmu (lt_of_lt_of_le (collar_mean_arc_margin ha₀) hamplitude) + intro β hβ + rw [hh₀] + exact blendedPath_covers hβ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryJetCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryJetCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bd1c6edd10e124eda2470d00ee0b3cffe416293 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryJetCrossings.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetPositivity + +namespace OAI + +/-! Both ordered boundary inequalities persist under small exterior C2 changes. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def boundaryJetCrossings : Set (BoundaryProfile × (Base × (Base × ℝ))) := + {a | NormalFrame.gramDet (a.1 0) (a.1 1) ≠ 0 ∧ + boundaryJetSecond a.1 a.2.1 a.2.1 ≠ 0 ∧ + boundaryJetSecond a.1 a.2.2.1 a.2.2.1 ≠ 0 ∧ + 0 < boundaryJetCrossing a.1 a.2.1 a.2.2.1 a.2.2.2 ∧ + 0 < boundaryJetCrossing a.1 a.2.2.1 a.2.1 a.2.2.2} + +lemma isOpen_boundaryJetCrossings : IsOpen boundaryJetCrossings := by + apply isOpen_iff_mem_nhds.mpr + intro a ha + let Z := BoundaryProfile × (Base × (Base × ℝ)) + have hd : Continuous (fun a : Z => NormalFrame.gramDet (a.1 0) (a.1 1)) := + contDiff_gram_pair.continuous.comp (show Continuous (fun a : Z => (a.1 0,a.1 1)) by + dsimp [Z] + fun_prop) + have hm : Continuous (fun a : Z => (a.1,a.2.1,a.2.1)) := by fun_prop + have hn : Continuous (fun a : Z => (a.1,a.2.2.1,a.2.2.1)) := by fun_prop + have hP := (continuousAt_boundaryJetSecond a.2.1 a.2.1 ha.1).comp + (f := fun a : Z => (a.1,a.2.1,a.2.1)) (x := a) hm.continuousAt + have hQ := (continuousAt_boundaryJetSecond a.2.2.1 a.2.2.1 ha.1).comp + (f := fun a : Z => (a.1,a.2.2.1,a.2.2.1)) (x := a) hn.continuousAt + have hc := continuousAt_boundaryJetCrossing (w := a.2.2.1) (κ := a.2.2.2) ha.1 ha.2.1 + have hswap : Continuous (fun a : Z => (a.1,a.2.2.1,a.2.1,a.2.2.2)) := by fun_prop + have hr := (continuousAt_boundaryJetCrossing (w := a.2.1) (κ := a.2.2.2) ha.1 ha.2.2.1).comp + (f := fun a : Z => (a.1,a.2.2.1,a.2.1,a.2.2.2)) (x := a) hswap.continuousAt + filter_upwards [hd.continuousAt.eventually_ne ha.1,hP.eventually_ne ha.2.1, + hQ.eventually_ne ha.2.2.1,hc.eventually (isOpen_Ioi.mem_nhds ha.2.2.2.1), + hr.eventually (isOpen_Ioi.mem_nhds ha.2.2.2.2)] with b hb hP hQ hc hr + exact ⟨hb,hP,hQ,hc,hr⟩ + +theorem compact_boundary_jet_crossings {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} {v w : X → Base} {κ : X → ℝ} + (hJ : Continuous J) (hv : Continuous v) (hw : Continuous w) (hκ : Continuous κ) + (hold : ∀ x, (J x,v x,w x,κ x) ∈ boundaryJetCrossings) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ H : BoundaryProfile, + ‖H-J x‖ < δ → (H,v x,w x,κ x) ∈ boundaryJetCrossings := by + let f := fun x => (J x,v x,w x,κ x) + have hf : Continuous f := hJ.prodMk (hv.prodMk (hw.prodMk hκ)) + obtain ⟨δ,hδ,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open + isOpen_boundaryJetCrossings (by rintro _ ⟨x,rfl⟩; exact hold x) + refine ⟨δ,hδ,?_⟩ + intro x H hH + apply hsub + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (H,(v x,w x,κ x)) (J x,(v x,w x,κ x)) < δ + rwa [dist_prod_same_right,dist_eq_norm] + +theorem compact_actual_exterior_crossings {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {v w : X → Base} {κ : X → ℝ} + (hp : Continuous p) (hv : Continuous v) (hw : Continuous w) (hκ : Continuous κ) + (hD : ∀ x, NormalFrame.gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x)) ≠ 0) + (hP : ∀ x, realSecondForm F (v x) (v x) (p x) ≠ 0) + (hQ : ∀ x, realSecondForm F (w x) (w x) (p x) ≠ 0) + (hcross : ∀ x, 0 < orderedCrossing F (v x) (w x) (p x) (κ x) ∧ + 0 < orderedCrossing F (w x) (v x) (p x) (κ x)) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + 0 < orderedCrossing G (v x) (w x) (p x) (κ x) ∧ + 0 < orderedCrossing G (w x) (v x) (p x) (κ x) := by + have hJ : Continuous (fun x => realBoundaryProfile F 1 (p x)) := + (realBoundaryProfile_smooth hF 1).continuous.comp hp + obtain ⟨δ,hδ,hclose⟩ := compact_boundary_jet_crossings hJ hv hw hκ (by + intro x + refine ⟨hD x,?_,?_,?_,?_⟩ + · rw [boundaryJetSecond_actual hF]; exact hP x + · rw [boundaryJetSecond_actual hF]; exact hQ x + · rw [boundaryJetCrossing_actual hF]; exact (hcross x).1 + · rw [boundaryJetCrossing_actual hF]; exact (hcross x).2) + refine ⟨δ,hδ,?_⟩ + intro x G hG hnear + have hh := (hclose x (realBoundaryProfile G 1 (p x)) hnear).2.2.2 + simpa only [boundaryJetCrossing_actual hG] using hh + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..373157bd266926795fd6482f9a53ca1dbaa844de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileCoordinates.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveNormalCoordinates +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveProfiles + +namespace OAI + +/-! The five Euclidean profiles used by the exact primitive determine the +canonical normal frame in the real surface coordinates. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open RealModes NormalFrame SurfaceJetCoordinates JetVelocityCoordinates +open SurfaceVelocityFamily.Loop + +abbrev EuclideanBoundaryProfile := Fin 5 → Euclidean + +def boundaryProfileMap : EuclideanBoundaryProfile →L[ℝ] BoundaryProfile := + ContinuousLinearMap.pi fun i => + spaceCoordinates.toContinuousLinearMap.comp (ContinuousLinearMap.proj i) + +@[simp] lemma boundaryProfileMap_apply (J : EuclideanBoundaryProfile) (i : Fin 5) : + boundaryProfileMap J i = spaceCoordinates (J i) := rfl + +private lemma directional_euclidean_chart {F : RField 4} (hF : ContDiff ℝ ∞ F) + (v : JetPolynomial.Base) : + PeriodicExpansion.directionalMap (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) v = + fun q => JetVelocityCoordinates.toEuclidean (SmallModes.coordDeriv (baseEquiv v) F (baseEquiv q)) := by + funext q + change fderiv ℝ ((JetVelocityCoordinates.toEuclidean ∘ F) ∘ baseEquiv) q v = _ + rw [fderiv_comp q ((JetVelocityCoordinates.toEuclidean.contDiff.comp hF).differentiable (by simp) _) + baseEquiv.differentiableAt,ContinuousLinearMap.comp_apply,baseEquiv.fderiv] + rw [fderiv_comp (baseEquiv q) JetVelocityCoordinates.toEuclidean.differentiableAt + (hF.differentiable (by simp) _),ContinuousLinearMap.comp_apply,JetVelocityCoordinates.toEuclidean.fderiv] + rfl + +lemma boundaryProfileMap_chart {F : RField 4} (hF : ContDiff ℝ ∞ F) + (z : ℝ) (p : JetPolynomial.Base) : + boundaryProfileMap (primitiveJetProfile (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) z p) = + realBoundaryProfile F z (baseEquiv p) := by + have hfirst (v : JetPolynomial.Base) := directional_euclidean_chart hF v + have hsecond (v w : JetPolynomial.Base) : + PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) v) w = + fun q => JetVelocityCoordinates.toEuclidean (SmallModes.coordDeriv (baseEquiv w) + (SmallModes.coordDeriv (baseEquiv v) F) (baseEquiv q)) := by + rw [hfirst] + exact directional_euclidean_chart (contDiff_real_coordDeriv hF _) w + funext j + fin_cases j + · change spaceCoordinates (PeriodicExpansion.directionalMap _ (JetPolynomial.coordinateVector 0) p) = _ + rw [hfirst] + simp only [baseEquiv_zero,JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + rfl + · change spaceCoordinates (PeriodicExpansion.directionalMap _ (JetPolynomial.coordinateVector 1) p) = _ + rw [hfirst] + simp only [baseEquiv_one,JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + rfl + · change spaceCoordinates (PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap _ (JetPolynomial.coordinateVector 1)) + (JetPolynomial.coordinateVector 1) p) = _ + rw [hsecond] + simp only [baseEquiv_one,JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + rfl + · change spaceCoordinates (PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap _ (JetPolynomial.coordinateVector 0)) + (JetPolynomial.coordinateVector 1) p) = _ + rw [hsecond] + simp only [baseEquiv_zero,baseEquiv_one,JetVelocityCoordinates.toEuclidean, + ContinuousLinearEquiv.apply_symm_apply] + exact real_second_coordDeriv_comm hF (baseEquiv p) SmallModes.dy SmallModes.dx + · change spaceCoordinates (z • PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap _ (JetPolynomial.coordinateVector 0)) + (JetPolynomial.coordinateVector 0) p) = _ + rw [hsecond,map_smul] + simp only [baseEquiv_zero,JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + rfl + +/-- Transfer the exact primitive's Euclidean error directly into the normal +frame and all four second-form coefficients. -/ +theorem compact_euclidean_boundary_stability {K : Set EuclideanBoundaryProfile} + (hK : IsCompact K) (hregular : ∀ J ∈ K, boundaryProfileMap J ∈ regularBoundaryProfiles) : + ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ + ∀ J ∈ K, ∀ H : EuclideanBoundaryProfile, ‖H-J‖ ≤ δ → + boundaryProfileMap H ∈ regularBoundaryProfiles ∧ + ‖profileGeometry (boundaryProfileMap H)-profileGeometry (boundaryProfileMap J)‖ < ε := by + intro ε hε + obtain ⟨r,hr,hclose⟩ := compact_boundary_profile_stability + (hK.image boundaryProfileMap.continuous) + (by rintro _ ⟨J,hJ,rfl⟩; exact hregular J hJ) ε hε + let C := ‖boundaryProfileMap‖ + have hC : 0 ≤ C := norm_nonneg _ + refine ⟨r/(2*(C+1)),div_pos hr (by positivity),?_⟩ + intro J hJ H hHJ + apply hclose (boundaryProfileMap J) (mem_image_of_mem boundaryProfileMap hJ) + rw [← map_sub] + calc + ‖boundaryProfileMap (H-J)‖ ≤ C*‖H-J‖ := boundaryProfileMap.le_opNorm _ + _ ≤ C*(r/(2*(C+1))) := mul_le_mul_of_nonneg_left hHJ hC + _ < r := by + have hp : 0 < 2*(C+1) := by positivity + rw [← mul_div_assoc] + apply (div_lt_iff₀ hp).mpr + nlinarith + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..e95acdf1fe7a4b31133d380c3ac8ae2b369eac80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileFrame.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileGeometry + +namespace OAI + +/-! Identification of the five-profile coefficient map with the genuine +second fundamental form of a smooth immersion. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def realBoundaryProfile (F : RField 4) (z : ℝ) (p : Base) : BoundaryProfile := + ![coordDeriv dx F p,coordDeriv dy F p,coordDeriv dy (coordDeriv dy F) p, + coordDeriv dx (coordDeriv dy F) p,z • coordDeriv dx (coordDeriv dx F) p] + +lemma realNormalPart_dot_of_normal (X Y W n : Vec) + (hX : X ⬝ᵥ n = 0) (hY : Y ⬝ᵥ n = 0) : + realNormalPart X Y W ⬝ᵥ n = W ⬝ᵥ n := by + simp only [realNormalPart,sub_dotProduct,smul_dotProduct,hX,hY, + smul_eq_mul,mul_zero,sub_zero] + +lemma realBoundaryProfile_regular {F : RField 4} {p : Base} (z : ℝ) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : realSecondForm F dy dy p ≠ 0) : + realBoundaryProfile F z p ∈ regularBoundaryProfiles := by + exact ⟨hD,hB⟩ + +/-- The scaled longitudinal coefficient is read from `z Fxx`, so this +identification is uniform even when `Fxx` itself diverges. -/ +theorem exists_profile_secondFormFrame {F : RField 4} (hF : ContDiff ℝ ∞ F) + (z : ℝ) (p : Base) (hJ : realBoundaryProfile F z p ∈ regularBoundaryProfiles) : + ∃ d : SecondFormFrame F p + (coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p), + d.n = profilePreferred (realBoundaryProfile F z p) ∧ + d.m = profileComplement (realBoundaryProfile F z p) ∧ + profileCoefficients (realBoundaryProfile F z p) = ![d.S,d.D,d.N,z*d.L] := by + obtain ⟨d,hn,hm,hS,hD,hN,hL⟩ := exists_secondFormFrame_with_coordinates hF p hJ.1 hJ.2 + have hn' : d.n = profilePreferred (realBoundaryProfile F z p) := hn + have hm' : d.m = profileComplement (realBoundaryProfile F z p) := by + simpa only [profileComplement,realBoundaryProfile,Matrix.cons_val_zero, + Matrix.cons_val_one,hn'] using hm + refine ⟨d,hn',hm',?_⟩ + have hdn := realNormalPart_dot_of_normal (coordDeriv dx F p) (coordDeriv dy F p) + (coordDeriv dx (coordDeriv dy F) p) d.n d.tangent_n.1 d.tangent_n.2 + have hnm := realNormalPart_dot_of_normal (coordDeriv dx F p) (coordDeriv dy F p) + (coordDeriv dx (coordDeriv dy F) p) d.m d.tangent_m.1 d.tangent_m.2 + have hlm := realNormalPart_dot_of_normal (coordDeriv dx F p) (coordDeriv dy F p) + (coordDeriv dx (coordDeriv dx F) p) d.m d.tangent_m.1 d.tangent_m.2 + ext j + fin_cases j + · exact hS.symm + · change coordDeriv dx (coordDeriv dy F) p ⬝ᵥ + profilePreferred (realBoundaryProfile F z p) = d.D + rw [← hn',hD] + exact hdn.symm + · change coordDeriv dx (coordDeriv dy F) p ⬝ᵥ + profileComplement (realBoundaryProfile F z p) = d.N + rw [← hm',hN] + exact hnm.symm + · change (z • coordDeriv dx (coordDeriv dx F) p) ⬝ᵥ + profileComplement (realBoundaryProfile F z p) = z*d.L + rw [← hm',hL,smul_dotProduct] + exact congrArg (fun a => z*a) hlm.symm + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e5850d093b3b05d92fac8a1589d9beeffb29bfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileGeometry.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactNormalTriple +import OAI.Geometry.SurfaceImmersion.Geometry.ActualSecondFormFrame + +namespace OAI + +/-! Normal frames and scaled second-form coefficients are smooth functions of +exactly the five derivative components retained by the primitive construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame RealModes VelocityFrame + +abbrev BoundaryProfile := Fin 5 → Vec + +def profileNormalPart (J : BoundaryProfile) : Vec := + realNormalPart (J 0) (J 1) (J 2) + +def profilePreferred (J : BoundaryProfile) : Vec := + VelocityFrame.normalize (profileNormalPart J) + +def profileComplement (J : BoundaryProfile) : Vec := + unitPerp (J 0) (J 1) (profilePreferred J) + +def regularBoundaryProfiles : Set BoundaryProfile := + {J | gramDet (J 0) (J 1) ≠ 0 ∧ profileNormalPart J ≠ 0} + +/-- The coordinates are `S`, `D`, `N`, and `z L`. The xx entry in the input +has already been multiplied by the fast scale. -/ +def profileCoefficients (J : BoundaryProfile) : Fin 4 → ℝ := + ![Real.sqrt (profileNormalPart J ⬝ᵥ profileNormalPart J), + J 3 ⬝ᵥ profilePreferred J, J 3 ⬝ᵥ profileComplement J, + J 4 ⬝ᵥ profileComplement J] + +def profileGeometry (J : BoundaryProfile) : (Vec × Vec) × (Fin 4 → ℝ) := + ((profilePreferred J,profileComplement J),profileCoefficients J) + +lemma contDiffAt_profileNormalPart {J : BoundaryProfile} + (hJ : gramDet (J 0) (J 1) ≠ 0) : ContDiffAt ℝ ∞ profileNormalPart J := by + exact contDiffAt_realNormalPart + (ContinuousLinearMap.proj 0 : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt + (ContinuousLinearMap.proj 1 : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt + (ContinuousLinearMap.proj 2 : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt hJ + +lemma contDiffAt_profilePreferred {J : BoundaryProfile} + (hJ : J ∈ regularBoundaryProfiles) : ContDiffAt ℝ ∞ profilePreferred J := + normalize_smoothAt (contDiffAt_profileNormalPart hJ.1) hJ.2 + +lemma contDiffAt_profileComplement {J : BoundaryProfile} + (hJ : J ∈ regularBoundaryProfiles) : ContDiffAt ℝ ∞ profileComplement J := by + have hn := realNormalPart_perp (J 0) (J 1) (J 2) hJ.1 + exact contDiffAt_unitPerp + (ContinuousLinearMap.proj 0 : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt + (ContinuousLinearMap.proj 1 : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt + (contDiffAt_profilePreferred hJ) hJ.1 (normalize_nonzero hJ.2) + (dot_normalize_zero hn.1) (dot_normalize_zero hn.2) + +lemma isOpen_regularBoundaryProfiles : IsOpen regularBoundaryProfiles := by + apply isOpen_iff_mem_nhds.mpr + intro J hJ + have hd : Continuous (fun K : BoundaryProfile => gramDet (K 0) (K 1)) := by + unfold gramDet dotProduct + fun_prop + exact (hd.continuousAt.eventually_ne hJ.1).and + ((contDiffAt_profileNormalPart hJ.1).continuousAt.eventually_ne hJ.2) + +lemma contDiffAt_profileCoefficients {J : BoundaryProfile} + (hJ : J ∈ regularBoundaryProfiles) : ContDiffAt ℝ ∞ profileCoefficients J := by + have hslot (i : Fin 5) : ContDiffAt ℝ ∞ (fun K : BoundaryProfile => K i) J := + (ContinuousLinearMap.proj i : BoundaryProfile →L[ℝ] Vec).contDiff.contDiffAt + have hdot {f g : BoundaryProfile → Vec} + (hf : ContDiffAt ℝ ∞ f J) (hg : ContDiffAt ℝ ∞ g J) : + ContDiffAt ℝ ∞ (fun K => f K ⬝ᵥ g K) J := + ContDiffAt.sum (fun i _ => (contDiffAt_pi.mp hf i).mul (contDiffAt_pi.mp hg i)) + apply contDiffAt_pi.mpr + intro i + fin_cases i + · exact (hdot (contDiffAt_profileNormalPart hJ.1) + (contDiffAt_profileNormalPart hJ.1)).sqrt (dot_self_pos hJ.2).ne' + · exact hdot (hslot 3) (contDiffAt_profilePreferred hJ) + · exact hdot (hslot 3) (contDiffAt_profileComplement hJ) + · exact hdot (hslot 4) (contDiffAt_profileComplement hJ) + +lemma contDiffAt_profileGeometry {J : BoundaryProfile} + (hJ : J ∈ regularBoundaryProfiles) : ContDiffAt ℝ ∞ profileGeometry J := + ((contDiffAt_profilePreferred hJ).prodMk (contDiffAt_profileComplement hJ)).prodMk + (contDiffAt_profileCoefficients hJ) + +/-- Uniformly transfer all five derivative estimates to the actual normal +frame and its scaled coefficients on a compact family of regular profiles. -/ +theorem compact_boundary_profile_stability {K : Set BoundaryProfile} + (hK : IsCompact K) (hregular : K ⊆ regularBoundaryProfiles) : + ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ ∀ J ∈ K, ∀ H : BoundaryProfile, + ‖H-J‖ < δ → H ∈ regularBoundaryProfiles ∧ + ‖profileGeometry H-profileGeometry J‖ < ε := by + obtain ⟨r,hr,hsub⟩ := hK.exists_cthickening_subset_open + isOpen_regularBoundaryProfiles hregular + have hc : ContinuousOn profileGeometry (Metric.cthickening r K) := + fun J hJ => (contDiffAt_profileGeometry (hsub hJ)).continuousAt.continuousWithinAt + have hu := hK.cthickening.uniformContinuousOn_of_continuous hc + intro ε hε + obtain ⟨d,hd,hclose⟩ := Metric.uniformContinuousOn_iff.mp hu ε hε + refine ⟨min r d,lt_min hr hd,?_⟩ + intro J hJ H hHJ + have hH : H ∈ Metric.cthickening r K := + Metric.thickening_subset_cthickening r K + (Metric.mem_thickening_iff.mpr ⟨J,hJ,by + simpa only [dist_eq_norm] using hHJ.trans_le (min_le_left r d)⟩) + refine ⟨hsub hH,?_⟩ + have hJ' : J ∈ Metric.cthickening r K := Metric.self_subset_cthickening K hJ + simpa only [dist_eq_norm] using hclose H hH J hJ' + (by simpa only [dist_eq_norm] using hHJ.trans_le (min_le_right r d)) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..093a497d64986e0df58d0455fd01bf33b16d5d0f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundaryProfileNormal.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalGeometry + +namespace OAI + +/-! The preferred and complementary normals of a regular five-profile. -/ +noncomputable section +open scoped Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame RealModes VelocityFrame + +lemma profilePreferred_unit {J : BoundaryProfile} (hJ : J ∈ regularBoundaryProfiles) : + profilePreferred J ⬝ᵥ profilePreferred J = 1 := normalize_unit hJ.2 + +lemma profilePreferred_perp {J : BoundaryProfile} (hJ : J ∈ regularBoundaryProfiles) : + J 0 ⬝ᵥ profilePreferred J = 0 ∧ J 1 ⬝ᵥ profilePreferred J = 0 := by + have hh := realNormalPart_perp (J 0) (J 1) (J 2) hJ.1 + exact ⟨dot_normalize_zero hh.1,dot_normalize_zero hh.2⟩ + +lemma profileComplement_unit {J : BoundaryProfile} (hJ : J ∈ regularBoundaryProfiles) : + profileComplement J ⬝ᵥ profileComplement J = 1 := + unitPerp_unit hJ.1 (normalize_nonzero hJ.2) + (profilePreferred_perp hJ).1 (profilePreferred_perp hJ).2 + +lemma profileComplement_perp (J : BoundaryProfile) : + J 0 ⬝ᵥ profileComplement J = 0 ∧ J 1 ⬝ᵥ profileComplement J = 0 ∧ + profilePreferred J ⬝ᵥ profileComplement J = 0 := unitPerp_orthogonal _ _ _ + +/-- Every unit normal orthogonal to the preferred normal reads the same +absolute complementary coefficient, regardless of the orientation choice. -/ +lemma profileComplement_abs_dot {J : BoundaryProfile} (hJ : J ∈ regularBoundaryProfiles) + {u : Vec} (hu : u ⬝ᵥ u = 1) (hXu : J 0 ⬝ᵥ u = 0) (hYu : J 1 ⬝ᵥ u = 0) + (hnu : profilePreferred J ⬝ᵥ u = 0) (W : Vec) : + |W ⬝ᵥ profileComplement J| = |W ⬝ᵥ u| := by + have hp := profilePreferred_perp hJ + have hm := profileComplement_perp J + have hr := plane_coordinates_reconstruct hJ.1 (profilePreferred_unit hJ) + (profileComplement_unit hJ) hm.2.2 hp.1 hm.1 hp.2 hm.2.1 hXu hYu + have he : (u ⬝ᵥ profileComplement J) • profileComplement J = u := by + simpa only [planeLift_apply,planeCoordinates,Matrix.cons_val_zero,Matrix.cons_val_one, + dotProduct_comm u (profilePreferred J),hnu,zero_smul,zero_add] using hr + have hl := plane_coordinates_length hJ.1 (profilePreferred_unit hJ) + (profileComplement_unit hJ) hm.2.2 hp.1 hm.1 hp.2 hm.2.1 hXu hYu + have hs : (u ⬝ᵥ profileComplement J)^2 = 1 := by + simpa only [dotProduct_comm u (profilePreferred J),hnu,zero_pow (by decide : 2 ≠ 0), + zero_add,hu] using hl + have ha : |u ⬝ᵥ profileComplement J| = 1 := by + nlinarith [sq_abs (u ⬝ᵥ profileComplement J),abs_nonneg (u ⬝ᵥ profileComplement J)] + calc + |W ⬝ᵥ profileComplement J| = |u ⬝ᵥ profileComplement J| * |W ⬝ᵥ profileComplement J| := by rw [ha,one_mul] + _ = |W ⬝ᵥ ((u ⬝ᵥ profileComplement J) • profileComplement J)| := by + rw [dotProduct_smul,smul_eq_mul,abs_mul] + _ = |W ⬝ᵥ u| := by rw [he] + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundedPrimitiveAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundedPrimitiveAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..00789d1819519e196f75db1e52464ccb93fe4a4c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/BoundedPrimitiveAmplitude.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeParameterBounds + +namespace OAI + +/-! Uniform inverse and amplitude bounds from the fixed reference size and +positive coefficient margin. Inactive chart coefficients need not vary continuously. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance boundedAmplitudeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance boundedAmplitudeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance boundedAmplitudeDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance boundedAmplitudeDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance boundedAmplitudeGroup : AddCommGroup TensorFiber := boundedAmplitudeFiberNormed.toAddCommGroup +local instance boundedAmplitudeComplete : CompleteSpace TensorFiber := inferInstance +local instance boundedFiberFinite : FiniteDimensional ℝ TensorFiber := inferInstance +local instance boundedDualFinite : FiniteDimensional ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance boundedCovectorFinite : FiniteDimensional ℝ (Plane →L[ℝ] ℝ) := inferInstance +variable {ι : Type*} [Fintype ι] +local instance boundedDualFamilyFinite : FiniteDimensional ℝ (ι → TensorFiber →L[ℝ] ℝ) := inferInstance +local instance boundedCovectorFamilyFinite : FiniteDimensional ℝ (ι → Plane →L[ℝ] ℝ) := inferInstance +local instance boundedOperatorDataFinite : FiniteDimensional ℝ (PrimitiveOperatorData ι) := inferInstance +local instance boundedDataFinite : FiniteDimensional ℝ (PrimitiveAmplitudeData ι) := inferInstance +local instance boundedDataProper : ProperSpace (PrimitiveAmplitudeData ι) := + FiniteDimensional.proper ℝ (PrimitiveAmplitudeData ι) +local instance boundedDataNormed : NormedAddCommGroup (PrimitiveAmplitudeData ι) := inferInstance +local instance boundedDataSpace : NormedSpace ℝ (PrimitiveAmplitudeData ι) := inferInstance + +def boundedPrimitiveReference (i : ι) (D k : ℝ) : Set (PrimitiveAmplitudeData ι) := + {z | ‖z‖ ≤ D ∧ primitiveDataOperator z.1 = ContinuousLinearMap.id ℝ TensorFiber ∧ + k ≤ z.1.1.1 i z.2} + +lemma boundedPrimitiveReference_compact (i : ι) (D k : ℝ) : + IsCompact (boundedPrimitiveReference i D k) := by + have hq : Continuous (fun z : PrimitiveAmplitudeData ι => z.1.1.1 i z.2) := by + have h : Continuous (fun z : PrimitiveAmplitudeData ι => z.1.1.1 i) := by fun_prop + exact h.clm_apply continuous_snd + have hclosed : IsClosed (boundedPrimitiveReference i D k) := + (isClosed_le continuous_norm continuous_const).inter + ((isClosed_eq (primitiveDataOperator_smooth.continuous.comp continuous_fst) continuous_const).inter + (isClosed_le continuous_const hq)) + exact (isCompact_closedBall (0 : PrimitiveAmplitudeData ι) D).of_isClosed_subset + hclosed (fun z hz => by simpa only [Metric.mem_closedBall,dist_zero_right] using hz.1) + +lemma boundedPrimitiveReference_good (i : ι) (D : ℝ) {k : ℝ} (hk : 0 < k) + {z : PrimitiveAmplitudeData ι} (hz : z ∈ boundedPrimitiveReference i D k) : + (primitiveDataOperator z.1).IsInvertible ∧ 0 < primitiveParameterCoefficient i z := by + change (primitiveDataOperator z.1).IsInvertible ∧ + 0 < z.1.1.1 i ((primitiveDataOperator z.1).inverse z.2) + rw [hz.2.1,ContinuousLinearMap.inverse_id,ContinuousLinearMap.id_apply] + exact ⟨⟨ContinuousLinearEquiv.refl ℝ TensorFiber,rfl⟩,hk.trans_le hz.2.2⟩ + +theorem bounded_primitive_amplitude_C1 (i : ι) (D : ℝ) {k : ℝ} (hk : 0 < k) : + ∃ eps C : ℝ, 0 < eps ∧ 1 ≤ C ∧ + ∀ z : PrimitiveAmplitudeData ι, ‖z‖ ≤ D → + primitiveDataOperator z.1 = ContinuousLinearMap.id ℝ TensorFiber → + k ≤ z.1.1.1 i z.2 → ∀ z' : PrimitiveAmplitudeData ι, ‖z'-z‖ < eps → + (primitiveDataOperator z'.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient i z' ∧ + ‖primitiveParameterInverse z'‖ ≤ C ∧ + ‖fderiv ℝ primitiveParameterInverse z'‖ ≤ C ∧ + |primitiveParameterAmplitude i z'| ≤ C ∧ + ‖fderiv ℝ (primitiveParameterAmplitude i) z'‖ ≤ C := by + obtain ⟨eps,C,heps,hC,hbound⟩ := compact_primitive_amplitude_C1 i + (boundedPrimitiveReference_compact i D k) + (fun _ hz => boundedPrimitiveReference_good i D hk hz) + exact ⟨eps,C,heps,hC,fun z hn hi hp z' hd => hbound z ⟨hn,hi,hp⟩ z' hd⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedControlledAngle.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedControlledAngle.lean new file mode 100644 index 0000000000000000000000000000000000000000..9086c68c28526f5b132483bcfbd2b38436e82a8e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedControlledAngle.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CalibratedCollarData +import OAI.Geometry.SurfaceImmersion.Whitney.ControlledCollarLoop + +namespace OAI + +/-! The controlled angle from geometric scalar coordinates. The collar, +amplitude, transition, small translation and density are all constructed. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open TransverseSmallFunction + +theorem calibrated_controlled_angle {C K L U Ω P : Set Base} + (hC : IsCompact C) (hK : IsCompact K) (hL : IsCompact L) + (hCL : C ⊆ L) (hKL : K ⊆ L) (hKU : Disjoint K (closure U)) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {R u v a : Base → ℝ} (hR : ContDiffOn ℝ ∞ R Ω) + (hu : ContDiffOn ℝ ∞ u Ω) (hv : ContDiffOn ℝ ∞ v Ω) + (ha : ContDiffOn ℝ ∞ a Ω) + (hRp : ∀ x ∈ Ω, 0 < R x) + (hquad : ∀ x ∈ Ω, R x ^ 2 = u x ^ 2 + v x ^ 2 + a x ^ 2) + (hup : ∀ x ∈ U, 0 < u x) (hvz : ∀ x ∈ U, v x = 0) + (hap : ∀ x ∈ L \ C, 0 < a x) (T : ℝ) : + ∃ Z : Set Base, IsOpen Z ∧ L ⊆ Z ∧ Z ⊆ Ω ∧ + ∃ α : Base × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ x ∈ Z, Function.Periodic (fun t => α (x, t)) 1) ∧ + (∀ x ∈ Z, (∫ t in 0..1, ![Real.cos (α (x, t)), Real.sin (α (x, t))]) = + ![u x / R x, v x / R x]) ∧ + (∃ W : Set Base, IsOpen W ∧ C ⊆ W ∧ W ⊆ U ∧ + ∀ x ∈ W, a x = 0 → ∀ t, α (x, t) = 0) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (x, t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, T < fderiv ℝ (fun y => α (y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => α (y, τ x)) x (0, 1) := by + obtain ⟨c, hc, V₀, hV₀, hLV₀, hV₀Ω, hcL, W, hW, hCW, hWU, b, s, hb, hs, _, hbp, hw, hshape⟩ := + calibrated_collar_data hC hL hCL hU hΩ hCU hUΩ hLΩ hR hu hv ha hRp hquad hup hvz hap + let O := Ω \ closure W + have hO : IsOpen O := hΩ.sdiff isClosed_closure + have hKO : K ⊆ O := by + intro x hx + exact ⟨hLΩ (hKL hx), fun hxw => Set.disjoint_left.mp hKU hx (closure_mono hWU hxw)⟩ + have hOW : Disjoint O W := by + apply Set.disjoint_left.mpr + exact fun _ hx hw' => hx.2 (subset_closure hw') + have hpos : ∀ x ∈ K, 0 < b x := by + intro x hx + exact hbp x ⟨hKL hx, fun hw' => Set.disjoint_left.mp hOW (hKO hx) hw'⟩ + obtain ⟨h, hh, _, hhs, _, V, hV, hLV, ρ, hρ, _, _, _, _, hα, hper, hmean, + hturn, hlarge⟩ := controlled_collar_loop hK hL hKL hO hKO hOW hW hC.isClosed hCW + hP hPK hlocal hb (a := b) (A := fun _ => Real.pi + 1) contDiff_const hs hc hpos + (fun x hx => ⟨(hw x hx).2.1, (hw x hx).2.2⟩) hshape T (by norm_num : (0 : ℝ) < 1) + let α := normalizedAngle ρ b (fun _ => Real.pi + 1) s h + have hz (x : Base) (hx : x ∈ W) : h x = 0 := by + by_contra hn + exact Set.disjoint_left.mp hOW + (hhs (subset_tsupport h (Function.mem_support.mpr hn))) hx + refine ⟨V ∩ V₀, hV.inter hV₀, subset_inter hLV hLV₀, inter_subset_right.trans hV₀Ω, + α, hα.mono (prod_mono inter_subset_left (Subset.rfl)), ?_, ?_, ?_, + (fun x => PositiveDensity.clock ρ x (1 / 2)), hturn, hlarge⟩ + · exact fun x hx => hper x hx.1 + · intro x hx + exact (hmean x hx.1).trans (hcL x hx.2) + · refine ⟨W, hW, hCW, hWU, ?_⟩ + intro x hx haz t + have hbz : b x = 0 := by rw [(hw x hx).1]; simp [amplitude, haz] + simp [α, normalizedAngle, PositiveDensity.reparametrize, unitAngle, + blendedAngle, baseAngle, hbz, (hw x hx).2.1, hz x hx] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedJetAngle.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedJetAngle.lean new file mode 100644 index 0000000000000000000000000000000000000000..131056911f546d6fb58b0b5b02cd5a12960928e0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CalibratedJetAngle.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CalibratedCollarData +import OAI.Geometry.SurfaceImmersion.Primitive.JetVelocityLoop + +namespace OAI + +/-! Calibrate the controlled angle on a neighborhood of the actual second +jets, retaining the prescribed spatial derivatives on the original surface. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open RealModes TransverseSmallFunction + +theorem calibrated_jet_angle {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K O P : Set Base} {C L U Ω : Set JetBase} + (hK : IsCompact K) (hC : IsCompact C) (hL : IsCompact L) + (hCL : C ⊆ L) (hKL : MapsTo (jetSection F) K L) + (hO : IsOpen O) (hKO : K ⊆ O) (hOU : ∀ j ∈ U, j.1 ∉ O) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {R u v a : JetBase → ℝ} (hR : ContDiffOn ℝ ∞ R Ω) + (hu : ContDiffOn ℝ ∞ u Ω) (hv : ContDiffOn ℝ ∞ v Ω) + (ha : ContDiffOn ℝ ∞ a Ω) (hRp : ∀ j ∈ Ω, 0 < R j) + (hquad : ∀ j ∈ Ω, R j ^ 2 = u j ^ 2 + v j ^ 2 + a j ^ 2) + (hup : ∀ j ∈ U, 0 < u j) (hvz : ∀ j ∈ U, v j = 0) + (hap : ∀ j ∈ L \ C, 0 < a j) (T : ℝ) : + ∃ Z : Set JetBase, IsOpen Z ∧ L ⊆ Z ∧ Z ⊆ Ω ∧ + ∃ α : JetBase × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j, t)) 1) ∧ + (∀ j ∈ Z, (∫ t in 0..1, ![Real.cos (α (j, t)), Real.sin (α (j, t))]) = + ![u j / R j, v j / R j]) ∧ + (∃ W : Set JetBase, IsOpen W ∧ C ⊆ W ∧ W ⊆ U ∧ + ∀ j ∈ W, a j = 0 → ∀ t, α (j, t) = 0) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (jetSection F x, t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + T < fderiv ℝ (fun y => α (jetSection F y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => α (jetSection F y, τ x)) x (0, 1) := by + obtain ⟨c, hc, V₀, hV₀, hLV₀, hV₀Ω, hcL, W, hW, hCW, hWU, b, s, hb, hs, + _, hbp, hw, hshape⟩ := calibrated_collar_data hC hL hCL hU hΩ hCU hUΩ hLΩ + hR hu hv ha hRp hquad hup hvz hap + have hOW : ∀ j ∈ W, j.1 ∉ O := fun j hj => hOU j (hWU hj) + have hbK : ∀ x ∈ K, 0 < b (jetSection F x) := by + intro x hx + exact hbp _ ⟨hKL hx, fun hj => hOW _ hj (hKO hx)⟩ + obtain ⟨h, _, _, hhs, _, V, hV, hLV, ρ, _, _, _, _, _, hα, hper, hmean, + hturn, hlarge⟩ := controlled_jet_loop hF hK hL hKL hO hKO hOW hW hC.isClosed hCW + hP hPK hlocal hb (A := fun _ => Real.pi + 1) contDiff_const hs hc hbK + (fun j hj => ⟨(hw j hj).2.1, (hw j hj).2.2⟩) hshape T (by norm_num : (0 : ℝ) < 1) + let α := jetAngle ρ b (fun _ => Real.pi + 1) s (fun j => h j.1) + have hz (j : JetBase) (hj : j ∈ W) : h j.1 = 0 := by + by_contra hn + exact hOW j hj (hhs (subset_tsupport h (Function.mem_support.mpr hn))) + refine ⟨V ∩ V₀, hV.inter hV₀, subset_inter hLV hLV₀, + inter_subset_right.trans hV₀Ω, α, + hα.mono (prod_mono inter_subset_left (Subset.rfl)), ?_, ?_, ?_, + (fun x => PositiveDensity.clock ρ (jetSection F x) (1 / 2)), hturn, hlarge⟩ + · exact fun j hj => hper j hj.1 + · intro j hj + exact (hmean j hj.1).trans (hcL j hj.2) + · refine ⟨W, hW, hCW, hWU, ?_⟩ + intro j hj haz t + have hbz : b j = 0 := by rw [(hw j hj).1]; simp [amplitude, haz] + simp [α, jetAngle, PositiveDensity.reparametrize, unitAngle, + blendedAngle, baseAngle, hbz, (hw j hj).2.1, hz j hj] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CenteredAtlasPrimitives.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CenteredAtlasPrimitives.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e7b4658324b311a158b27964c07fa18561a8cfa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CenteredAtlasPrimitives.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredConvexPhase +import OAI.Geometry.SurfaceImmersion.Primitive.CurvedAtlasPrimitives + +namespace OAI + +/-! Concrete finite primitive data from the centered convex phases. The +coefficient maps are the actual inverses of their three gradient squares. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance centeredPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance centeredPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance centeredPrimitiveDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance centeredPrimitiveDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance centeredPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance centeredPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def centeredPhaseFamily (ell : A.centers → Fin 3 → SmallModes.Base) + (L : A.centers → ℝ) (i : A.centers) (j : Fin 3) : SmallModes.Base → ℝ := + centeredConvexPhase (ell i j) (L i) (coordinateChart (i : M) (i : M)) + +def centeredAtlasBasis (P : A.centers → PhaseBasis) + (ell : A.centers → Fin 3 → SmallModes.Base) (L : A.centers → ℝ) + (i : A.centers) (y : JetPolynomial.Base) : PhaseBasis := + centeredSpatialBasis (P i) (ell i) (L i) (coordinateChart (i : M) (i : M)) + (JetPolynomial.planeCoordinateIsometry y) + +variable [CompactSpace M] + +/-- Fixed compact cone and connection data select the phase parameters before +the linear perturbations and target. A subordinate circular atlas then gives +actual smooth supported amplitudes and an exact global primitive sum. -/ +theorem compact_centered_atlas_primitives + (P : A.centers → PhaseBasis) + (T : A.centers → Set PhaseMean.Tensor) + (hT : ∀ i, IsCompact (T i)) + (hTpos : ∀ i H, H ∈ T i → ∀ j, 0 < (P i).Q j H) + (J : A.centers → Set MetricFirstJet) + (hJ : ∀ i, IsCompact (J i)) + (hdet : ∀ i t, t ∈ J i → metricJetDet t ≠ 0) + (hw : ∀ i p, 0 ≤ A.weight i p) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ L r eps : A.centers → ℝ, + (∀ i, 0 < L i ∧ 0 < r i ∧ 0 < eps i) ∧ + ∀ ell : A.centers → Fin 3 → SmallModes.Base, + (∀ i, ‖ell i-(P i).ξ‖ < eps i) → + (∀ i p, p ∈ tsupport (A.weight i) → + ‖coordinateChart (i : M) p-coordinateChart (i : M) (i : M)‖ ≤ r i) → + ∀ u : ∀ p : M, CovariantTwoTensor p, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + (∀ p v w, u p v w = u p w v) → + (∀ i p, p ∈ tsupport (A.weight i) → + A.tensorChartRead i u (chart (i : M) p) ∈ T i) → + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ + (A.curvedPrimitiveAmplitude (A.centeredAtlasBasis P ell L) u a)) ∧ + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ + (A.curvedAtlasPhase (A.centeredPhaseFamily ell L) a)) ∧ + (∀ a, tsupport (A.curvedPrimitiveAmplitude (A.centeredAtlasBasis P ell L) u a) = + tsupport (A.weight a.1)) ∧ + (∀ p, (∑ a : A.centers × Fin 3, + A.curvedPrimitiveTensor (A.centeredAtlasBasis P ell L) u a p) = u p) ∧ + (∀ a p (v w : TangentSpace planeModel p), + A.curvedPrimitiveTensor (A.centeredAtlasBasis P ell L) u a p v w = + (A.curvedPrimitiveAmplitude (A.centeredAtlasBasis P ell L) u a p)^2 * + (show ℝ from mfderiv planeModel 𝓘(ℝ) + (A.curvedAtlasPhase (A.centeredPhaseFamily ell L) a) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) + (A.curvedAtlasPhase (A.centeredPhaseFamily ell L) a) p w)) := by + choose L r eps hL hr heps hall using fun i => + compact_centered_spatial_basis (P i) (hT i) (hTpos i) (hJ i) (hdet i) + refine ⟨L,r,eps,fun i => ⟨hL i,hr i,heps i⟩,?_⟩ + intro ell hell hsmall u hu hsymm hvalues + have hb (i : A.centers) (p : M) (hp : p ∈ tsupport (A.weight i)) := + hall i (ell i) (hell i) (coordinateChart (i : M) (i : M)) + (coordinateChart (i : M) p) (hsmall i p hp) + have hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (A.centeredAtlasBasis P ell L i (chart (i : M) p)).Q j + (A.tensorChartRead i u (chart (i : M) p)) := by + intro i j p hp + exact (hb i p hp).2.1 _ (hvalues i p hp) j + have hQ : ∀ i j p, p ∈ tsupport (A.weight i) → + ContDiffAt ℝ ∞ (fun y => (A.centeredAtlasBasis P ell L i y).Q j) + (chart (i : M) p) := by + intro i j p hp + exact ((hb i p hp).2.2.1 j).comp (chart (i : M) p) + JetPolynomial.planeCoordinateIsometry.contDiff.contDiffAt + have hphi : ∀ i j, ContDiff ℝ ∞ (A.centeredPhaseFamily ell L i j) := + fun i j => centeredConvexPhase_smooth _ _ _ + have hfit : ∀ i j p, p ∈ tsupport (A.weight i) → + (A.centeredAtlasBasis P ell L i (chart (i : M) p)).ξ j = + phaseDerivative (A.centeredPhaseFamily ell L i j) (coordinateChart (i : M) p) := by + intro i j p hp + exact congrFun (hb i p hp).1 j + refine ⟨fun a => A.curvedPrimitiveAmplitude_smooth _ u hu hQ hpos a, + fun a => A.curvedAtlasPhase_smooth _ hphi a,?_, + A.sum_curvedPrimitiveTensor _ u hsymm (fun i j p hp => (hpos i j p hp).le), + A.curvedPrimitiveTensor_apply _ u _ hphi houter hfit⟩ + intro a + change closure (Function.support _) = closure (Function.support _) + congr 1 + ext p + change A.curvedPrimitiveAmplitude (A.centeredAtlasBasis P ell L) u a p ≠ 0 ↔ + A.weight a.1 p ≠ 0 + have ha := A.curvedPrimitiveAmplitude_nonneg (A.centeredAtlasBasis P ell L) u hw a p + constructor + · intro hn + exact ((A.curvedPrimitiveAmplitude_pos_iff _ u hpos a p).mp + (lt_of_le_of_ne ha (Ne.symm hn))).ne' + · intro hn + exact ((A.curvedPrimitiveAmplitude_pos_iff _ u hpos a p).mpr + (lt_of_le_of_ne (hw a.1 p) (Ne.symm hn))).ne' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularActualCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularActualCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..07c500e6a50faacfa9fba83c6ce6a314c9a4555b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularActualCrossings.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyProfile +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCrossing + +namespace OAI + +/-! A fixed transverse-turn threshold suffices for both ordered crossing +invariants, for every later sufficiently accurate exact realization. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes SmallModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_actual_crossings {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) (B T : ℝ) (hB : 0 ≤ B) (hT : 0 ≤ T) : + ∃ Λ : ℝ, 0 < Λ ∧ ∀ α : E × ℝ → ℝ, + ContDiffOn ℝ ∞ α (U ×ˢ univ) → + (∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, fderiv ℝ α (x,t) (0,1) = 0 → + Λ < fderiv ℝ α (x,t) (d,0)) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ p : SmallModes.Base, ‖realBoundaryProfile F z p- + circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)‖ < η → + ∀ κ : ℝ, + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + κ*gramDet (coordDeriv dx F p) (coordDeriv dy F p) → + -B ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ a b : ℝ, |a| ≤ T → |b| ≤ T → + 0 < orderedCrossing F (1,a) (1,b) p κ ∧ + 0 < orderedCrossing F (1,b) (1,a) p κ := by + let Z : Set (E × ℝ) := K ×ˢ Icc (0 : ℝ) 1 + let : CompactSpace Z := isCompact_iff_compactSpace.mp (hK.prod isCompact_Icc) + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hbounds⟩ := compact_circular_profile_threshold + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + obtain ⟨H,hH,hcross⟩ := compact_actual_profile_crossings (X := Z) + sLo sHi B D T hsLo hsHi hB hD0 hT + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH.le + refine ⟨Λ,hΛ,?_⟩ + intro α hα hturn + let J : Z → BoundaryProfile := fun z => circularFamilyProfile Q X Y C R e₁ e₂ α d z.1 + have hJ : Continuous J := by + change Continuous (Z.domRestrict (circularFamilyProfile Q X Y C R e₁ e₂ α d)) + apply ContinuousOn.domRestrict + exact (circularFamilyProfile_smoothOn hU hQ hX hY hC hR h₁ h₂ hα hD d).continuousOn.mono + (fun z hz => ⟨hKU hz.1,mem_univ _⟩) + have hdata (z : Z) : J z ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients (J z) 0 ∧ profileCoefficients (J z) 0 ≤ sHi ∧ + |profileCoefficients (J z) 1| ≤ D ∧ + (profileCoefficients (J z) 3 = 0 → H+2 < |profileCoefficients (J z) 2|) := by + let x := z.1.1 + let t := z.1.2 + have hx : x ∈ U := hKU z.2.1 + have hαat := (hα.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hx,mem_univ t⟩)).differentiableAt (by simp) + have hαslice : DifferentiableAt ℝ (fun y => α (y,t)) x := + hαat.comp x (differentiableAt_id.prodMk (differentiableAt_const t)) + have heq : J z = circularSpatialProfile Q X Y C R e₁ e₂ (fun y => α (y,t)) + (fderiv ℝ α (x,t) (0,1)) x d := + circularFamilyProfile_spatial + ((hQ.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((hR.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((h₁.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((h₂.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) hαat d + rw [heq] + obtain ⟨hreg,hlo,hhi,hd,hlarge⟩ := hprofile (fun y => α (y,t)) x z.2.1 hαslice + (fderiv ℝ α (x,t) (0,1)) + refine ⟨hreg,hlo,hhi,hd,?_⟩ + intro hzero + have hf := hframe x hx + have hβ : fderiv ℝ α (x,t) (0,1) = 0 := + (circularBoundaryProfile_turn_iff (hD x hx) (hRpos x hx).ne' + hf.1 hf.2.1 hf.2.2.1 hf.2.2.2.1 hf.2.2.2.2.2.1 hf.2.2.2.2.1 hf.2.2.2.2.2.2).mp hzero + apply hlarge + rw [fderiv_slice_first hαat] + exact hturn x z.2.1 t z.2.2 hβ + obtain ⟨η,hη,hactual⟩ := hcross J hJ (fun z => (hdata z).1) + (fun z => (hdata z).2.1) (fun z => (hdata z).2.2.1) + (fun z => (hdata z).2.2.2.1) (fun z => (hdata z).2.2.2.2) + refine ⟨η,hη,?_⟩ + intro z hz hzη x hx t ht F hF p herr κ hκ hcurv a b ha hb + exact hactual z hz hzη ⟨(x,t),hx,ht⟩ F hF p herr κ hκ hcurv a b ha hb + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryMetricStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryMetricStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..ddc79b7e1d1be60b862743fd3971b22d280aee45 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryMetricStep.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularSupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchBoundaryStep +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTargetCongruence + +namespace OAI + +/-! Exact realization of an actual circular primitive from the fixed +metric convexity estimate and preserved boundary-normal condition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +theorem realize_circular_boundary_metric + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) {r r₀ R : ℝ} (hr : 0 < r) + (hrr₀ : r^2 < r₀^2) (hrR : r < R) + (hpos : ∀ p, 0 < B.weight c.index p ↔ p ∈ circularCoordinateDisk (c.index : M) r₀) + (hreg : circularCoordinateRegion (c.index : M) r ⊆ (coordinateChart (c.index : M)).target) + (hfront : c.carrier = circularBoundary (c.index : M) r) + (hcover : ∀ x ∈ circularCoordinateRegion (c.index : M) r, baseEquiv.symm x ∈ c.phase.source) + (ell : Base) (L : ℝ) + (hphase : ∀ x, (JetPolynomial.realPhaseChart c.phase x).1 = + centeredConvexPhase ell L (coordinateChart (c.index : M) c.index) x) + (hconvex : ∀ p ∈ tsupport (B.weight c.index), + ‖coordinateChart (c.index : M) p-coordinateChart (c.index : M) (c.index : M)‖ ≤ R → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g (c.index : M)) + (centeredConvexPhase ell L (coordinateChart (c.index : M) c.index)) + (coordinateChart (c.index : M) p) v v) + (hboundary : ∀ p ∈ c.carrier, c.second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (c.second F p)) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) + (hamppos : ∀ p, 0 < amp p ↔ p ∈ circularCoordinateDisk (c.index : M) r) + (hphi : ∀ p ∈ circularCoordinateDisk (c.index : M) r, + phi =ᶠ[𝓝 p] (fun q => (c.phase (chart (c.index : M) q)) 0)) + {ι : Type*} [Fintype ι] (curves : ι → PhaseBoundaryCurve B) (radii : ι → ℝ) + (hradii : ∀ j, 0 < radii j) + (hcarriers : ∀ j, (curves j).carrier = circularBoundary ((curves j).index : M) (radii j)) + (hregions : ∀ j, circularCoordinateRegion ((curves j).index : M) (radii j) ⊆ + (coordinateChart ((curves j).index : M)).target) + (hpair : ∀ j k, j ≠ k → ((curves j).carrier ∩ (curves k).carrier).Finite) + (htriple : ∀ j k l, j ≠ k → j ≠ l → k ≠ l → + (curves j).carrier ∩ (curves k).carrier ∩ (curves l).carrier = ∅) + (hEf : Disjoint (boundaryCrossingSet curves univ) c.carrier) + (hgeom : FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) F n) + (hfrontGeom : ∀ j p, p ∈ (curves j).carrier ∩ c.carrier → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < c.crossing (curves j) F p) + (hfirst : ∀ j p, p ∈ boundaryCrossingSet curves univ ∩ circularCoordinateDisk (c.index : M) r → + p ∈ (curves j).carrier → ((curves j).directionIn c p).1 ≠ 0) + (htan : ∀ j, (circularPhaseTangencies (c.index : M) ((curves j).index : M) + ell L (radii j) r).Finite) + (data : MetricGoodPhaseData g F) (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) W N := by + obtain ⟨A,i,e,hi,he,_hinverse,⟨d⟩⟩ := c.supported_circular_patch hF n hr hrr₀ hrR + hpos hreg hfront hcover (centeredConvexPhase_smooth ell L _) hphase hconvex + hboundary hamp hamp0 hamppos hphi + have hdisk : circularCoordinateDisk (c.index : M) r = circularCoordinateDisk (i : M) r := by rw [hi] + have hphase' : ∀ x, (JetPolynomial.realPhaseChart e x).1 = + centeredConvexPhase ell L (coordinateChart (i : M) i) x := by + intro x + rw [hi] + change (baseEquiv (e (baseEquiv.symm x))).1 = _ + rw [he] + exact hphase x + obtain ⟨P,hP,hlocal⟩ := d.circular_definers ell L r hr hdisk hphase' + (by simpa only [hi] using hreg) curves radii hradii hcarriers hregions + (boundaryCrossingSet curves univ) (boundaryCrossingSet_finite curves univ hpair) + (fun j k hjk p hp => boundaryCrossingSet_pair curves (mem_univ _) (mem_univ _) hjk hp.1 hp.2) + (by simpa only [hi] using htan) + have hcf : c.carrier = frontier (circularCoordinateDisk (c.index : M) r) := + hfront.trans (circularCoordinateDisk_frontier (c.index : M) hr hreg).symm + apply d.boundary_step c hi he curves hpair htriple + (circularCoordinateDisk_open _ _) (circularCoordinateDisk_regular _ hr hreg) hcf + (by rwa [← hcf]) data hF n hgeom hboundary + (by simpa only [← hcf] using hfrontGeom) ?_ hP hlocal h htarget + intro j p hp hpj + rw [surfacePhaseTransition_target_congr ((curves j).index : M) (i : M) (c.index : M) + hi (curves j).phase e c.phase he] + exact hfirst j p hp hpj + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryParam.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryParam.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c22813f2a63a0ecc1231eb4ca081c8ce3b0721a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryParam.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredAtlasDifferentials +import OAI.Geometry.SurfaceImmersion.Correction.CircularSmoothingAtlas +import Mathlib.Analysis.SpecialFunctions.Complex.Arg + +namespace OAI + +/-! Explicit regular parametrizations of the actual coordinate circles. +The compact parameter interval covers the whole boundary. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +def circularParam (c : CurvePlane) (r t : ℝ) : CurvePlane := + (c.1+r*Real.cos t,c.2+r*Real.sin t) + +def circularVelocity (r t : ℝ) : CurvePlane := (-r*Real.sin t,r*Real.cos t) + +lemma circularParam_smooth (c : CurvePlane) (r : ℝ) : ContDiff ℝ ∞ (circularParam c r) := by + change ContDiff ℝ ∞ (fun t => (c.1+r*Real.cos t,c.2+r*Real.sin t)) + fun_prop + +lemma circularParam_hasDerivAt (c : CurvePlane) (r t : ℝ) : + HasDerivAt (circularParam c r) (circularVelocity r t) t := by + have h := ((Real.hasDerivAt_cos t).const_mul r |>.const_add c.1).prodMk + ((Real.hasDerivAt_sin t).const_mul r |>.const_add c.2) + have he : circularVelocity r t = (r*(-Real.sin t),r*Real.cos t) := by + simp only [circularVelocity, mul_neg, neg_mul] + rw [he] + exact h + +lemma circularVelocity_ne_zero {r : ℝ} (hr : r ≠ 0) (t : ℝ) : circularVelocity r t ≠ 0 := by + intro he + have hs : Real.sin t = 0 := (mul_eq_zero.mp (congrArg Prod.fst he)).resolve_left (neg_ne_zero.mpr hr) + have hc : Real.cos t = 0 := (mul_eq_zero.mp (congrArg Prod.snd he)).resolve_left hr + have h := Real.sin_sq_add_cos_sq t + simp [hs,hc] at h + +lemma circularParam_radius (c : CurvePlane) (r t : ℝ) : + circularRadiusSquared c (circularParam c r t) = r^2 := by + dsimp [circularRadiusSquared,circularParam] + nlinarith [Real.sin_sq_add_cos_sq t] + +lemma circularParam_covers {c x : CurvePlane} {r : ℝ} (hr : 0 < r) + (hx : circularRadiusSquared c x = r^2) : + ∃ t ∈ Icc (-Real.pi) Real.pi, circularParam c r t = x := by + let z : ℂ := ⟨x.1-c.1,x.2-c.2⟩ + have hn : ‖z‖ = r := by + have hs : ‖z‖^2 = r^2 := by + rw [Complex.sq_norm] + simpa [Complex.normSq_apply,z,circularRadiusSquared,pow_two] using hx + nlinarith [norm_nonneg z] + refine ⟨z.arg,⟨(Complex.neg_pi_lt_arg z).le,Complex.arg_le_pi z⟩,?_⟩ + have hcos := Complex.norm_mul_cos_arg z + have hsin := Complex.norm_mul_sin_arg z + rw [hn] at hcos hsin + apply Prod.ext <;> dsimp [circularParam] + · dsimp [z] at hcos + linarith + · dsimp [z] at hsin + linarith + +end ClosedSurfaceR4.PhaseGeometry + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +def circularBoundary (p : M) (r : ℝ) : Set M := + (coordinateChart p).source ∩ (coordinateChart p) ⁻¹' + {x | circularRadiusSquared (coordinateChart p p) x = r^2} + +def circularBoundaryParam (p : M) (r : ℝ) (t : ℝ) : M := + (coordinateChart p).symm (circularParam (coordinateChart p p) r t) + +omit [IsManifold planeModel ∞ M] in +lemma circularBoundaryParam_target (p : M) {r : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) (t : ℝ) : + circularParam (coordinateChart p p) r t ∈ (coordinateChart p).target := + hreg (le_of_eq (circularParam_radius _ _ _)) + +lemma circularBoundaryParam_smooth (p : M) {r : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + ContMDiff 𝓘(ℝ) planeModel ∞ (circularBoundaryParam p r) := by + intro t + exact (((coordinateChart_symm_smoothOn p) _ (circularBoundaryParam_target p hreg t)).contMDiffAt + ((coordinateChart p).open_target.mem_nhds (circularBoundaryParam_target p hreg t))).comp t + ((circularParam_smooth _ r).contMDiff.contMDiffAt) + +omit [IsManifold planeModel ∞ M] in +lemma circularBoundary_image (p : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + circularBoundary p r = circularBoundaryParam p r '' Icc (-Real.pi) Real.pi := by + ext x + constructor + · rintro ⟨hxs,hx⟩ + obtain ⟨t,ht,he⟩ := circularParam_covers hr hx + exact ⟨t,ht,by rw [circularBoundaryParam,he,(coordinateChart p).left_inv hxs]⟩ + · rintro ⟨t,ht,rfl⟩ + have htgt := circularBoundaryParam_target p hreg t + refine ⟨(coordinateChart p).map_target htgt,?_⟩ + change circularRadiusSquared _ ((coordinateChart p) ((coordinateChart p).symm _)) = _ + rw [(coordinateChart p).right_inv htgt,circularParam_radius] + +lemma circularBoundary_compact (p : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + IsCompact (circularBoundary p r) := by + rw [circularBoundary_image p hr hreg] + exact isCompact_Icc.image (circularBoundaryParam_smooth p hreg).continuous + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..2feac377b6a78e3a552eae30f4c1a20db0a1a0fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryProfiles.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileNormal + +namespace OAI + +/-! The scalar limits controlling the boundary argument for a circular +velocity, in the canonical normal frame read from the five profiles. -/ +noncomputable section +open scoped Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame RealModes VelocityFrame + +def circularBoundaryProfile (X Y C W e₁ e₂ : Vec) (R α β : ℝ) : BoundaryProfile := + ![leadingTangent X Y C (R • direction e₁ e₂ α),Y,C,W, + (R*β) • angularDirection e₁ e₂ α] + +lemma circularBoundaryProfile_regular {X Y C W e₁ e₂ : Vec} {R α β : ℝ} + (hD : gramDet Y C ≠ 0) (hR : R ≠ 0) + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hY₁ : Y ⬝ᵥ e₁ = 0) (hY₂ : Y ⬝ᵥ e₂ = 0) + (hC₁ : C ⬝ᵥ e₁ = 0) (hC₂ : C ⬝ᵥ e₂ = 0) : + circularBoundaryProfile X Y C W e₁ e₂ R α β ∈ regularBoundaryProfiles := by + have hYV : Y ⬝ᵥ (R • direction e₁ e₂ α) = 0 := by + simp [direction,dotProduct_smul,dotProduct_add,hY₁,hY₂] + have hCV : C ⬝ᵥ (R • direction e₁ e₂ α) = 0 := by + simp [direction,dotProduct_smul,dotProduct_add,hC₁,hC₂] + have hV : R • direction e₁ e₂ α ≠ 0 := by + apply smul_ne_zero hR + intro hh + have hu := direction_unit h₁ h₂ horth α + rw [hh] at hu + norm_num at hu + exact leading_normal_nondegenerate hD hYV hCV hV + +/-- The mixed coefficient agrees in absolute value with the geometric +angular component; the scaled longitudinal coefficient is `R * β`. -/ +theorem circularBoundaryProfile_coefficients {X Y C W e₁ e₂ : Vec} {R α β : ℝ} + (hD : gramDet Y C ≠ 0) (hR : R ≠ 0) + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hY₁ : Y ⬝ᵥ e₁ = 0) (hY₂ : Y ⬝ᵥ e₂ = 0) + (hC₁ : C ⬝ᵥ e₁ = 0) (hC₂ : C ⬝ᵥ e₂ = 0) : + |profileCoefficients (circularBoundaryProfile X Y C W e₁ e₂ R α β) 2| = + |W ⬝ᵥ angularDirection e₁ e₂ α| ∧ + |profileCoefficients (circularBoundaryProfile X Y C W e₁ e₂ R α β) 3| = |R*β| := by + let J := circularBoundaryProfile X Y C W e₁ e₂ R α β + have hJ : J ∈ regularBoundaryProfiles := + circularBoundaryProfile_regular hD hR h₁ h₂ horth hY₁ hY₂ hC₁ hC₂ + let u := angularDirection e₁ e₂ α + have hu : u ⬝ᵥ u = 1 := angularDirection_unit h₁ h₂ horth α + have hy : Y ⬝ᵥ u = 0 := angularDirection_perp hY₁ hY₂ α + have hc : C ⬝ᵥ u = 0 := angularDirection_perp hC₁ hC₂ α + have hv : u ⬝ᵥ (R • direction e₁ e₂ α) = 0 := by + rw [dotProduct_smul,dotProduct_comm u (direction e₁ e₂ α), + direction_angular_perp h₁ h₂ horth,smul_zero] + have hx : J 0 ⬝ᵥ u = 0 := by + rw [dotProduct_comm] + exact dot_leadingTangent_zero ((dotProduct_comm _ _).trans hy) + ((dotProduct_comm _ _).trans hc) hv + have hn : profilePreferred J ⬝ᵥ u = 0 := by + rw [dotProduct_comm] + exact angularDirection_normal_perp R α h₁ h₂ horth hY₁ hY₂ hC₁ hC₂ + have hW := profileComplement_abs_dot hJ hu hx hy hn W + have hA := profileComplement_abs_dot hJ hu hx hy hn ((R*β) • u) + refine ⟨hW,?_⟩ + change |((R*β) • u) ⬝ᵥ profileComplement J| = |R*β| + rw [hA,smul_dotProduct,hu,smul_eq_mul,mul_one] + +lemma circularBoundaryProfile_turn_iff {X Y C W e₁ e₂ : Vec} {R α β : ℝ} + (hD : gramDet Y C ≠ 0) (hR : R ≠ 0) + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hY₁ : Y ⬝ᵥ e₁ = 0) (hY₂ : Y ⬝ᵥ e₂ = 0) + (hC₁ : C ⬝ᵥ e₁ = 0) (hC₂ : C ⬝ᵥ e₂ = 0) : + profileCoefficients (circularBoundaryProfile X Y C W e₁ e₂ R α β) 3 = 0 ↔ β = 0 := by + have h := (circularBoundaryProfile_coefficients (X := X) (W := W) (α := α) (β := β) hD hR h₁ h₂ horth hY₁ hY₂ hC₁ hC₂).2 + rw [← abs_eq_zero, h,abs_eq_zero,mul_eq_zero] + simp [hR] + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryRemovalStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryRemovalStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa221dd66b4a2a45c1beaeaae88134c2841a0f80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryRemovalStep.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryMetricStep +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryRemoval +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularDirections + +namespace OAI + +/-! One actual circular correction removes its own boundary and preserves +all remaining finite geometric conditions. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] [DecidableEq ι] + + theorem circular_boundary_removal_step (curves : ι → PhaseBoundaryCurve B) (a : ι) + (r r₀ R : ι → ℝ) (hr : ∀ j, 0 < r j) + (hrr₀ : (r a)^2 < (r₀ a)^2) (hrR : r a < R a) + (hpos : ∀ p, 0 < B.weight (curves a).index p ↔ + p ∈ circularCoordinateDisk ((curves a).index : M) (r₀ a)) + (hreg : ∀ j, circularCoordinateRegion ((curves j).index : M) (r j) ⊆ + (coordinateChart ((curves j).index : M)).target) + (hcarrier : ∀ j, (curves j).carrier = circularBoundary ((curves j).index : M) (r j)) + (hcover : ∀ j x, x ∈ circularCoordinateRegion ((curves j).index : M) (r j) → + baseEquiv.symm x ∈ (curves j).phase.source) + (ell : ι → Base) (L : ι → ℝ) + (hphase : ∀ j x, (baseEquiv ((curves j).phase x)).1 = + centeredConvexPhase (ell j) (L j) (coordinateChart ((curves j).index : M) (curves j).index) + (baseEquiv x)) + (hpair : ∀ j k, j ≠ k → ((curves j).carrier ∩ (curves k).carrier).Finite) + (htriple : ∀ j k l, j ≠ k → j ≠ l → k ≠ l → + (curves j).carrier ∩ (curves k).carrier ∩ (curves l).carrier = ∅) + (htan : ∀ j, (circularPhaseTangencies ((curves a).index : M) ((curves j).index : M) + (ell a) (L a) (r j) (r a)).Finite) + (hind : ∀ j k, j ≠ k → ∀ p ∈ circularCrossingSet (fun j => ((curves j).index : M)) r, + p ∈ (coordinateChart ((curves j).index : M)).source → + p ∈ (coordinateChart ((curves k).index : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase ((curves j).index : M) (ell j) (L j) ∘ + (coordinateChart ((curves j).index : M)).symm) (coordinateChart ((curves j).index : M) p)) + (phaseDerivative (centeredAtlasPhase ((curves k).index : M) (ell k) (L k) ∘ + (coordinateChart ((curves j).index : M)).symm) (coordinateChart ((curves j).index : M) p)) ≠ 0) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) (hgeom : FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) F n) + (hconvex : ∀ p ∈ tsupport (B.weight (curves a).index), + ‖coordinateChart ((curves a).index : M) p-coordinateChart ((curves a).index : M) (curves a).index‖ ≤ R a → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g ((curves a).index : M)) + (centeredConvexPhase (ell a) (L a) (coordinateChart ((curves a).index : M) (curves a).index)) + (coordinateChart ((curves a).index : M) p) v v) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) + (hamppos : ∀ p, 0 < amp p ↔ p ∈ circularCoordinateDisk ((curves a).index : M) (r a)) + (hphi : ∀ p ∈ circularCoordinateDisk ((curves a).index : M) (r a), + phi =ᶠ[𝓝 p] (fun q => ((curves a).phase (chart ((curves a).index : M) q)) 0)) + (data : MetricGoodPhaseData g F) (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + FiniteBoundaryGeometry (fun j : {j : ι // j ≠ a} => curves j) + (boundaryCrossingSet (fun j : {j : ι // j ≠ a} => curves j) univ) W N := by + classical + apply (curves a).realize_circular_boundary_metric hF n (hr a) hrr₀ hrR hpos (hreg a) + (hcarrier a) (hcover a) (ell a) (L a) + (fun x => by exact hphase a (baseEquiv.symm x)) hconvex + (fun p hp => ⟨hgeom.nonzero a p hp,hgeom.avoids a p hp⟩) + hamp hamp0 hamppos hphi (fun j : {j : ι // j ≠ a} => curves j) + (fun j => r j) (fun j => hr j) (fun j => hcarrier j) (fun j => hreg j) + (fun j k hjk => hpair j k (fun h => hjk (Subtype.ext h))) + (fun j k l hjk hjl hkl => htriple j k l + (fun h => hjk (Subtype.ext h)) (fun h => hjl (Subtype.ext h)) (fun h => hkl (Subtype.ext h))) + (removed_boundary_crossings_disjoint curves a htriple) (hgeom.remove a) + (hgeom.remove_frontier a) ?_ (fun j => htan j) data h htarget + intro j p hp hpj + exact prepared_circular_direction_first curves r hr hcarrier hreg hcover ell L hphase hind a j j.2 + ⟨removed_boundary_crossings_subset curves a hp.1,hp.2⟩ hpj + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryTangencies.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryTangencies.lean new file mode 100644 index 0000000000000000000000000000000000000000..c142680c174d1e8e1ee4677b3f4ea125e462a0d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularBoundaryTangencies.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CircularBoundaryArcs +import OAI.Geometry.SurfaceImmersion.Atlas.LocalGenericAtlasPhases + +namespace OAI + +/-! Derivatives along the explicit circle equal evaluation of the actual +phase covector on its nonzero angular tangent. Compact parameter finiteness +therefore gives finiteness of the genuine surface tangency set. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +def circularAngularTangent (c x : CurvePlane) : CurvePlane := (-(x.2-c.2),x.1-c.1) + +lemma circularAngularTangent_param (c : CurvePlane) (r t : ℝ) : + circularAngularTangent c (circularParam c r t) = circularVelocity r t := by + ext <;> dsimp [circularAngularTangent,circularParam,circularVelocity] <;> ring + +def circularPhaseDerivative (q p : M) (ell : CurvePlane) (L : ℝ) (x : M) : ℝ := + phaseLinear (phaseDerivative (centeredAtlasPhase q ell L ∘ (coordinateChart p).symm) + (coordinateChart p x)) + (circularAngularTangent (coordinateChart p p) (coordinateChart p x)) + +lemma circularPhaseDerivative_eq_deriv (q p : M) (ell : CurvePlane) (L : ℝ) {r t : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + (ht : t ∈ circularArcDomain q p r) : + circularPhaseDerivative q p ell L (circularBoundaryParam p r t) = + deriv (fun s => centeredAtlasPhase q ell L (circularBoundaryParam p r s)) t := by + let x := circularParam (coordinateChart p p) r t + let f : CurvePlane → ℝ := centeredAtlasPhase q ell L ∘ (coordinateChart p).symm + have hx : x ∈ (coordinateTransition q p).source := ⟨circularBoundaryParam_target p hreg t,ht⟩ + have hf : DifferentiableAt ℝ f x := + ((centeredConvexPhase_smooth ell L (coordinateChart q q)).differentiable (by simp) _).comp x + ((((coordinateTransition_smoothOn q p) x hx).contDiffAt + ((coordinateTransition q p).open_source.mem_nhds hx)).differentiableAt (by simp)) + have hd := hf.hasFDerivAt.comp_hasDerivAt t (circularParam_hasDerivAt (coordinateChart p p) r t) + have he : (fun s => centeredAtlasPhase q ell L (circularBoundaryParam p r s)) = + f ∘ circularParam (coordinateChart p p) r := rfl + rw [he,hd.deriv] + unfold circularPhaseDerivative + simp only [circularBoundaryParam] + rw [(coordinateChart p).right_inv (circularBoundaryParam_target p hreg t), + circularAngularTangent_param,phaseLinear_phaseDerivative] + +def circularPhaseTangencies (q p : M) (ell : CurvePlane) (L r R : ℝ) : Set M := + circularBoundary p r ∩ circularDiskClosure q R ∩ {x | circularPhaseDerivative q p ell L x = 0} + +lemma circularPhaseTangencies_finite (q p : M) (ell : CurvePlane) (L : ℝ) {r R : ℝ} + (hr : 0 < r) (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + (hQ : circularCoordinateRegion q R ⊆ (coordinateChart q).target) + (hfinite : (circularArcCompact q p r R ∩ {t | + deriv (fun s => centeredAtlasPhase q ell L (circularBoundaryParam p r s)) t = 0}).Finite) : + (circularPhaseTangencies q p ell L r R).Finite := by + apply (hfinite.image (circularBoundaryParam p r)).subset + rintro x ⟨⟨hx,hQx⟩,hzero⟩ + obtain ⟨t,ht,rfl⟩ := circularArcCompact_covers q p hr hreg ⟨hx,hQx⟩ + refine ⟨t,⟨ht,?_⟩,rfl⟩ + change deriv (fun s => centeredAtlasPhase q ell L (circularBoundaryParam p r s)) t = 0 + rw [← circularPhaseDerivative_eq_deriv q p ell L hreg + (circularArcCompact_subset q p hQ ht)] + exact hzero + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCurveCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCurveCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..07472084fbff607e6233033818cb8735b048219a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCurveCover.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCurveCover + +namespace OAI + +/-! The constructed circular profiles preserve every later curve using the +old positive collar invariant and the fixed interior turn threshold. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes SmallModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_curve_cover {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K C₀ I : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hC₀ : IsClosed C₀) (hI : IsClosed I) (hcover : ∀ x ∈ K, x ∈ C₀ ∨ x ∈ I) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) (B : ℝ) (hB : 0 ≤ B) : + ∃ Λ : ℝ, 0 < Λ ∧ ∀ α : E × ℝ → ℝ, + ContDiffOn ℝ ∞ α (U ×ˢ univ) → + (∀ x ∈ K ∩ I, ∀ t ∈ Icc (0 : ℝ) 1, fderiv ℝ α (x,t) (0,1) = 0 → + Λ < fderiv ℝ α (x,t) (d,0)) → + ∀ b c k : E → ℝ, ContinuousOn b U → ContinuousOn c U → ContinuousOn k U → + (∀ x ∈ K, b x ≠ 0 ∨ c x ≠ 0) → (∀ x ∈ K, -B ≤ k x) → + (∀ x ∈ K ∩ C₀, ∀ t ∈ Icc (0 : ℝ) 1, + 0 < (profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 1*b x + + profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 0*c x)^2 + k x*b x^2) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ p : Base, ‖realBoundaryProfile F z p-circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)‖ < η → + k x ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + realSecondForm F (b x,c x) (b x,c x) p ≠ 0 ∧ + normalize (realSecondForm F (b x,c x) (b x,c x) p) ≠ + -profilePreferred (realBoundaryProfile F z p) := by + let Z : Set (E × ℝ) := K ×ˢ Icc (0 : ℝ) 1 + let : CompactSpace Z := isCompact_iff_compactSpace.mp (hK.prod isCompact_Icc) + let C' : Set Z := {w | w.val.1 ∈ C₀} + let I' : Set Z := {w | w.val.1 ∈ I} + have hc' : IsClosed C' := hC₀.preimage (continuous_fst.comp continuous_subtype_val) + have hi' : IsClosed I' := hI.preimage (continuous_fst.comp continuous_subtype_val) + have hcover' : ∀ w : Z, w ∈ C' ∨ w ∈ I' := fun w => hcover w.val.1 w.property.1 + obtain ⟨sLo,sHi,D,hsLo,_,hD0,hbounds⟩ := compact_circular_family_threshold + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + obtain ⟨H,hH,hcurve⟩ := compact_actual_profile_curve_cover hc' hi' hcover' sLo B D hsLo hB hD0 + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH.le + refine ⟨Λ,hΛ,?_⟩ + intro α hα hturn b c k hb hc hk hbc hkb hcollar + let J : Z → BoundaryProfile := fun w => circularFamilyProfile Q X Y C R e₁ e₂ α d w.val + have hJ : Continuous J := by + change Continuous (Z.domRestrict (circularFamilyProfile Q X Y C R e₁ e₂ α d)) + exact ContinuousOn.domRestrict + ((circularFamilyProfile_smoothOn hU hQ hX hY hC hR h₁ h₂ hα hD d).continuousOn.mono + (fun w hw => ⟨hKU hw.1,mem_univ _⟩)) + have hdata (w : Z) := hprofile α hα w.val.1 w.property.1 w.val.2 + have hturn' : ∀ w ∈ I', profileCoefficients (J w) 3 = 0 → H+2 < |profileCoefficients (J w) 2| := by + intro w hw hz + apply (hdata w).2.2.2.2 + apply hturn w.val.1 ⟨w.property.1,hw⟩ w.val.2 w.property.2 + exact (circularFamilyProfile_turn_iff Q X Y C e₁ e₂ R α d w.val.1 w.val.2 + (hD _ (hKU w.property.1)) (hRpos _ (hKU w.property.1)).ne' + (hframe _ (hKU w.property.1))).mp hz + have hposmap : ∀ f : E → ℝ, ContinuousOn f U → Continuous (fun w : Z => f w.val.1) := by + intro f hf + exact hf.comp_continuous (continuous_fst.comp continuous_subtype_val) (fun w => hKU w.property.1) + obtain ⟨η,hη,hactual⟩ := hcurve J hJ (fun w => (hdata w).1) + (fun w => (hdata w).2.1) (fun w => (hdata w).2.2.2.1) hturn' + (fun w => b w.val.1) (fun w => c w.val.1) (fun w => k w.val.1) + (hposmap b hb) (hposmap c hc) (hposmap k hk) + (fun w => hbc w.val.1 w.property.1) (fun w => hkb w.val.1 w.property.1) + (fun w hw => hcollar w.val.1 ⟨w.property.1,hw⟩ w.val.2 w.property.2) + refine ⟨η,hη,?_⟩ + intro z hz hzη x hx t ht F hF p herr hcurv + exact hactual z hz hzη ⟨(x,t),hx,ht⟩ F hF p herr hcurv + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCycleMetrics.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCycleMetrics.lean new file mode 100644 index 0000000000000000000000000000000000000000..19cb2f267bc622e87f872b4de2bf85aa6a0bf33f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularCycleMetrics.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCycleOrder +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCycleAssembly + +namespace OAI + +/-! The actual ordered prefix metrics of a finite circular family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance flatCycleFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance flatCycleFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance flatCycleDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance flatCycleDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance flatCycleSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance flatCycleSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace CircularPrimitiveFamily +variable {B : SmoothingAtlas M} {N m : ℕ} + (d : CircularPrimitiveFamily B (Fin (N*m))) + {u : ∀ p : M, CovariantTwoTensor p} + (f : Fin N → SmoothPrimitiveFamily (Fin m) u) + (ha : ∀ a p, d.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) + (hp : ∀ a, d.phase a = (f a.divNat).phase a.modNat) + +include f ha hp + +omit [CompactSpace M] [T2Space M] in +lemma flat_cycle_term (a : Fin (N*m)) (p : M) : + (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p = + (N : ℝ)⁻¹ • (f a.divNat).term a.modNat p := by + rw [ha,hp,SmoothPrimitiveFamily.cycleAmplitude_square] + simp only [SmoothPrimitiveFamily.term,smul_smul] + +omit [T2Space M] in +lemma prefixMetric_cycle (g : SmoothMetric M) (k : Fin N) (j : Fin m) : + d.prefixMetric g (finProdFinEquiv (k,j)).castSucc = + (f k).cycleMetric B g N k.val (prefixIndices j.castSucc) := by + apply metric_eq_of_inner_eq + rw [d.prefixMetric_inner] + funext p + change g.inner p + _ = g.inner p + (f k).cycleTensor N k.val (prefixIndices j.castSucc) p + congr 1 + simp_rw [d.flat_cycle_term f ha hp] + rw [← Finset.smul_sum] + rw [finite_cycle_prefix_sum (fun a b => (f a).term b p) (u p) + (fun a => (f a).sum_eq p) k j] + rw [smul_add,← Nat.cast_smul_eq_nsmul ℝ,smul_smul] + change ((N : ℝ)⁻¹ * (k.val : ℝ)) • u p + _ = _ + rw [mul_comm] + rfl + +omit [CompactSpace M] [T2Space M] in +lemma totalTensor_cycle (hN : 0 < N) : d.totalTensor = u := by + funext p + change (∑ a, (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p) = u p + simp_rw [d.flat_cycle_term f ha hp] + rw [← Finset.smul_sum,finite_cycle_total_sum (fun a b => (f a).term b p) (u p) + (fun a => (f a).sum_eq p),← Nat.cast_smul_eq_nsmul ℝ,smul_smul] + rw [inv_mul_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hN)),one_smul] + +end CircularPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularDiskTopology.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularDiskTopology.lean new file mode 100644 index 0000000000000000000000000000000000000000..534169f69ec0e49be5e63ef18cc860fb2dca4e89 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularDiskTopology.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryParam +import Mathlib.Topology.OpenPartialHomeomorph.IsImage +import Mathlib.Analysis.Normed.Module.RCLike.Real + +namespace OAI + +/-! The actual coordinate disks are regular open, with exactly the stated +coordinate circles as their frontiers. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +private lemma complex_radius_sq (c x : Base) : + ‖Complex.equivRealProdCLM.symm x - Complex.equivRealProdCLM.symm c‖^2 = + circularRadiusSquared c x := by + rw [← map_sub,Complex.sq_norm] + simp [Complex.equivRealProdCLM_symm_apply,Complex.normSq_apply,circularRadiusSquared,pow_two] + +private lemma circular_region_ball (c : Base) {r : ℝ} (hr : 0 < r) : + {x | circularRadiusSquared c x < r^2} = + Complex.equivRealProdCLM.symm ⁻¹' ball (Complex.equivRealProdCLM.symm c) r := by + ext x + rw [mem_preimage,mem_ball,dist_eq_norm] + change circularRadiusSquared c x < r^2 ↔ _ + rw [← complex_radius_sq] + exact sq_lt_sq₀ (norm_nonneg _) hr.le + +private lemma circular_region_closedBall (c : Base) {r : ℝ} (hr : 0 < r) : + {x | circularRadiusSquared c x ≤ r^2} = + Complex.equivRealProdCLM.symm ⁻¹' closedBall (Complex.equivRealProdCLM.symm c) r := by + ext x + rw [mem_preimage,mem_closedBall,dist_eq_norm] + change circularRadiusSquared c x ≤ r^2 ↔ _ + rw [← complex_radius_sq] + exact sq_le_sq₀ (norm_nonneg _) hr.le + +lemma closure_circular_region (c : Base) {r : ℝ} (hr : 0 < r) : + closure {x | circularRadiusSquared c x < r^2} = {x | circularRadiusSquared c x ≤ r^2} := by + rw [circular_region_ball c hr] + change closure (Complex.equivRealProdCLM.symm.toHomeomorph ⁻¹' ball + (Complex.equivRealProdCLM.symm c) r) = _ + rw [← Complex.equivRealProdCLM.symm.toHomeomorph.preimage_closure,closure_ball _ hr.ne'] + exact (circular_region_closedBall c hr).symm + +lemma interior_circular_region (c : Base) {r : ℝ} (hr : 0 < r) : + interior {x | circularRadiusSquared c x ≤ r^2} = {x | circularRadiusSquared c x < r^2} := by + rw [circular_region_closedBall c hr] + change interior (Complex.equivRealProdCLM.symm.toHomeomorph ⁻¹' closedBall + (Complex.equivRealProdCLM.symm c) r) = _ + rw [← Complex.equivRealProdCLM.symm.toHomeomorph.preimage_interior,interior_closedBall _ hr.ne'] + exact (circular_region_ball c hr).symm + +end ClosedSurfaceR4.PhaseGeometry +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_iff (q : M) {r : ℝ} + (hreg : circularCoordinateRegion q r ⊆ (coordinateChart q).target) (p : M) : + p ∈ circularDiskClosure q r ↔ p ∈ (coordinateChart q).source ∧ + circularRadiusSquared (coordinateChart q q) (coordinateChart q p) ≤ r^2 := by + constructor + · rintro ⟨x,hx,rfl⟩ + refine ⟨(coordinateChart q).map_target (hreg hx),?_⟩ + rwa [(coordinateChart q).right_inv (hreg hx)] + · rintro ⟨hp,hx⟩ + exact ⟨coordinateChart q p,hx,(coordinateChart q).left_inv hp⟩ + +omit [IsManifold planeModel ∞ M] in +lemma circularCoordinateDisk_closure (q : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion q r ⊆ (coordinateChart q).target) : + closure (circularCoordinateDisk q r) = circularDiskClosure q r := by + let S := {x : SmallModes.Base | circularRadiusSquared (coordinateChart q q) x < r^2} + have hI : (coordinateChart q).IsImage (circularCoordinateDisk q r) S := by + intro p hp + exact ⟨fun hx => ⟨hp,hx⟩,fun hx => hx.2⟩ + have hc : closure (circularCoordinateDisk q r) ⊆ circularDiskClosure q r := by + apply closure_minimal _ (circularDiskClosure_compact q r hreg).isClosed + intro p hp + exact (circularDiskClosure_iff q hreg p).mpr ⟨hp.1,hp.2.le⟩ + apply Subset.antisymm hc + intro p hp + obtain ⟨hs,hx⟩ := (circularDiskClosure_iff q hreg p).mp hp + apply (hI.closure hs).mp + simpa only [S,closure_circular_region _ hr,mem_ofPred] using hx + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_interior (q : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion q r ⊆ (coordinateChart q).target) : + interior (circularDiskClosure q r) = circularCoordinateDisk q r := by + let S := {x : SmallModes.Base | circularRadiusSquared (coordinateChart q q) x ≤ r^2} + have hI : (coordinateChart q).IsImage (circularDiskClosure q r) S := by + intro p hp + exact ⟨fun hx => (circularDiskClosure_iff q hreg p).mpr ⟨hp,hx⟩, + fun hx => ((circularDiskClosure_iff q hreg p).mp hx).2⟩ + ext p + constructor + · intro hp + have hs := circularDiskClosure_source q r hreg (interior_subset hp) + have hx := (hI.interior hs).mpr hp + exact ⟨hs,by simpa only [S,interior_circular_region _ hr,mem_ofPred,mem_preimage] using hx⟩ + · intro hp + apply (circularCoordinateDisk_open q r).subset_interior_iff.mpr ?_ hp + exact fun p hp => (circularDiskClosure_iff q hreg p).mpr ⟨hp.1,hp.2.le⟩ + +omit [IsManifold planeModel ∞ M] in +lemma circularCoordinateDisk_frontier (q : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion q r ⊆ (coordinateChart q).target) : + frontier (circularCoordinateDisk q r) = circularBoundary q r := by + rw [frontier,circularCoordinateDisk_closure q hr hreg, + (circularCoordinateDisk_open q r).interior_eq] + ext p + simp only [Set.mem_sdiff,circularDiskClosure_iff q hreg p,circularCoordinateDisk,circularBoundary, + mem_inter_iff,mem_preimage,mem_ofPred_eq] + constructor + · rintro ⟨⟨hp,hle⟩,hn⟩ + exact ⟨hp,le_antisymm hle (not_lt.mp (fun hlt => hn ⟨hp,hlt⟩))⟩ + · rintro ⟨hp,he⟩ + exact ⟨⟨hp,he.le⟩,fun hlt => (lt_irrefl _ (he ▸ hlt.2))⟩ + +omit [IsManifold planeModel ∞ M] in +lemma circularCoordinateDisk_regular (q : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion q r ⊆ (coordinateChart q).target) : + interior (closure (circularCoordinateDisk q r)) = circularCoordinateDisk q r := by + rw [circularCoordinateDisk_closure q hr hreg,circularDiskClosure_interior q hr hreg] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..6791ed496ca4d842aeac8219b167824708f881a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyGeometry.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrimitiveFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularPhaseCurves + +namespace OAI + +/-! The finite generic boundary geometry is chosen before any amplitudes +or finite-point spherical modification. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +structure CircularFamilyGeometry (B : SmoothingAtlas M) (ι : Type*) [Fintype ι] where + curves : ι → PhaseBoundaryCurve B + radius : ι → ℝ + outerRadius : ι → ℝ + chartRadius : ι → ℝ + linearPart : ι → Base + convexPart : ι → ℝ + radius_pos : ∀ a, 0 < radius a + radius_outer : ∀ a, (radius a)^2 < (outerRadius a)^2 + radius_chart : ∀ a, radius a < chartRadius a + weight_positive : ∀ a p, 0 < B.weight (curves a).index p ↔ + p ∈ circularCoordinateDisk ((curves a).index : M) (outerRadius a) + region : ∀ a, circularCoordinateRegion ((curves a).index : M) (radius a) ⊆ + (coordinateChart ((curves a).index : M)).target + carrier : ∀ a, (curves a).carrier = circularBoundary ((curves a).index : M) (radius a) + cover : ∀ a x, x ∈ circularCoordinateRegion ((curves a).index : M) (radius a) → + baseEquiv.symm x ∈ (curves a).phase.source + first_coordinate : ∀ a x, (baseEquiv ((curves a).phase x)).1 = + centeredConvexPhase (linearPart a) (convexPart a) + (coordinateChart ((curves a).index : M) (curves a).index) (baseEquiv x) + pair_finite : ∀ a b, a ≠ b → ((curves a).carrier ∩ (curves b).carrier).Finite + triple_empty : ∀ a b c, a ≠ b → a ≠ c → b ≠ c → + (curves a).carrier ∩ (curves b).carrier ∩ (curves c).carrier = ∅ + tangencies_finite : ∀ a b, (circularPhaseTangencies ((curves a).index : M) ((curves b).index : M) + (linearPart a) (convexPart a) (radius b) (radius a)).Finite + independent : ∀ a b, a ≠ b → ∀ p ∈ boundaryCrossingSet curves univ, + p ∈ (coordinateChart ((curves a).index : M)).source → + p ∈ (coordinateChart ((curves b).index : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase ((curves a).index : M) (linearPart a) (convexPart a) ∘ + (coordinateChart ((curves a).index : M)).symm) (coordinateChart ((curves a).index : M) p)) + (phaseDerivative (centeredAtlasPhase ((curves b).index : M) (linearPart b) (convexPart b) ∘ + (coordinateChart ((curves a).index : M)).symm) (coordinateChart ((curves a).index : M) p)) ≠ 0 + +namespace CircularFamilyGeometry +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + +def withAmplitudes (d : CircularFamilyGeometry B ι) (amp phi : ι → M → ℝ) + (hamp : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (amp a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (hamp0 : ∀ a p, 0 ≤ amp a p) + (hpos : ∀ a p, 0 < amp a p ↔ p ∈ circularCoordinateDisk ((d.curves a).index : M) (d.radius a)) + (hgerm : ∀ a p, p ∈ circularCoordinateDisk ((d.curves a).index : M) (d.radius a) → + phi a =ᶠ[𝓝 p] (fun q => ((d.curves a).phase (chart ((d.curves a).index : M) q)) 0)) : + CircularPrimitiveFamily B ι where + curves := d.curves + radius := d.radius + outerRadius := d.outerRadius + chartRadius := d.chartRadius + linearPart := d.linearPart + convexPart := d.convexPart + radius_pos := d.radius_pos + radius_outer := d.radius_outer + radius_chart := d.radius_chart + weight_positive := d.weight_positive + region := d.region + carrier := d.carrier + cover := d.cover + first_coordinate := d.first_coordinate + pair_finite := d.pair_finite + triple_empty := d.triple_empty + tangencies_finite := d.tangencies_finite + independent := d.independent + amplitude := amp + phase := phi + phase_smooth := hphi + amplitude_smooth := hamp + amplitude_nonneg := hamp0 + amplitude_positive := hpos + phase_germ := hgerm + +end CircularFamilyGeometry +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..896341ce61c3ab359d54afba7459f3856d886d71 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyProfile.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularProfileThreshold + +namespace OAI + +/-! The five boundary profiles for a smooth family of circular velocities. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def circularFamilyProfile (Q X Y C : E → Vec) (R : E → ℝ) + (e₁ e₂ : E → Vec) (α : E × ℝ → ℝ) (d : E) (z : E × ℝ) : BoundaryProfile := + circularBoundaryProfile (X z.1) (Y z.1) (C z.1) + (fderiv ℝ (fun w : E × ℝ => Q w.1 + R w.1 • direction (e₁ w.1) (e₂ w.1) (α w)) z (d,0)) + (e₁ z.1) (e₂ z.1) (R z.1) (α z) (fderiv ℝ α z (0,1)) + +lemma fderiv_slice_first {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + {f : E × ℝ → F} {x : E} {t : ℝ} (hf : DifferentiableAt ℝ f (x,t)) (d : E) : + fderiv ℝ (fun y => f (y,t)) x d = fderiv ℝ f (x,t) (d,0) := by + have hslice : HasFDerivAt (fun y : E => (y,t)) + ((ContinuousLinearMap.id ℝ E).prod (0 : E →L[ℝ] ℝ)) x := + (hasFDerivAt_id x).prodMk (hasFDerivAt_const t x) + exact congrArg (fun L : E →L[ℝ] F => L d) (hf.hasFDerivAt.comp x hslice).fderiv + +lemma circularFamilyProfile_spatial {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {α : E × ℝ → ℝ} {x : E} {t : ℝ} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α (x,t)) (d : E) : + circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t) = + circularSpatialProfile Q X Y C R e₁ e₂ (fun y => α (y,t)) + (fderiv ℝ α (x,t) (0,1)) x d := by + have hf := hasFDerivAt_fst (𝕜 := ℝ) (p := (x,t)) + have hd := (hQ.hasFDerivAt.comp (x,t) hf).add ((hR.hasFDerivAt.comp (x,t) hf).smul + ((hα.hasFDerivAt.cos.smul (h₁.hasFDerivAt.comp (x,t) hf)).add + (hα.hasFDerivAt.sin.smul (h₂.hasFDerivAt.comp (x,t) hf)))) + change HasFDerivAt (fun w : E × ℝ => + Q w.1 + R w.1 • direction (e₁ w.1) (e₂ w.1) (α w)) _ (x,t) at hd + unfold circularFamilyProfile circularSpatialProfile + rw [fderiv_slice_first hd.differentiableAt] + +lemma circularFamilyProfile_smoothOn {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U : Set E} {α : E × ℝ → ℝ} (hU : IsOpen U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hα : ContDiffOn ℝ ∞ α (U ×ˢ univ)) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) (d : E) : + ContDiffOn ℝ ∞ (circularFamilyProfile Q X Y C R e₁ e₂ α d) (U ×ˢ univ) := by + have hX' : ContDiffOn ℝ ∞ (fun z : E × ℝ => X z.1) (U ×ˢ univ) := hX.comp contDiffOn_fst (fun z hz => hz.1) + have hY' : ContDiffOn ℝ ∞ (fun z : E × ℝ => Y z.1) (U ×ˢ univ) := hY.comp contDiffOn_fst (fun z hz => hz.1) + have hC' : ContDiffOn ℝ ∞ (fun z : E × ℝ => C z.1) (U ×ˢ univ) := hC.comp contDiffOn_fst (fun z hz => hz.1) + have hR' : ContDiffOn ℝ ∞ (fun z : E × ℝ => R z.1) (U ×ˢ univ) := hR.comp contDiffOn_fst (fun z hz => hz.1) + have h1' : ContDiffOn ℝ ∞ (fun z : E × ℝ => e₁ z.1) (U ×ˢ univ) := h₁.comp contDiffOn_fst (fun z hz => hz.1) + have h2' : ContDiffOn ℝ ∞ (fun z : E × ℝ => e₂ z.1) (U ×ˢ univ) := h₂.comp contDiffOn_fst (fun z hz => hz.1) + have hV : ContDiffOn ℝ ∞ (fun z : E × ℝ => + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) (U ×ˢ univ) := + hR'.smul ((hα.cos.smul h1').add (hα.sin.smul h2')) + have hW := ((hQ.comp contDiffOn_fst (fun z hz => hz.1)).add hV).fderiv_of_isOpen + (hU.prod isOpen_univ) (m := ∞) (by simp) + have hβ := hα.fderiv_of_isOpen (hU.prod isOpen_univ) (m := ∞) (by simp) + have hn : ContDiffOn ℝ ∞ (fun z : E × ℝ => realNormalPart (Y z.1) (C z.1) (X z.1)) + (U ×ˢ univ) := by + intro z hz + exact (contDiffAt_realNormalPart + (hY'.contDiffAt ((hU.prod isOpen_univ).mem_nhds hz)) + (hC'.contDiffAt ((hU.prod isOpen_univ).mem_nhds hz)) + (hX'.contDiffAt ((hU.prod isOpen_univ).mem_nhds hz)) (hD z.1 hz.1)).contDiffWithinAt + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact (hX'.sub hn).add hV + · exact hY' + · exact hC' + · exact hW.clm_apply contDiffOn_const + · exact (hR'.mul (hβ.clm_apply contDiffOn_const)).smul + (((hα.sin.neg).smul h1').add (hα.cos.smul h2')) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..64c6ac8255112c7c540abf56745e0702d8830cd6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyThreshold.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyProfile + +namespace OAI + +/-! Bounds for the actual joint position/phase profile. All constants are +fixed before the angular function and its transverse derivatives. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_family_threshold {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → ∃ Λ : ℝ, 0 < Λ ∧ + ∀ α : E × ℝ → ℝ, ContDiffOn ℝ ∞ α (U ×ˢ univ) → + ∀ x ∈ K, ∀ t : ℝ, + let J := circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (Λ < fderiv ℝ α (x,t) (d,0) → H+2 < |profileCoefficients J 2|) := by + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hbounds⟩ := compact_circular_profile_threshold + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro H hH + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH + refine ⟨Λ,hΛ,?_⟩ + intro α hα x hx t + have hxU := hKU hx + have hαat : DifferentiableAt ℝ α (x,t) := + (hα.contDiffAt ((hU.prod isOpen_univ).mem_nhds + (show (x,t) ∈ U ×ˢ univ from ⟨hxU,mem_univ t⟩))).differentiableAt (by simp) + have hαslice : DifferentiableAt ℝ (fun y => α (y,t)) x := + hαat.comp x (differentiableAt_id.prodMk (differentiableAt_const t)) + have heq := circularFamilyProfile_spatial (X := X) (Y := Y) (C := C) + ((hQ.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((hR.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((h₁.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((h₂.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) hαat d + dsimp only + rw [heq] + obtain ⟨hreg,hlo,hhi,hd,hlarge⟩ := hprofile (fun y => α (y,t)) x hx hαslice + (fderiv ℝ α (x,t) (0,1)) + refine ⟨hreg,hlo,hhi,hd,?_⟩ + intro hderiv + apply hlarge + rw [fderiv_slice_first hαat] + exact hderiv + +lemma circularFamilyProfile_turn_iff (Q X Y C e₁ e₂ : E → Vec) (R : E → ℝ) + (α : E × ℝ → ℝ) (d x : E) (t : ℝ) + (hD : gramDet (Y x) (C x) ≠ 0) (hR : R x ≠ 0) + (hf : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) : + profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 3 = 0 ↔ + fderiv ℝ α (x,t) (0,1) = 0 := by + exact circularBoundaryProfile_turn_iff hD hR hf.1 hf.2.1 hf.2.2.1 + hf.2.2.2.1 hf.2.2.2.2.2.1 hf.2.2.2.2.1 hf.2.2.2.2.2.2 + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyWeights.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..9690c5e048a90979a1e2ea0256b1903a5ca88eb0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFamilyWeights.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.ShrinkingCircularWeight + +namespace OAI + +/-! The actual independent radius cutoffs for the selected circular geometry. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace CircularFamilyGeometry +variable {A : SmoothingAtlas M} (q : CircularFamilyGeometry A (A.centers × Fin 3)) + +def shrinkingWeights (a : A.centers × Fin 3) : M → ℝ := + shrinkingCircularWeight (a.1 : M) (A.weight a.1) (q.outerRadius a) (q.radius a) + +omit [CompactSpace M] in + theorem shrinkingWeights_data (hindex : ∀ a, (q.curves a).index = a.1) + (hregion : ∀ a, circularCoordinateRegion (a.1 : M) (q.outerRadius a) ⊆ + (coordinateChart (a.1 : M)).target) + (hw : ∀ i p, 0 ≤ A.weight i p) : + (∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (q.shrinkingWeights a)) ∧ + (∀ a p, 0 ≤ q.shrinkingWeights a p) ∧ + (∀ a p, 0 < q.shrinkingWeights a p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a)) ∧ + (∀ a, tsupport (q.shrinkingWeights a) ⊆ (chart (a.1 : M)).source) := by + have hs (a : A.centers × Fin 3) := shrinkingCircularWeight_smooth (a.1 : M) (A.weight a.1) + (A.weight_smooth a.1) (hregion a) (q.radius_outer a) + refine ⟨fun a => (hs a).1,?_,?_,?_⟩ + · intro a p + exact (shrinkingCircularWeight_nonneg_le (a.1 : M) (A.weight a.1) (hw a.1) + (q.radius_outer a).le p).1 + · intro a p + rw [hindex a] + apply shrinkingCircularWeight_pos_iff (a.1 : M) (A.weight a.1) (hw a.1) (q.radius_outer a).le + intro x + simpa only [hindex] using q.weight_positive a x + · intro a p hp + have hr : circularCoordinateRegion (a.1 : M) (q.radius a) ⊆ + (coordinateChart (a.1 : M)).target := by simpa only [hindex] using q.region a + have hsp := circularDiskClosure_source (a.1 : M) (q.radius a) hr ((hs a).2 hp) + rwa [coordinateChart_source,← chart_source] at hsp + +end CircularFamilyGeometry +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFlatBump.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFlatBump.lean new file mode 100644 index 0000000000000000000000000000000000000000..e10bb3ced46ae2dca17cf41e87ac8f0223270637 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFlatBump.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexQuadraticPhase +import Mathlib.Analysis.SpecialFunctions.SmoothTransition + +namespace OAI + +/-! Flat cutoffs for the actual circular disks in primitive preparation. +Their centers and radii are smooth parameters. -/ +noncomputable section +open Set Function Filter +open scoped Topology +open scoped ContDiff + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def circularRadiusSquared (c p : Base) : ℝ := (p.1-c.1)^2 + (p.2-c.2)^2 + +def circularFlatBump (c : Base) (r : ℝ) (p : Base) : ℝ := + expNegInvGlue (r^2 - circularRadiusSquared c p) + +lemma circularRadiusSquared_smooth (c : Base) : + ContDiff ℝ ∞ (circularRadiusSquared c) := by + unfold circularRadiusSquared + fun_prop + +lemma circularFlatBump_joint_smooth : + ContDiff ℝ ∞ (fun z : (Base × ℝ) × Base => circularFlatBump z.1.1 z.1.2 z.2) := by + apply expNegInvGlue.contDiff.comp + unfold circularRadiusSquared + fun_prop + +lemma circularFlatBump_smooth (c : Base) (r : ℝ) : + ContDiff ℝ ∞ (circularFlatBump c r) := by + exact expNegInvGlue.contDiff.comp (contDiff_const.sub (circularRadiusSquared_smooth c)) + +lemma circularFlatBump_nonneg (c : Base) (r : ℝ) (p : Base) : + 0 ≤ circularFlatBump c r p := expNegInvGlue.nonneg _ + +lemma circularFlatBump_zero_iff (c : Base) (r : ℝ) (p : Base) : + circularFlatBump c r p = 0 ↔ r^2 ≤ circularRadiusSquared c p := by + simp only [circularFlatBump, expNegInvGlue.zero_iff_nonpos, sub_nonpos] + +lemma circularFlatBump_pos_iff (c : Base) (r : ℝ) (p : Base) : + 0 < circularFlatBump c r p ↔ circularRadiusSquared c p < r^2 := by + constructor + · intro hp + apply lt_of_not_ge + intro hge + exact (ne_of_gt hp) ((circularFlatBump_zero_iff c r p).mpr hge) + · intro hp + exact expNegInvGlue.pos_of_pos (sub_pos.mpr hp) + +lemma circularFlatBump_support (c : Base) (r : ℝ) : + support (circularFlatBump c r) = {p | circularRadiusSquared c p < r^2} := by + ext p + change ¬ circularFlatBump c r p = 0 ↔ circularRadiusSquared c p < r^2 + rw [circularFlatBump_zero_iff,not_le] + +lemma circularRadiusSquared_le_norm {c p : Base} {r : ℝ} + (hp : circularRadiusSquared c p ≤ r^2) : ‖p-c‖ ≤ |r| := by + have h₁ : |p.1-c.1| ≤ |r| := by + apply sq_le_sq.mp + unfold circularRadiusSquared at hp + nlinarith [sq_nonneg (p.2-c.2)] + have h₂ : |p.2-c.2| ≤ |r| := by + apply sq_le_sq.mp + unfold circularRadiusSquared at hp + nlinarith [sq_nonneg (p.1-c.1)] + simpa only [Prod.norm_def, Prod.fst_sub, Prod.snd_sub, Real.norm_eq_abs, max_le_iff] + using And.intro h₁ h₂ + +lemma circularFlatBump_hasCompactSupport (c : Base) (r : ℝ) : + HasCompactSupport (circularFlatBump c r) := by + apply (isCompact_closedBall c |r|).of_isClosed_subset (isClosed_tsupport _) + apply closure_minimal + · intro p hp + rw [circularFlatBump_support] at hp + rw [Metric.mem_closedBall, dist_eq_norm] + exact circularRadiusSquared_le_norm hp.le + · exact Metric.isClosed_closedBall + +lemma circularRadiusSquared_derivative (c p v : Base) : + coordDeriv v (circularRadiusSquared c) p = + 2*((p.1-c.1)*v.1 + (p.2-c.2)*v.2) := by + have h₁ := (ContinuousLinearMap.fst ℝ ℝ ℝ).hasFDerivAt (x := p) |>.sub_const c.1 + have h₂ := (ContinuousLinearMap.snd ℝ ℝ ℝ).hasFDerivAt (x := p) |>.sub_const c.2 + have hd := (h₁.pow 2).add (h₂.pow 2) + have he : circularRadiusSquared c = + ((fun x : Base => ((ContinuousLinearMap.fst ℝ ℝ ℝ) x-c.1)^2) + + fun x : Base => ((ContinuousLinearMap.snd ℝ ℝ ℝ) x-c.2)^2) := rfl + change (fderiv ℝ (circularRadiusSquared c) p) v = _ + rw [he,hd.fderiv] + simp only [add_apply, smul_apply, ContinuousLinearMap.coe_fst', + ContinuousLinearMap.coe_snd', two_smul, smul_eq_mul] + ring + +lemma circularRadiusSquared_boundary_regular (c : Base) {r : ℝ} (hr : 0 < r) + {p : Base} (hp : circularRadiusSquared c p = r^2) : + phaseDerivative (circularRadiusSquared c) p ≠ 0 := by + intro hz + have hx := congrArg Prod.fst hz + have hy := congrArg Prod.snd hz + change coordDeriv dx (circularRadiusSquared c) p = 0 at hx + change coordDeriv dy (circularRadiusSquared c) p = 0 at hy + rw [circularRadiusSquared_derivative] at hx hy + simp only [dx, dy] at hx hy + unfold circularRadiusSquared at hp + nlinarith [sq_pos_of_pos hr] + +lemma circularFlatBump_spatial_derivative (q : Base × ℝ) (p : Base) : + fderiv ℝ (circularFlatBump q.1 q.2) p = + (fderiv ℝ (fun z : (Base × ℝ) × Base => circularFlatBump z.1.1 z.1.2 z.2) (q,p)).comp + (ContinuousLinearMap.inr ℝ (Base × ℝ) Base) := by + have hi : HasFDerivAt (fun x : Base => (q,x)) + (ContinuousLinearMap.inr ℝ (Base × ℝ) Base) p := by + exact (hasFDerivAt_const q p).prodMk (hasFDerivAt_id p) + exact (circularFlatBump_joint_smooth.differentiable (by simp) (q,p) |>.hasFDerivAt.comp p hi).fderiv + +lemma circularFlatBump_spatial_derivative_continuous : + Continuous (fun z : (Base × ℝ) × Base => fderiv ℝ (circularFlatBump z.1.1 z.1.2) z.2) := by + have hc := (circularFlatBump_joint_smooth.continuous_fderiv (by simp)).clm_comp + (continuous_const : Continuous (fun _ : (Base × ℝ) × Base => + ContinuousLinearMap.inr ℝ (Base × ℝ) Base)) + simpa only [circularFlatBump_spatial_derivative] using hc + +private lemma compact_parameter_nearby {E : Type*} [NormedAddCommGroup E] + (f : (Base × ℝ) × Base → E) (hf : Continuous f) + {K : Set Base} (hK : IsCompact K) (q : Base × ℝ) {eps : ℝ} (heps : 0 < eps) : + ∃ delta : ℝ, 0 < delta ∧ ∀ q' : Base × ℝ, ‖q'-q‖ < delta → ∀ p ∈ K, + ‖f (q',p)-f (q,p)‖ < eps := by + have hc : Continuous (fun z : (Base × ℝ) × Base => ‖f z-f (q,z.2)‖) := + (hf.sub (hf.comp (continuous_const.prodMk continuous_snd))).norm + have hev : ∀ᶠ q' in 𝓝 q, ∀ p ∈ K, ‖f (q',p)-f (q,p)‖ < eps := by + apply hK.eventually_forall_of_forall_eventually + intro p _ + have he : ‖f (q,p)-f (q,p)‖ < eps := by simpa only [sub_self,norm_zero] using heps + exact (hc.continuousAt (x := (q,p))).eventually (gt_mem_nhds he) + obtain ⟨delta,hdelta,hnear⟩ := Metric.eventually_nhds_iff.mp hev + exact ⟨delta,hdelta,fun q' hq' => hnear (by simpa only [dist_eq_norm] using hq')⟩ + +/-- Moving a center or radius changes its actual flat cutoff by an +arbitrarily small amount in C¹ on any fixed compact coordinate set. -/ +theorem circularFlatBump_compact_C1 {K : Set Base} (hK : IsCompact K) + (q : Base × ℝ) {eps : ℝ} (heps : 0 < eps) : + ∃ delta : ℝ, 0 < delta ∧ ∀ q' : Base × ℝ, ‖q'-q‖ < delta → ∀ p ∈ K, + |circularFlatBump q'.1 q'.2 p - circularFlatBump q.1 q.2 p| < eps ∧ + ‖fderiv ℝ (circularFlatBump q'.1 q'.2) p - + fderiv ℝ (circularFlatBump q.1 q.2) p‖ < eps := by + let f : (Base × ℝ) × Base → ℝ × (Base →L[ℝ] ℝ) := fun z => + (circularFlatBump z.1.1 z.1.2 z.2, fderiv ℝ (circularFlatBump z.1.1 z.1.2) z.2) + have hf : Continuous f := + circularFlatBump_joint_smooth.continuous.prodMk circularFlatBump_spatial_derivative_continuous + obtain ⟨delta,hdelta,hnear⟩ := compact_parameter_nearby f hf hK q heps + refine ⟨delta,hdelta,fun q' hq' p hp => ?_⟩ + have hh := hnear q' hq' p hp + constructor + · exact (norm_fst_le (f (q',p)-f (q,p))).trans_lt hh + · exact (norm_snd_le (f (q',p)-f (q,p))).trans_lt hh + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFrozenCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFrozenCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ab7d7b21449260f7be9b6553f27e27ef1d0cf25 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularFrozenCoefficients.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyThreshold + +namespace OAI + +/-! The first two canonical coefficients depend on the angle value and +fixed geometric data; no derivative of the chosen angle remains. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma circularFamilyProfile_frozen_coefficients {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {α : E × ℝ → ℝ} {x : E} {t : ℝ} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α (x,t)) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (d : E) : + profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 0 = + frozenSize X Y C R e₁ e₂ (x,α (x,t)) ∧ + profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 1 = + frozenFirst Q X Y C R e₁ e₂ d (x,α (x,t)) := by + rw [circularFamilyProfile_spatial hQ hR h₁ h₂ hα d] + refine ⟨rfl,?_⟩ + exact circularSpatialProfile_first _ hQ hR h₁ h₂ + (hα.comp x (differentiableAt_id.prodMk (differentiableAt_const t))) hframe + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularJetProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularJetProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..9abf63665e9ce22d8a2847b15e536d71664b72f6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularJetProfiles.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileMap +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyProfile + +namespace OAI + +/-! Identify the canonical boundary profiles with the actual circular loop +in the analytic second-jet coordinates. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma circular_angular_derivative {R : E → ℝ} {e₁ e₂ : E → Vec} + {α : E × ℝ → ℝ} {x : E} {t : ℝ} + (hR : DifferentiableAt ℝ R x) (h₁ : DifferentiableAt ℝ e₁ x) + (h₂ : DifferentiableAt ℝ e₂ x) (hα : DifferentiableAt ℝ α (x,t)) : + fderiv ℝ (fun z : E × ℝ => R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) + (x,t) (0,1) = (R x*fderiv ℝ α (x,t) (0,1)) • + angularDirection (e₁ x) (e₂ x) (α (x,t)) := by + have hf := hasFDerivAt_fst (𝕜 := ℝ) (p := (x,t)) + have hd := (hR.hasFDerivAt.comp (x,t) hf).smul + ((hα.hasFDerivAt.cos.smul (h₁.hasFDerivAt.comp (x,t) hf)).add + (hα.hasFDerivAt.sin.smul (h₂.hasFDerivAt.comp (x,t) hf))) + change HasFDerivAt (fun z : E × ℝ => + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) _ (x,t) at hd + rw [hd.fderiv] + ext i + simp [angularDirection,ContinuousLinearMap.comp_apply,ContinuousLinearMap.fst, + Function.comp_def] + ring + +end GeometryPreservation + +namespace SurfaceVelocityFamily.Loop +open NormalFrame VelocityFrame RealModes JetPolynomial JetVelocityCoordinates GeometryPreservation +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem circular_leadingProfileMap {R : LowJet → ℝ} {e₁ e₂ : LowJet → Vec} + {α : LowJet × ℝ → ℝ} (hR : ContDiffOn ℝ ∞ R O) + (h₁ : ContDiffOn ℝ ∞ e₁ O) (h₂ : ContDiffOn ℝ ∞ e₂ O) + (hα : ContDiffOn ℝ ∞ α (O ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + R J • direction (e₁ J) (e₂ J) (α (J,t))) + {J : LowJet} (hJ : J ∈ O) (t : ℝ) (D : LowJet) : + boundaryProfileMap (l.leadingProfileMap ((J,t),D)) = + circularFamilyProfile tangent (slot 1) (slot 2) (slot 6) R e₁ e₂ α D (J,t) := by + have hnb : (O : Set LowJet) ×ˢ (univ : Set ℝ) ∈ 𝓝 (J,t) := + (O.isOpen.prod isOpen_univ).mem_nhds ⟨hJ,mem_univ t⟩ + have hvgerm : l.velocity =ᶠ[𝓝 (J,t)] + (fun z : LowJet × ℝ => R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) := by + filter_upwards [hnb] with z hz + exact hvel z.1 hz.1 z.2 + have hlgerm : l.leadingVelocity =ᶠ[𝓝 (J,t)] + (fun z : LowJet × ℝ => tangent z.1+ + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) := by + filter_upwards [hvgerm] with z hz + exact congrArg (fun v => tangent z.1+v) hz + have hangle := circular_angular_derivative + ((hR.contDiffAt (O.isOpen.mem_nhds hJ)).differentiableAt (by simp)) + ((h₁.contDiffAt (O.isOpen.mem_nhds hJ)).differentiableAt (by simp)) + ((h₂.contDiffAt (O.isOpen.mem_nhds hJ)).differentiableAt (by simp)) + ((hα.contDiffAt hnb).differentiableAt (by simp)) + funext i + fin_cases i + · change spaceCoordinates (JetVelocityCoordinates.toEuclidean (l.leadingVelocity (J,t))) = _ + rw [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + exact hlgerm.eq_of_nhds + · change spaceCoordinates (JetVelocityCoordinates.toEuclidean (slot 2 J)) = _ + exact spaceCoordinates.apply_symm_apply _ + · change spaceCoordinates (JetVelocityCoordinates.toEuclidean (slot 6 J)) = _ + exact spaceCoordinates.apply_symm_apply _ + · change spaceCoordinates (JetVelocityCoordinates.toEuclidean + (fderiv ℝ l.leadingVelocity (J,t) (D,0))) = _ + rw [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] + exact congrArg (fun L : (LowJet × ℝ) →L[ℝ] Vec => L (D,0)) hlgerm.fderiv_eq + · change spaceCoordinates (JetVelocityCoordinates.toEuclidean + (fderiv ℝ l.velocity (J,t) (0,1))) = _ + rw [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply,hvgerm.fderiv_eq] + exact hangle + +end SurfaceVelocityFamily.Loop +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularMetricSequence.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularMetricSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..d287fba40230250eb03c5c3e824e41ab256ad223 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularMetricSequence.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrimitiveFamily + +namespace OAI + +/-! Ordered finite primitive realization. The metric convexity is required +only at the actual prefix metrics, preserving the order of the cycles. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace CircularPrimitiveFamily +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + +def ConvexMetric (d : CircularPrimitiveFamily B ι) (g : SmoothMetric M) (a : ι) : Prop := + ∀ p ∈ tsupport (B.weight (d.curves a).index), + ‖coordinateChart ((d.curves a).index : M) p-coordinateChart ((d.curves a).index : M) (d.curves a).index‖ ≤ d.chartRadius a → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g ((d.curves a).index : M)) + (centeredConvexPhase (d.linearPart a) (d.convexPart a) + (coordinateChart ((d.curves a).index : M) (d.curves a).index)) + (coordinateChart ((d.curves a).index : M) p) v v + + theorem realize_sequence (N : ℕ) : + ∀ (d : CircularPrimitiveFamily B (Fin N)) (g : Fin (N+1) → SmoothMetric M), + (∀ a : Fin N, (g a.succ).inner = (g a.castSucc).inner + + (fun p => (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p)) → + (∀ a : Fin N, d.ConvexMetric (g a.castSucc) a) → + ∀ (F : M → Space) (n : PreferredNormal F), + IsSmoothIsometricImmersion M (g 0) F → MetricGoodPhaseData (g 0) F → + FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) F n → + ∃ W : M → Space, IsSmoothIsometricImmersion M (g (Fin.last N)) W ∧ + Nonempty (MetricGoodPhaseData (g (Fin.last N)) W) ∧ Nonempty (PreferredNormal W) := by + classical + induction N with + | zero => + intro d g _ _ F n hF data _ + exact ⟨F,hF,⟨data⟩,⟨n⟩⟩ + | succ N ih => + intro d g hstep hconvex F n hF data hgeom + obtain ⟨W,hW,⟨good⟩,normal,hnew⟩ := d.one_step 0 hF n hgeom (hconvex 0) data + (g (Fin.succ 0)) (hstep 0) + let d' := d.restrict (Fin.succ : Fin N → Fin (N+1)) (Fin.succ_injective N) + let g' : Fin (N+1) → SmoothMetric M := fun a => g a.succ + have hstep' (a : Fin N) : (g' a.succ).inner = (g' a.castSucc).inner + + (fun p => (d'.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d'.phase a) p) := by + simpa only [g',d',restrict,Function.comp_apply,ConvexMetric,Fin.succ_castSucc] using hstep a.succ + have hconvex' (a : Fin N) : d'.ConvexMetric (g' a.castSucc) a := by + simpa only [g',d',restrict,Function.comp_apply,ConvexMetric,Fin.succ_castSucc] using hconvex a.succ + let f : Fin N → {j : Fin (N+1) // j ≠ 0} := fun a => ⟨a.succ,Fin.succ_ne_zero a⟩ + have hf : Function.Injective f := by + intro a b hab + exact Fin.succ_injective N (congrArg Subtype.val hab) + have hsub : boundaryCrossingSet d'.curves univ ⊆ + boundaryCrossingSet (fun j : {j : Fin (N+1) // j ≠ 0} => d.curves j) univ := by + rintro p ⟨a,_,b,_,hab,ha,hb⟩ + exact ⟨f a,mem_univ _,f b,mem_univ _,fun h => hab (hf h),ha,hb⟩ + have hgeom' : FiniteBoundaryGeometry d'.curves (boundaryCrossingSet d'.curves univ) W normal := + hnew.restrict f hf hsub + obtain ⟨V,hV,hgood,hN⟩ := ih d' g' hstep' hconvex' W normal hW good hgeom' + exact ⟨V,hV,hgood,hN⟩ + +end CircularPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPatchDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPatchDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbd8fb5e58d0e28529ef6f755a49bfffbc8d498a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPatchDefiners.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseDefiningFamily +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryLocalDefiners + +namespace OAI + +/-! Actual coordinate-circle defining functions in a nonlinear phase chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma circular_boundary_phase_definer_at (q b : M) (ell : Base) (L r : ℝ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {p : Base} (hp : p ∈ e.target) (hdom : e.symm p ∈ (coordinateChart q).target) + (hboundary : (coordinateChart q).symm (e.symm p) ∈ circularBoundary b r) + (htrans : circularPhaseDerivative q b ell L ((coordinateChart q).symm (e.symm p)) ≠ 0) : + ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ ∃ g : Base → ℝ, + ContDiffOn ℝ ∞ g N ∧ + (∀ x ∈ N, (coordinateChart q).symm (e.symm x) ∈ circularBoundary b r → g x = 0) ∧ + fderiv ℝ g p dy ≠ 0 := by + let m : Base → M := fun x => (coordinateChart q).symm (e.symm x) + let f : Base → Base := coordinateTransition b q ∘ e.symm + let φ : Base → ℝ := centeredAtlasPhase q ell L ∘ (coordinateChart b).symm + let ρ : Base → ℝ := circularRadiusSquared (coordinateChart b b) + let N : Set Base := e.target ∩ e.symm ⁻¹' (coordinateTransition b q).source + have hN : IsOpen N := e.open_target.inter + ((coordinateTransition b q).open_source.preimage hi.continuous) + have hxp : e.symm p ∈ (coordinateTransition b q).source := + ⟨hdom,hboundary.1⟩ + have hpN : p ∈ N := ⟨hp,hxp⟩ + have hf : ContDiffOn ℝ ∞ f N := + (coordinateTransition_smoothOn b q).comp hi.contDiffOn (fun _ hx => hx.2) + have hfp : DifferentiableAt ℝ f p := (hf.contDiffAt (hN.mem_nhds hpN)).differentiableAt (by simp) + have hqm : m p ∈ (coordinateChart q).source := (coordinateChart q).map_target hxp.1 + have hfpeq : f p = coordinateChart b (m p) := rfl + have hback : f p ∈ (coordinateTransition q b).source := by + rw [hfpeq] + exact coordinateTransition_mem_chart q b hboundary.1 hqm + have hφ : DifferentiableAt ℝ φ (f p) := + ((centeredConvexPhase_smooth ell L (coordinateChart q q)).differentiable (by simp) _).comp _ + (((coordinateTransition_smoothOn q b).contDiffAt + ((coordinateTransition q b).open_source.mem_nhds hback)).differentiableAt (by simp)) + have hcomp : φ ∘ f =ᶠ[𝓝 p] Prod.fst := by + filter_upwards [hN.mem_nhds hpN] with x hx + have hbx : m x ∈ (coordinateChart b).source := hx.2.2 + change centeredConvexPhase ell L (coordinateChart q q) + (coordinateChart q ((coordinateChart b).symm (coordinateChart b (m x)))) = x.1 + rw [(coordinateChart b).left_inv hbx] + change centeredConvexPhase ell L (coordinateChart q q) + (coordinateChart q ((coordinateChart q).symm (e.symm x))) = x.1 + rw [(coordinateChart q).right_inv hx.2.1,← hphase,e.right_inv hx.1] + have hdet : coordDet (fderiv ℝ f p) ≠ 0 := by + rw [show f = coordinateTransition b q ∘ e.symm from rfl, + fderiv_comp p (((coordinateTransition_smoothOn b q).contDiffAt + ((coordinateTransition b q).open_source.mem_nhds hxp)).differentiableAt (by simp)) + (hi.differentiable (by simp) p),coordDet_comp] + exact mul_ne_zero (coordinateTransition_det_ne b q hxp) + (coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source hi.contDiffOn + he.contDiffOn (fun _ hx => e.map_target hx) (fun x hx => e.right_inv hx) hp) + have hangle : phaseLinear (phaseDerivative φ (f p)) + (circularAngularTangent (coordinateChart b b) (f p)) ≠ 0 := htrans + have hcross : covectorDet (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) ≠ 0 := by + rw [show ρ = circularRadiusSquared (coordinateChart b b) from rfl, + circular_radius_phase_determinant] + exact mul_ne_zero (by norm_num) hangle + have hd := phase_chart_transverse_definer_at hφ + ((circularRadiusSquared_smooth (coordinateChart b b)).differentiable (by simp) _) hfp + hcomp hdet hcross + refine ⟨N,hN,hpN,fun x => ρ (f x)-r^2, + ((circularRadiusSquared_smooth (coordinateChart b b)).comp_contDiffOn hf).sub contDiffOn_const, + ?_,?_⟩ + · intro x hx hb + exact sub_eq_zero.mpr hb.2 + · change fderiv ℝ ((circularRadiusSquared (coordinateChart b b) ∘ f) - (fun _ => r^2)) p dy ≠ 0 + rw [fderiv_sub (((circularRadiusSquared_smooth (coordinateChart b b)).comp_contDiffOn hf).contDiffAt + (hN.mem_nhds hpN) |>.differentiableAt (by simp)) (differentiableAt_const _)] + simpa using hd + + + +variable [T2Space M] {ι : Type*} [Fintype ι] + +theorem circular_phase_defining_family_local (q : M) (ell : Base) (L R : ℝ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + (hQ : circularCoordinateRegion q R ⊆ (coordinateChart q).target) + (hcover : circularDiskClosure q R ⊆ ((coordinateChart q).trans e).source) + (center : ι → M) (r : ι → ℝ) (hr : ∀ j, 0 < r j) + (hreg : ∀ j, circularCoordinateRegion (center j) (r j) ⊆ (coordinateChart (center j)).target) + (E₀ : Set M) (hE₀ : E₀.Finite) + (hcross : ∀ j k, j ≠ k → circularBoundary (center j) (r j) ∩ circularBoundary (center k) (r k) ⊆ E₀) + (htan : ∀ j, (circularPhaseTangencies q (center j) ell L (r j) R).Finite) : + let E := (coordinateChart q).trans e + let Curves := fun j => E '' (circularBoundary (center j) (r j) ∩ circularDiskClosure q R) + (∀ j, IsCompact (Curves j)) ∧ ∃ P : Set Base, P.Finite ∧ + ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p dy ≠ 0 := by + classical + let E := (coordinateChart q).trans e + let C := fun j => circularBoundary (center j) (r j) + let S := circularDiskClosure q R + let Curves := fun j => E '' (C j ∩ S) + let Z := E₀ ∪ ⋃ j, circularPhaseTangencies q (center j) ell L (r j) R + let P := E '' Z + have hZ : Z.Finite := hE₀.union (Set.finite_iUnion htan) + have hP : P.Finite := hZ.image E + have hS : IsCompact S := circularDiskClosure_compact q R hQ + have hC (j : ι) : IsCompact (C j) := circularBoundary_compact (center j) (hr j) (hreg j) + have hcompact (j : ι) : IsCompact (Curves j) := + ((hC j).inter hS).image_of_continuousOn (E.continuousOn.mono (fun _ hp => hcover hp.2)) + have hback {x : Base} (hx : x ∈ ⋃ j, Curves j) : x ∈ E.target ∧ E.symm x ∈ S := by + obtain ⟨j,y,hy,rfl⟩ := mem_iUnion.mp hx + exact ⟨E.map_source (hcover hy.2),by rw [E.left_inv (hcover hy.2)]; exact hy.2⟩ + have hpoint {j : ι} {x : Base} (hx : x ∈ Curves j) : E.symm x ∈ C j := by + obtain ⟨y,hy,rfl⟩ := hx + rw [E.left_inv (hcover hy.2)] + exact hy.1 + refine ⟨hcompact,P,hP,?_⟩ + apply finite_boundary_local_definers C (fun j => (hC j).isClosed) E.symm + · intro p hp + exact E.continuousAt_symm (hback hp).1 + · intro p hp + obtain ⟨j,hj⟩ := mem_iUnion.mp hp + exact ⟨j,hpoint hj⟩ + · intro j k hjk p hp hpj hpk + have hz : E.symm p ∈ Z := Or.inl (hcross j k hjk ⟨hpj,hpk⟩) + exact ⟨E.symm p,hz,E.right_inv (hback hp).1⟩ + · intro j p hp hpj + have hpE : p ∈ E.target := (hback hp.1).1 + have hpT : p ∈ e.target := hpE.1 + have hnt : circularPhaseDerivative q (center j) ell L (E.symm p) ≠ 0 := by + intro hz + apply hp.2 + refine ⟨E.symm p,Or.inr (mem_iUnion.mpr ⟨j,?_⟩),E.right_inv hpE⟩ + exact ⟨⟨hpj,(hback hp.1).2⟩,hz⟩ + exact circular_boundary_phase_definer_at q (center j) ell L (r j) e he hi hphase + hpT hpE.2 hpj hnt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseBoundaryCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseBoundaryCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e39a7505d0de38dd2b342cc8c4c9aa87c47b2c5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseBoundaryCurve.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Primitive.CircularDiskTopology + +namespace OAI + +/-! Actual coordinate circles as the fixed phase curves of the induction. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def circularPhaseBoundaryCurve (i : B.centers) {r r₀ : ℝ} (hr : 0 < r) + (hsmall : r^2 < r₀^2) + (hpos : ∀ p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) r₀) + (hreg : circularCoordinateRegion (i : M) r ⊆ (coordinateChart (i : M)).target) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hcover : ∀ x ∈ circularCoordinateRegion (i : M) r, baseEquiv.symm x ∈ e.source) : + PhaseBoundaryCurve B where + index := i + phase := e + smooth := he + inverse_smooth := hi + carrier := circularBoundary (i : M) r + compact := circularBoundary_compact (i : M) hr hreg + source := by + intro p hp + refine ⟨?_,?_⟩ + · change p ∈ (chart (i : M)).source + rw [chart_source] + simpa only [coordinateChart_source] using hp.1 + · have hx := hcover (coordinateChart (i : M) p) hp.2.le + change baseEquiv.symm (baseEquiv (chart (i : M) p)) ∈ e.source at hx + change chart (i : M) p ∈ e.source + simpa only [baseEquiv.symm_apply_apply] using hx + active := by + intro p hp + apply ne_of_gt ((hpos p).mpr ?_) + exact ⟨hp.1,hp.2.trans_lt hsmall⟩ + +omit [CompactSpace M] in +@[simp] lemma circularPhaseBoundaryCurve_carrier (i : B.centers) {r r₀ : ℝ} (hr : 0 < r) + (hsmall : r^2 < r₀^2) + (hpos : ∀ p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) r₀) + (hreg : circularCoordinateRegion (i : M) r ⊆ (coordinateChart (i : M)).target) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hcover : ∀ x ∈ circularCoordinateRegion (i : M) r, baseEquiv.symm x ∈ e.source) : + (B.circularPhaseBoundaryCurve i hr hsmall hpos hreg e he hi hcover).carrier = + circularBoundary (i : M) r := rfl + +omit [CompactSpace M] in +lemma circular_closed_disk_phase_source [T2Space M] + (i : B.centers) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion (i : M) r ⊆ (coordinateChart (i : M)).target) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hcover : ∀ x ∈ circularCoordinateRegion (i : M) r, baseEquiv.symm x ∈ e.source) : + closure (circularCoordinateDisk (i : M) r) ⊆ (surfacePhaseChart (i : M) e).source := by + rw [circularCoordinateDisk_closure (i : M) hr hreg] + intro p hp + obtain ⟨hs,hx⟩ := (circularDiskClosure_iff (i : M) hreg p).mp hp + refine ⟨?_,?_⟩ + · change p ∈ (chart (i : M)).source + rw [chart_source] + simpa only [coordinateChart_source] using hs + · have h := hcover (coordinateChart (i : M) p) hx + change baseEquiv.symm (baseEquiv (chart (i : M) p)) ∈ e.source at h + change chart (i : M) p ∈ e.source + simpa only [baseEquiv.symm_apply_apply] using h + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDefiningFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDefiningFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..9952a6d6a8f7aef278b97ef63ef9ab8dada2fd06 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDefiningFamily.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseLocalDefiner +import OAI.Geometry.SurfaceImmersion.Primitive.CircularDiskTopology + +namespace OAI + +/-! The finite exceptional tangencies of actual coordinate circles supply +all local defining functions required by the supported angular loop. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι : Type*} [Fintype ι] + +theorem circular_phase_defining_family (q : M) (ell : Base) (L R : ℝ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + (hQ : circularCoordinateRegion q R ⊆ (coordinateChart q).target) + (hcover : circularDiskClosure q R ⊆ ((coordinateChart q).trans e).source) + (center : ι → M) (r : ι → ℝ) (hr : ∀ j, 0 < r j) + (hreg : ∀ j, circularCoordinateRegion (center j) (r j) ⊆ (coordinateChart (center j)).target) + (E₀ : Set M) (hE₀ : E₀.Finite) + (hcross : ∀ j k, j ≠ k → circularBoundary (center j) (r j) ∩ circularBoundary (center k) (r k) ⊆ E₀) + (htan : ∀ j, (circularPhaseTangencies q (center j) ell L (r j) R).Finite) : + let E := (coordinateChart q).trans e + let Curves := fun j => E '' (circularBoundary (center j) (r j) ∩ circularDiskClosure q R) + (∀ j, IsCompact (Curves j)) ∧ ∃ P : Set Base, P.Finite ∧ + ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p dy ≠ 0 := by + classical + let E := (coordinateChart q).trans e + let C := fun j => circularBoundary (center j) (r j) + let S := circularDiskClosure q R + let Curves := fun j => E '' (C j ∩ S) + let Z := E₀ ∪ ⋃ j, circularPhaseTangencies q (center j) ell L (r j) R + let P := E '' Z + have hZ : Z.Finite := hE₀.union (Set.finite_iUnion htan) + have hP : P.Finite := hZ.image E + have hS : IsCompact S := circularDiskClosure_compact q R hQ + have hC (j : ι) : IsCompact (C j) := circularBoundary_compact (center j) (hr j) (hreg j) + have hcompact (j : ι) : IsCompact (Curves j) := + ((hC j).inter hS).image_of_continuousOn (E.continuousOn.mono (fun _ hp => hcover hp.2)) + have hback {x : Base} (hx : x ∈ ⋃ j, Curves j) : x ∈ E.target ∧ E.symm x ∈ S := by + obtain ⟨j,y,hy,rfl⟩ := mem_iUnion.mp hx + exact ⟨E.map_source (hcover hy.2),by rw [E.left_inv (hcover hy.2)]; exact hy.2⟩ + have hpoint {j : ι} {x : Base} (hx : x ∈ Curves j) : E.symm x ∈ C j := by + obtain ⟨y,hy,rfl⟩ := hx + rw [E.left_inv (hcover hy.2)] + exact hy.1 + refine ⟨hcompact,P,hP,?_⟩ + apply finite_boundary_local_definers C (fun j => (hC j).isClosed) E.symm + · intro p hp + exact E.continuousAt_symm (hback hp).1 + · intro p hp + obtain ⟨j,hj⟩ := mem_iUnion.mp hp + exact ⟨j,hpoint hj⟩ + · intro j k hjk p hp hpj hpk + have hz : E.symm p ∈ Z := Or.inl (hcross j k hjk ⟨hpj,hpk⟩) + exact ⟨E.symm p,hz,E.right_inv (hback hp).1⟩ + · intro j p hp hpj + have hpE : p ∈ E.target := (hback hp.1).1 + have hpT : p ∈ e.target := hpE.1 + have hnt : circularPhaseDerivative q (center j) ell L (E.symm p) ≠ 0 := by + intro hz + apply hp.2 + refine ⟨E.symm p,Or.inr (mem_iUnion.mpr ⟨j,?_⟩),E.right_inv hpE⟩ + exact ⟨⟨hpj,(hback hp.1).2⟩,hz⟩ + exact circular_boundary_phase_definer q (center j) ell L (r j) e he hi hdom hphase + hpT hpj hnt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDependence.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDependence.lean new file mode 100644 index 0000000000000000000000000000000000000000..a814b31d456e4bf284f3301f0b088c22206ab60e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseDependence.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFrameBounds +import OAI.Geometry.SurfaceImmersion.Primitive.CenteredAtlasPrimitives + +namespace OAI + +/-! Exact affine dependence of supported circular phases on their linear +parameters. The curvature parameter stays fixed. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def circularPhase (i : B.centers) (ell : Base) (L : ℝ) : M → ℝ := + restore (i : M) (B.outer i) + (centeredConvexPhase ell L (coordinateChart (i : M) i) ∘ JetPolynomial.planeCoordinateIsometry) + +omit [CompactSpace M] [T2Space M] in +lemma circularPhase_smooth (i : B.centers) (ell : Base) (L : ℝ) : + ContMDiff planeModel 𝓘(ℝ) ∞ (B.circularPhase i ell L) := + restore_smooth (i : M) (B.outer_smooth i) (B.outer_support i) + ((centeredConvexPhase_smooth _ _ _).comp JetPolynomial.planeCoordinateIsometry.contDiff) + +omit [CompactSpace M] [T2Space M] in +lemma circularPhase_sub (i : B.centers) (ell ell₀ : Base) (L : ℝ) : + B.circularPhase i ell L-B.circularPhase i ell₀ L = + (ell.1-ell₀.1) • B.circularPhase i (1,0) 0+ + (ell.2-ell₀.2) • B.circularPhase i (0,1) 0 := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · simp only [circularPhase,restore,hp,indicator_of_mem,Function.comp_apply, + Pi.sub_apply,Pi.add_apply,Pi.smul_apply,smul_eq_mul,centeredConvexPhase, + convexQuadraticPhase,phaseLinear,Prod.fst_sub,Prod.snd_sub, + add_apply,smul_apply,ContinuousLinearMap.coe_fst',ContinuousLinearMap.coe_snd'] + ring + · simp only [circularPhase,restore,indicator_of_notMem hp,Pi.sub_apply, + Pi.add_apply,Pi.smul_apply,smul_eq_mul,sub_self,mul_zero,add_zero] + +omit [CompactSpace M] [T2Space M] in +lemma circularPhase_mfderiv_sub (i : B.centers) (ell ell₀ : Base) (L : ℝ) (p : M) : + (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell L) p)- + (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell₀ L) p) = + (ell.1-ell₀.1) • (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (1,0) 0) p)+ + (ell.2-ell₀.2) • (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (0,1) 0) p) := by + have h1 := ((B.circularPhase_smooth i ell L) p).mdifferentiableAt (by simp) + have h0 := ((B.circularPhase_smooth i ell₀ L) p).mdifferentiableAt (by simp) + have hx := ((B.circularPhase_smooth i (1,0) 0) p).mdifferentiableAt (by simp) + have hy := ((B.circularPhase_smooth i (0,1) 0) p).mdifferentiableAt (by simp) + erw [← mfderiv_sub h1 h0,B.circularPhase_sub] + erw [mfderiv_add (hx.const_smul _) (hy.const_smul _), + const_smul_mfderiv hx,const_smul_mfderiv hy] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseLocalDefiner.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseLocalDefiner.lean new file mode 100644 index 0000000000000000000000000000000000000000..030c5c19f380ba961640d4024aa84d74e91a9e60 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseLocalDefiner.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransverseDefiner +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryLocalDefiners + +namespace OAI + +/-! Actual coordinate-circle defining functions in a nonlinear phase chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma circular_boundary_phase_definer (q b : M) (ell : Base) (L r : ℝ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {p : Base} (hp : p ∈ e.target) + (hboundary : (coordinateChart q).symm (e.symm p) ∈ circularBoundary b r) + (htrans : circularPhaseDerivative q b ell L ((coordinateChart q).symm (e.symm p)) ≠ 0) : + ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ ∃ g : Base → ℝ, + ContDiffOn ℝ ∞ g N ∧ + (∀ x ∈ N, (coordinateChart q).symm (e.symm x) ∈ circularBoundary b r → g x = 0) ∧ + fderiv ℝ g p dy ≠ 0 := by + let m : Base → M := fun x => (coordinateChart q).symm (e.symm x) + let f : Base → Base := coordinateTransition b q ∘ e.symm + let φ : Base → ℝ := centeredAtlasPhase q ell L ∘ (coordinateChart b).symm + let ρ : Base → ℝ := circularRadiusSquared (coordinateChart b b) + let N : Set Base := e.target ∩ e.symm ⁻¹' (coordinateTransition b q).source + have hN : IsOpen N := e.open_target.inter + ((coordinateTransition b q).open_source.preimage hi.continuous) + have hxp : e.symm p ∈ (coordinateTransition b q).source := + ⟨hdom (e.map_target hp),hboundary.1⟩ + have hpN : p ∈ N := ⟨hp,hxp⟩ + have hf : ContDiffOn ℝ ∞ f N := + (coordinateTransition_smoothOn b q).comp hi.contDiffOn (fun _ hx => hx.2) + have hfp : DifferentiableAt ℝ f p := (hf.contDiffAt (hN.mem_nhds hpN)).differentiableAt (by simp) + have hqm : m p ∈ (coordinateChart q).source := (coordinateChart q).map_target hxp.1 + have hfpeq : f p = coordinateChart b (m p) := rfl + have hback : f p ∈ (coordinateTransition q b).source := by + rw [hfpeq] + exact coordinateTransition_mem_chart q b hboundary.1 hqm + have hφ : DifferentiableAt ℝ φ (f p) := + ((centeredConvexPhase_smooth ell L (coordinateChart q q)).differentiable (by simp) _).comp _ + (((coordinateTransition_smoothOn q b).contDiffAt + ((coordinateTransition q b).open_source.mem_nhds hback)).differentiableAt (by simp)) + have hcomp : φ ∘ f =ᶠ[𝓝 p] Prod.fst := by + filter_upwards [hN.mem_nhds hpN] with x hx + have hbx : m x ∈ (coordinateChart b).source := hx.2.2 + change centeredConvexPhase ell L (coordinateChart q q) + (coordinateChart q ((coordinateChart b).symm (coordinateChart b (m x)))) = x.1 + rw [(coordinateChart b).left_inv hbx] + change centeredConvexPhase ell L (coordinateChart q q) + (coordinateChart q ((coordinateChart q).symm (e.symm x))) = x.1 + rw [(coordinateChart q).right_inv hx.2.1,← hphase,e.right_inv hx.1] + have hdet : coordDet (fderiv ℝ f p) ≠ 0 := by + rw [show f = coordinateTransition b q ∘ e.symm from rfl, + fderiv_comp p (((coordinateTransition_smoothOn b q).contDiffAt + ((coordinateTransition b q).open_source.mem_nhds hxp)).differentiableAt (by simp)) + (hi.differentiable (by simp) p),coordDet_comp] + exact mul_ne_zero (coordinateTransition_det_ne b q hxp) + (coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source hi.contDiffOn + he.contDiffOn (fun _ hx => e.map_target hx) (fun x hx => e.right_inv hx) hp) + have hangle : phaseLinear (phaseDerivative φ (f p)) + (circularAngularTangent (coordinateChart b b) (f p)) ≠ 0 := htrans + have hcross : covectorDet (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) ≠ 0 := by + rw [show ρ = circularRadiusSquared (coordinateChart b b) from rfl, + circular_radius_phase_determinant] + exact mul_ne_zero (by norm_num) hangle + have hd := phase_chart_transverse_definer_at hφ + ((circularRadiusSquared_smooth (coordinateChart b b)).differentiable (by simp) _) hfp + hcomp hdet hcross + refine ⟨N,hN,hpN,fun x => ρ (f x)-r^2, + ((circularRadiusSquared_smooth (coordinateChart b b)).comp_contDiffOn hf).sub contDiffOn_const, + ?_,?_⟩ + · intro x hx hb + exact sub_eq_zero.mpr hb.2 + · change fderiv ℝ ((circularRadiusSquared (coordinateChart b b) ∘ f) - (fun _ => r^2)) p dy ≠ 0 + rw [fderiv_sub (((circularRadiusSquared_smooth (coordinateChart b b)).comp_contDiffOn hf).contDiffAt + (hN.mem_nhds hpN) |>.differentiableAt (by simp)) (differentiableAt_const _)] + simpa using hd + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebbb130b43d8bfe9f4c83c41957933bf71ec6558 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPhaseTolerance.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseDependence + +namespace OAI + +/-! One compact-frame constant controls the phase perturbation before +any independent choices or cycle count. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem circularPhase_frame_bound : ∃ D : ℝ, 1 ≤ D ∧ + ∀ i j p, p ∈ tsupport (B.weight j) → ∀ (ell ell₀ : Base) (L : ℝ), + ‖B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell L) p)- + B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell₀ L) p)‖ ≤ + D*‖ell-ell₀‖ := by + choose Dx hDx hx using fun i => B.covectorFrame_bound (B.circularPhase i (1,0) 0) + (B.circularPhase_smooth i (1,0) 0) + choose Dy hDy hy using fun i => B.covectorFrame_bound (B.circularPhase i (0,1) 0) + (B.circularPhase_smooth i (0,1) 0) + let D := 1+∑ i, (Dx i+Dy i) + have hD : 1 ≤ D := by + have := Finset.sum_nonneg (s := Finset.univ) (fun i _ => add_nonneg (zero_le_one.trans (hDx i)) + (zero_le_one.trans (hDy i))) + dsimp only [D]; linarith + refine ⟨D,hD,?_⟩ + intro i j p hp ell ell₀ L + have he : B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell L) p)- + B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell₀ L) p) = + (ell.1-ell₀.1) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (1,0) 0) p)+ + (ell.2-ell₀.2) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (0,1) 0) p) := by + unfold covectorFrame + erw [← ContinuousLinearMap.sub_comp,B.circularPhase_mfderiv_sub] + erw [ContinuousLinearMap.add_comp,ContinuousLinearMap.smul_comp,ContinuousLinearMap.smul_comp] + rw [he] + have h1 : |ell.1-ell₀.1| ≤ ‖ell-ell₀‖ := by simpa only [Prod.fst_sub,Real.norm_eq_abs] using norm_fst_le (ell-ell₀) + have h2 : |ell.2-ell₀.2| ≤ ‖ell-ell₀‖ := by simpa only [Prod.snd_sub,Real.norm_eq_abs] using norm_snd_le (ell-ell₀) + have hxy : Dx i+Dy i ≤ D := by + have := Finset.single_le_sum (fun i _ => add_nonneg (zero_le_one.trans (hDx i)) + (zero_le_one.trans (hDy i))) (Finset.mem_univ i) + dsimp only [D]; linarith + calc + _ ≤ ‖(ell.1-ell₀.1) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (1,0) 0) p)‖+ + ‖(ell.2-ell₀.2) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (0,1) 0) p)‖ := norm_add_le _ _ + _ ≤ ‖ell-ell₀‖*Dx i+‖ell-ell₀‖*Dy i := by + simp only [norm_smul,Real.norm_eq_abs] + exact add_le_add (mul_le_mul h1 (hx i j p hp) (norm_nonneg _) (norm_nonneg _)) + (mul_le_mul h2 (hy i j p hp) (norm_nonneg _) (norm_nonneg _)) + _ = (Dx i+Dy i)*‖ell-ell₀‖ := by ring + _ ≤ D*‖ell-ell₀‖ := mul_le_mul_of_nonneg_right hxy (norm_nonneg _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrefixMetrics.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrefixMetrics.lean new file mode 100644 index 0000000000000000000000000000000000000000..4de7f097a3e0bce1e9f401495341e6a20b89a8e0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrefixMetrics.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularMetricSequence +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCycleAssembly + +namespace OAI + +/-! The actual ordered prefix metrics of a finite circular family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance prefixFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance prefixFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance prefixDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance prefixDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance prefixSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance prefixSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +omit [CompactSpace M] [T2Space M] in +lemma metric_eq_of_inner_eq {g h : SmoothMetric M} (he : g.inner = h.inner) : g = h := by + cases g + cases h + cases he + rfl + +namespace CircularPrimitiveFamily +variable {B : SmoothingAtlas M} {N : ℕ} (d : CircularPrimitiveFamily B (Fin N)) + +def totalTensor (p : M) : CovariantTwoTensor p := + ∑ a, (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p + +def smoothFamily : SmoothPrimitiveFamily (Fin N) d.totalTensor where + amplitude := d.amplitude + phase := d.phase + smoothAmplitude := d.amplitude_smooth + smoothPhase := d.phase_smooth + sum_eq _ := rfl + +def prefixIndices (k : Fin (N+1)) : Finset (Fin N) := + Finset.univ.filter (fun a => a.val < k.val) + +lemma prefixIndices_zero : prefixIndices (0 : Fin (N+1)) = ∅ := by + ext a + simp [prefixIndices] + +lemma prefixIndices_last : prefixIndices (Fin.last N) = Finset.univ := by + ext a + simp [prefixIndices] + +lemma prefixIndices_step (a : Fin N) : prefixIndices a.succ = insert a (prefixIndices a.castSucc) := by + ext b + simp only [prefixIndices,Finset.mem_filter,Finset.mem_univ,true_and,Finset.mem_insert, + Fin.val_succ,Fin.val_castSucc] + constructor + · intro h + by_cases he : b = a + · exact Or.inl he + · exact Or.inr (by have hn : b.val ≠ a.val := fun h => he (Fin.ext h); omega) + · intro h + rcases h with rfl | h <;> omega + +lemma not_mem_prefixIndices (a : Fin N) : a ∉ prefixIndices a.castSucc := by + simp [prefixIndices] + +def prefixMetric (g : SmoothMetric M) (k : Fin (N+1)) : SmoothMetric M := + d.smoothFamily.cycleMetric B g 1 0 (prefixIndices k) + +omit [T2Space M] in +lemma prefixMetric_inner (g : SmoothMetric M) (k : Fin (N+1)) : + (d.prefixMetric g k).inner = g.inner + + (fun p => ∑ a ∈ prefixIndices k, (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p) := by + funext p + change g.inner p + (d.smoothFamily.cycleTensor 1 0 (prefixIndices k) p) = _ + simp [SmoothPrimitiveFamily.cycleTensor,SmoothPrimitiveFamily.term,smoothFamily] + +omit [T2Space M] in +lemma prefixMetric_zero (g : SmoothMetric M) : d.prefixMetric g 0 = g := by + apply metric_eq_of_inner_eq + rw [d.prefixMetric_inner,prefixIndices_zero] + funext p + simp + +omit [T2Space M] in +lemma prefixMetric_step (g : SmoothMetric M) (a : Fin N) : + (d.prefixMetric g a.succ).inner = (d.prefixMetric g a.castSucc).inner + + (fun p => (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p) := by + rw [d.prefixMetric_inner,d.prefixMetric_inner,prefixIndices_step] + funext p + simp only [Pi.add_apply,Finset.sum_insert (not_mem_prefixIndices a)] + abel + +omit [T2Space M] in +lemma prefixMetric_last (g : SmoothMetric M) : + (d.prefixMetric g (Fin.last N)).inner = g.inner+d.totalTensor := by + rw [d.prefixMetric_inner,prefixIndices_last] + rfl + + theorem realize_total (g h : SmoothMetric M) + (htarget : h.inner = g.inner+d.totalTensor) + (hconvex : ∀ a : Fin N, d.ConvexMetric (d.prefixMetric g a.castSucc) a) + {F : M → Space} (n : PreferredNormal F) (hF : IsSmoothIsometricImmersion M g F) + (data : MetricGoodPhaseData g F) + (hgeom : FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) F n) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) := by + have hstart : d.prefixMetric g 0 = g := d.prefixMetric_zero g + have hend : d.prefixMetric g (Fin.last N) = h := + metric_eq_of_inner_eq ((d.prefixMetric_last g).trans htarget.symm) + have hF' : IsSmoothIsometricImmersion M (d.prefixMetric g 0) F := by rwa [hstart] + have hdata : MetricGoodPhaseData (d.prefixMetric g 0) F := by rwa [hstart] + obtain ⟨W,hW,hgood,_⟩ := realize_sequence N d (d.prefixMetric g) + (d.prefixMetric_step g) hconvex F n hF' hdata hgeom + rw [hend] at hW hgood + exact ⟨W,hW,hgood⟩ + +end CircularPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveBoundaryStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveBoundaryStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..e277b8ea51c4dce6912f877f66da58ba63daf8a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveBoundaryStep.lean @@ -0,0 +1,230 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.GlobalCircularNormal +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteExteriorCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricNormalExtension +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance boundaryCircularPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance boundaryCircularPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance boundaryCircularPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance boundaryCircularPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance boundaryCircularPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance boundaryCircularPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem circular_primitive_boundary_step [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, data.A.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := data.A.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) (B : SmoothingAtlas M) (curves : ι → PhaseBoundaryCurve B) + (n₀ : PreferredNormal F) + (hglobal : ∀ j p, p ∈ (curves j).carrier → (curves j).second F p ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize ((curves j).second F p)) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, data.A.weight i p ≠ 0) + (E₀ : Set M) (hE₀ : E₀.Finite) (hE₀f : Disjoint E₀ (frontier D)) + (hsupport : data.A.phaseSurfaceSupport i e K = closure D) + (hDC : ∀ p ∈ closure D, e (chart (i : M) p) ∈ C) + (hcurveChart : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + baseEquiv (e (chart (i : M) p)) ∈ Curves j) + (hvector : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) = + fderiv ℝ (surfacePhaseTransition ((curves j).index : M) (curves j).phase (i : M) e) + ((curves j).coordinate p) SmallModes.dy) + (hworldBoundary : ∀ p ∈ frontier D, + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) + SmallModes.dy SmallModes.dy (baseEquiv (e (chart (i : M) p))))) + (haFrontier : ∀ p ∈ frontier D, a (baseEquiv (e (chart (i : M) p))) = 0) + (hpositive : ∀ j p, p ∈ (curves j).carrier → p ∈ frontier D → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) + (hVfrontier : ∀ p ∈ frontier D, baseEquiv (e (chart (i : M) p)) ∉ V) + (hσD : ∀ j, (surfacePhaseChart (i : M) e).symm (x j) ∈ E₀ ∩ D) (hinsideCover : ∀ p ∈ E₀, p ∈ D → ∃ s, (surfacePhaseChart (i : M) e).symm (x s) = p) + (hglobalCross : ∀ j k, j ≠ k → ∀ p ∈ E₀, + p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p) ∧ + 0 < (curves k).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) ∧ + 0 < (curves j).crossing (curves k) F p ∧ 0 < (curves k).crossing (curves j) F p) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + (∀ j p, p ∈ (curves j).carrier → (curves j).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves j).second W p)) ∧ + ∀ j k, j ≠ k → ∀ p ∈ E₀, p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second W p ⬝ᵥ spaceCoordinates (N.vector p) ∧ + 0 < (curves k).second W p ⬝ᵥ spaceCoordinates (N.vector p)) ∧ + 0 < (curves j).crossing (curves k) W p ∧ 0 < (curves k).crossing (curves j) W p := by + classical + have : Fintype ι := Fintype.ofFinite ι + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + obtain ⟨ρ,hρ,houtside⟩ := data.A.finite_exterior_crossing_preservation B hFiso n₀ + data.outer_locally_one curves hDr hE₀ hglobalCross + have hsmall : 0 < ρ/4 := by positivity + obtain ⟨z,hz,hzρ,hz1,W,hW,hdata,N,hNav,hNout,hNcross,G,hG,hGF,V₀,hV₀,hWV,hVouter,hVsupport⟩ := + data.global_circular_primitive_normal hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess ha0 hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hold left right x hxinj hxE + hV hxV honly hfirst hslopes B curves n₀ hglobal hD hDr hDs hDe hDw E₀ hE₀ hE₀f + hsupport hDC hcurveChart hvector hworldBoundary haFrontier hpositive hVfrontier hσD + (ρ/4) hsmall (ρ/4) hsmall + have hz8 : z^8 ≤ z := calc + z^8 = z*z^7 := by ring + _ ≤ z*1 := mul_le_mul_of_nonneg_left (pow_le_one₀ hz.le hz1) hz.le + _ = z := mul_one _ + have hsum : ρ/4+z^8 < ρ := by linarith + have hout := houtside G V₀ W hG hV₀ h hW (ρ/4) (z^8) hsmall.le (pow_nonneg hz.le _) + hsum (fun j => (hGF j).mono_order (by decide)) hWV + (fun p hp => hVsupport p (by rwa [hsupport])) N hNout + have hsource (p : M) (hp : p ∈ D) : p ∈ (surfacePhaseChart (i : M) e).source := + ⟨hDs (subset_closure hp),hDe (subset_closure hp)⟩ + have hsecond (j : ι) (p : M) (hp : p ∈ (curves j).carrier) (hpD : p ∈ D) : + (curves j).second W p = realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) + (baseEquiv (e (chart (i : M) p))) := by + rw [(curves j).second_transition data.A i e he hi hW hp (hsource p hpD) + (hDw p (subset_closure hpD)),← hvector j p hp (subset_closure hpD)] + have hcrossing (j k : ι) (p : M) (hpj : p ∈ (curves j).carrier) + (hpk : p ∈ (curves k).carrier) (hpD : p ∈ D) := + (curves j).crossing_transition (curves k) data.A i e he hi hW hpj hpk (hsource p hpD) + (hDw p (subset_closure hpD)) + refine ⟨W,hW,hdata,N,hNav,?_⟩ + intro j k hjk p hpE hpj hpk + by_cases hpD : p ∈ D + · obtain ⟨s,hsp⟩ := hinsideCover p hpE hpD + have hxT : x s ∈ (surfacePhaseChart (i : M) e).target := by + constructor + · change baseEquiv.symm (x s) ∈ e.target + exact (hCS (hEC _ (hxE s))).2 + · change e.symm (baseEquiv.symm (x s)) ∈ (chart (i : M)).target + have hh := hactiveC _ (hEC _ (hxE s)) + by_contra hn + simp only [SmoothingAtlas.chartWeight,indicator_of_notMem hn] at hh + exact hh rfl + have hxp : baseEquiv (e (chart (i : M) p)) = x s := by + rw [← hsp] + exact (surfacePhaseChart (i : M) e).right_inv hxT + have hj : j = left s ∨ j = right s := by + apply honly s j + rw [← hxp] + exact hcurveChart j p hpj (subset_closure hpD) + have hk : k = left s ∨ k = right s := by + apply honly s k + rw [← hxp] + exact hcurveChart k p hpk (subset_closure hpD) + have hjk' := hcrossing j k p hpj hpk hpD + have hkj' := hcrossing k j p hpk hpj hpD + dsimp only at hjk' hkj' + rw [← hvector j p hpj (subset_closure hpD),← hvector k p hpk (subset_closure hpD)] at hjk' + rw [← hvector k p hpk (subset_closure hpD),← hvector j p hpj (subset_closure hpD)] at hkj' + rw [hsecond j p hpj hpD,hsecond k p hpk hpD,hjk',hkj',hxp] + have hs := hNcross s + dsimp only at hs + rw [hsp] at hs + rcases hj with hj | hj <;> rcases hk with hk | hk + · exact (hjk (hj.trans hk.symm)).elim + · subst j; subst k + exact ⟨⟨hs.2.2.1,hs.2.2.2⟩,hs.1,hs.2.1⟩ + · subst j; subst k + exact ⟨⟨hs.2.2.2,hs.2.2.1⟩,hs.2.1,hs.1⟩ + · exact (hjk (hj.trans hk.symm)).elim + · exact hout j k hjk p hpE hpD hpj hpk + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b15076308b0a3cf66a09510e84391494f88dbf7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveFamily.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryRemovalStep + +namespace OAI + +/-! The concrete finite circular data used in the global primitive iteration. +All geometric fields are furnished by the generic radius/phase preparation. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +structure CircularPrimitiveFamily (B : SmoothingAtlas M) (ι : Type*) [Fintype ι] where + curves : ι → PhaseBoundaryCurve B + radius : ι → ℝ + outerRadius : ι → ℝ + chartRadius : ι → ℝ + linearPart : ι → Base + convexPart : ι → ℝ + radius_pos : ∀ a, 0 < radius a + radius_outer : ∀ a, (radius a)^2 < (outerRadius a)^2 + radius_chart : ∀ a, radius a < chartRadius a + weight_positive : ∀ a p, 0 < B.weight (curves a).index p ↔ + p ∈ circularCoordinateDisk ((curves a).index : M) (outerRadius a) + region : ∀ a, circularCoordinateRegion ((curves a).index : M) (radius a) ⊆ + (coordinateChart ((curves a).index : M)).target + carrier : ∀ a, (curves a).carrier = circularBoundary ((curves a).index : M) (radius a) + cover : ∀ a x, x ∈ circularCoordinateRegion ((curves a).index : M) (radius a) → + baseEquiv.symm x ∈ (curves a).phase.source + first_coordinate : ∀ a x, (baseEquiv ((curves a).phase x)).1 = + centeredConvexPhase (linearPart a) (convexPart a) + (coordinateChart ((curves a).index : M) (curves a).index) (baseEquiv x) + pair_finite : ∀ a b, a ≠ b → ((curves a).carrier ∩ (curves b).carrier).Finite + triple_empty : ∀ a b c, a ≠ b → a ≠ c → b ≠ c → + (curves a).carrier ∩ (curves b).carrier ∩ (curves c).carrier = ∅ + tangencies_finite : ∀ a b, (circularPhaseTangencies ((curves a).index : M) ((curves b).index : M) + (linearPart a) (convexPart a) (radius b) (radius a)).Finite + independent : ∀ a b, a ≠ b → ∀ p ∈ boundaryCrossingSet curves univ, + p ∈ (coordinateChart ((curves a).index : M)).source → + p ∈ (coordinateChart ((curves b).index : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase ((curves a).index : M) (linearPart a) (convexPart a) ∘ + (coordinateChart ((curves a).index : M)).symm) (coordinateChart ((curves a).index : M) p)) + (phaseDerivative (centeredAtlasPhase ((curves b).index : M) (linearPart b) (convexPart b) ∘ + (coordinateChart ((curves a).index : M)).symm) (coordinateChart ((curves a).index : M) p)) ≠ 0 + amplitude : ι → M → ℝ + phase : ι → M → ℝ + phase_smooth : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phase a) + amplitude_smooth : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (amplitude a) + amplitude_nonneg : ∀ a p, 0 ≤ amplitude a p + amplitude_positive : ∀ a p, 0 < amplitude a p ↔ + p ∈ circularCoordinateDisk ((curves a).index : M) (radius a) + phase_germ : ∀ a p, p ∈ circularCoordinateDisk ((curves a).index : M) (radius a) → + phase a =ᶠ[𝓝 p] (fun q => ((curves a).phase (chart ((curves a).index : M) q)) 0) + +namespace CircularPrimitiveFamily +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + + def restrict (d : CircularPrimitiveFamily B ι) {κ : Type*} [Fintype κ] + (f : κ → ι) (hf : Function.Injective f) : CircularPrimitiveFamily B κ where + curves := d.curves ∘ f + radius := d.radius ∘ f + outerRadius := d.outerRadius ∘ f + chartRadius := d.chartRadius ∘ f + linearPart := d.linearPart ∘ f + convexPart := d.convexPart ∘ f + radius_pos a := d.radius_pos (f a) + radius_outer a := d.radius_outer (f a) + radius_chart a := d.radius_chart (f a) + weight_positive a := d.weight_positive (f a) + region a := d.region (f a) + carrier a := d.carrier (f a) + cover a := d.cover (f a) + first_coordinate a := d.first_coordinate (f a) + pair_finite a b hab := d.pair_finite (f a) (f b) (fun h => hab (hf h)) + triple_empty a b c hab hac hbc := d.triple_empty (f a) (f b) (f c) + (fun h => hab (hf h)) (fun h => hac (hf h)) (fun h => hbc (hf h)) + tangencies_finite a b := d.tangencies_finite (f a) (f b) + independent a b hab p hp hpa hpb := by + apply d.independent (f a) (f b) (fun h => hab (hf h)) p _ hpa hpb + obtain ⟨j,_,k,_,hjk,hj,hk⟩ := hp + exact ⟨f j,mem_univ _,f k,mem_univ _,fun h => hjk (hf h),hj,hk⟩ + amplitude := d.amplitude ∘ f + phase := d.phase ∘ f + phase_smooth a := d.phase_smooth (f a) + amplitude_smooth a := d.amplitude_smooth (f a) + amplitude_nonneg a := d.amplitude_nonneg (f a) + amplitude_positive a := d.amplitude_positive (f a) + phase_germ a := d.phase_germ (f a) + + theorem one_step [DecidableEq ι] (d : CircularPrimitiveFamily B ι) (a : ι) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) (hgeom : FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) F n) + (hconvex : ∀ p ∈ tsupport (B.weight (d.curves a).index), + ‖coordinateChart ((d.curves a).index : M) p-coordinateChart ((d.curves a).index : M) (d.curves a).index‖ ≤ d.chartRadius a → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g ((d.curves a).index : M)) + (centeredConvexPhase (d.linearPart a) (d.convexPart a) + (coordinateChart ((d.curves a).index : M) (d.curves a).index)) + (coordinateChart ((d.curves a).index : M) p) v v) + (data : MetricGoodPhaseData g F) (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + FiniteBoundaryGeometry (fun j : {j : ι // j ≠ a} => d.curves j) + (boundaryCrossingSet (fun j : {j : ι // j ≠ a} => d.curves j) univ) W N := by + apply circular_boundary_removal_step d.curves a d.radius d.outerRadius d.chartRadius + d.radius_pos (d.radius_outer a) (d.radius_chart a) (d.weight_positive a) d.region d.carrier d.cover + d.linearPart d.convexPart d.first_coordinate d.pair_finite d.triple_empty + (d.tangencies_finite a) ?_ hF n hgeom hconvex (d.amplitude_smooth a) + (d.amplitude_nonneg a) (d.amplitude_positive a) (d.phase_germ a) data h htarget + intro j k hjk p hp hj hk + apply d.independent j k hjk p _ hj hk + rwa [boundaryCrossingSet_eq_circular d.curves d.radius d.carrier] + +end CircularPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..e552a8c148ebd0a40145bda63fbcd15fea9df049 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveRealization.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularSupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchRealization + +namespace OAI + +/-! Exact realization of an actual circular primitive from the fixed +metric convexity estimate and preserved boundary-normal condition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +theorem realize_circular_metric + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) {r r₀ R : ℝ} (hr : 0 < r) + (hrr₀ : r^2 < r₀^2) (hrR : r < R) + (hpos : ∀ p, 0 < B.weight c.index p ↔ p ∈ circularCoordinateDisk (c.index : M) r₀) + (hreg : circularCoordinateRegion (c.index : M) r ⊆ (coordinateChart (c.index : M)).target) + (hfront : c.carrier = circularBoundary (c.index : M) r) + (hcover : ∀ x ∈ circularCoordinateRegion (c.index : M) r, baseEquiv.symm x ∈ c.phase.source) + {localPhase : Base → ℝ} (hlocalPhase : ContDiff ℝ ∞ localPhase) + (hphase : ∀ x, (JetPolynomial.realPhaseChart c.phase x).1 = localPhase x) + (hconvex : ∀ p ∈ tsupport (B.weight c.index), + ‖coordinateChart (c.index : M) p-coordinateChart (c.index : M) (c.index : M)‖ ≤ R → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g (c.index : M)) + localPhase (coordinateChart (c.index : M) p) v v) + (hboundary : ∀ p ∈ c.carrier, c.second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (c.second F p)) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) + (hamppos : ∀ p, 0 < amp p ↔ p ∈ circularCoordinateDisk (c.index : M) r) + (hphi : ∀ p ∈ circularCoordinateDisk (c.index : M) r, + phi =ᶠ[𝓝 p] (fun q => (c.phase (chart (c.index : M) q)) 0)) + (data : MetricGoodPhaseData g F) (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) := by + obtain ⟨A,i,e,_hindex,_hphase,_hinverse,⟨d⟩⟩ := c.supported_circular_patch hF n hr hrr₀ hrR + hpos hreg hfront hcover hlocalPhase hphase hconvex hboundary hamp hamp0 hamppos hphi + exact d.exact_metric data hF h htarget + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e644454163e98c8c009feeec1dd816fac853447 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularPrimitiveSupport.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDiskSupport +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! The exact analytic compact support and cutoff of a geometric circular +primitive. In particular the support is the closed disk, not the atlas patch. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem circular_primitive_support (i : A.centers) {r r₀ : ℝ} (hr : 0 < r) + (hsmall : r^2 < r₀^2) + (hpos : ∀ p, 0 < A.weight i p ↔ p ∈ circularCoordinateDisk (i : M) r₀) + (hreg : circularCoordinateRegion (i : M) r ⊆ (coordinateChart (i : M)).target) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (he : ContDiff ℝ ∞ e) + (hcover : ∀ x ∈ circularCoordinateRegion (i : M) r, baseEquiv.symm x ∈ e.source) : + ∃ K : Set JetPolynomial.Base, IsCompact K ∧ K ⊆ e.target ∧ + A.phaseSurfaceSupport i e K = closure (circularCoordinateDisk (i : M) r) ∧ + e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) ∧ + ∃ χ : JetPolynomial.Base → ℝ, ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ e.source ∧ ∀ x ∈ e.symm '' K, χ x = 1 := by + let D := circularDiskClosure (i : M) r + have hD : IsCompact D := circularDiskClosure_compact (i : M) r hreg + have hsource : D ⊆ (surfacePhaseChart (i : M) e).source := by + dsimp only [D] + rw [← circularCoordinateDisk_closure (i : M) hr hreg] + exact A.circular_closed_disk_phase_source i hr hreg e hcover + have hDs : D ⊆ (chart (i : M)).source := fun _ hp => (hsource hp).1 + have hDe : (chart (i : M)) '' D ⊆ e.source := by + rintro _ ⟨p,hp,rfl⟩ + exact (hsource hp).2 + let C := (chart (i : M)) '' D + have hC : IsCompact C := hD.image_of_continuousOn + ((chart (i : M)).continuousOn.mono hDs) + let K := e '' C + have hK : IsCompact K := hC.image he.continuous + have heC : e.symm '' K = C := by + ext x + constructor + · rintro ⟨y,⟨z,hz,rfl⟩,rfl⟩ + simpa only [e.left_inv (hDe hz)] using hz + · intro hx + exact ⟨e x,⟨x,hx,rfl⟩,e.left_inv (hDe hx)⟩ + refine ⟨K,hK,?_,?_,?_,?_⟩ + · rintro _ ⟨x,hx,rfl⟩ + exact e.map_source (hDe hx) + · rw [A.phaseSurfaceSupport_image i e hD.isClosed hDs hDe] + exact (circularCoordinateDisk_closure (i : M) hr hreg).symm + · rw [heC] + rintro _ ⟨p,hp,rfl⟩ + have hp' := (circularDiskClosure_iff (i : M) hreg p).mp hp + have hw : A.weight i p ≠ 0 := ne_of_gt ((hpos p).mpr ⟨hp'.1,hp'.2.trans_lt hsmall⟩) + exact ⟨p,subset_tsupport (A.weight i) hw,rfl⟩ + · obtain ⟨χ,hχ,hχc,_,hχs,hχone⟩ := CollarVelocity.compact_cutoff hC e.open_source hDe + exact ⟨χ,hχ,hχc,hχs,fun x hx => hχone x (heC ▸ hx)⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfilePullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfilePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..96d03247bda706be184685512ebadd631d98b04f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfilePullback.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularJetProfiles + +namespace OAI + +/-! Pull back the circular profiles through the actual second-jet section. +The only derivative of the section that enters is its transverse derivative. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem circularFamilyProfile_comp {φ : E → F} {Q X Y C e₁ e₂ : F → Vec} + {R : F → ℝ} {α : F × ℝ → ℝ} {x : E} {t : ℝ} + (hφ : DifferentiableAt ℝ φ x) (hQ : DifferentiableAt ℝ Q (φ x)) + (hR : DifferentiableAt ℝ R (φ x)) (h₁ : DifferentiableAt ℝ e₁ (φ x)) + (h₂ : DifferentiableAt ℝ e₂ (φ x)) (hα : DifferentiableAt ℝ α (φ x,t)) (d : E) : + circularFamilyProfile (Q ∘ φ) (X ∘ φ) (Y ∘ φ) (C ∘ φ) (R ∘ φ) + (e₁ ∘ φ) (e₂ ∘ φ) (fun z => α (φ z.1,z.2)) d (x,t) = + circularFamilyProfile Q X Y C R e₁ e₂ α (fderiv ℝ φ x d) (φ x,t) := by + have hσ := (hφ.hasFDerivAt.comp (x,t) + (hasFDerivAt_fst (𝕜 := ℝ) (p := (x,t)))).prodMk + (hasFDerivAt_snd (𝕜 := ℝ) (p := (x,t))) + have hβ : fderiv ℝ (fun z : E × ℝ => α (φ z.1,z.2)) (x,t) (0,1) = + fderiv ℝ α (φ x,t) (0,1) := by + simpa [Function.comp_def,ContinuousLinearMap.comp_apply,ContinuousLinearMap.fst, + ContinuousLinearMap.snd] using + congrArg (fun L : (E × ℝ) →L[ℝ] ℝ => L (0,1)) (hα.hasFDerivAt.comp (x,t) hσ).fderiv + have hf := hasFDerivAt_fst (𝕜 := ℝ) (p := (φ x,t)) + have hV := (hQ.hasFDerivAt.comp (φ x,t) hf).add ((hR.hasFDerivAt.comp (φ x,t) hf).smul + ((hα.hasFDerivAt.cos.smul (h₁.hasFDerivAt.comp (φ x,t) hf)).add + (hα.hasFDerivAt.sin.smul (h₂.hasFDerivAt.comp (φ x,t) hf)))) + change HasFDerivAt (fun z : F × ℝ => Q z.1+ + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) _ (φ x,t) at hV + have hW : + fderiv ℝ (fun z : E × ℝ => Q (φ z.1)+ + R (φ z.1) • direction (e₁ (φ z.1)) (e₂ (φ z.1)) (α (φ z.1,z.2))) (x,t) (d,0) = + fderiv ℝ (fun z : F × ℝ => Q z.1+ + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z)) (φ x,t) (fderiv ℝ φ x d,0) := by + simpa [Function.comp_def,ContinuousLinearMap.comp_apply,ContinuousLinearMap.fst, + ContinuousLinearMap.snd] using + congrArg (fun L : (E × ℝ) →L[ℝ] Vec => L (d,0)) (hV.differentiableAt.hasFDerivAt.comp (x,t) hσ).fderiv + funext i + fin_cases i + · rfl + · rfl + · rfl + · exact hW + · change ((R ∘ φ) x * fderiv ℝ (fun z => α (φ z.1,z.2)) (x,t) (0,1)) • _ = _ + rw [hβ] + rfl + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfileThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfileThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..80c08a88f415a3ba69a53985b39ef2ffbf6f623c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularProfileThreshold.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenCoefficientBounds + +namespace OAI + +/-! Fixed coefficient bounds and a spatial turn threshold, chosen before +any angular function or any of its derivatives. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_profile_threshold {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → ∃ Λ : ℝ, 0 < Λ ∧ + ∀ (α : E → ℝ) x, x ∈ K → DifferentiableAt ℝ α x → ∀ β : ℝ, + circularSpatialProfile Q X Y C R e₁ e₂ α β x d ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 0 ∧ + profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 0 ≤ sHi ∧ + |profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 1| ≤ D ∧ + (Λ < fderiv ℝ α x d → + H+2 < |profileCoefficients (circularSpatialProfile Q X Y C R e₁ e₂ α β x d) 2|) := by + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hcoef⟩ := compact_frozen_coefficient_bounds + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe (fun x hx => (hRpos x hx).ne') d + obtain ⟨B,hB,herror⟩ := compact_spatialError_bound_on hU hK hKU hQ hR h₁ h₂ d + have hrcont : ContinuousOn R K := hR.continuousOn.mono hKU + rcases K.eq_empty_or_nonempty with hE | hne + · refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,fun H _ => ⟨1,zero_lt_one,?_⟩⟩ + simp [hE] + obtain ⟨p,hp,hmin⟩ := hK.exists_isMinOn hne hrcont + have hr : 0 < R p := hRpos p (hKU hp) + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,fun H hH => + ⟨(H+1+4*B+1)/(R p),div_pos (by positivity) hr,?_⟩⟩ + intro α x hx hα β + have hxU := hKU hx + have hf := hframe x hxU + have hQx := (hQ.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp) + have hRx := (hR.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp) + have h1x := (h₁.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp) + have h2x := (h₂.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp) + have hreg : circularSpatialProfile Q X Y C R e₁ e₂ α β x d ∈ regularBoundaryProfiles := + circularBoundaryProfile_regular (hD x hxU) (hRpos x hxU).ne' + hf.1 hf.2.1 hf.2.2.1 hf.2.2.2.1 hf.2.2.2.2.2.1 hf.2.2.2.2.1 hf.2.2.2.2.2.2 + refine ⟨hreg,?_,?_,?_,?_⟩ + · exact (hcoef x hx (α x)).1 + · exact (hcoef x hx (α x)).2.1 + · rw [circularSpatialProfile_first β hQx hRx h1x h2x hα hf] + exact (hcoef x hx (α x)).2.2 + · intro hlarge + have hh := circularSpatialProfile_mixed_dominates (X := X) (Y := Y) (C := C) β hQx hRx h1x h2x hα + (hD x hxU) hf hr (hmin hx) hB (by linarith : 0 ≤ H+1) (herror α x hx) hlarge + linarith + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularRadiusCovectors.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularRadiusCovectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..666c69bb4fdab079c3d44dc064f6d9a46bfee4e4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularRadiusCovectors.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothCircularRadius +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceRegularPair + +namespace OAI + +/-! The smooth radius fields used for Sard have exactly the true circle +normal covectors on the new boundaries. Their regular pairs are transverse. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +def circularNormalCovector (center base p : M) : CurvePlane := + phaseDerivative ((fun x => circularRadiusSquared (coordinateChart center center) + (coordinateChart center x)) ∘ (coordinateChart base).symm) (coordinateChart base p) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma circularRadiusField_covector (i : A.centers) {r r0 : ℝ} + (hsmall : r^2 < r0^2) + (hpos : ∀ x, 0 < A.weight i x ↔ x ∈ circularCoordinateDisk (i : M) r0) + {p q : M} (hp : p ∈ circularBoundary (i : M) r) (hq : p ∈ (chartAt Plane q).source) : + phaseDerivative (A.circularRadiusField i ∘ (coordinateChart q).symm) (coordinateChart q p) = + circularNormalCovector (i : M) q p := by + have hqs : p ∈ (coordinateChart q).source := by simpa only [coordinateChart_source] using hq + have ht : Tendsto (coordinateChart q).symm (𝓝 (coordinateChart q p)) (𝓝 p) := by + simpa only [(coordinateChart q).left_inv hqs] using + ((coordinateChart q).continuousAt_symm ((coordinateChart q).map_source hqs)).tendsto + have he := (A.circularRadiusField_germ i + (A.circularBoundary_weight_pos i hsmall hpos hp).ne').comp_tendsto ht + unfold phaseDerivative circularNormalCovector + rw [he.fderiv_eq] + rfl + +variable {ι : Type*} [Fintype ι] + +lemma actual_circular_normals_independent + (index : ι → A.centers) (r r0 : ι → ℝ) (i j : ι) + (hsmall : ∀ k, (r k)^2 < (r0 k)^2) + (hpos : ∀ k x, 0 < A.weight (index k) x ↔ x ∈ circularCoordinateDisk (index k : M) (r0 k)) + {p q : M} (hp : p ∈ circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j)) (hq : p ∈ (chartAt Plane q).source) + (hreg : Function.Surjective (fderiv ℝ (fun y => PublishedInputs.radiusPairProjection i j + (fun k => A.circularRadiusField (index k) ((chartAt Plane q).symm y))) (chartAt Plane q p))) : + covectorDet (circularNormalCovector (index i : M) q p) + (circularNormalCovector (index j : M) q p) ≠ 0 := by + have hh := surface_regular_pair_covectors (fun k => A.circularRadiusField (index k)) + (fun k => A.circularRadiusField_smooth (index k)) i j q hq hreg + rw [A.circularRadiusField_covector (index i) (hsmall i) (hpos i) hp.1 hq, + A.circularRadiusField_covector (index j) (hsmall j) (hpos j) hp.2 hq] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSectionProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSectionProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..2988caeb30fcba90da6b40feca7508000c27a331 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSectionProfiles.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularProfilePullback +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileStability + +namespace OAI + +/-! Circular profiles of the actual original immersion, expressed through +its second jet and its transverse third derivative. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open NormalFrame VelocityFrame RealModes JetPolynomial JetVelocityCoordinates GeometryPreservation +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem circular_geometricLeadingProfile {R : LowJet → ℝ} {e₁ e₂ : LowJet → Vec} + {α : LowJet × ℝ → ℝ} (hR : ContDiffOn ℝ ∞ R O) + (h₁ : ContDiffOn ℝ ∞ e₁ O) (h₂ : ContDiffOn ℝ ∞ e₂ O) + (hα : ContDiffOn ℝ ∞ α (O ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + R J • direction (e₁ J) (e₂ J) (α (J,t))) + {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + boundaryProfileMap (l.geometricLeadingProfile G hG hGO p (t : CovarianceCorrector.Period)) = + circularFamilyProfile (tangent ∘ lowJet G) ((slot 1) ∘ lowJet G) + ((slot 2) ∘ lowJet G) ((slot 6) ∘ lowJet G) (R ∘ lowJet G) + (e₁ ∘ lowJet G) (e₂ ∘ lowJet G) (fun z => α (lowJet G z.1,z.2)) + (coordinateVector 1) (p,t) := by + have hj := hGO hp + have he : l.geometricLeadingProfile G hG hGO p (t : CovarianceCorrector.Period) = + l.leadingProfileMap ((lowJet G p,t),lowDerivative G 1 p) := + (l.leadingProfileMap_geometry hG hGO hp t).symm + rw [he,l.circular_leadingProfileMap hR h₁ h₂ hα hvel hj] + have hQ : DifferentiableAt ℝ tangent (lowJet G p) := + (l.smoothTangent.contDiffAt (O.isOpen.mem_nhds hj)).differentiableAt (by simp) + have hh := circularFamilyProfile_comp (t := t) (X := slot 1) (Y := slot 2) (C := slot 6) + ((lowJet_smooth hG).differentiable (by simp) p) hQ + ((hR.contDiffAt (O.isOpen.mem_nhds hj)).differentiableAt (by simp)) + ((h₁.contDiffAt (O.isOpen.mem_nhds hj)).differentiableAt (by simp)) + ((h₂.contDiffAt (O.isOpen.mem_nhds hj)).differentiableAt (by simp)) + ((hα.contDiffAt ((O.isOpen.prod isOpen_univ).mem_nhds ⟨hj,mem_univ t⟩)).differentiableAt (by simp)) + (coordinateVector 1) + rw [lowJet_derivative hG] at hh + exact hh.symm + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSupportedPrimitivePatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSupportedPrimitivePatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b08c3848c6059636a2bda1f68e380635a20b23f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CircularSupportedPrimitivePatch.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructSupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegion +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseFrontierAvoidance +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseBoundaryCurve + +namespace OAI + +/-! The analytic support and all local geometric data for an actual circular +primitive are constructed from the preserved boundary normal and metric bound. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +theorem supported_circular_patch + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) {r r₀ R : ℝ} (hr : 0 < r) + (hrr₀ : r^2 < r₀^2) (hrR : r < R) + (hpos : ∀ p, 0 < B.weight c.index p ↔ p ∈ circularCoordinateDisk (c.index : M) r₀) + (hreg : circularCoordinateRegion (c.index : M) r ⊆ (coordinateChart (c.index : M)).target) + (hfront : c.carrier = circularBoundary (c.index : M) r) + (hcover : ∀ x ∈ circularCoordinateRegion (c.index : M) r, baseEquiv.symm x ∈ c.phase.source) + {localPhase : Base → ℝ} (hlocalPhase : ContDiff ℝ ∞ localPhase) + (hphase : ∀ x, (JetPolynomial.realPhaseChart c.phase x).1 = localPhase x) + (hconvex : ∀ p ∈ tsupport (B.weight c.index), + ‖coordinateChart (c.index : M) p-coordinateChart (c.index : M) (c.index : M)‖ ≤ R → + ∀ v : Base, v ≠ 0 → 0 < coordinateMetricHessian (coordinateMetric g (c.index : M)) + localPhase (coordinateChart (c.index : M) p) v v) + (hboundary : ∀ p ∈ c.carrier, c.second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (c.second F p)) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) + (hamppos : ∀ p, 0 < amp p ↔ p ∈ circularCoordinateDisk (c.index : M) r) + (hphi : ∀ p ∈ circularCoordinateDisk (c.index : M) r, + phi =ᶠ[𝓝 p] (fun q => (c.phase (chart (c.index : M) q)) 0)) : + ∃ (A : SmoothingAtlas M) (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base), + (i : M) = (c.index : M) ∧ (∀ x, e x = c.phase x) ∧ (∀ x, e.symm x = c.phase.symm x) ∧ + Nonempty (SupportedPrimitivePatch A i e F amp phi (circularCoordinateDisk (c.index : M) r)) := by + let D := circularCoordinateDisk (c.index : M) r + have hD : IsOpen D := circularCoordinateDisk_open (c.index : M) r + have hDs : closure D ⊆ (surfacePhaseChart (c.index : M) c.phase).source := + B.circular_closed_disk_phase_source c.index hr hreg c.phase hcover + have hDj : (c.index : M) ∈ D := by + refine ⟨?_,?_⟩ + · rw [coordinateChart_source] + exact mem_chart_source Plane (c.index : M) + · change circularRadiusSquared (coordinateChart (c.index : M) (c.index : M)) + (coordinateChart (c.index : M) (c.index : M)) < r^2 + simp only [circularRadiusSquared,sub_self,zero_pow (by decide : 2 ≠ 0),add_zero] + exact sq_pos_of_pos hr + have hclosed (p : M) (hp : p ∈ closure D) : + p ∈ (coordinateChart (c.index : M)).source ∧ + circularRadiusSquared (coordinateChart (c.index : M) (c.index : M)) + (coordinateChart (c.index : M) p) ≤ r^2 := by + have hc : closure D = circularDiskClosure (c.index : M) r := + circularCoordinateDisk_closure (c.index : M) hr hreg + exact (circularDiskClosure_iff (c.index : M) hreg p).mp (hc ▸ hp) + have hw (p : M) (hp : p ∈ closure D) : B.weight c.index p ≠ 0 := by + apply ne_of_gt ((hpos p).mpr ?_) + exact ⟨(hclosed p hp).1,((hclosed p hp).2).trans_lt hrr₀⟩ + have hsmall (p : M) (hp : p ∈ closure D) : + ‖coordinateChart (c.index : M) p-coordinateChart (c.index : M) (c.index : M)‖ < R := by + have hh := circularRadiusSquared_le_norm (hclosed p hp).2 + rw [abs_of_pos hr] at hh + exact hh.trans_lt hrR + obtain ⟨Ω,hΩ,hDΩ,hΩe,hΩprop⟩ := B.phase_metric_region c.index c.phase hDs hw hsmall + have hcv : ∀ x ∈ Ω, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (c.index : M)) localPhase + (coordinateChart (c.index : M) ((surfacePhaseChart (c.index : M) c.phase).symm x)) v v := by + intro x hx v hv + exact hconvex _ (subset_tsupport _ (hΩprop x hx).1) (hΩprop x hx).2.le v hv + have hb := c.frontier_avoidance hD hDs + (hfront.trans (circularCoordinateDisk_frontier (c.index : M) hr hreg).symm) n hboundary + exact B.construct_supported_primitive_patch c.index hF n c.phase c.smooth c.inverse_smooth + hD hDj hDs hΩ hDΩ hΩe (fun x hx => (hΩprop x hx).1) + hlocalPhase hphase hcv hb hamp hamp0 hamppos hphi + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ClosedIntervalTurns.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ClosedIntervalTurns.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e2903f284c6774153eda85fdc727b7231e38c00 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ClosedIntervalTurns.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyProfile + +namespace OAI + +/-! The two-turn estimates on a half-open period also hold at the closed +endpoint needed for compact profile estimates. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes + +lemma closed_interval_turns {U K : Set Base} (hU : IsOpen U) (hKU : K ⊆ U) + {α : Base × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (U ×ˢ univ)) + (hper : ∀ x ∈ U, Function.Periodic (fun t => α (x,t)) 1) + {τ : Base → ℝ} {Λ : ℝ} + (hturn : ∀ x ∈ K, ∀ t ∈ Ico (0 : ℝ) 1, + deriv (fun s => α (x,s)) t = 0 ↔ t = 0 ∨ t = τ x) + (hlarge : ∀ x ∈ K, + Λ < fderiv ℝ (fun y => α (y,0)) x dy ∧ + Λ < fderiv ℝ (fun y => α (y,τ x)) x dy) : + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, + fderiv ℝ α (x,t) (0,1) = 0 → Λ < fderiv ℝ α (x,t) (dy,0) := by + intro x hx t ht hz + have hxU := hKU hx + have hs (t : ℝ) : fderiv ℝ (fun y => α (y,t)) x dy = fderiv ℝ α (x,t) (dy,0) := + fderiv_slice_first + ((hα.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hxU,mem_univ t⟩)).differentiableAt (by simp)) dy + rw [← hs] + rcases lt_or_eq_of_le ht.2 with ht1 | rfl + · have hd : deriv (fun s => α (x,s)) t = 0 := by + rw [(LocalPeriodicCalculus.angle_hasDerivAt hU hα hxU t).deriv] + exact hz + rcases (hturn x hx t ⟨ht.1,ht1⟩).mp hd with rfl | rfl + · exact (hlarge x hx).1 + · exact (hlarge x hx).2 + · have he : (fun y => α (y,1)) =ᶠ[𝓝 x] (fun y => α (y,0)) := by + filter_upwards [hU.mem_nhds hxU] with y hy + simpa only [zero_add] using hper y hy 0 + rw [he.fderiv_eq] + exact (hlarge x hx).1 + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingChoice.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c7b4cd6c424f43c6abc2f673f33566660ab5e02 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingChoice.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LongitudinalNormalChoice +import OAI.Geometry.SurfaceImmersion.Primitive.CompactTurnDichotomy + +namespace OAI + +/-! Uniform choice of an admissible preferred-normal path at a crossing. +The transverse threshold is fixed before the angular loop. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.GeometryPreservation +variable {E X : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [TopologicalSpace X] + +theorem compact_crossing_normal_choice (sLo sHi K d T : ℝ) + (hsLo : 0 < sLo) (hsHi : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ C : Set X, IsCompact C → + ∀ A N₀ : X → ℝ, Continuous A → Continuous N₀ → + (∀ x ∈ C, A x = 0 → H+2 < |N₀ x|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ C, + ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, sLo ≤ S → S ≤ sHi → -K ≤ k → |D| ≤ d → + |t| ≤ T → |u| ≤ T → |N-N₀ x| < η → |z*L-A x| < η → + let P := frameVector n m (slopePure S D N L k t) + let Q := frameVector n m (slopePure S D N L k u) + (0 < inner ℝ P n ∧ 0 < inner ℝ Q n) ∨ + (0 < inner ℝ P Q ∧ ∃ w : E, + inner ℝ n w = 0 ∧ 0 < inner ℝ P w ∧ 0 < inner ℝ Q w) := by + obtain ⟨H,hH,htransverse⟩ := uniform_crossing_threshold (E := E) + sLo sHi K d T 0 hsLo hsHi hK hd hT le_rfl + refine ⟨H,hH,?_⟩ + intro C hC A N₀ hA hN₀ hturn + obtain ⟨B,hB⟩ := (hC.image hN₀.abs).bddAbove + let B₀ := max 0 B+1 + have hB₀ : 0 ≤ B₀ := by dsimp [B₀]; positivity + have hbound : ∀ x ∈ C, |N₀ x| ≤ max 0 B := fun x hx => + (hB (mem_image_of_mem _ hx)).trans (le_max_right _ _) + obtain ⟨J,hJ,hlong⟩ := longitudinal_normal_choice (E := E) + sHi d B₀ T hsHi.le hd hB₀ hT + obtain ⟨η₀,hη₀,halt⟩ := small_scale_turn_or_longitudinal hC hA hN₀ H J hJ.le hturn + refine ⟨min 1 η₀,lt_min zero_lt_one hη₀,?_⟩ + intro z hz hzη x hx n m hn hm hmn S D N L k t u hS hShi hk hD ht hu hN hL + dsimp only + have hNsmall : |N-N₀ x| < 1 := hN.trans_le (min_le_left _ _) + have hNbound : |N| ≤ B₀ := by + have hh := abs_sub_le N (N₀ x) 0 + simp only [sub_zero] at hh + dsimp [B₀] + linarith [hbound x hx] + rcases halt z hz (hzη.trans_le (min_le_right _ _)) x hx N L hNsmall + (hL.trans_le (min_le_right _ _)) with hlargeN | hlargeL + · left + rw [frameVector_inner_first hn hmn,frameVector_inner_first hn hmn] + exact ⟨(htransverse n m hn hm hmn S D N L k t u hS hShi hk hD ht hu hlargeN).1, + (htransverse n m hn hm hmn S D N L k u t hS hShi hk hD hu ht hlargeN).1⟩ + · right + exact hlong n m hn hm hmn S D N L k t u (hsLo.trans_le hS) hShi hD hNbound ht hu hlargeL + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..65bdd97bed933dc12edfbd2c7aa02fa48671d784 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingNormal.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactCrossingChoice +import OAI.Geometry.SurfaceImmersion.Primitive.ActualFiniteCrossingNormal + +namespace OAI + +/-! Turn regularity on a compact disk and finitely many actual crossing +choices into one smooth normal on an open neighborhood of the disk. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame +variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] + +theorem compact_actual_crossing_normal {F : RField 4} (hF : ContDiff ℝ ∞ F) (z : ℝ) + {T V : Set Base} (hV : IsOpen V) + (hreg : ∀ p ∈ T, realBoundaryProfile F z p ∈ regularBoundaryProfiles) + (Y : κ → Base → Base) (hY : ∀ k, ContDiff ℝ ∞ (Y k)) + (left right : ι → κ) (x : ι → Base) (hxinj : Function.Injective x) + (hxT : ∀ i, x i ∈ T) (hxV : ∀ i, x i ∈ V) + (C : κ → Set Base) (hC : ∀ k, IsClosed (C k)) + (honly : ∀ i k, x i ∈ C k → k = left i ∨ k = right i) + (havoid : ∀ k p, p ∈ T → p ∈ C k → + normalize (realSecondForm F (Y k p) (Y k p) p) ≠ -profilePreferred (realBoundaryProfile F z p)) + (hchoice : ∀ i, + (0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ + profilePreferred (realBoundaryProfile F z (x i)) ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ + profilePreferred (realBoundaryProfile F z (x i))) ∨ + (0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ + realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile F z (x i)) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ w ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ w)) : + ∃ U : Set Base, IsOpen U ∧ T ⊆ U ∧ ∃ g : Base → Vec, ContDiffOn ℝ ∞ g U ∧ + (∀ p ∈ U, g p ⬝ᵥ g p = 1) ∧ + (∀ p ∈ U, ∀ v : Base, coordDeriv v F p ⬝ᵥ g p = 0) ∧ + (∀ p ∈ U, p ∉ V → g p = profilePreferred (realBoundaryProfile F z p)) ∧ + (∀ k p, p ∈ T → p ∈ C k → g p ≠ -normalize (realSecondForm F (Y k p) (Y k p) p)) ∧ + ∀ i, 0 < realSecondForm F (Y (left i) (x i)) (Y (left i) (x i)) (x i) ⬝ᵥ g (x i) ∧ + 0 < realSecondForm F (Y (right i) (x i)) (Y (right i) (x i)) (x i) ⬝ᵥ g (x i) := by + let U := realBoundaryProfile F z ⁻¹' regularBoundaryProfiles + have hU : IsOpen U := isOpen_regularBoundaryProfiles.preimage (realBoundaryProfile_smooth hF z).continuous + have hTU : T ⊆ U := hreg + obtain ⟨g,hg,hunit,hnormal,hout,havoid',hpos⟩ := actual_finite_crossing_normal hF z hV + (fun _ hp => hp) Y (fun k => (hY k).contDiffOn) left right x hxinj + (fun i => hTU (hxT i)) hxV C hC honly hchoice hU + refine ⟨U,hU,hTU,g,hg,hunit,hnormal,hout,?_,hpos⟩ + intro k p hpT hpC + apply havoid' k p (hTU hpT) hpC + intro hbad + apply havoid k p hpT hpC + rw [hbad,neg_neg] + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingPreservation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingPreservation.lean new file mode 100644 index 0000000000000000000000000000000000000000..835d599791756a52de86c2cdcf8660243d04a7e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactCrossingPreservation.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.TwoMechanismCrossing + +namespace OAI + +/-! Uniform positivity at the later crossings from the actual two second-form +limits. Only the limiting angular speed and mixed component enter compactness. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.GeometryPreservation +variable {E X : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [TopologicalSpace X] + +theorem compact_crossing_preservation (sLo sHi K d T : ℝ) + (hmin : 0 < sLo) (hmax : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ (C : Set X), IsCompact C → + ∀ A N₀ : X → ℝ, Continuous A → Continuous N₀ → + (∀ x ∈ C, A x = 0 → H+2 < |N₀ x|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ C, + ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, sLo ≤ S → S ≤ sHi → -K ≤ k → |D| ≤ d → + |t| ≤ T → |u| ≤ T → |N-N₀ x| < η → |z*L-A x| < η → + 0 < modelOrderedCrossing n m S D N L k t u ∧ + 0 < modelOrderedCrossing n m S D N L k u t := by + obtain ⟨H,hH,hthreshold⟩ := two_mechanism_crossing_threshold (E := E) + sLo sHi K d T hmin hmax hK hd hT + refine ⟨H,hH,?_⟩ + intro C hC A N₀ hA hN₀ hturn + obtain ⟨B,hB⟩ := (hC.image hN₀.abs).bddAbove + let B₀ := max 0 B + have hB₀ : 0 ≤ B₀ := le_max_left _ _ + have hbound : ∀ x ∈ C, |N₀ x| ≤ B₀ := fun x hx => + (hB (mem_image_of_mem _ hx)).trans (le_max_right _ _) + obtain ⟨J,hJ,hcross⟩ := hthreshold (B₀+1) (by positivity) + obtain ⟨η₀,hη₀,hdichotomy⟩ := small_scale_turn_or_longitudinal hC hA hN₀ H J hJ.le hturn + refine ⟨min 1 η₀,lt_min (by norm_num) hη₀,?_⟩ + intro z hz hzη x hx n m hn hm hmn S D N L k t u hSmin hSmax hk hD ht hu hN hL + have hNsmall : |N-N₀ x| < 1 := hN.trans_le (min_le_left _ _) + have hNbound : |N| ≤ B₀+1 := by + have ha := abs_sub_le N (N₀ x) 0 + simp only [sub_zero] at ha + linarith [hbound x hx] + apply hcross n m hn hm hmn S D N L k t u hSmin hSmax hk hD hNbound ht hu + exact hdichotomy z hz (hzη.trans_le (min_le_right _ _)) x hx N L hNsmall + (hL.trans_le (min_le_right _ _)) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPeriodicAnsatzBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPeriodicAnsatzBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d055ab86fbe7d62f23504f2a07286762954b695e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPeriodicAnsatzBounds.lean @@ -0,0 +1,185 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicGlobalization +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFastEvaluation +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Finite periodic ansatz bounds with fixed coefficients and a varying fast scale. -/ +noncomputable section +open Set +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion.Family +open CovarianceCorrector WeightedEstimates + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Compact spatial control and periodicity give uniform bounds for all +mixed derivatives up to any prescribed finite order. -/ +lemma compact_lift_derivative_bound (U : Family A E) {Q : Set A} + (hQ : IsCompact Q) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ j ≤ m, ∀ p ∈ Q, ∀ t : ℝ, + ‖iteratedFDeriv ℝ j (fun y : A × ℝ => U.val y.1 (y.2 : Period)) (p,t)‖ ≤ C := by + let H : A × ℝ → E := fun y => U.val y.1 (y.2 : Period) + obtain ⟨C,hC,hb⟩ := compact_coefficient_bound uniqueDiffOn_univ + (hQ.prod (isCompact_Icc : IsCompact (Icc (0 : ℝ) 1))) (subset_univ _) + U.smooth.contDiffOn m + refine ⟨C,zero_le_one.trans hC,?_⟩ + intro j hj p hp t + let a : ℝ := AddCircle.equivIco 1 0 (t : Period) + have ha : a ∈ Ico (0 : ℝ) 1 := by + simpa only [zero_add] using (AddCircle.equivIco 1 0 (t : Period)).property + have hca : (a : Period) = (t : Period) := AddCircle.coe_equivIco + let c : ℝ := t-a + have hcz : (c : Period) = 0 := by + rw [show c = t-a from rfl,AddCircle.coe_sub,hca,sub_self] + have he : (fun y : A × ℝ => H (y+(0,c))) = H := by + funext y + simp only [H,Prod.fst_add,Prod.snd_add,add_zero,AddCircle.coe_add,hcz] + have hd := congrArg (fun f : A × ℝ → E => iteratedFDeriv ℝ j f (p,a)) he + rw [iteratedFDeriv_comp_add_right] at hd + have hpoint : (p,a)+(0,c) = (p,t) := by + ext + · simp + · dsimp [c] + ring + rw [hpoint] at hd + change ‖iteratedFDeriv ℝ j H (p,t)‖ ≤ C + rw [hd] + simpa only [iteratedFDerivWithin_univ] using hb j hj (p,a) ⟨hp,ha.1,ha.2.le⟩ + +/-- Fast evaluation has precisely the expected derivative-scale loss. -/ +lemma compact_fast_derivative_bound (U : Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ j ≤ m, ∀ p ∈ Q, + z^j*‖iteratedFDeriv ℝ j (U.fastValue ℓ z) p‖ ≤ C := by + obtain ⟨D,hD,hb⟩ := U.compact_lift_derivative_bound hQ m + refine ⟨D*(1+‖ℓ‖)^m,by positivity,?_⟩ + intro z hz hz1 j hj p hp + let T : A →L[ℝ] A × ℝ := (ContinuousLinearMap.id ℝ A).prod (z⁻¹ • ℓ) + have hT : T p = (p,ℓ p/z) := by simp [T,div_eq_mul_inv,mul_comm] + have hTnorm : ‖T‖ ≤ (1+‖ℓ‖)/z := by + calc + ‖T‖ = max ‖ContinuousLinearMap.id ℝ A‖ ‖z⁻¹ • ℓ‖ := by + simp only [T,ContinuousLinearMap.opNorm_prod,Prod.norm_def] + _ ≤ 1+‖z⁻¹ • ℓ‖ := max_le + (ContinuousLinearMap.norm_id_le.trans (by linarith [norm_nonneg (z⁻¹ • ℓ)])) + (by linarith) + _ = 1+‖ℓ‖/z := by + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_of_pos hz] + ring + _ ≤ (1+‖ℓ‖)/z := by + apply (le_div_iff₀ hz).mpr + field_simp + linarith + have he : U.fastValue ℓ z = (fun y : A × ℝ => U.val y.1 (y.2 : Period)) ∘ T := by + funext x + simp [fastValue,T,div_eq_mul_inv,mul_comm] + rw [he,T.iteratedFDeriv_comp_right U.smooth p (by simp)] + have hn := (iteratedFDeriv ℝ j + (fun y : A × ℝ => U.val y.1 (y.2 : Period)) (T p)).norm_compContinuousLinearMap_le + (fun _ : Fin j => T) + simp only [Finset.prod_const,Finset.card_univ,Fintype.card_fin] at hn + calc + z^j*‖(iteratedFDeriv ℝ j (fun y : A × ℝ => U.val y.1 (y.2 : Period)) (T p)).compContinuousLinearMap + (fun _ => T)‖ ≤ z^j*(D*‖T‖^j) := by + apply mul_le_mul_of_nonneg_left _ (pow_nonneg hz.le _) + exact hn.trans (mul_le_mul_of_nonneg_right (by simpa only [hT] using hb j hj p hp (ℓ p/z)) + (pow_nonneg (norm_nonneg T) _)) + _ ≤ z^j*(D*((1+‖ℓ‖)/z)^j) := by + gcongr + _ = D*(1+‖ℓ‖)^j := by + rw [div_pow] + calc + z^j*(D*((1+‖ℓ‖)^j/z^j)) = D*(1+‖ℓ‖)^j*(z^j/z^j) := by ring + _ = D*(1+‖ℓ‖)^j := by rw [div_self (pow_ne_zero j (ne_of_gt hz)),mul_one] + _ ≤ D*(1+‖ℓ‖)^m := mul_le_mul_of_nonneg_left + (pow_le_pow_right₀ (by linarith [norm_nonneg ℓ]) hj) hD + +end ClosedSurfaceR4.PeriodicExpansion.Family + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector WeightedEstimates + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {O : TopologicalSpace.Opens A} + +/-- The actual globally smooth finite ansatz has uniform compact-domain +jets after multiplication by the corresponding power of the fast scale. -/ +theorem compact_finiteAnsatz_bounds {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family O E) {K Q : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hzU : ∀ i p, p ∈ O → p ∉ K → (U i).val p = 0) + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (L : ℕ) : + ∃ C : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ + ∀ z : ℝ, 0 < z → z ≤ 1 → + ContDiff ℝ ∞ (finiteAnsatz F U ℓ L z) ∧ + ∀ m p, p ∈ Q → z^m*‖iteratedFDeriv ℝ m (finiteAnsatz F U ℓ L z) p‖ ≤ C m := by + let hcoeff (i : ℕ) := (U i).global hK hKO (hzU i) + choose D hD hb using fun m i : ℕ => + (hcoeff i).compact_fast_derivative_bound hQ ℓ m + choose B hB hFbound using fun m => compact_coefficient_bound uniqueDiffOn_univ + hQ (subset_univ _) hF.contDiffOn m + refine ⟨fun m => B m+∑ i ∈ Finset.range L, D m i, + (fun m => add_nonneg (zero_le_one.trans (hB m)) (Finset.sum_nonneg (fun i _ => hD m i))),?_⟩ + intro z hz hz1 + have hs := finiteAnsatz_smooth_global hF U hK hKO hzU ℓ L z + refine ⟨hs,?_⟩ + intro m p hp + have hfast (i : ℕ) : (hcoeff i).fastValue ℓ z = (U i).fastValue ℓ z := by + funext x + rfl + have hsU (i : ℕ) : ContDiff ℝ ∞ ((U i).fastValue ℓ z) := by + rw [← hfast i] + exact (hcoeff i).fastValue_smooth ℓ z + have hsTerm (i : ℕ) : + ContDiff ℝ ∞ (fun x : A => z^(i+1) • (U i).fastValue ℓ z x) := + contDiff_const.smul (hsU i) + have hsSum : ContDiff ℝ ∞ + (fun x : A => ∑ i ∈ Finset.range L, z^(i+1) • (U i).fastValue ℓ z x) := + ContDiff.sum (fun i _ => hsTerm i) + have hterm (i : ℕ) : z^m*‖iteratedFDeriv ℝ m + (fun x => z^(i+1) • (U i).fastValue ℓ z x) p‖ ≤ D m i := by + rw [iteratedFDeriv_const_smul_apply' + ((hsU i).of_le (by simp : (m : ℕ∞ω) ≤ ∞)).contDiffAt,norm_smul, + Real.norm_eq_abs,abs_of_nonneg (pow_nonneg hz.le _)] + have hbi := hb m i z hz hz1 m le_rfl p hp + rw [hfast i] at hbi + calc + z^m*(z^(i+1)*‖iteratedFDeriv ℝ m ((U i).fastValue ℓ z) p‖) = + z^(i+1)*(z^m*‖iteratedFDeriv ℝ m ((U i).fastValue ℓ z) p‖) := by ring + _ ≤ 1*D m i := mul_le_mul + (pow_le_one₀ hz.le hz1) hbi + (mul_nonneg (pow_nonneg hz.le _) (norm_nonneg _)) zero_le_one + _ = D m i := one_mul _ + change z^m*‖iteratedFDeriv ℝ m + (F+(fun x => ∑ i ∈ Finset.range L, z^(i+1) • (U i).fastValue ℓ z x)) p‖ ≤ _ + rw [iteratedFDeriv_add_apply + (f := F) (g := fun x : A => ∑ i ∈ Finset.range L, z^(i+1) • (U i).fastValue ℓ z x) + (hF.of_le (by simp : (m : ℕ∞ω) ≤ ∞)).contDiffAt + (hsSum.of_le (by simp : (m : ℕ∞ω) ≤ ∞)).contDiffAt, + iteratedFDeriv_fun_sum_apply + (f := fun i (x : A) => z^(i+1) • (U i).fastValue ℓ z x) + (u := Finset.range L) (fun i _ => + ((hsTerm i).of_le (by simp : (m : ℕ∞ω) ≤ ∞)).contDiffAt)] + calc + z^m*‖iteratedFDeriv ℝ m F p+∑ i ∈ Finset.range L, + iteratedFDeriv ℝ m (fun x => z^(i+1) • (U i).fastValue ℓ z x) p‖ + ≤ z^m*(‖iteratedFDeriv ℝ m F p‖+∑ i ∈ Finset.range L, + ‖iteratedFDeriv ℝ m (fun x => z^(i+1) • (U i).fastValue ℓ z x) p‖) := by + apply mul_le_mul_of_nonneg_left _ (pow_nonneg hz.le _) + exact (norm_add_le _ _).trans (add_le_add le_rfl (norm_sum_le _ _)) + _ = z^m*‖iteratedFDeriv ℝ m F p‖+∑ i ∈ Finset.range L, + z^m*‖iteratedFDeriv ℝ m (fun x => z^(i+1) • (U i).fastValue ℓ z x) p‖ := by + rw [mul_add,Finset.mul_sum] + _ ≤ B m+∑ i ∈ Finset.range L, D m i := by + apply add_le_add _ (Finset.sum_le_sum (fun i _ => hterm i)) + exact (mul_le_mul_of_nonneg_right (pow_le_one₀ hz.le hz1) (norm_nonneg _)).trans + (by simpa only [one_mul,iteratedFDerivWithin_univ] using hFbound m m le_rfl p hp) + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPrimitiveSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPrimitiveSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..90db86b35da8aa75ad7310f74b23fc6cfd8eb0e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactPrimitiveSupport.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDiskSupport +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Exact compact support data for a primitive on an adapted analytic atlas. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_primitive_support (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) {D : Set M} (hD : IsCompact D) + (hDs : D ⊆ (surfacePhaseChart (i : M) e).source) + (hactive : ∀ p ∈ D, A.weight i p ≠ 0) : + ∃ K : Set JetPolynomial.Base, IsCompact K ∧ K ⊆ e.target ∧ + A.phaseSurfaceSupport i e K = D ∧ + e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) ∧ + (∀ p ∈ D, e (chart (i : M) p) ∈ K) ∧ + (∀ y ∈ K, A.chartWeight i (e.symm y) ≠ 0) ∧ + ∃ χ : JetPolynomial.Base → ℝ, ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ e.source ∧ ∀ x ∈ e.symm '' K, χ x = 1 := by + let C := (chart (i : M)) '' D + have hC : IsCompact C := hD.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ hp => (hDs hp).1)) + have hCe : C ⊆ e.source := by + rintro _ ⟨p,hp,rfl⟩ + exact (hDs hp).2 + let K := e '' C + have hK : IsCompact K := hC.image he.continuous + have hinv : e.symm '' K = C := by + ext x + constructor + · rintro ⟨y,⟨z,hz,rfl⟩,rfl⟩ + simpa only [e.left_inv (hCe hz)] using hz + · exact fun hx => ⟨e x,⟨x,hx,rfl⟩,e.left_inv (hCe hx)⟩ + refine ⟨K,hK,?_,?_,?_,?_,?_,?_⟩ + · rintro _ ⟨x,hx,rfl⟩ + exact e.map_source (hCe hx) + · exact A.phaseSurfaceSupport_image i e hD.isClosed + (fun _ hp => (hDs hp).1) hCe + · rw [hinv] + rintro _ ⟨p,hp,rfl⟩ + exact ⟨p,subset_tsupport _ (hactive p hp),rfl⟩ + · exact fun p hp => ⟨chart (i : M) p,⟨p,hp,rfl⟩,rfl⟩ + · rintro y ⟨x,⟨p,hp,rfl⟩,rfl⟩ + have hpe : chart (i : M) p ∈ e.source := (hDs hp).2 + rw [e.left_inv hpe,chartWeight, + indicator_of_mem ((chart (i : M)).map_source (hDs hp).1), + (chart (i : M)).left_inv (hDs hp).1] + exact hactive p hp + · obtain ⟨χ,hχ,hχc,_,hχs,hχone⟩ := CollarVelocity.compact_cutoff hC e.open_source hCe + exact ⟨χ,hχ,hχc,hχs,fun x hx => hχone x (hinv ▸ hx)⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactTurnDichotomy.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactTurnDichotomy.lean new file mode 100644 index 0000000000000000000000000000000000000000..06568cd4187465126a1d9ed9971ce65e8d5d38f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CompactTurnDichotomy.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LongitudinalCrossing + +namespace OAI + +/-! Compactness converts the two limiting mechanisms at turns and away from +turns into a single small-scale alternative. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.GeometryPreservation + +lemma compact_away_from_turns {X : Type*} [TopologicalSpace X] + {K : Set X} (hK : IsCompact K) {A N₀ : X → ℝ} + (hA : Continuous A) (hN₀ : Continuous N₀) (H : ℝ) + (hturn : ∀ x ∈ K, A x = 0 → H+2 < |N₀ x|) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ K, |N₀ x| ≤ H+1 → δ ≤ |A x| := by + let C := K ∩ {x | |N₀ x| ≤ H+1} + have hC : IsCompact C := hK.inter_right (isClosed_le hN₀.abs continuous_const) + by_cases hne : C.Nonempty + · obtain ⟨x,hx,hmin⟩ := hC.exists_isMinOn hne hA.abs.continuousOn + have hp : 0 < |A x| := by + apply abs_pos.mpr + intro hz + have hh := hturn x hx.1 hz + have hxN : |N₀ x| ≤ H+1 := hx.2 + linarith + exact ⟨|A x|,hp,fun y hy hn => hmin ⟨hy,hn⟩⟩ + · refine ⟨1,by norm_num,?_⟩ + intro x hx hn + exact False.elim (hne ⟨x,hx,hn⟩) + +theorem small_scale_turn_or_longitudinal {X : Type*} [TopologicalSpace X] + {K : Set X} (hK : IsCompact K) {A N₀ : X → ℝ} + (hA : Continuous A) (hN₀ : Continuous N₀) (H J : ℝ) (hJ : 0 ≤ J) + (hturn : ∀ x ∈ K, A x = 0 → H+2 < |N₀ x|) : + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ x ∈ K, ∀ N L : ℝ, |N-N₀ x| < 1 → |z*L-A x| < η → + H < |N| ∨ J < |L| := by + obtain ⟨δ,hδ,haway⟩ := compact_away_from_turns hK hA hN₀ H hturn + let η := δ/(2*(J+1)) + have hη : 0 < η := div_pos hδ (by positivity) + have heq : η*(J+1) = δ/2 := by + dsimp [η] + field_simp + refine ⟨η,hη,?_⟩ + intro z hz hzη x hx N L hN hL + by_cases hn : H < |N| + · exact Or.inl hn + · right + by_contra hl + have hn' : |N| ≤ H := le_of_not_gt hn + have hl' : |L| ≤ J := le_of_not_gt hl + have hn₀ : |N₀ x| ≤ H+1 := by + have hh := abs_sub_le (N₀ x) N 0 + simp only [sub_zero,abs_sub_comm] at hh + linarith + have ha := haway x hx hn₀ + have hb : |A x| ≤ |z*L-A x|+z*|L| := by + have hh := abs_sub_le (A x) (z*L) 0 + simpa only [sub_zero,abs_sub_comm,abs_mul,abs_of_pos hz] using hh + have hmul := mul_le_mul_of_nonneg_left hl' hz.le + have hmul' := mul_le_mul_of_nonneg_right hzη.le hJ + nlinarith + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructSupportedPrimitivePatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructSupportedPrimitivePatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..088f9a195bfadd529fc39407611ce5e279c623fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructSupportedPrimitivePatch.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Primitive.AdaptedPrimitiveGeometry + +namespace OAI + +/-! A supported primitive patch is constructed from the actual immersion, +its preferred normal, metric convexity and the original boundary condition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem construct_supported_primitive_patch (j : B.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hD : IsOpen D) (hqD : (j : M) ∈ D) + (hDs : closure D ⊆ (surfacePhaseChart (j : M) e).source) + {Ω : Set Base} (hΩ : IsOpen Ω) + (hDΩ : (surfacePhaseChart (j : M) e) '' closure D ⊆ Ω) + (hΩe : Ω ⊆ (surfacePhaseChart (j : M) e).target) + (hactive : ∀ x ∈ Ω, B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0) + {localPhase : Base → ℝ} (hlocalPhase : ContDiff ℝ ∞ localPhase) + (hphase : ∀ x, (JetPolynomial.realPhaseChart e x).1 = localPhase x) + (hconvex : ∀ x ∈ Ω, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (j : M)) localPhase + (coordinateChart (j : M) ((surfacePhaseChart (j : M) e).symm x)) v v) + (hboundary : ∀ x ∈ frontier ((surfacePhaseChart (j : M) e) '' D), + realSecondForm (B.phaseRealChartMap j e.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (B.phaseRealChartMap j e.symm F) dy dy x) ≠ -n.inPhase (j : M) e x) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) (hamppos : ∀ p, 0 < amp p ↔ p ∈ D) + (hphi : ∀ p ∈ D, phi =ᶠ[𝓝 p] (fun q => (e (chart (j : M) q)) 0)) : + ∃ (A : SmoothingAtlas M) (i : A.centers) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base), + (i : M) = (j : M) ∧ (∀ x, f x = e x) ∧ (∀ x, f.symm x = e.symm x) ∧ + Nonempty (SupportedPrimitivePatch A i f F amp phi D) := by + obtain ⟨V,A,i,f,U,hV,hVc,hDV,hVΩ,hij,hfe,hfi,hfs,hfis,hw,houter,hcover,hsource,hDf, + hU,hVU,_hUΩ,hn,hI,hN,hH,hb⟩ := B.adapted_primitive_geometry j hF n e he hi + hD hqD hDs hΩ hDΩ hΩe hactive hlocalPhase hphase hconvex hboundary + have hE : (surfacePhaseChart (i : M) f : M → Base) = surfacePhaseChart (j : M) e := by + funext p + simp only [surfacePhaseChart_apply,hij,hfe] + have hph : (fun q => (f (chart (i : M) q)) 0) = (fun q => (e (chart (j : M) q)) 0) := by + funext p + rw [hij,hfe] + refine ⟨A,i,f,hij,hfe,hfi,?_⟩ + apply A.supported_primitive_patch i f hfs hfis houter hcover hDf + (fun p hp => (hw p hp).ne') hamp hamp0 hamppos + (by simpa only [hph] using hphi) hV hVc + (by simpa only [hE] using hDV) hsource hU hVU hn hI hN hH + simpa only [hE] using hb + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedCircularPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedCircularPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7e55cbe331c9820d44a8b2a1db1dca55cca9702 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedCircularPrimitive.lean @@ -0,0 +1,170 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularBoundary +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance constructedCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance constructedCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance constructedCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance constructedCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance constructedCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance constructedCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem constructed_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c k : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hk : ∀ j, ContDiff ℝ ∞ (k j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (B : ℝ) (hB : 0 ≤ B) (hkb : ∀ j, ∀ x ∈ Curves j, -B ≤ k j x) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (data.A.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + k j x*(b j x)^2) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hactiveE : ∀ x ∈ E, data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurvE : ∀ x ∈ E, -B ≤ RealModes.coordinateGauss + (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := data.A.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hFr := data.A.phaseRealChartMap_smooth i hi hF + obtain ⟨Z,hTZ,hZU,O,hOZ,l,hQc,hQO,hamp,hzero,e₁,e₂,α,h₁,h₂,hα,hper,hvel,hreg,η,hη,havoid,hcross⟩ := + actual_analytic_curve_crossing_loop hFr ha hT hU hTU hn hI hN hHess haT hboundary + hCurves hCurvesT hP hlocal hE hET haE slopeBound hSlope hb hc hk hbc B hB hkb hold + let Q := lowJet (data.A.jetChartMap i F ∘ e.symm) '' closure (S : Set JetPolynomial.Base) + have heq : data.A.phaseRealChartMap i e.symm F ∘ baseEquiv = data.A.jetChartMap i F ∘ e.symm := + data.A.phaseRealChartMap_comp_base i e.symm F + have hQT : Q ⊆ lowJet (data.A.phaseRealChartMap i e.symm F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) := by + rintro _ ⟨p,hp,rfl⟩ + rw [heq] + exact mem_image_of_mem _ (hST (mem_image_of_mem _ hp)) + have hQ : IsCompact Q := hSc.image (lowJet_smooth ((data.A.jetChartMap_smooth i hF).comp hi)).continuous + have hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q := + fun p hp => mem_image_of_mem _ (subset_closure hp) + have hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = normal J := by + intro J hJ hp + exact hzero J hJ (haoff _ hp) + have hdetE (x : SmallModes.Base) (hx : x ∈ E) : + data.A.phaseMetricRead i e.symm h x 0 * data.A.phaseMetricRead i e.symm h x 2 - + (data.A.phaseMetricRead i e.symm h x 1)^2 ≠ 0 := by + have hh := (data.A.phaseMetricRead_positive i h e he hi (hCS (hEC x hx)).2 (hactiveE x hx)).2 + rw [baseEquiv.apply_symm_apply] at hh + exact ne_of_gt hh + exact data.exact_circular_primitive_boundary hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα (fun J hJ t => hvel J t) S hSc hTS hQ + (hQT.trans hQO) hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget hC hCS + hCurveC hactive hcurv η hη havoid hEC hactiveE hdetE B slopeBound hcurvE hcross + (fun p hp t _ => hreg _ (hST (mem_image_of_mem _ (subset_closure (hCS hp).1))) t) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedPrimitiveSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedPrimitiveSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b27a3c8cc3fda5734856dbcb00a288a16897085 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedPrimitiveSupport.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactPrimitiveSupport +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseAmplitude +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveGlobalTensor + +namespace OAI + +/-! Construct the smooth amplitude and the exact localized tensor of an +actual surface primitive, retaining its precise geometric support. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates PhaseGeometry +local instance constructedSupportFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance constructedSupportFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance constructedSupportDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance constructedSupportDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance constructedSupportSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance constructedSupportSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem constructed_primitive_support (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hDs : closure D ⊆ (surfacePhaseChart (i : M) e).source) + (hactive : ∀ p ∈ closure D, A.weight i p ≠ 0) + {f phi : M → ℝ} (hf : ContMDiff planeModel 𝓘(ℝ) ∞ f) + (hf0 : ∀ p, 0 ≤ f p) (hfpos : ∀ p, 0 < f p ↔ p ∈ D) + (hphi : ∀ p ∈ D, phi =ᶠ[𝓝 p] (fun q => (e (chart (i : M) q)) 0)) : + ∃ K : Set JetPolynomial.Base, IsCompact K ∧ K ⊆ e.target ∧ + A.phaseSurfaceSupport i e K = closure D ∧ + e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) ∧ + (∀ p ∈ closure D, e (chart (i : M) p) ∈ K) ∧ + (∀ y ∈ K, A.chartWeight i (e.symm y) ≠ 0) ∧ + ∃ χ : JetPolynomial.Base → ℝ, ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ e.source ∧ (∀ x ∈ e.symm '' K, χ x = 1) ∧ + ∃ a : SmallModes.Base → ℝ, ContDiff ℝ ∞ a ∧ (∀ x, 0 ≤ a x) ∧ + (∀ p ∈ (surfacePhaseChart (i : M) e).source, a (surfacePhaseChart (i : M) e p) = f p) ∧ + (∀ x, 0 < a x ↔ x ∈ (surfacePhaseChart (i : M) e) '' D) ∧ + (∀ x ∉ K, a (baseEquiv x) = 0) ∧ + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y)) = + fun p => (f p)^2 • phaseDifferentialSquare phi p := by + have hDc : IsCompact (closure D) := isClosed_closure.isCompact + obtain ⟨K,hK,hKt,hSupport,hKA,hDK,hactiveK,χ,hχ,hχc,hχs,hχone⟩ := + A.compact_primitive_support i e he hDc hDs hactive + obtain ⟨a,ha,ha0,haf,hapos,_haoff⟩ := surface_phase_amplitude (i : M) e hi hDc hDs hf hf0 hfpos + have hfzero (p : M) (hp : p ∉ D) : f p = 0 := + le_antisymm (le_of_not_gt (fun hh => hp ((hfpos p).mp hh))) (hf0 p) + have hχD (p : M) (hp : p ∈ D) : χ (chart (i : M) p) = 1 := by + have hpe : chart (i : M) p ∈ e.source := (hDs (subset_closure hp)).2 + apply hχone + exact ⟨e (chart (i : M) p),hDK p (subset_closure hp),e.left_inv hpe⟩ + have hzero (x : JetPolynomial.Base) (hx : x ∉ K) : a (baseEquiv x) = 0 := by + apply le_antisymm _ (ha0 _) + apply le_of_not_gt + intro hpos + obtain ⟨p,hp,heq⟩ := (hapos _).mp hpos + apply hx + have heqx := congrArg baseEquiv.symm heq + change baseEquiv.symm (baseEquiv (e (chart (i : M) p))) = baseEquiv.symm (baseEquiv x) at heqx + have hh : e (chart (i : M) p) = x := by + simpa only [baseEquiv.symm_apply_apply] using heqx + exact hh ▸ hDK p (subset_closure hp) + refine ⟨K,hK,hKt,hSupport,hKA,hDK,hactiveK,χ,hχ,hχc,hχs,hχone,a,ha,ha0,haf,hapos,hzero,?_⟩ + exact A.phase_primitive_global_tensor i e he hχs ha0 + (fun _ hp => hDs (subset_closure hp)) hapos (fun p hp => haf p (hDs (subset_closure hp))) + hfzero (fun p hp => A.outer_one i p (subset_tsupport _ (hactive p (subset_closure hp)))) hχD hphi + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..edbcdf7e658e5da18bae9f6030a55b6d25b1a0f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ConstructedSurfaceLoop.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.JetLoopPullback + +namespace OAI + +/-! Construct the analytic surface-loop input from the geometric frame and +the controlled angle; no periodic velocity family is assumed here. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates SurfaceJetCoordinates +open VelocityFrame NormalFrame TransverseSmallFunction + +def jetNormal (j : CollarVelocity.JetBase) : Vec := + realNormalPart (j.2 1) (j.2 4) (j.2 0) + +lemma jetSlot_smooth (i : Fin 5) : + ContDiff ℝ ∞ (fun j : CollarVelocity.JetBase => j.2 i) := + (ContinuousLinearMap.proj i : RealTwoJet →L[ℝ] Vec).contDiff.comp contDiff_snd + +lemma jetNormal_smooth {Ω : Set CollarVelocity.JetBase} + (hD : ∀ j ∈ Ω, gramDet (j.2 1) (j.2 4) ≠ 0) : + ContDiffOn ℝ ∞ jetNormal Ω := by + intro j hj + exact (contDiffAt_realNormalPart (jetSlot_smooth 1).contDiffAt + (jetSlot_smooth 4).contDiffAt (jetSlot_smooth 0).contDiffAt (hD j hj)).contDiffWithinAt + +theorem constructed_surface_loop {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K O P : Set SmallModes.Base} {C₀ L U Ω : Set CollarVelocity.JetBase} + (hC₀ : IsCompact C₀) (hK : IsCompact K) (hL : IsCompact L) + (hCL : C₀ ⊆ L) (hKL : MapsTo (CollarVelocity.jetSection F) K L) + (hO : IsOpen O) (hKO : K ⊆ O) (hOU : ∀ j ∈ U, j.1 ∉ O) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C₀ ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {e₁ e₂ : CollarVelocity.JetBase → Vec} {a : CollarVelocity.JetBase → ℝ} + (he₁ : ContDiffOn ℝ ∞ e₁ Ω) (he₂ : ContDiffOn ℝ ∞ e₂ Ω) + (ha : ContDiffOn ℝ ∞ a Ω) (hD : ∀ j ∈ Ω, gramDet (j.2 1) (j.2 4) ≠ 0) + (hframe : ∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) + (hcollar : ∀ j ∈ U, jetNormal j ≠ 0 ∧ e₁ j = normalize (jetNormal j)) + (hn : ∀ j ∈ Ω, jetNormal j ≠ 0 ∨ a j ≠ 0) + (hap : ∀ j ∈ L \ C₀, 0 < a j) (T : ℝ) : + ∃ Z : TopologicalSpace.Opens CollarVelocity.JetBase, L ⊆ Z ∧ (Z : Set _) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), (∀ J, l.amplitude J = a (decode J)) ∧ + (∃ W : Set CollarVelocity.JetBase, IsOpen W ∧ C₀ ⊆ W ∧ W ⊆ U ∧ + ∀ J, decode J ∈ W → a (decode J) = 0 → ∀ t, l.velocity (J, t) = normal J) ∧ + ∃ α : CollarVelocity.JetBase × ℝ → ℝ, + ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j, t)) 1) ∧ + (∀ J t, l.velocity (J, t) = velocityRadius (normal J) (a (decode J)) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J, t))) ∧ + ∃ τ : SmallModes.Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x, t)) θ = 0 ↔ + θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y, τ x)) x (0, 1) := by + obtain ⟨Z, hZ, hLZ, hZΩ, α, hα, hper, V, hVs, hV, hm, hlen, _, + ⟨W, hW, hCW, hWU, hzero⟩, τ, hturn, hlarge⟩ := geometric_jet_velocity (X := fun j => j.2 0) (Y := fun j => j.2 1) + (C := fun j => j.2 4) (v := jetNormal) hF + hC₀ hK hL hCL hKL hO hKO hOU hU hΩ hCU hUΩ hLΩ hP hPK hlocal + (jetNormal_smooth hD) he₁ he₂ ha hD hframe (fun _ _ => rfl) hcollar hn hap T + have hVp : ∀ j ∈ Z, Function.Periodic (fun t => V (j, t)) 1 := by + intro j hj + have he : (fun t => V (j, t)) = + (fun θ => velocityRadius (jetNormal j) (a j) • direction (e₁ j) (e₂ j) θ) ∘ + (fun t => α (j, t)) := funext (fun t => hV (j, t)) + rw [he] + exact (hper j hj).comp _ + have hVy : ∀ j ∈ Z, ∀ t, j.2 1 ⬝ᵥ V (j, t) = 0 := by + intro j hj t + rw [hV (j, t), dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, (hframe j (hZΩ hj)).2.2.2.1, + (hframe j (hZΩ hj)).2.2.2.2.2.1] + have hVc : ∀ j ∈ Z, ∀ t, j.2 4 ⬝ᵥ V (j, t) = 0 := by + intro j hj t + rw [hV (j, t), dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, (hframe j (hZΩ hj)).2.2.2.2.1, + (hframe j (hZΩ hj)).2.2.2.2.2.2] + let Z' : TopologicalSpace.Opens CollarVelocity.JetBase := ⟨Z, hZ⟩ + let l : Loop (jetDomain Z') := Loop.ofGeometric (ha.mono hZΩ) hVs hVp + (fun j hj => hD j (hZΩ hj)) (fun j hj => hn j (hZΩ hj)) hVy hVc hlen hm + refine ⟨Z', hLZ, hZΩ, l, (fun _ => rfl), ⟨W, hW, hCW, hWU, ?_⟩, + α, hα, hper, ?_, τ, hturn, hlarge⟩ + · intro J hJ haz t + exact hzero (decode J) hJ haz t + · intro J t + exact hV (decode J, t) + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ControlledInteriorLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ControlledInteriorLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..da28a54175c55f93cad6b038ec7fa71f76149a42 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ControlledInteriorLoop.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ShiftedDensityPullback +import OAI.Geometry.SurfaceImmersion.Primitive.SmallTurnFunction + +namespace OAI + +/-! Assemble the interior velocity angle: a small translation with large turn +jets, an actual positive density, the exact prescribed vector mean, and exactly +two turns. No density or transverse-correction solvability is assumed. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open TransverseSmallFunction + +def normalizedAngle (ρ : Base × ℝ → ℝ) (a A s h : Base → ℝ) : Base × ℝ → ℝ := + PositiveDensity.reparametrize ρ + (fun z => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2) + +lemma unitAngle_periodic (a A s h : ℝ) : Function.Periodic (unitAngle a A s h) 1 := by + intro t + simp [unitAngle, blendedAngle, baseAngle, mul_add, Real.cos_add_two_pi] + +theorem controlled_interior_loop {K L O P : Set Base} + (hK : IsCompact K) (hL : IsCompact L) (hKL : K ⊆ L) + (hO : IsOpen O) (hKO : K ⊆ O) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f U ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {a A s : Base → ℝ} {c : Base → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hc : ContDiff ℝ ∞ c) + (hapos : ∀ b ∈ K, 0 < a b) + (hshape : ∀ b ∈ L, + (0 < a b ∧ 2 * Real.arctan (a b) ≤ A b ∧ s b ∈ Icc (0 : ℝ) 1 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) ∨ + (s b = 1 ∧ Real.pi < A b ∧ c b 0 ^ 2 + c b 1 ^ 2 < 1)) + (T : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ h : Base → ℝ, ContDiff ℝ ∞ h ∧ HasCompactSupport h ∧ tsupport h ⊆ O ∧ + (∀ x, |h x| < ε) ∧ ∃ W : Set Base, IsOpen W ∧ L ⊆ W ∧ + ∃ ρ : Base × ℝ → ℝ, ContDiffOn ℝ ∞ ρ (W ×ˢ univ) ∧ + (∀ b ∈ W, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + (∀ b ∈ W, (∫ t in 0..1, ρ (b, t)) = 1) ∧ + ContDiffOn ℝ ∞ (normalizedAngle ρ a A s h) (W ×ˢ univ) ∧ + (∀ b ∈ W, Function.Periodic (fun t => normalizedAngle ρ a A s h (b, t)) 1) ∧ + (∀ b ∈ W, (∫ t in 0..1, + ![Real.cos (normalizedAngle ρ a A s h (b, t)), + Real.sin (normalizedAngle ρ a A s h (b, t))]) = c b) ∧ + (∀ b ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => normalizedAngle ρ a A s h (b, t)) θ = 0 ↔ + θ = 0 ∨ θ = PositiveDensity.clock ρ b (1 / 2)) ∧ + ∀ b ∈ K, + T < fderiv ℝ (fun x => normalizedAngle ρ a A s h (x, 0)) b (0, 1) ∧ + T < fderiv ℝ (fun x => normalizedAngle ρ a A s h + (x, PositiveDensity.clock ρ b (1 / 2))) b (0, 1) := by + obtain ⟨W, hW, hKW, δ, hδ, hdensity⟩ := small_shift_density ha hA hs hc hL hshape + obtain ⟨h, hh, hhc, hhs, hhb, hhlarge⟩ := exists_small_turn_function + hK hO hKO hP hPK hlocal ha hA hs T (lt_min hε hδ) + have hhδ : ∀ b, |h b| < δ := fun b => lt_of_lt_of_le (hhb b) (min_le_right _ _) + obtain ⟨ρ, hρ, hpos, hper, hmass, hmean⟩ := hdensity h hh hhδ + have hα := PositiveDensity.reparametrize_smoothOn hW hρ hpos + (fun b _ => hper b) hmass (unitAngle_smooth ha hA hs hh).contDiffOn + have hp := blendedPath_smooth ha hA hs hh + have hqmean (b : Base) (hb : b ∈ W) : + (∫ t in 0..1, PositiveDensity.reparametrize ρ + (fun z => blendedPath (a z.1) (A z.1) (s z.1) (h z.1) z.2) (b, t)) = c b := + (PositiveDensity.reparametrize_mean hW hρ hpos (fun b _ => hper b) + hmass hp.contDiffOn hb).trans (hmean b hb) + refine ⟨h, hh, hhc, hhs, (fun x => lt_of_lt_of_le (hhb x) (min_le_left _ _)), + W, hW, hKW, ρ, hρ, hpos, hper, hmass, hα, ?_, ?_, ?_, ?_⟩ + · intro b hb + exact PositiveDensity.reparametrize_periodic hW hρ hpos (fun b _ => hper b) + hmass (fun b _ => unitAngle_periodic (a b) (A b) (s b) (h b)) hb + · intro b hb + exact hqmean b hb + · intro b hb θ hθ + have hAb : 0 < A b := by + rcases hshape b (hKL hb) with hbase | hinterior + · exact lt_of_lt_of_le (mul_pos (by norm_num) (Real.arctan_pos.mpr hbase.1)) hbase.2.1 + · exact Real.pi_pos.trans hinterior.2.1 + have hsb : s b ∈ Icc (0 : ℝ) 1 := by + rcases hshape b (hKL hb) with hbase | hinterior + · exact hbase.2.2.1 + · rw [hinterior.1]; exact ⟨zero_le_one, le_rfl⟩ + exact reparametrized_two_turns ha hA hs hh hW hρ hpos + (fun b _ => hper b) hmass (hKW (hKL hb)) (hapos b hb) hAb hsb hθ + · exact large_turns_after_reparametrization ha hA hs hh hW (hKL.trans hKW) hρ hpos + (fun b _ => hper b) hmass hhlarge + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CorrectedCircularFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CorrectedCircularFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..7655aa6c8a104042131301f6388f03c6b3da58e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CorrectedCircularFamily.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyGeometry +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPrimitiveFamily +import OAI.Geometry.SurfaceImmersion.Primitive.CurvedAtlasPrimitives + +namespace OAI + +/-! Actual corrected amplitudes and localized phases on the selected circles. +The remaining operator hypotheses are finite coefficient invertibility and positivity. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance correctedCircularFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance correctedCircularFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance correctedCircularDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance correctedCircularDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance correctedCircularSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance correctedCircularSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace CircularFamilyGeometry +variable {A : SmoothingAtlas M} (q : CircularFamilyGeometry A (A.centers × Fin 3)) + +def localPhases (i : A.centers) (j : Fin 3) : Base → ℝ := + centeredConvexPhase (q.linearPart (i,j)) (q.convexPart (i,j)) (coordinateChart (i : M) i) + +def globalPhases : (A.centers × Fin 3) → M → ℝ := A.curvedAtlasPhase q.localPhases + +omit [CompactSpace M] [T2Space M] in +lemma globalPhases_smooth (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (q.globalPhases a) := + A.curvedAtlasPhase_smooth q.localPhases (fun _ _ => centeredConvexPhase_smooth _ _ _) a + +omit [CompactSpace M] [T2Space M] in +lemma globalPhases_germ + (hindex : ∀ a, (q.curves a).index = a.1) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (a : A.centers × Fin 3) {p : M} + (hp : p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a)) : + q.globalPhases a =ᶠ[𝓝 p] (fun x => ((q.curves a).phase (chart ((q.curves a).index : M) x)) 0) := by + have hw : A.weight a.1 p ≠ 0 := by + rw [← hindex a] + apply ne_of_gt ((q.weight_positive a p).mpr ?_) + refine ⟨hp.1,?_⟩ + change circularRadiusSquared (coordinateChart ((q.curves a).index : M) (q.curves a).index) + (coordinateChart ((q.curves a).index : M) p) < (q.outerRadius a)^2 + exact hp.2.trans (q.radius_outer a) + have hg := A.curvedAtlasPhase_eventually q.localPhases a (houter a.1) (subset_tsupport _ hw) + apply hg.trans + apply Filter.Eventually.of_forall + intro x + have hh := q.first_coordinate a (chart ((q.curves a).index : M) x) + change ((q.curves a).phase (chart ((q.curves a).index : M) x)) 0 = _ at hh + rw [hindex a] at hh + change q.localPhases a.1 a.2 (coordinateChart (a.1 : M) x) = _ + rw [hindex a] + exact hh.symm + +omit [T2Space M] in + theorem corrected_family + (hindex : ∀ a, (q.curves a).index = a.1) + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (A.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hpsi0 : ∀ a p, 0 ≤ psi a p) + (hpsiPos : ∀ a p, 0 < psi a p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a)) + (hsupport : ∀ a, tsupport (psi a) ⊆ (chart (a.1 : M)).source) + (hQ : ∀ a p, p ∈ tsupport (psi a) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hinv : ∀ p, (A.primitiveFullOperator P psi q.globalPhases p).IsInvertible) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hsymm : ∀ p v w, u p v w = u p w v) + (hpos : ∀ a p, p ∈ tsupport (psi a) → + 0 < A.primitiveCoefficientField P a p (A.correctedPrimitiveTensor P psi q.globalPhases u p)) : + ∃ d : CircularPrimitiveFamily A (A.centers × Fin 3), + d.curves = q.curves ∧ d.radius = q.radius ∧ d.outerRadius = q.outerRadius ∧ + d.chartRadius = q.chartRadius ∧ d.linearPart = q.linearPart ∧ d.convexPart = q.convexPart ∧ + d.phase = q.globalPhases ∧ d.amplitude = A.correctedPrimitiveAmplitude P psi q.globalPhases u ∧ + ∀ p, (∑ a, (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p) = u p := by + let amp := A.correctedPrimitiveAmplitude P psi q.globalPhases u + have hamp : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (amp a) := fun a => + A.correctedPrimitiveAmplitude_smooth_of_data P psi q.globalPhases hpsi q.globalPhases_smooth + hsupport hQ houter hinv u hu hpos a + have hamp0 : ∀ a p, 0 ≤ amp a p := fun a p => mul_nonneg (hpsi0 a p) (Real.sqrt_nonneg _) + have hpositive : ∀ a p, 0 < amp a p ↔ + p ∈ circularCoordinateDisk ((q.curves a).index : M) (q.radius a) := fun a p => + (A.correctedPrimitiveAmplitude_pos_iff P psi q.globalPhases u hpos a p).trans (hpsiPos a p) + let d := q.withAmplitudes amp q.globalPhases hamp q.globalPhases_smooth hamp0 hpositive + (fun a p hp => q.globalPhases_germ hindex houter a hp) + refine ⟨d,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,?_⟩ + exact A.correctedPrimitiveAmplitude_reconstruct P psi q.globalPhases hinv u hsymm + (fun a p hp => (hpos a p hp).le) + +end CircularFamilyGeometry +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingChoiceScaling.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingChoiceScaling.lean new file mode 100644 index 0000000000000000000000000000000000000000..edeed9494be048acabc9bee387117fc03a81448d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingChoiceScaling.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProfileCrossingChoice + +namespace OAI + +/-! Crossing normal choices are invariant under the positive squares arising +when a nonvertical curve direction is written in slope coordinates. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +lemma crossing_choice_scale {n p q : Vec} {r s : ℝ} (hr : 0 < r) (hs : 0 < s) + (hchoice : (0 < p ⬝ᵥ n ∧ 0 < q ⬝ᵥ n) ∨ + (0 < p ⬝ᵥ q ∧ ∃ w : Vec, n ⬝ᵥ w = 0 ∧ 0 < p ⬝ᵥ w ∧ 0 < q ⬝ᵥ w)) : + (0 < (r • p) ⬝ᵥ n ∧ 0 < (s • q) ⬝ᵥ n) ∨ + (0 < (r • p) ⬝ᵥ (s • q) ∧ ∃ w : Vec, n ⬝ᵥ w = 0 ∧ + 0 < (r • p) ⬝ᵥ w ∧ 0 < (s • q) ⬝ᵥ w) := by + rcases hchoice with ⟨hp,hq⟩ | ⟨hpq,w,hnw,hpw,hqw⟩ + · left + simpa only [smul_dotProduct,smul_eq_mul] using And.intro (mul_pos hr hp) (mul_pos hs hq) + · right + refine ⟨?_,w,hnw,?_,?_⟩ + · simpa only [smul_dotProduct,dotProduct_smul,smul_eq_mul,mul_assoc] using mul_pos hs (mul_pos hr hpq) + · simpa only [smul_dotProduct,smul_eq_mul] using mul_pos hr hpw + · simpa only [smul_dotProduct,smul_eq_mul] using mul_pos hs hqw + +lemma realSecondForm_smul_self {F : RField 4} (hF : ContDiff ℝ ∞ F) + (r : ℝ) (v p : Base) : + realSecondForm F (r • v) (r • v) p = r^2 • realSecondForm F v v p := by + rw [realSecondForm_quadratic hF,PhaseGeometry.secondQuadratic_smul, + ← realSecondForm_quadratic hF] + +lemma realSecondForm_firstSlope {F : RField 4} (hF : ContDiff ℝ ∞ F) + (b c : ℝ) (p : Base) (hb : b ≠ 0) : + realSecondForm F (b,c) (b,c) p = b^2 • realSecondForm F (1,c/b) (1,c/b) p := by + have hv : (b,c) = b • ((1,c/b) : Base) := by + apply Prod.ext + · simp + · change c = b*(c/b) + field_simp + rw [hv,realSecondForm_smul_self hF] + +lemma crossing_choice_firstSlope {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : Base) (n : Vec) (v w : Base) (hv : v.1 ≠ 0) (hw : w.1 ≠ 0) + (hchoice : + (0 < realSecondForm F (1,v.2/v.1) (1,v.2/v.1) p ⬝ᵥ n ∧ + 0 < realSecondForm F (1,w.2/w.1) (1,w.2/w.1) p ⬝ᵥ n) ∨ + (0 < realSecondForm F (1,v.2/v.1) (1,v.2/v.1) p ⬝ᵥ + realSecondForm F (1,w.2/w.1) (1,w.2/w.1) p ∧ + ∃ a : Vec, n ⬝ᵥ a = 0 ∧ + 0 < realSecondForm F (1,v.2/v.1) (1,v.2/v.1) p ⬝ᵥ a ∧ + 0 < realSecondForm F (1,w.2/w.1) (1,w.2/w.1) p ⬝ᵥ a)) : + (0 < realSecondForm F v v p ⬝ᵥ n ∧ 0 < realSecondForm F w w p ⬝ᵥ n) ∨ + (0 < realSecondForm F v v p ⬝ᵥ realSecondForm F w w p ∧ + ∃ a : Vec, n ⬝ᵥ a = 0 ∧ + 0 < realSecondForm F v v p ⬝ᵥ a ∧ 0 < realSecondForm F w w p ⬝ᵥ a) := by + have h := crossing_choice_scale (sq_pos_of_ne_zero hv) (sq_pos_of_ne_zero hw) hchoice + rw [← realSecondForm_firstSlope hF v.1 v.2 p hv, + ← realSecondForm_firstSlope hF w.1 w.2 p hw] at h + exact h + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingComponents.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingComponents.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e1c5fbfd9eba5380a46921610214009baee459b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingComponents.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedBoundaryInvariant + +namespace OAI + +/-! Exact scalar identities used in the later-curve crossing calculation. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation + +/-- The normal components forced by the Gauss identity when the transverse +second-form component is `(S,0)`. -/ +def frameXX (S D N L k : ℝ) : ℝ × ℝ := ((k+D^2+N^2)/S,L) +def frameXY (D N : ℝ) : ℝ × ℝ := (D,N) +def frameYY (S : ℝ) : ℝ × ℝ := (S,0) + +def pureComponents (S D N L k b c : ℝ) : ℝ × ℝ := + b^2 • frameXX S D N L k + (2*b*c) • frameXY D N + c^2 • frameYY S + +def slopePure (S D N L k t : ℝ) : ℝ × ℝ := + ((N^2+k+(D+S*t)^2)/S,L+2*N*t) + +def slopeMixed (S D N L k t u : ℝ) : ℝ × ℝ := + ((N^2+k+(D+S*t)*(D+S*u))/S,L+N*(t+u)) + +lemma frame_gauss {S D N L k : ℝ} (hS : S ≠ 0) : + (frameXX S D N L k).1*S-((frameXY D N).1^2+(frameXY D N).2^2) = k := by + dsimp [frameXX,frameXY] + field_simp; ring + +lemma pure_first_identity {S D N L k b c : ℝ} (hS : S ≠ 0) : + S*(pureComponents S D N L k b c).1 = (D*b+S*c)^2+(k+N^2)*b^2 := by + dsimp [pureComponents,frameXX,frameXY,frameYY] + field_simp; ring + +lemma pure_second_identity (S D N L k b c : ℝ) : + (pureComponents S D N L k b c).2 = L*b^2+2*N*b*c := by + simp only [pureComponents,frameXX,frameXY,frameYY,Prod.snd_add, + Prod.smul_snd,smul_eq_mul] + ring + +lemma pure_unit_slope {S D N L k t : ℝ} (hS : S ≠ 0) : + pureComponents S D N L k 1 t = slopePure S D N L k t := by + ext <;> dsimp [pureComponents,frameXX,frameXY,frameYY,slopePure] <;> field_simp <;> ring + +lemma mixed_sub_left {S D N L k t u : ℝ} (hS : S ≠ 0) : + slopeMixed S D N L k t u-slopePure S D N L k t = + (u-t) • (D+S*t,N) := by + ext <;> dsimp [slopeMixed,slopePure] <;> field_simp <;> ring + +lemma mixed_sub_right {S D N L k t u : ℝ} (hS : S ≠ 0) : + slopeMixed S D N L k t u-slopePure S D N L k u = + (t-u) • (D+S*u,N) := by + ext <;> dsimp [slopeMixed,slopePure] <;> field_simp <;> ring + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingCoordinateMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingCoordinateMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..6733672069735b4862efced1fb6d181b5862257d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingCoordinateMap.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingTargetLinear + +namespace OAI + +/-! The explicit map straightening two transverse surface sheets that +already use a common curve parameter as their second coordinate. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def crossingCoordinateMap (F G : Base → ProjectionTarget 3) (z : Base × ℝ) : ProjectionTarget 3 := + F (crossingLeft z)+G (crossingRight z)-F (crossingAxis z) + +lemma crossingCoordinateMap_smooth {F G : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + ContDiff ℝ ∞ (crossingCoordinateMap F G) := + ((hF.comp crossingLeft.contDiff).add (hG.comp crossingRight.contDiff)).sub + (hF.comp crossingAxis.contDiff) + +lemma crossingCoordinateMap_fderiv {F G : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (t : ℝ) : + fderiv ℝ (crossingCoordinateMap F G) (0,t) = + crossingTargetLinear (fderiv ℝ F ![0,t]) (fderiv ℝ G ![0,t]) := by + have hLF : HasFDerivAt F (fderiv ℝ F ![0,t]) (crossingLeft (0,t)) := by + rw [crossingLeft_apply] + exact (hF.differentiable (by simp) _).hasFDerivAt + have hRF : HasFDerivAt G (fderiv ℝ G ![0,t]) (crossingRight (0,t)) := by + rw [crossingRight_apply] + exact (hG.differentiable (by simp) _).hasFDerivAt + have hAF : HasFDerivAt F (fderiv ℝ F ![0,t]) (crossingAxis (0,t)) := by + rw [crossingAxis_apply] + exact (hF.differentiable (by simp) _).hasFDerivAt + have hL := hLF.comp (0,t) crossingLeft.hasFDerivAt + have hR := hRF.comp (0,t) crossingRight.hasFDerivAt + have hA := hAF.comp (0,t) crossingAxis.hasFDerivAt + exact ((hL.add hR).sub hA).fderiv + +lemma common_axis_derivatives {F G : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (t : ℝ) + (he : (fun s => F ![0,s]) =ᶠ[𝓝 t] (fun s => G ![0,s])) : + fderiv ℝ F ![0,t] ![0,1] = fderiv ℝ G ![0,t] ![0,1] := by + let L : ℝ →L[ℝ] Base := ContinuousLinearMap.pi ![0,ContinuousLinearMap.id ℝ ℝ] + have hL : ∀ s, L s = ![0,s] := by + intro s + ext i + fin_cases i <;> rfl + have hEq : F ∘ L =ᶠ[𝓝 t] G ∘ L := by + filter_upwards [he] with s hs + simpa only [Function.comp_apply,hL] using hs + have hD : fderiv ℝ (F ∘ L) t = fderiv ℝ (G ∘ L) t := hEq.fderiv_eq + rw [fderiv_comp t (hF.differentiable (by simp) _) L.differentiableAt, + fderiv_comp t (hG.differentiable (by simp) _) L.differentiableAt,L.fderiv] at hD + simpa only [ContinuousLinearMap.comp_apply,hL] using + congrArg (fun D : ℝ →L[ℝ] ProjectionTarget 3 => D 1) hD + +theorem crossingCoordinateMap_regular {F G : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (t : ℝ) + (he : (fun s => F ![0,s]) =ᶠ[𝓝 t] (fun s => G ![0,s])) + (hs : Function.Surjective (fun z : Base × Base => + fderiv ℝ F ![0,t] z.1-fderiv ℝ G ![0,t] z.2)) : + Function.Bijective (fderiv ℝ (crossingCoordinateMap F G) (0,t)) := by + rw [crossingCoordinateMap_fderiv hF hG] + exact crossingTargetLinear_bijective _ _ (common_axis_derivatives hF hG t he) hs + +lemma crossingCoordinateMap_left {F G : Base → ProjectionTarget 3} {t : ℝ} + (he : F ![0,t] = G ![0,t]) (u : ℝ) : + crossingCoordinateMap F G (![u,0],t) = F ![u,t] := by + rw [crossingCoordinateMap,crossingLeft_apply,crossingRight_apply,crossingAxis_apply] + simp only [Matrix.cons_val_zero,Matrix.cons_val_one] + rw [he,add_sub_cancel_right] + +lemma crossingCoordinateMap_right (F G : Base → ProjectionTarget 3) (v t : ℝ) : + crossingCoordinateMap F G (![0,v],t) = G ![v,t] := by + rw [crossingCoordinateMap,crossingLeft_apply,crossingRight_apply,crossingAxis_apply] + simp only [Matrix.cons_val_zero,Matrix.cons_val_one] + abel + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantScaling.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantScaling.lean new file mode 100644 index 0000000000000000000000000000000000000000..705b494eea2378e603ff7477a09df1aeca0955de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantScaling.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingChoiceScaling + +namespace OAI + +/-! Both ordered crossing invariants scale by the positive product of +squared changes in the two tangent directions. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +lemma normalize_pos_smul (v : Vec) {c : ℝ} (hc : 0 < c) : + VelocityFrame.normalize (c • v) = VelocityFrame.normalize v := by + have hs : Real.sqrt ((c • v) ⬝ᵥ (c • v)) = c*Real.sqrt (v ⬝ᵥ v) := by + simp only [smul_dotProduct,dotProduct_smul,smul_eq_mul] + rw [← mul_assoc,← pow_two,Real.sqrt_mul (sq_nonneg c),Real.sqrt_sq hc.le] + simp only [VelocityFrame.normalize,hs,mul_inv_rev,smul_smul] + congr 1 + field_simp + +lemma realSecondForm_smul_directions {F : RField 4} (hF : ContDiff ℝ ∞ F) + (r s : ℝ) (v w p : Base) : + realSecondForm F (r • v) (s • w) p = (r*s) • realSecondForm F v w p := by + rw [realSecondForm_bilinear hF,realSecondForm_bilinear hF] + ext j + simp [realSecondTensor] + ring + +lemma gramDet_smul_directions (X Y : Vec) (r s : ℝ) : + NormalFrame.gramDet (r • X) (s • Y) = r^2*s^2*NormalFrame.gramDet X Y := by + simp only [NormalFrame.gramDet,smul_dotProduct,dotProduct_smul,smul_eq_mul] + ring + +lemma orderedCrossing_smul_directions {F : RField 4} (hF : ContDiff ℝ ∞ F) + {r s : ℝ} (hr : r ≠ 0) (v w p : Base) (κ : ℝ) : + orderedCrossing F (r • v) (s • w) p κ = r^2*s^2*orderedCrossing F v w p κ := by + have hd (t : ℝ) (u : Base) : coordDeriv (t • u) F p = t • coordDeriv u F p := by + simp [coordDeriv] + simp only [orderedCrossing,realSecondForm_smul_directions hF, + show r*r=r^2 by ring,normalize_pos_smul _ (sq_pos_of_ne_zero hr), + hd,gramDet_smul_directions,smul_dotProduct,smul_eq_mul] + ring + +lemma orderedCrossing_firstSlope {F : RField 4} (hF : ContDiff ℝ ∞ F) + (v w p : Base) (κ : ℝ) (hv : v.1 ≠ 0) (hw : w.1 ≠ 0) : + orderedCrossing F v w p κ = v.1^2*w.1^2* + orderedCrossing F (1,v.2/v.1) (1,w.2/w.1) p κ := by + have hh (u : Base) (hu : u.1 ≠ 0) : u.1 • ((1,u.2/u.1) : Base) = u := by + apply Prod.ext + · simp + · change u.1*(u.2/u.1)=u.2 + field_simp + convert orderedCrossing_smul_directions hF hv ((1,v.2/v.1) : Base) + ((1,w.2/w.1) : Base) p κ (s := w.1) using 1 + rw [hh v hv,hh w hw] + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..b087e5aea2906ec31582c3a233cdbd9f02d6bd7f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingInvariantThreshold.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingThreshold + +namespace OAI + +/-! The same finite threshold gives both ordered crossing inequalities. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation + +lemma crossing_positive_of_projection {K T k t u p : ℝ} + (hK : 0 ≤ K) (hk : -K ≤ k) (ht : |t| ≤ T) (hu : |u| ≤ T) + (hp : Real.sqrt (K*(2*T)^2)+1 < p) : 0 < p^2+k*(t-u)^2 := by + have hab : |t-u| ≤ 2*T := by + have hh := (abs_sub t u).trans (add_le_add ht hu) + linarith + have hsq : (t-u)^2 ≤ (2*T)^2 := by + simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg (t-u)) hab 2 + have hcurv : -K*(2*T)^2 ≤ k*(t-u)^2 := by + have h₁ := mul_le_mul_of_nonneg_left hsq hK + have h₂ := mul_le_mul_of_nonneg_right hk (sq_nonneg (t-u)) + nlinarith + have hs := Real.sq_sqrt (mul_nonneg hK (sq_nonneg (2*T))) + have hs0 := Real.sqrt_nonneg (K*(2*T)^2) + nlinarith + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +def modelOrderedCrossing (n m : E) (S D N L k t u : ℝ) : ℝ := + (inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)))^2+k*(t-u)^2 + +theorem ordered_crossing_threshold (sLo sHi K d T : ℝ) + (hmin : 0 < sLo) (hmax : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, sLo ≤ S → S ≤ sHi → -K ≤ k → |D| ≤ d → + |t| ≤ T → |u| ≤ T → H < |N| → + 0 < (slopePure S D N L k t).1 ∧ 0 < (slopePure S D N L k u).1 ∧ + 0 < modelOrderedCrossing n m S D N L k t u ∧ + 0 < modelOrderedCrossing n m S D N L k u t := by + let R := Real.sqrt (K*(2*T)^2)+1 + have hR : 0 ≤ R := by dsimp [R]; positivity + obtain ⟨H,hH,hh⟩ := uniform_crossing_threshold (E := E) sLo sHi K d T R hmin hmax hK hd hT hR + refine ⟨H,hH,?_⟩ + intro n m hn hm hmn S D N L k t u hSmin hSmax hk hDb htb hub hN + obtain ⟨hpt,hqt⟩ := hh n m hn hm hmn S D N L k t u hSmin hSmax hk hDb htb hub hN + obtain ⟨hpu,hqu⟩ := hh n m hn hm hmn S D N L k u t hSmin hSmax hk hDb hub htb hN + exact ⟨hpt,hpu,crossing_positive_of_projection hK hk htb hub hqt, + crossing_positive_of_projection hK hk hub htb hqu⟩ + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..69346771c8c0c946cb6923f179180cf3a8bdfdd8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNeighborhood.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedCrossingAdjustment + +namespace OAI + +/-! Extend a pointwise common half-plane to a neighborhood, with an +explicit smooth transverse vector field. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem crossing_halfplane_neighborhood {U : Set E} (hU : IsOpen U) + {n p q : E → Vec} (hn : ContDiffOn ℝ ∞ n U) + (hp : ContDiffOn ℝ ∞ p U) (hq : ContDiffOn ℝ ∞ q U) + (hunit : ∀ x ∈ U, n x ⬝ᵥ n x = 1) {x : E} (hx : x ∈ U) {w : Vec} + (hnw : n x ⬝ᵥ w = 0) (hpw : 0 < p x ⬝ᵥ w) (hqw : 0 < q x ⬝ᵥ w) + (hpq : 0 < p x ⬝ᵥ q x) : + ∃ W : Set E, IsOpen W ∧ x ∈ W ∧ W ⊆ U ∧ + ∃ m : E → Vec, ContDiffOn ℝ ∞ m U ∧ + ∀ y ∈ W, n y ⬝ᵥ m y = 0 ∧ 0 < p y ⬝ᵥ m y ∧ + 0 < q y ⬝ᵥ m y ∧ 0 < p y ⬝ᵥ q y := by + let m : E → Vec := fun y => w-(n y ⬝ᵥ w) • n y + have hm : ContDiffOn ℝ ∞ m U := + contDiffOn_const.sub ((dot_smoothOn hn contDiffOn_const).smul hn) + have hmx : m x = w := by simp [m,hnw] + have hP : ∀ᶠ y in 𝓝 x, 0 < p y ⬝ᵥ m y := + ((dot_smoothOn hp hm).contDiffAt (hU.mem_nhds hx)).continuousAt + (Ioi_mem_nhds (by simpa only [hmx] using hpw)) + have hQ : ∀ᶠ y in 𝓝 x, 0 < q y ⬝ᵥ m y := + ((dot_smoothOn hq hm).contDiffAt (hU.mem_nhds hx)).continuousAt + (Ioi_mem_nhds (by simpa only [hmx] using hqw)) + have hPQ : ∀ᶠ y in 𝓝 x, 0 < p y ⬝ᵥ q y := + ((dot_smoothOn hp hq).contDiffAt (hU.mem_nhds hx)).continuousAt (Ioi_mem_nhds hpq) + have hnb : {y | y ∈ U ∧ 0 < p y ⬝ᵥ m y ∧ 0 < q y ⬝ᵥ m y ∧ 0 < p y ⬝ᵥ q y} ∈ 𝓝 x := by + filter_upwards [hU.mem_nhds hx,hP,hQ,hPQ] with y hy hyP hyQ hyPQ + exact ⟨hy,hyP,hyQ,hyPQ⟩ + obtain ⟨W,hsub,hW,hxW⟩ := mem_nhds_iff.mp hnb + refine ⟨W,hW,hxW,fun y hy => (hsub hy).1,m,hm,?_⟩ + intro y hy + obtain ⟨hyU,hyP,hyQ,hyPQ⟩ := hsub hy + refine ⟨?_,hyP,hyQ,hyPQ⟩ + simp only [m,dotProduct_sub,dotProduct_smul,smul_eq_mul,hunit y hyU,mul_one,sub_self] + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNormalPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNormalPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..23af831f0bca347ab6e0a1faa6fe6082ae1e42f5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingNormalPath.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ActualCurveAvoidance + +namespace OAI + +/-! The preferred-normal adjustment at a crossing: a normalized straight path +stays away from both forbidden antipodes and ends with positive pairings. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +lemma nonzero_of_dot_pos {v m : Vec} (h : 0 < v ⬝ᵥ m) : v ≠ 0 := by + intro hz + rw [hz,zero_dotProduct] at h + exact (lt_irrefl _ h) + +lemma normalize_dot_pos {v m : Vec} (h : 0 < v ⬝ᵥ m) : 0 < normalize v ⬝ᵥ m := by + have hv := nonzero_of_dot_pos h + have hnorm : 0 < Real.sqrt (v ⬝ᵥ v) := Real.sqrt_pos.mpr (dot_self_pos hv) + simpa only [normalize,smul_dotProduct,smul_eq_mul] using mul_pos (inv_pos.mpr hnorm) h + +lemma crossing_blend_nonzero {n p m : Vec} {t : ℝ} (hn : n ⬝ᵥ n = 1) + (hnm : n ⬝ᵥ m = 0) (hp : 0 < p ⬝ᵥ m) (ht : t ∈ Icc (0 : ℝ) 1) : + blend n (normalize p) t ≠ 0 := by + by_cases ht0 : t = 0 + · intro hz + have hzero : n = 0 := by simpa only [blend,ht0,sub_zero,one_smul,zero_smul,add_zero] using hz + rw [hzero,zero_dotProduct] at hn + norm_num at hn + · have htp : 0 < t := lt_of_le_of_ne ht.1 (Ne.symm ht0) + apply nonzero_of_dot_pos (m := m) + simp only [blend,add_dotProduct,smul_dotProduct,smul_eq_mul,hnm,mul_zero,zero_add] + exact mul_pos htp (normalize_dot_pos hp) + +theorem crossing_normal_path {n p q m : Vec} (hn : n ⬝ᵥ n = 1) + (hnm : n ⬝ᵥ m = 0) (hp : 0 < p ⬝ᵥ m) (hq : 0 < q ⬝ᵥ m) + {t : ℝ} (ht : t ∈ Icc (0 : ℝ) 1) : + first n (normalize p) t ⬝ᵥ first n (normalize p) t = 1 ∧ + first n (normalize p) t ≠ -normalize p ∧ + first n (normalize p) t ≠ -normalize q := by + have hb := crossing_blend_nonzero hn hnm hp ht + have hbm : 0 ≤ blend n (normalize p) t ⬝ᵥ m := by + simp only [blend,add_dotProduct,smul_dotProduct,smul_eq_mul,hnm,mul_zero,zero_add] + exact mul_nonneg ht.1 (normalize_dot_pos hp).le + have hfm : 0 ≤ first n (normalize p) t ⬝ᵥ m := by + change 0 ≤ normalize (blend n (normalize p) t) ⬝ᵥ m + simp only [normalize,smul_dotProduct,smul_eq_mul] + exact mul_nonneg (inv_nonneg.mpr (Real.sqrt_nonneg _)) hbm + refine ⟨normalize_unit hb,?_,?_⟩ + · intro he + rw [he,neg_dotProduct] at hfm + linarith [normalize_dot_pos hp] + · intro he + rw [he,neg_dotProduct] at hfm + linarith [normalize_dot_pos hq] + +theorem crossing_normal_path_endpoint {n p q m : Vec} + (hp : 0 < p ⬝ᵥ m) (hpq : 0 < p ⬝ᵥ q) : + 0 < p ⬝ᵥ first n (normalize p) 1 ∧ 0 < q ⬝ᵥ first n (normalize p) 1 := by + rw [first_one (normalize_unit (nonzero_of_dot_pos hp))] + constructor + · rw [dotProduct_comm] + exact normalize_dot_pos (dot_self_pos (nonzero_of_dot_pos hp)) + · rw [dotProduct_comm] + exact normalize_dot_pos hpq + +lemma crossing_normal_path_smoothAt {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {n p m : E → Vec} {t : E → ℝ} {x : E} + (hn : ContDiffAt ℝ ∞ n x) (hp : ContDiffAt ℝ ∞ p x) (ht : ContDiffAt ℝ ∞ t x) + (hnn : n x ⬝ᵥ n x = 1) (hnm : n x ⬝ᵥ m x = 0) + (hpm : 0 < p x ⬝ᵥ m x) (ht01 : t x ∈ Icc (0 : ℝ) 1) : + ContDiffAt ℝ ∞ (fun y => first (n y) (normalize (p y)) (t y)) x := + first_smoothAt_of_nonzero hn (normalize_smoothAt hp (nonzero_of_dot_pos hpm)) ht + (crossing_blend_nonzero hnn hnm hpm ht01) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPlanes.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPlanes.lean new file mode 100644 index 0000000000000000000000000000000000000000..aff30b0133f6afe860143a6de1af2e5dc6d6f76f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPlanes.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingCoordinateMap + +namespace OAI + +/-! The two standard coordinate planes used for a regular double point. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def leftCrossingPlane (u : Base) : Base × ℝ := (![u 0,0],u 1) +def rightCrossingPlane (u : Base) : Base × ℝ := (![0,u 0],u 1) + +lemma leftCrossingPlane_smooth : ContDiff ℝ ∞ leftCrossingPlane := by + apply ContDiff.prodMk + · apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [leftCrossingPlane] <;> fun_prop + · change ContDiff ℝ ∞ (fun u : Base => u 1) + fun_prop + +lemma rightCrossingPlane_smooth : ContDiff ℝ ∞ rightCrossingPlane := by + apply ContDiff.prodMk + · apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [rightCrossingPlane] <;> fun_prop + · change ContDiff ℝ ∞ (fun u : Base => u 1) + fun_prop + +lemma leftCrossingPlane_axis (t : ℝ) : leftCrossingPlane ![0,t] = (0,t) := by + apply Prod.ext + · ext i + fin_cases i <;> rfl + · rfl + +lemma rightCrossingPlane_axis (t : ℝ) : rightCrossingPlane ![0,t] = (0,t) := by + apply Prod.ext + · ext i + fin_cases i <;> rfl + · rfl + +lemma crossingCoordinateMap_leftPlane {F G : Base → ProjectionTarget 3} (u : Base) + (he : F ![0,u 1] = G ![0,u 1]) : + crossingCoordinateMap F G (leftCrossingPlane u) = F u := by + have hu : (![u 0,u 1] : Base) = u := by ext i; fin_cases i <;> rfl + have h := crossingCoordinateMap_left he (u 0) + change crossingCoordinateMap F G (leftCrossingPlane u) = F ![u 0,u 1] at h + rwa [hu] at h + +lemma crossingCoordinateMap_rightPlane (F G : Base → ProjectionTarget 3) (u : Base) : + crossingCoordinateMap F G (rightCrossingPlane u) = G u := by + have hu : (![u 0,u 1] : Base) = u := by ext i; fin_cases i <;> rfl + have h := crossingCoordinateMap_right F G (u 0) (u 1) + change crossingCoordinateMap F G (rightCrossingPlane u) = G ![u 0,u 1] at h + rwa [hu] at h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPositivePairing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPositivePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..694097673a026c2d2e83346450d403f8346145d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingPositivePairing.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateGauss +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedBoundaryInvariant + +namespace OAI + +/-! The boundary Gauss inequality used when matching the interior and +exterior preferred normals. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open SmallModes RealModes NormalFrame + +lemma dot_square_le_self_of_unit (W n : Vec) (hn : n ⬝ᵥ n = 1) : + (W ⬝ᵥ n)^2 ≤ W ⬝ᵥ W := by + have h : 0 ≤ (W-(W ⬝ᵥ n) • n) ⬝ᵥ (W-(W ⬝ᵥ n) • n) := + Finset.sum_nonneg (fun i _ => mul_self_nonneg _) + simp only [sub_dotProduct,dotProduct_sub,smul_dotProduct,dotProduct_smul, + smul_eq_mul,hn,dotProduct_comm n W] at h + nlinarith + +lemma secondForm_gauss_directions {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) : + realSecondForm F v v p ⬝ᵥ realSecondForm F w w p - + realSecondForm F v w p ⬝ᵥ realSecondForm F v w p = + (v.1*w.2-v.2*w.1)^2 * + (realSecondForm F dx dx p ⬝ᵥ realSecondForm F dy dy p - + realSecondForm F dx dy p ⬝ᵥ realSecondForm F dx dy p) := by + conv_lhs => + simp only [realSecondForm_bilinear hF v v,realSecondForm_bilinear hF w w, + realSecondForm_bilinear hF v w] + simp only [realSecondTensor,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.head_cons,Matrix.tail_cons, + add_dotProduct,dotProduct_add,smul_dotProduct,dotProduct_smul,smul_eq_mul, + dotProduct_comm (realSecondForm F dy dy p) (realSecondForm F dx dx p), + dotProduct_comm (realSecondForm F dx dy p) (realSecondForm F dx dx p), + dotProduct_comm (realSecondForm F dy dy p) (realSecondForm F dx dy p)] + ring + +lemma orderedCrossing_le_pure_pairing {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) (kappa : ℝ) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hA : realSecondForm F v v p ≠ 0) + (hk : coordinateGauss (realMetric F dx dx) (realMetric F dx dy) + (realMetric F dy dy) p = kappa*gramDet (coordDeriv dx F p) (coordDeriv dy F p)) : + orderedCrossing F v w p kappa ≤ + realSecondForm F v v p ⬝ᵥ realSecondForm F w w p := by + have hg := secondForm_gauss_directions hF p v w + rw [gauss_metric_identity hF p hD,hk] at hg + have hgram : gramDet (coordDeriv v F p) (coordDeriv w F p) = + (v.1*w.2-v.2*w.1)^2*gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + rw [coordDeriv_eq_basis F v,coordDeriv_eq_basis F w,gramDet_change_basis] + have hp := dot_square_le_self_of_unit (realSecondForm F v w p) + (normalize (realSecondForm F v v p)) (normalize_unit hA) + unfold orderedCrossing + rw [hgram] + nlinarith + +lemma orderedCrossing_pos_pure_pairing {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) (kappa : ℝ) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hA : realSecondForm F v v p ≠ 0) + (hk : coordinateGauss (realMetric F dx dx) (realMetric F dx dy) + (realMetric F dy dy) p = kappa*gramDet (coordDeriv dx F p) (coordDeriv dy F p)) + (hQ : 0 < orderedCrossing F v w p kappa) : + 0 < realSecondForm F w w p ⬝ᵥ normalize (realSecondForm F v v p) := by + have hp := hQ.trans_le (orderedCrossing_le_pure_pairing hF p v w kappa hD hA hk) + rw [normalize,dotProduct_smul,dotProduct_comm (realSecondForm F w w p)] + exact mul_pos (inv_pos.mpr (Real.sqrt_pos.mpr (dot_self_pos hA))) hp + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingProjectionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingProjectionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..70ad438126aab63d8b698c2e3abab2445ac3a59b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingProjectionBounds.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingComponents + +namespace OAI + +/-! The ordered mixed projection is bounded independently of the unbounded +longitudinal second-form component. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma mixed_projection_lower {P Z : E} (hP : P ≠ 0) : + ‖P‖-‖Z-P‖ ≤ inner ℝ Z (‖P‖⁻¹ • P) := by + have hp : 0 < ‖P‖ := norm_pos_iff.mpr hP + have hi : -‖Z-P‖*‖P‖ ≤ inner ℝ (Z-P) P := by + have h := (neg_abs_le (inner ℝ (Z-P) P)).trans' (neg_le_neg (abs_real_inner_le_norm (Z-P) P)) + simpa only [neg_mul] using h + have he : inner ℝ Z P = inner ℝ (Z-P) P+‖P‖^2 := by + rw [inner_sub_left,real_inner_self_eq_norm_sq] + ring + rw [real_inner_smul_right,he] + calc + ‖P‖-‖Z-P‖ = (‖P‖^2-‖Z-P‖*‖P‖)/‖P‖ := by field_simp + _ ≤ (inner ℝ (Z-P) P+‖P‖^2)/‖P‖ := + div_le_div_of_nonneg_right (by linarith) hp.le + _ = ‖P‖⁻¹*(inner ℝ (Z-P) P+‖P‖^2) := by ring + +def frameVector (n m : E) (v : ℝ × ℝ) : E := v.1 • n+v.2 • m + +lemma frameVector_sub (n m : E) (v w : ℝ × ℝ) : + frameVector n m (v-w) = frameVector n m v-frameVector n m w := by + simp only [frameVector,Prod.fst_sub,Prod.snd_sub,sub_smul] + abel + +lemma frameVector_smul (n m : E) (a : ℝ) (v : ℝ × ℝ) : + frameVector n m (a • v) = a • frameVector n m v := by + simp only [frameVector,Prod.smul_fst,Prod.smul_snd,smul_eq_mul,smul_add,smul_smul] + +lemma frameVector_norm_le {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) (v : ℝ × ℝ) : + ‖frameVector n m v‖ ≤ |v.1|+|v.2| := by + simpa only [frameVector,norm_smul,Real.norm_eq_abs,hn,hm,mul_one] using + norm_add_le (v.1 • n) (v.2 • m) + +lemma frameVector_inner_first {n m : E} (hn : ‖n‖ = 1) (hmn : inner ℝ m n = 0) + (v : ℝ × ℝ) : inner ℝ (frameVector n m v) n = v.1 := by + simp only [frameVector,inner_add_left,real_inner_smul_left,real_inner_self_eq_norm_sq, + hn,one_pow,hmn,mul_one,mul_zero,add_zero] + +theorem crossing_projection_lower {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) + (hmn : inner ℝ m n = 0) {S D N L k t u : ℝ} (hS : S ≠ 0) + (hp : 0 < (slopePure S D N L k t).1) : + (slopePure S D N L k t).1-|u-t| *(|D+S*t|+|N|) ≤ + inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)) := by + let P := frameVector n m (slopePure S D N L k t) + let Z := frameVector n m (slopeMixed S D N L k t u) + have hip : inner ℝ P n = (slopePure S D N L k t).1 := frameVector_inner_first hn hmn _ + have hP : P ≠ 0 := by + intro h + rw [h,inner_zero_left] at hip + linarith + have hPn : (slopePure S D N L k t).1 ≤ ‖P‖ := by + rw [← hip] + simpa only [hn,mul_one] using real_inner_le_norm P n + have he : Z-P = (u-t) • frameVector n m (D+S*t,N) := by + change frameVector n m (slopeMixed S D N L k t u)- + frameVector n m (slopePure S D N L k t) = _ + rw [← frameVector_sub,mixed_sub_left hS,frameVector_smul] + have hdiff : ‖Z-P‖ ≤ |u-t| *(|D+S*t|+|N|) := by + rw [he,norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (frameVector_norm_le hn hm _) (abs_nonneg _) + exact (sub_le_sub hPn hdiff).trans (mixed_projection_lower hP) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingSafeNormalGluing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingSafeNormalGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2167a0fea3520479f08ccaa1bc52d03225778e9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingSafeNormalGluing.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDiskNormalGluing +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalDiskGluing +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal + +namespace OAI + +/-! Glue the constructed exact phase normal to the actual exterior +projection, producing the global preferred normal required by a primitive step. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates NormalFrame VelocityFrame +variable {M κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] [Fintype κ] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem crossing_safe_phase_normal_gluing (i : A.centers) {F n : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) + (hn : ContMDiff planeModel spaceModel ∞ n) + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hD : IsOpen D) + (E : Set M) (hE : E.Finite) (hEf : Disjoint E (frontier D)) + {U₀ : Set SmallModes.Base} (hU₀ : IsOpen U₀) {ν : SmallModes.Base → Vec} + (hν : ContDiffOn ℝ ∞ ν U₀) (hunit : ∀ x ∈ U₀, ν x ⬝ᵥ ν x = 1) + (hnormal : ∀ x ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A.phaseRealChartMap i e.symm F) x ⬝ᵥ ν x = 0) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDU : MapsTo (fun p => baseEquiv (e (chart (i : M) p))) (closure D) U₀) + (hDw : ∀ p ∈ closure D, A.weight i p ≠ 0) + (hproj : ∀ p ∉ D, A.projectedNormalField F n p ≠ 0) + (hanti : ∀ p ∈ frontier D, spaceCoordinates (A.unitProjectedNormalField F n p) ≠ + -ν (baseEquiv (e (chart (i : M) p)))) + (C : κ → Set M) (hC : ∀ k, IsClosed (C k)) (B : κ → M → Vec) + (hB : ∀ k, Continuous (B k)) + (hin : ∀ k p, p ∈ C k → p ∈ D → + ν (baseEquiv (e (chart (i : M) p))) ≠ -normalize (B k p)) + (hout : ∀ k p, p ∈ C k → p ∉ closure D → + spaceCoordinates (A.unitProjectedNormalField F n p) ≠ -normalize (B k p)) + (hpair : ∀ k p, p ∈ C k → p ∈ frontier D → + 0 < B k p ⬝ᵥ ν (baseEquiv (e (chart (i : M) p))) ∧ + 0 < B k p ⬝ᵥ spaceCoordinates (A.unitProjectedNormalField F n p)) : + ∃ N : PreferredNormal F, + (∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p)) ∧ + ∀ p ∈ E, (p ∈ D → N.vector p = A.phaseNormalLift i e ν p) ∧ + (p ∉ D → N.vector p = A.unitProjectedNormalField F n p) := by + have hf : frontier D ⊆ Eᶜ := fun p hp he => Set.disjoint_left.mp hEf he hp + obtain ⟨W,hW,_,hWE,N,hNa,hNb,havoid⟩ := A.phase_disk_normal_gluing_within i hF hI + hn houter e he hi Eᶜ hE.isClosed.isOpen_compl hD hf hU₀ hν hunit hnormal + hDs hDe hDU hDw hproj hanti C hC B hB hin hout hpair + refine ⟨N,havoid,?_⟩ + intro p hp + have hpW : p ∉ W := fun hw => hWE hw hp + refine ⟨fun hpD => hNa p ⟨hpD,hpW⟩,?_⟩ + intro hpD + have hpc : p ∉ closure D := by + intro hpc + have hpf : p ∈ frontier D := by rw [hD.frontier_eq]; exact ⟨hpc,hpD⟩ + exact Set.disjoint_left.mp hEf hp hpf + exact hNb p ⟨hpc,hpW⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingTargetLinear.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingTargetLinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c3562363f759312f739dade25f15e05eb1d118e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingTargetLinear.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapLinearCoordinates + +namespace OAI + +/-! An invertible target frame from two transverse planes sharing their +second coordinate direction. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma baseLinear_pair (P : Base →L[ℝ] ProjectionTarget 3) (r s : ℝ) : + P ![r,s] = r • P ![1,0] + s • P ![0,1] := by + have he : (![r,s] : Base) = r • ![1,0]+s • ![0,1] := by + ext i + fin_cases i <;> simp + rw [he,map_add,map_smul,map_smul] + +def crossingLeft : (Base × ℝ) →L[ℝ] Base := + ContinuousLinearMap.pi ![(ContinuousLinearMap.proj (0 : Fin 2)).comp + (ContinuousLinearMap.fst ℝ Base ℝ),ContinuousLinearMap.snd ℝ Base ℝ] + +def crossingRight : (Base × ℝ) →L[ℝ] Base := + ContinuousLinearMap.pi ![(ContinuousLinearMap.proj (1 : Fin 2)).comp + (ContinuousLinearMap.fst ℝ Base ℝ),ContinuousLinearMap.snd ℝ Base ℝ] + +def crossingAxis : (Base × ℝ) →L[ℝ] Base := + ContinuousLinearMap.pi ![0,ContinuousLinearMap.snd ℝ Base ℝ] + +lemma crossingLeft_apply (z : Base × ℝ) : crossingLeft z = ![z.1 0,z.2] := by + ext i + fin_cases i <;> rfl + +lemma crossingRight_apply (z : Base × ℝ) : crossingRight z = ![z.1 1,z.2] := by + ext i + fin_cases i <;> rfl + +lemma crossingAxis_apply (z : Base × ℝ) : crossingAxis z = ![0,z.2] := by + ext i + fin_cases i <;> rfl + +def crossingTargetLinear (P Q : Base →L[ℝ] ProjectionTarget 3) : + (Base × ℝ) →L[ℝ] ProjectionTarget 3 := + P.comp crossingLeft + Q.comp crossingRight - P.comp crossingAxis + +lemma crossingTargetLinear_apply (P Q : Base →L[ℝ] ProjectionTarget 3) (z : Base × ℝ) : + crossingTargetLinear P Q z = P ![z.1 0,z.2]+Q ![z.1 1,z.2]-P ![0,z.2] := by + change P (crossingLeft z)+Q (crossingRight z)-P (crossingAxis z) = _ + rw [crossingLeft_apply,crossingRight_apply,crossingAxis_apply] + +theorem crossingTargetLinear_bijective (P Q : Base →L[ℝ] ProjectionTarget 3) + (hcommon : P ![0,1] = Q ![0,1]) + (hsurj : Function.Surjective (fun z : Base × Base => P z.1-Q z.2)) : + Function.Bijective (crossingTargetLinear P Q) := by + have hs : Function.Surjective (crossingTargetLinear P Q) := by + intro w + obtain ⟨⟨x,y⟩,hxy⟩ := hsurj w + refine ⟨(![x 0,-y 0],x 1-y 1),?_⟩ + rw [crossingTargetLinear_apply] + simp only [Matrix.cons_val_zero,Matrix.cons_val_one] + have hx : P x = x 0 • P ![1,0]+x 1 • P ![0,1] := by + convert baseLinear_pair P (x 0) (x 1) using 1 + congr 1 + ext i + fin_cases i <;> rfl + have hy : Q y = y 0 • Q ![1,0]+y 1 • Q ![0,1] := by + convert baseLinear_pair Q (y 0) (y 1) using 1 + congr 1 + ext i + fin_cases i <;> rfl + change P x-Q y = w at hxy + rw [baseLinear_pair P (x 0) (x 1-y 1), + baseLinear_pair Q (-y 0) (x 1-y 1),baseLinear_pair P 0 (x 1-y 1),hcommon] + rw [hx,hy,hcommon] at hxy + convert hxy using 1 + module + refine ⟨?_,hs⟩ + exact (LinearMap.injective_iff_surjective_of_finrank_eq_finrank + (f := (crossingTargetLinear P Q).toLinearMap) (by simp [Base])).mpr hs + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..d797af94c4ffefb5809f2089a86fbb643419da38 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CrossingThreshold.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformCrossingBounds + +namespace OAI + +/-! Choose the crossing threshold before the longitudinal curvature term. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation + +lemma quadratic_dominates_linear (A P Q R : ℝ) + (hA : 0 < A) (hQ : 0 ≤ Q) (hR : 0 ≤ R) : + ∃ H : ℝ, 0 < H ∧ ∀ N : ℝ, H < |N| → R < N^2/A-Q-P*|N| := by + let H := max 1 (A*(P+Q+R+1)) + refine ⟨H,zero_lt_one.trans_le (le_max_left _ _),?_⟩ + intro N hN + have hx1 : 1 < |N| := (le_max_left _ _).trans_lt hN + have hx : 0 < |N| := zero_lt_one.trans hx1 + have hlin : A*(P+Q+R+1) < |N| := (le_max_right _ _).trans_lt hN + have hdiv : P+Q+R+1 < |N|/A := (lt_div_iff₀ hA).mpr (by simpa only [mul_comm] using hlin) + have hmul := mul_lt_mul_of_pos_right hdiv hx + have hsq : |N|/A*|N| = N^2/A := by rw [div_mul_eq_mul_div,← sq, sq_abs] + rw [hsq] at hmul + have hsmall : P*|N|+Q+R < (P+Q+R+1)*|N| := by + nlinarith [mul_nonneg (add_nonneg hQ hR) (sub_nonneg.mpr hx1.le)] + linarith + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem uniform_crossing_threshold (sLo sHi K d T R : ℝ) + (hmin : 0 < sLo) (hmax : 0 < sHi) (hK : 0 ≤ K) + (hd : 0 ≤ d) (hT : 0 ≤ T) (hR : 0 ≤ R) : + ∃ H : ℝ, 0 < H ∧ ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, sLo ≤ S → S ≤ sHi → -K ≤ k → |D| ≤ d → + |t| ≤ T → |u| ≤ T → H < |N| → + 0 < (slopePure S D N L k t).1 ∧ + R < inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)) := by + let Q := K/sLo+2*T*(d+sHi*T) + have hQ : 0 ≤ Q := by dsimp [Q]; positivity + obtain ⟨H,hH,hh⟩ := quadratic_dominates_linear sHi (2*T) Q R hmax hQ hR + refine ⟨H,hH,?_⟩ + intro n m hn hm hmn S D N L k t u hSmin hSmax hk hDb htb hub hN + have hlarge := hh N hN + have he : N^2/sHi-Q-(2*T)*|N| = N^2/sHi-K/sLo-2*T*(d+sHi*T+|N|) := by + dsimp [Q]; ring + rw [he] at hlarge + have htail : 0 ≤ 2*T*(d+sHi*T+|N|) := by positivity + have hfirst : K/sLo < N^2/sHi := by linarith + obtain ⟨hp,hbound⟩ := uniform_crossing_projection_lower hn hm hmn + hmin hSmin hSmax hK hk hDb htb hub hfirst + exact ⟨hp,hlarge.trans_le hbound⟩ + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/CurvedAtlasPrimitives.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CurvedAtlasPrimitives.lean new file mode 100644 index 0000000000000000000000000000000000000000..8285b49279db357d837d07eb94861f3a9b4d3f26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/CurvedAtlasPrimitives.lean @@ -0,0 +1,232 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SpatialPhaseBasis +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedCoordinateChange +import OAI.Geometry.SurfaceImmersion.Primitive.PositiveAtlasPrimitives + +namespace OAI + +/-! Positive primitive amplitudes for point-dependent phase bases. +The basis can be the actual nonlinear gradient basis constructed in +`SpatialPhaseBasis`; no constant-phase restriction enters the algebra. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance curvedPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance curvedPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance curvedPrimitiveDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance curvedPrimitiveDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance curvedPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance curvedPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) (P : A.centers → JetPolynomial.Base → PhaseBasis) + (u : ∀ p : M, CovariantTwoTensor p) + +def curvedPhaseCoefficient (i : A.centers) (j : Fin 3) (y : JetPolynomial.Base) : ℝ := + (P i y).Q j (fiberToThree (A.tensorEncode u y i)) + +def curvedPhaseTensor (i : A.centers) (j : Fin 3) : JetPolynomial.Base → TensorFiber := + fun y => A.curvedPhaseCoefficient P u i j y • fiberFromThree (covectorSquare ((P i y).ξ j)) + +def curvedPrimitiveAmplitude (a : A.centers × Fin 3) (p : M) : ℝ := + A.weight a.1 p * Real.sqrt + ((P a.1 (chart (a.1 : M) p)).Q a.2 (A.tensorChartRead a.1 u (chart (a.1 : M) p))) + +def curvedPrimitiveTensor (a : A.centers × Fin 3) (p : M) : CovariantTwoTensor p := + (A.curvedPrimitiveAmplitude P u a p)^2 • + A.bundleRestore A.tensorTriv a.1 + (fun y => fiberFromThree (covectorSquare ((P a.1 y).ξ a.2))) p + +lemma curvedPrimitiveAmplitude_support (a : A.centers × Fin 3) : + tsupport (A.curvedPrimitiveAmplitude P u a) ⊆ tsupport (A.weight a.1) := + tsupport_mul_subset_left + +lemma curvedPrimitiveAmplitude_nonneg + (hw : ∀ i p, 0 ≤ A.weight i p) (a : A.centers × Fin 3) (p : M) : + 0 ≤ A.curvedPrimitiveAmplitude P u a p := + mul_nonneg (hw a.1 p) (Real.sqrt_nonneg _) + +lemma curvedPrimitiveAmplitude_pos_iff + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i (chart (i : M) p)).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) (p : M) : + 0 < A.curvedPrimitiveAmplitude P u a p ↔ 0 < A.weight a.1 p := by + constructor + · intro h + exact (mul_pos_iff.mp h).resolve_right (fun hh => (Real.sqrt_nonneg _).not_gt hh.2) |>.1 + · intro h + exact mul_pos h (Real.sqrt_pos.mpr (hpos a.1 a.2 p (subset_tsupport _ h.ne'))) + +lemma curvedPrimitiveAmplitude_square (i : A.centers) (j : Fin 3) + (hpos : ∀ p ∈ tsupport (A.weight i), + 0 ≤ (P i (chart (i : M) p)).Q j (A.tensorChartRead i u (chart (i : M) p))) + {p : M} (hp : p ∈ (chart (i : M)).source) : + (A.curvedPrimitiveAmplitude P u (i,j) p)^2 = + A.curvedPhaseCoefficient P u i j (chart (i : M) p) := by + unfold curvedPhaseCoefficient + rw [A.tensorEncode_read i u hp,map_smul] + by_cases hz : A.weight i p = 0 + · simp only [curvedPrimitiveAmplitude,hz,zero_mul,zero_pow (by decide : 2 ≠ 0),zero_smul] + · dsimp only [curvedPrimitiveAmplitude] + rw [mul_pow,Real.sq_sqrt (hpos p (subset_tsupport _ hz))] + rfl + +lemma sum_curvedPhaseTensor (hu : ∀ p v w, u p v w = u p w v) + (y : JetPolynomial.Base) (i : A.centers) : + ∑ j : Fin 3, A.curvedPhaseTensor P u i j y = A.tensorEncode u y i := by + change (∑ j : Fin 3, (P i y).Q j (fiberToThree (A.tensorEncode u y i)) • + fiberFromThree (covectorSquare ((P i y).ξ j))) = _ + calc + _ = fiberFromThree (∑ j : Fin 3, + (P i y).Q j (fiberToThree (A.tensorEncode u y i)) • covectorSquare ((P i y).ξ j)) := by + simp only [map_sum,map_smul] + _ = _ := by + rw [(P i y).decomposition,fiberFromThree_toThree _ (A.tensorEncode_symmetric hu y i)] + +lemma restored_curvedPrimitiveTensor (i : A.centers) (j : Fin 3) + (hpos : ∀ p ∈ tsupport (A.weight i), + 0 ≤ (P i (chart (i : M) p)).Q j (A.tensorChartRead i u (chart (i : M) p))) (p : M) : + A.curvedPrimitiveTensor P u (i,j) p = + A.bundleRestore A.tensorTriv i (A.curvedPhaseTensor P u i j) p := by + by_cases hp : p ∈ (chart (i : M)).source + · unfold curvedPrimitiveTensor + rw [A.curvedPrimitiveAmplitude_square P u i j hpos hp] + simp only [bundleRestore,curvedPhaseTensor,map_smul,smul_smul] + rw [mul_comm] + · have ho : A.outer i p = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hp (A.outer_support i h)) + simp only [curvedPrimitiveTensor,bundleRestore,ho,zero_smul,smul_zero] + +/-- The actual curved-basis amplitudes give an exact finite decomposition. -/ +theorem sum_curvedPrimitiveTensor (hu : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i (chart (i : M) p)).Q j (A.tensorChartRead i u (chart (i : M) p))) (p : M) : + ∑ a : A.centers × Fin 3, A.curvedPrimitiveTensor P u a p = u p := by + rw [← Finset.univ_product_univ,Finset.sum_product] + simp_rw [A.restored_curvedPrimitiveTensor P u _ _ (hpos _ _) p] + have hi (i : A.centers) : + (∑ j : Fin 3, A.bundleRestore A.tensorTriv i (A.curvedPhaseTensor P u i j) p) = + A.bundleRestore A.tensorTriv i (fun y => A.tensorEncode u y i) p := by + simp only [bundleRestore,← Finset.smul_sum,← map_sum] + rw [A.sum_curvedPhaseTensor P u hu] + simp_rw [hi] + exact congrFun (A.tensorDecode_encode u) p + +def curvedAtlasPhase (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (a : A.centers × Fin 3) : M → ℝ := + restore (a.1 : M) (A.outer a.1) (phi a.1 a.2 ∘ JetPolynomial.planeCoordinateIsometry) + +lemma curvedAtlasPhase_smooth (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (hphi : ∀ i j, ContDiff ℝ ∞ (phi i j)) (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.curvedAtlasPhase phi a) := + restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) + ((hphi a.1 a.2).comp JetPolynomial.planeCoordinateIsometry.contDiff) + +lemma curvedAtlasPhase_eventually (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (a : A.centers × Fin 3) + (houter : ∀ p ∈ tsupport (A.weight a.1), A.outer a.1 =ᶠ[𝓝 p] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight a.1)) : + A.curvedAtlasPhase phi a =ᶠ[𝓝 p] (phi a.1 a.2 ∘ coordinateChart (a.1 : M)) := by + filter_upwards [houter p hp, + (chart (a.1 : M)).open_source.mem_nhds (A.weight_support a.1 hp)] with x hx hxs + rw [curvedAtlasPhase,restore,indicator_of_mem hxs,hx,one_smul] + rfl + +lemma curvedAtlasPhase_mfderiv (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (hphi : ∀ i j, ContDiff ℝ ∞ (phi i j)) (a : A.centers × Fin 3) + (houter : ∀ p ∈ tsupport (A.weight a.1), A.outer a.1 =ᶠ[𝓝 p] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight a.1)) : + mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p = + (fderiv ℝ (phi a.1 a.2) (coordinateChart (a.1 : M) p)).comp + (mfderiv planeModel 𝓘(ℝ,SmallModes.Base) (coordinateChart (a.1 : M)) p) := by + have he := A.curvedAtlasPhase_eventually phi a houter hp + have hd := he.mfderiv_eq (I := planeModel) (I' := 𝓘(ℝ)) + have hpS : p ∈ (coordinateChart (a.1 : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support a.1 hp + have hc := ((coordinateChart_smoothOn (a.1 : M)) p hpS).contMDiffAt + ((coordinateChart (a.1 : M)).open_source.mem_nhds hpS) + rw [mfderiv_comp p + ((hphi a.1 a.2).contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv] at hd + change (mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p : Plane →L[ℝ] ℝ) = + (ContinuousLinearMap.id ℝ ℝ).comp + ((fderiv ℝ (phi a.1 a.2) (coordinateChart (a.1 : M) p)).comp + (mfderiv planeModel 𝓘(ℝ,SmallModes.Base) (coordinateChart (a.1 : M)) p)) at hd + simpa only [ContinuousLinearMap.id_comp] using hd + +/-- Every restored tensor is the actual square of its global phase +covector wherever its amplitude is supported. -/ +lemma curvedPrimitiveTensor_apply + (phi : A.centers → Fin 3 → SmallModes.Base → ℝ) + (hphi : ∀ i j, ContDiff ℝ ∞ (phi i j)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hfit : ∀ i j p, p ∈ tsupport (A.weight i) → + (P i (chart (i : M) p)).ξ j = phaseDerivative (phi i j) (coordinateChart (i : M) p)) + (a : A.centers × Fin 3) (p : M) (v w : TangentSpace planeModel p) : + A.curvedPrimitiveTensor P u a p v w = + (A.curvedPrimitiveAmplitude P u a p)^2 * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p w) := by + by_cases ha : A.curvedPrimitiveAmplitude P u a p = 0 + · simp only [curvedPrimitiveTensor,ha,zero_pow (by decide : 2 ≠ 0),zero_smul,zero_apply] + let dv : ℝ := mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p v + let dw : ℝ := mfderiv planeModel 𝓘(ℝ) (A.curvedAtlasPhase phi a) p w + change (0 : ℝ) = (0 : ℝ) * dv * dw + exact ((congrArg (fun x : ℝ => x * dw) (zero_mul dv)).trans (zero_mul dw)).symm + · have hp := A.curvedPrimitiveAmplitude_support P u a (subset_tsupport _ ha) + have hpS := A.weight_support a.1 hp + change (A.curvedPrimitiveAmplitude P u a p)^2 * + A.bundleRestore A.tensorTriv a.1 + (fun y => fiberFromThree (covectorSquare ((P a.1 y).ξ a.2))) p v w = _ + rw [A.tensorRestore_apply a.1 _ hpS, A.outer_one a.1 p hp,one_mul, + fiberFromThree_apply,covectorSquare_evaluate,hfit a.1 a.2 p hp, + phaseLinear_phaseDerivative, + A.curvedAtlasPhase_mfderiv phi hphi a (houter a.1) hp, + A.coordinateChart_tangentCoordinates a.1 hpS] + let dv : ℝ := (fderiv ℝ (phi a.1 a.2) (coordinateChart (a.1 : M) p)) + (planeCoordinates ((trivializationAt Plane (TangentSpace planeModel) (a.1 : M)).continuousLinearMapAt ℝ p v)) + let dw : ℝ := (fderiv ℝ (phi a.1 a.2) (coordinateChart (a.1 : M) p)) + (planeCoordinates ((trivializationAt Plane (TangentSpace planeModel) (a.1 : M)).continuousLinearMapAt ℝ p w)) + change (A.curvedPrimitiveAmplitude P u a p)^2 * (dv * dw) = + (A.curvedPrimitiveAmplitude P u a p)^2 * dv * dw + ring + +variable [CompactSpace M] + +lemma curvedPrimitiveAmplitude_smooth + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hQ : ∀ i j p, p ∈ tsupport (A.weight i) → + ContDiffAt ℝ ∞ (fun y => (P i y).Q j) (chart (i : M) p)) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i (chart (i : M) p)).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.curvedPrimitiveAmplitude P u a) := by + apply contMDiff_of_tsupport + intro p hp + have hpw := A.curvedPrimitiveAmplitude_support P u a hp + have hc := ((chart_smooth (a.1 : M)) p (A.weight_support a.1 hpw)).contMDiffAt + ((chart (a.1 : M)).open_source.mem_nhds (A.weight_support a.1 hpw)) + have hr := (A.tensorChartRead_smooth a.1 hu).contMDiff.contMDiffAt.comp p hc + have hq := (hQ a.1 a.2 p hpw).contMDiffAt.comp p hc + have he := hq.clm_apply hr + have hroot := (Real.contDiffAt_sqrt (hpos a.1 a.2 p hpw).ne').contMDiffAt.comp p he + exact (A.weight_smooth a.1 p).mul hroot + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularBoundary.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularBoundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..50ff7a909e82df66c15b97108e7a8bf2f2cd1eb4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularBoundary.lean @@ -0,0 +1,199 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLeadingRegularity +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance exactCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + {ι : Type*} {Curves : ι → Set SmallModes.Base} {b c k : ι → SmallModes.Base → ℝ} + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x) + (η : ℝ) (hη : 0 < η) + (havoid : ∀ z : ℝ, 0 < z → z < η → ∀ j x, x ∈ Curves j → + ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (data.A.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → + k j x ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) + {E : Set SmallModes.Base} + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hactiveE : ∀ x ∈ E, data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hdetE : ∀ x ∈ E, data.A.phaseMetricRead i e.symm h x 0 * data.A.phaseMetricRead i e.symm h x 2 - + (data.A.phaseMetricRead i e.symm h x 1)^2 ≠ 0) + (B slopeBound : ℝ) + (hcurvE : ∀ x ∈ E, -B ≤ RealModes.coordinateGauss + (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x) + (hcross : ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ E, ∀ t ∈ Icc (0 : ℝ) 1, + ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (data.A.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → ∀ κ : ℝ, + RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p = + κ*NormalFrame.gramDet (SmallModes.coordDeriv SmallModes.dx G p) (SmallModes.coordDeriv SmallModes.dy G p) → + -B ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + 0 < orderedCrossing G (1,r) (1,s) p κ ∧ 0 < orderedCrossing G (1,s) (1,r) p κ ∧ + ((0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p) ∧ + 0 < RealModes.realSecondForm G (1,s) (1,s) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p)) ∨ + (0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ RealModes.realSecondForm G (1,s) (1,s) p ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile G z p) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm G (1,s) (1,s) p ⬝ᵥ w))) + (hregular : ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, + surfaceCircularProfile (data.A.phaseRealChartMap i e.symm F) a e₁ e₂ α (baseEquiv p,t) ∈ + regularBoundaryProfiles) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := data.A.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + let hGO : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S O := fun _ hp => hQO (hFQ hp) + have hreg : ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, + boundaryProfileMap (l.geometricLeadingProfile (data.A.jetChartMap i F ∘ e.symm) + ((data.A.jetChartMap_smooth i hF).comp hi) hGO p (t : Period)) ∈ regularBoundaryProfiles := by + intro p hp t ht + rw [data.A.phase_circular_geometric_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel hGO (hCS hp).1 t] + exact hregular p hp t ht + obtain ⟨δreg,hδreg,hnearreg⟩ := l.compact_leading_regularity + ((data.A.jetChartMap_smooth i hF).comp hi) hGO hC (fun p hp => (hCS hp).1) hreg + let δ := min ε (min η δreg) + have hδ : 0 < δ := lt_min hε (lt_min hη hδreg) + have hδη : δ ≤ η := (min_le_right _ _).trans (min_le_left _ _) + have hδr : δ ≤ δreg := (min_le_right _ _).trans (min_le_right _ _) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.exact_circular_primitive_profiles hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα hvel S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS δ hδ (min ζ η) (lt_min hζ hη) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hgeometry,?_,?_,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro p hp + obtain ⟨t,ht,herror⟩ := hprofiles p hp + have heq := data.A.phase_circular_geometric_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel hGO (hCS hp).1 t + rw [← heq] at herror + exact hnearreg p hp t ht _ (herror.trans_le hδr) + · intro j x hx + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hCurveC j x hx) + rw [baseEquiv.apply_symm_apply] at herror + apply havoid z hz (hzζ.trans_le (min_le_right _ _)) j x hx t ht + (data.A.phaseRealChartMap i e.symm W) (data.A.phaseRealChartMap_smooth i hi hW.1) x + (herror.trans_le hδη) + rw [data.A.phaseGauss_isometry i hi hW (hactive j x hx)] + exact hcurv j x hx + · intro x hx r s hr hs + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hEC x hx) + rw [baseEquiv.apply_symm_apply] at herror + let H := data.A.phaseRealChartMap i e.symm W + have hDH : NormalFrame.gramDet (SmallModes.coordDeriv SmallModes.dx H x) + (SmallModes.coordDeriv SmallModes.dy H x) ≠ 0 := by + rw [data.A.phaseMetricRead_isometry_det i hi hW (hactiveE x hx)] + exact hdetE x hx + apply hcross z hz (hzζ.trans_le (min_le_right _ _)) x hx t ht H + (data.A.phaseRealChartMap_smooth i hi hW.1) x (herror.trans_le hδη) + _ (RealModes.coordinateGauss_eq_curvature_mul H x hDH) _ r s hr hs + rw [data.A.phaseGauss_isometry i hi hW (hactiveE x hx)] + exact hcurvE x hx + · exact fun j => (hslow j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularCurves.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularCurves.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ad780292cd637d84e204daced71eff36a18c93a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularCurves.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance exactCircularCurvesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactCircularCurvesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactCircularCurvesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactCircularCurvesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactCircularCurvesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactCircularCurvesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_circular_primitive_curves [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + {ι : Type*} {Curves : ι → Set SmallModes.Base} {b c k : ι → SmallModes.Base → ℝ} + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x) + (η : ℝ) (hη : 0 < η) + (havoid : ∀ z : ℝ, 0 < z → z < η → ∀ j x, x ∈ Curves j → + ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (data.A.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → + k j x ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + let δ := min ε η + have hδ : 0 < δ := lt_min hε hη + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.exact_circular_primitive_profiles hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα hvel S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS δ hδ (min ζ η) (lt_min hζ hη) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro j x hx + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hCurveC j x hx) + rw [baseEquiv.apply_symm_apply] at herror + apply havoid z hz (hzζ.trans_le (min_le_right _ _)) j x hx t ht + (data.A.phaseRealChartMap i e.symm W) (data.A.phaseRealChartMap_smooth i hi hW.1) x + (herror.trans_le (min_le_right _ _)) + rw [data.A.phaseGauss_isometry i hi hW (hactive j x hx)] + exact hcurv j x hx + · exact fun j => (hslow j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9ee6afa5e648d0646089065be83a534cabd443e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactCircularPrimitive.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseBoundaryProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance exactCircularPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactCircularPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactCircularPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactCircularPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactCircularPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactCircularPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_circular_primitive_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, ∃ t : ℝ, t ∈ Icc (0 : ℝ) 1 ∧ + ‖realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p)- + surfaceCircularProfile (data.A.phaseRealChartMap i e.symm F) a e₁ e₂ α (baseEquiv p,t)‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.exact_phase_primitive_boundary_profiles hF hmetric i e he hi hχ hχc hχs hcover + l (ha.comp baseEquiv.contDiff) hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS ε hε ζ hζ + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,hslow,V,hV,hcorrection,hext⟩ + intro p hp + obtain ⟨t,ht,heq⟩ := data.A.phase_circular_period_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel + (fun _ hp => hQO (hFQ hp)) (hCS hp).1 ((ℓ p/z : ℝ) : Period) + refine ⟨t,ht,?_⟩ + rw [← heq] + exact hprofiles p hp + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactOriginalProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactOriginalProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..49a290fa1341acd4faf96214f51db1469eb85dc6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactOriginalProfiles.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPrimitiveProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance exactOriginalProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactOriginalProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactOriginalProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactOriginalProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactOriginalProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactOriginalProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_primitive_original_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + {C : Set JetPolynomial.Base} (hC : IsCompact C) (hCS : C ⊆ S) + : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W) z p- + l.geometricLeadingProfile (data.A.jetChartMap i F) (data.A.jetChartMap_smooth i hF) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + obtain ⟨h,hh,hall⟩ := data.exact_primitive_five_profiles hF hmetric i l ha hamp S T hST houter + hQ hQO hFQ K hK hKS hKA hv ℓ hℓx hℓy + refine ⟨h,hh,?_⟩ + intro ε hε ζ hζ + obtain ⟨ρ,hρ,hstable⟩ := data.A.geometricLeadingProfile_stability i hF l + (fun _ hp => hQO (hFQ hp)) hC hCS (ε/2) (half_pos hε) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,hslow,hprofile,V,hV,hcorrection,hexterior⟩ := + hall (min (ε/2) ρ) (lt_min (half_pos hε) hρ) ζ hζ + have hslowρ : data.A.WeightedBound 1 3 ρ (G-F) := + fun j => (hslow j).mono_const (min_le_right _ _) + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hexterior⟩ + · intro p hp + have hfirst : + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W) z p- + l.geometricLeadingProfile (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) + hGO p ((ℓ p/z : ℝ) : Period)‖ ≤ ε/2 := + (hprofile p (hCS hp)).trans (min_le_left _ _) + have hsecond := hstable G hG hGO hslowρ p hp ((ℓ p/z : ℝ) : Period) + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W) z p) + (l.geometricLeadingProfile (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) + hGO p ((ℓ p/z : ℝ) : Period)) + (l.geometricLeadingProfile (data.A.jetChartMap i F) (data.A.jetChartMap_smooth i hF) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)) + simp only [dist_eq_norm] at htriangle + linarith + · exact fun j => (hslow j).mono_const ((min_le_left _ _).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseBoundaryProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseBoundaryProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dcb27ce4ca1a33994beeb4ce33546a170426947 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseBoundaryProfiles.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance exactPhaseBoundaryProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactPhaseBoundaryProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactPhaseBoundaryProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactPhaseBoundaryProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactPhaseBoundaryProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactPhaseBoundaryProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_phase_primitive_boundary_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, + ‖realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (SurfaceJetCoordinates.baseEquiv p)- + boundaryProfileMap (l.geometricLeadingProfile (data.A.jetChartMap i F ∘ e.symm) + ((data.A.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period))‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.exact_phase_primitive_original_profiles hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget hC hCS + intro ε hε ζ hζ + let δ := ε/(‖boundaryProfileMap‖+1) + have hδ : 0 < δ := div_pos hε (by positivity) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + hall δ hδ ζ hζ + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro p hp + exact data.A.phaseRealChartMap_profile_error i hi hW.1 z p _ hε (hprofiles p hp) + · exact fun j => (hslow j).mono_const (div_le_self hε.le (by linarith [norm_nonneg boundaryProfileMap])) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseOriginalProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseOriginalProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e68da13585799f3e9da10caec3da39374403e8d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhaseOriginalProfiles.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhasePrimitiveProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance exactPhaseOriginalProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactPhaseOriginalProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactPhaseOriginalProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactPhaseOriginalProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactPhaseOriginalProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactPhaseOriginalProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_phase_primitive_original_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W ∘ e.symm) z p- + l.geometricLeadingProfile (data.A.jetChartMap i F ∘ e.symm) ((data.A.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.exact_phase_primitive_five_profiles hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + intro ε hε ζ hζ + obtain ⟨ρ,hρ,hstable⟩ := data.A.phase_geometricLeadingProfile_stability i hF hi l hSc + (fun _ hp => hQO (hFQ hp)) hC (fun _ hp => (hCS hp).1) (ε/2) (half_pos hε) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,hslow,hprofile,V,hV,hcorrection,hexterior⟩ := + hall (min (ε/2) ρ) (lt_min (half_pos hε) hρ) ζ hζ + have hslowρ : data.A.WeightedBound 1 3 ρ (G-F) := + fun j => (hslow j).mono_const (min_le_right _ _) + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hexterior⟩ + · intro p hp + have hfirst : + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W ∘ e.symm) z p- + l.geometricLeadingProfile (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) + hGO p ((ℓ p/z : ℝ) : Period)‖ ≤ ε/2 := + (hprofile p (hCS hp)).trans (min_le_left _ _) + have hsecond := hstable G hG hGO hslowρ p hp ((ℓ p/z : ℝ) : Period) + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W ∘ e.symm) z p) + (l.geometricLeadingProfile (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) + hGO p ((ℓ p/z : ℝ) : Period)) + (l.geometricLeadingProfile (data.A.jetChartMap i F ∘ e.symm) ((data.A.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)) + simp only [dist_eq_norm] at htriangle + linarith + · exact fun j => (hslow j).mono_const ((min_le_left _ _).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..33f2b0f93cc5585585c2fdc9fd42c6490902c7b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitive.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins +import OAI.Geometry.SurfaceImmersion.Correction.UniformPrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedPatchGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseNormalMargin +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.NonlinearLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveShiftedPowers +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveWeightedBudget +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAtlasNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance exactPhasePrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactPhasePrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactPhasePrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactPhasePrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactPhasePrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactPhasePrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_phase_primitive_metric [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∃ G : M → Space, IsSmoothIsometricImmersion M h G ∧ Nonempty (MetricGoodPhaseData h G) := by + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨c,c₂,V₀,hc,hc₂,hV₀,hfamilies⟩ := data.uniform_phase_primitive_realization + hF hmetric i e he hi hχ hχc hχs hcover l ha hamp S hSc hTS + hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + apply data.A.exact_geometric_metric_from_fast_family h data.outer_locally_one R₁ c₁ c₂ V₀ hc₁ hc₂ hV₀ + intro N + obtain ⟨b,u,η,L,C,Cv,P,hb,hb16,hu,hη,hη1,hL,hC,hCv,hP,hfamily⟩ := hfamilies 442 (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold C (N+1) ρ + (by positivity) hρ + refine ⟨min η η₀,C,Cv,lt_min hη hη₀,hC,hCv,?_⟩ + intro z hz hzη + obtain ⟨G,V,hG,hV,hclose,hslow,hweighted,hzero,hshift,herror,hI,hB,hBmargin,hN,hext⟩ := + hfamily z hz (hzη.trans_le (min_le_left _ _)) + have herr : data.A.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor V-h.inner) := by + rw [htarget] + exact fun j => (herror j).mono_order (by omega) + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV (C*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using hsmall z hz (hzη.trans_le (min_le_right _ _))) + (fun j => (herr j).mono_order (Nat.zero_le 440)) + refine ⟨V,hV,hzero,hweighted,(fun j k hk x => hshift j k (by omega) x),herr,?_⟩ + intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,(hBmargin j x hx).le⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitiveProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitiveProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..63c28cf221f204e00f83121bcbba46e654ff7fad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPhasePrimitiveProfiles.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactProfiledPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance actualPhasePrimitiveProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualPhasePrimitiveProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance actualPhasePrimitiveProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance actualPhasePrimitiveProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance actualPhasePrimitiveProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualPhasePrimitiveProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_phase_primitive_five_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ G : M → Space, ∃ hG : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (data.A.jetChartMap i G ∘ e.symm)) S O, + data.A.WeightedBound 1 3 ε (G-F) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let geom := l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W ∘ e.symm) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ ε) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.exact_profiled_phase_primitive_metric hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + obtain ⟨D,hD,hprofile⟩ := data.A.phase_profile_correction_bound i hi S.isOpen hSc + intro ε hε ζ hζ + obtain ⟨η,hη,_,hsmall⟩ := ExactCorrection.positive_power_threshold D 8 (ε/2) + (by norm_num) (half_pos hε) + obtain ⟨z,hz,hzcap,hz1,V,W,hV,hnear,hW,hgeometry,hclose⟩ := + hall (ε/2) (half_pos hε) (min η ζ) (lt_min hη hζ) + obtain ⟨G,hG,hGO,hslow,hprof,hext,hextK⟩ := hnear + have hzη := hzcap.trans_le (min_le_left _ _) + have hzζ := hzcap.trans_le (min_le_right _ _) + have herror : D*z^8 < ε/2 := by + simpa only [Real.rpow_ofNat] using hsmall z hz hzη + have hcorrection := hprofile V W hV hW.1 (z^8) z (pow_nonneg hz.le _) hz.le hz1 hclose + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,?_,?_,V,hV,hclose,hext,hextK⟩ + · exact fun j => (hslow j).mono_const (by linarith) + · intro p hp + dsimp only + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W ∘ e.symm) z p) + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i V ∘ e.symm) z p) + (![((l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO).longitudinal.val p + ((ℓ p/z : ℝ) : Period)), + (l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO).Y p, + (l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO).C p, + ((l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO).longitudinal.slow + (coordinateVector 1)).val p ((ℓ p/z : ℝ) : Period), + (l.geometry (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) hGO).V.angle.val p + ((ℓ p/z : ℝ) : Period)]) + simp only [dist_eq_norm] at htriangle + exact htriangle.trans ((add_le_add (hcorrection p hp.1) (hprof p hp)).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..b17a7c73842380bae9092695973b92e03d36d9d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveMetric.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveGeometricApproximation +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance exactPrimitiveGeometryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactPrimitiveGeometryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactPrimitiveGeometryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactPrimitiveGeometryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactPrimitiveGeometrySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactPrimitiveGeometrySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_primitive_metric [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∃ G : M → Space, IsSmoothIsometricImmersion M h G ∧ Nonempty (MetricGoodPhaseData h G) := by + obtain ⟨h,hh,V₀,R,c,b,hV₀,hR,hc,hb,hall⟩ := + data.uniform_primitive_geometric_approximation hF hmetric i l ha hamp S T hST houter + hQ hQO hFQ K hK hKS hKA hv ℓ hℓx hℓy + refine ⟨h,hh,?_⟩ + apply data.A.exact_geometric_metric_from_fast_family h data.outer_locally_one R c b V₀ hc hb hV₀ + intro N + obtain ⟨η,C,Cv,hη,_,hC,hCv,hfamily⟩ := hall 440 N + refine ⟨η,C,Cv,hη,hC,hCv,?_⟩ + intro z hz hzη + obtain ⟨V,hV,hvb,hv0,hvs,herr,_,_,hgeom⟩ := hfamily z hz hzη + refine ⟨V,hV,hv0,hvb,hvs,herr,?_⟩ + intro j x hx + exact ⟨(hgeom j x hx).1,(hgeom j x hx).2.1,(hgeom j x hx).2.2.le⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cfc8aaf98c3c1b19f586f912a40fa06a48c065b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactPrimitiveProfiles.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExactProfiledPrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance actualPrimitiveProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualPrimitiveProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance actualPrimitiveProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance actualPrimitiveProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance actualPrimitiveProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualPrimitiveProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_primitive_five_profiles [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ G : M → Space, ∃ hG : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (data.A.jetChartMap i G)) S O, + data.A.WeightedBound 1 3 ε (G-F) ∧ + (∀ p ∈ S, + let geom := l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ ε) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + obtain ⟨h,hh,hall⟩ := data.exact_profiled_primitive_metric hF hmetric i l ha hamp S T hST houter + hQ hQO hFQ K hK hKS hKA hv ℓ hℓx hℓy + obtain ⟨D,hD,hprofile⟩ := data.A.primitive_profile_correction_bound i + refine ⟨h,hh,?_⟩ + intro ε hε ζ hζ + obtain ⟨η,hη,_,hsmall⟩ := ExactCorrection.positive_power_threshold D 8 (ε/2) + (by norm_num) (half_pos hε) + obtain ⟨z,hz,hzcap,hz1,V,W,hV,hnear,hW,hgeometry,hclose⟩ := + hall (ε/2) (half_pos hε) (min η ζ) (lt_min hη hζ) + obtain ⟨G,hG,hGO,hslow,hprof,hext⟩ := hnear + have hzη := hzcap.trans_le (min_le_left _ _) + have hzζ := hzcap.trans_le (min_le_right _ _) + have herror : D*z^8 < ε/2 := by + simpa only [Real.rpow_ofNat] using hsmall z hz hzη + have hcorrection := hprofile V W hV hW.1 (z^8) z (pow_nonneg hz.le _) hz.le hz1 hclose + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,?_,?_,V,hV,hclose,hext⟩ + · exact fun j => (hslow j).mono_const (by linarith) + · intro p hp + dsimp only + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i W) z p) + (SurfaceVelocityFamily.Loop.primitiveJetProfile (data.A.vectorChartRead i V) z p) + (![((l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO).longitudinal.val p + ((ℓ p/z : ℝ) : Period)), + (l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO).Y p, + (l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO).C p, + ((l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO).longitudinal.slow + (coordinateVector 1)).val p ((ℓ p/z : ℝ) : Period), + (l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGO).V.angle.val p + ((ℓ p/z : ℝ) : Period)]) + simp only [dist_eq_norm] at htriangle + exact htriangle.trans ((add_le_add (hcorrection p) (hprof p hp)).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPhasePrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPhasePrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..20adaa3eb872c51b5afe92fb41724ff79318fb36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPhasePrimitive.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPhaseFastFamily +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance exactProfiledPhasePrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactProfiledPhasePrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactProfiledPhasePrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactProfiledPhasePrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactProfiledPhasePrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactProfiledPhasePrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_profiled_phase_primitive_metric [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ V G : M → Space, + ContMDiff planeModel spaceModel ∞ V ∧ + data.A.PhasePrimitiveProfileNear F i e hi l S ℓ K ε z V ∧ + IsSmoothIsometricImmersion M h G ∧ Nonempty (MetricGoodPhaseData h G) ∧ + data.A.WeightedBound 1 2 (z^8) (G-V) := by + obtain ⟨V₀,R,c,b,hV₀,hR,hc,hb,hfamily⟩ := data.profiled_phase_primitive_fast_family + hF hmetric i e he hi hχ hχc hχs hcover l ha hamp S hSc hTS + hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + intro ε hε ζ hζ + exact data.A.exact_geometric_metric_with_property h data.outer_locally_one R c b V₀ hc hb hV₀ + (data.A.PhasePrimitiveProfileNear F i e hi l S ℓ K ε) (hfamily ε hε) ζ hζ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..77fe42ebf44bb0ee903fab1992bed122982748d0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExactProfiledPrimitive.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPrimitiveFastFamily +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance exactProfiledPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactProfiledPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactProfiledPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactProfiledPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactProfiledPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactProfiledPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem exact_profiled_primitive_metric [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ V G : M → Space, + ContMDiff planeModel spaceModel ∞ V ∧ + data.A.PrimitiveProfileNear F i l S ℓ ε z V ∧ + IsSmoothIsometricImmersion M h G ∧ Nonempty (MetricGoodPhaseData h G) ∧ + data.A.WeightedBound 1 2 (z^8) (G-V) := by + obtain ⟨h,hh,V₀,R,c,b,hV₀,hR,hc,hb,hfamily⟩ := data.profiled_primitive_fast_family + hF hmetric i l ha hamp S T hST houter hQ hQO hFQ K hK hKS hKA hv ℓ hℓx hℓy + refine ⟨h,hh,?_⟩ + intro ε hε ζ hζ + exact data.A.exact_geometric_metric_with_property h data.outer_locally_one R c b V₀ hc hb hV₀ + (data.A.PrimitiveProfileNear F i l S ℓ ε) (hfamily ε hε) ζ hζ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExplicitPeriodicFormula.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExplicitPeriodicFormula.lean new file mode 100644 index 0000000000000000000000000000000000000000..320942741b82262a8ce6f4b43380a1df358d1d33 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExplicitPeriodicFormula.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialEvaluation +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrectorFormula + +namespace OAI + +/-! The polynomial expression evaluates to the explicit vector-valued +periodic correction, including its covariance inverse and normalized integral. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open PeriodicCorrector CovarianceCorrector + +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma realCorrector_continuous (V : C(Period, E)) (q : ℝ) {f : ℝ → ℝ} + (hf : Continuous f) : Continuous (realCorrector V q f) := by + have hv : Continuous (fun t : ℝ => V (t : Period)) := + V.continuous.comp (AddCircle.continuous_mk' 1) + exact continuous_const.smul ((hf.add (((hv.sub continuous_const).inner continuous_const).div_const q)).smul hv + |>.sub continuous_const) + +variable [CompleteSpace E] + +lemma primitive_map (L : E →L[ℝ] ℝ) {f : ℝ → E} (hf : Continuous f) (t : ℝ) : + L (PeriodicPrimitive.primitive f t) = PeriodicPrimitive.primitive (fun s => L (f s)) t := by + have hr (s : ℝ) : L (PeriodicPrimitive.rawPrimitive f s) = + PeriodicPrimitive.rawPrimitive (fun u => L (f u)) s := + (L.intervalIntegral_comp_comm (hf.intervalIntegrable 0 s)).symm + simp only [PeriodicPrimitive.primitive, map_sub, hr] + rw [← L.intervalIntegral_comp_comm + ((PeriodicPrimitive.rawPrimitive_continuous hf).intervalIntegrable 0 1)] + simp only [hr] + +variable [FiniteDimensional ℝ E] + +namespace Expression + +/-- The symbolic construction is exactly the span-plus-integrated-covariance +formula, not just a formal expression with a similar order bound. -/ +theorem eval_angularCorrection {O : Set LowJet} (hO : IsOpen O) + {Y C X₀ : LowJet → E} {V : LowJet → C(Period, E)} {q : LowJet → ℝ} + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) (hX : ContDiffOn ℝ ∞ X₀ O) + (hV : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hd : ∀ Q ∈ O, gramDet (Y Q) (C Q) ≠ 0) + (hq : ContDiffOn ℝ ∞ q O) (hqp : ∀ Q ∈ O, 0 < q Q) + (hcircle : ∀ Q ∈ O, ∀ t, inner ℝ (V Q t) (V Q t) = q Q) + (L : E →L[ℝ] ℝ) {h K e : Expression} + (hh : h.SmoothCoeffs O) (hK : K.SmoothCoeffs O) (he : e.SmoothCoeffs O) + (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + (Expression.add (spanTerm Y C L h.primitive K) + ((angularSource Y C X₀ V h K e).covariance V q L).primitive).eval G (p, t) = + L (angularCorrectionFunction (Y (lowJet G p)) (C (lowJet G p)) (X₀ (lowJet G p)) + (V (lowJet G p)) (q (lowJet G p)) + (fun s => h.eval G (p, s)) (fun s => K.eval G (p, s)) (fun s => e.eval G (p, s)) t) := by + let r := angularSource Y C X₀ V h K e + have hr : r.SmoothCoeffs O := smoothCoeffs_angularSource hO hY hC hX hV hd hh hK he + have hw := smoothCoeffs_covariance hO hV hq hqp hcircle L hr + have hb (b : ℝ × ℝ) : ContDiffOn ℝ ∞ (metricCoefficient Y C X₀ V b) (O ×ˢ Set.univ) := + ((hX.comp contDiffOn_fst (fun _ hz => hz.1)).add hV).inner ℝ + ((contDiffOn_spanSolve hY hC contDiffOn_const hd).comp contDiffOn_fst (fun _ hz => hz.1)) + have hs (s : ℝ) : r.eval G (p, s) = + angularSourceFunction (Y (lowJet G p)) (C (lowJet G p)) (X₀ (lowJet G p)) + (V (lowJet G p)) (fun u => h.eval G (p, u)) (fun u => K.eval G (p, u)) + (fun u => e.eval G (p, u)) s := + eval_angularSource hO Y C X₀ V hh hK hb G hp s + have hf : Continuous (fun s => r.eval G (p, s)) := (eval_slice_smooth hO hr G hp).continuous + have hW := realCorrector_continuous (V (lowJet G p)) (q (lowJet G p)) hf + change (spanTerm Y C L h.primitive K).eval G (p, t) + + (r.covariance V q L).primitive.eval G (p, t) = _ + rw [eval_spanTerm, eval_primitive hO hh G hp, eval_primitive hO hw G hp] + simp only [angularCorrectionFunction, map_add] + have heq : (fun s => r.eval G (p, s)) = + angularSourceFunction (Y (lowJet G p)) (C (lowJet G p)) (X₀ (lowJet G p)) + (V (lowJet G p)) (fun u => h.eval G (p, u)) (fun u => K.eval G (p, u)) + (fun u => e.eval G (p, u)) := funext hs + rw [← heq, primitive_map L hW] + congr 1 + congr 1 + funext s + exact eval_covariance hO V q L hr G hp s + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorClosureProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorClosureProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..71bc3ceff169e7d160f4a3ad80fc213417282d71 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorClosureProfiles.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureBounds +import OAI.Geometry.SurfaceImmersion.Primitive.ExteriorProfileBounds + +namespace OAI + +/-! The unscaled profile bound includes the closure of the open exterior. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_profile_bound_closure (j : A.centers) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G V W : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ContMDiff planeModel spaceModel ∞ W → + ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ O : Set M, (∀ q ∈ O, V =ᶠ[𝓝 q] G) → + ∀ p ∈ closure O, p ∈ tsupport (A.weight j) → + ‖realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead j W) 1 + (planeCoordinateIsometry (chart (j : M) p))- + realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead j F) 1 + (planeCoordinateIsometry (chart (j : M) p))‖ ≤ D*(b+c) := by + obtain ⟨D,hD,hbound⟩ := A.exterior_read_C2_bound_closure j + refine ⟨D,hD,?_⟩ + intro F G V W hF hG hV hW b c hb hc hGF hWV O hext p hpO hp + have hF' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j hF) + have hW' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j hW) + rw [← realBoundaryProfile_sub hF' hW'] + have heq : (spaceCoordinates ∘ A.vectorPlaneRead j W)-(spaceCoordinates ∘ A.vectorPlaneRead j F) = + spaceCoordinates ∘ A.vectorPlaneRead j (W-F) := by + rw [A.vectorPlaneRead_sub] + funext y + exact (map_sub spaceCoordinates _ _).symm + rw [heq] + exact realBoundaryProfile_one_bound + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j (hW.sub hF))) _ + (mul_nonneg hD (add_nonneg hb hc)) (hbound F G V W hF hG hV hW b c hb hc hGF hWV O hext p hpO hp) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorProfileBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorProfileBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9656f40be3718eb4e1bf63e90541f0c652630cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ExteriorProfileBounds.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame + +namespace OAI + +/-! The exterior C2 estimate controls all five unscaled boundary profiles. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes + +lemma realBoundaryProfile_sub {F G : RField 4} (hF : ContDiff ℝ ∞ F) + (hG : ContDiff ℝ ∞ G) (z : ℝ) (p : Base) : + realBoundaryProfile (G-F) z p = realBoundaryProfile G z p-realBoundaryProfile F z p := by + have hd (v : Base) : coordDeriv v (G-F) = coordDeriv v G-coordDeriv v F := by + funext y + change (fderiv ℝ (G-F) y) v = _ + rw [fderiv_sub (hG.differentiable (by simp) y) (hF.differentiable (by simp) y)] + rfl + have hdd (v w : Base) : coordDeriv v (coordDeriv w (G-F)) = + coordDeriv v (coordDeriv w G)-coordDeriv v (coordDeriv w F) := by + rw [hd] + funext y + change (fderiv ℝ (coordDeriv w G-coordDeriv w F) y) v = _ + rw [fderiv_sub ((contDiff_real_coordDeriv hG w).differentiable (by simp) y) + ((contDiff_real_coordDeriv hF w).differentiable (by simp) y)] + rfl + funext i + fin_cases i + · exact congrFun (hd dx) p + · exact congrFun (hd dy) p + · exact congrFun (hdd dy dy) p + · exact congrFun (hdd dx dy) p + · change z • coordDeriv dx (coordDeriv dx (G-F)) p = + z • coordDeriv dx (coordDeriv dx G) p-z • coordDeriv dx (coordDeriv dx F) p + rw [congrFun (hdd dx dx) p,Pi.sub_apply,smul_sub] + +lemma realBoundaryProfile_one_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : Base) {C : ℝ} (hC : 0 ≤ C) + (hb : ∀ k ≤ 2, ‖iteratedFDeriv ℝ k F p‖ ≤ C) : + ‖realBoundaryProfile F 1 p‖ ≤ C := by + have h1 : ‖fderiv ℝ F p‖ ≤ C := by simpa only [norm_iteratedFDeriv_one] using hb 1 (by omega) + have h2 : ‖fderiv ℝ (fderiv ℝ F) p‖ ≤ C := by + rw [← norm_iteratedFDeriv_one,norm_iteratedFDeriv_fderiv] + exact hb 2 (by omega) + have hv (v : Base) (hv : ‖v‖ ≤ 1) : ‖coordDeriv v F p‖ ≤ C := by + exact ((fderiv ℝ F p).le_opNorm v).trans + ((mul_le_mul_of_nonneg_left hv (norm_nonneg _)).trans (by simpa using h1)) + have hvw (v w : Base) (hv : ‖v‖ ≤ 1) (hw : ‖w‖ ≤ 1) : + ‖coordDeriv v (coordDeriv w F) p‖ ≤ C := by + rw [real_second_coordDeriv ((hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) p)] + exact ((fderiv ℝ (fderiv ℝ F) p v).le_opNorm w).trans + ((mul_le_mul_of_nonneg_left hw (norm_nonneg _)).trans (by + simpa only [mul_one] using ((fderiv ℝ (fderiv ℝ F) p).le_opNorm v).trans + ((mul_le_mul_of_nonneg_left hv (norm_nonneg _)).trans (by simpa using h2)))) + have hx : ‖dx‖ ≤ 1 := by simp [dx] + have hy : ‖dy‖ ≤ 1 := by simp [dy] + apply (pi_norm_le_iff_of_nonneg hC).mpr + intro i + fin_cases i + · exact hv dx hx + · exact hv dy hy + · exact hvw dy dy hy hy + · exact hvw dx dy hx hy + · change ‖(1 : ℝ) • coordDeriv dx (coordDeriv dx F) p‖ ≤ C + simpa only [one_smul] using hvw dx dx hx hx + +end ClosedSurfaceR4.GeometryPreservation +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exterior_profile_bound (j : A.centers) + (houter : ∀ x ∈ tsupport (A.weight j), A.outer j =ᶠ[𝓝 x] (fun _ => 1)) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G V W : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ContMDiff planeModel spaceModel ∞ W → + ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ p ∈ tsupport (A.weight j), V =ᶠ[𝓝 p] G → + ‖realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead j W) 1 + (planeCoordinateIsometry (chart (j : M) p))- + realBoundaryProfile (spaceCoordinates ∘ A.vectorPlaneRead j F) 1 + (planeCoordinateIsometry (chart (j : M) p))‖ ≤ D*(b+c) := by + obtain ⟨D,hD,hbound⟩ := A.exterior_read_C2_bound j houter + refine ⟨D,hD,?_⟩ + intro F G V W hF hG hV hW b c hb hc hGF hWV p hp he + have hF' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j hF) + have hW' := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j hW) + rw [← realBoundaryProfile_sub hF' hW'] + have heq : (spaceCoordinates ∘ A.vectorPlaneRead j W)-(spaceCoordinates ∘ A.vectorPlaneRead j F) = + spaceCoordinates ∘ A.vectorPlaneRead j (W-F) := by + rw [A.vectorPlaneRead_sub] + funext y + exact (map_sub spaceCoordinates _ _).symm + rw [heq] + exact realBoundaryProfile_one_bound + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth j (hW.sub hF))) _ + (mul_nonneg hD (add_nonneg hb hc)) (hbound F G V W hF hG hV hW b c hb hc hGF hWV p hp he) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteBoundaryCrossingSets.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteBoundaryCrossingSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c1f8194fff146d3df00e6b82d14cd7ac76b9559 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteBoundaryCrossingSets.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryGeometry + +namespace OAI + +/-! Exact crossing sets for the remaining curves in a finite induction. +The no-three-curves condition keeps these points off the next boundary. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + +noncomputable def boundaryCrossingSet (curves : ι → PhaseBoundaryCurve B) (s : Set ι) : Set M := + {p | ∃ i ∈ s, ∃ j ∈ s, i ≠ j ∧ p ∈ (curves i).carrier ∧ p ∈ (curves j).carrier} + +omit [CompactSpace M] in +lemma boundaryCrossingSet_finite (curves : ι → PhaseBoundaryCurve B) (s : Set ι) + (hpair : ∀ i j, i ≠ j → ((curves i).carrier ∩ (curves j).carrier).Finite) : + (boundaryCrossingSet curves s).Finite := by + classical + have hU : (⋃ a : {a : ι × ι // a.1 ≠ a.2}, + (curves a.1.1).carrier ∩ (curves a.1.2).carrier).Finite := + Set.finite_iUnion (fun a => hpair a.1.1 a.1.2 a.2) + apply hU.subset + rintro p ⟨i,_,j,_,hij,hi,hj⟩ + exact mem_iUnion.mpr ⟨⟨(i,j),hij⟩,hi,hj⟩ + +omit [CompactSpace M] [Fintype ι] in +lemma boundaryCrossingSet_mono (curves : ι → PhaseBoundaryCurve B) + {s t : Set ι} (hst : s ⊆ t) : boundaryCrossingSet curves s ⊆ boundaryCrossingSet curves t := by + rintro p ⟨i,hi,j,hj,hij,hpi,hpj⟩ + exact ⟨i,hst hi,j,hst hj,hij,hpi,hpj⟩ + +omit [CompactSpace M] [Fintype ι] in +lemma boundaryCrossingSet_pair (curves : ι → PhaseBoundaryCurve B) {s : Set ι} + {i j : ι} (hi : i ∈ s) (hj : j ∈ s) (hij : i ≠ j) {p : M} + (hpi : p ∈ (curves i).carrier) (hpj : p ∈ (curves j).carrier) : + p ∈ boundaryCrossingSet curves s := ⟨i,hi,j,hj,hij,hpi,hpj⟩ + +omit [CompactSpace M] [Fintype ι] in +lemma boundaryCrossingSet_disjoint_next (curves : ι → PhaseBoundaryCurve B) + {s : Set ι} {a : ι} (ha : a ∉ s) + (htriple : ∀ i j k, i ≠ j → i ≠ k → j ≠ k → + (curves i).carrier ∩ (curves j).carrier ∩ (curves k).carrier = ∅) : + Disjoint (boundaryCrossingSet curves s) (curves a).carrier := by + apply Set.disjoint_left.mpr + rintro p ⟨i,hi,j,hj,hij,hpi,hpj⟩ hpa + have hia : i ≠ a := fun he => ha (he ▸ hi) + have hja : j ≠ a := fun he => ha (he ▸ hj) + have hx : p ∈ (curves i).carrier ∩ (curves j).carrier ∩ (curves a).carrier := ⟨⟨hpi,hpj⟩,hpa⟩ + rw [htriple i j a hij hia hja] at hx + exact hx + +omit [Fintype ι] in +lemma finiteBoundaryGeometry_restrict_remaining {curves : ι → PhaseBoundaryCurve B} + {t : Set ι} {F : M → Space} {n : PreferredNormal F} + (h : FiniteBoundaryGeometry curves (boundaryCrossingSet curves t) F n) + {s : Set ι} (hst : s ⊆ t) : + FiniteBoundaryGeometry (fun i : s => curves i) + (boundaryCrossingSet curves s) F n := by + exact h.restrict Subtype.val Subtype.val_injective (boundaryCrossingSet_mono curves hst) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCircularPreparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCircularPreparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4991e8f4f31155e69003d25f9ccf9e8324c8b24a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCircularPreparation.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.TransverseCircularRadii +import OAI.Geometry.SurfaceImmersion.Primitive.GenericCircularPhases + +namespace OAI + +/-! The geometric finite preparation: independent radii and linear phase +parts are chosen before the starting immersion is flattened at the finite +crossing set. All statements concern the actual coordinate circles. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry PublishedInputs +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem finite_circular_preparation + (index : ι → A.centers) (r0 lo hi L : ι → ℝ) + (hlo : ∀ i, 0 < lo i) (hlohi : ∀ i, lo i < hi i) (hhi : ∀ i, hi i < r0 i) + (hpos : ∀ i p, 0 < A.weight (index i) p ↔ p ∈ circularCoordinateDisk (index i : M) (r0 i)) + (hreg : ∀ i, circularCoordinateRegion (index i : M) (r0 i) ⊆ + (coordinateChart (index i : M)).target) + (U : Set (ι → CurvePlane)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ (r : ι → ℝ) (ell : ι → CurvePlane), ell ∈ U ∧ + (∀ i, lo i < r i ∧ r i < hi i) ∧ + (circularCrossingSet (fun i => (index i : M)) r).Finite ∧ + (∀ i j k, i ≠ j → i ≠ k → j ≠ k → + circularBoundary (index i : M) (r i) ∩ circularBoundary (index j : M) (r j) ∩ + circularBoundary (index k : M) (r k) = ∅) ∧ + (∀ i j, i ≠ j → ∀ p ∈ circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j), + ∃ q : M, p ∈ (coordinateChart q).source ∧ + covectorDet (circularNormalCovector (index i : M) q p) + (circularNormalCovector (index j : M) q p) ≠ 0) ∧ + (∀ i j, (circularPhaseTangencies (index i : M) (index j : M) + (ell i) (L i) (r j) (r i)).Finite) ∧ + (∀ i j, i ≠ j → ∀ p ∈ circularCrossingSet (fun k => (index k : M)) r, + p ∈ (coordinateChart (index i : M)).source → + p ∈ (coordinateChart (index j : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase (index i : M) (ell i) (L i) ∘ + (coordinateChart (index i : M)).symm) (coordinateChart (index i : M) p)) + (phaseDerivative (centeredAtlasPhase (index j : M) (ell j) (L j) ∘ + (coordinateChart (index i : M)).symm) (coordinateChart (index i : M) p)) ≠ 0) := by + classical + obtain ⟨r,hr,hpair,htriple,htrans⟩ := A.exists_transverse_circular_radii index r0 lo hi + hlo hlohi hhi hpos + let P : Set M := circularCrossingSet (fun i => (index i : M)) r + have hP : P.Finite := circularCrossingSet_finite _ _ hpair + let : Fintype P := hP.fintype + let κ := {a : DistinctRadiusPairs ι × P // + (a.2 : M) ∈ (coordinateChart (index a.1.1.1 : M)).source ∧ + (a.2 : M) ∈ (coordinateChart (index a.1.1.2 : M)).source} + let : Fintype κ := Fintype.ofFinite κ + let first : κ → ι := fun a => a.1.1.1.1 + let second : κ → ι := fun a => a.1.1.1.2 + let point : κ → M := fun a => a.1.2 + let base : κ → M := fun a => (index (first a) : M) + have hrad (i : ι) : 0 < r i := (hlo i).trans (hr i).1 + have hnew (i : ι) : circularCoordinateRegion (index i : M) (r i) ⊆ + (coordinateChart (index i : M)).target := by + have hs : (r i)^2 ≤ (r0 i)^2 := by + have h1 := (hr i).2 + have h2 := hhi i + have h3 := hrad i + nlinarith + intro x hx + exact hreg i (hx.trans hs) + obtain ⟨ell,hell,htangent,hcross⟩ := exists_generic_circular_phases + (fun i => (index i : M)) L r hrad hnew first second (fun a => a.1.1.2) + base point (fun a => a.2.1) (fun a => a.2.1) (fun a => a.2.2) U hU hne + refine ⟨r,ell,hell,hr,hP,htriple,htrans,htangent,?_⟩ + intro i j hij p hp hi hj + let a : κ := ⟨(⟨(i,j),hij⟩,⟨p,hp⟩),hi,hj⟩ + exact hcross a + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNeighborhoods.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNeighborhoods.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca8fb50367313aa20318a1e3c08144bd6ef985e7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNeighborhoods.lean @@ -0,0 +1,51 @@ +import Mathlib + +namespace OAI + +/-! Choose disjoint crossing neighborhoods inside prescribed open sets, +avoiding every curve that does not participate in that crossing. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4 +variable {X ι κ : Type*} [TopologicalSpace X] [T2Space X] [Fintype ι] [Fintype κ] + +theorem finite_crossing_neighborhoods (x : ι → X) (hx : Function.Injective x) + (left right : ι → κ) (C : κ → Set X) (hC : ∀ k, IsClosed (C k)) + (honly : ∀ i k, x i ∈ C k → k = left i ∨ k = right i) + (V : ι → Set X) (hV : ∀ i, IsOpen (V i)) (hxV : ∀ i, x i ∈ V i) : + ∃ O : ι → Set X, (∀ i, IsOpen (O i)) ∧ (∀ i, x i ∈ O i) ∧ + (∀ i, O i ⊆ V i) ∧ Pairwise (fun i j => Disjoint (O i) (O j)) ∧ + ∀ i k y, y ∈ O i → y ∈ C k → k = left i ∨ k = right i := by + classical + obtain ⟨W,hW,hdisj⟩ := (Set.finite_range x).t2_separation + let O : ι → Set X := fun i => W (x i) ∩ V i ∩ + ⋂ k : κ, if k = left i ∨ k = right i then univ else (C k)ᶜ + have hopen (i : ι) : IsOpen (O i) := by + apply ((hW (x i)).2.inter (hV i)).inter + apply isOpen_iInter_of_finite + intro k + split_ifs + · exact isOpen_univ + · exact (hC k).isOpen_compl + have hmem (i : ι) : x i ∈ O i := by + refine ⟨⟨(hW (x i)).1,hxV i⟩,?_⟩ + apply mem_iInter.mpr + intro k + split_ifs with h + · trivial + · exact fun hc => h (honly i k hc) + refine ⟨O,hopen,hmem,(fun i y hy => hy.1.2),?_,?_⟩ + · intro i j hij + exact (hdisj (mem_range_self i) (mem_range_self j) (fun h => hij (hx h))).mono + (fun y hy => hy.1.1) (fun y hy => hy.1.1) + · intro i k y hy hyC + by_contra h + have hy' := mem_iInter.mp hy.2 k + simp only [h,ite_false,mem_compl_iff] at hy' + exact hy' hyC + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNormals.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNormals.lean new file mode 100644 index 0000000000000000000000000000000000000000..21706d25450691776a8c5135799064903d5ae9bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteCrossingNormals.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCrossingChoice +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteDisjointAdjustment + +namespace OAI + +/-! Simultaneous normal adjustments at the finitely many later crossings. +Disjoint supports preserve the other curves and the exterior normal exactly. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] +variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] + +theorem finite_crossing_normals {U : Set E} (hU : IsOpen U) + {n : E → Vec} (hn : ContDiffOn ℝ ∞ n U) + (hunit : ∀ y ∈ U, n y ⬝ᵥ n y = 1) + (v : κ → E → Vec) (hv : ∀ k, ContDiffOn ℝ ∞ (v k) U) + (left right : ι → κ) (x : ι → E) (hx : ∀ i, x i ∈ U) + (O : ι → Set E) (hO : ∀ i, IsOpen (O i)) (hxo : ∀ i, x i ∈ O i) + (hdisj : Pairwise fun i j => Disjoint (O i) (O j)) + (C : κ → Set E) + (hcurves : ∀ i k y, y ∈ O i → y ∈ C k → k = left i ∨ k = right i) + (hchoice : ∀ i, + (0 < v (left i) (x i) ⬝ᵥ n (x i) ∧ 0 < v (right i) (x i) ⬝ᵥ n (x i)) ∨ + (0 < v (left i) (x i) ⬝ᵥ v (right i) (x i) ∧ + ∃ w : Vec, n (x i) ⬝ᵥ w = 0 ∧ + 0 < v (left i) (x i) ⬝ᵥ w ∧ 0 < v (right i) (x i) ⬝ᵥ w)) : + ∃ g : E → Vec, ContDiffOn ℝ ∞ g U ∧ + (∀ y ∈ U, g y ⬝ᵥ g y = 1) ∧ + (∀ y ∈ U, (∀ i, y ∉ O i) → g y = n y) ∧ + (∀ k y, y ∈ U → y ∈ C k → n y ≠ -normalize (v k y) → + g y ≠ -normalize (v k y)) ∧ + (∀ y ∈ U, ∀ w : Vec, w ⬝ᵥ n y = 0 → + (∀ k, w ⬝ᵥ v k y = 0) → w ⬝ᵥ g y = 0) ∧ + ∀ i, 0 < v (left i) (x i) ⬝ᵥ g (x i) ∧ + 0 < v (right i) (x i) ⬝ᵥ g (x i) := by + classical + choose f hfs hfu hfe hfl hfr hfn hfp using fun i => + local_crossing_adjustment_of_choice hU (hO i) hn (hv (left i)) (hv (right i)) + hunit (hx i) (hxo i) (hchoice i) + let f' : ι → E → Vec := fun i y => if y ∈ U then f i y else n y + have hfeq (i : ι) {y : E} (hy : y ∈ U) : f' i y = f i y := by simp only [f',hy,ite_true] + have hfext : ∀ i ∈ (Finset.univ : Finset ι), ∀ y ∉ O i, f' i y = n y := by + intro i _ y hy + by_cases hyU : y ∈ U + · rw [hfeq i hyU] + exact hfe i y hyU hy + · simp only [f',hyU,ite_false] + have hd : ((Finset.univ : Finset ι) : Set ι).Pairwise fun i j => Disjoint (O i) (O j) := + fun i _ j _ hij => hdisj hij + let g := finiteDisjointAdjustment Finset.univ n f' + have heq (i : ι) {y : E} (hy : y ∈ U) (hyO : y ∈ O i) : g y = f i y := + (finiteDisjointAdjustment_of_mem hd hfext (Finset.mem_univ i) hyO).trans (hfeq i hy) + have hprop {P : E → Vec → Prop} (hnP : ∀ y ∈ U, P y (n y)) + (hfP : ∀ i y, y ∈ U ∩ O i → P y (f i y)) : ∀ y ∈ U, P y (g y) := by + apply finiteDisjointAdjustment_property hd hfext hnP + intro i _ y hy + rw [hfeq i hy.1] + exact hfP i y hy + refine ⟨g,?_,?_,?_,?_,?_,?_⟩ + · apply finiteDisjointAdjustment_smoothOn hn + intro i _ + apply (hfs i).congr + intro y hy + exact hfeq i hy + · exact hprop (P := fun _ a => a ⬝ᵥ a = 1) hunit (fun i y hy => hfu i y hy.1) + · intro y _ hy + exact finiteDisjointAdjustment_of_exterior hfext (fun i _ => hy i) + · intro k y hy hyC hanti + apply hprop (P := fun z a => z ∈ C k → n z ≠ -normalize (v k z) → a ≠ -normalize (v k z)) + (fun _ _ _ h => h) ?_ y hy hyC hanti + intro i z hz hzC hzanti + rcases hcurves i k z hz.2 hzC with rfl | rfl + · exact hfl i z hz.1 hzanti + · exact hfr i z hz.1 hzanti + · intro y hy w hwn hwv + exact hprop (P := fun z a => w ⬝ᵥ n z = 0 → (∀ k, w ⬝ᵥ v k z = 0) → w ⬝ᵥ a = 0) + (fun _ _ h _ => h) + (fun i z hz h hzv => hfn i z hz.1 w h (hzv (left i))) y hy hwn hwv + · intro i + rw [heq i (hx i) (hxo i)] + exact hfp i + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteExteriorCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteExteriorCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9d45d6a7f4b931d859ee9ea06c499be472ac473 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteExteriorCrossings.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCrossingExterior + +namespace OAI + +/-! One tolerance preserves all exterior crossing invariants in a finite +family, for the actual normal supplied by the primitive gluing theorem. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes VelocityFrame +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [Fintype ι] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem finite_exterior_crossing_preservation + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (curves : ι → PhaseBoundaryCurve B) + {D : Set M} (hDr : interior (closure D) = D) + {E : Set M} (hE : E.Finite) + (hold : ∀ j k, j ≠ k → ∀ p ∈ E, p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < (curves k).second F p ⬝ᵥ spaceCoordinates (n.vector p)) ∧ + 0 < (curves j).crossing (curves k) F p ∧ 0 < (curves k).crossing (curves j) F p) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ∀ h : SmoothMetric M, IsSmoothIsometricImmersion M h W → + ∀ b a : ℝ, 0 ≤ b → 0 ≤ a → b+a < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 a (W-V) → + (∀ p ∉ closure D, V =ᶠ[𝓝 p] G) → ∀ N : PreferredNormal W, + (∀ p ∈ E, p ∉ D → N.vector p = A.unitProjectedNormalField W n.vector p) → + ∀ j k, j ≠ k → ∀ p ∈ E, p ∉ D → p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second W p ⬝ᵥ spaceCoordinates (N.vector p) ∧ + 0 < (curves k).second W p ⬝ᵥ spaceCoordinates (N.vector p)) ∧ + 0 < (curves j).crossing (curves k) W p ∧ 0 < (curves k).crossing (curves j) W p := by + classical + let P := {q : ι × ι // q.1 ≠ q.2} + let K : P → Set M := fun q => {p | p ∈ E ∧ p ∉ D ∧ + p ∈ (curves q.val.1).carrier ∧ p ∈ (curves q.val.2).carrier} + have hp (q : P) := (curves q.val.1).exterior_crossing_preservation (curves q.val.2) A + hF n houter (hE.subset (fun _ h => h.1)).isCompact + (show K q ⊆ (curves q.val.1).carrier from fun _ h => h.2.2.1) + (show K q ⊆ (curves q.val.2).carrier from fun _ h => h.2.2.2) + (closure D)ᶜ (by + intro p hp + rw [closure_compl,hDr] + exact hp.2.1) + (fun p hp => (hold q.val.1 q.val.2 q.property p hp.1 hp.2.2.1 hp.2.2.2).1) + (fun p hp => (hold q.val.1 q.val.2 q.property p hp.1 hp.2.2.1 hp.2.2.2).2) + choose r hr hpres using hp + obtain ⟨ρ,hρ,_,hle⟩ := finite_positive_threshold r hr + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV h hW b a hb ha hba hGF hWV hext N hN j k hjk p hp hpD hpj hpk + have hh := hpres ⟨(j,k),hjk⟩ G V W hG hV h hW b a hb ha + (hba.trans_le (hle ⟨(j,k),hjk⟩)) hGF hWV hext p ⟨hp,hpD,hpj,hpk⟩ + rw [hN p hp hpD] + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePeriodicExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePeriodicExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..67a2c811aaf22f74621e2bcd6002cdd317de03a7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePeriodicExpansion.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFiniteMetricIdentity + +namespace OAI + +/-! Exact finite periodic expansion with angle-independent lower metric terms. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +private lemma replace_low_sum (n : ℕ) (c e : ℕ → ℝ) (q z : ℝ) + (hzero : c 0 = q) (h : ∀ r, 0 < r → r < n + 1 → c r = e r) : + (∑ r ∈ Finset.range (n + 1), c r * z ^ r) = + q + ∑ r ∈ Finset.Ico 1 (n + 1), e r * z ^ r := by + have hs := weighted_sum_split_zero z c n + simp only [smul_eq_mul, mul_comm] at hs + rw [hs, hzero] + congr 1 + apply Finset.sum_congr rfl + intro r hr + obtain ⟨hr, hrn⟩ := Finset.mem_Ico.mp hr + rw [h r (by omega) hrn] + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +/-- The exact finite expansion of the actual pullback metric. This asserts +smooth periodic coefficients and removes every low-order oscillation; +it does not yet assert the higher-jet order and uniform remainder bounds. -/ +theorem finite_periodic_expansion {F : A → E} (hF : ContDiff ℝ ∞ F) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓx : ℓ dx = 1) (hℓy : ℓ dy = 0) + (hX : ∀ p, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (hY : ∀ p, fderiv ℝ F p dy = g.Y p) (n : ℕ) : + ∃ U : ℕ → Family A E, + U 0 = g.initial ∧ (∀ i p, average ((U i).val p) = 0) ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, g.initial.val p = 0) → + ∀ i p, p ∈ O → (U i).val p = 0) ∧ + ∀ z : ℝ, z ≠ 0 → ∀ p : A, + let L := n + 1 + let f := finiteAnsatz F U ℓ L z + let t : Period := ((ℓ p / z : ℝ) : Period) + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx) = + (inner ℝ (g.X₀ p) (g.X₀ p) + g.q p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.xxCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.xxRemainder dx U L r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy) = + inner ℝ (g.X₀ p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.xyCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.xyRemainder dx U L r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy) = + inner ℝ (g.Y p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.yyCoefficient U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.yyRemainder U L r).val p t * z ^ r) := by + obtain ⟨U, hinit, hU, hsupport, hcoeff⟩ := g.exists_angle_independent_coefficients dx (n + 1) + refine ⟨U, hinit, hU, hsupport, ?_⟩ + intro z hz p + dsimp only + let t : Period := ((ℓ p / z : ℝ) : Period) + obtain ⟨hxx, hxy, hyy⟩ := g.finite_metric_identity hF U hinit ℓ dx hℓx hℓy hX hY n z hz p + obtain ⟨hxx₀, hxy₀, hyy₀⟩ := g.polynomial_zero_coefficients dx U (n + 1) p t + rw [replace_low_sum n _ _ _ z hxx₀ (fun r hr hn => (hcoeff r hr hn p t).1)] at hxx + rw [replace_low_sum n _ _ _ z hxy₀ (fun r hr hn => (hcoeff r hr hn p t).2.1)] at hxy + rw [replace_low_sum n _ _ _ z hyy₀ (fun r hr hn => (hcoeff r hr hn p t).2.2)] at hyy + exact ⟨hxx, hxy, hyy⟩ + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePrimitiveOperatorTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePrimitiveOperatorTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc4106da43b8ce3834bece966c840f85a24e5003 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FinitePrimitiveOperatorTolerance.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorStability +import Mathlib.Topology.UniformSpace.HeineCantor + +namespace OAI + +/-! Uniform operator tolerance on bounded finite coefficient data. -/ +noncomputable section +open Set +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance operatorToleranceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance operatorToleranceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {ι : Type*} [Fintype ι] + +theorem finite_primitive_operator_tolerance (D : ℝ) {eta : ℝ} (heta : 0 < eta) : + ∃ eps : ℝ, 0 < eps ∧ eps ≤ 1 ∧ + ∀ z z' : PrimitiveOperatorData ι, ‖z‖ ≤ D → ‖z'-z‖ < eps → + ‖primitiveDataOperator z'-primitiveDataOperator z‖ < eta := by + have hc := (isCompact_closedBall (0 : PrimitiveOperatorData ι) (D+1)).uniformContinuousOn_of_continuous + primitiveDataOperator_smooth.continuous.continuousOn + obtain ⟨eps,heps,hnear⟩ := Metric.uniformContinuousOn_iff.mp hc eta heta + refine ⟨min eps 1,lt_min heps zero_lt_one,min_le_right _ _,?_⟩ + intro z z' hz hdist + have hzK : z ∈ Metric.closedBall 0 (D+1) := by + simp only [Metric.mem_closedBall,dist_zero_right] + linarith + have hzK' : z' ∈ Metric.closedBall 0 (D+1) := by + simp only [Metric.mem_closedBall,dist_zero_right] + have hh : ‖z'-z‖ < 1 := hdist.trans_le (min_le_right _ _) + calc + ‖z'‖ ≤ ‖z'-z‖+‖z‖ := norm_le_norm_sub_add _ _ + _ ≤ D+1 := by linarith + simpa only [dist_eq_norm] using hnear z' hzK' z hzK + (by simpa only [dist_eq_norm] using hdist.trans_le (min_le_left _ _)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteProfileBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteProfileBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f451e5853a1c6ea98f53398b2275144006897d0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FiniteProfileBounds.lean @@ -0,0 +1,23 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrixPowers + +namespace OAI + +/-! Explicit terminal derivative orders in finite error profiles. -/ +noncomputable section +namespace ClosedSurfaceR4.FiniteParametrix + +lemma boundProfile_terminal (L : ℕ) (K C f : ℕ → ℝ) (j m : ℕ) : + boundProfile L K (fun r => C r * f (r + L)) j m = + boundProfile L K C j m * f (m + (j + 1) * L) := by + induction j generalizing m with + | zero => simp only [boundProfile, zero_add, one_mul] + | succ j ih => + rw [boundProfile, ih, boundProfile] + have he : m + L + (j + 1) * L = m + (j + 1 + 1) * L := by ring + rw [he, mul_assoc] + +end ClosedSurfaceR4.FiniteParametrix + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/FrozenCircularData.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FrozenCircularData.lean new file mode 100644 index 0000000000000000000000000000000000000000..4996859a7a8dc2ef75d8c6703e51335802a544ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/FrozenCircularData.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData +import OAI.Geometry.SurfaceImmersion.Primitive.VelocitySpatialDerivative + +namespace OAI + +/-! The normal data as smooth functions of position and angular value. +The first mixed normal coefficient contains no derivative of the angle. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def frozenError (Q : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) (d : E) + (z : E × ℝ) : Vec := + fderiv ℝ Q z.1 d + (fderiv ℝ R z.1 d) • direction (e₁ z.1) (e₂ z.1) z.2 + + R z.1 • (Real.cos z.2 • fderiv ℝ e₁ z.1 d + Real.sin z.2 • fderiv ℝ e₂ z.1 d) + +def frozenNormal (X Y C : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) + (z : E × ℝ) : Vec := + normalize (leadingNormal (X z.1) (Y z.1) (C z.1) + (R z.1 • direction (e₁ z.1) (e₂ z.1) z.2)) + +def frozenSize (X Y C : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) + (z : E × ℝ) : ℝ := + normalSize (X z.1) (Y z.1) (C z.1) (R z.1 • direction (e₁ z.1) (e₂ z.1) z.2) + +def frozenFirst (Q X Y C : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) (d : E) + (z : E × ℝ) : ℝ := frozenError Q R e₁ e₂ d z ⬝ᵥ frozenNormal X Y C R e₁ e₂ z + +lemma frozenError_smoothOn {Q e₁ e₂ : E → Vec} {R : E → ℝ} {U : Set E} + (hU : IsOpen U) (hQ : ContDiffOn ℝ ∞ Q U) (hR : ContDiffOn ℝ ∞ R U) + (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) (d : E) : + ContDiffOn ℝ ∞ (frozenError Q R e₁ e₂ d) (U ×ˢ univ) := by + have hDQ : ContDiffOn ℝ ∞ (fun z : E × ℝ => fderiv ℝ Q z.1 d) (U ×ˢ univ) := + ((hQ.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).comp + contDiffOn_fst (fun z hz => hz.1) + have hDR : ContDiffOn ℝ ∞ (fun z : E × ℝ => fderiv ℝ R z.1 d) (U ×ˢ univ) := + ((hR.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).comp + contDiffOn_fst (fun z hz => hz.1) + have hD₁ : ContDiffOn ℝ ∞ (fun z : E × ℝ => fderiv ℝ e₁ z.1 d) (U ×ˢ univ) := + ((h₁.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).comp + contDiffOn_fst (fun z hz => hz.1) + have hD₂ : ContDiffOn ℝ ∞ (fun z : E × ℝ => fderiv ℝ e₂ z.1 d) (U ×ˢ univ) := + ((h₂.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).comp + contDiffOn_fst (fun z hz => hz.1) + exact (hDQ.add (hDR.smul + ((contDiffOn_snd.cos.smul (h₁.comp contDiffOn_fst (fun z hz => hz.1))).add + (contDiffOn_snd.sin.smul (h₂.comp contDiffOn_fst (fun z hz => hz.1)))))).add + ((hR.comp contDiffOn_fst (fun z hz => hz.1)).smul + ((contDiffOn_snd.cos.smul hD₁).add (contDiffOn_snd.sin.smul hD₂))) + +theorem frozen_normals_smoothOn {X Y C e₁ e₂ : E → Vec} {R : E → ℝ} {U : Set E} + (hU : IsOpen U) (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hC : ContDiffOn ℝ ∞ C U) (hR : ContDiffOn ℝ ∞ R U) + (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hR0 : ∀ x ∈ U, R x ≠ 0) : + ContDiffOn ℝ ∞ (frozenNormal X Y C R e₁ e₂) (U ×ˢ univ) ∧ + ContDiffOn ℝ ∞ (frozenSize X Y C R e₁ e₂) (U ×ˢ univ) := by + let V : E × ℝ → Vec := fun z => R z.1 • direction (e₁ z.1) (e₂ z.1) z.2 + have hV : ContDiffOn ℝ ∞ V (U ×ˢ univ) := + (hR.comp contDiffOn_fst (fun z hz => hz.1)).smul + ((contDiffOn_snd.cos.smul (h₁.comp contDiffOn_fst (fun z hz => hz.1))).add + (contDiffOn_snd.sin.smul (h₂.comp contDiffOn_fst (fun z hz => hz.1)))) + have hVY (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : Y z.1 ⬝ᵥ V z = 0 := by + have hf := hframe z.1 hz.1 + simp [V, direction, dotProduct_add, dotProduct_smul, hf.2.2.2.1, hf.2.2.2.2.2.1] + have hVC (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : C z.1 ⬝ᵥ V z = 0 := by + have hf := hframe z.1 hz.1 + simp [V, direction, dotProduct_add, dotProduct_smul, hf.2.2.2.2.1, hf.2.2.2.2.2.2] + have hV0 (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : V z ≠ 0 := by + apply smul_ne_zero (hR0 z.1 hz.1) + have hf := hframe z.1 hz.1 + intro he + have hu := direction_unit hf.1 hf.2.1 hf.2.2.1 z.2 + rw [he] at hu + norm_num at hu + have hN := leadingNormal_smoothOn (hU.prod isOpen_univ) + (hX.comp contDiffOn_fst (fun z hz => hz.1)) + (hY.comp contDiffOn_fst (fun z hz => hz.1)) + (hC.comp contDiffOn_fst (fun z hz => hz.1)) hV + (fun z hz => hD z.1 hz.1) hVY hVC hV0 + have hN0 (z : E × ℝ) (hz : z ∈ U ×ˢ (univ : Set ℝ)) : + leadingNormal (X z.1) (Y z.1) (C z.1) (V z) ≠ 0 := + (leading_normal_nondegenerate (hD z.1 hz.1) (hVY z hz) (hVC z hz) (hV0 z hz)).2 + constructor + · intro z hz + exact (normalize_smoothAt (hN.contDiffAt ((hU.prod isOpen_univ).mem_nhds hz)) + (hN0 z hz)).contDiffWithinAt + · exact (dot_smoothOn hN hN).sqrt (fun z hz => (dot_self_pos (hN0 z hz)).ne') + +theorem frozen_coefficients_smoothOn {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} {U : Set E} + (hU : IsOpen U) (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) (hR : ContDiffOn ℝ ∞ R U) + (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hR0 : ∀ x ∈ U, R x ≠ 0) (d : E) : + ContDiffOn ℝ ∞ (frozenFirst Q X Y C R e₁ e₂ d) (U ×ˢ univ) ∧ + ContDiffOn ℝ ∞ (frozenSize X Y C R e₁ e₂) (U ×ˢ univ) := by + obtain ⟨hN, hS⟩ := frozen_normals_smoothOn hU hX hY hC hR h₁ h₂ hD hframe hR0 + exact ⟨dot_smoothOn (frozenError_smoothOn hU hQ hR h₁ h₂ d) hN, hS⟩ + +theorem actual_first_eq_frozen {Q X Y C e₁ e₂ : E → Vec} {R α : E → ℝ} {x d : E} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) + (hframe : e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) : + fderiv ℝ (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) x d ⬝ᵥ + frozenNormal X Y C R e₁ e₂ (x, α x) = + frozenFirst Q X Y C R e₁ e₂ d (x, α x) := by + rw [circular_velocity_derivative hQ hR h₁ h₂ hα] + exact first_normal_derivative_independent + (angularDirection_normal_perp (R x) (α x) hframe.1 hframe.2.1 hframe.2.2.1 + hframe.2.2.2.1 hframe.2.2.2.2.2.1 hframe.2.2.2.2.1 hframe.2.2.2.2.2.2) _ _ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e892f34045e93c9dcc031a0ff7e5679f3dfb609 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularPhases.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryTangencies + +namespace OAI + +/-! The generic phase choice for the actual finite circular disk family. +Both finiteness of tangencies on the surface and cross-chart covector +nonparallelism follow from the preceding explicit parameter construction. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Countable κ] + +theorem exists_generic_circular_phases + (center : ι → M) (L r : ι → ℝ) (hr : ∀ i, 0 < r i) + (hreg : ∀ i, circularCoordinateRegion (center i) (r i) ⊆ (coordinateChart (center i)).target) + (first second : κ → ι) (hdistinct : ∀ k, first k ≠ second k) + (base point : κ → M) + (hbase : ∀ k, point k ∈ (coordinateChart (base k)).source) + (hfirst : ∀ k, point k ∈ (coordinateChart (center (first k))).source) + (hsecond : ∀ k, point k ∈ (coordinateChart (center (second k))).source) + (U : Set (ι → CurvePlane)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ ell ∈ U, + (∀ i j, (circularPhaseTangencies (center i) (center j) (ell i) (L i) (r j) (r i)).Finite) ∧ + (∀ k, covectorDet + (phaseDerivative (centeredAtlasPhase (center (first k)) (ell (first k)) (L (first k)) ∘ + (coordinateChart (base k)).symm) (coordinateChart (base k) (point k))) + (phaseDerivative (centeredAtlasPhase (center (second k)) (ell (second k)) (L (second k)) ∘ + (coordinateChart (base k)).symm) (coordinateChart (base k) (point k))) ≠ 0) := by + let K : ι × ι → Set ℝ := fun a => circularArcCompact (center a.1) (center a.2) (r a.2) (r a.1) + let V : ι × ι → Set ℝ := fun a => circularArcDomain (center a.1) (center a.2) (r a.2) + let u : ι × ι → ℝ → CurvePlane := fun a => circularArc (center a.1) (center a.2) (r a.2) + have hK (a : ι × ι) : IsCompact (K a) := circularArcCompact_compact _ _ (hreg a.2) (hreg a.1) + have hV (a : ι × ι) : IsOpen (V a) := circularArcDomain_open _ _ (hreg a.2) + have hu (a : ι × ι) : ContDiffOn ℝ ∞ (u a) (V a) := circularArc_smooth _ _ (hreg a.2) + have hKV (a : ι × ι) : K a ⊆ V a := circularArcCompact_subset _ _ (hreg a.1) + have hv (a : ι × ι) (t : ℝ) (ht : t ∈ K a) : deriv (u a) t ≠ 0 := + circularArc_regular _ _ (hr a.2) (hreg a.2) (hKV a ht) + obtain ⟨ell,hell,hfinite,_,hcross⟩ := exists_generic_atlas_phases_on center L Prod.fst + u V hV hu K hK hKV hv first second hdistinct base point hbase hfirst hsecond U hU hne + refine ⟨ell,hell,?_,hcross⟩ + intro i j + exact circularPhaseTangencies_finite (center i) (center j) (ell i) (L i) + (hr j) (hreg j) (hreg i) (hfinite (i,j)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularRadii.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularRadii.lean new file mode 100644 index 0000000000000000000000000000000000000000..10d5f9e72969d9fd91aeb8580a8698c0f05ff67a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericCircularRadii.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GenericSurfaceLevels +import OAI.Geometry.SurfaceImmersion.Correction.SmoothCircularRadius + +namespace OAI + +/-! Independent genuine disk radii can be chosen in every prescribed +positive box, with finite pair crossings and no triple crossings. The +regular-value statement is retained for the actual smooth radius fields. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PublishedInputs +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exists_generic_circular_radii + (index : ι → A.centers) (r0 lo hi : ι → ℝ) + (hlo : ∀ i, 0 < lo i) (hlohi : ∀ i, lo i < hi i) (hhi : ∀ i, hi i < r0 i) + (hpos : ∀ i p, 0 < A.weight (index i) p ↔ p ∈ circularCoordinateDisk (index i : M) (r0 i)) : + ∃ r : ι → ℝ, (∀ i, lo i < r i ∧ r i < hi i) ∧ + (∀ i j, i ≠ j → (circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j)).Finite) ∧ + (∀ i j k, i ≠ j → i ≠ k → j ≠ k → + circularBoundary (index i : M) (r i) ∩ circularBoundary (index j : M) (r j) ∩ + circularBoundary (index k : M) (r k) = ∅) ∧ + (∀ i j, i ≠ j → ∀ p ∈ circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j), + ∃ q : M, p ∈ (chartAt Plane q).source ∧ + Function.Surjective (fderiv ℝ (fun y => radiusPairProjection i j + (fun k => A.circularRadiusField (index k) ((chartAt Plane q).symm y))) + (chartAt Plane q p))) := by + let U : Set (ι → ℝ) := {s | ∀ i, (lo i)^2 < s i ∧ s i < (hi i)^2} + have hU : IsOpen U := by + have heq : U = ⋂ i, {s : ι → ℝ | (lo i)^2 < s i ∧ s i < (hi i)^2} := by + ext s + simp only [mem_iInter,mem_ofPred_eq] + rfl + rw [heq] + apply isOpen_iInter_of_finite + intro i + exact (isOpen_lt continuous_const (continuous_apply i)).inter + (isOpen_lt (continuous_apply i) continuous_const) + have hUexists : U.Nonempty := by + refine ⟨fun i => ((lo i)^2+(hi i)^2)/2,?_⟩ + intro i + have hl := hlo i + have hh := hlohi i + constructor <;> nlinarith + obtain ⟨s,hs,hfinite,htriple,hregular⟩ := exists_generic_surface_levels A + (fun i => A.circularRadiusField (index i)) (fun i => A.circularRadiusField_smooth (index i)) + U hU hUexists + let r : ι → ℝ := fun i => Real.sqrt (s i) + have hspos (i : ι) : 0 < s i := (sq_nonneg (lo i)).trans_lt (hs i).1 + have hrsq (i : ι) : (r i)^2 = s i := Real.sq_sqrt (hspos i).le + have hrpos (i : ι) : 0 < r i := Real.sqrt_pos.mpr (hspos i) + have hb (i : ι) : lo i < r i ∧ r i < hi i := by + have hl := hlo i + have hh := hlohi i + have hsq := hrsq i + have hposr := hrpos i + have hs' := hs i + constructor <;> nlinarith + have hsmall (i : ι) : (r i)^2 < (r0 i)^2 := by + have h1 := (hb i).2 + have h2 := hhi i + have h3 := hrpos i + nlinarith + have heval (i : ι) {p : M} (hp : p ∈ circularBoundary (index i : M) (r i)) : + A.circularRadiusField (index i) p = s i := + (A.circularBoundary_radiusField (index i) (hsmall i) (hpos i) hp).trans (hrsq i) + refine ⟨r,hb,?_,?_,?_⟩ + · intro i j hij + exact (hfinite i j hij).subset (fun p hp => ⟨heval i hp.1,heval j hp.2⟩) + · intro i j k hij hik hjk + apply eq_empty_iff_forall_notMem.mpr + intro p hp + exact htriple i j k hij hik hjk p ⟨heval i hp.1.1,heval j hp.1.2,heval k hp.2⟩ + · intro i j hij p hp + exact hregular i j hij p (heval i hp.1) (heval j hp.2) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericPhaseCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericPhaseCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc46329148285650e87025412b9c11631bba37c3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GenericPhaseCrossing.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCrossingTransversality +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseOrdinaryCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.GenericAtlasPhases + +namespace OAI + +/-! The generic covectors selected in ordinary coordinates are the first +rows of the actual phase transitions. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates RealModes SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +lemma phaseTransition_refl_first (q r : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (phi : M → ℝ) (hphi : ∀ p, (surfacePhaseChart r e p).1 = phi p) : + Prod.fst ∘ surfacePhaseTransition q (OpenPartialHomeomorph.refl JetPolynomial.Base) r e = + phi ∘ (coordinateChart q).symm := by + funext x + change (surfacePhaseChart r e + ((surfacePhaseChart q (OpenPartialHomeomorph.refl JetPolynomial.Base)).symm x)).1 = _ + rw [surfacePhaseChart_refl_symm_apply,hphi] + rfl + +lemma phaseTransition_refl_covector (q r : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (phi : M → ℝ) + (hphi : ∀ p, (surfacePhaseChart r e p).1 = phi p) + {p : M} (hq : p ∈ (coordinateChart q).source) + (hr : p ∈ (surfacePhaseChart r e).source) : + firstCoordinateCovector + (fderiv ℝ (surfacePhaseTransition q (OpenPartialHomeomorph.refl JetPolynomial.Base) r e) + (coordinateChart q p)) = + phaseDerivative (phi ∘ (coordinateChart q).symm) (coordinateChart q p) := by + have hq' : p ∈ (surfacePhaseChart q (OpenPartialHomeomorph.refl JetPolynomial.Base)).source := by + rwa [surfacePhaseChart_refl_source] + have hs := surfacePhaseTransition_source q r (OpenPartialHomeomorph.refl JetPolynomial.Base) e hq' hr + have ht := ((surfacePhaseTransition_smooth q (OpenPartialHomeomorph.refl JetPolynomial.Base) + contDiff_id r e he) _ hs).contDiffAt + ((surfacePhaseTransition q (OpenPartialHomeomorph.refl JetPolynomial.Base) r e).open_source.mem_nhds hs) + have hh := phaseDerivative_fst (ht.differentiableAt (by simp)) + rw [phaseTransition_refl_first q r e phi hphi] at hh + exact hh.symm + +omit [IsManifold planeModel ∞ M] in +lemma centeredPhase_first (q : M) (ell : Base) (L : ℝ) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ∀ x, (baseEquiv (e x)).1 = + centeredConvexPhase ell L (coordinateChart q q) (baseEquiv x)) (p : M) : + (surfacePhaseChart q e p).1 = centeredAtlasPhase q ell L p := by + rw [surfacePhaseChart_apply,he] + rfl + + theorem generic_phase_crossing_first_nonzero (q q₁ q₂ : M) + (e₁ e₂ : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he₁ : ContDiff ℝ ∞ e₁) (hi₁ : ContDiff ℝ ∞ e₁.symm) + (he₂ : ContDiff ℝ ∞ e₂) + (phi₁ phi₂ : M → ℝ) + (hphi₁ : ∀ p, (surfacePhaseChart q₁ e₁ p).1 = phi₁ p) + (hphi₂ : ∀ p, (surfacePhaseChart q₂ e₂ p).1 = phi₂ p) + {p : M} (hq : p ∈ (coordinateChart q).source) + (h₁ : p ∈ (surfacePhaseChart q₁ e₁).source) + (h₂ : p ∈ (surfacePhaseChart q₂ e₂).source) + (hcross : covectorDet + (phaseDerivative (phi₁ ∘ (coordinateChart q).symm) (coordinateChart q p)) + (phaseDerivative (phi₂ ∘ (coordinateChart q).symm) (coordinateChart q p)) ≠ 0) : + (fderiv ℝ (surfacePhaseTransition q₁ e₁ q₂ e₂) (surfacePhaseChart q₁ e₁ p) dy).1 ≠ 0 := by + apply phase_crossing_first_nonzero q q₁ q₂ + (OpenPartialHomeomorph.refl JetPolynomial.Base) e₁ e₂ + contDiff_id contDiff_id he₁ hi₁ he₂ + (by rwa [surfacePhaseChart_refl_source]) h₁ h₂ + rw [surfacePhaseChart_refl_apply, + phaseTransition_refl_covector q q₁ e₁ he₁ phi₁ hphi₁ hq h₁, + phaseTransition_refl_covector q q₂ e₂ he₂ phi₂ hphi₂ hq h₂] + exact hcross + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricCircularNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricCircularNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bf495f79aa24828cb45810d66dc1cd88e62b464 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricCircularNormal.lean @@ -0,0 +1,185 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreservingCircularNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance geometricCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance geometricCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance geometricCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance geometricCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance geometricCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance geometricCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem geometric_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, data.A.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := data.A.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := data.A.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + (∃ U₀ : Set SmallModes.Base, IsOpen U₀ ∧ baseEquiv '' C ⊆ U₀ ∧ + ∃ ν : SmallModes.Base → NormalFrame.Vec, ContDiffOn ℝ ∞ ν U₀ ∧ + (∀ p ∈ U₀, ν p ⬝ᵥ ν p = 1) ∧ + (∀ p ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (data.A.phaseRealChartMap i e.symm W) p ⬝ᵥ ν p = 0) ∧ + (∀ p ∈ U₀, p ∉ V → ν p = + profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z p)) ∧ + (∀ j p, p ∈ Curves j → ν p ≠ -normalize + (realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j p,c j p) (b j p,c j p) p)) ∧ + ∀ j, + let H := data.A.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ ν (x j) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ ν (x j)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + have hs : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (data.A.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x)*(b j x)^2 := by + intro j x hx hz + have hcx := hCurveC j x hx + have hd := RealModes.gramDet_ne_zero_of_injective _ (hI x (hTU (hCurvesT j hx))) + rw [← data.A.phase_primitive_boundary_crossing i e he hi hFiso h hχ ha htarget + (hCS hcx).2 (hactiveC _ hcx) hz (Filter.Eventually.of_forall ha0) hd + (hboundary x (hCurvesT j hx) hz).1 (b j x) (c j x)] + exact hold j x hx hz + exact data.preserving_circular_primitive_normal hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess (fun p _ => ha0 p) hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hs left right x hxinj hxE + hV hxV honly hfirst hslopes + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricControlledVelocity.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricControlledVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a283a5cab58273b3b749e6fc61e7455275b8612 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricControlledVelocity.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CalibratedControlledAngle +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData + +namespace OAI + +/-! Construct the actual four-dimensional velocity with exact mean and +metric, from its smooth geometric frame. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes TransverseSmallFunction + +lemma scaled_coordinates_reconstruct {e₁ e₂ v : Vec} {R : ℝ} (hR : R ≠ 0) + (hr : planeLift e₁ e₂ (planeCoordinates e₁ e₂ v) = v) : + R • planeLift e₁ e₂ ![(v ⬝ᵥ e₁) / R, (v ⬝ᵥ e₂) / R] = v := by + calc + _ = planeLift e₁ e₂ (planeCoordinates e₁ e₂ v) := by + ext i + simp only [planeLift_apply, planeCoordinates, Matrix.cons_val_zero, Matrix.cons_val_one, + Pi.smul_apply, Pi.add_apply, smul_eq_mul] + field_simp + _ = v := hr + +theorem geometric_controlled_velocity {C₀ K L U Ω P : Set Base} + (hC₀ : IsCompact C₀) (hK : IsCompact K) (hL : IsCompact L) + (hCL : C₀ ⊆ L) (hKL : K ⊆ L) (hKU : Disjoint K (closure U)) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C₀ ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {X Y C v e₁ e₂ : Base → Vec} {a : Base → ℝ} + (hv : ContDiffOn ℝ ∞ v Ω) (he₁ : ContDiffOn ℝ ∞ e₁ Ω) + (he₂ : ContDiffOn ℝ ∞ e₂ Ω) (ha : ContDiffOn ℝ ∞ a Ω) + (hD : ∀ x ∈ Ω, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ Ω, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hvproj : ∀ x ∈ Ω, v x = realNormalPart (Y x) (C x) (X x)) + (hcollar : ∀ x ∈ U, v x ≠ 0 ∧ e₁ x = normalize (v x)) + (hn : ∀ x ∈ Ω, v x ≠ 0 ∨ a x ≠ 0) + (hap : ∀ x ∈ L \ C₀, 0 < a x) (T : ℝ) : + ∃ Z : Set Base, IsOpen Z ∧ L ⊆ Z ∧ Z ⊆ Ω ∧ + ∃ α : Base × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ x ∈ Z, Function.Periodic (fun t => α (x, t)) 1) ∧ + ∃ V : Base × ℝ → Vec, ContDiffOn ℝ ∞ V (Z ×ˢ univ) ∧ + (∀ z, V z = velocityRadius (v z.1) (a z.1) • direction (e₁ z.1) (e₂ z.1) (α z)) ∧ + (∀ x ∈ Z, (∫ t in 0..1, V (x, t)) = v x) ∧ + (∀ x ∈ Z, ∀ t, V (x, t) ⬝ᵥ V (x, t) = v x ⬝ᵥ v x + a x ^ 2) ∧ + (∀ x ∈ Z, ∀ t, + (X x - v x + V (x, t)) ⬝ᵥ (X x - v x + V (x, t)) = X x ⬝ᵥ X x + a x ^ 2 ∧ + (X x - v x + V (x, t)) ⬝ᵥ Y x = X x ⬝ᵥ Y x) ∧ + (∃ W : Set Base, IsOpen W ∧ C₀ ⊆ W ∧ W ⊆ U ∧ + ∀ x ∈ W, a x = 0 → ∀ t, V (x, t) = v x) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (x, t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, T < fderiv ℝ (fun y => α (y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => α (y, τ x)) x (0, 1) := by + let R := fun x => velocityRadius (v x) (a x) + let u := fun x => v x ⬝ᵥ e₁ x + let w := fun x => v x ⬝ᵥ e₂ x + have hR := velocityRadius_smoothOn hv ha hn + have hRp : ∀ x ∈ Ω, 0 < R x := fun x hx => velocityRadius_pos (hn x hx) + have hvperp (x : Base) (hx : x ∈ Ω) : Y x ⬝ᵥ v x = 0 ∧ C x ⬝ᵥ v x = 0 := by + rw [hvproj x hx] + exact realNormalPart_perp (Y x) (C x) (X x) (hD x hx) + have hreconstruct (x : Base) (hx : x ∈ Ω) : + planeLift (e₁ x) (e₂ x) (planeCoordinates (e₁ x) (e₂ x) (v x)) = v x := by + obtain ⟨h1, h2, h12, hy1, hc1, hy2, hc2⟩ := hframe x hx + exact plane_coordinates_reconstruct (hD x hx) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp x hx).1 (hvperp x hx).2 + have hquad (x : Base) (hx : x ∈ Ω) : R x ^ 2 = u x ^ 2 + w x ^ 2 + a x ^ 2 := by + obtain ⟨h1, h2, h12, hy1, hc1, hy2, hc2⟩ := hframe x hx + have hlen := plane_coordinates_length (hD x hx) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp x hx).1 (hvperp x hx).2 + change velocityRadius (v x) (a x) ^ 2 = _ + rw [velocityRadius_sq, ← hlen] + have huc (x : Base) (hx : x ∈ U) : 0 < u x ∧ w x = 0 := by + exact collar_coordinates (hcollar x hx).1 (hcollar x hx).2 (hframe x (hUΩ hx)).2.2.1 + obtain ⟨Z, hZ, hLZ, hZΩ, α, hα, hper, hmean, ⟨W, hW, hCW, hWU, hzero⟩, τ, ht, hlarge⟩ := + CollarVelocity.calibrated_controlled_angle hC₀ hK hL hCL hKL hKU hU hΩ hCU hUΩ hLΩ + hP hPK hlocal hR (dot_smoothOn hv he₁) (dot_smoothOn hv he₂) ha hRp hquad + (fun x hx => (huc x hx).1) (fun x hx => (huc x hx).2) hap T + let V : Base × ℝ → Vec := fun z => R z.1 • direction (e₁ z.1) (e₂ z.1) (α z) + have hVs : ContDiffOn ℝ ∞ V (Z ×ˢ univ) := + ((hR.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)).smul + ((hα.cos.smul ((he₁.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1))).add + (hα.sin.smul ((he₂.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)))) + have hVl (x : Base) (hx : x ∈ Z) (t : ℝ) : + V (x, t) ⬝ᵥ V (x, t) = v x ⬝ᵥ v x + a x ^ 2 := by + obtain ⟨h1, h2, h12, _, _, _, _⟩ := hframe x (hZΩ hx) + exact (planeLift_scaled_length (p := ![Real.cos (α (x, t)), Real.sin (α (x, t))]) + h1 h2 h12 (Real.cos_sq_add_sin_sq (α (x, t))) (R x)).trans + (velocityRadius_sq (v x) (a x)) + refine ⟨Z, hZ, hLZ, hZΩ, α, hα, hper, V, hVs, (fun _ => rfl), ?_, hVl, ?_, + ⟨W, hW, hCW, hWU, ?_⟩, τ, ht, hlarge⟩ + · intro x hx + have hcont := (LocalPeriodicCalculus.smooth_slice hZ hα hx).continuous + have hp : Continuous (fun t => ![Real.cos (α (x, t)), Real.sin (α (x, t))]) := by + apply continuous_pi + intro i + fin_cases i + · exact Real.continuous_cos.comp hcont + · exact Real.continuous_sin.comp hcont + exact (planeLift_mean (e₁ x) (e₂ x) (R x) hp (hmean x hx)).trans + (scaled_coordinates_reconstruct (hRp x (hZΩ hx)).ne' (hreconstruct x (hZΩ hx))) + · intro x hx t + have hf := hframe x (hZΩ hx) + have hpY : Y x ⬝ᵥ V (x, t) = 0 := by + dsimp [V] + rw [dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, hf.2.2.2.1, hf.2.2.2.2.2.1] + have hpC : C x ⬝ᵥ V (x, t) = 0 := by + dsimp [V] + rw [dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, hf.2.2.2.2.1, hf.2.2.2.2.2.2] + have hq := real_leading_metric (hD x (hZΩ hx)) hpY hpC (by rw [← hvproj x (hZΩ hx)]; exact hVl x hx t) + simpa only [leadingTangent, ← hvproj x (hZΩ hx)] using hq + · intro x hx haz t + change R x • direction (e₁ x) (e₂ x) (α (x, t)) = v x + rw [hzero x hx haz t] + simp only [direction, Real.cos_zero, Real.sin_zero, one_smul, zero_smul, add_zero] + change velocityRadius (v x) (a x) • e₁ x = v x + rw [haz, (hcollar x (hWU hx)).2] + simpa only [velocityRadius, zero_pow (by decide : 2 ≠ 0), add_zero] using + norm_smul_normalize (hcollar x (hWU hx)).1 + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricJetVelocity.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricJetVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..57546075554ed29985432a506bcdc0d25319a28f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GeometricJetVelocity.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CalibratedJetAngle +import OAI.Geometry.SurfaceImmersion.Primitive.GeometricControlledVelocity + +namespace OAI + +/-! A controlled four-dimensional velocity, smooth jointly in position, +second jet and periodic angle. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes TransverseSmallFunction + +theorem geometric_jet_velocity {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K O P : Set Base} {C₀ L U Ω : Set CollarVelocity.JetBase} + (hC₀ : IsCompact C₀) (hK : IsCompact K) (hL : IsCompact L) + (hCL : C₀ ⊆ L) (hKL : MapsTo (CollarVelocity.jetSection F) K L) + (hO : IsOpen O) (hKO : K ⊆ O) (hOU : ∀ j ∈ U, j.1 ∉ O) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C₀ ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {X Y C v e₁ e₂ : CollarVelocity.JetBase → Vec} {a : CollarVelocity.JetBase → ℝ} + (hv : ContDiffOn ℝ ∞ v Ω) (he₁ : ContDiffOn ℝ ∞ e₁ Ω) + (he₂ : ContDiffOn ℝ ∞ e₂ Ω) (ha : ContDiffOn ℝ ∞ a Ω) + (hD : ∀ x ∈ Ω, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ Ω, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hvproj : ∀ x ∈ Ω, v x = realNormalPart (Y x) (C x) (X x)) + (hcollar : ∀ x ∈ U, v x ≠ 0 ∧ e₁ x = normalize (v x)) + (hn : ∀ x ∈ Ω, v x ≠ 0 ∨ a x ≠ 0) + (hap : ∀ x ∈ L \ C₀, 0 < a x) (T : ℝ) : + ∃ Z : Set CollarVelocity.JetBase, IsOpen Z ∧ L ⊆ Z ∧ Z ⊆ Ω ∧ + ∃ α : CollarVelocity.JetBase × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ x ∈ Z, Function.Periodic (fun t => α (x, t)) 1) ∧ + ∃ V : CollarVelocity.JetBase × ℝ → Vec, ContDiffOn ℝ ∞ V (Z ×ˢ univ) ∧ + (∀ z, V z = velocityRadius (v z.1) (a z.1) • direction (e₁ z.1) (e₂ z.1) (α z)) ∧ + (∀ x ∈ Z, (∫ t in 0..1, V (x, t)) = v x) ∧ + (∀ x ∈ Z, ∀ t, V (x, t) ⬝ᵥ V (x, t) = v x ⬝ᵥ v x + a x ^ 2) ∧ + (∀ x ∈ Z, ∀ t, + (X x - v x + V (x, t)) ⬝ᵥ (X x - v x + V (x, t)) = X x ⬝ᵥ X x + a x ^ 2 ∧ + (X x - v x + V (x, t)) ⬝ᵥ Y x = X x ⬝ᵥ Y x) ∧ + (∃ W : Set CollarVelocity.JetBase, IsOpen W ∧ C₀ ⊆ W ∧ W ⊆ U ∧ + ∀ x ∈ W, a x = 0 → ∀ t, V (x, t) = v x) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x, t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y, τ x)) x (0, 1) := by + let R := fun x => velocityRadius (v x) (a x) + let u := fun x => v x ⬝ᵥ e₁ x + let w := fun x => v x ⬝ᵥ e₂ x + have hR := velocityRadius_smoothOn hv ha hn + have hRp : ∀ x ∈ Ω, 0 < R x := fun x hx => velocityRadius_pos (hn x hx) + have hvperp (x : CollarVelocity.JetBase) (hx : x ∈ Ω) : Y x ⬝ᵥ v x = 0 ∧ C x ⬝ᵥ v x = 0 := by + rw [hvproj x hx] + exact realNormalPart_perp (Y x) (C x) (X x) (hD x hx) + have hreconstruct (x : CollarVelocity.JetBase) (hx : x ∈ Ω) : + planeLift (e₁ x) (e₂ x) (planeCoordinates (e₁ x) (e₂ x) (v x)) = v x := by + obtain ⟨h1, h2, h12, hy1, hc1, hy2, hc2⟩ := hframe x hx + exact plane_coordinates_reconstruct (hD x hx) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp x hx).1 (hvperp x hx).2 + have hquad (x : CollarVelocity.JetBase) (hx : x ∈ Ω) : R x ^ 2 = u x ^ 2 + w x ^ 2 + a x ^ 2 := by + obtain ⟨h1, h2, h12, hy1, hc1, hy2, hc2⟩ := hframe x hx + have hlen := plane_coordinates_length (hD x hx) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp x hx).1 (hvperp x hx).2 + change velocityRadius (v x) (a x) ^ 2 = _ + rw [velocityRadius_sq, ← hlen] + have huc (x : CollarVelocity.JetBase) (hx : x ∈ U) : 0 < u x ∧ w x = 0 := by + exact collar_coordinates (hcollar x hx).1 (hcollar x hx).2 (hframe x (hUΩ hx)).2.2.1 + obtain ⟨Z, hZ, hLZ, hZΩ, α, hα, hper, hmean, ⟨W, hW, hCW, hWU, hzero⟩, τ, ht, hlarge⟩ := + CollarVelocity.calibrated_jet_angle hF hK hC₀ hL hCL hKL hO hKO hOU hU hΩ hCU hUΩ hLΩ + hP hPK hlocal hR (dot_smoothOn hv he₁) (dot_smoothOn hv he₂) ha hRp hquad + (fun x hx => (huc x hx).1) (fun x hx => (huc x hx).2) hap T + let V : CollarVelocity.JetBase × ℝ → Vec := fun z => R z.1 • direction (e₁ z.1) (e₂ z.1) (α z) + have hVs : ContDiffOn ℝ ∞ V (Z ×ˢ univ) := + ((hR.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)).smul + ((hα.cos.smul ((he₁.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1))).add + (hα.sin.smul ((he₂.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)))) + have hVl (x : CollarVelocity.JetBase) (hx : x ∈ Z) (t : ℝ) : + V (x, t) ⬝ᵥ V (x, t) = v x ⬝ᵥ v x + a x ^ 2 := by + obtain ⟨h1, h2, h12, _, _, _, _⟩ := hframe x (hZΩ hx) + exact (planeLift_scaled_length (p := ![Real.cos (α (x, t)), Real.sin (α (x, t))]) + h1 h2 h12 (Real.cos_sq_add_sin_sq (α (x, t))) (R x)).trans + (velocityRadius_sq (v x) (a x)) + refine ⟨Z, hZ, hLZ, hZΩ, α, hα, hper, V, hVs, (fun _ => rfl), ?_, hVl, ?_, + ⟨W, hW, hCW, hWU, ?_⟩, τ, ht, hlarge⟩ + · intro x hx + have hcont := (LocalPeriodicCalculus.smooth_slice hZ hα hx).continuous + have hp : Continuous (fun t => ![Real.cos (α (x, t)), Real.sin (α (x, t))]) := by + apply continuous_pi + intro i + fin_cases i + · exact Real.continuous_cos.comp hcont + · exact Real.continuous_sin.comp hcont + exact (planeLift_mean (e₁ x) (e₂ x) (R x) hp (hmean x hx)).trans + (scaled_coordinates_reconstruct (hRp x (hZΩ hx)).ne' (hreconstruct x (hZΩ hx))) + · intro x hx t + have hf := hframe x (hZΩ hx) + have hpY : Y x ⬝ᵥ V (x, t) = 0 := by + dsimp [V] + rw [dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, hf.2.2.2.1, hf.2.2.2.2.2.1] + have hpC : C x ⬝ᵥ V (x, t) = 0 := by + dsimp [V] + rw [dotProduct_smul] + simp [direction, dotProduct_add, dotProduct_smul, hf.2.2.2.2.1, hf.2.2.2.2.2.2] + have hq := real_leading_metric (hD x (hZΩ hx)) hpY hpC (by rw [← hvproj x (hZΩ hx)]; exact hVl x hx t) + simpa only [leadingTangent, ← hvproj x (hZΩ hx)] using hq + · intro x hx haz t + change R x • direction (e₁ x) (e₂ x) (α (x, t)) = v x + rw [hzero x hx haz t] + simp only [direction, Real.cos_zero, Real.sin_zero, one_smul, zero_smul, add_zero] + change velocityRadius (v x) (a x) • e₁ x = v x + rw [haz, (hcollar x (hWU hx)).2] + simpa only [velocityRadius, zero_pow (by decide : 2 ≠ 0), add_zero] using + norm_smul_normalize (hcollar x (hWU hx)).1 + + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GlobalCircularNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GlobalCircularNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..2cbcdc379a84fca91d03b3ba3baffc5398f211bb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GlobalCircularNormal.lean @@ -0,0 +1,223 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.GeometricCircularNormal +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricNormalExtension +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance globalCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance globalCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem global_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, data.A.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := data.A.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) (B : SmoothingAtlas M) (curves : ι → PhaseBoundaryCurve B) + (n₀ : PreferredNormal F) + (hglobal : ∀ j p, p ∈ (curves j).carrier → (curves j).second F p ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize ((curves j).second F p)) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, data.A.weight i p ≠ 0) + (E₀ : Set M) (hE₀ : E₀.Finite) (hE₀f : Disjoint E₀ (frontier D)) + (hsupport : data.A.phaseSurfaceSupport i e K = closure D) + (hDC : ∀ p ∈ closure D, e (chart (i : M) p) ∈ C) + (hcurveChart : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + baseEquiv (e (chart (i : M) p)) ∈ Curves j) + (hvector : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) = + fderiv ℝ (surfacePhaseTransition ((curves j).index : M) (curves j).phase (i : M) e) + ((curves j).coordinate p) SmallModes.dy) + (hworldBoundary : ∀ p ∈ frontier D, + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) + SmallModes.dy SmallModes.dy (baseEquiv (e (chart (i : M) p))))) + (haFrontier : ∀ p ∈ frontier D, a (baseEquiv (e (chart (i : M) p))) = 0) + (hpositive : ∀ j p, p ∈ (curves j).carrier → p ∈ frontier D → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) + (hVfrontier : ∀ p ∈ frontier D, baseEquiv (e (chart (i : M) p)) ∉ V) + (hσD : ∀ j, (surfacePhaseChart (i : M) e).symm (x j) ∈ E₀ ∩ D) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + (∀ j p, p ∈ (curves j).carrier → (curves j).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves j).second W p)) ∧ + (∀ p ∈ E₀, p ∉ D → N.vector p = data.A.unitProjectedNormalField W n₀.vector p) ∧ + (∀ j, + let H := data.A.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + let p := (surfacePhaseChart (i : M) e).symm (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ spaceCoordinates (N.vector p) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ spaceCoordinates (N.vector p)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + classical + have : Fintype ι := Fintype.ofFinite ι + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + obtain ⟨ρ,hρ,hextend⟩ := data.A.geometric_normal_extension B hFiso n₀ data.outer_locally_one + curves hglobal i e he hi hD hDr hDs hDe hDw E₀ hE₀ hE₀f + (fun j p => (b j p,c j p)) (fun j => (hb j).continuous.prodMk (hc j).continuous) + hvector hworldBoundary hpositive (fun j p hp hpf => + hold j _ (hcurveChart j p hp (frontier_subset_closure hpf)) (haFrontier p hpf)) + intro ε hε ζ hζ + let ε₀ := min ε (ρ/4) + let ζ₀ := min ζ (ρ/4) + have hε₀ : 0 < ε₀ := lt_min hε (by positivity) + have hζ₀ : 0 < ζ₀ := lt_min hζ (by positivity) + obtain ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,hlocal,hrest⟩ := + data.geometric_circular_primitive_normal hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess ha0 hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hold left right x hxinj hxE + hV hxV honly hfirst hslopes ε₀ hε₀ ζ₀ hζ₀ + obtain ⟨U₀,hU₀,hCU₀,ν,hν,hunit,hnormal,hcanonical,hνavoid,hνcross⟩ := hlocal + obtain ⟨G,hG,hGF,V₀,hV₀,hWV,hVouter,hVsupport⟩ := hrest + have hsmall : ε₀+z^8 < ρ := by + have hz8 : z^8 ≤ z := calc + z^8 = z*z^7 := by ring + _ ≤ z*1 := mul_le_mul_of_nonneg_left (pow_le_one₀ hz.le hz1) hz.le + _ = z := mul_one _ + have heps : ε₀ ≤ ρ/4 := min_le_right _ _ + have hzz : z < ρ/4 := hzζ.trans_le (min_le_right _ _) + linarith + have hGF₂ : data.A.WeightedBound 1 2 ε₀ (G-F) := fun j => (hGF j).mono_order (by decide) + obtain ⟨N,hNav,hNmatch⟩ := hextend G V₀ W hG hV₀ h hW ε₀ (z^8) hε₀.le + (pow_nonneg hz.le _) hsmall hGF₂ hWV + (fun p hp => hVsupport p (by rwa [hsupport])) z U₀ hU₀ ν hν hunit hnormal + (fun p hp => hCU₀ ⟨e (chart (i : M) p),hDC p hp,rfl⟩) + (fun p hp => hcanonical _ (hCU₀ ⟨e (chart (i : M) p),hDC p (frontier_subset_closure hp),rfl⟩) + (hVfrontier p hp)) + (fun j p hp hpD => ⟨(havoid j _ (hcurveChart j p hp (subset_closure hpD))).1, + hνavoid j _ (hcurveChart j p hp (subset_closure hpD))⟩) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hdata,N,hNav, + (fun p hp hpD => (hNmatch p hp).2 hpD),?_,G,hG,?_,V₀,hV₀,hWV,hVouter,hVsupport⟩ + · intro j + have hxT : x j ∈ (surfacePhaseChart (i : M) e).target := by + constructor + · change baseEquiv.symm (x j) ∈ e.target + exact (hCS (hEC _ (hxE j))).2 + · change e.symm (baseEquiv.symm (x j)) ∈ (chart (i : M)).target + have ha := hactiveC _ (hEC _ (hxE j)) + by_contra hh + simp only [SmoothingAtlas.chartWeight,indicator_of_notMem hh] at ha + exact ha rfl + have heq : spaceCoordinates (N.vector ((surfacePhaseChart (i : M) e).symm (x j))) = ν (x j) := by + rw [(hNmatch _ (hσD j).1).1 (hσD j).2,data.A.phaseNormalLift_coordinates] + exact congrArg ν ((surfacePhaseChart (i : M) e).right_inv hxT) + dsimp only + rw [heq] + exact hνcross j + · exact fun j => (hGF j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/GridIncrementProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GridIncrementProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fd15b96e453ab149c2a1ee127f8c75c913dbe7f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/GridIncrementProfile.lean @@ -0,0 +1,196 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GridFreeCorrection +import OAI.Geometry.SurfaceImmersion.Correction.GridGlobalQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Correction.GridFreeSupport +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAtlasFreeProfile +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds +import OAI.Geometry.SurfaceImmersion.Atlas.CatalogPhaseBounds +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteAtlasIncrement + +namespace OAI + +/-! Quadratic correction for the actual free grid amplitudes. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance gridIncrementProfileFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridIncrementProfileFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridIncrementProfileDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridIncrementProfileDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridIncrementProfileSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridIncrementProfileSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +open PhaseGeometry PhaseGrid + +local instance {s : A.centers → Finset Index} : DecidableEq (A.GridPhaseIndex s) := Classical.decEq _ + + +theorem grid_free_forced_increment (V : Finset SmallModes.Base) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {ε κ b D₀ : ℝ} (hε : 0 < ε) (hκ : 0 < κ) (hb : 0 < b) + (FJ C J N B : ℕ → ℝ → ℝ) + (hFJ : ∀ m, RealModes.HasPolynomialBound (FJ m)) + (hFJ1 : ∀ m x, 1 ≤ x → 1 ≤ FJ m x) + (hC : ∀ m, RealModes.HasPolynomialBound (C m)) + (hJ : ∀ m, RealModes.HasPolynomialBound (J m)) + (hN : ∀ m, RealModes.HasPolynomialBound (N m)) + (hB : ∀ m, RealModes.HasPolynomialBound (B m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q : ℕ) : + ∃ α β γ ζ : ℕ → ℝ → ℝ, ∃ D : ℕ → ℝ, + (∀ m, RealModes.HasPolynomialBound (α m)) ∧ + (∀ m, RealModes.HasPolynomialBound (β m)) ∧ + (∀ m, RealModes.HasPolynomialBound (γ m)) ∧ + (∀ m, RealModes.HasPolynomialBound (ζ m)) ∧ (∀ m, 0 ≤ D m) ∧ + ∀ (h : ℝ) (a : A.centers → Finset Index) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ), + (∀ l, 1 ≤ w l) → + (∀ l : A.GridPhaseIndex a, w (A.gridPhaseLabel l) • ξ (A.gridPhaseLabel l) ∈ V) → + ∀ n : ℕ, Fintype.card (A.GridPhaseIndex a) ≤ n → ∀ x : ℝ, 1 ≤ x → + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F), + (∀ l p, atlasActive (fun i : A.centers => (i : M)) A.weight a h l p → + atlasGram F (l.1 : M) p ≠ 0 ∧ atlasSecondTensor F (l.1 : M) p ≠ 0 ∧ + ε*‖atlasSecondTensor F (l.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor F (l.1 : M) p) (-(ξ l).2,(ξ l).1)‖) → + AtlasPairMargins (fun i : A.centers => (i : M)) A.weight a h κ ξ w F → + (∀ k y, y ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) y)) → + (∀ k y, y ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base) → + b ≤ ‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y‖) → + (∀ k y, y ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base) → + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead k F) y) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead k F) y))⁻¹‖ ≤ D₀) → + ∀ {φ : ∀ i, ((a i) × Fin 3) → JetPolynomial.Base → ℝ} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) (φ i j) + (A.cellChartCompact i (a i) h j.1.val) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)), + (∀ i j, φ i j = phaseLinear (w (i,j.1.val,j.2) • ξ (i,j.1.val,j.2)) ∘ + planeCoordinateIsometry) → + (∀ i j, (c i j).C = (fun m => C m x) ∧ (c i j).J = (fun m => J m x) ∧ + ∀ m, (c i j).D m = 0) → + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, ρ⁻¹ ≤ B m x) → + (∀ i j m, (d i j).budgets.inv m ≤ B m x ∧ (d i j).budgets.forms m ≤ B m x ∧ + (d i j).budgets.psi m ≤ B m x ∧ (d i j).budgets.normal m ≤ N m x) → + (∀ k m j, j ≤ m+3 → WeightedEstimates.WeightedBound univ 1 j + (FJ m x/(s : ℝ)^(j-2)) (spaceCoordinates ∘ A.vectorPlaneRead k F)) → + ∀ δ : ℝ, 0 < δ → δ ≤ τ → ∀ u : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (u y)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ i m, WeightedEstimates.WeightedBound univ s m (B m x) (A.tensorPlaneRead i u)) → + ∀ H : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (H y)) → + ∀ Rm : ℕ → ℝ, + (∀ m, A.TensorWeightedBound τ m (Rm m) + (A.finiteAtlasFreeMean d hρ δ q u-δ^2 • H)) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m + ((α m x*(n : ℝ)+β m x*((n : ℝ)+2*(n : ℝ)^2))*(δ*τ)) U) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1)*(ζ m x*(n : ℝ)*(δ*τ)+γ m x*((n : ℝ)+2*(n : ℝ)^2)*δ^2)+Rm m+ + D m*(2*(α (m+1) x*(n : ℝ))*(β (m+1) x*((n : ℝ)+2*(n : ℝ)^2))+ + (β (m+1) x*((n : ℝ)+2*(n : ℝ)^2))^2)*(δ^3/τ)) + (inducedTensor (F+U)-inducedTensor F-δ^2 • H)) := by + classical + obtain ⟨Af,Rf,hAf,hRf,hfree⟩ := A.polynomial_atlas_free_profile q C J N B hC hJ hN hB hC1 hB1 + obtain ⟨e,E,hE,hquad⟩ := A.grid_free_quadratic_correction V houter hε hκ hb + FJ C J N B hFJ hFJ1 hC hJ hN hB hC1 hB1 q + choose D hD hinc using A.finite_atlas_increment_bound + let L := ‖spaceCoordinates.symm.toContinuousLinearMap‖ + let α := fun m x => L*Af m x + let γ := fun m x => E m*x^(e m) + let β := fun m x => L*γ m x + have hL : 0 ≤ L := norm_nonneg _ + have hα (m : ℕ) : RealModes.HasPolynomialBound (α m) := + (RealModes.polynomialBound_const hL).mul (hAf m) + have hγ (m : ℕ) : RealModes.HasPolynomialBound (γ m) := + (RealModes.polynomialBound_const (zero_le_one.trans (hE m))).mul + (RealModes.polynomialBound_id.pow (e m)) + have hβ (m : ℕ) : RealModes.HasPolynomialBound (β m) := + (RealModes.polynomialBound_const hL).mul (hγ m) + refine ⟨α,β,γ,Rf,D,hα,hβ,hγ,hRf,hD,?_⟩ + intro h a ξ w hw hV n hn x hx F hF hlocal hpairs hImm hnormal hgram + φ τ s c r ρ R reference d hφ hc hρ hτ hs hτs hs1 hρB hbud hFjets δ hδ hδτ u hu hball hbu + H hH Rm hRm + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hK (i : A.centers) (j : (a i) × Fin 3) : + (modeSupport (A.cellChartCompact i (a i) h j.1.val) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + Set.image_mono (A.cellChartCompact_subset i (a i) h j.1.val) + have hcard (i : A.centers) : Fintype.card ((a i) × Fin 3) ≤ n := + (Fintype.card_le_of_injective (fun j : (a i) × Fin 3 => (⟨i,j⟩ : A.GridPhaseIndex a)) + (by intro j k he; exact eq_of_heq (Sigma.mk.inj he).2)).trans hn + have hfr := hfree x hx n hcard F hF d hc hρ hτ hs hτs hs1 hK hρB hbud + δ hδ.le u hu hball hbu + obtain ⟨W,hW,hWb,hWe⟩ := hquad h a ξ w hw hV n hn x hx F hF hlocal hpairs + hImm hnormal hgram d hφ hc hρ hτ hs hτs hs1 hρB hbud hFjets δ hδ.le u hu hball hbu + let U₀ := spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u + let V₀ := spaceCoordinates.symm ∘ W + have hU₀ : ContMDiff planeModel spaceModel ∞ U₀ := + spaceCoordinates.symm.contDiff.contMDiff.comp (A.finiteAtlasFreeOscillation_smooth d hρ δ q u) + have hV₀ : ContMDiff planeModel spaceModel ∞ V₀ := + spaceCoordinates.symm.contDiff.contMDiff.comp hW + have hUb (m : ℕ) : A.WeightedBound τ m (α m x*(n : ℝ)*(δ*τ)) U₀ := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap + (A.finiteAtlasFreeOscillation_smooth d hρ δ q u) hτ.le (hfr m).1 + convert hh using 1 + · dsimp [α,L] + ring + · rfl + have hVb (m : ℕ) : A.WeightedBound τ m + (β m x*((n : ℝ)+2*(n : ℝ)^2)*δ^2) V₀ := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hW hτ.le (hWb m) + convert hh using 1 + · dsimp [β,γ,L] + ring + · rfl + have hα0 (m : ℕ) : 0 ≤ α m x := by + obtain ⟨_,_,_,hh⟩ := hα m + exact (hh x hx).1 + have hβ0 (m : ℕ) : 0 ≤ β m x := by + obtain ⟨_,_,_,hh⟩ := hβ m + exact (hh x hx).1 + refine ⟨U₀+V₀,hU₀.add hV₀,?_,?_⟩ + · intro m + have hδsq : δ^2 ≤ δ*τ := by nlinarith + have hVb' : A.WeightedBound τ m + (β m x*((n : ℝ)+2*(n : ℝ)^2)*(δ*τ)) V₀ := + fun i => (hVb m i).mono_const (mul_le_mul_of_nonneg_left hδsq (mul_nonneg (hβ0 m) (by positivity))) + have hh := A.weightedBound_add hU₀ hV₀ hτ.le (hUb m) hVb' + convert hh using 1 + ring + · intro m + have hh := hinc m d hρ δ q u hK F V₀ hF hV₀ H hH hτ hτ1 hδ hδτ + (α (m+1) x*(n : ℝ)) (β (m+1) x*((n : ℝ)+2*(n : ℝ)^2)) + ((τ/s)^(q+1)*(Rf m x*(n : ℝ)*(δ*τ))) + ((τ/s)^(q+1)*(γ m x*((n : ℝ)+2*(n : ℝ)^2)*δ^2)) (Rm m) + (mul_nonneg (hα0 _) (Nat.cast_nonneg _)) (mul_nonneg (hβ0 _) (by positivity)) + (hUb (m+1)) (hVb (m+1)) (hfr m).2 + (by convert hWe m using 1; dsimp [γ]; ring) (hRm m) + convert hh using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/HigherLongitudinalProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/HigherLongitudinalProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb4cd1030fc943c74a6a84ebb40cf6b51e27d03a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/HigherLongitudinalProfiles.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCoefficientProfiles + +namespace OAI + +/-! The two remaining leading second derivative profiles, with constants +depending only on the displayed finite coefficient bounds. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PeriodicExpansion +open CovarianceCorrector +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem mixed_profile_of_coefficients {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (n : ℕ) {dx dy : A} + (hx : ℓ dx = 1) (hy : ℓ dy = 0) {z C : ℝ} {p : A} + (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hU : ∀ i < n+1, ‖(((U i).slow dx).slow dy).fastValue ℓ z p‖ ≤ C) + (hA : ∀ i < n+1, ‖((U i).angle.slow dy).fastValue ℓ z p‖ ≤ C) : + ‖directionalMap (directionalMap (finiteAnsatz F U ℓ (n+1) z) dx) dy p- + (directionalMap (directionalMap F dx) dy p+((U 0).angle.slow dy).fastValue ℓ z p)‖ ≤ + (2*(n+1)*C)*z := by + have he : directionalMap (directionalMap (finiteAnsatz F U ℓ (n+1) z) dx) dy p- + (directionalMap (directionalMap F dx) dy p+((U 0).angle.slow dy).fastValue ℓ z p) = + z • phaseSum (fun i => ((U i).slow dx).slow dy) ℓ (n+1) z p+ + (phaseSum (fun i => (U i).angle.slow dy) ℓ (n+1) z p- + ((U 0).angle.slow dy).fastValue ℓ z p) := by + rw [finiteAnsatz_second_transverse hF U ℓ (n+1) hz.ne' dx hy] + simp only [hx,one_smul] + abel + rw [he] + have hs := phaseSum_bound_of_coefficients (fun i => ((U i).slow dx).slow dy) + ℓ (n+1) hz.le hz1 hC hU + have ha := phaseSum_tail_bound_of_coefficients (fun i => (U i).angle.slow dy) + ℓ n hz.le hz1 hC hA + calc + _ ≤ ‖z • phaseSum (fun i => ((U i).slow dx).slow dy) ℓ (n+1) z p‖+ + ‖phaseSum (fun i => (U i).angle.slow dy) ℓ (n+1) z p- + ((U 0).angle.slow dy).fastValue ℓ z p‖ := norm_add_le _ _ + _ ≤ z*((n+1 : ℕ)*C)+(n*C)*z := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact add_le_add (mul_le_mul_of_nonneg_left hs hz.le) ha + _ ≤ (2*(n+1)*C)*z := by + push_cast + nlinarith [mul_nonneg hC hz.le] + +theorem scaled_longitudinal_profile_of_coefficients {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (n : ℕ) {dx : A} + (hx : ℓ dx = 1) {z C : ℝ} {p : A} (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hFxx : ‖directionalMap (directionalMap F dx) dx p‖ ≤ C) + (hss : ∀ i < n+1, ‖(((U i).slow dx).slow dx).fastValue ℓ z p‖ ≤ C) + (hsa : ∀ i < n+1, ‖((U i).slow dx).angle.fastValue ℓ z p‖ ≤ C) + (has : ∀ i < n+1, ‖((U i).angle.slow dx).fastValue ℓ z p‖ ≤ C) + (haa : ∀ i < n+1, ‖(U i).angle.angle.fastValue ℓ z p‖ ≤ C) : + ‖z • directionalMap (directionalMap (finiteAnsatz F U ℓ (n+1) z) dx) dx p- + (U 0).angle.angle.fastValue ℓ z p‖ ≤ (4*(n+1)*C)*z := by + have hs := phaseSum_bound_of_coefficients (fun i => ((U i).slow dx).slow dx) + ℓ (n+1) hz.le hz1 hC hss + have ha := phaseSum_bound_of_coefficients (fun i => ((U i).slow dx).angle) + ℓ (n+1) hz.le hz1 hC hsa + have hb := phaseSum_bound_of_coefficients (fun i => (U i).angle.slow dx) + ℓ (n+1) hz.le hz1 hC has + have ht := phaseSum_tail_bound_of_coefficients (fun i => (U i).angle.angle) + ℓ n hz.le hz1 hC haa + simp only [Nat.cast_add,Nat.cast_one] at hs ha hb ht + have hscaled : ‖z • phaseSum (fun i => ((U i).slow dx).slow dx) ℓ (n+1) z p‖ ≤ (n+1)*C := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact (mul_le_mul_of_nonneg_left hs hz.le).trans + (mul_le_of_le_one_left (mul_nonneg (show (0 : ℝ) ≤ (n : ℝ)+1 by positivity) hC) hz1) + have hi : ‖directionalMap (directionalMap F dx) dx p+ + z • phaseSum (fun i => ((U i).slow dx).slow dx) ℓ (n+1) z p+ + phaseSum (fun i => ((U i).slow dx).angle) ℓ (n+1) z p+ + phaseSum (fun i => (U i).angle.slow dx) ℓ (n+1) z p‖ ≤ C+3*((n+1)*C) := by + have hh := (norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add hFxx hscaled)) ha)) hb) + convert hh using 1 + ring + have he : z • directionalMap (directionalMap (finiteAnsatz F U ℓ (n+1) z) dx) dx p- + (U 0).angle.angle.fastValue ℓ z p = + z • (directionalMap (directionalMap F dx) dx p+ + z • phaseSum (fun i => ((U i).slow dx).slow dx) ℓ (n+1) z p+ + phaseSum (fun i => ((U i).slow dx).angle) ℓ (n+1) z p+ + phaseSum (fun i => (U i).angle.slow dx) ℓ (n+1) z p)+ + (phaseSum (fun i => (U i).angle.angle) ℓ (n+1) z p- + (U 0).angle.angle.fastValue ℓ z p) := by + rw [finiteAnsatz_second_longitudinal hF U ℓ (n+1) hz.ne' hx] + abel + rw [he] + calc + _ ≤ ‖z • (directionalMap (directionalMap F dx) dx p+ + z • phaseSum (fun i => ((U i).slow dx).slow dx) ℓ (n+1) z p+ + phaseSum (fun i => ((U i).slow dx).angle) ℓ (n+1) z p+ + phaseSum (fun i => (U i).angle.slow dx) ℓ (n+1) z p)‖+ + ‖phaseSum (fun i => (U i).angle.angle) ℓ (n+1) z p- + (U 0).angle.angle.fastValue ℓ z p‖ := norm_add_le _ _ + _ ≤ z*(C+3*((n+1)*C))+(n*C)*z := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact add_le_add (mul_le_mul_of_nonneg_left hi hz.le) ht + _ = (4*(n+1)*C)*z := by ring + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundary.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..c07d93d07d84b993e95bdac8e678c45481bd1f6c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundary.lean @@ -0,0 +1,201 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentCircularCurves +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLeadingRegularity +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_exactCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_exactCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_exactCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_exactCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + {ι : Type*} {Curves : ι → Set SmallModes.Base} {b c k : ι → SmallModes.Base → ℝ} + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x) + (η : ℝ) (hη : 0 < η) + (havoid : ∀ z : ℝ, 0 < z → z < η → ∀ j x, x ∈ Curves j → + ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (A₀.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → + k j x ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) + {E : Set SmallModes.Base} + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hactiveE : ∀ x ∈ E, A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hdetE : ∀ x ∈ E, A₀.phaseMetricRead i e.symm h x 0 * A₀.phaseMetricRead i e.symm h x 2 - + (A₀.phaseMetricRead i e.symm h x 1)^2 ≠ 0) + (B slopeBound : ℝ) + (hcurvE : ∀ x ∈ E, -B ≤ RealModes.coordinateGauss + (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x) + (hcross : ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ E, ∀ t ∈ Icc (0 : ℝ) 1, + ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (A₀.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → ∀ κ : ℝ, + RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p = + κ*NormalFrame.gramDet (SmallModes.coordDeriv SmallModes.dx G p) (SmallModes.coordDeriv SmallModes.dy G p) → + -B ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + 0 < orderedCrossing G (1,r) (1,s) p κ ∧ 0 < orderedCrossing G (1,s) (1,r) p κ ∧ + ((0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p) ∧ + 0 < RealModes.realSecondForm G (1,s) (1,s) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p)) ∨ + (0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ RealModes.realSecondForm G (1,s) (1,s) p ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile G z p) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm G (1,r) (1,r) p ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm G (1,s) (1,s) p ⬝ᵥ w))) + (hregular : ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, + surfaceCircularProfile (A₀.phaseRealChartMap i e.symm F) a e₁ e₂ α (baseEquiv p,t) ∈ + regularBoundaryProfiles) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := A₀.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + let hGO : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S O := fun _ hp => hQO (hFQ hp) + have hreg : ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, + boundaryProfileMap (l.geometricLeadingProfile (A₀.jetChartMap i F ∘ e.symm) + ((A₀.jetChartMap_smooth i hF).comp hi) hGO p (t : Period)) ∈ regularBoundaryProfiles := by + intro p hp t ht + rw [A₀.phase_circular_geometric_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel hGO (hCS hp).1 t] + exact hregular p hp t ht + obtain ⟨δreg,hδreg,hnearreg⟩ := l.compact_leading_regularity + ((A₀.jetChartMap_smooth i hF).comp hi) hGO hC (fun p hp => (hCS hp).1) hreg + let δ := min ε (min η δreg) + have hδ : 0 < δ := lt_min hε (lt_min hη hδreg) + have hδη : δ ≤ η := (min_le_right _ _).trans (min_le_left _ _) + have hδr : δ ≤ δreg := (min_le_right _ _).trans (min_le_right _ _) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.independent_exact_circular_primitive_profiles A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα hvel S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS δ hδ (min ζ η) (lt_min hζ hη) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hgeometry,?_,?_,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro p hp + obtain ⟨t,ht,herror⟩ := hprofiles p hp + have heq := A₀.phase_circular_geometric_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel hGO (hCS hp).1 t + rw [← heq] at herror + exact hnearreg p hp t ht _ (herror.trans_le hδr) + · intro j x hx + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hCurveC j x hx) + rw [baseEquiv.apply_symm_apply] at herror + apply havoid z hz (hzζ.trans_le (min_le_right _ _)) j x hx t ht + (A₀.phaseRealChartMap i e.symm W) (A₀.phaseRealChartMap_smooth i hi hW.1) x + (herror.trans_le hδη) + rw [A₀.phaseGauss_isometry i hi hW (hactive j x hx)] + exact hcurv j x hx + · intro x hx r s hr hs + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hEC x hx) + rw [baseEquiv.apply_symm_apply] at herror + let H := A₀.phaseRealChartMap i e.symm W + have hDH : NormalFrame.gramDet (SmallModes.coordDeriv SmallModes.dx H x) + (SmallModes.coordDeriv SmallModes.dy H x) ≠ 0 := by + rw [A₀.phaseMetricRead_isometry_det i hi hW (hactiveE x hx)] + exact hdetE x hx + apply hcross z hz (hzζ.trans_le (min_le_right _ _)) x hx t ht H + (A₀.phaseRealChartMap_smooth i hi hW.1) x (herror.trans_le hδη) + _ (RealModes.coordinateGauss_eq_curvature_mul H x hDH) _ r s hr hs + rw [A₀.phaseGauss_isometry i hi hW (hactiveE x hx)] + exact hcurvE x hx + · exact fun j => (hslow j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundaryStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundaryStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..54f65bf1a82c6f84759bff62d3a380291fadcf01 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularBoundaryStep.lean @@ -0,0 +1,232 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentGlobalNormal +import OAI.Geometry.SurfaceImmersion.Primitive.GlobalCircularNormal +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteExteriorCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricNormalExtension +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveBoundaryGauss +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_boundaryCircularPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_boundaryCircularPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_boundaryCircularPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_boundaryCircularPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_boundaryCircularPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_boundaryCircularPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_circular_primitive_boundary_step [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (ha0 : ∀ p, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, A₀.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + let H := A₀.phaseRealChartMap i e.symm F + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H SmallModes.dy (b j x,c j x) x κ) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) (B : SmoothingAtlas M) (curves : ι → PhaseBoundaryCurve B) + (n₀ : PreferredNormal F) + (hglobal : ∀ j p, p ∈ (curves j).carrier → (curves j).second F p ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize ((curves j).second F p)) + {D : Set M} (hD : IsOpen D) (hDr : interior (closure D) = D) + (hDs : closure D ⊆ (chart (i : M)).source) + (hDe : MapsTo (chart (i : M)) (closure D) e.source) + (hDw : ∀ p ∈ closure D, A₀.weight i p ≠ 0) + (E₀ : Set M) (hE₀ : E₀.Finite) (hE₀f : Disjoint E₀ (frontier D)) + (hsupport : A₀.phaseSurfaceSupport i e K = closure D) + (hDC : ∀ p ∈ closure D, e (chart (i : M) p) ∈ C) + (hcurveChart : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + baseEquiv (e (chart (i : M) p)) ∈ Curves j) + (hvector : ∀ j p, p ∈ (curves j).carrier → p ∈ closure D → + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) = + fderiv ℝ (surfacePhaseTransition ((curves j).index : M) (curves j).phase (i : M) e) + ((curves j).coordinate p) SmallModes.dy) + (hworldBoundary : ∀ p ∈ frontier D, + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy + (baseEquiv (e (chart (i : M) p))) ≠ 0 ∧ + spaceCoordinates (n₀.vector p) ≠ -normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) + SmallModes.dy SmallModes.dy (baseEquiv (e (chart (i : M) p))))) + (haFrontier : ∀ p ∈ frontier D, a (baseEquiv (e (chart (i : M) p))) = 0) + (hpositive : ∀ j p, p ∈ (curves j).carrier → p ∈ frontier D → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) + (hVfrontier : ∀ p ∈ frontier D, baseEquiv (e (chart (i : M) p)) ∉ V) + (hσD : ∀ j, (surfacePhaseChart (i : M) e).symm (x j) ∈ E₀ ∩ D) (hinsideCover : ∀ p ∈ E₀, p ∈ D → ∃ s, (surfacePhaseChart (i : M) e).symm (x s) = p) + (hglobalCross : ∀ j k, j ≠ k → ∀ p ∈ E₀, + p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n₀.vector p) ∧ + 0 < (curves k).second F p ⬝ᵥ spaceCoordinates (n₀.vector p)) ∧ + 0 < (curves j).crossing (curves k) F p ∧ 0 < (curves k).crossing (curves j) F p) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, + (∀ j p, p ∈ (curves j).carrier → (curves j).second W p ≠ 0 ∧ + spaceCoordinates (N.vector p) ≠ -normalize ((curves j).second W p)) ∧ + ∀ j k, j ≠ k → ∀ p ∈ E₀, p ∈ (curves j).carrier → p ∈ (curves k).carrier → + (0 < (curves j).second W p ⬝ᵥ spaceCoordinates (N.vector p) ∧ + 0 < (curves k).second W p ⬝ᵥ spaceCoordinates (N.vector p)) ∧ + 0 < (curves j).crossing (curves k) W p ∧ 0 < (curves k).crossing (curves j) W p := by + classical + have : Fintype ι := Fintype.ofFinite ι + have hFiso : IsSmoothIsometricImmersion M g F := ⟨hF,fun p v w => by rw [hmetric]; rfl⟩ + obtain ⟨ρ,hρ,houtside⟩ := A₀.finite_exterior_crossing_preservation B hFiso n₀ + houter curves hDr hE₀ hglobalCross + have hsmall : 0 < ρ/4 := by positivity + obtain ⟨z,hz,hzρ,hz1,W,hW,hdata,N,hNav,hNout,hNcross,G,hG,hGF,V₀,hV₀,hWV,hVouter,hVsupport⟩ := + data.independent_global_circular_primitive_normal A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess ha0 hboundary hCurves hCurvesT hP hlocal + hE hET haE slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff + ℓ hℓx hℓy h htarget hC hCS hCurveC hactiveC hEC hold left right x hxinj hxE + hV hxV honly hfirst hslopes B curves n₀ hglobal hD hDr hDs hDe hDw E₀ hE₀ hE₀f + hsupport hDC hcurveChart hvector hworldBoundary haFrontier hpositive hVfrontier hσD + (ρ/4) hsmall (ρ/4) hsmall + have hz8 : z^8 ≤ z := calc + z^8 = z*z^7 := by ring + _ ≤ z*1 := mul_le_mul_of_nonneg_left (pow_le_one₀ hz.le hz1) hz.le + _ = z := mul_one _ + have hsum : ρ/4+z^8 < ρ := by linarith + have hout := houtside G V₀ W hG hV₀ h hW (ρ/4) (z^8) hsmall.le (pow_nonneg hz.le _) + hsum (fun j => (hGF j).mono_order (by decide)) hWV + (fun p hp => hVsupport p (by rwa [hsupport])) N hNout + have hsource (p : M) (hp : p ∈ D) : p ∈ (surfacePhaseChart (i : M) e).source := + ⟨hDs (subset_closure hp),hDe (subset_closure hp)⟩ + have hsecond (j : ι) (p : M) (hp : p ∈ (curves j).carrier) (hpD : p ∈ D) : + (curves j).second W p = realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) + (b j (baseEquiv (e (chart (i : M) p))),c j (baseEquiv (e (chart (i : M) p)))) + (baseEquiv (e (chart (i : M) p))) := by + rw [(curves j).second_transition A₀ i e he hi hW hp (hsource p hpD) + (hDw p (subset_closure hpD)),← hvector j p hp (subset_closure hpD)] + have hcrossing (j k : ι) (p : M) (hpj : p ∈ (curves j).carrier) + (hpk : p ∈ (curves k).carrier) (hpD : p ∈ D) := + (curves j).crossing_transition (curves k) A₀ i e he hi hW hpj hpk (hsource p hpD) + (hDw p (subset_closure hpD)) + refine ⟨W,hW,hdata,N,hNav,?_⟩ + intro j k hjk p hpE hpj hpk + by_cases hpD : p ∈ D + · obtain ⟨s,hsp⟩ := hinsideCover p hpE hpD + have hxT : x s ∈ (surfacePhaseChart (i : M) e).target := by + constructor + · change baseEquiv.symm (x s) ∈ e.target + exact (hCS (hEC _ (hxE s))).2 + · change e.symm (baseEquiv.symm (x s)) ∈ (chart (i : M)).target + have hh := hactiveC _ (hEC _ (hxE s)) + by_contra hn + simp only [SmoothingAtlas.chartWeight,indicator_of_notMem hn] at hh + exact hh rfl + have hxp : baseEquiv (e (chart (i : M) p)) = x s := by + rw [← hsp] + exact (surfacePhaseChart (i : M) e).right_inv hxT + have hj : j = left s ∨ j = right s := by + apply honly s j + rw [← hxp] + exact hcurveChart j p hpj (subset_closure hpD) + have hk : k = left s ∨ k = right s := by + apply honly s k + rw [← hxp] + exact hcurveChart k p hpk (subset_closure hpD) + have hjk' := hcrossing j k p hpj hpk hpD + have hkj' := hcrossing k j p hpk hpj hpD + dsimp only at hjk' hkj' + rw [← hvector j p hpj (subset_closure hpD),← hvector k p hpk (subset_closure hpD)] at hjk' + rw [← hvector k p hpk (subset_closure hpD),← hvector j p hpj (subset_closure hpD)] at hkj' + rw [hsecond j p hpj hpD,hsecond k p hpk hpD,hjk',hkj',hxp] + have hs := hNcross s + dsimp only at hs + rw [hsp] at hs + rcases hj with hj | hj <;> rcases hk with hk | hk + · exact (hjk (hj.trans hk.symm)).elim + · subst j; subst k + exact ⟨⟨hs.2.2.1,hs.2.2.2⟩,hs.1,hs.2.1⟩ + · subst j; subst k + exact ⟨⟨hs.2.2.2,hs.2.2.1⟩,hs.2.1,hs.1⟩ + · exact (hjk (hj.trans hk.symm)).elim + · exact hout j k hjk p hpE hpD hpj hpk + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularCurves.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularCurves.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ddd703c8cfd71c4188cebd3151c8e5a146a3594 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularCurves.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentExactCircular +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_exactCircularCurvesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_exactCircularCurvesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_exactCircularCurvesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularCurvesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularCurvesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_exactCircularCurvesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_circular_primitive_curves [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + {ι : Type*} {Curves : ι → Set SmallModes.Base} {b c k : ι → SmallModes.Base → ℝ} + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x) + (η : ℝ) (hη : 0 < η) + (havoid : ∀ z : ℝ, 0 < z → z < η → ∀ j x, x ∈ Curves j → + ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : SmallModes.Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile (A₀.phaseRealChartMap i e.symm F) + a e₁ e₂ α (x,t)‖ < η → + k j x ≤ RealModes.coordinateGauss (RealModes.realMetric G SmallModes.dx SmallModes.dx) + (RealModes.realMetric G SmallModes.dx SmallModes.dy) (RealModes.realMetric G SmallModes.dy SmallModes.dy) p → + RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm G (b j x,c j x) (b j x,c j x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + let δ := min ε η + have hδ : 0 < δ := lt_min hε hη + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.independent_exact_circular_primitive_profiles A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα hvel S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS δ hδ (min ζ η) (lt_min hζ hη) + refine ⟨z,hz,hzζ.trans_le (min_le_left _ _),hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro j x hx + obtain ⟨t,ht,herror⟩ := hprofiles (baseEquiv.symm x) (hCurveC j x hx) + rw [baseEquiv.apply_symm_apply] at herror + apply havoid z hz (hzζ.trans_le (min_le_right _ _)) j x hx t ht + (A₀.phaseRealChartMap i e.symm W) (A₀.phaseRealChartMap_smooth i hi hW.1) x + (herror.trans_le (min_le_right _ _)) + rw [A₀.phaseGauss_isometry i hi hW (hactive j x hx)] + exact hcurv j x hx + · exact fun j => (hslow j).mono_const (min_le_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5f5273d860176e8c4c6e66db8fa39ca4ac4cfe1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentCircularRealization.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentPrefixBounds +import OAI.Geometry.SurfaceImmersion.Primitive.UniformConvexCircularAtlas +import OAI.Geometry.SurfaceImmersion.Primitive.CircularDiskTopology + +namespace OAI + +/-! Apply the finite geometric iteration using independently chosen local +convex phases and one fixed background norm for all prefix bounds. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +omit [CompactSpace M] in +lemma circular_weight_support {B : SmoothingAtlas M} (r : B.centers → ℝ) + (hreg : ∀ i : B.centers, circularCoordinateRegion (i : M) (r i) ⊆ (coordinateChart (i : M)).target) + (hnon : ∀ i p, 0 ≤ B.weight i p) + (hpos : ∀ i p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) (r i)) + (i : B.centers) : tsupport (B.weight i) ⊆ circularDiskClosure (i : M) (r i) := by + apply closure_minimal _ (circularDiskClosure_compact (i : M) (r i) (hreg i)).isClosed + intro p hp + have hd := (hpos i p).mp (lt_of_le_of_ne (hnon i p) (Ne.symm hp)) + exact (circularDiskClosure_iff (i : M) (hreg i) p).mpr ⟨hd.1,hd.2.le⟩ + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem independent_circular_realization (g : SmoothMetric M) (c C : ℝ) + (B : SmoothingAtlas M) (r L K : B.centers → ℝ) + (hL : ∀ i, 0 < L i) + (hreg : ∀ i : B.centers, circularCoordinateRegion (i : M) (r i) ⊆ (coordinateChart (i : M)).target) + (hnon : ∀ i p, 0 ≤ B.weight i p) + (hpos : ∀ i p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) (r i)) + (hphase : ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 (C+1) h.inner → + (∀ q v, c*g.inner q v v ≤ h.inner q v v) → + ∀ (i : B.centers) (q : M), q ∈ circularDiskClosure (i : M) (r i) → + ∀ ell : Base, ‖ell‖ ≤ K i → ∀ v : Base, + (L i/2)*(v.1^2+v.2^2) ≤ coordinateMetricHessian (coordinateMetric h (i : M)) + (centeredConvexPhase ell (L i) (coordinateChart (i : M) i)) + (coordinateChart (i : M) q) v v) + (m : ℕ) (D : ℝ) (hD : 0 ≤ D) : + ∃ N : ℕ, 0 < N ∧ ∀ g₀ : SmoothMetric M, + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) → + ∀ (u : ∀ p : M, CovariantTwoTensor p) + (f : Fin N → SmoothPrimitiveFamily (Fin m) u), + (∀ k a, A.TensorWeightedBound 1 1 D ((f k).term a)) → + (∀ k : Fin N, A.TensorWeightedBound 1 1 C (g₀.inner+((k.val : ℝ)/(N : ℝ)) • u)) → + ∀ d : CircularPrimitiveFamily B (Fin (N*m)), + (∀ a p, d.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) → + (∀ a, d.phase a = (f a.divNat).phase a.modNat) → + (∀ a, d.convexPart a = L (d.curves a).index) → + (∀ a, ‖d.linearPart a‖ ≤ K (d.curves a).index) → + ∀ h : SmoothMetric M, h.inner = g₀.inner+u → + ∀ (F : M → Space) (n : PreferredNormal F), IsSmoothIsometricImmersion M g₀ F → + MetricGoodPhaseData g₀ F → + FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) F n → + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) := by + obtain ⟨N,hN,hbounds⟩ := A.independent_prefix_bounds m D hD + refine ⟨N,hN,?_⟩ + intro g₀ hlower u f hb hpath d ha hp hpart hell h htarget F n hF data hgeom + have hcv (a : Fin (N*m)) : d.ConvexMetric (d.prefixMetric g₀ a.castSucc) a := by + intro q hq _hqrad v hv + obtain ⟨hbound,hlow⟩ := hbounds B g g₀ c C hlower u f hb hpath d ha hp a + have hqc := circular_weight_support r hreg hnon hpos (d.curves a).index hq + have he := hphase _ hbound hlow (d.curves a).index q hqc (d.linearPart a) (hell a) v + rw [hpart] + have hs : 0 < v.1^2+v.2^2 := by + by_contra hn + have h1 : v.1 = 0 := sq_eq_zero_iff.mp (by nlinarith [sq_nonneg v.2]) + have h2 : v.2 = 0 := sq_eq_zero_iff.mp (by nlinarith [sq_nonneg v.1]) + exact hv (Prod.ext h1 h2) + exact (mul_pos (half_pos (hL _)) hs).trans_le he + apply d.realize_total g₀ h _ hcv n hF data hgeom + rw [d.totalTensor_cycle f ha hp hN] + exact htarget + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentConstructedCircular.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentConstructedCircular.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d90ccac994b23f6ab02137159908c57df1f1946 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentConstructedCircular.lean @@ -0,0 +1,172 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentCircularBoundary +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularBoundary +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_constructedCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_constructedCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_constructedCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_constructedCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_constructedCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_constructedCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_constructed_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c k : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hk : ∀ j, ContDiff ℝ ∞ (k j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (B : ℝ) (hB : 0 ≤ B) (hkb : ∀ j, ∀ x ∈ Curves j, -B ≤ k j x) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (A₀.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + k j x*(b j x)^2) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactive : ∀ j x, x ∈ Curves j → A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurv : ∀ j x, x ∈ Curves j → k j x ≤ + RealModes.coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hactiveE : ∀ x ∈ E, A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hcurvE : ∀ x ∈ E, -B ≤ RealModes.coordinateGauss + (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := A₀.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hFr := A₀.phaseRealChartMap_smooth i hi hF + obtain ⟨Z,hTZ,hZU,O,hOZ,l,hQc,hQO,hamp,hzero,e₁,e₂,α,h₁,h₂,hα,hper,hvel,hreg,η,hη,havoid,hcross⟩ := + actual_analytic_curve_crossing_loop hFr ha hT hU hTU hn hI hN hHess haT hboundary + hCurves hCurvesT hP hlocal hE hET haE slopeBound hSlope hb hc hk hbc B hB hkb hold + let Q := lowJet (A₀.jetChartMap i F ∘ e.symm) '' closure (S : Set JetPolynomial.Base) + have heq : A₀.phaseRealChartMap i e.symm F ∘ baseEquiv = A₀.jetChartMap i F ∘ e.symm := + A₀.phaseRealChartMap_comp_base i e.symm F + have hQT : Q ⊆ lowJet (A₀.phaseRealChartMap i e.symm F ∘ baseEquiv) '' (baseEquiv ⁻¹' T) := by + rintro _ ⟨p,hp,rfl⟩ + rw [heq] + exact mem_image_of_mem _ (hST (mem_image_of_mem _ hp)) + have hQ : IsCompact Q := hSc.image (lowJet_smooth ((A₀.jetChartMap_smooth i hF).comp hi)).continuous + have hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q := + fun p hp => mem_image_of_mem _ (subset_closure hp) + have hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = normal J := by + intro J hJ hp + exact hzero J hJ (haoff _ hp) + have hdetE (x : SmallModes.Base) (hx : x ∈ E) : + A₀.phaseMetricRead i e.symm h x 0 * A₀.phaseMetricRead i e.symm h x 2 - + (A₀.phaseMetricRead i e.symm h x 1)^2 ≠ 0 := by + have hh := (A₀.phaseMetricRead_positive i h e he hi (hCS (hEC x hx)).2 (hactiveE x hx)).2 + rw [baseEquiv.apply_symm_apply] at hh + exact ne_of_gt hh + exact data.independent_exact_circular_primitive_boundary A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp hOZ h₁ h₂ hα (fun J hJ t => hvel J t) S hSc hTS hQ + (hQT.trans hQO) hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget hC hCS + hCurveC hactive hcurv η hη havoid hEC hactiveE hdetE B slopeBound hcurvE hcross + (fun p hp t _ => hreg _ (hST (mem_image_of_mem _ (subset_closure (hCS hp).1))) t) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactCircular.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactCircular.lean new file mode 100644 index 0000000000000000000000000000000000000000..7898ea53108affc910cf34e4d160a7b233f64676 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactCircular.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentPhaseBoundaryProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseBoundaryProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_exactCircularPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_exactCircularPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_exactCircularPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_exactCircularPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_exactCircularPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_circular_primitive_profiles [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {Z : TopologicalSpace.Opens GeometricJet} (hOZ : (O : Set LowJet) ⊆ jetDomain Z) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, ∃ t : ℝ, t ∈ Icc (0 : ℝ) 1 ∧ + ‖realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p)- + surfaceCircularProfile (A₀.phaseRealChartMap i e.symm F) a e₁ e₂ α (baseEquiv p,t)‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro ε hε ζ hζ + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + data.independent_exact_phase_primitive_boundary_profiles A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l (ha.comp baseEquiv.contDiff) hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + h htarget hC hCS ε hε ζ hζ + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,hslow,V,hV,hcorrection,hext⟩ + intro p hp + obtain ⟨t,ht,heq⟩ := A₀.phase_circular_period_profile i hF hi ha hOZ l hamp h₁ h₂ hα hvel + (fun _ hp => hQO (hFQ hp)) (hCS hp).1 ((ℓ p/z : ℝ) : Period) + refine ⟨t,ht,?_⟩ + rw [← heq] + exact hprofiles p hp + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactOriginalProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactOriginalProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..76fc86b541b64a80d7197ec7970ef7faf4830bff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactOriginalProfiles.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentExactPhaseProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhasePrimitiveProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance independentExactPhaseOriginalProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentExactPhaseOriginalProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentExactPhaseOriginalProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentExactPhaseOriginalProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentExactPhaseOriginalProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentExactPhaseOriginalProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_phase_primitive_original_profiles [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i W ∘ e.symm) z p- + l.geometricLeadingProfile (A₀.jetChartMap i F ∘ e.symm) ((A₀.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.independent_exact_phase_primitive_five_profiles A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + intro ε hε ζ hζ + obtain ⟨ρ,hρ,hstable⟩ := A₀.phase_geometricLeadingProfile_stability i hF hi l hSc + (fun _ hp => hQO (hFQ hp)) hC (fun _ hp => (hCS hp).1) (ε/2) (half_pos hε) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,hslow,hprofile,V,hV,hcorrection,hexterior⟩ := + hall (min (ε/2) ρ) (lt_min (half_pos hε) hρ) ζ hζ + have hslowρ : A₀.WeightedBound 1 3 ρ (G-F) := + fun j => (hslow j).mono_const (min_le_right _ _) + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hexterior⟩ + · intro p hp + have hfirst : + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i W ∘ e.symm) z p- + l.geometricLeadingProfile (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) + hGO p ((ℓ p/z : ℝ) : Period)‖ ≤ ε/2 := + (hprofile p (hCS hp)).trans (min_le_left _ _) + have hsecond := hstable G hG hGO hslowρ p hp ((ℓ p/z : ℝ) : Period) + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i W ∘ e.symm) z p) + (l.geometricLeadingProfile (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) + hGO p ((ℓ p/z : ℝ) : Period)) + (l.geometricLeadingProfile (A₀.jetChartMap i F ∘ e.symm) ((A₀.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period)) + simp only [dist_eq_norm] at htriangle + linarith + · exact fun j => (hslow j).mono_const ((min_le_left _ _).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactPhaseProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactPhaseProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..669474b37dcf7a453be451efd8de7c1dcd207054 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactPhaseProfiles.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentExactProfiledPhase +import OAI.Geometry.SurfaceImmersion.Primitive.ExactProfiledPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector +local instance independentActualPhasePrimitiveProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentActualPhasePrimitiveProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentActualPhasePrimitiveProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentActualPhasePrimitiveProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentActualPhasePrimitiveProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentActualPhasePrimitiveProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_phase_primitive_five_profiles [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ G : M → Space, ∃ hG : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (A₀.jetChartMap i G ∘ e.symm)) S O, + A₀.WeightedBound 1 3 ε (G-F) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let geom := l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i W ∘ e.symm) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ ε) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.independent_exact_profiled_phase_primitive_metric A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + obtain ⟨D,hD,hprofile⟩ := A₀.phase_profile_correction_bound i hi S.isOpen hSc + intro ε hε ζ hζ + obtain ⟨η,hη,_,hsmall⟩ := ExactCorrection.positive_power_threshold D 8 (ε/2) + (by norm_num) (half_pos hε) + obtain ⟨z,hz,hzcap,hz1,V,W,hV,hnear,hW,hgeometry,hclose⟩ := + hall (ε/2) (half_pos hε) (min η ζ) (lt_min hη hζ) + obtain ⟨G,hG,hGO,hslow,hprof,hext,hextK⟩ := hnear + have hzη := hzcap.trans_le (min_le_left _ _) + have hzζ := hzcap.trans_le (min_le_right _ _) + have herror : D*z^8 < ε/2 := by + simpa only [Real.rpow_ofNat] using hsmall z hz hzη + have hcorrection := hprofile V W hV hW.1 (z^8) z (pow_nonneg hz.le _) hz.le hz1 hclose + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,G,hG,hGO,?_,?_,V,hV,hclose,hext,hextK⟩ + · exact fun j => (hslow j).mono_const (by linarith) + · intro p hp + dsimp only + have htriangle := dist_triangle + (SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i W ∘ e.symm) z p) + (SurfaceVelocityFamily.Loop.primitiveJetProfile (A₀.vectorChartRead i V ∘ e.symm) z p) + (![((l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO).longitudinal.val p + ((ℓ p/z : ℝ) : Period)), + (l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO).Y p, + (l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO).C p, + ((l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO).longitudinal.slow + (coordinateVector 1)).val p ((ℓ p/z : ℝ) : Period), + (l.geometry (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) hGO).V.angle.val p + ((ℓ p/z : ℝ) : Period)]) + simp only [dist_eq_norm] at htriangle + exact htriangle.trans ((add_le_add (hcorrection p hp.1) (hprof p hp)).trans (by linarith)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactProfiledPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactProfiledPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..76ba830c1fda86225c21cb66bb73f28c2594428d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentExactProfiledPhase.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentProfiledFastFamily +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasExactGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPhaseFastFamily +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance independentExactProfiledPhasePrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentExactProfiledPhasePrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentExactProfiledPhasePrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentExactProfiledPhasePrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentExactProfiledPhasePrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentExactProfiledPhasePrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_profiled_phase_primitive_metric [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ V G : M → Space, + ContMDiff planeModel spaceModel ∞ V ∧ + A₀.PhasePrimitiveProfileNear F i e hi l S ℓ K ε z V ∧ + IsSmoothIsometricImmersion M h G ∧ Nonempty (MetricGoodPhaseData h G) ∧ + A₀.WeightedBound 1 2 (z^8) (G-V) := by + obtain ⟨V₀,R,c,b,hV₀,hR,hc,hb,hfamily⟩ := data.independent_profiled_phase_primitive_fast_family + A₀ houter hF hmetric i e he hi hχ hχc hχs hcover l ha hamp S hSc hTS + hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget + intro ε hε ζ hζ + exact data.A.exact_geometric_metric_with_property_in_atlas A₀ h data.outer_locally_one R c b V₀ hc hb hV₀ + (A₀.PhasePrimitiveProfileNear F i e hi l S ℓ K ε) (hfamily ε hε) ζ hζ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPhaseBoundaryProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPhaseBoundaryProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..1398f5de265e507901a028b9df5df72715424760 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPhaseBoundaryProfiles.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentExactOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_exactPhaseBoundaryProfilesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_exactPhaseBoundaryProfilesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_exactPhaseBoundaryProfilesDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_exactPhaseBoundaryProfilesDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_exactPhaseBoundaryProfilesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_exactPhaseBoundaryProfilesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_phase_primitive_boundary_profiles [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, + ‖realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (SurfaceJetCoordinates.baseEquiv p)- + boundaryProfileMap (l.geometricLeadingProfile (A₀.jetChartMap i F ∘ e.symm) + ((A₀.jetChartMap_smooth i hF).comp hi) + (fun _ hp => hQO (hFQ hp)) p ((ℓ p/z : ℝ) : Period))‖ < ε) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hall := data.independent_exact_phase_primitive_original_profiles A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + l ha hamp S hSc hTS hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy h htarget hC hCS + intro ε hε ζ hζ + let δ := ε/(‖boundaryProfileMap‖+1) + have hδ : 0 < δ := div_pos hε (by positivity) + obtain ⟨z,hz,hzζ,hz1,W,hW,hgeometry,hprofiles,G,hG,hslow,V,hV,hcorrection,hext⟩ := + hall δ hδ ζ hζ + refine ⟨z,hz,hzζ,hz1,W,hW,hgeometry,?_,G,hG,?_,V,hV,hcorrection,hext⟩ + · intro p hp + exact A₀.phaseRealChartMap_profile_error i hi hW.1 z p _ hε (hprofiles p hp) + · exact fun j => (hslow j).mono_const (div_le_self hε.le (by linarith [norm_nonneg boundaryProfileMap])) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPreservingCircular.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPreservingCircular.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c7666beea0994ddc8bc40249c5356b90e9ff96e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPreservingCircular.lean @@ -0,0 +1,168 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentConstructedCircular +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance independent_preservingCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independent_preservingCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independent_preservingCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independent_preservingCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independent_preservingCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independent_preservingCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_preserving_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (A₀.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (A₀.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (A₀.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, A₀.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (A₀.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (A₀.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => A₀.phaseMetricRead i e.symm h y 0) + (fun y => A₀.phaseMetricRead i e.symm h y 1) + (fun y => A₀.phaseMetricRead i e.symm h y 2) x)*(b j x)^2) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (A₀.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (A₀.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := A₀.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + A₀.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hactiveR (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : + A₀.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0 := by + rcases hx with ⟨p,hp,rfl⟩ + simpa only [baseEquiv.symm_apply_apply] using hactiveC p hp + have hdetR (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : + A₀.phaseMetricRead i e.symm h x 0 * A₀.phaseMetricRead i e.symm h x 2 - + (A₀.phaseMetricRead i e.symm h x 1)^2 ≠ 0 := by + rcases hx with ⟨p,hp,rfl⟩ + exact ne_of_gt (A₀.phaseMetricRead_positive i h e he hi (hCS hp).2 (hactiveC p hp)).2 + obtain ⟨V,hV,hCV,γ,hγ,hγeq,B,hB,hbound,_⟩ := A₀.phase_gauss_representative i hi h + (hC.image baseEquiv.continuous) hactiveR hdetR + have hmem (j : ι) (x : SmallModes.Base) (hx : x ∈ Curves j) : x ∈ baseEquiv '' C := by + exact ⟨baseEquiv.symm x,hCurveC j x hx,baseEquiv.apply_symm_apply x⟩ + have hmemE (x : SmallModes.Base) (hx : x ∈ E) : x ∈ baseEquiv '' C := + ⟨baseEquiv.symm x,hEC x hx,baseEquiv.apply_symm_apply x⟩ + have hγbound (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : -B ≤ γ x := + (abs_le.mp (hbound x hx)).1 + apply data.independent_constructed_circular_primitive_boundary A₀ houter hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess haT hboundary hCurves hCurvesT hP hlocal hE hET haE + slopeBound hSlope hb hc (fun _ => hγ) hbc B (le_trans (by norm_num) hB) + (fun j x hx => hγbound x (hmem j x hx)) + (fun j x hx hz => ?_) S hSc hTS hST K hK hKS hKA hone haoff ℓ hℓx hℓy + h htarget hC hCS hCurveC + (fun j x hx => hactiveR x (hmem j x hx)) + (fun j x hx => le_of_eq (hγeq x (hCV (hmem j x hx)))) + hEC (fun x hx => hactiveR x (hmemE x hx)) + (fun x hx => ?_) + · rw [hγeq x (hCV (hmem j x hx))] + exact hold j x hx hz + · rw [← hγeq x (hCV (hmemE x hx))] + exact hγbound x (hmemE x hx) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPrimitiveNormalMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPrimitiveNormalMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a8713ab410e0f47809f2bb64bac5c93cba9d352 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentPrimitiveNormalMargin.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSecondFormMargin +import OAI.Geometry.SurfaceImmersion.Atlas.ChartSecondFormBounds +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry + +namespace OAI + +/-! The primitive's transverse margin and exterior convergence give a +uniform second-form lower bound in every chart of the fixed atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_primitive_atlas_normal_margin (data : MetricGoodPhaseData g F) (B : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (B.weight i) → B.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (i : B.centers) {c : ℝ} (hc : 0 < c) : + ∃ ρ c₀ : ℝ, 0 < ρ ∧ 0 < c₀ ∧ + ∀ (G V : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) → + ∀ b : ℝ, 0 ≤ b → b < ρ → B.WeightedBound 1 2 b (G-F) → + (∀ p ∈ tsupport (B.weight i), + c < ‖realSecondTensor (spaceCoordinates ∘ B.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))‖) → + (∀ p ∉ tsupport (B.weight i), V =ᶠ[𝓝 p] G) → + ∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + c₀ < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ := by + classical + obtain ⟨ρ,ce,hρ,hce,hextbound⟩ := data.uniform_secondForm_C2_margin hF + let K (j : data.A.centers) := tsupport (data.A.weight j) ∩ tsupport (B.weight i) + have hK (j : data.A.centers) : IsCompact (K j) := + ((isClosed_tsupport _).inter (isClosed_tsupport _)).isCompact + have hKs (j : data.A.centers) : K j ⊆ (coordinateChart (i : M)).source := by + intro p hp + simpa only [coordinateChart_source,chart_source] using B.weight_support i hp.2 + have hKt (j : data.A.centers) : K j ⊆ (coordinateChart (j : M)).source := by + intro p hp + simpa only [coordinateChart_source,chart_source] using data.A.weight_support j hp.1 + choose C hC hcompare using fun j => compact_overlap_secondTensor_bound (hK j) + (j : M) (i : M) (hKs j) (hKt j) + let C₀ := 1+∑ j, C j + have hsum : 0 ≤ ∑ j, C j := Finset.sum_nonneg (fun j _ => (hC j).le) + have hC₀ : 0 < C₀ := by + change 0 < 1+∑ j, C j + linarith + have hCC (j : data.A.centers) : C j ≤ C₀ := by + have hh := Finset.single_le_sum (fun k _ => (hC k).le) (Finset.mem_univ j) + change C j ≤ 1+∑ j, C j + linarith + obtain ⟨D,hD,hchange⟩ := B.weightedBound_change_atlas (V := Space) data.A 2 + have hDp : 0 < D+1 := by positivity + refine ⟨ρ/(D+1),min ce (c/C₀),div_pos hρ hDp,lt_min hce (div_pos hc hC₀),?_⟩ + intro G V hG hV hI b hb hbρ hclose hlocal hexterior j x hx + have hDb : D*b < ρ := by + have hh := (lt_div_iff₀ hDp).mp hbρ + nlinarith + have hcloseA := hchange (G-F) 1 b zero_lt_one le_rfl hb (hG.sub hF) hclose + obtain ⟨y,⟨p,hp,rfl⟩,rfl⟩ := hx + have hpoint (k : M) : + coordinateChart (k : M) p = planeCoordinateIsometry (chart (k : M) p) := by + rw [planeCoordinateIsometry_chart] + rfl + by_cases hpi : p ∈ tsupport (B.weight i) + · have hxi : coordinateChart (j : M) p ∈ coordinateDomain (j : M) := by + rw [← coordinateChart_target] + exact (coordinateChart (j : M)).map_source (by + simpa only [coordinateChart_source,chart_source] using data.A.weight_support j hp) + have hcmp := hcompare j V hV p ⟨hp,hpi⟩ + (coordinateMap_injective_of_immersion hV hI (j : M) hxi) + have hei := (realSecondTensor_eventuallyEq + (B.vectorPlaneRead_eventually_coordinateMap V i (houter i) hpi)).eq_of_nhds + have hej := (realSecondTensor_eventuallyEq + (data.A.vectorPlaneRead_eventually_coordinateMap V j (data.outer_locally_one j) hp)).eq_of_nhds + rw [hpoint i,hpoint j,← hei,← hej] at hcmp + have hnorm := (hlocal p hpi).trans_le (hcmp.trans + (mul_le_mul_of_nonneg_right (hCC j) (norm_nonneg _))) + exact (min_le_right _ _).trans_lt ((div_lt_iff₀ hC₀).mpr (by + simpa only [mul_comm] using hnorm)) + · have he := data.A.planeRead_eventuallyEq_on_weight (hexterior p hpi) j hp + (data.outer_locally_one j) + rw [(realSecondTensor_eventuallyEq he).eq_of_nhds] + exact (min_le_left _ _).trans_lt (hextbound G hG (D*b) (mul_nonneg hD hb) hDb hcloseA j _ + ⟨chart (j : M) p,⟨p,hp,rfl⟩,rfl⟩) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledFastFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledFastFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d59bd870e76b3911afd24c13d0e875c712279dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledFastFamily.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentProfiledPhase +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasShiftedBounds +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPhaseFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins +import OAI.Geometry.SurfaceImmersion.Geometry.ExactFastFamily + +namespace OAI + +/-! Actual fast approximants with prescribed accuracy in the leading five +primitive derivatives and the slow baseline, retained for the exact step. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PrimitiveRealization CovarianceCorrector +local instance independentProfiledFamilyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentProfiledFamilyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentProfiledFamilyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentProfiledFamilyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentProfiledFamilySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentProfiledFamilySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_profiled_phase_primitive_fast_family (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∃ V₀ R₁ c₁ c₂ : ℝ, 0 ≤ V₀ ∧ 0 < R₁ ∧ 0 < c₁ ∧ 0 < c₂ ∧ ∀ ε : ℝ, 0 < ε → + data.A.GeometricFastFamilyWithProperty h R₁ c₁ c₂ V₀ + (A₀.PhasePrimitiveProfileNear F i e hi l S ℓ K ε) := by + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨c,c₂,V₀,hc,hc₂,hV₀,hfamilies⟩ := data.independent_profiled_phase_primitive_realization + A₀ houter hF hmetric i e he hi hχ hχc hχs hcover l ha hamp S hSc hTS + hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + obtain ⟨D₀,hD₀,hd₀⟩ := A₀.weightedBound_change_atlas (V := Space) data.A 0 + obtain ⟨Dw,hDw,hdw⟩ := A₀.weightedBound_change_atlas (V := Space) data.A 442 + obtain ⟨Ds,hDs,hds⟩ := A₀.shiftedBound_change_atlas (V := Space) data.A 2 440 + obtain ⟨Dt,hDt,hdt⟩ := A₀.tensorWeightedBound_change_atlas data.A 440 + refine ⟨D₀*V₀,R₁,c₁,c₂,mul_nonneg hD₀ hV₀,hR₁,hc₁,hc₂,?_⟩ + intro ε hε N + obtain ⟨lp,b,u,η,L,C,Cv,Dp,P,hb,_,hu,hη,hη1,hL,hC,hCv,_,hblp,hP,hfamily⟩ := + hfamilies 442 (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold (Dt*C) (N+1) ρ + (by positivity) hρ + obtain ⟨ηs,hηs,_,hslow⟩ := ExactCorrection.positive_power_threshold L u ε hu hε + obtain ⟨ηp,hηp,_,hprofile⟩ := primitive_normal_threshold hb hblp hε Dp + refine ⟨min η (min η₀ (min ηs ηp)),Dt*C,(Dw+Ds)*Cv, + lt_min hη (lt_min hη₀ (lt_min hηs hηp)),mul_nonneg hDt hC,mul_nonneg (add_nonneg hDw hDs) hCv,?_⟩ + intro z hz hzη + have hzbase := hzη.trans_le (min_le_left _ _) + have hzother := hzη.trans_le (min_le_right _ _) + have hzmetric := hzother.trans_le (min_le_left _ _) + have hzprofiles := hzother.trans_le (min_le_right _ _) + have hzslow := hzprofiles.trans_le (min_le_left _ _) + have hzprofile := hzprofiles.trans_le (min_le_right _ _) + obtain ⟨G,V,hG,hV,hclose,hmap,hweighted,hzeroV,hshift,herror,hI,hB,hBmargin,hN,hext,hextK,hGs,hGO,hprof⟩ := + hfamily z hz hzbase + have herr₀ : A₀.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor V-h.inner) := by + rw [htarget] + exact fun j => (herror j).mono_order (by omega) + have hz1 := hzbase.le.trans hη1 + have herr : data.A.TensorWeightedBound 1 440 ((Dt*C)*z^(N+1)) (inducedTensor V-h.inner) := by + have hh := hdt _ 1 (C*z^(N+1)) zero_lt_one le_rfl (by positivity) + ((A₀.inducedTensor_smooth hV).sub_section h.contMDiff) herr₀ + simpa only [mul_assoc] using hh + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV ((Dt*C)*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using hsmall z hz hzmetric) + (fun j => (herr j).mono_order (by omega)) + have hzeroA := hd₀ V 1 V₀ zero_lt_one le_rfl hV₀ hV hzeroV + have hwA : data.A.WeightedBound z 442 ((Dw+Ds)*Cv) V := by + have hh := hdw V z Cv hz hz1 hCv hV hweighted + exact fun j => (hh j).mono_const (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hDs) hCv) + have hsA : data.A.ShiftedBound 2 440 z (((Dw+Ds)*Cv)/z^2) V := by + have hh := hds V z (Cv/z^2) hz hz1 (by positivity) hV + (fun j k hk x => hshift j k (by omega) x) + intro j k hk x + apply (hh j k hk x).trans + have heq : Ds*(Cv/z^2) = (Ds*Cv)/z^2 := by ring + rw [heq] + exact div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hDw) hCv) (sq_nonneg z) + refine ⟨V,hV,?_,hzeroA,hwA,hsA,herr,?_⟩ + · refine ⟨G,hGs,hGO,?_,?_,hext,hextK⟩ + · exact fun j => (hclose j).mono_const (hslow z hz hzslow).le + · intro p hp + exact (hprof p hp).trans (hprofile z hz hzprofile).le + · intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,(hBmargin j x hx).le⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..3953806658364a3a0cdffe3f5282ad4c88464d10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IndependentProfiledPhase.lean @@ -0,0 +1,322 @@ +import OAI.Geometry.SurfaceImmersion.Correction.IndependentAtlasMean +import OAI.Geometry.SurfaceImmersion.Atlas.MixedAtlasGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentPrimitiveNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveSupport +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseAnsatzProfiles +import OAI.Geometry.SurfaceImmersion.Correction.UniformPrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedPatchGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseNormalMargin +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.NonlinearLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveShiftedPowers +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveWeightedBudget +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAtlasNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance independentProfiledPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentProfiledPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentProfiledPhaseDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentProfiledPhaseDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentProfiledPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentProfiledPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for the actual supported primitive +in a fixed nonlinear phase chart, using only the proved polynomial mean iteration. -/ +theorem independent_profiled_phase_primitive_realization (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (houter : ∀ i x, x ∈ tsupport (A₀.weight i) → A₀.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : A₀.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (A₀.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A₀.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (A₀.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ c cB V₀ : ℝ, 0 < c ∧ 0 < cB ∧ 0 ≤ V₀ ∧ ∀ R N : ℕ, + ∃ lp : ℕ, ∃ (b u η L C Cv Dp : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ 0 ≤ Dp ∧ + b < 1/(1+(lp : ℝ)) ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G V : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ ContMDiff planeModel spaceModel ∞ V ∧ + A₀.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, A₀.ShiftedBound 2 m (z^b) (P m) G) ∧ + A₀.WeightedBound z R Cv V ∧ + A₀.WeightedBound 1 0 V₀ V ∧ + A₀.ShiftedBound 2 R z (Cv/z^2) V ∧ + A₀.TensorWeightedBound 1 R (C*z^N) + (inducedTensor V-(g.inner+A₀.bundleRestore A₀.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y)))) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + RealModes.realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) ∧ + (∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + cB < ‖RealModes.realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (A₀.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖) ∧ + (∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G) ∧ + (∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G) ∧ + ∃ hGs : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (A₀.jetChartMap i G ∘ e.symm)) S O, + ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let geom := l.geometry (A₀.jetChartMap i G ∘ e.symm) + ((A₀.jetChartMap_smooth i hGs).comp hi) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile + (A₀.vectorChartRead i V ∘ e.symm) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ + Dp*z/(z^b)^lp := by + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := A₀.nonlinear_lowJet_neighborhood_of_C2 i hF hi + S.isOpen hSc hQ O.isOpen hQO hFQ + obtain ⟨ε,c,hε,hc,hnallOrders⟩ := l.all_orders_primitive_normal_geometry (S := S) + hQ' hQ'O ℓ hℓx hℓy + obtain ⟨Dt,hDt,htransport⟩ := A₀.phase_normal_margin i e he hi hcover + have hcLocal : 0 < c/Dt := div_pos hc hDt + obtain ⟨ρg,hρg,hgeometry⟩ := data.independent_supported_patch_geometry A₀ houter hF i + obtain ⟨ρB,cB,hρB,hcB,hmargin⟩ := data.independent_primitive_atlas_normal_margin A₀ houter hF i hcLocal + obtain ⟨V₀,hV₀,hF₀⟩ := A₀.exists_shifted_bound 2 0 hF + refine ⟨c,cB,V₀+1,hc,hcB,by positivity,?_⟩ + intro R N + obtain ⟨Pol,hPol,lm,hconstruct⟩ := A₀.supported_phase_primitive_metric i e he hi hχ hχc hχs + l ha hamp S hTS hQ' hQ'O (N+(R+2)) ℓ hℓx hℓy + obtain ⟨ln,hnb⟩ := hnallOrders (N+(R+2)) + obtain ⟨lp,hpb⟩ := l.uniform_primitive_five_profiles (S := S) hQ' hQ'O + (N+(R+2)) ℓ hℓx hℓy + let loss := max (max lm ln) lp + have hcap : 0 < 1/(1+(loss : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hbl,hu,hη,hη1,hL,hC,hP,hmean⟩ := + data.polynomial_mean_approximation_in_atlas A₀ (A₀.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) + (A₀.primitiveAtlasPolynomial_smooth i hPol') hF hmetric (R+2) (N+(R+2)) + (1/(1+(loss : ℝ))) hcap + have hblm : b < 1/(1+(lm : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left ((Nat.le_max_left lm ln).trans (Nat.le_max_left _ _)) 1)) + have hbln : b < 1/(1+(ln : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left ((Nat.le_max_right lm ln).trans (Nat.le_max_left _ _)) 1)) + have hblp : b < 1/(1+(lp : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_right (max lm ln) lp) 1)) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + obtain ⟨ηg,hηg,_,hgsmall⟩ := ExactCorrection.positive_power_threshold L u ρg hu hρg + obtain ⟨ηB,hηB,_,hBsmall⟩ := ExactCorrection.positive_power_threshold L u ρB hu hρB + obtain ⟨_,B,_,hB,hprofiles⟩ := A₀.nonlinear_jet_profiles i hi S.isOpen hSc P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B ((R+2)+(2*(N+(R+2)+1)+1))) (hB _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨Dp,hDp,hprofile⟩ := hpb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨ηn,hηn,_,hnsmall⟩ := primitive_normal_threshold hb hbln hε Dn + obtain ⟨ηs,hηs,_,hslowzero⟩ := ExactCorrection.positive_power_threshold L u (1/2) hu (by norm_num) + obtain ⟨ηv,hηv,_,hinczero⟩ := primitive_normal_threshold hb hblm (by norm_num : (0:ℝ) < 1/2) Dmap + let ηold := min η (min η₀ (min ηn (min ηg ηB))) + have hηold : 0 < ηold := lt_min hη (lt_min hη₀ (lt_min hηn (lt_min hηg hηB))) + refine ⟨lp,b,u,min ηold (min ηs ηv),L,C+D,P 0+P R+Dmap,Dp,P,hb,hb16,hu, + lt_min hηold (lt_min hηs hηv), + (min_le_left _ _).trans ((min_le_left _ _).trans hη1),hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,hDp,hblp,hP,?_⟩ + intro z hz hznew + have hzη : z < ηold := hznew.trans_le (min_le_left _ _) + have hzs0 : z < ηs := hznew.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzv0 : z < ηv := hznew.trans_le ((min_le_right _ _).trans (min_le_right _ _)) + have hzη' : z < η := hzη.trans_le (min_le_left _ _) + have hz1 : z ≤ 1 := hzη'.le.trans hη1 + have hs : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hs1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hzs : z ≤ z^b := by + have hb1 : b ≤ 1 := by linarith + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hb1 + obtain ⟨G,hG,hclose,hmap,hmean⟩ := hmean z hz hzη' + have hGQ : MapsTo (lowJet (A₀.jetChartMap i G ∘ e.symm)) S Q' := + hnear G hG (fun j => ((hclose j).mono_order (by omega)).mono_const + (hsmall z hz (hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)))).le) + have hGv : ∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (A₀.jetChartMap i G ∘ e.symm) p,t) = + SurfaceVelocityFamily.normal (lowJet (A₀.jetChartMap i G ∘ e.symm) p) := by + intro p hp hpK t + exact hv _ (hQ'O (hGQ hp)) (by simpa only [lowJetPosition_lowJet] using hpK) t + obtain ⟨U,hzero,hUs,hrep,hinit,hVs,herror⟩ := hprimitive G hG hGQ K hK hKS hKA hone hGv + let V := A₀.phaseAtlasAnsatz i G e χ U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((R+2)+(2*(N+(R+2)+1)+1)) + have hsolved : A₀.TensorWeightedBound z (R+2) (C*z^(N+(R+2))) + (A₀.atlasPolynomialMetric (A₀.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) z G-g.inner) := + fun j => (hmean j).shrink_scale hz.le hz1 + have herr := (herror (z^b) z hz hzs hs1 hjet).2 g.inner g.contMDiff (C*z^(N+(R+2))) hsolved + have htot : 0 ≤ C*z^(N+(R+2))+D*z^(N+(R+2)+1)/(z^b)^lm := by positivity + have hfinal := A₀.tensorWeightedBound_unscaled hz hz1 htot herr + have hincrement := (herror (z^b) z hz hzs hs1 hjet).1 + have hsmallinc : Dmap*z/(z^b)^lm ≤ Dmap := by + apply (div_le_iff₀ (pow_pos hs _)).mpr + exact mul_le_mul_of_nonneg_left (slow_power_dominates_fast hz hz1 hb hblm) hDmap + have hGweighted := A₀.weighted_of_shifted_two hz.le hzs hs1 (hmap R) + have hincweighted : A₀.WeightedBound z R Dmap (V-G) := + fun j => ((hincrement j).mono_order (by omega)).mono_const hsmallinc + have hVweighted := A₀.weightedBound_add hG ((hVs z).sub hG) hz.le hGweighted hincweighted + have hvadd : G+(V-G) = V := by abel + change A₀.WeightedBound z R (P R+Dmap) (G+(V-G)) at hVweighted + rw [hvadd] at hVweighted + have hVweighted' : A₀.WeightedBound z R (P 0+P R+Dmap) V := + fun j => (hVweighted j).mono_const (by linarith [hP 0]) + have hshift := A₀.weighted_to_shifted (q := 2) (m := R) hz hz1 + (show 0 ≤ Dmap*z/(z^b)^lm by positivity) + (show A₀.WeightedBound z (2+R) (Dmap*z/(z^b)^lm) (V-G) from by + simpa only [V,Nat.add_comm R 2] using hincrement) + have hshift' : A₀.ShiftedBound 2 R z (Dmap/z^2) (V-G) := by + intro j k hk x + exact (hshift j k hk x).trans (div_le_div_of_nonneg_right hsmallinc (sq_nonneg z)) + have hvmap := A₀.shifted_map_recurrence hG ((hVs z).sub hG) + (hmap 0) (hmap R) hshift' hs hz.le hzs (hP 0) (hP R) + change A₀.ShiftedBound 2 R z (P 0+(z/(z^b))*P R+Dmap/z^2) (G+(V-G)) at hvmap + rw [hvadd] at hvmap + have hvmap' : A₀.ShiftedBound 2 R z ((P 0+P R+Dmap)/z^2) V := by + intro j k hk x + exact (hvmap j k hk x).trans (primitive_shifted_budget hz hz1 hzs (hP 0) (hP R) hDmap) + have hnall : ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (A₀.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + intro p hp + have heq := A₀.phaseAtlasAnsatz_normalTriple i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2 + change NormalFrame.gramDet _ _ ≠ 0 ∧ c < ‖_‖ + rw [show SurfaceVelocityFamily.Loop.primitiveNormalTriple (A₀.vectorChartRead i V ∘ e.symm) p = + SurfaceVelocityFamily.Loop.primitiveNormalTriple + (finiteAnsatz (A₀.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) p from heq] + have hh := hnormal (A₀.jetChartMap i G ∘ e.symm) ((A₀.jetChartMap_smooth i hG).comp hi) + hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + (hnsmall z hz (hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))))) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((A₀.jetChartMap i G ∘ e.symm) q)) = + A₀.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + have hext : ∀ p ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G := by + intro p hp + exact A₀.phaseAtlasAnsatz_eventuallyEq i G e hi hχs U hK hKA hzero ℓ (N+(R+2)+1) z hp + have hextK : ∀ p ∉ A₀.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro p hp + exact A₀.phaseAtlasAnsatz_eventuallyEq_precise i G e hi hχs U hK hzero ℓ + (N+(R+2)+1) z hp + have hlocal : ∀ p ∈ tsupport (A₀.weight i), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A₀.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + c/Dt < ‖RealModes.realSecondTensor (spaceCoordinates ∘ A₀.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))‖ := by + intro p hp + have hx : chart (i : M) p ∈ (A₀.chartWeightCompact i : Set JetPolynomial.Base) := ⟨p,hp,rfl⟩ + exact htransport V (hVs z) _ hx c hc + (hnall _ ⟨hTS (hcover hx),e.map_source (hcover hx)⟩) + have hglobal := hgeometry G V hG (hVs z) (L*z^u) (by positivity) + (hgsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))))) + (fun j => (hclose j).mono_order (by omega)) + (fun p hp => ⟨(hlocal p hp).1,norm_pos_iff.mp (hcLocal.trans (hlocal p hp).2)⟩) hext + have hBglobal := hmargin G V hG (hVs z) hglobal.1 (L*z^u) (by positivity) + (hBsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)))))) + (fun j => (hclose j).mono_order (by omega)) (fun p hp => (hlocal p hp).2) hext + have hFzero : A₀.WeightedBound 1 0 V₀ F := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hF₀ j 0 (by omega) x + have hslow0 : A₀.WeightedBound 1 0 (1/2) (G-F) := fun j => + ((hclose j).mono_order (Nat.zero_le _)).mono_const (hslowzero z hz hzs0).le + have hinc0 : A₀.WeightedBound 1 0 (1/2) (V-G) := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + have hh := hincrement j 0 (by omega) x hx + simp only [pow_zero,one_mul] at hh ⊢ + exact hh.trans (hinczero z hz hzv0).le + have hsum0 := A₀.weightedBound_add hF (hG.sub hF) zero_le_one hFzero hslow0 + have hsum1 := A₀.weightedBound_add (hF.add (hG.sub hF)) ((hVs z).sub hG) + zero_le_one hsum0 hinc0 + have hVzero : A₀.WeightedBound 1 0 (V₀+1) V := by + change A₀.WeightedBound 1 0 (V₀+1/2+1/2) (F+(G-F)+(V-G)) at hsum1 + have hsumid : F+(G-F)+(V-G) = V := by abel + rw [hsumid] at hsum1 + convert hsum1 using 1; ring + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hVzero,hvmap',?_,hglobal.1,hglobal.2,hBglobal,hnall,hext,hextK,?_⟩ + · intro j + apply ((hfinal j).mono_order (by omega)).mono_const + have hlead : C*z^(N+(R+2))/z^(R+2) = C*z^N := by + rw [pow_add,← mul_assoc,mul_div_cancel_right₀ _ (pow_ne_zero _ hz.ne')] + rw [add_div,hlead] + have htail := mul_le_mul_of_nonneg_left + (primitive_tail_power_bound (N := N) (R := R+2) hz hz1 hb hblm) hD + have heq : D*z^(N+(R+2)+1)/(z^b)^lm/z^(R+2) = D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) := by ring + rw [heq] + calc + C*z^N+D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) ≤ C*z^N+D*z^N := add_le_add le_rfl htail + _ = (C+D)*z^N := by ring + + · refine ⟨hG,fun p hp => hQ'O (hGQ hp),?_⟩ + intro p hp + change ‖SurfaceVelocityFamily.Loop.primitiveJetProfile + (A₀.vectorChartRead i V ∘ e.symm) z p - _‖ ≤ _ + rw [show SurfaceVelocityFamily.Loop.primitiveJetProfile + (A₀.vectorChartRead i V ∘ e.symm) z p = + SurfaceVelocityFamily.Loop.primitiveJetProfile + (finiteAnsatz (A₀.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) z p from + A₀.phaseAtlasAnsatz_jetProfile i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2] + have hh := hprofile (A₀.jetChartMap i G ∘ e.symm) + ((A₀.jetChartMap_smooth i hG).comp hi) hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((A₀.jetChartMap i G ∘ e.symm) q)) = + A₀.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/InteriorVelocityPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/InteriorVelocityPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e16d473d33e52842b28533e374c06f876c6387c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/InteriorVelocityPath.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityDirections + +namespace OAI + +/-! The interior oscillatory path covers the whole velocity circle. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +def interiorPath (A h t : ℝ) : Plane := + ![Real.cos (h + A * Real.cos (2 * Real.pi * t)), + Real.sin (h + A * Real.cos (2 * Real.pi * t))] + +lemma interiorPath_continuous (A h : ℝ) : Continuous (interiorPath A h) := by + apply continuous_pi + intro i + fin_cases i + · change Continuous (fun t => Real.cos (h + A * Real.cos (2 * Real.pi * t))) + fun_prop + · change Continuous (fun t => Real.sin (h + A * Real.cos (2 * Real.pi * t))) + fun_prop + +/-- All circle directions occur away from the endpoints and turning points. -/ +theorem interiorPath_covers {A h : ℝ} (hA : Real.pi + |h| < A) + {e : Plane} (he : e 0 ^ 2 + e 1 ^ 2 = 1) : + ∃ t ∈ Ioo (0 : ℝ) 1, interiorPath A h t = e := by + obtain ⟨β, hβ, hcos, hsin⟩ := unit_direction_angle he + have hAp : 0 < A := lt_of_lt_of_le Real.pi_pos (by linarith [abs_nonneg h]) + have hlo : -1 < (β - h) / A := (lt_div_iff₀ hAp).mpr (by linarith [le_abs_self h, hβ.1]) + have hhi : (β - h) / A < 1 := (div_lt_iff₀ hAp).mpr (by linarith [neg_abs_le h, hβ.2]) + let x := Real.arccos ((β - h) / A) + have hx0 : 0 < x := Real.arccos_pos.mpr hhi + have hxπ : x < Real.pi := Real.arccos_lt_pi.mpr hlo + have hp : 0 < 2 * Real.pi := by positivity + refine ⟨x / (2 * Real.pi), ⟨div_pos hx0 hp, (div_lt_one hp).mpr (by linarith [Real.pi_pos])⟩, ?_⟩ + have hcancel : 2 * Real.pi * (x / (2 * Real.pi)) = x := by field_simp + have hcx : Real.cos x = (β - h) / A := Real.cos_arccos hlo.le hhi.le + have harg : h + A * ((β - h) / A) = β := by field_simp; ring + ext i + fin_cases i <;> simp [interiorPath, hcancel, hcx, harg, hcos, hsin] + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicCrossingNaturality.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicCrossingNaturality.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7d63358b60f98a96383291d6b19cacf957a73b3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicCrossingNaturality.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingPositivePairing +import OAI.Geometry.SurfaceImmersion.Primitive.LocalIntrinsicCrossing +import OAI.Geometry.Immersion.ClosedSurface.SmoothCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity + +namespace OAI + +/-! The intrinsic ordered crossing is expressed entirely by the second +fundamental form, and is unchanged under smooth coordinate changes. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.VelocityFrame +open SmallModes RealModes NormalFrame PhaseGeometry + +lemma orderedCrossing_intrinsic_eq {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p v w : Base) (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + orderedCrossing F v w p + (coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p) = + (realSecondForm F v w p ⬝ᵥ normalize (realSecondForm F v v p))^2 + + realSecondForm F v v p ⬝ᵥ realSecondForm F w w p - + realSecondForm F v w p ⬝ᵥ realSecondForm F v w p := by + have hgram : gramDet (coordDeriv v F p) (coordDeriv w F p) = + (v.1*w.2-v.2*w.1)^2*gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + rw [coordDeriv_eq_basis F v,coordDeriv_eq_basis F w,gramDet_change_basis] + have hg := secondForm_gauss_directions hF p v w + rw [gauss_metric_identity hF p hD,coordinateGauss_eq_curvature_mul F p hD] at hg + unfold orderedCrossing + rw [hgram] + nlinarith only [hg] + +lemma orderedCrossing_intrinsic_eq_on {F : RField 4} {U : Set Base} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) + {p : Base} (hp : p ∈ U) (v w : Base) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + orderedCrossing F v w p + (coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p) = + (realSecondForm F v w p ⬝ᵥ normalize (realSecondForm F v v p))^2 + + realSecondForm F v v p ⬝ᵥ realSecondForm F w w p - + realSecondForm F v w p ⬝ᵥ realSecondForm F v w p := by + obtain ⟨G,hG,_,_,he⟩ := smooth_extension_near hU hF.contMDiffOn hp + have hd : gramDet (coordDeriv dx G p) (coordDeriv dy G p) ≠ 0 := by + simpa only [(coordDeriv_eventuallyEq he dx).eq_of_nhds, + (coordDeriv_eventuallyEq he dy).eq_of_nhds] using hD + have hh := orderedCrossing_intrinsic_eq hG.contDiff p v w hd + unfold orderedCrossing at hh ⊢ + simpa only [(realSecondForm_eventuallyEq he v w).eq_of_nhds, + (realSecondForm_eventuallyEq he v v).eq_of_nhds, + (realSecondForm_eventuallyEq he w w).eq_of_nhds, + (coordDeriv_eventuallyEq he v).eq_of_nhds,(coordDeriv_eventuallyEq he w).eq_of_nhds, + inducedCurvature_congr_germ he] using hh + +lemma orderedCrossing_intrinsic_comp {F : RField 4} {φ : Base → Base} + (hF : ContDiff ℝ ∞ F) (hφ : ContDiff ℝ ∞ φ) (p v w : Base) + (hD : gramDet (coordDeriv dx F (φ p)) (coordDeriv dy F (φ p)) ≠ 0) + (hdet : coordDet (fderiv ℝ φ p) ≠ 0) : + orderedCrossing (F ∘ φ) v w p + (coordinateGaussianCurvature (realMetric (F ∘ φ) dx dx) + (realMetric (F ∘ φ) dx dy) (realMetric (F ∘ φ) dy dy) p) = + orderedCrossing F (fderiv ℝ φ p v) (fderiv ℝ φ p w) (φ p) + (coordinateGaussianCurvature (realMetric F dx dx) + (realMetric F dx dy) (realMetric F dy dy) (φ p)) := by + have hd : gramDet (coordDeriv dx (F ∘ φ) p) (coordDeriv dy (F ∘ φ) p) ≠ 0 := by + rw [gramDet_comp_smooth hF hφ] + exact mul_ne_zero (pow_ne_zero 2 hdet) hD + rw [orderedCrossing_intrinsic_eq (hF.comp hφ) p v w hd, + orderedCrossing_intrinsic_eq hF (φ p) _ _ hD, + realSecondForm_comp_smooth hF hφ v w p hD hdet, + realSecondForm_comp_smooth hF hφ v v p hD hdet, + realSecondForm_comp_smooth hF hφ w w p hD hdet] + +lemma orderedCrossing_intrinsic_germ {F G : RField 4} {p : Base} + (h : F =ᶠ[𝓝 p] G) (v w : Base) : + orderedCrossing F v w p + (coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p) = + orderedCrossing G v w p + (coordinateGaussianCurvature (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p) := by + unfold orderedCrossing + simp only [(realSecondForm_eventuallyEq h v w).eq_of_nhds, + (realSecondForm_eventuallyEq h v v).eq_of_nhds, + (coordDeriv_eventuallyEq h v).eq_of_nhds,(coordDeriv_eventuallyEq h w).eq_of_nhds, + inducedCurvature_congr_germ h] + +lemma orderedCrossing_intrinsic_comp_on {F : RField 4} {φ : Base → Base} + {U V : Set Base} (hU : IsOpen U) (hV : IsOpen V) + (hF : ContDiffOn ℝ ∞ F V) (hφ : ContDiffOn ℝ ∞ φ U) + {p : Base} (hp : p ∈ U) (hφp : φ p ∈ V) (v w : Base) + (hD : gramDet (coordDeriv dx F (φ p)) (coordDeriv dy F (φ p)) ≠ 0) + (hdet : coordDet (fderiv ℝ φ p) ≠ 0) : + orderedCrossing (F ∘ φ) v w p + (coordinateGaussianCurvature (realMetric (F ∘ φ) dx dx) + (realMetric (F ∘ φ) dx dy) (realMetric (F ∘ φ) dy dy) p) = + orderedCrossing F (fderiv ℝ φ p v) (fderiv ℝ φ p w) (φ p) + (coordinateGaussianCurvature (realMetric F dx dx) + (realMetric F dx dy) (realMetric F dy dy) (φ p)) := by + obtain ⟨G,hG,_,_,heG⟩ := smooth_extension_near hV hF.contMDiffOn hφp + obtain ⟨Φ,hΦ,_,_,heΦ⟩ := smooth_extension_near hU hφ.contMDiffOn hp + have ep := heΦ.eq_of_nhds + have eD := heΦ.fderiv_eq (𝕜 := ℝ) + have hc : ContinuousAt φ p := (hφ p hp).contDiffAt (hU.mem_nhds hp) |>.continuousAt + have hecomp : G ∘ Φ =ᶠ[𝓝 p] F ∘ φ := by + filter_upwards [heΦ,heG.comp_tendsto hc] with q hqΦ hqG + simpa only [Function.comp_apply,hqΦ] using hqG + have hDG : gramDet (coordDeriv dx G (Φ p)) (coordDeriv dy G (Φ p)) ≠ 0 := by + rw [ep,(coordDeriv_eventuallyEq heG dx).eq_of_nhds, + (coordDeriv_eventuallyEq heG dy).eq_of_nhds] + exact hD + have hh := orderedCrossing_intrinsic_comp hG.contDiff hΦ.contDiff p v w hDG + (by simpa only [eD] using hdet) + rw [orderedCrossing_intrinsic_germ hecomp v w,eD,ep, + orderedCrossing_intrinsic_germ heG _ _] at hh + exact hh + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicExteriorCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicExteriorCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..d88b4211bdcbc3e6c143992e944d369ce80d5c1f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/IntrinsicExteriorCrossings.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetCurvature +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryJetCrossings + +namespace OAI + +/-! Exterior C2 stability for both ordered crossings with the new +immersion's actual Gaussian curvature. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def intrinsicBoundaryJetCrossings : Set (BoundaryProfile × (Base × Base)) := + {a | (a.1,a.2.1,a.2.2,boundaryJetCurvature a.1) ∈ boundaryJetCrossings} + +lemma isOpen_intrinsicBoundaryJetCrossings : IsOpen intrinsicBoundaryJetCrossings := by + apply isOpen_iff_mem_nhds.mpr + intro a ha + have hc := (continuousAt_boundaryJetCurvature ha.1).comp + (f := fun b : BoundaryProfile × (Base × Base) => b.1) (x := a) + continuous_fst.continuousAt + have hm : ContinuousAt (fun b : BoundaryProfile × (Base × Base) => + (b.1,b.2.1,b.2.2,boundaryJetCurvature b.1)) a := + continuous_fst.continuousAt.prodMk + ((continuous_fst.comp continuous_snd).continuousAt.prodMk + ((continuous_snd.comp continuous_snd).continuousAt.prodMk hc)) + exact hm.eventually (isOpen_boundaryJetCrossings.mem_nhds ha) + +theorem compact_intrinsic_boundary_crossings {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} {v w : X → Base} + (hJ : Continuous J) (hv : Continuous v) (hw : Continuous w) + (hold : ∀ x, (J x,v x,w x) ∈ intrinsicBoundaryJetCrossings) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ H : BoundaryProfile, + ‖H-J x‖ < δ → (H,v x,w x) ∈ intrinsicBoundaryJetCrossings := by + let f := fun x => (J x,v x,w x) + have hf : Continuous f := hJ.prodMk (hv.prodMk hw) + obtain ⟨δ,hδ,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open + isOpen_intrinsicBoundaryJetCrossings (by rintro _ ⟨x,rfl⟩; exact hold x) + refine ⟨δ,hδ,?_⟩ + intro x H hH + apply hsub + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (H,(v x,w x)) (J x,(v x,w x)) < δ + rwa [dist_prod_same_right,dist_eq_norm] + +theorem compact_actual_intrinsic_crossings {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {v w : X → Base} + (hp : Continuous p) (hv : Continuous v) (hw : Continuous w) + (hD : ∀ x, gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x)) ≠ 0) + (hP : ∀ x, realSecondForm F (v x) (v x) (p x) ≠ 0) + (hQ : ∀ x, realSecondForm F (w x) (w x) (p x) ≠ 0) + (hcross : ∀ x, + let κ := coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) + (realMetric F dy dy) (p x) + 0 < orderedCrossing F (v x) (w x) (p x) κ ∧ + 0 < orderedCrossing F (w x) (v x) (p x) κ) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + let κ := coordinateGaussianCurvature (realMetric G dx dx) (realMetric G dx dy) + (realMetric G dy dy) (p x) + 0 < orderedCrossing G (v x) (w x) (p x) κ ∧ + 0 < orderedCrossing G (w x) (v x) (p x) κ := by + have hJ : Continuous (fun x => realBoundaryProfile F 1 (p x)) := + (realBoundaryProfile_smooth hF 1).continuous.comp hp + obtain ⟨δ,hδ,hclose⟩ := compact_intrinsic_boundary_crossings hJ hv hw (by + intro x + change (realBoundaryProfile F 1 (p x),v x,w x, + boundaryJetCurvature (realBoundaryProfile F 1 (p x))) ∈ boundaryJetCrossings + rw [boundaryJetCurvature_actual hF _ (hD x)] + refine ⟨hD x,?_,?_,?_,?_⟩ + · rw [boundaryJetSecond_actual hF]; exact hP x + · rw [boundaryJetSecond_actual hF]; exact hQ x + · rw [boundaryJetCrossing_actual hF]; exact (hcross x).1 + · rw [boundaryJetCrossing_actual hF]; exact (hcross x).2) + refine ⟨δ,hδ,?_⟩ + intro x G hG hnear + have hm := hclose x (realBoundaryProfile G 1 (p x)) hnear + have hDG : gramDet (coordDeriv dx G (p x)) (coordDeriv dy G (p x)) ≠ 0 := hm.1 + have hh := hm.2.2.2 + rw [boundaryJetCurvature_actual hG _ hDG] at hh + simpa only [boundaryJetCrossing_actual hG] using hh + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetLoopPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetLoopPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3f78ab2591516abff3912b83718ec5bbdf9b1e1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetLoopPullback.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityFamily +import OAI.Geometry.SurfaceImmersion.Primitive.GeometricJetVelocity + +namespace OAI + +/-! Transfer the constructed geometric loop to the ordered coordinate jets +used by the quantitative finite correction. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates SurfaceJetCoordinates + +def jetDomain (Ω : TopologicalSpace.Opens CollarVelocity.JetBase) : + TopologicalSpace.Opens LowJet := + ⟨decode ⁻¹' Ω, Ω.isOpen.preimage decode_smooth.continuous⟩ + +/-- The velocity supplied by the geometric construction, expressed in the +analytic second-jet coordinates. All its identities survive this pullback. -/ +def Loop.ofGeometric {Ω : TopologicalSpace.Opens CollarVelocity.JetBase} + {a : CollarVelocity.JetBase → ℝ} {V : CollarVelocity.JetBase × ℝ → RVec 4} + (ha : ContDiffOn ℝ ∞ a Ω) (hV : ContDiffOn ℝ ∞ V (Ω ×ˢ univ)) + (hper : ∀ j ∈ Ω, Function.Periodic (fun t => V (j, t)) 1) + (hD : ∀ j ∈ Ω, NormalFrame.gramDet (j.2 1) (j.2 4) ≠ 0) + (hn : ∀ j ∈ Ω, realNormalPart (j.2 1) (j.2 4) (j.2 0) ≠ 0 ∨ a j ≠ 0) + (hy : ∀ j ∈ Ω, ∀ t, j.2 1 ⬝ᵥ V (j, t) = 0) + (hc : ∀ j ∈ Ω, ∀ t, j.2 4 ⬝ᵥ V (j, t) = 0) + (hlen : ∀ j ∈ Ω, ∀ t, V (j, t) ⬝ᵥ V (j, t) = + realNormalPart (j.2 1) (j.2 4) (j.2 0) ⬝ᵥ + realNormalPart (j.2 1) (j.2 4) (j.2 0) + a j ^ 2) + (hm : ∀ j ∈ Ω, (∫ t in 0..1, V (j, t)) = realNormalPart (j.2 1) (j.2 4) (j.2 0)) : + Loop (jetDomain Ω) where + amplitude := a ∘ decode + smoothAmplitude := ha.comp decode_smooth.contDiffOn (fun _ hJ => hJ) + velocity z := V (decode z.1, z.2) + smoothVelocity := hV.comp + ((decode_smooth.contDiffOn.comp contDiffOn_fst (fun z _ => mem_univ z.1)).prodMk + contDiffOn_snd) (fun _ hz => ⟨hz.1, hz.2⟩) + periodic J hJ := hper (decode J) hJ + gram_ne J hJ := hD (decode J) hJ + nonzero J hJ := hn (decode J) hJ + perpY J hJ := hy (decode J) hJ + perpC J hJ := hc (decode J) hJ + length J hJ := hlen (decode J) hJ + mean J hJ := hm (decode J) hJ + +lemma actual_jet_mem {Ω : TopologicalSpace.Opens CollarVelocity.JetBase} + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : JetPolynomial.Base} + (hp : CollarVelocity.jetSection F (baseEquiv p) ∈ Ω) : + lowJet (F ∘ baseEquiv) p ∈ jetDomain Ω := by + change decode (lowJet (F ∘ baseEquiv) p) ∈ Ω + rwa [decode_lowJet hF] + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd402fb0fd60fd5725f20ec9a6e8553f992a98b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityCoordinates.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceJetCoordinates +import OAI.Geometry.Immersion.ClosedSurface.ChartModel +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrector + +namespace OAI + +/-! Euclidean coordinates for the geometric velocity and the actual ordered +jets used in the finite periodic expansion. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetVelocityCoordinates +open RealModes JetPolynomial + +abbrev Euclidean := EuclideanSpace ℝ (Fin 4) + +def toEuclidean : RVec 4 ≃L[ℝ] Euclidean := spaceCoordinates.symm + +lemma inner_toEuclidean (v w : RVec 4) : + inner ℝ (toEuclidean v) (toEuclidean w) = v ⬝ᵥ w := by + simpa [toEuclidean] using (spaceCoordinates_dot (spaceCoordinates.symm v) + (spaceCoordinates.symm w)).symm + +lemma gram_toEuclidean (v w : RVec 4) : + PeriodicCorrector.gramDet (toEuclidean v) (toEuclidean w) = + NormalFrame.gramDet v w := by + simp only [PeriodicCorrector.gramDet, NormalFrame.gramDet, inner_toEuclidean] + +def slot (i : Fin 7) (J : LowJet) : RVec 4 := fun a => J (.inr (i, a)) + +lemma slot_smooth (i : Fin 7) : ContDiff ℝ ∞ (slot i) := by + apply contDiff_pi.mpr + intro a + exact (ContinuousLinearMap.proj (.inr (i, a)) : LowJet →L[ℝ] ℝ).contDiff + +lemma slot_decode_x (J : LowJet) : (SurfaceJetCoordinates.decode J).2 0 = slot 1 J := rfl +lemma slot_decode_y (J : LowJet) : (SurfaceJetCoordinates.decode J).2 1 = slot 2 J := rfl +lemma slot_decode_yy (J : LowJet) : (SurfaceJetCoordinates.decode J).2 4 = slot 6 J := rfl + +lemma slot_y_derivative {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (p : JetPolynomial.Base) : + fderiv ℝ (fun q => slot 2 (lowJet G q)) p (coordinateVector 1) = slot 6 (lowJet G p) := by + funext a + have hs := (slot_smooth 2).comp (lowJet_smooth hG) + have he := congrArg (fun L : JetPolynomial.Base →L[ℝ] ℝ => L (coordinateVector 1)) + (fderiv_apply (hs.differentiable (by simp) p) a) + calc + _ = fderiv ℝ (fun q => lowJet G q (.inr (2, a))) p (coordinateVector 1) := he.symm + _ = lowDerivative G 1 p (.inr (2, a)) := lowJet_coordinate_derivative G 1 _ p + _ = slot 6 (lowJet G p) a := rfl + +lemma euclidean_y_derivative {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (p : JetPolynomial.Base) : + fderiv ℝ (fun q => toEuclidean (slot 2 (lowJet G q))) p (coordinateVector 1) = + toEuclidean (slot 6 (lowJet G p)) := by + have hs := (slot_smooth 2).comp (lowJet_smooth hG) + have hd := (toEuclidean.hasFDerivAt.comp p + (hs.differentiable (by simp) p).hasFDerivAt).fderiv + calc + _ = toEuclidean (fderiv ℝ (fun q => slot 2 (lowJet G q)) p (coordinateVector 1)) := + congrArg (fun L : JetPolynomial.Base →L[ℝ] Euclidean => L (coordinateVector 1)) hd + _ = _ := congrArg toEuclidean (slot_y_derivative hG p) + +lemma tangential_part_perp (X Y C w : RVec 4) + (hY : Y ⬝ᵥ w = 0) (hC : C ⬝ᵥ w = 0) : + (X - realNormalPart Y C X) ⬝ᵥ w = 0 := by + simp only [realNormalPart, sub_dotProduct, smul_dotProduct, hY, hC, + smul_eq_mul, mul_zero, sub_zero, sub_self] + +end ClosedSurfaceR4.JetVelocityCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..a87774022173cd298e75f0809ee060f1c3571a5b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/JetVelocityLoop.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ControlledCollarLoop +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveDensityPullback +import OAI.Geometry.Immersion.ClosedSurface.NormalJets + +namespace OAI + +/-! A controlled loop on a neighborhood of the actual second-jet section. +Its translation depends on position alone, so the prescribed turn derivatives +along the original section persist under the joint density construction. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open RealModes TransverseSmallFunction + +abbrev JetBase := Base × RealTwoJet + +def jetSection (F : RField 4) (x : Base) : JetBase := (x, realTwoJet F x) + +lemma jetSection_smooth {F : RField 4} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (jetSection F) := contDiff_id.prodMk (contDiff_realTwoJet hF) + +def jetAngle (ρ : JetBase × ℝ → ℝ) (a A s h : JetBase → ℝ) : JetBase × ℝ → ℝ := + PositiveDensity.reparametrize ρ + (fun z => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2) + +lemma jetAngle_on_section (F : RField 4) (ρ : JetBase × ℝ → ℝ) + (a A s : JetBase → ℝ) (h : Base → ℝ) (x : Base) (t : ℝ) : + jetAngle ρ a A s (fun z => h z.1) (jetSection F x, t) = + normalizedAngle (PositiveDensity.pullbackDensity ρ (jetSection F)) + (a ∘ jetSection F) (A ∘ jetSection F) (s ∘ jetSection F) h (x, t) := rfl + +theorem controlled_jet_loop {F : RField 4} (hF : ContDiff ℝ ∞ F) + {K O P : Set Base} {L U C : Set JetBase} + (hK : IsCompact K) (hL : IsCompact L) (hKL : MapsTo (jetSection F) K L) + (hO : IsOpen O) (hKO : K ⊆ O) + (hOU : ∀ j ∈ U, j.1 ∉ O) + (hU : IsOpen U) (hC : IsClosed C) (hCU : C ⊆ U) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {a A s : JetBase → ℝ} {c : JetBase → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hc : ContDiff ℝ ∞ c) + (hapos : ∀ x ∈ K, 0 < a (jetSection F x)) + (hcollar : ∀ j ∈ U, s j = 0 ∧ c j = ![(1 - a j ^ 2 / 2) / (1 + a j ^ 2 / 2), 0]) + (hshape : ∀ j ∈ L \ U, + (0 < a j ∧ 2 * Real.arctan (a j) ≤ A j ∧ s j ∈ Icc (0 : ℝ) 1 ∧ + c j = ![(1 - a j ^ 2 / 2) / (1 + a j ^ 2 / 2), 0]) ∨ + (s j = 1 ∧ Real.pi < A j ∧ c j 0 ^ 2 + c j 1 ^ 2 < 1)) + (T : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ h : Base → ℝ, ContDiff ℝ ∞ h ∧ HasCompactSupport h ∧ tsupport h ⊆ O ∧ + (∀ x, |h x| < ε) ∧ ∃ W : Set JetBase, IsOpen W ∧ L ⊆ W ∧ + ∃ ρ : JetBase × ℝ → ℝ, ContDiffOn ℝ ∞ ρ (W ×ˢ univ) ∧ + (∀ j ∈ W, ∀ t, 0 < ρ (j, t)) ∧ + (∀ j, Function.Periodic (fun t => ρ (j, t)) 1) ∧ + (∀ j ∈ W, (∫ t in 0..1, ρ (j, t)) = 1) ∧ + (∀ j ∈ W ∩ C, ∀ t, ρ (j, t) = unitDensity (a j) t) ∧ + ContDiffOn ℝ ∞ (jetAngle ρ a A s (fun j => h j.1)) (W ×ˢ univ) ∧ + (∀ j ∈ W, Function.Periodic (fun t => jetAngle ρ a A s (fun j => h j.1) (j, t)) 1) ∧ + (∀ j ∈ W, (∫ t in 0..1, + ![Real.cos (jetAngle ρ a A s (fun j => h j.1) (j, t)), + Real.sin (jetAngle ρ a A s (fun j => h j.1) (j, t))]) = c j) ∧ + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => jetAngle ρ a A s (fun j => h j.1) (jetSection F x, t)) θ = 0 ↔ + θ = 0 ∨ θ = PositiveDensity.clock ρ (jetSection F x) (1 / 2)) ∧ + ∀ x ∈ K, + T < fderiv ℝ (fun y => jetAngle ρ a A s (fun j => h j.1) (jetSection F y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => jetAngle ρ a A s (fun j => h j.1) + (jetSection F y, PositiveDensity.clock ρ (jetSection F x) (1 / 2))) x (0, 1) := by + have hσ := jetSection_smooth hF + have haσ := ha.comp hσ + have hAσ := hA.comp hσ + have hsσ := hs.comp hσ + obtain ⟨δ, hδ, hdensity⟩ := small_shift_collar_density ha hA hs hc hU hC hCU hL hcollar hshape + obtain ⟨h, hh, hhc, hhs, hhb, hlarge⟩ := exists_small_turn_function + hK hO hKO hP hPK hlocal haσ hAσ hsσ T (lt_min hε hδ) + let H : JetBase → ℝ := fun j => h j.1 + have hH : ContDiff ℝ ∞ H := hh.comp contDiff_fst + have hHδ : ∀ j, |H j| < δ := fun j => lt_of_lt_of_le (hhb j.1) (min_le_right _ _) + have hHz : ∀ j ∈ U, H j = 0 := by + intro j hj + by_contra hn + exact hOU j hj (hhs (subset_tsupport h (Function.mem_support.mpr hn))) + obtain ⟨W, hW, hLW, ρ, hρ, hpos, hper, hmom, hfixed⟩ := hdensity H hH hHδ hHz + have hboth (j : JetBase) (hj : j ∈ W) := LoopDensity.mass_and_mean + (LocalPeriodicCalculus.smooth_slice hW hρ hj).continuous + ((blendedPath_smooth ha hA hs hH).continuous.comp + (continuous_const.prodMk continuous_id)) (hmom j hj) + have hmass : ∀ j ∈ W, (∫ t in 0..1, ρ (j, t)) = 1 := fun j hj => (hboth j hj).1 + have hα := PositiveDensity.reparametrize_smoothOn hW hρ hpos + (fun j _ => hper j) hmass (unitAngle_smooth ha hA hs hH).contDiffOn + let Wσ := (jetSection F) ⁻¹' W + have hWσ : IsOpen Wσ := hW.preimage hσ.continuous + have hKWσ : K ⊆ Wσ := fun x hx => hLW (hKL hx) + let ρσ := PositiveDensity.pullbackDensity ρ (jetSection F) + have hρσ : ContDiffOn ℝ ∞ ρσ (Wσ ×ˢ univ) := + PositiveDensity.pullbackDensity_smoothOn hρ hσ.contDiffOn (fun _ hx => hx) + have hposσ : ∀ x ∈ Wσ, ∀ t, 0 < ρσ (x, t) := fun x hx t => hpos _ hx t + have hperσ : ∀ x ∈ Wσ, Function.Periodic (fun t => ρσ (x, t)) 1 := + fun x _ => hper (jetSection F x) + have hmassσ : ∀ x ∈ Wσ, (∫ t in 0..1, ρσ (x, t)) = 1 := fun x hx => hmass _ hx + refine ⟨h, hh, hhc, hhs, (fun x => lt_of_lt_of_le (hhb x) (min_le_left _ _)), + W, hW, hLW, ρ, hρ, hpos, hper, hmass, hfixed, hα, ?_, ?_, ?_, ?_⟩ + · exact fun j hj => PositiveDensity.reparametrize_periodic hW hρ hpos + (fun j _ => hper j) hmass (fun j _ => unitAngle_periodic (a j) (A j) (s j) (H j)) hj + · intro j hj + exact (PositiveDensity.reparametrize_mean hW hρ hpos (fun j _ => hper j) hmass + (blendedPath_smooth ha hA hs hH).contDiffOn hj).trans (hboth j hj).2 + · intro x hx θ hθ + have hnotU : jetSection F x ∉ U := fun hj => hOU _ hj (hKO hx) + have hAb : 0 < A (jetSection F x) := by + rcases hshape _ ⟨hKL hx, hnotU⟩ with hbase | hinterior + · exact lt_of_lt_of_le (mul_pos (by norm_num) (Real.arctan_pos.mpr hbase.1)) hbase.2.1 + · exact Real.pi_pos.trans hinterior.2.1 + have hsb : s (jetSection F x) ∈ Icc (0 : ℝ) 1 := by + rcases hshape _ ⟨hKL hx, hnotU⟩ with hbase | hinterior + · exact hbase.2.2.1 + · rw [hinterior.1]; exact ⟨zero_le_one, le_rfl⟩ + simpa only [jetAngle_on_section, ρσ, normalizedAngle, PositiveDensity.clock_pullback] using reparametrized_two_turns + haσ hAσ hsσ hh hWσ hρσ hposσ hperσ hmassσ (hKWσ hx) (hapos x hx) hAb hsb hθ + · simpa only [jetAngle_on_section, ρσ, normalizedAngle, PositiveDensity.clock_pullback] using large_turns_after_reparametrization + haσ hAσ hsσ hh hWσ hKWσ hρσ hposσ hperσ hmassσ hlarge + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileIdentification.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileIdentification.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6c633a3b71484de000d9b32cd827d29a928cbb3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileIdentification.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileMap + +namespace OAI + +/-! The finite-dimensional leading-profile map evaluates to the exact +geometric velocity and its derivatives in the primitive construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates GeometryPreservation CovarianceCorrector +open LocalPeriodicExpansion +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +private lemma jet_parameter_pullback_derivative {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (c : LowJet × ℝ → RealModes.RVec 4) + (p : JetPolynomial.Base) (t : ℝ) (hc : DifferentiableAt ℝ c (lowJet G p,t)) + (v : JetPolynomial.Base) (a : ℝ) : + fderiv ℝ (fun q : JetPolynomial.Base × ℝ => + JetVelocityCoordinates.toEuclidean (c (lowJet G q.1,q.2))) (p,t) (v,a) = + JetVelocityCoordinates.toEuclidean (fderiv ℝ c (lowJet G p,t) + (fderiv ℝ (lowJet G) p v,a)) := by + have hlow : HasFDerivAt (lowJet G) (fderiv ℝ (lowJet G) p) p := + ((lowJet_smooth hG).differentiable (by simp) p).hasFDerivAt + have hfirst : HasFDerivAt (fun q : JetPolynomial.Base × ℝ => lowJet G q.1) + ((fderiv ℝ (lowJet G) p).comp (ContinuousLinearMap.fst ℝ JetPolynomial.Base ℝ)) (p,t) := + by + simpa only [Function.comp_def] using + (hlow.comp (p,t) (hasFDerivAt_fst (𝕜 := ℝ) (p := (p,t)))) + have hP : HasFDerivAt (fun q : JetPolynomial.Base × ℝ => (lowJet G q.1,q.2)) + (((fderiv ℝ (lowJet G) p).comp (ContinuousLinearMap.fst ℝ JetPolynomial.Base ℝ)).prod + (ContinuousLinearMap.snd ℝ JetPolynomial.Base ℝ)) (p,t) := + hfirst.prodMk (ContinuousLinearMap.snd ℝ JetPolynomial.Base ℝ).hasFDerivAt + have hd := ((JetVelocityCoordinates.toEuclidean.hasFDerivAt.comp (lowJet G p,t) + hc.hasFDerivAt).comp (p,t) hP).fderiv + change (fderiv ℝ ((JetVelocityCoordinates.toEuclidean ∘ c) ∘ + (fun q : JetPolynomial.Base × ℝ => (lowJet G q.1,q.2))) (p,t)) (v,a) = _ + rw [hd] + rfl + +lemma geometry_longitudinal_value {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + (l.geometry G hG hGO).longitudinal.val p (t : Period) = + JetVelocityCoordinates.toEuclidean (l.leadingVelocity (lowJet G p,t)) := by + rw [Geometry.longitudinal,Family.add_apply,Family.constant_apply _ _ hp, + l.geometry_velocity hG hGO hp,l.euclideanVelocity_apply (hGO hp)] + exact (map_add JetVelocityCoordinates.toEuclidean _ _).symm + +/-- All five entries depend on the third jet only through the single +transverse derivative of the second jet. -/ +theorem leadingProfileMap_geometry {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + l.leadingProfileMap ((lowJet G p,t),lowDerivative G 1 p) = + ![(l.geometry G hG hGO).longitudinal.val p (t : Period), + (l.geometry G hG hGO).Y p,(l.geometry G hG hGO).C p, + ((l.geometry G hG hGO).longitudinal.slow (coordinateVector 1)).val p (t : Period), + (l.geometry G hG hGO).V.angle.val p (t : Period)] := by + have hlong : (fun q : JetPolynomial.Base × ℝ => + (l.geometry G hG hGO).longitudinal.val q.1 (q.2 : Period)) =ᶠ[𝓝 (p,t)] + (fun q => JetVelocityCoordinates.toEuclidean (l.leadingVelocity (lowJet G q.1,q.2))) := by + filter_upwards [(S.isOpen.prod isOpen_univ).mem_nhds ⟨hp,mem_univ t⟩] with q hq + exact l.geometry_longitudinal_value hG hGO hq.1 q.2 + have hvel : (fun q : JetPolynomial.Base × ℝ => + (l.geometry G hG hGO).V.val q.1 (q.2 : Period)) =ᶠ[𝓝 (p,t)] + (fun q => JetVelocityCoordinates.toEuclidean (l.velocity (lowJet G q.1,q.2))) := by + filter_upwards [(S.isOpen.prod isOpen_univ).mem_nhds ⟨hp,mem_univ t⟩] with q hq + rw [l.geometry_velocity hG hGO hq.1,l.euclideanVelocity_apply (hGO hq.1)] + have hmem : (lowJet G p,t) ∈ (O : Set LowJet) ×ˢ univ := ⟨hGO hp,mem_univ t⟩ + have hW := (l.leadingVelocity_smooth.contDiffAt + ((O.isOpen.prod isOpen_univ).mem_nhds hmem)).differentiableAt (by simp) + have hV := (l.smoothVelocity.contDiffAt + ((O.isOpen.prod isOpen_univ).mem_nhds hmem)).differentiableAt (by simp) + funext i + fin_cases i + · exact (l.geometry_longitudinal_value hG hGO hp t).symm + · rfl + · rfl + · change JetVelocityCoordinates.toEuclidean + (fderiv ℝ l.leadingVelocity (lowJet G p,t) (lowDerivative G 1 p,0)) = + ((l.geometry G hG hGO).longitudinal.slow (coordinateVector 1)).val p (t : Period) + rw [Family.slow_apply _ _ hp] + change _ = fderiv ℝ _ (p,t) (coordinateVector 1,0) + rw [hlong.fderiv_eq,jet_parameter_pullback_derivative hG _ p t hW, + lowJet_derivative hG] + · change JetVelocityCoordinates.toEuclidean (fderiv ℝ l.velocity (lowJet G p,t) (0,1)) = + (l.geometry G hG hGO).V.angle.val p (t : Period) + rw [Family.angle_apply _ hp] + change _ = fderiv ℝ _ (p,t) (0,1) + rw [hvel.fderiv_eq,jet_parameter_pullback_derivative hG _ p t hV,map_zero] + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f6564f1b7e8e97a58576ab678acbe8814583cc5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileMap.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileCoordinates + +namespace OAI + +/-! The five leading profiles depend smoothly on the second jet, its first +transverse derivative, and the periodic parameter. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates GeometryPreservation +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +abbrev LeadingProfileInput := (LowJet × ℝ) × LowJet + +def leadingVelocity (z : LowJet × ℝ) : RealModes.RVec 4 := tangent z.1+l.velocity z + +def leadingProfileMap (z : LeadingProfileInput) : EuclideanBoundaryProfile := + ![JetVelocityCoordinates.toEuclidean (l.leadingVelocity z.1), + JetVelocityCoordinates.toEuclidean (slot 2 z.1.1), + JetVelocityCoordinates.toEuclidean (slot 6 z.1.1), + JetVelocityCoordinates.toEuclidean (fderiv ℝ l.leadingVelocity z.1 (z.2,0)), + JetVelocityCoordinates.toEuclidean (fderiv ℝ l.velocity z.1 (0,1))] + +lemma leadingVelocity_smooth : ContDiffOn ℝ ∞ l.leadingVelocity (O ×ˢ univ) := + (l.smoothTangent.comp contDiffOn_fst (fun _ hz => hz.1)).add l.smoothVelocity + +lemma leadingProfileMap_smooth : + ContDiffOn ℝ ∞ l.leadingProfileMap ((O ×ˢ univ) ×ˢ univ) := by + have hJ : ContDiffOn ℝ ∞ (fun z : LeadingProfileInput => z.1.1) ((O ×ˢ univ) ×ˢ univ) := + contDiffOn_fst.fst + have hV : ContDiffOn ℝ ∞ (fun z : LeadingProfileInput => l.leadingVelocity z.1) + ((O ×ˢ univ) ×ˢ univ) := + l.leadingVelocity_smooth.comp contDiffOn_fst (fun _ hz => hz.1) + have hdV : ContDiffOn ℝ ∞ (fun z : LeadingProfileInput => fderiv ℝ l.leadingVelocity z.1) + ((O ×ˢ univ) ×ˢ univ) := (l.leadingVelocity_smooth.fderiv_of_isOpen + (O.isOpen.prod isOpen_univ) (m := ∞) (by simp)).comp contDiffOn_fst (fun _ hz => hz.1) + have hdW : ContDiffOn ℝ ∞ (fun z : LeadingProfileInput => fderiv ℝ l.velocity z.1) + ((O ×ˢ univ) ×ˢ univ) := (l.smoothVelocity.fderiv_of_isOpen + (O.isOpen.prod isOpen_univ) (m := ∞) (by simp)).comp contDiffOn_fst (fun _ hz => hz.1) + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn hV + · exact JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn ((slot_smooth 2).contDiffOn.comp hJ (fun _ _ => mem_univ _)) + · exact JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn ((slot_smooth 6).contDiffOn.comp hJ (fun _ _ => mem_univ _)) + · exact JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn + (hdV.clm_apply (contDiffOn_snd.prodMk contDiffOn_const)) + · exact JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn + (hdW.clm_apply contDiffOn_const) + +lemma leadingProfileMap_continuousAt {z : LeadingProfileInput} (hz : z.1.1 ∈ O) : + ContinuousAt l.leadingProfileMap z := + (l.leadingProfileMap_smooth.contDiffAt + (((O.isOpen.prod isOpen_univ).prod isOpen_univ).mem_nhds + ⟨⟨hz,mem_univ _⟩,mem_univ _⟩)).continuousAt + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..1bb84877af03f69ed0cdc4b98ab04804b5c6ec37 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LeadingProfileStability.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LeadingInputStability + +namespace OAI + +/-! Uniform C3 stability of the leading profiles on a compact spatial set, +including every phase on the period circle. -/ +noncomputable section +open Set +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates GeometryPreservation CovarianceCorrector +open LocalPeriodicExpansion WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +lemma leadingProfileMap_uniform_near {K : Set LeadingProfileInput} (hK : IsCompact K) + (hKO : ∀ J ∈ K, J.1.1 ∈ O) (ε : ℝ) (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ J ∈ K, ∀ H : LeadingProfileInput, + ‖H-J‖ < δ → ‖l.leadingProfileMap H-l.leadingProfileMap J‖ < ε := by + have hh := hK.uniformContinuousAt_of_continuousAt l.leadingProfileMap + (fun J hJ => l.leadingProfileMap_continuousAt (hKO J hJ)) (Metric.dist_mem_uniformity hε) + obtain ⟨δ,hδ,hclose⟩ := Metric.mem_uniformity_dist.mp hh + refine ⟨δ,hδ,?_⟩ + intro J hJ H hHJ + have hd : dist J H < δ := by simpa only [dist_eq_norm,norm_sub_rev] using hHJ + simpa only [Set.mem_ofPred_eq,Prod.fst,Prod.snd,dist_eq_norm,norm_sub_rev] using hclose hd hJ + +def geometricLeadingProfile {S : TopologicalSpace.Opens JetPolynomial.Base} + (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) (p : JetPolynomial.Base) (t : Period) : + EuclideanBoundaryProfile := + ![(l.geometry G hG hGO).longitudinal.val p t,(l.geometry G hG hGO).Y p, + (l.geometry G hG hGO).C p, + ((l.geometry G hG hGO).longitudinal.slow (coordinateVector 1)).val p t, + (l.geometry G hG hGO).V.angle.val p t] + +/-- The slow baseline may be replaced by the original map in all five +leading profiles, using only its unweighted C3 error. -/ +theorem geometricLeadingProfile_stability {S : TopologicalSpace.Opens JetPolynomial.Base} + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + (hFO : MapsTo (lowJet F) S O) {K : Set JetPolynomial.Base} + (hK : IsCompact K) (hKS : K ⊆ S) (ε : ℝ) (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ G : JetPolynomial.Base → JetPolynomial.Space, + ∀ hG : ContDiff ℝ ∞ G, ∀ hGO : MapsTo (lowJet G) S O, + WeightedBound S 1 3 δ (fun p => G p-F p) → ∀ p ∈ K, ∀ t : Period, + ‖l.geometricLeadingProfile G hG hGO p t-l.geometricLeadingProfile F hF hFO p t‖ < ε := by + let B : JetPolynomial.Base × ℝ → LeadingProfileInput := fun z => + ((lowJet F z.1,z.2),lowDerivative F 1 z.1) + have hD : Continuous (lowDerivative F 1) := by + have hh : ContDiff ℝ ∞ (fun p => fderiv ℝ (lowJet F) p (coordinateVector 1)) := + ((lowJet_smooth hF).fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + have he : (fun p => fderiv ℝ (lowJet F) p (coordinateVector 1)) = lowDerivative F 1 := + funext (lowJet_derivative hF 1) + rw [he] at hh + exact hh.continuous + have hB : Continuous B := + (((lowJet_smooth hF).continuous.comp continuous_fst).prodMk continuous_snd).prodMk + (hD.comp continuous_fst) + have hBK : IsCompact (B '' (K ×ˢ Icc (0 : ℝ) 1)) := + (hK.prod isCompact_Icc).image hB + obtain ⟨r,hr,hclose⟩ := l.leadingProfileMap_uniform_near hBK + (by rintro _ ⟨z,hz,rfl⟩; exact hFO (hKS hz.1)) ε hε + refine ⟨r/2,half_pos hr,?_⟩ + intro G hG hGO hb p hp t + have ht : t ∈ ((↑) : ℝ → Period) '' Icc (0 : ℝ) (0+1) := by + rw [AddCircle.coe_image_Icc_eq] + trivial + obtain ⟨s,hs,hst⟩ := ht + have hinput := leadingInput_sub_bound S.isOpen hF hG (half_pos hr).le hb (hKS hp) s + have hinput' : ‖(((lowJet G p,s),lowDerivative G 1 p) : LeadingProfileInput)-B (p,s)‖ < r := + hinput.trans_lt (half_lt_self hr) + have he := hclose (B (p,s)) (mem_image_of_mem B ⟨hp,by simpa only [zero_add] using hs⟩) + ((lowJet G p,s),lowDerivative G 1 p) hinput' + rw [l.leadingProfileMap_geometry hG hGO (hKS hp) s] at he + change ‖_ - l.leadingProfileMap ((lowJet F p,s),lowDerivative F 1 p)‖ < ε at he + rw [l.leadingProfileMap_geometry hF hFO (hKS hp) s] at he + simpa only [geometricLeadingProfile,hst] using he + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LinearPhaseDerivativeProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LinearPhaseDerivativeProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd1af6387e383afb670865542213c74f67a24c49 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LinearPhaseDerivativeProfiles.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds + +namespace OAI + +/-! All derivatives of a fixed linear phase are constant fields. The two +profiles needed by local quadratic cancellation are therefore uniform in +the derivative order, the map and both scales. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +def originalPhaseLinear (ξ : SmallModes.Base) : Base →L[ℝ] ℝ := + (phaseLinear ξ).comp planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap + +lemma phase_eq_originalPhaseLinear {φ : Base → ℝ} {ξ : SmallModes.Base} + (hphase : coordinatePhase φ = phaseLinear ξ) : φ = originalPhaseLinear ξ := by + funext x + change φ x = phaseLinear ξ (planeCoordinateIsometry x) + simpa only [coordinatePhase,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + using congrFun hphase (planeCoordinateIsometry x) + +lemma linear_phase_original_derivative {φ : Base → ℝ} {ξ : SmallModes.Base} + (hphase : coordinatePhase φ = phaseLinear ξ) (v : Base) : + (fun x => fderiv ℝ φ x v) = fun _ => originalPhaseLinear ξ v := by + rw [phase_eq_originalPhaseLinear hphase] + funext x + exact congrArg (fun L : Base →L[ℝ] ℝ => L v) (originalPhaseLinear ξ).fderiv + +lemma linear_phase_coordinate_derivative {φ : Base → ℝ} {ξ : SmallModes.Base} + (hphase : coordinatePhase φ = phaseLinear ξ) (v : SmallModes.Base) : + SmallModes.coordDeriv v (coordinatePhase φ) = fun _ => phaseLinear ξ v := by + rw [hphase] + funext x + exact congrArg (fun L : SmallModes.Base →L[ℝ] ℝ => L v) (phaseLinear ξ).fderiv + +/-- Fixed finite linear phases provide the original-coordinate and +mode-coordinate derivative bounds, including any additional input order. -/ +theorem linear_phase_derivative_profiles {ι : Type*} [Fintype ι] + (φ : ι → Base → ℝ) (ξ : ι → SmallModes.Base) + (hphase : ∀ i, coordinatePhase (φ i) = phaseLinear (ξ i)) : + ∃ F M : ℕ → ℝ, (∀ m, 1 ≤ F m) ∧ (∀ m, 1 ≤ M m) ∧ + (∀ (U : Set Base) (s : ℝ) (m r : ℕ) (i : ι) (v : Fin 2), + WeightedBound U s (m + r) (F m) + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) ∧ + (∀ (s : ℝ) (m : ℕ) (i : ι) (v : SmallModes.Base), ‖v‖ ≤ 1 → + WeightedBound Set.univ s m (M m) (SmallModes.coordDeriv v (coordinatePhase (φ i)))) := by + classical + let F₀ : ℝ := 1 + ∑ i, ‖originalPhaseLinear (ξ i)‖ + let M₀ : ℝ := 1 + ∑ i, ‖phaseLinear (ξ i)‖ + have hF (i : ι) : ‖originalPhaseLinear (ξ i)‖ ≤ F₀ := + (Finset.single_le_sum (fun j _ => norm_nonneg (originalPhaseLinear (ξ j))) + (Finset.mem_univ i)).trans (le_add_of_nonneg_left zero_le_one) + have hM (i : ι) : ‖phaseLinear (ξ i)‖ ≤ M₀ := + (Finset.single_le_sum (fun j _ => norm_nonneg (phaseLinear (ξ j))) + (Finset.mem_univ i)).trans (le_add_of_nonneg_left zero_le_one) + refine ⟨(fun _ => F₀),(fun _ => M₀),?_,?_,?_,?_⟩ + · intro _ + exact le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => norm_nonneg _)) + · intro _ + exact le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => norm_nonneg _)) + · intro U s m r i v + rw [linear_phase_original_derivative (hphase i)] + apply (weightedBound_const U s (m + r) (originalPhaseLinear (ξ i) (coordinateVector v))).mono_const + exact ((originalPhaseLinear (ξ i)).le_opNorm _).trans + ((mul_le_of_le_one_right (norm_nonneg _) (norm_coordinateVector_le v)).trans (hF i)) + · intro s m i v hv + rw [linear_phase_coordinate_derivative (hphase i)] + apply (weightedBound_const Set.univ s m (phaseLinear (ξ i) v)).mono_const + exact ((phaseLinear (ξ i)).le_opNorm v).trans + ((mul_le_of_le_one_right (norm_nonneg _) hv).trans (hM i)) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalAnsatzProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalAnsatzProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6e690098b09db12182a1767042497f8bdaf0416 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalAnsatzProfiles.lean @@ -0,0 +1,168 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAnsatzAsymptotics +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicAnsatzMetric + +namespace OAI + +/-! The leading jets of the supported local ansatz are the geometric profiles +of the initial periodic primitive. -/ + +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector +open PeriodicExpansion (directionalMap) + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {O : TopologicalSpace.Opens A} + +/-- Retain the actual coefficient values when a supported local family has +already been proved smooth after extension by zero. -/ +def globalCoefficients (U : ℕ → Family O E) + (hU : ∀ i, ContDiff ℝ ∞ (fun y : A × ℝ => (U i).val y.1 (y.2 : Period))) : + ℕ → PeriodicExpansion.Family A E := fun i => ⟨(U i).val,hU i⟩ + +lemma globalCoefficients_finiteAnsatz (F : A → E) (U : ℕ → Family O E) + (hU : ∀ i, ContDiff ℝ ∞ (fun y : A × ℝ => (U i).val y.1 (y.2 : Period))) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + PeriodicExpansion.finiteAnsatz F (globalCoefficients U hU) ℓ L z = + finiteAnsatz F U ℓ L z := rfl + +lemma global_angle_eq_local (W : PeriodicExpansion.Family A E) (U : Family O E) + (hW : W.val = U.val) {p : A} (hp : p ∈ O) (t : Period) : + W.angle.val p t = U.angle.val p t := by + refine Quotient.inductionOn' t ?_ + intro s + rw [PeriodicExpansion.Family.angle_apply,Family.angle_apply U hp,hW] + +namespace Geometry + +variable [FiniteDimensional ℝ A] [CompleteSpace E] + {dy : A} (g : Geometry (E := E) O dy) + +/-- The leading angular correction is the mean-zero velocity primitive. -/ +lemma initial_global_angle (W : PeriodicExpansion.Family A E) + (hW : W.val = g.initial.val) {p : A} (hp : p ∈ O) (t : Period) : + W.angle.val p t = g.V.val p t-average (g.V.val p) := by + rw [global_angle_eq_local W g.initial hW hp,g.initial_angle] + simp only [Family.sub_apply,Family.vectorMean_apply] + +/-- Adding the leading angular correction to the old longitudinal derivative +gives precisely the prescribed velocity profile `X`. -/ +lemma initial_global_longitudinal {F : A → E} (W : PeriodicExpansion.Family A E) + (hW : W.val = g.initial.val) (dx : A) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p+average (g.V.val p)) + {p : A} (hp : p ∈ O) (t : Period) : + directionalMap F dx p+W.angle.val p t = g.longitudinal.val p t := by + rw [g.initial_global_angle W hW hp] + change fderiv ℝ F p dx+(g.V.val p t-average (g.V.val p)) = _ + rw [hX p hp] + simp only [longitudinal,Family.add_apply,Family.constant_apply _ _ hp] + abel + +/-- The second angular derivative of the primitive is the angular derivative +of the actual velocity loop, including its normalization by the mean. -/ +lemma initial_global_angle_angle (W : PeriodicExpansion.Family A E) + (hW : W.val = g.initial.val) {p : A} (hp : p ∈ O) (t : Period) : + W.angle.angle.val p t = g.V.angle.val p t := by + refine Quotient.inductionOn' t ?_ + intro s + have hd := SmoothPeriodicCalculus.derivativeFamily_hasDerivAt + W.angle.val W.angle.smooth p s + change HasDerivAt (fun r : ℝ => W.angle.val p (r : Period)) + (W.angle.angle.val p (s : Period)) s at hd + have he : (fun r : ℝ => W.angle.val p (r : Period)) = + fun r : ℝ => g.V.val p (r : Period)-average (g.V.val p) := + funext (fun r => g.initial_global_angle W hW hp (r : Period)) + rw [he] at hd + exact hd.unique ((g.V.angle_hasDerivAt hp s).sub_const _) + +/-- Slow differentiation of the actual leading profile gives `X_y`, rather +than a separately supplied approximation. -/ +lemma initial_global_longitudinal_slow {F : A → E} (hF : ContDiff ℝ ∞ F) + (W : PeriodicExpansion.Family A E) (hW : W.val = g.initial.val) (dx : A) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p+average (g.V.val p)) + {p : A} (hp : p ∈ O) (s : ℝ) : + directionalMap (directionalMap F dx) dy p+ + (W.angle.slow dy).val p (s : Period) = + (g.longitudinal.slow dy).val p (s : Period) := by + have he : (fun q : A => directionalMap F dx q+W.angle.val q (s : Period)) =ᶠ[𝓝 p] + fun q : A => g.longitudinal.val q (s : Period) := by + filter_upwards [O.isOpen.mem_nhds hp] with q hq + exact g.initial_global_longitudinal W hW dx hX hq _ + have hd := congrArg (fun L : A →L[ℝ] E => L dy) he.fderiv_eq + have hs : ContDiff ℝ ∞ (fun q : A => W.angle.val q (s : Period)) := + W.angle.smooth.comp (contDiff_id.prodMk contDiff_const) + rw [fderiv_fun_add (f := directionalMap F dx) + (g := fun q : A => W.angle.val q (s : Period)) + ((PeriodicExpansion.directionalMap_smooth hF dx).differentiable (by simp) p) + (hs.differentiable (by simp) p)] at hd + simp only [add_apply] at hd + rw [PeriodicExpansion.Family.slow_apply,Family.slow_apply _ _ hp, + ← SmoothPeriodicCalculus.fderiv_slice W.angle.smooth, + ← LocalPeriodicCalculus.fderiv_slice O.isOpen g.longitudinal.smooth hp] + exact hd + +/-- All five leading-jet estimates for the same globally smooth local ansatz. +The hypotheses are the actual fixed coefficients and their defining primitive +identity; no derivative asymptotic is assumed. -/ +theorem compact_initial_ansatz_profiles {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family O E) + (hU : ∀ i, ContDiff ℝ ∞ (fun y : A × ℝ => (U i).val y.1 (y.2 : Period))) + (hinit : U 0 = g.initial) {Q : Set A} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hx : ℓ dx = 1) (hy : ℓ dy = 0) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p+average (g.V.val p)) + (hY : ∀ p ∈ O, fderiv ℝ F p dy = g.Y p) (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ p ∈ Q, + let f := finiteAnsatz F U ℓ (n+1) z + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖directionalMap f dy p-g.Y p‖ ≤ C*z ∧ + ‖directionalMap (directionalMap f dy) dy p-g.C p‖ ≤ C*z ∧ + ‖directionalMap f dx p-g.longitudinal.val p t‖ ≤ C*z ∧ + ‖directionalMap (directionalMap f dx) dy p-(g.longitudinal.slow dy).val p t‖ ≤ C*z ∧ + ‖z • directionalMap (directionalMap f dx) dx p-g.V.angle.val p t‖ ≤ C*z := by + let W := globalCoefficients U hU + have hW : (W 0).val = g.initial.val := by + change (U 0).val = g.initial.val + rw [hinit] + obtain ⟨B,hB,hb⟩ := PeriodicExpansion.compact_finiteAnsatz_transverse_asymptotics + hF W hQ ℓ (n+1) hy + obtain ⟨C,hC,hc⟩ := PeriodicExpansion.compact_finiteAnsatz_longitudinal_asymptotics + hF W hQ ℓ n hx hy + obtain ⟨D,hD,hd⟩ := PeriodicExpansion.compact_finiteAnsatz_second_longitudinal_asymptotics + hF W hQ ℓ n hx + refine ⟨B+C+D,by positivity,?_⟩ + intro z hz hz1 p hp + dsimp only + have hpO := hQO hp + have hb' := hb z hz hz1 p hp + have hc' := hc z hz hz1 p hp + have hd' := hd z hz hz1 p hp + have hf : PeriodicExpansion.finiteAnsatz F W ℓ (n+1) z = + finiteAnsatz F U ℓ (n+1) z := globalCoefficients_finiteAnsatz F U hU ℓ _ z + rw [hf] at hb' hc' hd' + have hY' : directionalMap F dy p = g.Y p := hY p hpO + have hYY : directionalMap (directionalMap F dy) dy p = g.C p := by + have he : directionalMap F dy =ᶠ[𝓝 p] g.Y := by + filter_upwards [O.isOpen.mem_nhds hpO] with q hq + exact hY q hq + exact (congrArg (fun L : A →L[ℝ] E => L dy) he.fderiv_eq).trans (g.derivativeY p hpO) + rw [hY',hYY] at hb' + have hX' := g.initial_global_longitudinal (W 0) hW dx hX hpO ((ℓ p/z : ℝ) : Period) + have hXY := g.initial_global_longitudinal_slow hF (W 0) hW dx hX hpO (ℓ p/z) + have hXX := g.initial_global_angle_angle (W 0) hW hpO ((ℓ p/z : ℝ) : Period) + simp only [PeriodicExpansion.Family.fastValue,hX',hXY] at hc' + simp only [PeriodicExpansion.Family.fastValue,hXX] at hd' + have hB' : B*z ≤ (B+C+D)*z := by nlinarith + have hC' : C*z ≤ (B+C+D)*z := by nlinarith + have hD' : D*z ≤ (B+C+D)*z := by nlinarith + exact ⟨hb'.1.trans hB',hb'.2.trans hB',hc'.1.trans hC',hc'.2.trans hC',hd'.trans hD'⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularActualCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularActualCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..f93c57631641931f1057c358864ca3f5c3f58595 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularActualCrossings.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyProfile +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCrossing + +namespace OAI + +/-! A fixed transverse-turn threshold suffices for both ordered crossing +invariants, for every later sufficiently accurate exact realization. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes SmallModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_actual_crossings_local {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) (B T : ℝ) (hB : 0 ≤ B) (hT : 0 ≤ T) : + ∃ Λ : ℝ, 0 < Λ ∧ ∀ V : Set E, IsOpen V → K ⊆ V → V ⊆ U → + ∀ α : E × ℝ → ℝ, ContDiffOn ℝ ∞ α (V ×ˢ univ) → + (∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, fderiv ℝ α (x,t) (0,1) = 0 → + Λ < fderiv ℝ α (x,t) (d,0)) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ p : SmallModes.Base, ‖realBoundaryProfile F z p- + circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)‖ < η → + ∀ κ : ℝ, + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + κ*gramDet (coordDeriv dx F p) (coordDeriv dy F p) → + -B ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ a b : ℝ, |a| ≤ T → |b| ≤ T → + 0 < orderedCrossing F (1,a) (1,b) p κ ∧ + 0 < orderedCrossing F (1,b) (1,a) p κ := by + let Z : Set (E × ℝ) := K ×ˢ Icc (0 : ℝ) 1 + let : CompactSpace Z := isCompact_iff_compactSpace.mp (hK.prod isCompact_Icc) + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hbounds⟩ := compact_circular_profile_threshold + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + obtain ⟨H,hH,hcross⟩ := compact_actual_profile_crossings (X := Z) + sLo sHi B D T hsLo hsHi hB hD0 hT + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH.le + refine ⟨Λ,hΛ,?_⟩ + intro V hV hKV hVU α hα hturn + let J : Z → BoundaryProfile := fun z => circularFamilyProfile Q X Y C R e₁ e₂ α d z.1 + have hJ : Continuous J := by + change Continuous (Z.domRestrict (circularFamilyProfile Q X Y C R e₁ e₂ α d)) + apply ContinuousOn.domRestrict + exact (circularFamilyProfile_smoothOn hV (hQ.mono hVU) (hX.mono hVU) (hY.mono hVU) (hC.mono hVU) (hR.mono hVU) (h₁.mono hVU) (h₂.mono hVU) hα (fun x hx => hD x (hVU hx)) d).continuousOn.mono + (fun z hz => ⟨hKV hz.1,mem_univ _⟩) + have hdata (z : Z) : J z ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients (J z) 0 ∧ profileCoefficients (J z) 0 ≤ sHi ∧ + |profileCoefficients (J z) 1| ≤ D ∧ + (profileCoefficients (J z) 3 = 0 → H+2 < |profileCoefficients (J z) 2|) := by + let x := z.1.1 + let t := z.1.2 + have hx : x ∈ U := hKU z.2.1 + have hαat := (hα.contDiffAt ((hV.prod isOpen_univ).mem_nhds ⟨hKV z.2.1,mem_univ t⟩)).differentiableAt (by simp) + have hαslice : DifferentiableAt ℝ (fun y => α (y,t)) x := + hαat.comp x (differentiableAt_id.prodMk (differentiableAt_const t)) + have heq : J z = circularSpatialProfile Q X Y C R e₁ e₂ (fun y => α (y,t)) + (fderiv ℝ α (x,t) (0,1)) x d := + circularFamilyProfile_spatial + ((hQ.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((hR.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((h₁.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) + ((h₂.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) hαat d + rw [heq] + obtain ⟨hreg,hlo,hhi,hd,hlarge⟩ := hprofile (fun y => α (y,t)) x z.2.1 hαslice + (fderiv ℝ α (x,t) (0,1)) + refine ⟨hreg,hlo,hhi,hd,?_⟩ + intro hzero + have hf := hframe x hx + have hβ : fderiv ℝ α (x,t) (0,1) = 0 := + (circularBoundaryProfile_turn_iff (hD x hx) (hRpos x hx).ne' + hf.1 hf.2.1 hf.2.2.1 hf.2.2.2.1 hf.2.2.2.2.2.1 hf.2.2.2.2.1 hf.2.2.2.2.2.2).mp hzero + apply hlarge + rw [fderiv_slice_first hαat] + exact hturn x z.2.1 t z.2.2 hβ + obtain ⟨η,hη,hactual⟩ := hcross J hJ (fun z => (hdata z).1) + (fun z => (hdata z).2.1) (fun z => (hdata z).2.2.1) + (fun z => (hdata z).2.2.2.1) (fun z => (hdata z).2.2.2.2) + refine ⟨η,hη,?_⟩ + intro z hz hzη x hx t ht F hF p herr κ hκ hcurv a b ha hb + exact hactual z hz hzη ⟨(x,t),hx,ht⟩ F hF p herr κ hκ hcurv a b ha hb + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularCurveCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularCurveCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d7d27ec6e06cb96b2d593a358759bbe2260f01f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularCurveCover.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCircularFamilyThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCurveCover + +namespace OAI + +/-! The constructed circular profiles preserve every later curve using the +old positive collar invariant and the fixed interior turn threshold. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes SmallModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_curve_cover_local {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K C₀ I : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hC₀ : IsClosed C₀) (hI : IsClosed I) (hcover : ∀ x ∈ K, x ∈ C₀ ∨ x ∈ I) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) (B : ℝ) (hB : 0 ≤ B) : + ∃ Λ : ℝ, 0 < Λ ∧ ∀ V : Set E, IsOpen V → K ⊆ V → V ⊆ U → + ∀ α : E × ℝ → ℝ, ContDiffOn ℝ ∞ α (V ×ˢ univ) → + (∀ x ∈ K ∩ I, ∀ t ∈ Icc (0 : ℝ) 1, fderiv ℝ α (x,t) (0,1) = 0 → + Λ < fderiv ℝ α (x,t) (d,0)) → + ∀ b c k : E → ℝ, ContinuousOn b U → ContinuousOn c U → ContinuousOn k U → + (∀ x ∈ K, b x ≠ 0 ∨ c x ≠ 0) → (∀ x ∈ K, -B ≤ k x) → + (∀ x ∈ K ∩ C₀, ∀ t ∈ Icc (0 : ℝ) 1, + 0 < (profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 1*b x + + profileCoefficients (circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)) 0*c x)^2 + k x*b x^2) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ p : Base, ‖realBoundaryProfile F z p-circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t)‖ < η → + k x ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + realSecondForm F (b x,c x) (b x,c x) p ≠ 0 ∧ + normalize (realSecondForm F (b x,c x) (b x,c x) p) ≠ + -profilePreferred (realBoundaryProfile F z p) := by + let Z : Set (E × ℝ) := K ×ˢ Icc (0 : ℝ) 1 + let : CompactSpace Z := isCompact_iff_compactSpace.mp (hK.prod isCompact_Icc) + let C' : Set Z := {w | w.val.1 ∈ C₀} + let I' : Set Z := {w | w.val.1 ∈ I} + have hc' : IsClosed C' := hC₀.preimage (continuous_fst.comp continuous_subtype_val) + have hi' : IsClosed I' := hI.preimage (continuous_fst.comp continuous_subtype_val) + have hcover' : ∀ w : Z, w ∈ C' ∨ w ∈ I' := fun w => hcover w.val.1 w.property.1 + obtain ⟨sLo,sHi,D,hsLo,_,hD0,hbounds⟩ := compact_circular_family_threshold_local + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + obtain ⟨H,hH,hcurve⟩ := compact_actual_profile_curve_cover hc' hi' hcover' sLo B D hsLo hB hD0 + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH.le + refine ⟨Λ,hΛ,?_⟩ + intro V hV hKV hVU α hα hturn b c k hb hc hk hbc hkb hcollar + let J : Z → BoundaryProfile := fun w => circularFamilyProfile Q X Y C R e₁ e₂ α d w.val + have hJ : Continuous J := by + change Continuous (Z.domRestrict (circularFamilyProfile Q X Y C R e₁ e₂ α d)) + exact ContinuousOn.domRestrict + ((circularFamilyProfile_smoothOn hV (hQ.mono hVU) (hX.mono hVU) (hY.mono hVU) (hC.mono hVU) (hR.mono hVU) (h₁.mono hVU) (h₂.mono hVU) hα (fun x hx => hD x (hVU hx)) d).continuousOn.mono + (fun w hw => ⟨hKV hw.1,mem_univ _⟩)) + have hdata (w : Z) := hprofile V hV hKV hVU α hα w.val.1 w.property.1 w.val.2 + have hturn' : ∀ w ∈ I', profileCoefficients (J w) 3 = 0 → H+2 < |profileCoefficients (J w) 2| := by + intro w hw hz + apply (hdata w).2.2.2.2 + apply hturn w.val.1 ⟨w.property.1,hw⟩ w.val.2 w.property.2 + exact (circularFamilyProfile_turn_iff Q X Y C e₁ e₂ R α d w.val.1 w.val.2 + (hD _ (hKU w.property.1)) (hRpos _ (hKU w.property.1)).ne' + (hframe _ (hKU w.property.1))).mp hz + have hposmap : ∀ f : E → ℝ, ContinuousOn f U → Continuous (fun w : Z => f w.val.1) := by + intro f hf + exact hf.comp_continuous (continuous_fst.comp continuous_subtype_val) (fun w => hKU w.property.1) + obtain ⟨η,hη,hactual⟩ := hcurve J hJ (fun w => (hdata w).1) + (fun w => (hdata w).2.1) (fun w => (hdata w).2.2.2.1) hturn' + (fun w => b w.val.1) (fun w => c w.val.1) (fun w => k w.val.1) + (hposmap b hb) (hposmap c hc) (hposmap k hk) + (fun w => hbc w.val.1 w.property.1) (fun w => hkb w.val.1 w.property.1) + (fun w hw => hcollar w.val.1 ⟨w.property.1,hw⟩ w.val.2 w.property.2) + refine ⟨η,hη,?_⟩ + intro z hz hzη x hx t ht F hF p herr hcurv + exact hactual z hz hzη ⟨(x,t),hx,ht⟩ F hF p herr hcurv + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularFamilyThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularFamilyThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3954ed46785631124be35aa100991bec6f5898f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCircularFamilyThreshold.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyThreshold + +namespace OAI + +/-! Bounds for the actual joint position/phase profile. All constants are +fixed before the angular function and its transverse derivatives. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open NormalFrame VelocityFrame RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_circular_family_threshold_local {Q X Y C e₁ e₂ : E → Vec} {R : E → ℝ} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hY : ContDiffOn ℝ ∞ Y U) (hC : ContDiffOn ℝ ∞ C U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ U, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hRpos : ∀ x ∈ U, 0 < R x) (d : E) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → ∃ Λ : ℝ, 0 < Λ ∧ + ∀ V : Set E, IsOpen V → K ⊆ V → V ⊆ U → + ∀ α : E × ℝ → ℝ, ContDiffOn ℝ ∞ α (V ×ˢ univ) → + ∀ x ∈ K, ∀ t : ℝ, + let J := circularFamilyProfile Q X Y C R e₁ e₂ α d (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (Λ < fderiv ℝ α (x,t) (d,0) → H+2 < |profileCoefficients J 2|) := by + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hbounds⟩ := compact_circular_profile_threshold + hU hK hKU hQ hX hY hC hR h₁ h₂ hD hframe hRpos d + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro H hH + obtain ⟨Λ,hΛ,hprofile⟩ := hbounds H hH + refine ⟨Λ,hΛ,?_⟩ + intro V hV hKV _ α hα x hx t + have hxU := hKU hx + have hαat : DifferentiableAt ℝ α (x,t) := + (hα.contDiffAt ((hV.prod isOpen_univ).mem_nhds + (show (x,t) ∈ V ×ˢ univ from ⟨hKV hx,mem_univ t⟩))).differentiableAt (by simp) + have hαslice : DifferentiableAt ℝ (fun y => α (y,t)) x := + hαat.comp x (differentiableAt_id.prodMk (differentiableAt_const t)) + have heq := circularFamilyProfile_spatial (X := X) (Y := Y) (C := C) + ((hQ.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((hR.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((h₁.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) + ((h₂.contDiffAt (hU.mem_nhds hxU)).differentiableAt (by simp)) hαat d + dsimp only + rw [heq] + obtain ⟨hreg,hlo,hhi,hd,hlarge⟩ := hprofile (fun y => α (y,t)) x hx hαslice + (fderiv ℝ α (x,t) (0,1)) + refine ⟨hreg,hlo,hhi,hd,?_⟩ + intro hderiv + apply hlarge + rw [fderiv_slice_first hαat] + exact hderiv + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingAdjustment.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingAdjustment.lean new file mode 100644 index 0000000000000000000000000000000000000000..733d55f94a8d55460acac07893114e7a260a2302 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingAdjustment.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingNeighborhood + +namespace OAI + +/-! Construct the local normal change at one crossing with support in any +prescribed neighborhood. No normal path or cutoff is assumed. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +theorem local_crossing_adjustment {U O : Set E} (hU : IsOpen U) (hO : IsOpen O) + {n p q : E → Vec} (hn : ContDiffOn ℝ ∞ n U) + (hp : ContDiffOn ℝ ∞ p U) (hq : ContDiffOn ℝ ∞ q U) + (hunit : ∀ y ∈ U, n y ⬝ᵥ n y = 1) {x : E} (hx : x ∈ U) (hxO : x ∈ O) + {w : Vec} (hnw : n x ⬝ᵥ w = 0) (hpw : 0 < p x ⬝ᵥ w) + (hqw : 0 < q x ⬝ᵥ w) (hpq : 0 < p x ⬝ᵥ q x) : + ∃ g : E → Vec, ContDiffOn ℝ ∞ g U ∧ + (∀ y ∈ U, g y ⬝ᵥ g y = 1) ∧ + (∀ y ∈ U, y ∉ O → g y = n y) ∧ + (∀ y ∈ U, n y ≠ -normalize (p y) → g y ≠ -normalize (p y)) ∧ + (∀ y ∈ U, n y ≠ -normalize (q y) → g y ≠ -normalize (q y)) ∧ + (∀ y ∈ U, ∀ v : Vec, v ⬝ᵥ n y = 0 → v ⬝ᵥ p y = 0 → v ⬝ᵥ g y = 0) ∧ + 0 < p x ⬝ᵥ g x ∧ 0 < q x ⬝ᵥ g x := by + obtain ⟨W,hW,hxW,hWU,m,_,hgeom⟩ := + crossing_halfplane_neighborhood hU hn hp hq hunit hx hnw hpw hqw hpq + obtain ⟨χ,hχ,_,hχrange,hχsupport,hχone⟩ := CollarVelocity.compact_cutoff + (isCompact_singleton : IsCompact ({x} : Set E)) (hW.inter hO) + (by intro y hy; simpa only [mem_inter_iff,mem_singleton_iff.mp hy] using And.intro hxW hxO) + have hs : tsupport χ ⊆ W := hχsupport.trans inter_subset_left + obtain ⟨hg,hgu,hge,hga,hgpos,hgperp⟩ := supported_crossing_adjustment hU hW hWU + hn (hp.mono hWU) hχ hχrange hs hunit hgeom + let g : E → Vec := fun y => first (n y) (normalize (p y)) (χ y) + have hpos := hgpos x hxW (hχone x (mem_singleton x)) + refine ⟨g,hg,hgu,?_,?_,?_,hgperp,hpos⟩ + · intro y hy hyO + exact hge y hy (fun h => hyO (hχsupport h).2) + · intro y hy hanti + by_cases hyW : y ∈ W + · exact (hga y hyW).1 + · exact fun he => hanti ((hge y hy (fun h => hyW (hs h))).symm.trans he) + · intro y hy hanti + by_cases hyW : y ∈ W + · exact (hga y hyW).2 + · exact fun he => hanti ((hge y hy (fun h => hyW (hs h))).symm.trans he) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingChoice.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..30cfdf33f74ccdb390966d514f47accf7098e26c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalCrossingChoice.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCrossingAdjustment + +namespace OAI + +/-! The pointwise turn alternative supplies the actual supported normal +adjustment, including the case where the original normal already works. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +theorem local_crossing_adjustment_of_choice {U O : Set E} (hU : IsOpen U) (hO : IsOpen O) + {n p q : E → Vec} (hn : ContDiffOn ℝ ∞ n U) + (hp : ContDiffOn ℝ ∞ p U) (hq : ContDiffOn ℝ ∞ q U) + (hunit : ∀ y ∈ U, n y ⬝ᵥ n y = 1) {x : E} (hx : x ∈ U) (hxO : x ∈ O) + (hchoice : (0 < p x ⬝ᵥ n x ∧ 0 < q x ⬝ᵥ n x) ∨ + (0 < p x ⬝ᵥ q x ∧ ∃ w : Vec, n x ⬝ᵥ w = 0 ∧ + 0 < p x ⬝ᵥ w ∧ 0 < q x ⬝ᵥ w)) : + ∃ g : E → Vec, ContDiffOn ℝ ∞ g U ∧ + (∀ y ∈ U, g y ⬝ᵥ g y = 1) ∧ + (∀ y ∈ U, y ∉ O → g y = n y) ∧ + (∀ y ∈ U, n y ≠ -normalize (p y) → g y ≠ -normalize (p y)) ∧ + (∀ y ∈ U, n y ≠ -normalize (q y) → g y ≠ -normalize (q y)) ∧ + (∀ y ∈ U, ∀ v : Vec, v ⬝ᵥ n y = 0 → v ⬝ᵥ p y = 0 → v ⬝ᵥ g y = 0) ∧ + 0 < p x ⬝ᵥ g x ∧ 0 < q x ⬝ᵥ g x := by + rcases hchoice with hpos | ⟨hpq,w,hnw,hpw,hqw⟩ + · exact ⟨n,hn,hunit,fun _ _ _ => rfl,fun _ _ h => h,fun _ _ h => h, + fun _ _ _ h _ => h,hpos⟩ + · exact local_crossing_adjustment hU hO hn hp hq hunit hx hxO hnw hpw hqw hpq + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalFinitePeriodicExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalFinitePeriodicExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..321eb7a46d5b77ffb2a3068b6e5a246e0244639e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalFinitePeriodicExpansion.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFiniteMetricIdentity + +namespace OAI + +/-! Exact finite periodic expansion with angle-independent lower metric terms. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector +open ClosedSurfaceR4.PeriodicExpansion (metricPolynomial metricPolynomial_coeff_pos + metricPolynomial_coeff metricPolynomial_expansion vectorPolynomialValue + weighted_sum_split_endpoints weighted_sum_split_zero shifted_derivative_sum) + + +private lemma replace_low_sum (n : ℕ) (c e : ℕ → ℝ) (q z : ℝ) + (hzero : c 0 = q) (h : ∀ r, 0 < r → r < n + 1 → c r = e r) : + (∑ r ∈ Finset.range (n + 1), c r * z ^ r) = + q + ∑ r ∈ Finset.Ico 1 (n + 1), e r * z ^ r := by + have hs := weighted_sum_split_zero z c n + simp only [smul_eq_mul, mul_comm] at hs + rw [hs, hzero] + congr 1 + apply Finset.sum_congr rfl + intro r hr + obtain ⟨hr, hrn⟩ := Finset.mem_Ico.mp hr + rw [h r (by omega) hrn] + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +/-- The exact finite expansion of the actual pullback metric. This asserts +smooth periodic coefficients and removes every low-order oscillation; +it does not yet assert the higher-jet order and uniform remainder bounds. -/ +theorem finite_periodic_expansion {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓx : ℓ dx = 1) (hℓy : ℓ dy = 0) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (hY : ∀ p ∈ O, fderiv ℝ F p dy = g.Y p) (n : ℕ) : + ∃ U : ℕ → Family O E, + U 0 = g.initial ∧ (∀ i p, p ∈ O → average ((U i).val p) = 0) ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, g.initial.val p = 0) → + ∀ i p, p ∈ Z → (U i).val p = 0) ∧ + ∀ z : ℝ, z ≠ 0 → ∀ p ∈ O, + let L := n + 1 + let f := finiteAnsatz F U ℓ L z + let t : Period := ((ℓ p / z : ℝ) : Period) + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx) = + (inner ℝ (g.X₀ p) (g.X₀ p) + g.q p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.xxCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.xxRemainder dx U L r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy) = + inner ℝ (g.X₀ p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.xyCoefficient dx U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.xyRemainder dx U L r).val p t * z ^ r) ∧ + inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy) = + inner ℝ (g.Y p) (g.Y p) + + (∑ r ∈ Finset.Ico 1 L, average ((g.yyCoefficient U r).val p) * z ^ r) + + (∑ r ∈ Finset.Ico L (2 * L + 1), (g.yyRemainder U L r).val p t * z ^ r) := by + obtain ⟨U, hinit, hU, hsupport, hcoeff⟩ := g.exists_angle_independent_coefficients dx (n + 1) + refine ⟨U, hinit, hU, hsupport, ?_⟩ + intro z hz p hpO + dsimp only + let t : Period := ((ℓ p / z : ℝ) : Period) + obtain ⟨hxx, hxy, hyy⟩ := g.finite_metric_identity hF U hinit ℓ dx hℓx hℓy hX hY n z hz hpO + obtain ⟨hxx₀, hxy₀, hyy₀⟩ := g.polynomial_zero_coefficients dx U (n + 1) hpO t + rw [replace_low_sum n _ _ _ z hxx₀ (fun r hr hn => (hcoeff r hr hn p t).1)] at hxx + rw [replace_low_sum n _ _ _ z hxy₀ (fun r hr hn => (hcoeff r hr hn p t).2.1)] at hxy + rw [replace_low_sum n _ _ _ z hyy₀ (fun r hr hn => (hcoeff r hr hn p t).2.2)] at hyy + exact ⟨hxx, hxy, hyy⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalIntrinsicCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalIntrinsicCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc860b904a9ac9d674f3daa2e094552407dd90a0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalIntrinsicCrossing.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSecondFormNaturality + +namespace OAI + +/-! Intrinsic curvature and ordered crossings depend only on the local +smooth germ. This applies the radial calculation in an actual chart. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame VelocityFrame PhaseGeometry + +lemma realMetric_eventuallyEq {F G : RField 4} {p : Base} (h : F =ᶠ[𝓝 p] G) + (v w : Base) : realMetric F v w =ᶠ[𝓝 p] realMetric G v w := by + filter_upwards [coordDeriv_eventuallyEq h v,coordDeriv_eventuallyEq h w] with x hv hw + simp only [realMetric,hv,hw] + +private lemma scalarDeriv_eventuallyEq {f g : Base → ℝ} {p : Base} + (h : f =ᶠ[𝓝 p] g) (v : Base) : coordDeriv v f =ᶠ[𝓝 p] coordDeriv v g := + h.fderiv.mono fun _ hx => congrArg (fun D : Base →L[ℝ] ℝ => D v) hx + +lemma coordinateGauss_congr_germ {E F G E' F' G' : Base → ℝ} {p : Base} + (hE : E =ᶠ[𝓝 p] E') (hF : F =ᶠ[𝓝 p] F') (hG : G =ᶠ[𝓝 p] G') : + coordinateGauss E F G p = coordinateGauss E' F' G' p := by + simp only [coordinateGauss,hE.eq_of_nhds,hF.eq_of_nhds,hG.eq_of_nhds, + (scalarDeriv_eventuallyEq hE dx).eq_of_nhds, + (scalarDeriv_eventuallyEq hE dy).eq_of_nhds, + (scalarDeriv_eventuallyEq hF dx).eq_of_nhds, + (scalarDeriv_eventuallyEq hF dy).eq_of_nhds, + (scalarDeriv_eventuallyEq hG dx).eq_of_nhds, + (scalarDeriv_eventuallyEq hG dy).eq_of_nhds, + (scalarDeriv_eventuallyEq (scalarDeriv_eventuallyEq hF dy) dx).eq_of_nhds, + (scalarDeriv_eventuallyEq (scalarDeriv_eventuallyEq hE dy) dy).eq_of_nhds, + (scalarDeriv_eventuallyEq (scalarDeriv_eventuallyEq hG dx) dx).eq_of_nhds] + +lemma inducedCurvature_congr_germ {F G : RField 4} {p : Base} (h : F =ᶠ[𝓝 p] G) : + coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + coordinateGaussianCurvature (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p := by + have hE := realMetric_eventuallyEq h dx dx + have hF := realMetric_eventuallyEq h dx dy + have hG := realMetric_eventuallyEq h dy dy + simp only [coordinateGaussianCurvature,coordinateGauss_congr_germ hE hF hG, + hE.eq_of_nhds,hF.eq_of_nhds,hG.eq_of_nhds] + +lemma coordinateGaussianCurvature_pure_radial_on {F : RField 4} {U : Set Base} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) {p : Base} (hp : p ∈ U) + (n : RVec 4) {r : ℝ} (hn : n ⬝ᵥ n = 1) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ v w, realSecondForm F v w p = + (r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv w F p)) • n) : + coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + (r⁻¹)^2 := by + obtain ⟨G,hG,_,_,he⟩ := smooth_extension_near hU hF.contMDiffOn hp + have hd : gramDet (coordDeriv dx G p) (coordDeriv dy G p) ≠ 0 := by + simpa only [(coordDeriv_eventuallyEq he dx).eq_of_nhds, + (coordDeriv_eventuallyEq he dy).eq_of_nhds] using hD + have hb : ∀ v w, realSecondForm G v w p = + (r⁻¹*(coordDeriv v G p ⬝ᵥ coordDeriv w G p)) • n := by + intro v w + simpa only [(realSecondForm_eventuallyEq he v w).eq_of_nhds, + (coordDeriv_eventuallyEq he v).eq_of_nhds, + (coordDeriv_eventuallyEq he w).eq_of_nhds] using hB v w + rw [← inducedCurvature_congr_germ he] + exact coordinateGaussianCurvature_pure_radial hG.contDiff p n hn hd hb + +lemma orderedCrossing_intrinsic_pure_radial_on {F : RField 4} {U : Set Base} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) {p : Base} (hp : p ∈ U) + (v w : Base) (n : RVec 4) {r : ℝ} (hr : 0 < r) (hn : n ⬝ᵥ n = 1) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ a b, realSecondForm F a b p = + (r⁻¹*(coordDeriv a F p ⬝ᵥ coordDeriv b F p)) • n) + (hv : coordDeriv v F p ≠ 0) (hw : coordDeriv w F p ≠ 0) : + 0 < orderedCrossing F v w p + (coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p) := by + rw [coordinateGaussianCurvature_pure_radial_on hU hF hp n hn hD hB] + exact (orderedCrossing_pure_radial p v w n hr hn hv hw (hB v v) (hB v w)).2 + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicAnsatzMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicAnsatzMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f273d461246e828e4fa6dc257ff7808bcf23bde --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicAnsatzMetric.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalPeriodicPolynomialExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFiniteAnsatz +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSeriesAlgebra + +namespace OAI + +/-! Identifying the finite metric polynomial with derivatives of the actual map. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector +open ClosedSurfaceR4.PeriodicExpansion (metricPolynomial metricPolynomial_coeff_pos + metricPolynomial_coeff metricPolynomial_expansion vectorPolynomialValue + weighted_sum_split_endpoints weighted_sum_split_zero shifted_derivative_sum) + + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xTangent_value (dx : A) (U : ℕ → Family O E) (n : ℕ) (p : A) (t : Period) (z : ℝ) : + vectorPolynomialValue (n + 1) (fun i => (g.xTangent dx U (n + 1) i).val p t) z = + g.longitudinal.val p t + + (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (xCoefficient dx U i).val p t) + + z ^ (n + 1) • ((U n).slow dx).val p t := by + rw [vectorPolynomialValue, weighted_sum_split_endpoints, g.xTangent_zero] + have he : (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (g.xTangent dx U (n + 1) i).val p t) = + ∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (xCoefficient dx U i).val p t := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hil⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) hil] + rw [he] + simp only [xTangent, Nat.add_eq_zero_iff, Nat.one_ne_zero, and_false, ite_false, + ite_true, Nat.add_sub_cancel] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yTangent_value (U : ℕ → Family O E) (L : ℕ) (p : A) (t : Period) (z : ℝ) : + vectorPolynomialValue L (fun i => (g.yTangent U i).val p t) z = + g.transverse.val p t + ∑ i ∈ Finset.range L, z ^ (i + 1) • ((U i).slow dy).val p t := by + rw [vectorPolynomialValue, weighted_sum_split_zero, g.yTangent_zero] + congr 1 + have he := Finset.sum_Ico_add' (fun i => z ^ i • (g.yTangent U i).val p t) 0 L 1 + simp only [zero_add, Nat.Ico_zero_eq_range] at he + rw [← he] + apply Finset.sum_congr rfl + intro i hi + rw [g.yTangent_pos U (by omega)] + simp only [yCoefficient, Nat.add_sub_cancel] + +omit [FiniteDimensional ℝ E] in +lemma finiteAnsatz_x {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (U : ℕ → Family O E) (hinit : U 0 = g.initial) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓ : ℓ dx = 1) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (n : ℕ) (z : ℝ) (hz : z ≠ 0) {p : A} (hp : p ∈ O) : + fderiv ℝ (finiteAnsatz F U ℓ (n + 1) z) p dx = + vectorPolynomialValue (n + 1) + (fun i => (g.xTangent dx U (n + 1) i).val p ((ℓ p / z : ℝ) : Period)) z := by + let t : Period := ((ℓ p / z : ℝ) : Period) + have hs : (∑ i ∈ Finset.range (n + 1), z ^ (i + 1) • + (((U i).slow dx).val p t + (ℓ dx / z) • (U i).angle.val p t)) = + ∑ i ∈ Finset.range (n + 1), + (z ^ (i + 1) • ((U i).slow dx).val p t + z ^ i • (U i).angle.val p t) := by + apply Finset.sum_congr rfl + intro i hi + rw [smul_add, smul_smul, hℓ] + congr 1 + congr 1 + field_simp + ring + rw [finiteAnsatz_fderiv hF U ℓ _ _ hp, hs, + shifted_derivative_sum z (fun i => ((U i).slow dx).val p t) + (fun i => (U i).angle.val p t) n, g.xTangent_value] + have hlead : fderiv ℝ F p dx + (U 0).angle.val p t = g.longitudinal.val p t := by + rw [hinit, g.initial_angle, hX p hp] + simp only [Family.sub_apply, Family.vectorMean_apply, longitudinal, + Family.add_apply, Family.constant_apply _ _ hp] + abel + simp only [← add_assoc, hlead] + rfl + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma finiteAnsatz_y {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (U : ℕ → Family O E) (ℓ : A →L[ℝ] ℝ) (hℓ : ℓ dy = 0) + (hY : ∀ p ∈ O, fderiv ℝ F p dy = g.Y p) (L : ℕ) (z : ℝ) {p : A} (hp : p ∈ O) : + fderiv ℝ (finiteAnsatz F U ℓ L z) p dy = + vectorPolynomialValue L + (fun i => (g.yTangent U i).val p ((ℓ p / z : ℝ) : Period)) z := by + rw [finiteAnsatz_fderiv hF U ℓ _ _ hp, g.yTangent_value, hY p hp] + simp only [hℓ, zero_div, zero_smul, add_zero, transverse, Family.constant_apply _ _ hp] + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..359ed2eb113c5ca94e35efab2782a2e7de892fad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCalculus.lean @@ -0,0 +1,239 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.SlowPeriodicDerivative + +namespace OAI + +/-! Periodic differentiation and integration on an open parameter domain. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LocalPeriodicCalculus + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {P E : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +omit [InnerProductSpace ℝ E] in +lemma smooth_slice [NormedSpace ℝ E] {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) {p : P} (hp : p ∈ S) : + ContDiff ℝ ∞ (fun t => F (p, t)) := by + rw [contDiff_iff_contDiffAt] + intro t + exact (hF.contDiffAt ((hS.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp t + (contDiff_const.prodMk contDiff_id).contDiffAt + +def bundleOn (F : P × ℝ → E) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) + (hper : ∀ p ∈ S, Function.Periodic (fun t => F (p, t)) 1) : P → C(Period, E) := by + classical + exact fun p => if hp : p ∈ S then + bundle (fun t => F (p, t)) (hper p hp) (smooth_slice hS hF hp).continuous else 0 + +lemma bundleOn_apply (F : P × ℝ → E) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) + (hper : ∀ p ∈ S, Function.Periodic (fun t => F (p, t)) 1) + {p : P} (hp : p ∈ S) (t : ℝ) : bundleOn F S hS hF hper p (t : Period) = F (p, t) := by + simp only [bundleOn, dite_eq_left hp, bundle_apply] + +lemma bundleOn_smooth (F : P × ℝ → E) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) + (hper : ∀ p ∈ S, Function.Periodic (fun t => F (p, t)) 1) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => bundleOn F S hS hF hper z.1 (z.2 : Period)) + (S ×ˢ Set.univ) := by + apply hF.congr + intro z hz + exact bundleOn_apply F S hS hF hper hz.1 z.2 + +lemma angle_smooth {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (angleDerivative F) (S ×ˢ Set.univ) := + (hF.fderiv_of_isOpen (hS.prod isOpen_univ) (by simp)).clm_apply contDiffOn_const + +lemma slow_smooth {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) (v : P) : + ContDiffOn ℝ ∞ (slowDerivative F v) (S ×ˢ Set.univ) := + (hF.fderiv_of_isOpen (hS.prod isOpen_univ) (by simp)).clm_apply contDiffOn_const + +lemma angle_hasDerivAt {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) {p : P} (hp : p ∈ S) (t : ℝ) : + HasDerivAt (fun s => F (p, s)) (angleDerivative F (p, t)) t := by + have hi : HasFDerivAt (fun s : ℝ => (p, s)) (ContinuousLinearMap.inr ℝ P ℝ) t := by + simpa only [ContinuousLinearMap.inr_apply, Prod.mk_add_mk, add_zero, zero_add] using + ((ContinuousLinearMap.inr ℝ P ℝ).hasFDerivAt (x := t)).add_const (p, 0) + have hd := ((hF.contDiffAt ((hS.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).differentiableAt + (by simp)).hasFDerivAt.comp t hi + simpa only [Function.comp_def, ContinuousLinearMap.comp_apply, ContinuousLinearMap.inr_apply, + angleDerivative] using hd.hasDerivAt + +lemma fderiv_slice {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) {p : P} (hp : p ∈ S) (v : P) (t : ℝ) : + fderiv ℝ (fun q => F (q, t)) p v = slowDerivative F v (p, t) := by + have hi : HasFDerivAt (fun q : P => (q, t)) (ContinuousLinearMap.inl ℝ P ℝ) p := by + simpa only [ContinuousLinearMap.inl_apply, Prod.mk_add_mk, add_zero, zero_add] using + ((ContinuousLinearMap.inl ℝ P ℝ).hasFDerivAt (x := p)).add_const (0, t) + have hd := ((hF.contDiffAt ((hS.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).differentiableAt + (by simp)).hasFDerivAt.comp p hi + change fderiv ℝ (F ∘ fun q => (q, t)) p v = _ + rw [hd.fderiv] + rfl + +lemma periodic_angle {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ Set.univ)) + (hper : ∀ p ∈ S, Function.Periodic (fun t => F (p, t)) 1) {p : P} (hp : p ∈ S) : + Function.Periodic (fun t => angleDerivative F (p, t)) 1 := by + have he : (fun t => angleDerivative F (p, t)) = deriv (fun t => F (p, t)) := + funext (fun t => (angle_hasDerivAt hS hF hp t).deriv.symm) + rw [he] + exact PeriodicCalculus.periodic_deriv (hper p hp) + +lemma periodic_slow (F : P → C(Period, E)) {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (v : P) {p : P} (hp : p ∈ S) : + Function.Periodic (fun t => slowDerivative (fun z : P × ℝ => F z.1 (z.2 : Period)) v (p, t)) 1 := by + intro t + have he : (fun q => F q ((t + 1 : ℝ) : Period)) = fun q => F q (t : Period) := + funext (fun q => periodic_lift F q t) + have hd := congrArg (fun f : P → E => fderiv ℝ f p v) he + simpa only [fderiv_slice hS hF hp] using hd + +def angleOn (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) : + P → C(Period, E) := + bundleOn (angleDerivative (fun z : P × ℝ => F z.1 (z.2 : Period))) S hS + (angle_smooth hS hF) (fun _ hp => periodic_angle hS hF (fun p _ => periodic_lift F p) hp) + +lemma angleOn_hasDerivAt (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + {p : P} (hp : p ∈ S) (t : ℝ) : + HasDerivAt (fun s : ℝ => F p (s : Period)) (angleOn F S hS hF p (t : Period)) t := by + rw [angleOn, bundleOn_apply _ _ _ _ _ hp] + exact angle_hasDerivAt hS hF hp t + +lemma angleOn_smooth (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => angleOn F S hS hF z.1 (z.2 : Period)) + (S ×ˢ Set.univ) := bundleOn_smooth _ _ _ _ _ + +lemma angleOn_zero_at (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + {p : P} (hp : p ∈ S) (hz : F p = 0) : angleOn F S hS hF p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro t + have hd := angleOn_hasDerivAt F S hS hF hp t + rw [hz] at hd + exact hd.unique (hasDerivAt_const t (0 : E)) + +def slowOn (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (v : P) : P → C(Period, E) := + bundleOn (slowDerivative (fun z : P × ℝ => F z.1 (z.2 : Period)) v) S hS + (slow_smooth hS hF v) (fun _ hp => periodic_slow F hS hF v hp) + +lemma slowOn_apply (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (v : P) {p : P} (hp : p ∈ S) (t : ℝ) : + slowOn F S hS hF v p (t : Period) = + slowDerivative (fun z : P × ℝ => F z.1 (z.2 : Period)) v (p, t) := + bundleOn_apply _ _ _ _ _ hp t + +lemma slowOn_smooth (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) (v : P) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => slowOn F S hS hF v z.1 (z.2 : Period)) + (S ×ˢ Set.univ) := bundleOn_smooth _ _ _ _ _ + + +lemma slowOn_zero_on (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + {O : Set P} (hO : IsOpen O) (hz : ∀ p ∈ O, F p = 0) (v : P) + {p : P} (hp : p ∈ S) (hpO : p ∈ O) : slowOn F S hS hF v p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro t + rw [slowOn_apply F S hS hF v hp, ← fderiv_slice hS hF hp] + have he : (fun q => F q (t : Period)) =ᶠ[𝓝 p] fun _ => (0 : E) := by + filter_upwards [hO.mem_nhds hpO] with q hq + rw [hz q hq] + rfl + rw [he.fderiv_eq, fderiv_const_apply, zero_apply] + rfl + +variable [FiniteDimensional ℝ P] [CompleteSpace E] + +def primitiveOn (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) : P → C(Period, E) := + bundleOn (fun z : P × ℝ => PeriodicPrimitive.primitive (fun t => F z.1 (t : Period)) z.2) + S hS (PeriodicPrimitive.contDiffOn_primitive_joint hS hF) + (fun p hp => PeriodicPrimitive.primitive_periodic + ((F p).continuous.comp (AddCircle.continuous_mk' 1)) (periodic_lift F p) + ((PeriodicPrimitive.integral_lift_eq_haar (F p)).trans (hm p hp))) + +lemma primitiveOn_apply (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) {p : P} (hp : p ∈ S) (t : ℝ) : + primitiveOn F S hS hF hm p (t : Period) = + PeriodicPrimitive.primitive (fun s => F p (s : Period)) t := + bundleOn_apply _ _ _ _ _ hp t + +lemma primitiveOn_smooth (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => primitiveOn F S hS hF hm z.1 (z.2 : Period)) + (S ×ˢ Set.univ) := bundleOn_smooth _ _ _ _ _ + +lemma primitiveOn_hasDerivAt (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) {p : P} (hp : p ∈ S) (t : ℝ) : + HasDerivAt (fun s : ℝ => primitiveOn F S hS hF hm p (s : Period)) (F p (t : Period)) t := by + simp only [primitiveOn_apply F S hS hF hm hp] + exact PeriodicPrimitive.primitive_hasDerivAt ((F p).continuous.comp (AddCircle.continuous_mk' 1)) t + +lemma primitiveOn_mean_zero (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) {p : P} (hp : p ∈ S) : + average (primitiveOn F S hS hF hm p) = 0 := by + rw [CovarianceCorrector.average, ← PeriodicPrimitive.integral_lift_eq_haar] + simp only [primitiveOn_apply F S hS hF hm hp] + exact PeriodicPrimitive.primitive_mean_zero + ((F p).continuous.comp (AddCircle.continuous_mk' 1)) + +lemma primitiveOn_zero_at (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) {p : P} (hp : p ∈ S) (hz : F p = 0) : + primitiveOn F S hS hF hm p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro t + rw [primitiveOn_apply F S hS hF hm hp, hz] + exact PeriodicPrimitive.primitive_zero t + +omit [CompleteSpace E] in +lemma slowOn_mean_zero (F : P → C(Period, E)) (S : Set P) (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ (fun z : P × ℝ => F z.1 (z.2 : Period)) (S ×ˢ Set.univ)) + (hm : ∀ p ∈ S, average (F p) = 0) (v : P) {p : P} (hp : p ∈ S) : + average (slowOn F S hS hF v p) = 0 := by + let f : P × ℝ → E := fun z => F z.1 (z.2 : Period) + have hzero : (fun q => ∫ t in 0..1, f (q, t)) =ᶠ[𝓝 p] fun _ => (0 : E) := by + filter_upwards [hS.mem_nhds hp] with q hq + exact (PeriodicPrimitive.integral_lift_eq_haar (F q)).trans (hm q hq) + have hd := (SmoothParameterIntegral.hasFDerivAt_integral_on hS hF 0 1 hp).fderiv + change fderiv ℝ (fun q => ∫ t in 0..1, f (q, t)) p = _ at hd + rw [hzero.fderiv_eq, fderiv_const_apply] at hd + have he := congrArg (fun L : P →L[ℝ] E => L v) hd.symm + have hi := ContinuousLinearMap.intervalIntegral_apply (μ := volume) + (φ := fun t => SmoothParameterIntegral.partialDerivative f (p, t)) + ((smooth_slice hS (hF.fderiv_of_isOpen (hS.prod isOpen_univ) (by simp)) hp).continuous + |>.clm_comp continuous_const |>.intervalIntegrable 0 1) v + rw [CovarianceCorrector.average, ← PeriodicPrimitive.integral_lift_eq_haar] + simp only [slowOn_apply F S hS hF v hp] + exact hi.symm.trans he + +end ClosedSurfaceR4.LocalPeriodicCalculus + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCoefficientSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCoefficientSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..f28611a416e40726590aabc3fd953e72b5465683 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicCoefficientSupport.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicMetricCoefficients + +namespace OAI + +/-! Differentiating and forming metric coefficients preserves local zero support. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +variable {Z : Set A} (hO : IsOpen Z) (hZO : Z ⊆ O) (U : ℕ → Family O E) + (hU : ∀ i p, p ∈ Z → (U i).val p = 0) + +include hO hU hZO + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xCoefficient_zero_on (dx : A) (i : ℕ) {p : A} (hp : p ∈ Z) : + (xCoefficient dx U i).val p = 0 := by + have hs := (U (i - 1)).slow_zero_on hO (hU (i - 1)) dx (hZO hp) hp + have ha := (U i).angle_zero_at (hZO hp) (hU i p hp) + ext t + change ((U (i - 1)).slow dx).val p t + (U i).angle.val p t = 0 + rw [hs, ha] + simp only [ContinuousMap.zero_apply, add_zero] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yCoefficient_zero_on (dy : A) (i : ℕ) {p : A} (hp : p ∈ Z) : + (yCoefficient dy U i).val p = 0 := + (U (i - 1)).slow_zero_on hO (hU (i - 1)) dy (hZO hp) hp + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxQuadratic_zero_on (dx : A) (r : ℕ) {p : A} (hp : p ∈ Z) : + (xxQuadratic dx U r).val p = 0 := by + ext t + simp only [xxQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [xCoefficient_zero_on hO hZO U hU dx i hp] + exact inner_zero_left _ + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyQuadratic_zero_on (dx dy : A) (r : ℕ) {p : A} (hp : p ∈ Z) : + (xyQuadratic dx dy U r).val p = 0 := by + ext t + simp only [xyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [xCoefficient_zero_on hO hZO U hU dx i hp] + exact inner_zero_left _ + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyQuadratic_zero_on (dy : A) (r : ℕ) {p : A} (hp : p ∈ Z) : + (yyQuadratic dy U r).val p = 0 := by + ext t + simp only [yyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [yCoefficient_zero_on hO hZO U hU dy i hp] + exact inner_zero_left _ + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionInit.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionInit.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b6f20c4262d9e464b67e809a75174dc84446f61 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionInit.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionStep + +namespace OAI + +/-! Initial coefficient and transverse cancellation on the admissible domain. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector LocalPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +namespace Geometry +variable {v : A} (g : Geometry (E := E) O v) + +def initial : Family O E := + (g.V - g.V.vectorMean).primitive (fun p _ => g.V.centered_mean_zero p) + +omit [FiniteDimensional ℝ E] in +lemma initial_mean_zero {p : A} (hp : p ∈ O) : average (g.initial.val p) = 0 := + Family.primitive_mean_zero _ _ hp + +omit [FiniteDimensional ℝ E] in +lemma initial_angle : g.initial.angle = g.V - g.V.vectorMean := + Family.primitive_angle _ _ + +lemma initial_mem {p : A} (hp : p ∈ O) (t : Period) : g.initial.val p t ∈ g.plane p := by + apply Family.primitive_mem _ _ _ _ hp + intro q hq s + simp only [Family.sub_apply, Family.vectorMean_apply] + exact (g.plane q).sub_mem (g.V_mem q hq s) + (average_mem_submodule (g.plane q) (g.V.val q).continuous (g.V_mem q hq)) + +lemma initial_pairing {p : A} (hp : p ∈ O) (t : Period) : + inner ℝ (g.Y p) (g.initial.val p t) = 0 ∧ + inner ℝ (g.C p) (g.initial.val p t) = 0 := + ⟨g.perpY p hp _ (g.initial_mem hp t), g.perpC p hp _ (g.initial_mem hp t)⟩ + +lemma initial_transverse_derivative : g.transverse.inner (g.initial.slow v) = 0 := by + ext p hp t + refine Quotient.inductionOn' t ?_ + intro x + simp only [Family.inner_apply, transverse, Family.constant_apply _ _ hp, + Family.slow_apply _ _ hp, Family.zero_apply] + have hUt : ContDiffAt ℝ ∞ (fun q => g.initial.val q (x : Period)) p := + (g.initial.smooth.contDiffAt ((O.isOpen.prod isOpen_univ).mem_nhds + ⟨hp, Set.mem_univ x⟩)).comp p (contDiff_id.prodMk contDiff_const).contDiffAt + have hd := PeriodicCorrector.directional_pairing_constraint_on O.isOpen hp + ((g.smoothY.contDiffAt (O.isOpen.mem_nhds hp)).differentiableAt (by simp)) + (hUt.differentiableAt (by simp)) (differentiableAt_const (c := (0 : ℝ))) + (fun q hq => (g.initial_pairing hq (x : Period)).1) (g.derivativeY p hp) + (show inner ℝ (g.C p) (g.initial.val p (x : Period)) = + fderiv ℝ (fun _ : A => (0 : ℝ)) p v - 0 by + simpa using (g.initial_pairing hp (x : Period)).2) + rwa [fderiv_slice O.isOpen g.initial.smooth hp] at hd + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..36098eb589d536bfbcc2dd1153e3a1401e0f1889 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicExpansionStep.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFamilyAlgebra + +namespace OAI + +/-! The finite periodic cancellation step on an open admissible domain. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector LocalPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +structure Geometry (O : TopologicalSpace.Opens A) (v : A) where + plane : A → Submodule ℝ E + Y : A → E + C : A → E + X₀ : A → E + smoothY : ContDiffOn ℝ ∞ Y O + smoothC : ContDiffOn ℝ ∞ C O + smoothX₀ : ContDiffOn ℝ ∞ X₀ O + derivativeY : ∀ p ∈ O, fderiv ℝ Y p v = C p + gram_ne : ∀ p ∈ O, PeriodicCorrector.gramDet (Y p) (C p) ≠ 0 + perpY : ∀ p ∈ O, ∀ w, w ∈ plane p → inner ℝ (Y p) w = 0 + perpC : ∀ p ∈ O, ∀ w, w ∈ plane p → inner ℝ (C p) w = 0 + perpX₀ : ∀ p ∈ O, ∀ w, w ∈ plane p → inner ℝ (X₀ p) w = 0 + V : Family O E + V_mem : ∀ p ∈ O, ∀ t, V.val p t ∈ plane p + q : A → ℝ + smoothq : ContDiffOn ℝ ∞ q O + q_pos : ∀ p ∈ O, 0 < q p + circle : ∀ p ∈ O, ∀ t, inner ℝ (V.val p t) (V.val p t) = q p + +namespace Geometry +variable {v : A} (g : Geometry (E := E) O v) + +def longitudinal : Family O E := Family.constant g.X₀ g.smoothX₀ + g.V + +def transverse : Family O E := Family.constant g.Y g.smoothY + +theorem exists_system (h j e : Family O ℝ) + (hh : ∀ p ∈ O, average (h.val p) = 0) (hj : ∀ p ∈ O, average (j.val p) = 0) + (he : ∀ p ∈ O, average (e.val p) = 0) : + ∃ U : Family O E, (∀ p ∈ O, average (U.val p) = 0) ∧ + g.transverse.inner U.angle = h ∧ + g.transverse.inner (U.slow v) = j ∧ + (g.longitudinal.inner U.angle).fluct = e ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, h.val p = 0) → + (∀ p ∈ Z, j.val p = 0) → (∀ p ∈ Z, e.val p = 0) → ∀ p ∈ Z, U.val p = 0) := by + obtain ⟨U, D, hUs, _, hU0, hUd, hYd, hYs, hX, hzero⟩ := + PeriodicCorrector.solve_full_smooth_family_on O O.isOpen v g.plane g.Y g.C g.X₀ + g.smoothY g.smoothC g.smoothX₀ g.derivativeY g.gram_ne + g.perpY g.perpC g.perpX₀ g.V.val g.V_mem g.V.smooth + g.q g.smoothq g.q_pos g.circle h.val j.val e.val h.smooth j.smooth e.smooth hh hj he + let U' : Family O E := Family.ofLocal U hUs + have hval (p : A) (hp : p ∈ O) : U'.val p = U p := by + ext t + exact Family.ofLocal_apply U hUs hp t + have hangle (p : A) (hp : p ∈ O) (t : Period) : U'.angle.val p t = D p t := by + refine Quotient.inductionOn' t ?_ + intro x + have hd := U'.angle_hasDerivAt hp x + simp only [hval p hp] at hd + exact hd.unique (hUd p hp x) + refine ⟨U', ?_, ?_, ?_, ?_, ?_⟩ + · intro p hp + rw [hval p hp] + exact hU0 p hp + · ext p hp t + simp only [Family.inner_apply, transverse, Family.constant_apply _ _ hp, hangle p hp] + exact hYd p hp t + · ext p hp t + refine Quotient.inductionOn' t ?_ + intro x + simp only [Family.inner_apply, transverse, Family.constant_apply _ _ hp, Family.slow_apply _ _ hp] + rw [← fderiv_slice O.isOpen U'.smooth hp] + have hv : (fun q => U'.val q (x : Period)) =ᶠ[𝓝 p] fun q => U q (x : Period) := by + filter_upwards [O.isOpen.mem_nhds hp] with q hq + rw [hval q hq] + rw [hv.fderiv_eq, fderiv_slice O.isOpen hUs hp] + exact hYs p hp x + · ext p hp t + have hinner : (g.longitudinal.inner U'.angle).val p = + ⟨fun t => inner ℝ (g.X₀ p + g.V.val p t) (D p t), + (continuous_const.add (g.V.val p).continuous).inner (D p).continuous⟩ := by + ext s + simp only [Family.inner_apply, longitudinal, Family.add_apply, Family.constant_apply _ _ hp, hangle p hp] + rfl + simp only [Family.fluct_apply, fluctuation, hinner] + exact congrFun (hX p hp) t + · intro Z hZ hZO hhZ hjZ heZ p hp + rw [hval p (hZO hp)] + exact hzero Z hZ hZO hhZ hjZ heZ p hp + +/-- One coefficient cancels the next three fluctuation equations. -/ +theorem exists_cancellation (b c d : Family O ℝ) : + ∃ U : Family O E, (∀ p ∈ O, average (U.val p) = 0) ∧ + (g.transverse.inner U.angle + b).fluct = 0 ∧ + (g.longitudinal.inner U.angle + c).fluct = 0 ∧ + ((2 : ℝ) • g.transverse.inner (U.slow v) + d).fluct = 0 ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, b.val p = 0) → + (∀ p ∈ Z, c.val p = 0) → (∀ p ∈ Z, d.val p = 0) → ∀ p ∈ Z, U.val p = 0) := by + have hs (a : ℝ) (f : Family O ℝ) (p : A) (_ : p ∈ O) : + average ((a • f.fluct).val p) = 0 := by + change average (fun t => a • f.fluct.val p t) = 0 + rw [average_const_smul, f.fluct_mean_zero, smul_zero] + obtain ⟨U, hU0, hY, hS, hX, hzero⟩ := g.exists_system + ((-1 : ℝ) • b.fluct) ((-1 / 2 : ℝ) • d.fluct) ((-1 : ℝ) • c.fluct) + (hs _ _) (hs _ _) (hs _ _) + refine ⟨U, hU0, ?_, ?_, ?_, ?_⟩ + · rw [Family.fluct_add, hY, Family.fluct_smul, Family.fluct_fluct] + module + · rw [Family.fluct_add, hX] + module + · rw [Family.fluct_add, Family.fluct_smul, hS, Family.fluct_smul, Family.fluct_fluct] + module + · intro Z hZ hZO hb hc hd + have hz (a : ℝ) (f : Family O ℝ) (hf : ∀ p ∈ Z, f.val p = 0) : + ∀ p ∈ Z, (a • f.fluct).val p = 0 := by + intro p hp + change a • f.fluct.val p = 0 + rw [f.fluct_zero_at (hf p hp), smul_zero] + exact hzero Z hZ hZO (hz _ _ hb) (hz _ _ hd) (hz _ _ hc) + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilies.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe45389721248e7f22881b8aa2a7a3e01243eb0d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilies.lean @@ -0,0 +1,150 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalFullPeriodicCorrector + +namespace OAI + +/-! Smooth periodic coefficient families on the actual open geometric domain. +Values outside that domain are fixed at zero, so equality only needs checking inside. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector LocalPeriodicCalculus + +variable {A : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] +variable (O : TopologicalSpace.Opens A) (E : Type) [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +def smoothFamilies : Submodule ℝ (A → C(Period, E)) where + carrier := {F | ContDiffOn ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period)) + ((O : Set A) ×ˢ Set.univ) ∧ ∀ p, p ∉ O → F p = 0} + zero_mem' := ⟨contDiffOn_const, fun _ _ => rfl⟩ + add_mem' := by + rintro F G ⟨hF, hF0⟩ ⟨hG, hG0⟩ + exact ⟨hF.add hG, fun p hp => by change F p + G p = 0; rw [hF0 p hp, hG0 p hp, add_zero]⟩ + smul_mem' := by + rintro c F ⟨hF, hF0⟩ + exact ⟨contDiffOn_const.smul hF, fun p hp => by change c • F p = 0; rw [hF0 p hp, smul_zero]⟩ + +def Family := ↥(smoothFamilies O E) +instance : AddCommGroup (Family O E) := inferInstanceAs (AddCommGroup ↥(smoothFamilies O E)) +instance : Module ℝ (Family O E) := inferInstanceAs (Module ℝ ↥(smoothFamilies O E)) + +variable {O E} +namespace Family + +def val (F : Family O E) : A → C(Period, E) := F.1 +lemma smooth (F : Family O E) : + ContDiffOn ℝ ∞ (fun z : A × ℝ => F.val z.1 (z.2 : Period)) + ((O : Set A) ×ˢ Set.univ) := F.2.1 +lemma outside (F : Family O E) {p : A} (hp : p ∉ O) : F.val p = 0 := F.2.2 p hp + +@[ext] lemma ext {F G : Family O E} (h : ∀ p ∈ O, ∀ t, F.val p t = G.val p t) : F = G := by + apply Subtype.ext + funext p + by_cases hp : p ∈ O + · exact ContinuousMap.ext (h p hp) + · exact (F.outside hp).trans (G.outside hp).symm + +@[simp] lemma zero_apply (p : A) (t : Period) : (0 : Family O E).val p t = 0 := rfl +@[simp] lemma add_apply (F G : Family O E) (p : A) (t : Period) : + (F + G).val p t = F.val p t + G.val p t := rfl +@[simp] lemma sub_apply (F G : Family O E) (p : A) (t : Period) : + (F - G).val p t = F.val p t - G.val p t := rfl +@[simp] lemma neg_apply (F : Family O E) (p : A) (t : Period) : + (-F).val p t = -F.val p t := rfl +@[simp] lemma smul_apply (c : ℝ) (F : Family O E) (p : A) (t : Period) : + (c • F).val p t = c • F.val p t := rfl +@[simp] lemma sum_apply {ι : Type*} (s : Finset ι) (F : ι → Family O E) + (p : A) (t : Period) : (∑ i ∈ s, F i).val p t = ∑ i ∈ s, (F i).val p t := by + classical + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp [hi, ih] + +/-- Restrict a locally smooth family to the admissible domain. -/ +def ofLocal (F : A → C(Period, E)) + (hF : ContDiffOn ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period)) ((O : Set A) ×ˢ Set.univ)) : + Family O E := + ⟨bundleOn (fun z : A × ℝ => F z.1 (z.2 : Period)) O O.isOpen hF + (fun p _ => SmoothPeriodicCalculus.periodic_lift F p), + bundleOn_smooth _ _ _ _ _, fun p hp => by simp [bundleOn, hp]⟩ + +@[simp] lemma ofLocal_apply (F : A → C(Period, E)) + (hF : ContDiffOn ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period)) ((O : Set A) ×ˢ Set.univ)) + {p : A} (hp : p ∈ O) (t : Period) : (ofLocal F hF).val p t = F p t := by + refine Quotient.inductionOn' t ?_ + intro x + exact bundleOn_apply _ _ _ _ _ hp x + +def angle (F : Family O E) : Family O E := + ofLocal (angleOn F.val O O.isOpen F.smooth) (angleOn_smooth _ _ _ _) + +def slow (F : Family O E) (v : A) : Family O E := + ofLocal (slowOn F.val O O.isOpen F.smooth v) (slowOn_smooth _ _ _ _ _) + +lemma angle_hasDerivAt (F : Family O E) {p : A} (hp : p ∈ O) (t : ℝ) : + HasDerivAt (fun s : ℝ => F.val p (s : Period)) (F.angle.val p (t : Period)) t := by + rw [angle, ofLocal_apply _ _ hp] + exact angleOn_hasDerivAt F.val O O.isOpen F.smooth hp t + +@[simp] lemma slow_apply (F : Family O E) (v : A) {p : A} (hp : p ∈ O) (t : ℝ) : + (F.slow v).val p (t : Period) = + SmoothPeriodicCalculus.slowDerivative (fun z : A × ℝ => F.val z.1 (z.2 : Period)) v (p, t) := by + rw [slow, ofLocal_apply _ _ hp, slowOn_apply _ _ _ _ _ hp] + +def inner (F G : Family O E) : Family O ℝ := + ⟨fun p => ⟨fun t => Inner.inner ℝ (F.val p t) (G.val p t), + (F.val p).continuous.inner (G.val p).continuous⟩, + F.smooth.inner ℝ G.smooth, fun p hp => by ext t; simp [F.outside hp, G.outside hp]⟩ + +@[simp] lemma inner_apply (F G : Family O E) (p : A) (t : Period) : + (F.inner G).val p t = Inner.inner ℝ (F.val p t) (G.val p t) := rfl + +def constant (f : A → E) (hf : ContDiffOn ℝ ∞ f O) : Family O E := + ofLocal (fun p => ContinuousMap.const Period (f p)) + (hf.comp contDiffOn_fst (fun _ hz => hz.1)) + +@[simp] lemma constant_apply (f : A → E) (hf : ContDiffOn ℝ ∞ f O) + {p : A} (hp : p ∈ O) (t : Period) : (constant f hf).val p t = f p := + ofLocal_apply _ _ hp t + +variable [FiniteDimensional ℝ A] [CompleteSpace E] + +def primitive (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) : Family O E := + ofLocal (primitiveOn F.val O O.isOpen F.smooth hm) (primitiveOn_smooth _ _ _ _ _) + +lemma primitive_angle (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) : + (F.primitive hm).angle = F := by + ext p hp t + refine Quotient.inductionOn' t ?_ + intro x + have hd := (F.primitive hm).angle_hasDerivAt hp x + have he : (fun s : ℝ => (F.primitive hm).val p (s : Period)) = + fun s : ℝ => primitiveOn F.val O O.isOpen F.smooth hm p (s : Period) := by + funext s + exact ofLocal_apply _ _ hp _ + rw [he] at hd + exact hd.unique (primitiveOn_hasDerivAt _ _ _ _ _ hp x) + +lemma primitive_mean_zero (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) + {p : A} (hp : p ∈ O) : average ((F.primitive hm).val p) = 0 := by + have he : (F.primitive hm).val p = primitiveOn F.val O O.isOpen F.smooth hm p := by + ext t + exact ofLocal_apply _ _ hp t + rw [he] + exact primitiveOn_mean_zero _ _ _ _ _ hp + +omit [CompleteSpace E] in +lemma slow_mean_zero (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) + (v : A) {p : A} (hp : p ∈ O) : average ((F.slow v).val p) = 0 := by + have he : (F.slow v).val p = slowOn F.val O O.isOpen F.smooth v p := by + ext t + exact ofLocal_apply _ _ hp t + rw [he] + exact slowOn_mean_zero _ _ _ _ hm v hp + +end Family +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilyAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilyAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d0d8e4364b51a22a567d972cbee2861e318df62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFamilyAlgebra.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFamilies + +namespace OAI + +/-! Algebra and support preservation for periodic families on an open domain. -/ +noncomputable section + +namespace ClosedSurfaceR4.LocalPeriodicExpansion.Family +open CovarianceCorrector LocalPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + {O : TopologicalSpace.Opens A} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma inner_add_left (F G H : Family O E) : (F + G).inner H = F.inner H + G.inner H := by + ext p hp t + simp only [inner_apply, add_apply, _root_.inner_add_left] +lemma inner_add_right (F G H : Family O E) : F.inner (G + H) = F.inner G + F.inner H := by + ext p hp t + simp only [inner_apply, add_apply, _root_.inner_add_right] + +lemma angle_zero_at (F : Family O E) {p : A} (hp : p ∈ O) (hz : F.val p = 0) : + F.angle.val p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro x + have hd := F.angle_hasDerivAt hp x + rw [hz] at hd + exact hd.unique (hasDerivAt_const x 0) + +lemma slow_zero_on (F : Family O E) {Z : Set A} (hZ : IsOpen Z) + (hz : ∀ p ∈ Z, F.val p = 0) (v : A) {p : A} (hp : p ∈ O) (hpZ : p ∈ Z) : + (F.slow v).val p = 0 := by + have he : (F.slow v).val p = slowOn F.val O O.isOpen F.smooth v p := by + ext t + exact ofLocal_apply _ _ hp _ + rw [he] + exact slowOn_zero_on _ _ _ _ hZ hz v hp hpZ + +variable [FiniteDimensional ℝ A] [CompleteSpace E] + +def vectorMean (F : Family O E) : Family O E := + constant (fun p => average (F.val p)) (contDiffOn_average_joint O.isOpen F.smooth) + +@[simp] lemma vectorMean_apply (F : Family O E) (p : A) (t : Period) : + F.vectorMean.val p t = average (F.val p) := by + by_cases hp : p ∈ O + · exact constant_apply _ _ hp t + · rw [F.vectorMean.outside hp, F.outside hp] + change (0 : E) = average (fun _ => (0 : E)) + rw [average_const] + +lemma centered_mean_zero (F : Family O E) (p : A) : + average ((F - F.vectorMean).val p) = 0 := by + change average (fun t => F.val p t - F.vectorMean.val p t) = 0 + simp only [vectorMean_apply] + rw [average_sub (F.val p).continuous continuous_const, average_const, sub_self] + +lemma primitive_zero_at (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) + {p : A} (hp : p ∈ O) (hz : F.val p = 0) : (F.primitive hm).val p = 0 := by + have he : (F.primitive hm).val p = primitiveOn F.val O O.isOpen F.smooth hm p := by + ext t + exact ofLocal_apply _ _ hp _ + rw [he] + exact primitiveOn_zero_at _ _ _ _ _ hp hz + +lemma primitive_mem (F : Family O E) (hm : ∀ p ∈ O, average (F.val p) = 0) + [FiniteDimensional ℝ E] (S : A → Submodule ℝ E) + (hS : ∀ p ∈ O, ∀ t, F.val p t ∈ S p) {p : A} (hp : p ∈ O) (t : Period) : + (F.primitive hm).val p t ∈ S p := by + rw [primitive, ofLocal_apply _ _ hp] + refine Quotient.inductionOn' t ?_ + intro x + rw [primitiveOn_apply _ _ _ _ _ hp] + exact PeriodicPrimitive.primitive_mem_submodule (S p) + ((F.val p).continuous.comp (AddCircle.continuous_mk' 1)) (fun s => hS p hp (s : Period)) x + +end ClosedSurfaceR4.LocalPeriodicExpansion.Family + +namespace ClosedSurfaceR4.LocalPeriodicExpansion.Family +open CovarianceCorrector +variable {A : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] {O : TopologicalSpace.Opens A} + +def mean (F : Family O ℝ) : Family O ℝ := F.vectorMean + +def fluct (F : Family O ℝ) : Family O ℝ := F - F.mean + +@[simp] lemma mean_apply (F : Family O ℝ) (p : A) (t : Period) : + F.mean.val p t = average (F.val p) := vectorMean_apply F p t +@[simp] lemma fluct_apply (F : Family O ℝ) (p : A) (t : Period) : + F.fluct.val p t = fluctuation (F.val p) t := by + simp only [fluct, sub_apply, mean_apply, fluctuation] + +lemma fluct_mean_zero (F : Family O ℝ) (p : A) : average (F.fluct.val p) = 0 := by + change average (fun t => F.fluct.val p t) = 0 + simp only [fluct_apply] + exact PeriodicCorrector.average_fluctuation (F.val p).continuous + +lemma mean_add (F G : Family O ℝ) : (F + G).mean = F.mean + G.mean := by + ext p hp t + simp only [mean_apply, add_apply] + exact average_add (F.val p).continuous (G.val p).continuous +lemma mean_smul (c : ℝ) (F : Family O ℝ) : (c • F).mean = c • F.mean := by + ext p hp t + simp only [mean_apply, smul_apply] + exact average_const_smul c (F.val p) +lemma mean_mean (F : Family O ℝ) : F.mean.mean = F.mean := by + ext p hp t + simp only [mean_apply] + change average (fun s => F.mean.val p s) = average (F.val p) + simp only [mean_apply] + exact average_const (average (F.val p)) +lemma fluct_add (F G : Family O ℝ) : (F + G).fluct = F.fluct + G.fluct := by + simp only [fluct, mean_add] + abel +lemma fluct_smul (c : ℝ) (F : Family O ℝ) : (c • F).fluct = c • F.fluct := by + simp only [fluct, mean_smul, smul_sub] +lemma fluct_fluct (F : Family O ℝ) : F.fluct.fluct = F.fluct := by + have hm : F.fluct.mean = 0 := by + ext p hp t + simpa only [mean_apply, zero_apply] using F.fluct_mean_zero p + rw [fluct, hm, sub_zero] +lemma fluct_zero_at (F : Family O ℝ) {p : A} (hz : F.val p = 0) : F.fluct.val p = 0 := by + ext t + simp only [fluct_apply, fluctuation, hz] + change (0 : ℝ) - average (fun _ => (0 : ℝ)) = 0 + rw [average_const, sub_self] + +end ClosedSurfaceR4.LocalPeriodicExpansion.Family + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFastEvaluation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFastEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6da1352cbf297330d940db1582ba696a51f2ee05 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFastEvaluation.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFamilies + +namespace OAI + +/-! Actual fast-phase differentiation on an admissible chart domain. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion.Family +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] {O : TopologicalSpace.Opens A} + +lemma angle_apply (F : Family O E) {p : A} (hp : p ∈ O) (t : ℝ) : + F.angle.val p (t : Period) = + angleDerivative (fun z : A × ℝ => F.val z.1 (z.2 : Period)) (p, t) := by + rw [angle, ofLocal_apply _ _ hp] + exact LocalPeriodicCalculus.bundleOn_apply _ _ _ _ _ hp t + +def fastValue (U : Family O E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) (p : A) : E := + U.val p ((ℓ p / z : ℝ) : Period) + +lemma fastValue_smooth (U : Family O E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) : + ContDiffOn ℝ ∞ (U.fastValue ℓ z) O := + U.smooth.comp (contDiffOn_id.prodMk (ℓ.contDiff.div_const z).contDiffOn) + (fun _ hp => ⟨hp, Set.mem_univ _⟩) + +lemma fastValue_fderiv (U : Family O E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) + {p : A} (hp : p ∈ O) (v : A) : + fderiv ℝ (U.fastValue ℓ z) p v = + (U.slow v).val p ((ℓ p / z : ℝ) : Period) + + (ℓ v / z) • U.angle.val p ((ℓ p / z : ℝ) : Period) := by + let T : A →L[ℝ] A × ℝ := (ContinuousLinearMap.id ℝ A).prod (z⁻¹ • ℓ) + have hT (p : A) : T p = (p, ℓ p / z) := by simp [T, div_eq_mul_inv, mul_comm] + have hEq : U.fastValue ℓ z = + (fun w : A × ℝ => U.val w.1 (w.2 : Period)) ∘ T := by + funext p + simp only [Function.comp_apply, hT, fastValue] + have hd : DifferentiableAt ℝ (fun w : A × ℝ => U.val w.1 (w.2 : Period)) (T p) := by + rw [hT] + exact (U.smooth.contDiffAt ((O.isOpen.prod isOpen_univ).mem_nhds + ⟨hp, Set.mem_univ _⟩)).differentiableAt (by simp) + rw [hEq, fderiv_comp p hd T.differentiableAt] + simp only [ContinuousLinearMap.fderiv, ContinuousLinearMap.comp_apply, hT] + change fderiv ℝ (fun w : A × ℝ => U.val w.1 (w.2 : Period)) (p, ℓ p / z) (v, ℓ v / z) = _ + have hv : (v, ℓ v / z) = (v, 0) + (ℓ v / z) • ((0 : A), (1 : ℝ)) := by simp + rw [hv, map_add, map_smul, slow_apply _ _ hp, angle_apply _ hp] + rfl + +end ClosedSurfaceR4.LocalPeriodicExpansion.Family + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteAnsatz.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteAnsatz.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcff7daeb0ce4af5351c729634835a8532f08e9c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteAnsatz.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFastEvaluation + +namespace OAI + +/-! The finite oscillatory map and its actual first derivatives. -/ + +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] {O : TopologicalSpace.Opens A} + +def finiteAnsatz (F : A → E) (U : ℕ → Family O E) (ℓ : A →L[ℝ] ℝ) + (L : ℕ) (z : ℝ) (p : A) : E := + F p + ∑ i ∈ Finset.range L, z ^ (i + 1) • (U i).fastValue ℓ z p + +lemma finiteAnsatz_smooth {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (U : ℕ → Family O E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + ContDiffOn ℝ ∞ (finiteAnsatz F U ℓ L z) O := + hF.add (ContDiffOn.sum fun i _ => contDiffOn_const.smul ((U i).fastValue_smooth ℓ z)) + +lemma finiteAnsatz_fderiv {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (U : ℕ → Family O E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {p : A} (hp : p ∈ O) (v : A) : + fderiv ℝ (finiteAnsatz F U ℓ L z) p v = fderiv ℝ F p v + + ∑ i ∈ Finset.range L, z ^ (i + 1) • + (((U i).slow v).val p ((ℓ p / z : ℝ) : Period) + + (ℓ v / z) • (U i).angle.val p ((ℓ p / z : ℝ) : Period)) := by + have hd (i : ℕ) : DifferentiableAt ℝ ((U i).fastValue ℓ z) p := + (((U i).fastValue_smooth ℓ z).contDiffAt (O.isOpen.mem_nhds hp)).differentiableAt (by simp) + have hterm (i : ℕ) : DifferentiableAt ℝ + (fun q => z ^ (i + 1) • (U i).fastValue ℓ z q) p := (hd i).const_smul _ + have hsum : DifferentiableAt ℝ + (fun q => ∑ i ∈ Finset.range L, z ^ (i + 1) • (U i).fastValue ℓ z q) p := + DifferentiableAt.fun_sum (fun i _ => hterm i) + unfold finiteAnsatz + rw [fderiv_fun_add ((hF.contDiffAt (O.isOpen.mem_nhds hp)).differentiableAt (by simp)) hsum] + rw [fderiv_fun_sum (fun i _ => hterm i)] + simp only [add_apply, sum_apply] + congr 1 + apply Finset.sum_congr rfl + intro i hi + rw [fderiv_fun_const_smul (hd i), smul_apply, + Family.fastValue_fderiv _ _ _ hp] + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteMetricIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteMetricIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..d032216461cd8b08eec7a321cd5e1d85a39f591e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicFiniteMetricIdentity.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicAnsatzMetric +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicMetricRemainder + +namespace OAI + +/-! Exact finite metric expansion of the actual oscillatory map. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector +open ClosedSurfaceR4.PeriodicExpansion (metricPolynomial metricPolynomial_coeff_pos + metricPolynomial_coeff metricPolynomial_expansion vectorPolynomialValue + weighted_sum_split_endpoints weighted_sum_split_zero shifted_derivative_sum) + + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma polynomial_zero_coefficients (dx : A) (U : ℕ → Family O E) (L : ℕ) + {p : A} (hpO : p ∈ O) (t : Period) : + (g.xxRemainder dx U L 0).val p t = inner ℝ (g.X₀ p) (g.X₀ p) + g.q p ∧ + (g.xyRemainder dx U L 0).val p t = inner ℝ (g.X₀ p) (g.Y p) ∧ + (g.yyRemainder U L 0).val p t = inner ℝ (g.Y p) (g.Y p) := by + have hp := g.perpX₀ p hpO _ (g.V_mem p hpO t) + have hy := g.perpY p hpO _ (g.V_mem p hpO t) + have hp' : inner ℝ (g.V.val p t) (g.X₀ p) = 0 := by + rw [real_inner_comm] + exact hp + have hy' : inner ℝ (g.V.val p t) (g.Y p) = 0 := by + rw [real_inner_comm] + exact hy + simp only [xxRemainder, xyRemainder, yyRemainder, metricCoefficientFamily_apply, + metricPolynomial_coeff (Nat.zero_le L), Finset.sum_range_one, Nat.sub_zero, + xTangent_zero, yTangent_zero, longitudinal, transverse, Family.add_apply, + Family.constant_apply _ _ hpO, inner_add_left, inner_add_right, hp, hp', hy', g.circle p hpO t, add_zero, + zero_add] + trivial + +omit [FiniteDimensional ℝ E] in +/-- The exact metric identity, before replacing low coefficients by their means. -/ +theorem finite_metric_identity {F : A → E} (hF : ContDiffOn ℝ ∞ F O) + (U : ℕ → Family O E) (hinit : U 0 = g.initial) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓx : ℓ dx = 1) (hℓy : ℓ dy = 0) + (hX : ∀ p ∈ O, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (hY : ∀ p ∈ O, fderiv ℝ F p dy = g.Y p) + (n : ℕ) (z : ℝ) (hz : z ≠ 0) {p : A} (hpO : p ∈ O) : + let f := finiteAnsatz F U ℓ (n + 1) z + let t : Period := ((ℓ p / z : ℝ) : Period) + let L := n + 1 + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx) = + (∑ r ∈ Finset.range L, (g.xxRemainder dx U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.xxRemainder dx U L r).val p t * z ^ r ∧ + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy) = + (∑ r ∈ Finset.range L, (g.xyRemainder dx U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.xyRemainder dx U L r).val p t * z ^ r ∧ + inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy) = + (∑ r ∈ Finset.range L, (g.yyRemainder U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.yyRemainder U L r).val p t * z ^ r := by + dsimp only + rw [g.finiteAnsatz_x hF U hinit ℓ dx hℓx hX n z hz hpO, + g.finiteAnsatz_y hF U ℓ hℓy hY (n + 1) z hpO] + simp only [xxRemainder, xyRemainder, yyRemainder, metricCoefficientFamily_apply] + exact ⟨metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z, + metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z, + metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicGlobalization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicGlobalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..40b0e90320338a87fe29f9c242066c1422234729 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicGlobalization.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFamilies +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFamilies +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicTriangularRecursion +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFiniteAnsatz + +namespace OAI + +/-! Compactly supported local periodic coefficients extend smoothly by zero. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Closed support lying inside the admissible domain suffices for smooth +extension; there is no regularity requirement on the domain boundary. -/ +lemma contDiff_of_zero_off_closed {F : A × ℝ → E} {O K : Set A} + (hO : IsOpen O) (hF : ContDiffOn ℝ ∞ F (O ×ˢ Set.univ)) + (hK : IsClosed K) (hKO : K ⊆ O) (hz : ∀ p ∉ K, ∀ t, F (p, t) = 0) : + ContDiff ℝ ∞ F := by + rw [contDiff_iff_contDiffAt] + intro z + by_cases hp : z.1 ∈ O + · exact hF.contDiffAt ((hO.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ z.2⟩) + · have hpK : z.1 ∉ K := fun hk => hp (hKO hk) + apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [(continuous_fst.continuousAt : + Filter.Tendsto Prod.fst (𝓝 z) (𝓝 z.1)).eventually (hK.isOpen_compl.mem_nhds hpK)] with w hw + exact hz w.1 hw w.2 + +namespace Family +variable {O : TopologicalSpace.Opens A} + +lemma smooth_global (F : Family O E) {K : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hz : ∀ p ∈ O, p ∉ K → F.val p = 0) : + ContDiff ℝ ∞ (fun z : A × ℝ => F.val z.1 (z.2 : Period)) := by + apply contDiff_of_zero_off_closed O.isOpen F.smooth hK hKO + intro p hp t + by_cases hpO : p ∈ O + · rw [hz p hpO hp] + rfl + · rw [F.outside hpO] + rfl + +def global (F : Family O E) {K : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hz : ∀ p ∈ O, p ∉ K → F.val p = 0) : PeriodicExpansion.Family A E := + ⟨F.val, F.smooth_global hK hKO hz⟩ + +@[simp] lemma global_apply (F : Family O E) {K : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hz : ∀ p ∈ O, p ∉ K → F.val p = 0) (p : A) (t : Period) : + (F.global hK hKO hz).val p t = F.val p t := rfl + +end Family + +variable [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +/-- The local recursion gives globally smooth coefficients when its initial +input is supported in a closed subset of the admissible domain. -/ +theorem Geometry.exists_supported_coefficients {v : A} (g : Geometry (E := E) O v) + (dx : A) (n : ℕ) {K : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hz : ∀ p ∈ O, p ∉ K → g.initial.val p = 0) : + ∃ U : ℕ → Family O E, + U 0 = g.initial ∧ (∀ i p, p ∈ O → average ((U i).val p) = 0) ∧ + (∀ i, ContDiff ℝ ∞ (fun z : A × ℝ => (U i).val z.1 (z.2 : Period))) ∧ + (∀ i p, p ∉ K → (U i).val p = 0) ∧ + (g.yyCoefficient U 1).fluct = 0 ∧ + ∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient dx U r).fluct = 0 ∧ + (g.xyCoefficient dx U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0 := by + obtain ⟨U, hinit, hmean, hy, hs, hc⟩ := g.exists_coefficients dx n + have hzero : ∀ i p, p ∈ O → p ∉ K → (U i).val p = 0 := by + intro i p hp hk + exact hs ((O : Set A) ∩ Kᶜ) (O.isOpen.inter hK.isOpen_compl) + Set.inter_subset_left (fun q hq => hz q hq.1 hq.2) i p ⟨hp, hk⟩ + refine ⟨U, hinit, hmean, ?_, ?_, hy, hc⟩ + · intro i + exact (U i).smooth_global hK hKO (hzero i) + · intro i p hp + by_cases hpO : p ∈ O + · exact hzero i p hpO hp + · exact (U i).outside hpO + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma finiteAnsatz_smooth_global {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family O E) {K : Set A} (hK : IsClosed K) (hKO : K ⊆ O) + (hz : ∀ i p, p ∈ O → p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + ContDiff ℝ ∞ (finiteAnsatz F U ℓ L z) := by + apply hF.add + apply ContDiff.sum + intro i _ + exact contDiff_const.smul (((U i).smooth_global hK hKO (hz i)).comp + (contDiff_id.prodMk (ℓ.contDiff.div_const z))) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma finiteAnsatz_eq_off_support (F : A → E) (U : ℕ → Family O E) + {K : Set A} (hz : ∀ i p, p ∉ K → (U i).val p = 0) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {p : A} (hp : p ∉ K) : + finiteAnsatz F U ℓ L z p = F p := by + simp only [finiteAnsatz, Family.fastValue, hz _ p hp, ContinuousMap.zero_apply, + smul_zero, Finset.sum_const_zero, add_zero] + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..73ae851ce558d9b0a1b0d730ced660c67548cc81 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricCoefficients.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionStep + +namespace OAI + +/-! Coefficients of the pullback metric of the finite periodic ansatz. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + + + +/-- The coefficient A_i=U_{i,x}+U_{i+1,theta}; index zero stores U_1. -/ +def xCoefficient (dx : A) (U : ℕ → Family O E) (i : ℕ) : Family O E := + (U (i - 1)).slow dx + (U i).angle + +/-- The coefficient B_i=U_{i,y}; index zero stores U_1. -/ +def yCoefficient (dy : A) (U : ℕ → Family O E) (i : ℕ) : Family O E := + (U (i - 1)).slow dy + +def xxQuadratic (dx : A) (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + ∑ i ∈ Finset.Ico 1 r, (xCoefficient dx U i).inner (xCoefficient dx U (r - i)) + +def xyQuadratic (dx dy : A) (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + ∑ i ∈ Finset.Ico 1 r, (xCoefficient dx U i).inner (yCoefficient dy U (r - i)) + +def yyQuadratic (dy : A) (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + ∑ i ∈ Finset.Ico 1 r, (yCoefficient dy U i).inner (yCoefficient dy U (r - i)) + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +def xxCoefficient (dx : A) (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + (2 : ℝ) • g.longitudinal.inner (xCoefficient dx U r) + xxQuadratic dx U r + +def xyCoefficient (dx : A) (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + g.longitudinal.inner (yCoefficient dy U r) + + g.transverse.inner (xCoefficient dx U r) + xyQuadratic dx dy U r + +def yyCoefficient (U : ℕ → Family O E) (r : ℕ) : Family O ℝ := + (2 : ℝ) • g.transverse.inner (yCoefficient dy U r) + yyQuadratic dy U r + +end Geometry + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xCoefficient_congr {dx : A} {U W : ℕ → Family O E} {i : ℕ} + (h₁ : U (i - 1) = W (i - 1)) (h₂ : U i = W i) : + xCoefficient dx U i = xCoefficient dx W i := by + simp only [xCoefficient, h₁, h₂] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yCoefficient_congr {dy : A} {U W : ℕ → Family O E} {i : ℕ} + (h : U (i - 1) = W (i - 1)) : yCoefficient dy U i = yCoefficient dy W i := by + simp only [yCoefficient, h] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxQuadratic_congr {dx : A} {U W : ℕ → Family O E} {r : ℕ} + (h : ∀ i < r, U i = W i) : xxQuadratic dx U r = xxQuadratic dx W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [xCoefficient_congr (h _ (by omega)) (h _ hir), + xCoefficient_congr (h _ (by omega)) (h _ (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyQuadratic_congr {dx dy : A} {U W : ℕ → Family O E} {r : ℕ} + (h : ∀ i < r, U i = W i) : xyQuadratic dx dy U r = xyQuadratic dx dy W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [xCoefficient_congr (h _ (by omega)) (h _ hir), + yCoefficient_congr (h _ (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyQuadratic_congr {dy : A} {U W : ℕ → Family O E} {r : ℕ} + (h : ∀ i < r - 1, U i = W i) : yyQuadratic dy U r = yyQuadratic dy W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [yCoefficient_congr (h _ (by omega)), yCoefficient_congr (h _ (by omega))] + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8f8451a7a944ddf5f715087254094ac62732c10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicMetricRemainder.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalPeriodicPolynomialExpansion + +namespace OAI + +/-! Smooth coefficient families and exact remainder of the finite metric expansion. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector +open ClosedSurfaceR4.PeriodicExpansion (metricPolynomial metricPolynomial_coeff_pos + metricPolynomial_coeff metricPolynomial_expansion vectorPolynomialValue + weighted_sum_split_endpoints weighted_sum_split_zero shifted_derivative_sum) + + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +def metricCoefficientFamily (n r : ℕ) (a b : ℕ → Family O E) : Family O ℝ := + ∑ i ∈ Finset.range (n + 1), ∑ j ∈ Finset.range (n + 1), + if i + j = r then (a i).inner (b j) else 0 + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma metricCoefficientFamily_apply (n r : ℕ) (a b : ℕ → Family O E) (p : A) (t : Period) : + (metricCoefficientFamily n r a b).val p t = + (metricPolynomial n (fun i => (a i).val p t) (fun i => (b i).val p t)).coeff r := by + simp only [metricCoefficientFamily, Family.sum_apply, metricPolynomial, Polynomial.finsetSum_coeff] + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + split_ifs with h + · simp only [h, Family.inner_apply, Polynomial.coeff_monomial_same] + · simp only [Polynomial.coeff_monomial, h, ite_false, Family.zero_apply] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +def xxRemainder (dx : A) (U : ℕ → Family O E) (L r : ℕ) : Family O ℝ := + metricCoefficientFamily L r (g.xTangent dx U L) (g.xTangent dx U L) + +def xyRemainder (dx : A) (U : ℕ → Family O E) (L r : ℕ) : Family O ℝ := + metricCoefficientFamily L r (g.xTangent dx U L) (g.yTangent U) + +def yyRemainder (U : ℕ → Family O E) (L r : ℕ) : Family O ℝ := + metricCoefficientFamily L r (g.yTangent U) (g.yTangent U) + +/-- Every finite construction has jointly smooth remainder coefficients. +The prescribed lower coefficients are independent of the fast angle. -/ +theorem exists_angle_independent_coefficients (dx : A) (L : ℕ) : + ∃ U : ℕ → Family O E, + U 0 = g.initial ∧ (∀ i p, p ∈ O → average ((U i).val p) = 0) ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, g.initial.val p = 0) → + ∀ i p, p ∈ Z → (U i).val p = 0) ∧ + ∀ r, 0 < r → r < L → ∀ p t, + (g.xxRemainder dx U L r).val p t = average ((g.xxCoefficient dx U r).val p) ∧ + (g.xyRemainder dx U L r).val p t = average ((g.xyCoefficient dx U r).val p) ∧ + (g.yyRemainder U L r).val p t = average ((g.yyCoefficient U r).val p) := by + obtain ⟨U, hinit, hU, hy₁, hsupport, hcoeff⟩ := g.exists_coefficients dx L + refine ⟨U, hinit, hU, hsupport, ?_⟩ + intro r hr hL p t + obtain ⟨hx, hxy, _⟩ := hcoeff r hr (by omega) + have hy : (g.yyCoefficient U r).fluct = 0 := by + by_cases he : r = 1 + · simpa only [he] using hy₁ + · have hprev := (hcoeff (r - 1) (by omega) (by omega)).2.2 + simpa only [Nat.sub_add_cancel (by omega : 1 ≤ r)] using hprev + have mean_eq (f : Family O ℝ) (hf : f.fluct = 0) : f.val p t = average (f.val p) := by + have ht := congrArg (fun w : Family O ℝ => w.val p t) hf + simp only [Family.fluct_apply, fluctuation, Family.zero_apply] at ht + exact sub_eq_zero.mp ht + change (metricCoefficientFamily L r _ _).val p t = _ ∧ + (metricCoefficientFamily L r _ _).val p t = _ ∧ + (metricCoefficientFamily L r _ _).val p t = _ + simp only [metricCoefficientFamily_apply] + exact ⟨(g.xxPolynomial_coeff dx U hr hL p t).trans (mean_eq _ hx), + (g.xyPolynomial_coeff dx U hr hL p t).trans (mean_eq _ hxy), + (g.yyPolynomial_coeff U hr (by omega) p t).trans (mean_eq _ hy)⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..19c642aa70c58dd8aa7e0d0c61318731ed016606 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicPrimitive.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalParameterIntegral +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicPrimitive + +namespace OAI + +/-! Smooth normalized primitives on the open admissible parameter domain. -/ + +noncomputable section +open MeasureTheory Set Filter +open scoped ContDiff Topology + +universe u + +namespace ClosedSurfaceR4.PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- The primitive is jointly smooth wherever the parameter family is smooth. -/ +theorem contDiffOn_primitive_joint {F : P × ℝ → E} {S : Set P} (hS : IsOpen S) + (hF : ContDiffOn ℝ ∞ F (S ×ˢ univ)) : + ContDiffOn ℝ ∞ (fun z : P × ℝ => primitive (fun t => F (z.1, t)) z.2) (S ×ˢ univ) := by + apply (hS.prod isOpen_univ).contDiffOn_iff.mpr + intro z hz + obtain ⟨G, hG, he⟩ := SmoothParameterIntegral.exists_smooth_extension_near hS hF hz.1 + apply (contDiff_primitive_joint hG).contDiffAt.congr_of_eventuallyEq + have he' := (continuous_fst.continuousAt : + Tendsto Prod.fst (𝓝 z) (𝓝 z.1)).eventually he + filter_upwards [he'] with w hw + have hf : (fun t => F (w.1, t)) = fun t => G (w.1, t) := funext (fun t => (hw t).symm) + rw [hf] + +end ClosedSurfaceR4.PeriodicPrimitive + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicTriangularRecursion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicTriangularRecursion.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4c54225b783410564f064e9f98e90876bd0c9ee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalPeriodicTriangularRecursion.lean @@ -0,0 +1,174 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicCoefficientSupport +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionInit + +namespace OAI + +/-! Finite triangular recursion for the angle-independent metric coefficients. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.LocalPeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + {O : TopologicalSpace.Opens A} + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxCoefficient_congr {dx : A} {U W : ℕ → Family O E} {r : ℕ} + (h : ∀ i ≤ r, U i = W i) : g.xxCoefficient dx U r = g.xxCoefficient dx W r := by + unfold xxCoefficient + rw [xCoefficient_congr (h _ (by omega)) (h _ le_rfl), + xxQuadratic_congr (fun i hi => h i (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyCoefficient_congr {dx : A} {U W : ℕ → Family O E} {r : ℕ} + (h : ∀ i ≤ r, U i = W i) : g.xyCoefficient dx U r = g.xyCoefficient dx W r := by + unfold xyCoefficient + rw [xCoefficient_congr (h _ (by omega)) (h _ le_rfl), + yCoefficient_congr (h _ (by omega)), xyQuadratic_congr (fun i hi => h i (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyCoefficient_congr {U W : ℕ → Family O E} {r : ℕ} + (hr : 0 < r) (h : ∀ i < r, U i = W i) : g.yyCoefficient U r = g.yyCoefficient W r := by + unfold yyCoefficient + rw [yCoefficient_congr (h _ (by omega)), yyQuadratic_congr (fun i hi => h i (by omega))] + +/-- Add the next corrector while retaining every earlier coefficient. -/ +theorem advance (dx : A) (U : ℕ → Family O E) (r : ℕ) (hr : 0 < r) + (hU : ∀ i p, p ∈ O → average ((U i).val p) = 0) : + ∃ W : ℕ → Family O E, + (∀ i < r, W i = U i) ∧ (∀ i p, p ∈ O → average ((W i).val p) = 0) ∧ + (g.xxCoefficient dx W r).fluct = 0 ∧ + (g.xyCoefficient dx W r).fluct = 0 ∧ + (g.yyCoefficient W (r + 1)).fluct = 0 ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ i p, p ∈ Z → (U i).val p = 0) → + ∀ i p, p ∈ Z → (W i).val p = 0) := by + let b := g.longitudinal.inner (yCoefficient dy U r) + + g.transverse.inner ((U (r - 1)).slow dx) + xyQuadratic dx dy U r + let c := g.longitudinal.inner ((U (r - 1)).slow dx) + + (1 / 2 : ℝ) • xxQuadratic dx U r + let d := yyQuadratic dy U (r + 1) + obtain ⟨u, hu0, hb, hc, hd, hzero⟩ := g.exists_cancellation b c d + let W := Function.update U r u + have hlow (i : ℕ) (hi : i < r) : W i = U i := by + exact Function.update_of_ne (a := i) (a' := r) (by omega) u U + have hprev : W (r - 1) = U (r - 1) := hlow _ (by omega) + have hcur : W r = u := Function.update_self r u U + have hA : xCoefficient dx W r = (U (r - 1)).slow dx + u.angle := by + simp only [xCoefficient, hprev, hcur] + have hB : yCoefficient dy W r = yCoefficient dy U r := yCoefficient_congr hprev + have hB' : yCoefficient dy W (r + 1) = u.slow dy := by + simp only [yCoefficient, Nat.add_sub_cancel, hcur] + have hxx := xxQuadratic_congr (dx := dx) hlow + have hxy := xyQuadratic_congr (dx := dx) (dy := dy) hlow + have hyy : yyQuadratic dy W (r + 1) = d := + yyQuadratic_congr (fun i hi => hlow i (by omega)) + refine ⟨W, hlow, ?_, ?_, ?_, ?_, ?_⟩ + · intro i p hp + by_cases hi : i = r + · subst i + rw [hcur] + exact hu0 p hp + · rw [show W i = U i from Function.update_of_ne hi u U] + exact hU i p hp + · have he : g.xxCoefficient dx W r = + (2 : ℝ) • (g.longitudinal.inner u.angle + c) := by + unfold xxCoefficient c + rw [hA, hxx, Family.inner_add_right] + module + rw [he, Family.fluct_smul, hc, smul_zero] + · have he : g.xyCoefficient dx W r = g.transverse.inner u.angle + b := by + unfold xyCoefficient b + rw [hA, hB, hxy, Family.inner_add_right] + abel + rw [he, hb] + · change ((2 : ℝ) • g.transverse.inner (yCoefficient dy W (r + 1)) + + yyQuadratic dy W (r + 1)).fluct = 0 + rw [hB', hyy] + exact hd + · intro Z hO hZO hUO i p hp + have huO : ∀ q ∈ Z, u.val q = 0 := by + apply hzero Z hO hZO + · intro q hq + ext t + have hs := (U (r - 1)).slow_zero_on hO (hUO (r - 1)) dx (hZO hq) hq + simp only [b, Family.add_apply, Family.inner_apply, + yCoefficient_zero_on hO hZO U hUO dy r hq, hs, + xyQuadratic_zero_on hO hZO U hUO dx dy r hq, + ContinuousMap.zero_apply, inner_zero_right, add_zero] + · intro q hq + ext t + have hs := (U (r - 1)).slow_zero_on hO (hUO (r - 1)) dx (hZO hq) hq + simp only [c, Family.add_apply, Family.smul_apply, Family.inner_apply, + hs, xxQuadratic_zero_on hO hZO U hUO dx r hq, + ContinuousMap.zero_apply, inner_zero_right, smul_zero, add_zero] + · intro q hq + exact yyQuadratic_zero_on hO hZO U hUO dy (r + 1) hq + by_cases hi : i = r + · subst i + rw [hcur] + exact huO p hp + · rw [show W i = U i from Function.update_of_ne hi u U] + exact hUO i p hp + +/-- The finite recursion produces mean-zero smooth coefficients with no +angle dependence in all prescribed lower metric coefficients. -/ +theorem exists_coefficients (dx : A) (n : ℕ) : + ∃ U : ℕ → Family O E, + U 0 = g.initial ∧ (∀ i p, p ∈ O → average ((U i).val p) = 0) ∧ + (g.yyCoefficient U 1).fluct = 0 ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, g.initial.val p = 0) → + ∀ i p, p ∈ Z → (U i).val p = 0) ∧ + ∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient dx U r).fluct = 0 ∧ + (g.xyCoefficient dx U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0 := by + induction n with + | zero => + refine ⟨fun _ => g.initial, rfl, fun _ _ hp => g.initial_mean_zero hp, ?_, ?_, ?_⟩ + · have hz : g.yyCoefficient (fun _ => g.initial) 1 = 0 := by + simp only [yyCoefficient, yCoefficient, yyQuadratic, + Finset.Ico_self, Finset.sum_empty, g.initial_transverse_derivative, smul_zero, add_zero] + rw [hz] + ext p hp t + simp only [Family.fluct_apply, CovarianceCorrector.fluctuation, Family.zero_apply] + change (0 : ℝ) - average (fun _ => (0 : ℝ)) = 0 + rw [average_const, sub_self] + · intro Z hO hZO hz i p hp + exact hz p hp + · intro r hr hn + omega + | succ n ih => + obtain ⟨U, hinit, hU, hy₁, hsupport, hcoeff⟩ := ih + obtain ⟨W, hlow, hW, hxx, hxy, hyy, hzero⟩ := g.advance dx U (n + 1) (by omega) hU + refine ⟨W, (hlow 0 (by omega)).trans hinit, hW, ?_, ?_, ?_⟩ + · rw [g.yyCoefficient_congr (U := W) (W := U) (by omega : 0 < 1) + (fun i hi => hlow i (by omega))] + exact hy₁ + · intro Z hO hZO hz + exact hzero Z hO hZO (hsupport Z hO hZO hz) + · intro r hr hn + by_cases he : r = n + 1 + · subst r + exact ⟨hxx, hxy, hyy⟩ + · have hrn : r ≤ n := by omega + obtain ⟨hx, hxy', hy⟩ := hcoeff r hr hrn + rw [g.xxCoefficient_congr (fun i hi => hlow i (by omega)), + g.xyCoefficient_congr (fun i hi => hlow i (by omega)), + g.yyCoefficient_congr (by omega) (fun i hi => hlow i (by omega))] + exact ⟨hx, hxy', hy⟩ + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalizedTwistAngle.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalizedTwistAngle.lean new file mode 100644 index 0000000000000000000000000000000000000000..8592fd6a8964dde040dd554ba2f6c3b91b60206a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LocalizedTwistAngle.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSupport + +namespace OAI + +/-! An arbitrary compact longitudinal angle is extended to a compact + surface angle without changing any of its germs on the central axis. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def localizedTwistAngle (r : ℝ) (α : ℝ → ℝ) (x : Base) : ℝ := + transverseCutoff r x * α (x 1) + +lemma localizedTwistAngle_smooth (r : ℝ) {α : ℝ → ℝ} (hα : ContDiff ℝ ∞ α) : + ContDiff ℝ ∞ (localizedTwistAngle r α) := + (transverseCutoff_smooth r).mul (hα.comp (contDiff_apply ℝ ℝ 1)) + +lemma localizedTwistAngle_germ (r t : ℝ) (α : ℝ → ℝ) : + localizedTwistAngle r α =ᶠ[𝓝 (crosscapAxis t)] fun x => α (x 1) := by + filter_upwards [transverseCutoff_axis_germ r t] with x hx + change transverseCutoff r x * α (x 1) = _ + simp only [Pi.one_apply] at hx + rw [hx,one_mul] + +lemma localizedTwistAngle_support {r : ℝ} (hr : 0 < r) (α : ℝ → ℝ) : + tsupport (localizedTwistAngle r α) ⊆ {x | |x 0| ≤ r ∧ x 1 ∈ tsupport α} := by + intro x hx + have h0 := transverseCutoff_tsupport hr (tsupport_mul_subset_left (f := transverseCutoff r) (g := fun y : Base => α (y 1)) hx) + have h1 : x 1 ∈ tsupport α := by + have hc : IsClosed {x : Base | x 1 ∈ tsupport α} := + (isClosed_tsupport α).preimage (continuous_apply 1) + have hs : tsupport (localizedTwistAngle r α) ⊆ {x : Base | x 1 ∈ tsupport α} := by + apply closure_minimal _ hc + intro y hy + apply subset_tsupport + intro hz + exact hy (by simp [localizedTwistAngle,hz]) + exact hs hx + exact ⟨h0,h1⟩ + +lemma localizedTwistAngle_compact {r : ℝ} (hr : 0 < r) {α : ℝ → ℝ} + (hc : HasCompactSupport α) : HasCompactSupport (localizedTwistAngle r α) := by + let T : ℝ × ℝ → Base := fun z => ![z.1,z.2] + have hT : Continuous T := by + apply continuous_pi + intro i + fin_cases i + · exact continuous_fst + · exact continuous_snd + apply (((isCompact_Icc : IsCompact (Icc (-r) r)).prod hc).image hT).of_isClosed_subset + (isClosed_tsupport (localizedTwistAngle r α)) + intro x hx + obtain ⟨h0,h1⟩ := localizedTwistAngle_support hr α hx + refine ⟨(x 0,x 1),⟨abs_le.mp h0,h1⟩,?_⟩ + ext i; fin_cases i <;> rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCoefficientProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCoefficientProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..03460c0de7928372b7d48495cd37b6e3e2205ec3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCoefficientProfile.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCoefficientProfiles + +namespace OAI + +/-! The longitudinal first derivative has a uniformly bounded oscillating +leading term and a remainder controlled by the actual coefficients. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PeriodicExpansion +open CovarianceCorrector +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem longitudinal_profile_of_coefficients {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (n : ℕ) {dx : A} (hx : ℓ dx = 1) + {z C : ℝ} {p : A} (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hU : ∀ i < n+1, ‖((U i).slow dx).fastValue ℓ z p‖ ≤ C) + (hA : ∀ i < n+1, ‖(U i).angle.fastValue ℓ z p‖ ≤ C) : + ‖directionalMap (finiteAnsatz F U ℓ (n+1) z) dx p- + (directionalMap F dx p+(U 0).angle.fastValue ℓ z p)‖ ≤ (2*(n+1)*C)*z := by + have he : directionalMap (finiteAnsatz F U ℓ (n+1) z) dx p- + (directionalMap F dx p+(U 0).angle.fastValue ℓ z p) = + z • phaseSum (fun i => (U i).slow dx) ℓ (n+1) z p+ + (phaseSum (fun i => (U i).angle) ℓ (n+1) z p-(U 0).angle.fastValue ℓ z p) := by + rw [finiteAnsatz_directional hF U ℓ (n+1) hz.ne' dx] + simp only [hx,one_smul] + abel + rw [he] + have hs := phaseSum_bound_of_coefficients (fun i => (U i).slow dx) ℓ (n+1) hz.le hz1 hC hU + have ha := phaseSum_tail_bound_of_coefficients (fun i => (U i).angle) ℓ n hz.le hz1 hC hA + calc + _ ≤ ‖z • phaseSum (fun i => (U i).slow dx) ℓ (n+1) z p‖+ + ‖phaseSum (fun i => (U i).angle) ℓ (n+1) z p-(U 0).angle.fastValue ℓ z p‖ := norm_add_le _ _ + _ ≤ z*((n+1 : ℕ)*C)+(n*C)*z := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact add_le_add (mul_le_mul_of_nonneg_left hs hz.le) ha + _ ≤ (2*(n+1)*C)*z := by + push_cast + nlinarith [mul_nonneg hC hz.le] + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a80582a8c925c0133f9ffc13ef9efdf86e63959 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LongitudinalCrossing.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingInvariantThreshold + +namespace OAI + +/-! Away from angular turns, the large longitudinal component alone gives +both ordered crossing inequalities. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma frameVector_inner_second {n m : E} (hm : ‖m‖ = 1) (hmn : inner ℝ m n = 0) + (v : ℝ × ℝ) : inner ℝ (frameVector n m v) m = v.2 := by + have hnm : inner ℝ n m = 0 := by rw [real_inner_comm]; exact hmn + simp only [frameVector,inner_add_left,real_inner_smul_left,real_inner_self_eq_norm_sq, + hm,one_pow,hnm,mul_one,mul_zero,zero_add] + +lemma crossing_projection_of_nonzero {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) + {S D N L k t u : ℝ} (hS : S ≠ 0) + (hP : frameVector n m (slopePure S D N L k t) ≠ 0) : + ‖frameVector n m (slopePure S D N L k t)‖-|u-t| * (|D+S*t|+|N|) ≤ + inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)) := by + let P := frameVector n m (slopePure S D N L k t) + let Z := frameVector n m (slopeMixed S D N L k t u) + have he : Z-P = (u-t) • frameVector n m (D+S*t,N) := by + change frameVector n m (slopeMixed S D N L k t u)- + frameVector n m (slopePure S D N L k t) = _ + rw [← frameVector_sub,mixed_sub_left hS,frameVector_smul] + have hdiff : ‖Z-P‖ ≤ |u-t| * (|D+S*t|+|N|) := by + rw [he,norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (frameVector_norm_le hn hm _) (abs_nonneg _) + exact (sub_le_sub_left hdiff ‖P‖).trans (mixed_projection_lower hP) + +lemma longitudinal_norm_lower {n m : E} (hm : ‖m‖ = 1) (hmn : inner ℝ m n = 0) + {S D N L k t B T : ℝ} (hB : 0 ≤ B) (hN : |N| ≤ B) (ht : |t| ≤ T) : + |L|-2*B*T ≤ ‖frameVector n m (slopePure S D N L k t)‖ := by + let P := frameVector n m (slopePure S D N L k t) + have hi : inner ℝ P m = L+2*N*t := frameVector_inner_second hm hmn _ + have hnorm : |L+2*N*t| ≤ ‖P‖ := by + rw [← hi] + simpa only [hm,mul_one] using abs_real_inner_le_norm P m + have hadd := abs_sub (L+2*N*t) (2*N*t) + have hNt : |2*N*t| ≤ 2*B*T := by + simp only [abs_mul, show |(2 : ℝ)| = 2 by norm_num] + exact mul_le_mul (mul_le_mul_of_nonneg_left hN (by norm_num)) ht (abs_nonneg _) (by positivity) + simp only [add_sub_cancel_right] at hadd + linarith + +theorem longitudinal_projection_threshold (sHi d B T R : ℝ) + (hsHi : 0 ≤ sHi) (hd : 0 ≤ d) (hB : 0 ≤ B) (hT : 0 ≤ T) (hR : 0 ≤ R) : + ∃ H : ℝ, 0 < H ∧ ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, 0 < S → S ≤ sHi → |D| ≤ d → |N| ≤ B → + |t| ≤ T → |u| ≤ T → H < |L| → + R < inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)) := by + let H := R+2*T*(d+sHi*T+2*B)+1 + have hH : 0 < H := by dsimp [H]; positivity + refine ⟨H,hH,?_⟩ + intro n m hn hm hmn S D N L k t u hS hSmax hDb hNb htb hub hL + have hp := longitudinal_norm_lower (S := S) (D := D) (L := L) (k := k) hm hmn hB hNb htb + have hP : frameVector n m (slopePure S D N L k t) ≠ 0 := by + intro hz + rw [hz,norm_zero] at hp + have hrest : 0 ≤ 2*T*(d+sHi*T) := by positivity + dsimp [H] at hL + nlinarith + have hdiff := crossing_slope_bound hS.le hSmax hDb htb hub (N := N) + have hbd : |u-t| * (|D+S*t|+|N|) ≤ 2*T*(d+sHi*T+B) := + hdiff.trans (mul_le_mul_of_nonneg_left (add_le_add le_rfl hNb) (by positivity)) + have hproj := crossing_projection_of_nonzero hn hm hS.ne' hP (u := u) + dsimp [H] at hL + nlinarith + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopCompactNormalMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopCompactNormalMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bc1274a8d2965ae42cacd13eb9c87d178cce900 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopCompactNormalMargin.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicNormalStability + +namespace OAI + +/-! A single positive normal margin for the whole compact set of admissible +low jets, before choosing a slow map or a fast scale. -/ +noncomputable section +open Set +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates CovarianceCorrector NormalFrame +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem compact_normal_margin {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ J ∈ Q, ∀ t : ℝ, ∀ H : VelocityFrame.NormalTriple, + ‖H-![VelocityFrame.leadingTangent (slot 1 J) (slot 2 J) (slot 6 J) + (l.velocity (J,t)),slot 2 J,slot 6 J]‖ < ε → + gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖realNormalPart (H 0) (H 1) (H 2)‖ := by + let : CompactSpace Q := isCompact_iff_compactSpace.mp hQ + let X : Q → NormalFrame.Vec := fun J => slot 1 J + let Y : Q → NormalFrame.Vec := fun J => slot 2 J + let C : Q → NormalFrame.Vec := fun J => slot 6 J + let V : Q → C(Period,NormalFrame.Vec) := fun J => + ⟨fun t => spaceCoordinates (l.euclideanVelocity J t), + spaceCoordinates.continuous.comp (l.euclideanVelocity J).continuous⟩ + have hX : Continuous X := (slot_smooth 1).continuous.comp continuous_subtype_val + have hY : Continuous Y := (slot_smooth 2).continuous.comp continuous_subtype_val + have hC : Continuous C := (slot_smooth 6).continuous.comp continuous_subtype_val + have hV : Continuous (fun p : Q × ℝ => V p.1 (p.2 : Period)) := by + have hi : Continuous (fun p : Q × ℝ => ((p.1 : LowJet),p.2)) := + (continuous_subtype_val.comp continuous_fst).prodMk continuous_snd + exact spaceCoordinates.continuous.comp + (l.euclideanVelocity_smooth.continuousOn.comp_continuous hi + (fun p => ⟨hQO p.1.property,mem_univ _⟩)) + have hVeq (J : Q) (t : ℝ) : V J (t : Period) = l.velocity (J,t) := by + change spaceCoordinates (l.euclideanVelocity J (t : Period)) = _ + rw [l.euclideanVelocity_apply (hQO J.property)] + exact spaceCoordinates.apply_symm_apply _ + have hYV : ∀ J ∈ (univ : Set Q), ∀ t : Period, Y J ⬝ᵥ V J t = 0 := by + intro J _ t + refine Quotient.inductionOn' t ?_ + intro t + rw [hVeq] + exact l.perpY J (hQO J.property) t + have hCV : ∀ J ∈ (univ : Set Q), ∀ t : Period, C J ⬝ᵥ V J t = 0 := by + intro J _ t + refine Quotient.inductionOn' t ?_ + intro t + rw [hVeq] + exact l.perpC J (hQO J.property) t + have hV0 : ∀ J ∈ (univ : Set Q), ∀ t : Period, V J t ≠ 0 := by + intro J _ t ht + change spaceCoordinates (l.euclideanVelocity J t) = 0 at ht + have he : l.euclideanVelocity J t = 0 := spaceCoordinates.injective + (by simpa only [map_zero] using ht) + have hh := l.euclideanVelocity_length (hQO J.property) t + rw [he,inner_zero_left] at hh + exact (ne_of_gt (l.q_pos (hQO J.property))) hh.symm + obtain ⟨ε,c,hε,hc,hh⟩ := VelocityFrame.periodic_leading_normal_stability + (isCompact_univ : IsCompact (univ : Set Q)) hX hY hC V hV + (fun J _ => l.gram_ne J (hQO J.property)) hYV hCV hV0 + refine ⟨ε,c,hε,hc,?_⟩ + intro J hJ t H hH + apply hh ⟨J,hJ⟩ (mem_univ _) t H + simpa only [X,Y,C,hVeq] using hH + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityBumpSelection.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityBumpSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..62fa035b4c176c16c8a1189fb6da0f3a2b0e8794 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityBumpSelection.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityParameter +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicBumpAverage + +namespace OAI + +/-! Replace three nondegenerate point masses by smooth positive-density data. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +abbrev Columns := Fin 3 → Moments + +def columnOperator (C : Columns) : Moments →L[ℝ] Moments := + ∑ i : Fin 3, (ContinuousLinearMap.proj i).smulRight (C i) + +lemma columnOperator_smooth : ContDiff ℝ ∞ columnOperator := by + apply ContDiff.sum + intro i _ + exact contDiff_const.smulRight (contDiff_apply ℝ Moments i) + +lemma momentMap_eq_columnOperator (p : ℝ → Plane) (ψ : Fin 3 → ℝ → ℝ) : + momentMap p ψ = columnOperator (fun i => column p (ψ i)) := rfl + +/-- A strictly positive, nondegenerate three-point barycenter can be replaced +by smooth nonnegative periodic bumps and a strictly positive constant density. -/ +theorem select_positive_moment_bumps {p : ℝ → Plane} (hp : Continuous p) + {t : Fin 3 → ℝ} (ht : ∀ i, t i ∈ Ioo (0 : ℝ) 1) + {c : Plane} {w : Moments} + (hM : (columnOperator (fun i => augment (p (t i)))).IsInvertible) + (hw : ∀ i, 0 < w i) + (hbary : columnOperator (fun i => augment (p (t i))) w = augment c) : + ∃ ψ : Fin 3 → ℝ → ℝ, (∀ i, ContDiff ℝ ∞ (ψ i)) ∧ + (∀ i, Function.Periodic (ψ i) 1) ∧ (∀ i x, 0 ≤ ψ i x) ∧ + (∀ i, (∫ x in 0..1, ψ i x) = 1) ∧ + ∃ ε : ℝ, 0 < ε ∧ (momentMap p ψ).IsInvertible ∧ + ∀ i, 0 < weights p ψ ε c i := by + let C₀ : Columns := fun i => augment (p (t i)) + let W : Columns × ℝ → Moments := fun z => + (columnOperator z.1).inverse (augment c - z.2 • background p) + have hsource : ContDiff ℝ ∞ (fun z : Columns × ℝ => augment c - z.2 • background p) := + contDiff_const.sub (contDiff_snd.smul contDiff_const) + have hi : ContDiffAt ℝ ∞ (fun z : Columns × ℝ => (columnOperator z.1).inverse) (C₀, 0) := + hM.contDiffAt_map_inverse.comp (C₀, 0) + (columnOperator_smooth.comp contDiff_fst).contDiffAt + have hW : ContDiffAt ℝ ∞ W (C₀, 0) := hi.clm_apply hsource.contDiffAt + have hW₀ : W (C₀, 0) = w := by + change (columnOperator C₀).inverse (augment c - (0 : ℝ) • background p) = w + rw [zero_smul, sub_zero, ← hbary, hM.inverse_apply_self] + have hnearM : ∀ᶠ z : Columns × ℝ in 𝓝 (C₀, 0), (columnOperator z.1).IsInvertible := + (columnOperator_smooth.comp contDiff_fst).continuous.continuousAt.eventually hM.eventually_nhds + have hnearW : ∀ᶠ z : Columns × ℝ in 𝓝 (C₀, 0), ∀ i, 0 < W z i := by + rw [Filter.eventually_all] + intro i + exact ((continuous_apply i).continuousAt.comp hW.continuousAt).eventually_const_lt + (by change 0 < W (C₀, 0) i; rw [hW₀]; exact hw i) + obtain ⟨δ, hδ, hball⟩ := Metric.mem_nhds_iff.mp (hnearM.and hnearW) + have hchoose (i : Fin 3) := exists_bump_average_near (augment_continuous.comp hp) (ht i) hδ + choose ψ hψ hper hn hm hclose using hchoose + let C : Columns := fun i => column p (ψ i) + have hC : ‖C - C₀‖ < δ := by + apply (pi_norm_lt_iff hδ).mpr + intro i + exact hclose i + have hz : (C, δ / 2) ∈ ball (C₀, 0) δ := by + rw [mem_ball, Prod.dist_eq] + apply max_lt + · simpa only [dist_eq_norm] using hC + · rw [Real.dist_eq, sub_zero, abs_of_pos (by positivity : 0 < δ / 2)] + linarith + have hgood := hball hz + exact ⟨ψ, hψ, hper, hn, hm, δ / 2, by positivity, hgood.1, hgood.2⟩ + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..9188d595f415fd120397bdbbdf959516f8cd8a4f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityCompact.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityPatching +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! Compact patching, retaining every value on which the local densities agree. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem compact_patch_densities {ι : Type*} {p : B → ℝ → Plane} {c : B → Plane} + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (U : ι → Set B) (hU : ∀ i, IsOpen (U i)) + (ρ : ι → B × ℝ → ℝ) + (hρ : ∀ i, ContDiffOn ℝ ∞ (ρ i) (U i ×ˢ univ)) + (hpos : ∀ i b, b ∈ U i → ∀ t, 0 < ρ i (b, t)) + (hper : ∀ i b, Function.Periodic (fun t => ρ i (b, t)) 1) + (hmom : ∀ i b, b ∈ U i → + (∫ t in 0..1, ρ i (b, t) • augment (p b t)) = augment (c b)) + {K : Set B} (hK : IsCompact K) (hcover : K ⊆ ⋃ i, U i) : + ∃ V : Set B, IsOpen V ∧ K ⊆ V ∧ ∃ σ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ σ (V ×ˢ univ) ∧ + (∀ b ∈ V, ∀ t, 0 < σ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => σ (b, t)) 1) ∧ + (∀ b ∈ V, (∫ t in 0..1, σ (b, t) • augment (p b t)) = augment (c b)) ∧ + ∀ b ∈ V, ∀ t r, (∀ i, b ∈ U i → ρ i (b, t) = r) → σ (b, t) = r := by + classical + obtain ⟨J, hJ⟩ := hK.elim_finite_subcover U hU hcover + have hcJ : K ⊆ ⋃ i : J, U i.val := by + intro b hbk + obtain ⟨i, hi, hbi⟩ := mem_iUnion₂.mp (hJ hbk) + exact mem_iUnion.mpr ⟨⟨i, hi⟩, hbi⟩ + obtain ⟨ψ, hψsub⟩ := SmoothPartitionOfUnity.exists_isSubordinate (𝓘(ℝ, B)) + hK.isClosed (fun i : J => U i.val) (fun i => hU i.val) hcJ + have hψ (i : J) : ContDiff ℝ ∞ (ψ i) := (ψ i).contMDiff.contDiff + let S : B → ℝ := fun b => ∑ i : J, ψ i b + have hS : ContDiff ℝ ∞ S := ContDiff.sum (fun i _ => hψ i) + let V : Set B := {b | 0 < S b} + have hV : IsOpen V := isOpen_lt continuous_const hS.continuous + have hKV : K ⊆ V := by + intro b hbk + have hone : S b = 1 := by + simpa only [S, finsum_eq_sum_of_fintype] using ψ.sum_eq_one hbk + change 0 < S b + rw [hone] + exact zero_lt_one + obtain ⟨σ, hσ, hpσ, hperσ, hmσ, hformula⟩ := patch_densities hp + (fun i : J => U i.val) (fun i : J => hU i.val) (fun i : J => ρ i.val) + (fun i : J => hρ i.val) (fun i : J => hpos i.val) (fun i : J => hper i.val) + (fun i : J => hmom i.val) (fun (i : J) b => ψ i b) hψ + (fun (i : J) b => ψ.nonneg i b) hψsub + refine ⟨V, hV, hKV, σ, hσ, hpσ, hperσ, hmσ, ?_⟩ + intro b hb t r hr + rw [hformula] + change (∑ i : J, ψ i b * ρ i.val (b, t)) / S b = r + have hsum : (∑ i : J, ψ i b * ρ i.val (b, t)) = S b * r := by + dsimp only [S] + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro i _ + by_cases hz : ψ i b = 0 + · rw [hz, zero_mul, zero_mul] + · rw [hr i.val (hψsub i (subset_tsupport _ (Function.mem_support.mpr hz)))] + rw [hsum] + exact mul_div_cancel_left₀ r hb.ne' + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityDirections.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c2e3606d542e2b7493ccf2c18cebfbcc94a2051 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityDirections.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityTriangle + +namespace OAI + +/-! Radial coordinates and angular representatives for the interior density construction. -/ +noncomputable section +open Set + +namespace ClosedSurfaceR4.LoopDensity + +lemma radial_representation {c : Plane} (hc : c 0 ^ 2 + c 1 ^ 2 < 1) : + ∃ (r : ℝ) (e : Plane), 0 ≤ r ∧ r < 1 ∧ e 0 ^ 2 + e 1 ^ 2 = 1 ∧ c = r • e := by + let r := Real.sqrt (c 0 ^ 2 + c 1 ^ 2) + have hr : 0 ≤ r := Real.sqrt_nonneg _ + have hr2 : r ^ 2 = c 0 ^ 2 + c 1 ^ 2 := Real.sq_sqrt (by positivity) + have hr1 : r < 1 := by + simpa only [Real.sqrt_one] using Real.sqrt_lt_sqrt (by positivity) hc + by_cases hz : r = 0 + · have hc0 : c 0 = 0 := by nlinarith + have hc1 : c 1 = 0 := by nlinarith + refine ⟨0, ![1, 0], le_rfl, zero_lt_one, by norm_num, ?_⟩ + ext i + fin_cases i <;> simp [hc0, hc1] + · let e : Plane := fun i => c i / r + refine ⟨r, e, hr, hr1, ?_, ?_⟩ + · change (c 0 / r) ^ 2 + (c 1 / r) ^ 2 = 1 + field_simp + nlinarith [hr2] + · ext i + change c i = r * (c i / r) + field_simp + +lemma unit_direction_angle {e : Plane} (he : e 0 ^ 2 + e 1 ^ 2 = 1) : + ∃ β ∈ Icc (-Real.pi) Real.pi, Real.cos β = e 0 ∧ Real.sin β = e 1 := by + let z : ℂ := ⟨e 0, e 1⟩ + have hn : ‖z‖ = 1 := by + rw [Complex.norm_eq_sqrt_sq_add_sq] + change Real.sqrt (e 0 ^ 2 + e 1 ^ 2) = 1 + rw [he, Real.sqrt_one] + have hz : z ≠ 0 := by + intro h + rw [h, norm_zero] at hn + norm_num at hn + refine ⟨Complex.arg z, ⟨(Complex.neg_pi_lt_arg z).le, Complex.arg_le_pi z⟩, ?_, ?_⟩ + · rw [Complex.cos_arg hz, hn, div_one] + · rw [Complex.sin_arg, hn, div_one] + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityLinear.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityLinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b3035f72d106f05da19e16ef07146f79cf4c0f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityLinear.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral + +namespace OAI + +/-! The three linear moment equations for a positive loop density. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +abbrev Plane := Fin 2 → ℝ +abbrev Moments := Fin 3 → ℝ + +def augment (v : Plane) : Moments := ![1, v 0, v 1] + +def background (p : ℝ → Plane) : Moments := ∫ t in 0..1, augment (p t) + +def column (p : ℝ → Plane) (ψ : ℝ → ℝ) : Moments := + ∫ t in 0..1, ψ t • augment (p t) + +def momentMap (p : ℝ → Plane) (ψ : Fin 3 → ℝ → ℝ) : Moments →L[ℝ] Moments := + ∑ i : Fin 3, (ContinuousLinearMap.proj i).smulRight (column p (ψ i)) + +lemma momentMap_apply (p : ℝ → Plane) (ψ : Fin 3 → ℝ → ℝ) (w : Moments) : + momentMap p ψ w = ∑ i, w i • column p (ψ i) := by + simp [momentMap, ContinuousLinearMap.smulRight_apply] + +lemma augment_continuous : Continuous augment := by + apply continuous_pi + intro i + fin_cases i <;> simp [augment] <;> fun_prop + +def density (ε : ℝ) (ψ : Fin 3 → ℝ → ℝ) (w : Moments) (t : ℝ) : ℝ := + ε + ∑ i, w i * ψ i t + +lemma density_pos {ε : ℝ} (hε : 0 < ε) {ψ : Fin 3 → ℝ → ℝ} {w : Moments} + (hψ : ∀ i t, 0 ≤ ψ i t) (hw : ∀ i, 0 ≤ w i) (t : ℝ) : 0 < density ε ψ w t := by + apply add_pos_of_pos_of_nonneg hε + exact Finset.sum_nonneg (fun i _ => mul_nonneg (hw i) (hψ i t)) + +lemma density_periodic (ε : ℝ) (ψ : Fin 3 → ℝ → ℝ) (w : Moments) + (hp : ∀ i, Function.Periodic (ψ i) 1) : Function.Periodic (density ε ψ w) 1 := by + intro t + simp only [density] + congr 1 + apply Finset.sum_congr rfl + intro i _ + rw [hp i t] + +lemma density_moments {p : ℝ → Plane} (hp : Continuous p) + {ψ : Fin 3 → ℝ → ℝ} (hψ : ∀ i, Continuous (ψ i)) (ε : ℝ) (w : Moments) : + (∫ t in 0..1, density ε ψ w t • augment (p t)) = + ε • background p + momentMap p ψ w := by + have hc : Continuous (fun t => augment (p t)) := augment_continuous.comp hp + have he : Continuous (fun t => ε • augment (p t)) := hc.const_smul ε + have hs : Continuous (fun t => (∑ i, w i * ψ i t) • augment (p t)) := + (continuous_finsetSum _ (fun i _ => continuous_const.mul (hψ i))).smul hc + simp_rw [density, add_smul] + rw [intervalIntegral.integral_add + (f := fun t => ε • augment (p t)) + (g := fun t => (∑ i, w i * ψ i t) • augment (p t)) + (he.intervalIntegrable _ _) + (hs.intervalIntegrable _ _), intervalIntegral.integral_smul] + congr 1 + simp_rw [Finset.sum_smul] + rw [intervalIntegral.integral_finsetSum] + · rw [momentMap_apply] + apply Finset.sum_congr rfl + intro i _ + simp only [mul_smul, intervalIntegral.integral_smul, column] + · intro i _ + exact ((continuous_const.mul (hψ i)).smul hc).intervalIntegrable _ _ + +def weights (p : ℝ → Plane) (ψ : Fin 3 → ℝ → ℝ) (ε : ℝ) (c : Plane) : Moments := + (momentMap p ψ).inverse (augment c - ε • background p) + +/-- Once the moment matrix is invertible, all three equations are solved exactly. -/ +theorem solved_moments {p : ℝ → Plane} (hp : Continuous p) + {ψ : Fin 3 → ℝ → ℝ} (hψ : ∀ i, Continuous (ψ i)) + (hM : (momentMap p ψ).IsInvertible) (ε : ℝ) (c : Plane) : + (∫ t in 0..1, density ε ψ (weights p ψ ε c) t • augment (p t)) = augment c := by + rw [density_moments hp hψ] + unfold weights + rw [hM.self_apply_inverse] + abel + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMomentConverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMomentConverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..4344705a46fca0aad8f98b39cfbcb16e9c8e921b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMomentConverse.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityMoments + +namespace OAI + +/-! Recombine mass and vector mean into the augmented linear moment equation. -/ +noncomputable section + +namespace ClosedSurfaceR4.LoopDensity + +lemma augmented_moments {ρ : ℝ → ℝ} {p : ℝ → Plane} {c : Plane} + (hρ : Continuous ρ) (hp : Continuous p) + (hmass : (∫ t in 0..1, ρ t) = 1) + (hmean : (∫ t in 0..1, ρ t • p t) = c) : + (∫ t in 0..1, ρ t • augment (p t)) = augment c := by + have hi : IntervalIntegrable (fun t => ρ t • augment (p t)) MeasureTheory.volume 0 1 := + (hρ.smul (augment_continuous.comp hp)).intervalIntegrable 0 1 + have hpi : IntervalIntegrable (fun t => ρ t • p t) MeasureTheory.volume 0 1 := + (hρ.smul hp).intervalIntegrable 0 1 + have hc (i : Fin 2) : (∫ t in 0..1, (ρ t • p t) i) = c i := by + have he := congrArg (fun x : Plane => x i) hmean + have hev : (∫ t in 0..1, ρ t • p t) i = ∫ t in 0..1, (ρ t • p t) i := + ((ContinuousLinearMap.proj i : Plane →L[ℝ] ℝ).intervalIntegral_comp_comm hpi).symm + rwa [hev] at he + ext i + have hev : (∫ t in 0..1, ρ t • augment (p t)) i = + ∫ t in 0..1, (ρ t • augment (p t)) i := + ((ContinuousLinearMap.proj i : Moments →L[ℝ] ℝ).intervalIntegral_comp_comm hi).symm + rw [hev] + fin_cases i + · simpa [augment] using hmass + · simpa [augment] using hc 0 + · simpa [augment] using hc 1 + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMoments.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ee59536c01708eda0af6a1934efc1b7e703c983 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityMoments.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityLinear + +namespace OAI + +/-! Extract mass one and the vector mean from the three augmented moments. -/ +noncomputable section + +namespace ClosedSurfaceR4.LoopDensity + +theorem mass_and_mean {ρ : ℝ → ℝ} {p : ℝ → Plane} {c : Plane} + (hρ : Continuous ρ) (hp : Continuous p) + (hm : (∫ t in 0..1, ρ t • augment (p t)) = augment c) : + (∫ t in 0..1, ρ t) = 1 ∧ (∫ t in 0..1, ρ t • p t) = c := by + have hi : IntervalIntegrable (fun t => ρ t • augment (p t)) MeasureTheory.volume 0 1 := + (hρ.smul (augment_continuous.comp hp)).intervalIntegrable 0 1 + have hpi : IntervalIntegrable (fun t => ρ t • p t) MeasureTheory.volume 0 1 := + (hρ.smul hp).intervalIntegrable 0 1 + have hcoord (i : Fin 3) : + (∫ t in 0..1, (ρ t • augment (p t)) i) = (augment c) i := by + have he := congrArg (fun x : Moments => x i) hm + have hev : (∫ t in 0..1, ρ t • augment (p t)) i = + ∫ t in 0..1, (ρ t • augment (p t)) i := + ((ContinuousLinearMap.proj i : Moments →L[ℝ] ℝ).intervalIntegral_comp_comm hi).symm + rwa [hev] at he + constructor + · simpa [augment] using hcoord 0 + · ext i + have hev : (∫ t in 0..1, ρ t • p t) i = ∫ t in 0..1, (ρ t • p t) i := + ((ContinuousLinearMap.proj i : Plane →L[ℝ] ℝ).intervalIntegral_comp_comm hpi).symm + rw [hev] + fin_cases i + · simpa [augment] using hcoord 1 + · simpa [augment] using hcoord 2 + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..beae1a8d968eecc8fb121e037145508d64279e1c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityParameter.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityLinear + +namespace OAI + +/-! Smooth local positive solutions of the three density moment equations. -/ +noncomputable section +open Filter Set +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +lemma augment_smooth : ContDiff ℝ ∞ augment := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun _ : Plane => (1 : ℝ)) + exact contDiff_const + · change ContDiff ℝ ∞ (fun x : Plane => x 0) + exact contDiff_apply ℝ ℝ 0 + · change ContDiff ℝ ∞ (fun x : Plane => x 1) + exact contDiff_apply ℝ ℝ 1 + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + {p : B → ℝ → Plane} {c : B → Plane} {ψ : Fin 3 → ℝ → ℝ} + +lemma background_smooth (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) : + ContDiff ℝ ∞ (fun b => background (p b)) := + SmoothParameterIntegral.contDiff_integral (augment_smooth.comp hp) 0 1 + +lemma column_smooth (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) (i : Fin 3) : + ContDiff ℝ ∞ (fun b => column (p b) (ψ i)) := + SmoothParameterIntegral.contDiff_integral + (((hψ i).comp contDiff_snd).smul (augment_smooth.comp hp)) 0 1 + +lemma momentMap_smooth (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) : + ContDiff ℝ ∞ (fun b => momentMap (p b) ψ) := by + apply ContDiff.sum + intro i _ + exact contDiff_const.smulRight (column_smooth hp hψ i) + +lemma weights_smoothAt (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (hc : ContDiff ℝ ∞ c) (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) + {b : B} (hM : (momentMap (p b) ψ).IsInvertible) (ε : ℝ) : + ContDiffAt ℝ ∞ (fun x => weights (p x) ψ ε (c x)) b := by + exact (hM.contDiffAt_map_inverse.comp b (momentMap_smooth hp hψ).contDiffAt).clm_apply + (((augment_smooth.comp hc).sub ((background_smooth hp).const_smul ε)).contDiffAt) + +lemma weights_smoothOn (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (hc : ContDiff ℝ ∞ c) (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) + {U : Set B} (hM : ∀ b ∈ U, (momentMap (p b) ψ).IsInvertible) (ε : ℝ) : + ContDiffOn ℝ ∞ (fun x => weights (p x) ψ ε (c x)) U := + fun b hb => (weights_smoothAt hp hc hψ (hM b hb) ε).contDiffWithinAt + +/-- Positive weights and an invertible three-moment matrix persist locally; +this constructs an actual smooth positive density with the exact required mean. -/ +theorem exists_positive_density_near + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) (hc : ContDiff ℝ ∞ c) + (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) (hψnonneg : ∀ i t, 0 ≤ ψ i t) + (hψper : ∀ i, Function.Periodic (ψ i) 1) + {b₀ : B} {ε : ℝ} (hε : 0 < ε) (hM : (momentMap (p b₀) ψ).IsInvertible) + (hw : ∀ i, 0 < weights (p b₀) ψ ε (c b₀) i) : + ∃ U : Set B, IsOpen U ∧ b₀ ∈ U ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (U ×ˢ Set.univ) ∧ + (∀ b ∈ U, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • augment (p b t)) = augment (c b) := by + have hmNear : ∀ᶠ b in 𝓝 b₀, (momentMap (p b) ψ).IsInvertible := + (momentMap_smooth hp hψ).continuous.continuousAt.eventually hM.eventually_nhds + have hwAt := (weights_smoothAt hp hc hψ hM ε).continuousAt + have hwNear : ∀ᶠ b in 𝓝 b₀, ∀ i, 0 < weights (p b) ψ ε (c b) i := by + rw [Filter.eventually_all] + intro i + exact ((continuous_apply i).continuousAt.comp hwAt).eventually_const_lt (hw i) + obtain ⟨U, hUsub, hU, hb₀⟩ := mem_nhds_iff.mp (hmNear.and hwNear) + let ρ : B × ℝ → ℝ := fun z => density ε ψ (weights (p z.1) ψ ε (c z.1)) z.2 + have hweights := weights_smoothOn hp hc hψ (fun b hb => (hUsub hb).1) ε + refine ⟨U, hU, hb₀, ρ, ?_, ?_, ?_, ?_⟩ + · apply contDiffOn_const.add + apply ContDiffOn.sum + intro i _ + have hwi : ContDiffOn ℝ ∞ + (fun z : B × ℝ => weights (p z.1) ψ ε (c z.1) i) (U ×ˢ Set.univ) := + ((contDiff_apply ℝ ℝ i).comp_contDiffOn hweights).comp contDiffOn_fst + (fun _ hz => hz.1) + exact hwi.mul ((hψ i).comp contDiff_snd).contDiffOn + · intro b hb t + exact density_pos hε hψnonneg (fun i => ((hUsub hb).2 i).le) t + · intro b + exact density_periodic ε ψ (weights (p b) ψ ε (c b)) hψper + · intro b hb + exact solved_moments + (hp.continuous.comp (continuous_const.prodMk continuous_id)) + (fun i => (hψ i).continuous) (hUsub hb).1 ε (c b) + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityPatching.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityPatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..58d4935f55dea57155de7b1c5f1bcfb2d6339e46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityPatching.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityParameter +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicGlobalization + +namespace OAI + +/-! Finite smooth patching of local positive density solutions. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] + {ι : Type*} [Fintype ι] + +/-- Nonnegative smooth weights preserve both positivity and the linear moments; +normalization gives mass one on the open region where some weight is positive. -/ +theorem patch_densities + {p : B → ℝ → Plane} {c : B → Plane} + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + (U : ι → Set B) (hU : ∀ i, IsOpen (U i)) + (ρ : ι → B × ℝ → ℝ) + (hρ : ∀ i, ContDiffOn ℝ ∞ (ρ i) (U i ×ˢ univ)) + (hpos : ∀ i b, b ∈ U i → ∀ t, 0 < ρ i (b, t)) + (hper : ∀ i b, Function.Periodic (fun t => ρ i (b, t)) 1) + (hmom : ∀ i b, b ∈ U i → + (∫ t in 0..1, ρ i (b, t) • augment (p b t)) = augment (c b)) + (ψ : ι → B → ℝ) (hψ : ∀ i, ContDiff ℝ ∞ (ψ i)) + (hn : ∀ i b, 0 ≤ ψ i b) (hsupp : ∀ i, tsupport (ψ i) ⊆ U i) : + ∃ σ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ σ ({b | 0 < ∑ i, ψ i b} ×ˢ univ) ∧ + (∀ b, 0 < ∑ i, ψ i b → ∀ t, 0 < σ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => σ (b, t)) 1) ∧ + (∀ b, 0 < ∑ i, ψ i b → + (∫ t in 0..1, σ (b, t) • augment (p b t)) = augment (c b)) ∧ + σ = (fun z => (∑ i, ψ i z.1 * ρ i z) / (∑ i, ψ i z.1)) := by + let w : ι → B × ℝ → ℝ := fun i z => ψ i z.1 * ρ i z + have hw (i : ι) : ContDiff ℝ ∞ (w i) := by + apply LocalPeriodicExpansion.contDiff_of_zero_off_closed (hU i) + (((hψ i).comp contDiff_fst).contDiffOn.mul (hρ i)) (isClosed_tsupport _) (hsupp i) + intro b hb t + have hz : ψ i b = 0 := image_eq_zero_of_notMem_tsupport hb + change ψ i b * ρ i (b, t) = 0 + rw [hz, zero_mul] + let S : B → ℝ := fun b => ∑ i, ψ i b + let W : B × ℝ → ℝ := fun z => ∑ i, w i z + let σ : B × ℝ → ℝ := fun z => W z / S z.1 + have hS : ContDiff ℝ ∞ S := ContDiff.sum (fun i _ => hψ i) + have hW : ContDiff ℝ ∞ W := ContDiff.sum (fun i _ => hw i) + have hUof (i : ι) (b : B) (hne : ψ i b ≠ 0) : b ∈ U i := + hsupp i (subset_tsupport _ (Function.mem_support.mpr hne)) + have hterm (i : ι) (b : B) (t : ℝ) : 0 ≤ w i (b, t) := by + by_cases hz : ψ i b = 0 + · simp [w, hz] + · exact mul_nonneg (hn i b) (hpos i b (hUof i b hz) t).le + refine ⟨σ, ?_, ?_, ?_, ?_, rfl⟩ + · exact hW.contDiffOn.div (hS.comp contDiff_fst).contDiffOn (fun z hz => hz.1.ne') + · intro b hb t + obtain ⟨i, _, hi⟩ := (Finset.sum_pos_iff_of_nonneg (fun j _ => hn j b)).mp hb + have hwi : 0 < w i (b, t) := mul_pos hi (hpos i b (hUof i b hi.ne') t) + exact div_pos (lt_of_lt_of_le hwi (Finset.single_le_sum (fun j _ => hterm j b t) + (Finset.mem_univ i))) hb + · intro b t + change (∑ i, ψ i b * ρ i (b, t + 1)) / S b = (∑ i, ψ i b * ρ i (b, t)) / S b + congr 1 + apply Finset.sum_congr rfl + intro i _ + exact congrArg (fun x : ℝ => ψ i b * x) (hper i b t) + · intro b hb + have hpc : Continuous (fun t => augment (p b t)) := + augment_continuous.comp (hp.continuous.comp (continuous_const.prodMk continuous_id)) + have hint (i : ι) : IntervalIntegrable (fun t => w i (b, t) • augment (p b t)) + MeasureTheory.volume 0 1 := + (((hw i).continuous.comp (continuous_const.prodMk continuous_id)).smul hpc).intervalIntegrable _ _ + have hmean : (∫ t in 0..1, W (b, t) • augment (p b t)) = S b • augment (c b) := by + change (∫ t in 0..1, (∑ i, w i (b, t)) • augment (p b t)) = _ + simp_rw [Finset.sum_smul] + rw [intervalIntegral.integral_finsetSum (fun i _ => hint i)] + rw [Finset.sum_smul] + apply Finset.sum_congr rfl + intro i _ + by_cases hz : ψ i b = 0 + · simp [w, hz] + · change (∫ t in 0..1, (ψ i b * ρ i (b, t)) • augment (p b t)) = _ + simp_rw [mul_smul] + rw [intervalIntegral.integral_smul, hmom i b (hUof i b hz)] + change (∫ t in 0..1, (W (b, t) / S b) • augment (p b t)) = _ + simp_rw [div_eq_inv_mul, mul_smul] + rw [intervalIntegral.integral_smul, hmean, smul_smul, inv_mul_cancel₀ hb.ne', one_smul] + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityRelative.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityRelative.lean new file mode 100644 index 0000000000000000000000000000000000000000..1874e475bde257db6c8418c139a5a8fbe0b76124 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityRelative.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityCompact + +namespace OAI + +/-! Extend prescribed positive densities while fixing a closed collar. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem positive_density_compact_preserving + {p : B → ℝ → Plane} {c : B → Plane} + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) + {U C K : Set B} (hU : IsOpen U) (hC : IsClosed C) (hCU : C ⊆ U) + (hK : IsCompact K) (ρ₀ : B × ℝ → ℝ) + (hρ₀ : ContDiffOn ℝ ∞ ρ₀ (U ×ˢ univ)) + (hpos₀ : ∀ b ∈ U, ∀ t, 0 < ρ₀ (b, t)) + (hper₀ : ∀ b, Function.Periodic (fun t => ρ₀ (b, t)) 1) + (hmom₀ : ∀ b ∈ U, (∫ t in 0..1, ρ₀ (b, t) • augment (p b t)) = augment (c b)) + (hlocal : ∀ b ∈ K \ U, ∃ W : Set B, IsOpen W ∧ b ∈ W ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (W ×ˢ univ) ∧ + (∀ x ∈ W, ∀ t, 0 < ρ (x, t)) ∧ + (∀ x, Function.Periodic (fun t => ρ (x, t)) 1) ∧ + ∀ x ∈ W, (∫ t in 0..1, ρ (x, t) • augment (p x t)) = augment (c x)) : + ∃ V : Set B, IsOpen V ∧ K ⊆ V ∧ ∃ σ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ σ (V ×ˢ univ) ∧ + (∀ b ∈ V, ∀ t, 0 < σ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => σ (b, t)) 1) ∧ + (∀ b ∈ V, (∫ t in 0..1, σ (b, t) • augment (p b t)) = augment (c b)) ∧ + ∀ b ∈ V ∩ C, ∀ t, σ (b, t) = ρ₀ (b, t) := by + classical + let I := {b : B // b ∈ K \ U} + choose W hW hbW ρ hρ hpos hper hmom using fun b : I => hlocal b b.property + let O : Option I → Set B := fun i => + match i with + | none => U + | some b => W b \ C + let r : Option I → B × ℝ → ℝ := fun i => + match i with + | none => ρ₀ + | some b => ρ b + have hO (i : Option I) : IsOpen (O i) := by + cases i with + | none => exact hU + | some b => exact (hW b).sdiff hC + have hr (i : Option I) : ContDiffOn ℝ ∞ (r i) (O i ×ˢ univ) := by + cases i with + | none => exact hρ₀ + | some b => exact (hρ b).mono (fun _ hx => ⟨hx.1.1, hx.2⟩) + have hrpos (i : Option I) (x : B) (hx : x ∈ O i) (t : ℝ) : 0 < r i (x, t) := by + cases i with + | none => exact hpos₀ x hx t + | some b => exact hpos b x hx.1 t + have hrper (i : Option I) (x : B) : Function.Periodic (fun t => r i (x, t)) 1 := by + cases i with + | none => exact hper₀ x + | some b => exact hper b x + have hrmom (i : Option I) (x : B) (hx : x ∈ O i) : + (∫ t in 0..1, r i (x, t) • augment (p x t)) = augment (c x) := by + cases i with + | none => exact hmom₀ x hx + | some b => exact hmom b x hx.1 + have hcover : K ⊆ ⋃ i, O i := by + intro b hbK + by_cases hbU : b ∈ U + · exact mem_iUnion.mpr ⟨none, hbU⟩ + · have hbC : b ∉ C := fun h => hbU (hCU h) + exact mem_iUnion.mpr ⟨some ⟨b, hbK, hbU⟩, hbW ⟨b, hbK, hbU⟩, hbC⟩ + obtain ⟨V, hV, hKV, σ, hσ, hσpos, hσper, hσmom, heq⟩ := + compact_patch_densities hp O hO r hr hrpos hrper hrmom hK hcover + refine ⟨V, hV, hKV, σ, hσ, hσpos, hσper, hσmom, ?_⟩ + intro b hb t + apply heq b hb.1 t (ρ₀ (b, t)) + intro i hi + cases i with + | none => rfl + | some x => exact False.elim (hi.2 hb.2) + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityTriangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityTriangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..48538d07e5cddd11137487e7f7536df690edb828 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/LoopDensityTriangle.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityBumpSelection + +namespace OAI + +/-! Three circle directions strictly surrounding any radial target in the open disk. -/ +noncomputable section +open scoped Matrix BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +def triangle (e : Plane) : Fin 3 → Plane := + ![e, ![-e 0 / 2 - Real.sqrt 3 / 2 * e 1, -e 1 / 2 + Real.sqrt 3 / 2 * e 0], + ![-e 0 / 2 + Real.sqrt 3 / 2 * e 1, -e 1 / 2 - Real.sqrt 3 / 2 * e 0]] + +def triangleWeights (r : ℝ) : Moments := ![(1 + 2 * r) / 3, (1 - r) / 3, (1 - r) / 3] + +lemma triangleWeights_pos {r : ℝ} (hr : 0 ≤ r) (hr1 : r < 1) (i : Fin 3) : + 0 < triangleWeights r i := by + fin_cases i <;> simp [triangleWeights] <;> linarith + +lemma triangle_barycenter (e : Plane) (r : ℝ) : + columnOperator (fun i => augment (triangle e i)) (triangleWeights r) = augment (r • e) := by + ext i + fin_cases i <;> + simp [columnOperator, triangle, triangleWeights, augment, Fin.sum_univ_three] <;> ring + +lemma triangle_determinant {e : Plane} (he : e 0 ^ 2 + e 1 ^ 2 = 1) : + Matrix.det (Matrix.of (fun i j : Fin 3 => augment (triangle e j) i)) = 3 * Real.sqrt 3 / 2 := by + calc + _ = (3 * Real.sqrt 3 / 2) * (e 0 ^ 2 + e 1 ^ 2) := by + rw [Matrix.det_fin_three (Matrix.of (fun i j : Fin 3 => augment (triangle e j) i))] + norm_num [triangle, augment] + ring + _ = _ := by rw [he, mul_one] + +lemma triangle_invertible {e : Plane} (he : e 0 ^ 2 + e 1 ^ 2 = 1) : + (columnOperator (fun i => augment (triangle e i))).IsInvertible := by + let M : Matrix (Fin 3) (Fin 3) ℝ := Matrix.of (fun i j => augment (triangle e j) i) + have hd : IsUnit M.det := by + rw [triangle_determinant he] + exact isUnit_iff_ne_zero.mpr (by positivity) + have hm : IsUnit M := (Matrix.isUnit_iff_isUnit_det M).mpr hd + have heval (x : Moments) : M.mulVec x = columnOperator (fun i => augment (triangle e i)) x := by + ext i + simp [M, Matrix.mulVec, dotProduct, columnOperator, mul_comm] + have hi : Function.Injective (columnOperator (fun i => augment (triangle e i))) := by + intro x y h + apply (Matrix.mulVec_injective_iff_isUnit.mpr hm) + simpa only [heval] using h + have hs := LinearMap.surjective_of_injective + (f := (columnOperator (fun i => augment (triangle e i))).toLinearMap) hi + exact ⟨(LinearEquiv.ofBijective _ ⟨hi, hs⟩).toContinuousLinearEquiv, rfl⟩ + +lemma triangle_unit {e : Plane} (he : e 0 ^ 2 + e 1 ^ 2 = 1) (i : Fin 3) : + (triangle e i) 0 ^ 2 + (triangle e i) 1 ^ 2 = 1 := by + have hs : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + fin_cases i + · exact he + · change (-e 0 / 2 - Real.sqrt 3 / 2 * e 1) ^ 2 + + (-e 1 / 2 + Real.sqrt 3 / 2 * e 0) ^ 2 = 1 + ring_nf + rw [hs] + nlinarith [he] + · change (-e 0 / 2 + Real.sqrt 3 / 2 * e 1) ^ 2 + + (-e 1 / 2 - Real.sqrt 3 / 2 * e 0) ^ 2 = 1 + ring_nf + rw [hs] + nlinarith [he] + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/MixedPeriodicBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/MixedPeriodicBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..6579e7adffaa53141141612ce20842e6dce0ad16 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/MixedPeriodicBounds.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.WeightedPeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus + +namespace OAI + +/-! Mixed slow and angular derivative estimates for normalized primitives. -/ +noncomputable section +open scoped ContDiff + +universe u +namespace ClosedSurfaceR4.SmoothPeriodicCalculus + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +def angularIterated : ℕ → (P × ℝ → E) → P × ℝ → E + | 0, F => F + | n + 1, F => angleDerivative (angularIterated n F) + +lemma contDiff_angularIterated {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (n : ℕ) : + ContDiff ℝ ∞ (angularIterated n F) := by + induction n with + | zero => exact hF + | succ n ih => exact contDiff_angleDerivative ih + +variable [FiniteDimensional ℝ P] [CompleteSpace E] + +lemma angleDerivative_primitive {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + angleDerivative (fun z : P × ℝ => PeriodicPrimitive.primitive (fun t => F (z.1, t)) z.2) = F := by + funext z + exact (angle_hasDerivAt (PeriodicPrimitive.contDiff_primitive_joint hF) z.1 z.2).unique + (PeriodicPrimitive.primitive_hasDerivAt + (hF.continuous.comp (continuous_const.prodMk continuous_id)) z.2) + +lemma angularIterated_primitive_succ {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (n : ℕ) : + angularIterated (n + 1) + (fun z : P × ℝ => PeriodicPrimitive.primitive (fun t => F (z.1, t)) z.2) = + angularIterated n F := by + induction n with + | zero => exact angleDerivative_primitive hF + | succ n ih => change angleDerivative _ = angleDerivative _; rw [ih] + +end ClosedSurfaceR4.SmoothPeriodicCalculus + +namespace ClosedSurfaceR4.WeightedEstimates +open SmoothParameterIntegral SmoothPeriodicCalculus PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Slow derivatives carry the scale weight; angular derivatives do not. +The primitive adds no scale loss, uniformly at every mixed derivative order. -/ +theorem mixed_weighted_primitive {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + {U : Set P} (hU : IsOpen U) {s C : ℝ} (hs : 0 < s) (hC : 0 ≤ C) (m : ℕ) + (hb : ∀ j k, j + k ≤ m → ∀ p ∈ U, ∀ t ∈ Set.Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j (angularIterated k F) (p, t)‖ ≤ C) : + ∀ j k, j + k ≤ m → ∀ p ∈ U, ∀ t ∈ Set.Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j (angularIterated k + (fun z : P × ℝ => primitive (fun r => F (z.1, r)) z.2)) (p, t)‖ ≤ 2 * C := by + intro j k hjk p hp t ht + cases k with + | zero => + have hh := weighted_periodicPrimitive hF hU hs hC m + (fun r hr => hb r 0 (by simpa using hr)) ht j (by omega) p hp + have hQ : ContDiff ℝ ∞ (fun q => primitive (fun r => F (q, r)) t) := + (contDiff_primitive_joint hF).comp (contDiff_id.prodMk contDiff_const) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn + ((hQ.of_le (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) hp] at hh + exact hh + | succ k => + rw [angularIterated_primitive_succ hF k] + exact (hb j k (by omega) p hp t ht).trans (by linarith) + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearJetProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearJetProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8ee7f2c944fb174a94998a0cba3aaa8a09a77b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearJetProfiles.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCompositionPrefix + +namespace OAI + +/-! Actual slow-map jet bounds in a fixed nonlinear phase chart. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem nonlinear_jet_profiles (i : A.centers) {T : JetPolynomial.Base → JetPolynomial.Base} + (hT : ContDiff ℝ ∞ T) {S : Set JetPolynomial.Base} (hS : IsOpen S) + (hSc : IsCompact (closure S)) (R : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) : + ∃ (Q : Set LowJet) (B : ℕ → ℝ), IsCompact Q ∧ (∀ m, 1 ≤ B m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ s : ℝ≥0, 0 < (s : ℝ) → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (R m) G) → + MapsTo (lowJet (A.jetChartMap i G ∘ T)) S Q ∧ + ∀ m, WeightedEstimates.WeightedBound S s m (B m) (lowJet (A.jetChartMap i G ∘ T)) := by + choose E hE he using fun m => A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + choose D hD hd using fun m => compact_composition_prefix hT hS hSc m + let C := fun m => D m * (‖spaceCoordinates.toContinuousLinearMap‖ * E m * R m) + have hC (m) : 0 ≤ C m := mul_nonneg (zero_le_one.trans (hD m)) + (mul_nonneg (mul_nonneg (norm_nonneg _) (hE m)) (hR m)) + have hpref (G : M → Space) (hG : ContMDiff planeModel spaceModel ∞ G) + (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (hb : ∀ m, A.ShiftedBound 2 m s (R m) G) (m j) (hj : j ≤ m+2) : + WeightedEstimates.WeightedBound S 1 j (C m/(s:ℝ)^(j-2)) (A.jetChartMap i G ∘ T) := by + apply hd m (A.jetChartMap i G) s (‖spaceCoordinates.toContinuousLinearMap‖ * E m * R m) + hs (mul_nonneg (mul_nonneg (norm_nonneg _) (hE m)) (hR m)) + (A.jetChartMap_smooth i hG) ?_ j hj + intro k hk + have hh := (he m G s (R m) hs hs1 (hR m) hG (hb m) k (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hc := weightedBound_comp_isometry planeCoordinateIsometry + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) hh + have heq : (spaceCoordinates ∘ A.vectorPlaneRead i G) ∘ planeCoordinateIsometry = + A.jetChartMap i G := by + funext x + have hx := congrFun (A.jetChartMap_plane i G) (planeCoordinateIsometry x) + simpa only [Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] using hx.symm + change WeightedEstimates.WeightedBound univ 1 k _ + ((spaceCoordinates ∘ A.vectorPlaneRead i G) ∘ planeCoordinateIsometry) at hc + rw [heq] at hc + simpa only [mul_div_assoc,mul_assoc] using hc + let K : TopologicalSpace.Compacts JetPolynomial.Base := ⟨closure S,hSc⟩ + obtain ⟨Q,hQ,hmaps⟩ := bounded_lowJet_range hS K subset_closure (hC 0) + choose J hJ hj using fun m => bounded_lowJet_prefix hS K subset_closure m + refine ⟨Q,fun m => J m+C m,hQ,fun m => (hJ m).trans (le_add_of_nonneg_right (hC m)),?_⟩ + intro G hG s hs hs1 hb + refine ⟨?_,fun m => hj m _ ((A.jetChartMap_smooth i hG).comp hT) s (C m) hs hs1 (hC m) + (hpref G hG s hs hs1 hb m)⟩ + apply hmaps _ ((A.jetChartMap_smooth i hG).comp hT) + simpa only [Nat.sub_self,pow_zero,div_one] using hpref G hG s hs hs1 hb 0 2 (by omega) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearPrimitiveExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearPrimitiveExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0a802f222d7d2e44039abca18848b64a111819c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/NonlinearPrimitiveExpansion.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasErrorBound +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasMapBound +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Geometry.SingleTensorRestoreBound +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveErrorBound +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedPhaseMetric +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasAnsatz +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSingleTensorRestoreBound +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPrimitivePolynomial + +namespace OAI + +/-! Exact decomposition of a global primitive's metric defect into the +solved polynomial mean error and the finite periodic remainder. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +local instance phaseExpansionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseExpansionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phaseExpansionDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseExpansionDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseExpansionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseExpansionSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The actual finite velocity recursion in a nonlinear phase chart, +with the pulled-back polynomial mean and global supported error estimates. -/ +theorem supported_phase_primitive_metric (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ P : Fin 3 → Fin n → Expression, (∀ k r, (P k r).SmoothCoeffs univ) ∧ + ∃ loss : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ Dv D : ℝ, 0 ≤ Dv ∧ 0 ≤ D ∧ + ∀ (G : M → Space) (hG : ContMDiff planeModel spaceModel ∞ G) + (hGQ : MapsTo (lowJet (A.jetChartMap i G ∘ e.symm)) S Q), + ∀ K : Set JetPolynomial.Base, IsCompact K → K ⊆ S → + e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) → + (∀ x ∈ e.symm '' K, χ x = 1) → + (∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (A.jetChartMap i G ∘ e.symm) p,t) = + SurfaceVelocityFamily.normal (lowJet (A.jetChartMap i G ∘ e.symm) p)) → + ∃ U : ℕ → Family S Space, + (∀ j p, p ∉ K → (U j).val p = 0) ∧ + (∀ j, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U j).val y.1 (y.2 : Period))) ∧ + (∀ j, VectorExpression.Represents (A.jetChartMap i G ∘ e.symm) (l.coefficientExpressions n j) (U j)) ∧ + U 0 = (l.geometry (A.jetChartMap i G ∘ e.symm) ((A.jetChartMap_smooth i hG).comp hi) + (fun _ hp => hQO (hGQ hp))).initial ∧ + (∀ z, ContMDiff planeModel spaceModel ∞ (A.phaseAtlasAnsatz i G e χ U ℓ (n+1) z)) ∧ + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedEstimates.WeightedBound S s (m+(2*(n+1)+1)) B (lowJet (A.jetChartMap i G ∘ e.symm)) → + A.WeightedBound z m (Dv*z/s^loss) (A.phaseAtlasAnsatz i G e χ U ℓ (n+1) z-G) ∧ + ∀ (γ : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x)) → + ∀ C : ℝ, A.TensorWeightedBound z m C + (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback P e e.symm))) z G-γ) → + A.TensorWeightedBound z m (C+D*z^(n+1)/s^loss) + (inducedTensor (A.phaseAtlasAnsatz i G e χ U ℓ (n+1) z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y)))) := by + obtain ⟨P,hP,_,_,hmean⟩ := l.meanTensorPolynomial_global_extension hQ hQO n + obtain ⟨loss,hloss⟩ := l.supported_primitive_expansion (S := S) ha hamp hQ hQO n ℓ hℓx hℓy + refine ⟨P,hP,loss,?_⟩ + intro m B hB + obtain ⟨C₀,D₀,hC₀,hD₀,hconstruct⟩ := hloss m B hB + obtain ⟨Dr,hDr,hr⟩ := A.phaseAtlasAnsatz_error_bound i e he hi hχ hχc hχs S.isOpen hTS m + obtain ⟨Dv,hDv,hvb⟩ := A.phaseAtlasAnsatz_increment_bound i e he hi hχ hχc m + refine ⟨Dv*C₀,Dr*D₀,mul_nonneg hDv hC₀,mul_nonneg hDr hD₀,?_⟩ + intro G hG hGQ K hK hKS hKA hone hv + have hGj := (A.jetChartMap_smooth i hG).comp hi + obtain ⟨U,hU,hzero,hrep,hinit,hrem⟩ := hconstruct (A.jetChartMap i G ∘ e.symm) hGj hGQ + K hK.isClosed hKS hv + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((A.jetChartMap i G ∘ e.symm) q)) = + A.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hrem + refine ⟨U,hzero,hU,hrep,hinit, + fun z => A.phaseAtlasAnsatz_smooth i hG e he hi hχ U hK.isClosed hKS hzero ℓ (n+1) z,?_⟩ + intro s z hz hzs hs1 hGb + have hs : 0 < s := hz.trans_le hzs + have hz1 : z ≤ 1 := hzs.trans hs1 + have hlocalIncrement := (hrem s z hz hzs hs1 hGb).1 + refine ⟨?_,?_⟩ + · have hh := hvb G hG S U K hK.isClosed hKS hzero ℓ (n+1) z z (C₀*z/s^loss) + hz hz1 (by positivity) hlocalIncrement + simpa only [mul_div_assoc,mul_assoc] using hh + intro γ hγ C hsolved + let B₀ : JetPolynomial.Base → PhaseMean.Tensor := fun q => ![a q^2,0,0] + have hB₀ : ContDiff ℝ ∞ B₀ := by + apply contDiff_pi.mpr + intro k + fin_cases k + · exact ha.pow 2 + · exact contDiff_const + · exact contDiff_const + have hlocal : WeightedEstimates.WeightedBound S z m (D₀*z^(n+1)/s^loss) + (A.phaseAtlasRemainder i G e U ℓ (n+1) z P B₀) := by + apply (hrem s z hz hzs hs1 hGb).2.congr + intro p hp + dsimp only [phaseAtlasRemainder,B₀] + rw [hmean _ hGj z p (hGQ hp)] + have hh := hr G hG S U K hK hKS hKA hzero hone ℓ (n+1) z n P hP γ hγ B₀ hB₀ + z C (D₀*z^(n+1)/s^loss) hz hz1 (by positivity) hsolved hlocal + simpa only [B₀,mul_div_assoc,mul_assoc] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicAnsatzMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicAnsatzMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..f604c50229d64977700136032bd3035c71b3fa39 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicAnsatzMetric.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicPolynomialExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFiniteAnsatz +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSeriesAlgebra + +namespace OAI + +/-! Identifying the finite metric polynomial with derivatives of the actual map. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xTangent_value (dx : A) (U : ℕ → Family A E) (n : ℕ) (p : A) (t : Period) (z : ℝ) : + vectorPolynomialValue (n + 1) (fun i => (g.xTangent dx U (n + 1) i).val p t) z = + g.longitudinal.val p t + + (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (xCoefficient dx U i).val p t) + + z ^ (n + 1) • ((U n).slow dx).val p t := by + rw [vectorPolynomialValue, weighted_sum_split_endpoints, g.xTangent_zero] + have he : (∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (g.xTangent dx U (n + 1) i).val p t) = + ∑ i ∈ Finset.Ico 1 (n + 1), z ^ i • (xCoefficient dx U i).val p t := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hil⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) hil] + rw [he] + simp only [xTangent, Nat.add_eq_zero_iff, Nat.one_ne_zero, and_false, ite_false, + ite_true, Nat.add_sub_cancel] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yTangent_value (U : ℕ → Family A E) (L : ℕ) (p : A) (t : Period) (z : ℝ) : + vectorPolynomialValue L (fun i => (g.yTangent U i).val p t) z = + g.transverse.val p t + ∑ i ∈ Finset.range L, z ^ (i + 1) • ((U i).slow dy).val p t := by + rw [vectorPolynomialValue, weighted_sum_split_zero, g.yTangent_zero] + congr 1 + have he := Finset.sum_Ico_add' (fun i => z ^ i • (g.yTangent U i).val p t) 0 L 1 + simp only [zero_add, Nat.Ico_zero_eq_range] at he + rw [← he] + apply Finset.sum_congr rfl + intro i hi + rw [g.yTangent_pos U (by omega)] + simp only [yCoefficient, Nat.add_sub_cancel] + +omit [FiniteDimensional ℝ E] in +lemma finiteAnsatz_x {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (hinit : U 0 = g.initial) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓ : ℓ dx = 1) + (hX : ∀ p, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (n : ℕ) (z : ℝ) (hz : z ≠ 0) (p : A) : + fderiv ℝ (finiteAnsatz F U ℓ (n + 1) z) p dx = + vectorPolynomialValue (n + 1) + (fun i => (g.xTangent dx U (n + 1) i).val p ((ℓ p / z : ℝ) : Period)) z := by + let t : Period := ((ℓ p / z : ℝ) : Period) + have hs : (∑ i ∈ Finset.range (n + 1), z ^ (i + 1) • + (((U i).slow dx).val p t + (ℓ dx / z) • (U i).angle.val p t)) = + ∑ i ∈ Finset.range (n + 1), + (z ^ (i + 1) • ((U i).slow dx).val p t + z ^ i • (U i).angle.val p t) := by + apply Finset.sum_congr rfl + intro i hi + rw [smul_add, smul_smul, hℓ] + congr 1 + congr 1 + field_simp + ring + rw [finiteAnsatz_fderiv hF, hs, + shifted_derivative_sum z (fun i => ((U i).slow dx).val p t) + (fun i => (U i).angle.val p t) n, g.xTangent_value] + have hlead : fderiv ℝ F p dx + (U 0).angle.val p t = g.longitudinal.val p t := by + rw [hinit, g.initial_angle, hX] + simp only [Family.sub_apply, Family.vectorMean_apply, longitudinal, + Family.add_apply, Family.constant_apply] + abel + simp only [← add_assoc, hlead] + rfl + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma finiteAnsatz_y {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (hℓ : ℓ dy = 0) + (hY : ∀ p, fderiv ℝ F p dy = g.Y p) (L : ℕ) (z : ℝ) (p : A) : + fderiv ℝ (finiteAnsatz F U ℓ L z) p dy = + vectorPolynomialValue L + (fun i => (g.yTangent U i).val p ((ℓ p / z : ℝ) : Period)) z := by + rw [finiteAnsatz_fderiv hF, g.yTangent_value, hY] + simp only [hℓ, zero_div, zero_smul, add_zero, transverse, Family.constant_apply] + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicBumpAverage.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicBumpAverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7ff48fee025262db708f2456d147aacc6fce284 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicBumpAverage.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicLocalizedBump + +namespace OAI + +/-! Localized positive periodic densities approximate any chosen path value. -/ +noncomputable section +open Set Metric MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Point masses in the convex-hull argument can be replaced by actual smooth +nonnegative densities while changing their vector moments arbitrarily little. -/ +theorem exists_bump_average_near {f : ℝ → E} (hf : Continuous f) + {c ε : ℝ} (hc : c ∈ Ioo (0 : ℝ) 1) (hε : 0 < ε) : + ∃ ψ : ℝ → ℝ, ContDiff ℝ ∞ ψ ∧ Function.Periodic ψ 1 ∧ + (∀ t, 0 ≤ ψ t) ∧ (∫ t in 0..1, ψ t) = 1 ∧ + ‖(∫ t in 0..1, ψ t • f t) - f c‖ < ε := by + let V := f ⁻¹' ball (f c) (ε / 2) + have hV : IsOpen V := isOpen_ball.preimage hf + have hcV : c ∈ V := mem_ball_self (by positivity) + obtain ⟨ψ, hψ, hper, hnonneg, hmass, hsupp⟩ := exists_localized_bump hc hV hcV + refine ⟨ψ, hψ, hper, hnonneg, hmass, ?_⟩ + have hconst : Continuous (fun t => ψ t • f c) := hψ.continuous.smul continuous_const + have hprod : Continuous (fun t => ψ t • f t) := hψ.continuous.smul hf + have heq : (∫ t in 0..1, ψ t • f t) - f c = + ∫ t in 0..1, ψ t • (f t - f c) := by + simp_rw [smul_sub] + rw [intervalIntegral.integral_sub (hprod.intervalIntegrable _ _) + (hconst.intervalIntegrable _ _), intervalIntegral.integral_smul_const, hmass, one_smul] + have hb (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + ‖ψ t • (f t - f c)‖ ≤ ψ t * (ε / 2) := by + by_cases hz : ψ t = 0 + · simp [hz] + · have htV : t ∈ V := by + by_contra h + exact hz (hsupp t ht h) + have hd : ‖f t - f c‖ < ε / 2 := by + simpa only [V, mem_preimage, mem_ball, dist_eq_norm] using htV + rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (hnonneg t)] + exact mul_le_mul_of_nonneg_left hd.le (hnonneg t) + rw [heq] + calc + _ ≤ ∫ t in 0..1, ψ t * (ε / 2) := by + exact intervalIntegral.norm_integral_le_of_norm_le zero_le_one + (Filter.Eventually.of_forall (fun t ht => hb t ⟨ht.1.le, ht.2⟩)) + ((hψ.continuous.mul_const (ε / 2)).intervalIntegrable _ _) + _ = ε / 2 := by rw [intervalIntegral.integral_mul_const, hmass, one_mul] + _ < ε := by linarith + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..02fa0a4a207f8fbd236e64d78b1404ca9224cce0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCalculus.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Correction.CovarianceCorrector + +namespace OAI + +/-! Differentiation and normalized integration on the period circle. -/ + +noncomputable section + +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCalculus + +open CovarianceCorrector PeriodicPrimitive + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- The real primitive descends to the circle without losing smoothness or +its normalization. -/ +theorem exists_circle_primitive {f : Period → E} + (hf : ContDiff ℝ ∞ (fun t : ℝ => f (t : Period))) + (hm : (∫ t, f t ∂AddCircle.haarAddCircle) = 0) : + ∃ F : Period → E, Continuous F ∧ + ContDiff ℝ ∞ (fun t : ℝ => F (t : Period)) ∧ + (∫ t, F t ∂AddCircle.haarAddCircle) = 0 ∧ + ∀ t : ℝ, HasDerivAt (fun s : ℝ => F (s : Period)) (f (t : Period)) t := by + obtain ⟨F, hF, hp, hd, hmF⟩ := exists_smooth_primitive_of_haar_mean_zero hf hm + refine ⟨hp.lift, continuous_coinduced_dom.mpr hF.continuous, ?_, ?_, ?_⟩ + · simpa only [Function.Periodic.lift_coe] using hF + · rw [← integral_lift_eq_haar] + simpa only [Function.Periodic.lift_coe] using hmF + · simpa only [Function.Periodic.lift_coe] using hd + +omit [CompleteSpace E] in +lemma periodic_deriv {f : ℝ → E} (hp : Function.Periodic f 1) : + Function.Periodic (deriv f) 1 := by + intro x + have he : (fun t => f (t + 1)) = f := funext hp + have hd := congrArg (fun g : ℝ → E => deriv g x) he + simpa only [deriv_comp_add_const] using hd + +/-- A smooth circle function has a smooth circle derivative of mean zero. -/ +theorem exists_circle_derivative {f : Period → E} + (hf : ContDiff ℝ ∞ (fun t : ℝ => f (t : Period))) : + ∃ D : Period → E, Continuous D ∧ + ContDiff ℝ ∞ (fun t : ℝ => D (t : Period)) ∧ + (∫ t, D t ∂AddCircle.haarAddCircle) = 0 ∧ + ∀ t : ℝ, HasDerivAt (fun s : ℝ => f (s : Period)) (D (t : Period)) t := by + let g : ℝ → E := fun t => f (t : Period) + have hg : ContDiff ℝ ∞ g := hf + have hp : Function.Periodic g 1 := by + intro x + change f ((x + 1 : ℝ) : Period) = f (x : Period) + rw [AddCircle.coe_add_period] + have hD : ContDiff ℝ ∞ (deriv g) := (contDiff_infty_iff_deriv.mp hg).2 + let D : Period → E := (periodic_deriv hp).lift + have hDc : Continuous D := continuous_coinduced_dom.mpr hD.continuous + have hd (t : ℝ) : HasDerivAt g (D (t : Period)) t := + (hg.differentiable (by simp) t).hasDerivAt + refine ⟨D, hDc, ?_, ?_, hd⟩ + · simpa only [D, Function.Periodic.lift_coe] using hD + · rw [← integral_lift_eq_haar] + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hd t) + ((hD.continuous).intervalIntegrable 0 1)] + exact sub_eq_zero.mpr (by simpa using hp 0) + +end ClosedSurfaceR4.PeriodicCalculus + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..7359d8cac467ddb52f634f26c1db79748746098a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientProfiles.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAnsatzAsymptotics +import OAI.Geometry.SurfaceImmersion.Primitive.LocalAnsatzProfiles + +namespace OAI + +/-! Explicit finite coefficient bounds for the varying-map version of the +periodic derivative estimates. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.PeriodicExpansion +open CovarianceCorrector +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma phaseSum_bound_of_coefficients (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) {z C : ℝ} {p : A} + (hz : 0 ≤ z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hU : ∀ i < L, ‖(U i).fastValue ℓ z p‖ ≤ C) : + ‖phaseSum U ℓ L z p‖ ≤ L*C := by + apply (norm_sum_le _ _).trans + calc + ∑ i ∈ Finset.range L, ‖z^i • (U i).fastValue ℓ z p‖ ≤ + ∑ _i ∈ Finset.range L, C := by + apply Finset.sum_le_sum + intro i hi + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (pow_nonneg hz _)] + exact (mul_le_mul_of_nonneg_left (hU i (Finset.mem_range.mp hi)) (pow_nonneg hz _)).trans + (mul_le_of_le_one_left hC (pow_le_one₀ hz hz1)) + _ = L*C := by simp + +lemma phaseSum_tail_bound_of_coefficients (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (n : ℕ) {z C : ℝ} {p : A} + (hz : 0 ≤ z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hU : ∀ i < n+1, ‖(U i).fastValue ℓ z p‖ ≤ C) : + ‖phaseSum U ℓ (n+1) z p-(U 0).fastValue ℓ z p‖ ≤ (n*C)*z := by + rw [phaseSum_leading,add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg hz] + have hh := phaseSum_bound_of_coefficients (fun i => U (i+1)) ℓ n hz hz1 hC + (fun i hi => hU (i+1) (by omega)) + exact (mul_le_mul_of_nonneg_left hh hz).trans_eq (mul_comm _ _) + +/-- The two transverse derivatives only differentiate slow coefficients. -/ +theorem transverse_profiles_of_coefficients {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) {dy : A} (hy : ℓ dy = 0) + {z C : ℝ} {p : A} (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) + (hU : ∀ i < L, ‖((U i).slow dy).fastValue ℓ z p‖ ≤ C) + (hUU : ∀ i < L, ‖(((U i).slow dy).slow dy).fastValue ℓ z p‖ ≤ C) : + ‖directionalMap (finiteAnsatz F U ℓ L z) dy p-directionalMap F dy p‖ ≤ (L*C)*z ∧ + ‖directionalMap (directionalMap (finiteAnsatz F U ℓ L z) dy) dy p- + directionalMap (directionalMap F dy) dy p‖ ≤ (L*C)*z := by + constructor + · rw [finiteAnsatz_directional hF U ℓ L hz.ne' dy] + simp only [hy,zero_smul,add_zero,add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact (mul_le_mul_of_nonneg_left (phaseSum_bound_of_coefficients _ ℓ L hz.le hz1 hC hU) hz.le).trans_eq + (mul_comm _ _) + · rw [finiteAnsatz_second_transverse hF U ℓ L hz.ne' dy hy] + simp only [hy,zero_smul,add_zero,add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact (mul_le_mul_of_nonneg_left (phaseSum_bound_of_coefficients _ ℓ L hz.le hz1 hC hUU) hz.le).trans_eq + (mul_comm _ _) + +end ClosedSurfaceR4.PeriodicExpansion + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {O : TopologicalSpace.Opens A} + +lemma global_slow_eq_local (W : PeriodicExpansion.Family A E) (U : Family O E) + (hW : W.val = U.val) (v : A) {p : A} (hp : p ∈ O) (t : Period) : + (W.slow v).val p t = (U.slow v).val p t := by + refine Quotient.inductionOn' t ?_ + intro s + rw [PeriodicExpansion.Family.slow_apply,Family.slow_apply U v hp,hW] + +lemma global_slow_eq_local_of_eqOn (W : PeriodicExpansion.Family A E) (U : Family O E) + (hW : ∀ p ∈ O, ∀ t : Period, W.val p t = U.val p t) + (v : A) {p : A} (hp : p ∈ O) (t : Period) : + (W.slow v).val p t = (U.slow v).val p t := by + refine Quotient.inductionOn' t ?_ + intro s + rw [PeriodicExpansion.Family.slow_apply,Family.slow_apply U v hp] + have he : (fun z : A × ℝ => W.val z.1 (z.2 : Period)) =ᶠ[nhds (p,s)] + (fun z => U.val z.1 (z.2 : Period)) := by + filter_upwards [(O.isOpen.prod isOpen_univ).mem_nhds ⟨hp,mem_univ s⟩] with z hz + exact hW z.1 hz.1 (z.2 : Period) + exact congrArg (fun L : (A × ℝ) →L[ℝ] E => L (v,0)) he.fderiv_eq + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f2977b7dee430d8f491d23501ed2aa67ac86000 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicCoefficientSupport.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicMetricCoefficients + +namespace OAI + +/-! Differentiating and forming metric coefficients preserves local zero support. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +variable {O : Set A} (hO : IsOpen O) (U : ℕ → Family A E) + (hU : ∀ i p, p ∈ O → (U i).val p = 0) + +include hO hU + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xCoefficient_zero_on (dx : A) (i : ℕ) {p : A} (hp : p ∈ O) : + (xCoefficient dx U i).val p = 0 := by + have hs := (U (i - 1)).slow_zero_on hO (hU (i - 1)) dx hp + have ha := (U i).angle_zero_at (hU i p hp) + ext t + change ((U (i - 1)).slow dx).val p t + (U i).angle.val p t = 0 + rw [hs, ha] + simp only [ContinuousMap.zero_apply, add_zero] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yCoefficient_zero_on (dy : A) (i : ℕ) {p : A} (hp : p ∈ O) : + (yCoefficient dy U i).val p = 0 := + (U (i - 1)).slow_zero_on hO (hU (i - 1)) dy hp + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxQuadratic_zero_on (dx : A) (r : ℕ) {p : A} (hp : p ∈ O) : + (xxQuadratic dx U r).val p = 0 := by + ext t + simp only [xxQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [xCoefficient_zero_on hO U hU dx i hp] + exact inner_zero_left _ + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyQuadratic_zero_on (dx dy : A) (r : ℕ) {p : A} (hp : p ∈ O) : + (xyQuadratic dx dy U r).val p = 0 := by + ext t + simp only [xyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [xCoefficient_zero_on hO U hU dx i hp] + exact inner_zero_left _ + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyQuadratic_zero_on (dy : A) (r : ℕ) {p : A} (hp : p ∈ O) : + (yyQuadratic dy U r).val p = 0 := by + ext t + simp only [yyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_eq_zero + intro i hi + rw [yCoefficient_zero_on hO U hU dy i hp] + exact inner_zero_left _ + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionInit.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionInit.lean new file mode 100644 index 0000000000000000000000000000000000000000..824d64551799f3f6ccc57f9269e96c0ab62cce59 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionInit.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicExpansionStep + +namespace OAI + +/-! The initial coefficient and its transverse cancellation in the periodic expansion. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Family + +def vectorMean (F : Family A E) : Family A E := + constant (fun p => average (F.val p)) (contDiff_average_joint F.smooth) + +omit [FiniteDimensional ℝ E] in +@[simp] lemma vectorMean_apply (F : Family A E) (p : A) (t : Period) : + F.vectorMean.val p t = average (F.val p) := rfl + +omit [FiniteDimensional ℝ E] in +lemma centered_mean_zero (F : Family A E) (p : A) : + average ((F - F.vectorMean).val p) = 0 := by + change average (fun t => F.val p t - average (F.val p)) = 0 + rw [average_sub (F.val p).continuous continuous_const, average_const, sub_self] + +lemma primitive_mem (F : Family A E) (hm : ∀ p, average (F.val p) = 0) + (S : A → Submodule ℝ E) (hS : ∀ p t, F.val p t ∈ S p) (p : A) (t : Period) : + (F.primitive hm).val p t ∈ S p := by + refine Quotient.inductionOn' t ?_ + intro x + exact PeriodicPrimitive.primitive_mem_submodule (S p) + ((F.val p).continuous.comp (AddCircle.continuous_mk' 1)) (fun y => hS p (y : Period)) x + +end Family + +namespace Geometry + +variable {v : A} (g : Geometry (E := E) v) + +def initial : Family A E := + (g.V - g.V.vectorMean).primitive g.V.centered_mean_zero + +omit [FiniteDimensional ℝ E] in +lemma initial_mean_zero (p : A) : average (g.initial.val p) = 0 := + Family.primitive_mean_zero _ _ p + +omit [FiniteDimensional ℝ E] in +lemma initial_angle : g.initial.angle = g.V - g.V.vectorMean := + Family.primitive_angle _ _ + +lemma initial_mem (p : A) (t : Period) : g.initial.val p t ∈ g.plane p := by + apply Family.primitive_mem + intro q s + exact (g.plane q).sub_mem (g.V_mem q s) + (average_mem_submodule (g.plane q) (g.V.val q).continuous (g.V_mem q)) + +lemma initial_pairing (p : A) (t : Period) : + inner ℝ (g.Y p) (g.initial.val p t) = 0 ∧ + inner ℝ (g.C p) (g.initial.val p t) = 0 := + ⟨g.perpY p _ (g.initial_mem p t), g.perpC p _ (g.initial_mem p t)⟩ + +/-- The yy coefficient at order one vanishes before higher correctors are added. -/ +lemma initial_transverse_derivative : g.transverse.inner (g.initial.slow v) = 0 := by + ext p t + refine Quotient.inductionOn' t ?_ + intro x + have hUt : ContDiff ℝ ∞ (fun p => g.initial.val p (x : Period)) := + g.initial.smooth.comp (contDiff_id.prodMk contDiff_const) + have hK : inner ℝ (g.C p) (g.initial.val p (x : Period)) = + fderiv ℝ (fun _ : A => (0 : ℝ)) p v - 0 := by + simpa using (g.initial_pairing p (x : Period)).2 + have hd := PeriodicCorrector.directional_pairing_constraint + (g.smoothY.differentiable (by simp) p) (hUt.differentiable (by simp) p) + (differentiableAt_const (c := (0 : ℝ))) + (fun q => (g.initial_pairing q (x : Period)).1) (g.derivativeY p) hK + change inner ℝ (g.Y p) + (slowDerivative (fun z : A × ℝ => g.initial.val z.1 (z.2 : Period)) v (p, x)) = 0 + rwa [fderiv_slice g.initial.smooth] at hd + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..62b823f06479ff28f5c8ae6c89a4ab44120edb30 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicExpansionStep.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFamilySupport + +namespace OAI + +/-! The triangular cancellation step in the finite periodic metric expansion. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +/-- The pointwise geometry used by the periodic coefficient recursion. -/ +structure Geometry (v : A) where + plane : A → Submodule ℝ E + Y : A → E + C : A → E + X₀ : A → E + smoothY : ContDiff ℝ ∞ Y + smoothC : ContDiff ℝ ∞ C + smoothX₀ : ContDiff ℝ ∞ X₀ + derivativeY : ∀ p, fderiv ℝ Y p v = C p + gram_ne : ∀ p, PeriodicCorrector.gramDet (Y p) (C p) ≠ 0 + perpY : ∀ p w, w ∈ plane p → inner ℝ (Y p) w = 0 + perpC : ∀ p w, w ∈ plane p → inner ℝ (C p) w = 0 + perpX₀ : ∀ p w, w ∈ plane p → inner ℝ (X₀ p) w = 0 + V : Family A E + V_mem : ∀ p t, V.val p t ∈ plane p + q : A → ℝ + smoothq : ContDiff ℝ ∞ q + q_pos : ∀ p, 0 < q p + circle : ∀ p t, inner ℝ (V.val p t) (V.val p t) = q p + +namespace Geometry + +variable {v : A} (g : Geometry (E := E) v) + +def longitudinal : Family A E := Family.constant g.X₀ g.smoothX₀ + g.V + +def transverse : Family A E := Family.constant g.Y g.smoothY + +theorem exists_system (h j e : Family A ℝ) + (hh : ∀ p, average (h.val p) = 0) (hj : ∀ p, average (j.val p) = 0) + (he : ∀ p, average (e.val p) = 0) : + ∃ U : Family A E, (∀ p, average (U.val p) = 0) ∧ + g.transverse.inner U.angle = h ∧ + g.transverse.inner (U.slow v) = j ∧ + (g.longitudinal.inner U.angle).fluct = e ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, h.val p = 0) → + (∀ p ∈ O, j.val p = 0) → (∀ p ∈ O, e.val p = 0) → ∀ p ∈ O, U.val p = 0) := by + obtain ⟨U, D, hUs, _, hU0, hUd, hYd, hYs, hX, hzero⟩ := + PeriodicCorrector.solve_full_smooth_family v g.plane g.Y g.C g.X₀ + g.smoothY g.smoothC g.smoothX₀ g.derivativeY g.gram_ne + g.perpY g.perpC g.perpX₀ g.V.val g.V_mem g.V.smooth + g.q g.smoothq g.q_pos g.circle h.val j.val e.val h.smooth j.smooth e.smooth hh hj he + let U' : Family A E := ⟨U, hUs⟩ + have hangle (p : A) (t : Period) : U'.angle.val p t = D p t := by + refine Quotient.inductionOn' t ?_ + intro x + exact (angle_hasDerivAt hUs p x).unique (hUd p x) + refine ⟨U', hU0, ?_, ?_, ?_, hzero⟩ + · ext p t + change inner ℝ (g.Y p) (U'.angle.val p t) = h.val p t + rw [hangle] + exact hYd p t + · ext p t + refine Quotient.inductionOn' t ?_ + intro x + exact hYs p x + · ext p t + change fluctuation (fun t => inner ℝ (g.X₀ p + g.V.val p t) (U'.angle.val p t)) t = e.val p t + simp only [hangle] + exact congrFun (hX p) t + +/-- One new coefficient cancels the current xx and xy fluctuations and +the next yy fluctuation, as in the manuscript's triangular recursion. -/ +theorem exists_cancellation (b c d : Family A ℝ) : + ∃ U : Family A E, (∀ p, average (U.val p) = 0) ∧ + (g.transverse.inner U.angle + b).fluct = 0 ∧ + (g.longitudinal.inner U.angle + c).fluct = 0 ∧ + ((2 : ℝ) • g.transverse.inner (U.slow v) + d).fluct = 0 ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, b.val p = 0) → + (∀ p ∈ O, c.val p = 0) → (∀ p ∈ O, d.val p = 0) → ∀ p ∈ O, U.val p = 0) := by + have hs (a : ℝ) (f : Family A ℝ) (p : A) : + average ((a • f.fluct).val p) = 0 := by + change average (fun t => a • f.fluct.val p t) = 0 + rw [average_const_smul, f.fluct_mean_zero, smul_zero] + obtain ⟨U, hU0, hY, hS, hX, hzero⟩ := g.exists_system + ((-1 : ℝ) • b.fluct) ((-1 / 2 : ℝ) • d.fluct) ((-1 : ℝ) • c.fluct) + (hs _ _) (hs _ _) (hs _ _) + refine ⟨U, hU0, ?_, ?_, ?_, ?_⟩ + · rw [Family.fluct_add, hY, Family.fluct_smul, Family.fluct_fluct] + module + · rw [Family.fluct_add, hX] + module + · rw [Family.fluct_add, Family.fluct_smul, hS, Family.fluct_smul, Family.fluct_fluct] + module + + · intro O hO hb hc hd + have hz (a : ℝ) (f : Family A ℝ) (hf : ∀ p ∈ O, f.val p = 0) : + ∀ p ∈ O, (a • f.fluct).val p = 0 := by + intro p hp + change a • f.fluct.val p = 0 + rw [f.fluct_zero_at (hf p hp), smul_zero] + exact hzero O hO (hz _ _ hb) (hz _ _ hd) (hz _ _ hc) + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilies.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8979abd7518413b048ffa310b18441e1ad9c5f2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilies.lean @@ -0,0 +1,167 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FullPeriodicCorrector + +namespace OAI + +/-! Smooth periodic families used in the finite metric expansion. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector SmoothPeriodicCalculus + +variable (A E : Type) [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +def smoothFamilies : Submodule ℝ (A → C(Period, E)) where + carrier := {F | ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))} + zero_mem' := by change ContDiff ℝ ∞ (fun _ : A × ℝ => (0 : E)); exact contDiff_const + add_mem' := by + intro F G hF hG + change ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period)) at hF + change ContDiff ℝ ∞ (fun z : A × ℝ => G z.1 (z.2 : Period)) at hG + change ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period) + G z.1 (z.2 : Period)) + exact hF.add hG + smul_mem' := by + intro c F hF + change ContDiff ℝ ∞ (fun z : A × ℝ => c • F z.1 (z.2 : Period)) + exact contDiff_const.smul hF + +def Family := ↥(smoothFamilies A E) + +instance : AddCommGroup (Family A E) := + inferInstanceAs (AddCommGroup ↥(smoothFamilies A E)) +instance : Module ℝ (Family A E) := + inferInstanceAs (Module ℝ ↥(smoothFamilies A E)) + +variable {A E} + +namespace Family + +def val (F : Family A E) : A → C(Period, E) := F.1 + +lemma smooth (F : Family A E) : + ContDiff ℝ ∞ (fun z : A × ℝ => F.val z.1 (z.2 : Period)) := F.2 + +@[ext] lemma ext {F G : Family A E} (h : ∀ p t, F.val p t = G.val p t) : F = G := by + apply Subtype.ext + funext p + exact ContinuousMap.ext (h p) + +@[simp] lemma zero_apply (p : A) (t : Period) : (0 : Family A E).val p t = 0 := rfl +@[simp] lemma add_apply (F G : Family A E) (p : A) (t : Period) : + (F + G).val p t = F.val p t + G.val p t := rfl +@[simp] lemma neg_apply (F : Family A E) (p : A) (t : Period) : + (-F).val p t = -F.val p t := rfl +@[simp] lemma sub_apply (F G : Family A E) (p : A) (t : Period) : + (F - G).val p t = F.val p t - G.val p t := rfl +@[simp] lemma smul_apply (c : ℝ) (F : Family A E) (p : A) (t : Period) : + (c • F).val p t = c • F.val p t := rfl + +@[simp] lemma sum_apply {ι : Type*} (s : Finset ι) (F : ι → Family A E) + (p : A) (t : Period) : (∑ i ∈ s, F i).val p t = ∑ i ∈ s, (F i).val p t := by + classical + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp [hi, ih] + +def slow (F : Family A E) (v : A) : Family A E := + ⟨slowDerivativeFamily F.val F.smooth v, slowDerivativeFamily_smooth F.val F.smooth v⟩ + +def angle (F : Family A E) : Family A E := + ⟨derivativeFamily F.val F.smooth, derivativeFamily_smooth F.val F.smooth⟩ + +@[simp] lemma slow_apply (F : Family A E) (v p : A) (t : ℝ) : + (F.slow v).val p (t : Period) = + slowDerivative (fun z : A × ℝ => F.val z.1 (z.2 : Period)) v (p, t) := rfl + +@[simp] lemma angle_apply (F : Family A E) (p : A) (t : ℝ) : + F.angle.val p (t : Period) = + angleDerivative (fun z : A × ℝ => F.val z.1 (z.2 : Period)) (p, t) := rfl + +variable [FiniteDimensional ℝ A] [CompleteSpace E] + +def primitive (F : Family A E) (hm : ∀ p, average (F.val p) = 0) : Family A E := + ⟨primitiveFamily F.val F.smooth hm, primitiveFamily_smooth F.val F.smooth hm⟩ + +lemma primitive_angle (F : Family A E) (hm : ∀ p, average (F.val p) = 0) : + (F.primitive hm).angle = F := by + apply Subtype.ext + exact derivativeFamily_primitiveFamily F.val F.smooth hm + +lemma primitive_mean_zero (F : Family A E) (hm : ∀ p, average (F.val p) = 0) (p : A) : + average ((F.primitive hm).val p) = 0 := primitiveFamily_mean_zero F.val F.smooth hm p + +omit [CompleteSpace E] in +lemma slow_mean_zero (F : Family A E) (hm : ∀ p, average (F.val p) = 0) (v p : A) : + average ((F.slow v).val p) = 0 := slowDerivativeFamily_mean_zero F.val F.smooth hm v p + +def inner (F G : Family A E) : Family A ℝ := + ⟨fun p => ⟨fun t => Inner.inner ℝ (F.val p t) (G.val p t), + (F.val p).continuous.inner (G.val p).continuous⟩, F.smooth.inner ℝ G.smooth⟩ + +omit [FiniteDimensional ℝ A] [CompleteSpace E] in +@[simp] lemma inner_apply (F G : Family A E) (p : A) (t : Period) : + (F.inner G).val p t = Inner.inner ℝ (F.val p t) (G.val p t) := rfl + +end Family + +namespace Family + +def constant (f : A → E) (hf : ContDiff ℝ ∞ f) : Family A E := + ⟨fun p => ContinuousMap.const Period (f p), hf.comp contDiff_fst⟩ + +@[simp] lemma constant_apply (f : A → E) (hf : ContDiff ℝ ∞ f) (p : A) (t : Period) : + (constant f hf).val p t = f p := rfl + +variable [FiniteDimensional ℝ A] + +def mean (F : Family A ℝ) : Family A ℝ := + constant (fun p => average (F.val p)) (contDiff_average_joint F.smooth) + +def fluct (F : Family A ℝ) : Family A ℝ := F - F.mean + +@[simp] lemma mean_apply (F : Family A ℝ) (p : A) (t : Period) : + F.mean.val p t = average (F.val p) := rfl + +@[simp] lemma fluct_apply (F : Family A ℝ) (p : A) (t : Period) : + F.fluct.val p t = fluctuation (F.val p) t := rfl + +lemma fluct_mean_zero (F : Family A ℝ) (p : A) : average (F.fluct.val p) = 0 := + PeriodicCorrector.average_fluctuation (F.val p).continuous + +lemma fluct_eq_zero_iff (F : Family A ℝ) : F.fluct = 0 ↔ F = F.mean := by + exact sub_eq_zero + +lemma mean_add (F G : Family A ℝ) : (F + G).mean = F.mean + G.mean := by + ext p t + exact average_add (F.val p).continuous (G.val p).continuous + +lemma mean_smul (c : ℝ) (F : Family A ℝ) : (c • F).mean = c • F.mean := by + ext p t + exact average_const_smul c (F.val p) + +lemma mean_mean (F : Family A ℝ) : F.mean.mean = F.mean := by + ext p t + exact average_const _ + +lemma fluct_add (F G : Family A ℝ) : (F + G).fluct = F.fluct + G.fluct := by + simp only [fluct, mean_add] + abel + +lemma fluct_smul (c : ℝ) (F : Family A ℝ) : (c • F).fluct = c • F.fluct := by + simp only [fluct, mean_smul, smul_sub] + +lemma fluct_fluct (F : Family A ℝ) : F.fluct.fluct = F.fluct := by + have hm : F.fluct.mean = 0 := by + ext p t + exact F.fluct_mean_zero p + rw [fluct, hm, sub_zero] + +end Family +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilySupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilySupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..c79d6e895296bcf97e670fa14159167292789dd3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFamilySupport.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFamilies + +namespace OAI + +/-! Local vanishing of smooth periodic coefficient families. -/ + +noncomputable section + +namespace ClosedSurfaceR4.PeriodicExpansion.Family + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma angle_zero_at (F : Family A E) {p : A} (hp : F.val p = 0) : F.angle.val p = 0 := + derivativeFamily_zero_at F.val F.smooth hp + +lemma slow_zero_on (F : Family A E) {O : Set A} (hO : IsOpen O) + (hz : ∀ p ∈ O, F.val p = 0) (v : A) {p : A} (hp : p ∈ O) : + (F.slow v).val p = 0 := slowDerivativeFamily_zero_on F.val F.smooth hO hz v hp + +variable [FiniteDimensional ℝ A] + +lemma fluct_zero_at (F : Family A ℝ) {p : A} (hp : F.val p = 0) : F.fluct.val p = 0 := by + ext t + change F.val p t - average (F.val p) = 0 + rw [hp] + change (0 : ℝ) - average (fun _ => (0 : ℝ)) = 0 + rw [average_const, sub_self] + +end ClosedSurfaceR4.PeriodicExpansion.Family + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFastEvaluation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFastEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d3d7711fc3ee2b404e15f10b6525eb63eebc618 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFastEvaluation.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFamilies + +namespace OAI + +/-! Chain rule for substituting a fast linear phase in a smooth periodic family. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +namespace Family + +def fastValue (U : Family A E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) (p : A) : E := + U.val p ((ℓ p / z : ℝ) : Period) + +lemma fastValue_smooth (U : Family A E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) : + ContDiff ℝ ∞ (U.fastValue ℓ z) := + U.smooth.comp (contDiff_id.prodMk (ℓ.contDiff.div_const z)) + +/-- Both slow and angular terms in the derivative of fast evaluation. -/ +lemma fastValue_fderiv (U : Family A E) (ℓ : A →L[ℝ] ℝ) (z : ℝ) (p v : A) : + fderiv ℝ (U.fastValue ℓ z) p v = + (U.slow v).val p ((ℓ p / z : ℝ) : Period) + + (ℓ v / z) • U.angle.val p ((ℓ p / z : ℝ) : Period) := by + let T : A →L[ℝ] A × ℝ := (ContinuousLinearMap.id ℝ A).prod (z⁻¹ • ℓ) + have hT (p : A) : T p = (p, ℓ p / z) := by + simp [T, div_eq_mul_inv, mul_comm] + have hEq : U.fastValue ℓ z = + (fun w : A × ℝ => U.val w.1 (w.2 : Period)) ∘ T := by + funext p + simp only [Function.comp_apply, hT, fastValue] + rw [hEq, fderiv_comp p (U.smooth.differentiable (by simp) (T p)) T.differentiableAt] + simp only [ContinuousLinearMap.fderiv, ContinuousLinearMap.comp_apply, hT] + change fderiv ℝ (fun w : A × ℝ => U.val w.1 (w.2 : Period)) (p, ℓ p / z) (v, ℓ v / z) = _ + have hv : (v, ℓ v / z) = (v, 0) + (ℓ v / z) • ((0 : A), (1 : ℝ)) := by + simp + rw [hv, map_add, map_smul] + rfl + +end Family +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteAnsatz.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteAnsatz.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb66e902fdc38c873e284fa52cf5283394126744 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteAnsatz.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFastEvaluation + +namespace OAI + +/-! The finite oscillatory map and its actual first derivatives. -/ + +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +def finiteAnsatz (F : A → E) (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) + (L : ℕ) (z : ℝ) (p : A) : E := + F p + ∑ i ∈ Finset.range L, z ^ (i + 1) • (U i).fastValue ℓ z p + +lemma finiteAnsatz_smooth {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + ContDiff ℝ ∞ (finiteAnsatz F U ℓ L z) := + hF.add (ContDiff.sum fun i _ => contDiff_const.smul ((U i).fastValue_smooth ℓ z)) + +lemma finiteAnsatz_fderiv {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) (p v : A) : + fderiv ℝ (finiteAnsatz F U ℓ L z) p v = fderiv ℝ F p v + + ∑ i ∈ Finset.range L, z ^ (i + 1) • + (((U i).slow v).val p ((ℓ p / z : ℝ) : Period) + + (ℓ v / z) • (U i).angle.val p ((ℓ p / z : ℝ) : Period)) := by + have hd (i : ℕ) : DifferentiableAt ℝ ((U i).fastValue ℓ z) p := + ((U i).fastValue_smooth ℓ z).differentiable (by simp) p + have hterm (i : ℕ) : DifferentiableAt ℝ + (fun q => z ^ (i + 1) • (U i).fastValue ℓ z q) p := (hd i).const_smul _ + have hsum : DifferentiableAt ℝ + (fun q => ∑ i ∈ Finset.range L, z ^ (i + 1) • (U i).fastValue ℓ z q) p := + DifferentiableAt.fun_sum (fun i _ => hterm i) + unfold finiteAnsatz + rw [fderiv_fun_add (hF.differentiable (by simp) p) hsum] + rw [fderiv_fun_sum (fun i _ => hterm i)] + simp only [add_apply, sum_apply] + congr 1 + apply Finset.sum_congr rfl + intro i hi + rw [fderiv_fun_const_smul (hd i), smul_apply, + Family.fastValue_fderiv] + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteMetricIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteMetricIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..07c90741f38da63a6520542820a03cb2d7f53cee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicFiniteMetricIdentity.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicAnsatzMetric +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicMetricRemainder + +namespace OAI + +/-! Exact finite metric expansion of the actual oscillatory map. -/ + +noncomputable section +open scoped BigOperators ContDiff + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma polynomial_zero_coefficients (dx : A) (U : ℕ → Family A E) (L : ℕ) + (p : A) (t : Period) : + (g.xxRemainder dx U L 0).val p t = inner ℝ (g.X₀ p) (g.X₀ p) + g.q p ∧ + (g.xyRemainder dx U L 0).val p t = inner ℝ (g.X₀ p) (g.Y p) ∧ + (g.yyRemainder U L 0).val p t = inner ℝ (g.Y p) (g.Y p) := by + have hp := g.perpX₀ p _ (g.V_mem p t) + have hy := g.perpY p _ (g.V_mem p t) + have hp' : inner ℝ (g.V.val p t) (g.X₀ p) = 0 := by + rw [real_inner_comm] + exact hp + have hy' : inner ℝ (g.V.val p t) (g.Y p) = 0 := by + rw [real_inner_comm] + exact hy + simp only [xxRemainder, xyRemainder, yyRemainder, metricCoefficientFamily_apply, + metricPolynomial_coeff (Nat.zero_le L), Finset.sum_range_one, Nat.sub_zero, + xTangent_zero, yTangent_zero, longitudinal, transverse, Family.add_apply, + Family.constant_apply, inner_add_left, inner_add_right, hp, hp', hy', g.circle p t, add_zero, + zero_add] + trivial + +omit [FiniteDimensional ℝ E] in +/-- The exact metric identity, before replacing low coefficients by their means. -/ +theorem finite_metric_identity {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (hinit : U 0 = g.initial) + (ℓ : A →L[ℝ] ℝ) (dx : A) (hℓx : ℓ dx = 1) (hℓy : ℓ dy = 0) + (hX : ∀ p, fderiv ℝ F p dx = g.X₀ p + average (g.V.val p)) + (hY : ∀ p, fderiv ℝ F p dy = g.Y p) + (n : ℕ) (z : ℝ) (hz : z ≠ 0) (p : A) : + let f := finiteAnsatz F U ℓ (n + 1) z + let t : Period := ((ℓ p / z : ℝ) : Period) + let L := n + 1 + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx) = + (∑ r ∈ Finset.range L, (g.xxRemainder dx U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.xxRemainder dx U L r).val p t * z ^ r ∧ + inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy) = + (∑ r ∈ Finset.range L, (g.xyRemainder dx U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.xyRemainder dx U L r).val p t * z ^ r ∧ + inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy) = + (∑ r ∈ Finset.range L, (g.yyRemainder U L r).val p t * z ^ r) + + ∑ r ∈ Finset.Ico L (2 * L + 1), (g.yyRemainder U L r).val p t * z ^ r := by + dsimp only + rw [g.finiteAnsatz_x hF U hinit ℓ dx hℓx hX n z hz p, + g.finiteAnsatz_y hF U ℓ hℓy hY (n + 1) z p] + simp only [xxRemainder, xyRemainder, yyRemainder, metricCoefficientFamily_apply] + exact ⟨metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z, + metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z, + metricPolynomial_expansion (n + 1) (n + 1) (by omega) _ _ z⟩ + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicIntegralOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicIntegralOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3f2ca5b693094188d072f534bdf8415485cf618 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicIntegralOperator.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Geometry.CovarianceParameter + +namespace OAI + +/-! Bounded linear operators underlying normalized periodic integration. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicIntegralOperator + +open CovarianceCorrector PeriodicPrimitive + +variable {E P : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + [NormedAddCommGroup P] [NormedSpace ℝ P] + +omit [NormedSpace ℝ E] [CompleteSpace E] in +lemma continuous_lift (f : C(Period, E)) : + Continuous (fun x : ℝ => f (x : Period)) := + f.continuous.comp (AddCircle.continuous_mk' 1) + +/-- Integration from zero to a fixed real time is bounded on the space of +continuous periodic functions, even when that time is outside one period. -/ +def rawIntegral (x : ℝ) : C(Period, E) →L[ℝ] E := + ({ toFun := fun f => ∫ t in 0..x, f (t : Period) + map_add' := fun f g => intervalIntegral.integral_add + ((continuous_lift f).intervalIntegrable 0 x) + ((continuous_lift g).intervalIntegrable 0 x) + map_smul' := fun a f => intervalIntegral.integral_smul a _ } : + C(Period, E) →ₗ[ℝ] E).mkContinuous |x| (by + intro f + have hn := intervalIntegral.norm_integral_le_of_norm_le_const + (a := 0) (b := x) (fun t _ => f.norm_coe_le_norm (t : Period)) + change ‖∫ t in 0..x, f (t : Period)‖ ≤ |x| * ‖f‖ + simpa only [sub_zero, mul_comm] using hn) + +omit [CompleteSpace E] in +@[simp] lemma rawIntegral_apply (x : ℝ) (f : C(Period, E)) : + rawIntegral x f = rawPrimitive (fun t : ℝ => f (t : Period)) x := rfl + +lemma rawIntegral_continuous (f : C(Period, E)) : + Continuous (fun t => rawIntegral t f) := + rawPrimitive_continuous (continuous_lift f) + +omit [CompleteSpace E] in +lemma rawIntegral_norm_unit (f : C(Period, E)) {x : ℝ} (hx : x ∈ Set.Icc 0 1) : + ‖rawIntegral x f‖ ≤ ‖f‖ := by + have hn := intervalIntegral.norm_integral_le_of_norm_le_const + (a := 0) (b := x) (fun t _ => f.norm_coe_le_norm (t : Period)) + change ‖∫ t in 0..x, f (t : Period)‖ ≤ _ + rw [sub_zero, abs_of_nonneg hx.1] at hn + exact hn.trans (mul_le_of_le_one_right (norm_nonneg f) hx.2) + +/-- The mean of the unnormalized primitive is also a bounded linear map. -/ +def primitiveMean : C(Period, E) →L[ℝ] E := + ({ toFun := fun f => ∫ t in 0..1, rawIntegral t f + map_add' := by + intro f g + simp only [map_add] + exact intervalIntegral.integral_add + ((rawIntegral_continuous f).intervalIntegrable 0 1) + ((rawIntegral_continuous g).intervalIntegrable 0 1) + map_smul' := by + intro a f + simp only [map_smul] + exact intervalIntegral.integral_smul a _ } : C(Period, E) →ₗ[ℝ] E).mkContinuous 1 (by + intro f + have hn := intervalIntegral.norm_integral_le_of_norm_le_const + (a := 0) (b := 1) (fun t ht => rawIntegral_norm_unit f (by + rw [Set.uIoc_of_le (by norm_num : (0 : ℝ) ≤ 1)] at ht + exact ⟨ht.1.le, ht.2⟩)) + simpa using hn) + +/-- The normalized primitive at a fixed time, with its linear dependence on +all periodic input data made explicit. -/ +def normalizedIntegral (x : ℝ) : C(Period, E) →L[ℝ] E := + rawIntegral x - primitiveMean + +@[simp] lemma normalizedIntegral_apply (x : ℝ) (f : C(Period, E)) : + normalizedIntegral x f = primitive (fun t : ℝ => f (t : Period)) x := rfl + +lemma normalizedIntegral_norm_unit (f : C(Period, E)) {x : ℝ} (hx : x ∈ Set.Icc 0 1) : + ‖normalizedIntegral x f‖ ≤ 2 * ‖f‖ := by + calc + _ ≤ ‖rawIntegral x f‖ + ‖primitiveMean f‖ := norm_sub_le _ _ + _ ≤ ‖f‖ + ‖f‖ := add_le_add (rawIntegral_norm_unit f hx) (by + have hm := (primitiveMean (E := E)).le_opNorm f + have hb : ‖primitiveMean (E := E)‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro g + exact intervalIntegral.norm_integral_le_of_norm_le_const + (fun t ht => rawIntegral_norm_unit g (by + rw [Set.uIoc_of_le (by norm_num : (0 : ℝ) ≤ 1)] at ht + exact ⟨ht.1.le, ht.2⟩)) |>.trans_eq (by simp) + simpa using hm.trans (mul_le_mul_of_nonneg_right hb (norm_nonneg f))) + _ = _ := by ring + +/-- Smooth dependence on an external parameter follows from the proved +bounded linear operator, with no parameter-differentiation assumption. -/ +theorem contDiff_normalizedIntegral {F : P → C(Period, E)} + (hF : ContDiff ℝ ∞ F) (x : ℝ) : + ContDiff ℝ ∞ (fun p => normalizedIntegral x (F p)) := + (normalizedIntegral (E := E) x).contDiff.comp hF + +theorem normalizedIntegral_fderiv {F : P → C(Period, E)} {p : P} + (hF : DifferentiableAt ℝ F p) (x : ℝ) : + fderiv ℝ (fun q => normalizedIntegral x (F q)) p = + (normalizedIntegral x).comp (fderiv ℝ F p) := + ((normalizedIntegral (E := E) x).hasFDerivAt.comp p hF.hasFDerivAt).fderiv + +end ClosedSurfaceR4.PeriodicIntegralOperator + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicLocalizedBump.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicLocalizedBump.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3ef807c411df12e68b9d58099066420b0777e26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicLocalizedBump.lean @@ -0,0 +1,88 @@ +import Mathlib + +namespace OAI + +/-! Smooth positive-mass bumps on the unit circle, localized inside one period. -/ +noncomputable section +open Set Metric MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +def circleBump (φ : ContDiffBump (0 : ℝ)) (c t : ℝ) : ℝ := + φ (Real.sin (Real.pi * (t - c))) + +lemma circleBump_smooth (φ : ContDiffBump (0 : ℝ)) (c : ℝ) : + ContDiff ℝ ∞ (circleBump φ c) := + φ.contDiff.comp ((contDiff_const.mul (contDiff_id.sub contDiff_const)).sin) + +lemma circleBump_periodic (φ : ContDiffBump (0 : ℝ)) (c : ℝ) : + Function.Periodic (circleBump φ c) 1 := by + intro t + unfold circleBump + rw [show Real.pi * (t + 1 - c) = Real.pi * (t - c) + Real.pi by ring] + rw [Real.sin_add_pi, φ.neg] + +lemma circleBump_at_center (φ : ContDiffBump (0 : ℝ)) (c : ℝ) : circleBump φ c c = 1 := by + simp only [circleBump, sub_self, mul_zero, Real.sin_zero] + exact φ.one_of_mem_closedBall (mem_closedBall_self φ.rIn_pos.le) + +private lemma sine_nonzero {c t : ℝ} (hc : c ∈ Ioo (0 : ℝ) 1) + (ht : t ∈ Icc (0 : ℝ) 1) (hne : t ≠ c) : Real.sin (Real.pi * (t - c)) ≠ 0 := by + rw [ne_eq, Real.sin_eq_zero_iff_of_lt_of_lt] + · exact mul_ne_zero Real.pi_ne_zero (sub_ne_zero.mpr hne) + · have h : -1 < t - c := by linarith [hc.2, ht.1] + simpa using mul_lt_mul_of_pos_left h Real.pi_pos + · have h : t - c < 1 := by linarith [hc.1, ht.2] + simpa using mul_lt_mul_of_pos_left h Real.pi_pos + +/-- An actual smooth periodic nonnegative density of mass one supported in any +prescribed neighborhood of an interior point of the fundamental interval. -/ +theorem exists_localized_bump {c : ℝ} (hc : c ∈ Ioo (0 : ℝ) 1) + {V : Set ℝ} (hV : IsOpen V) (hcV : c ∈ V) : + ∃ ψ : ℝ → ℝ, ContDiff ℝ ∞ ψ ∧ Function.Periodic ψ 1 ∧ + (∀ t, 0 ≤ ψ t) ∧ (∫ t in 0..1, ψ t) = 1 ∧ + ∀ t ∈ Icc (0 : ℝ) 1, t ∉ V → ψ t = 0 := by + let K := Icc (0 : ℝ) 1 \ V + have hK : IsCompact K := isCompact_Icc.diff hV + have hf : Continuous (fun t : ℝ => |Real.sin (Real.pi * (t - c))|) := by fun_prop + have hr : ∃ r : ℝ, 0 < r ∧ ∀ t ∈ K, r ≤ |Real.sin (Real.pi * (t - c))| := by + by_cases hne : K.Nonempty + · obtain ⟨t, ht, hmin⟩ := hK.exists_isMinOn hne hf.continuousOn + refine ⟨|Real.sin (Real.pi * (t - c))|, abs_pos.mpr ?_, hmin⟩ + apply sine_nonzero hc ht.1 + intro heq + exact ht.2 (heq ▸ hcV) + · exact ⟨1, zero_lt_one, fun t ht => (hne ⟨t, ht⟩).elim⟩ + obtain ⟨r, hr, hbound⟩ := hr + let φ : ContDiffBump (0 : ℝ) := ⟨r / 4, r / 2, by positivity, by linarith⟩ + let f := circleBump φ c + have hfs : ContDiff ℝ ∞ f := circleBump_smooth φ c + have hfn (t : ℝ) : 0 ≤ f t := φ.nonneg + have hfc : f c = 1 := circleBump_at_center φ c + have hfi : 0 < ∫ t in 0..1, f t := + intervalIntegral.integral_pos zero_lt_one hfs.continuous.continuousOn + (fun t _ => hfn t) ⟨c, ⟨hc.1.le, hc.2.le⟩, by rw [hfc]; norm_num⟩ + let ψ : ℝ → ℝ := fun t => f t / ∫ s in 0..1, f s + refine ⟨ψ, hfs.div_const _, ?_, ?_, ?_, ?_⟩ + · intro t + change f (t + 1) / _ = f t / _ + exact congrArg (fun x : ℝ => x / ∫ s in 0..1, f s) (circleBump_periodic φ c t) + · intro t + exact div_nonneg (hfn t) hfi.le + · change (∫ t in 0..1, f t / _) = 1 + rw [intervalIntegral.integral_div, div_self hfi.ne'] + · intro t ht htV + have hz : f t = 0 := by + apply φ.zero_of_le_dist + change r / 2 ≤ dist (Real.sin (Real.pi * (t - c))) 0 + rw [Real.dist_eq, sub_zero] + exact (by linarith : r / 2 ≤ r).trans (hbound t ⟨ht, htV⟩) + change f t / _ = 0 + rw [hz, zero_div] + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ceb82841c6ef71c7c1d9c3cd4f1ba9a18063b7f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoefficients.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicExpansionStep + +namespace OAI + +/-! Coefficients of the pullback metric of the finite periodic ansatz. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Family + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma inner_add_left (F G H : Family A E) : (F + G).inner H = F.inner H + G.inner H := by + ext p t + simp only [inner_apply, add_apply, _root_.inner_add_left] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma inner_add_right (F G H : Family A E) : F.inner (G + H) = F.inner G + F.inner H := by + ext p t + simp only [inner_apply, add_apply, _root_.inner_add_right] + +end Family + +/-- The coefficient A_i=U_{i,x}+U_{i+1,theta}; index zero stores U_1. -/ +def xCoefficient (dx : A) (U : ℕ → Family A E) (i : ℕ) : Family A E := + (U (i - 1)).slow dx + (U i).angle + +/-- The coefficient B_i=U_{i,y}; index zero stores U_1. -/ +def yCoefficient (dy : A) (U : ℕ → Family A E) (i : ℕ) : Family A E := + (U (i - 1)).slow dy + +def xxQuadratic (dx : A) (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + ∑ i ∈ Finset.Ico 1 r, (xCoefficient dx U i).inner (xCoefficient dx U (r - i)) + +def xyQuadratic (dx dy : A) (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + ∑ i ∈ Finset.Ico 1 r, (xCoefficient dx U i).inner (yCoefficient dy U (r - i)) + +def yyQuadratic (dy : A) (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + ∑ i ∈ Finset.Ico 1 r, (yCoefficient dy U i).inner (yCoefficient dy U (r - i)) + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +def xxCoefficient (dx : A) (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + (2 : ℝ) • g.longitudinal.inner (xCoefficient dx U r) + xxQuadratic dx U r + +def xyCoefficient (dx : A) (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + g.longitudinal.inner (yCoefficient dy U r) + + g.transverse.inner (xCoefficient dx U r) + xyQuadratic dx dy U r + +def yyCoefficient (U : ℕ → Family A E) (r : ℕ) : Family A ℝ := + (2 : ℝ) • g.transverse.inner (yCoefficient dy U r) + yyQuadratic dy U r + +end Geometry + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xCoefficient_congr {dx : A} {U W : ℕ → Family A E} {i : ℕ} + (h₁ : U (i - 1) = W (i - 1)) (h₂ : U i = W i) : + xCoefficient dx U i = xCoefficient dx W i := by + simp only [xCoefficient, h₁, h₂] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yCoefficient_congr {dy : A} {U W : ℕ → Family A E} {i : ℕ} + (h : U (i - 1) = W (i - 1)) : yCoefficient dy U i = yCoefficient dy W i := by + simp only [yCoefficient, h] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxQuadratic_congr {dx : A} {U W : ℕ → Family A E} {r : ℕ} + (h : ∀ i < r, U i = W i) : xxQuadratic dx U r = xxQuadratic dx W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [xCoefficient_congr (h _ (by omega)) (h _ hir), + xCoefficient_congr (h _ (by omega)) (h _ (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyQuadratic_congr {dx dy : A} {U W : ℕ → Family A E} {r : ℕ} + (h : ∀ i < r, U i = W i) : xyQuadratic dx dy U r = xyQuadratic dx dy W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [xCoefficient_congr (h _ (by omega)) (h _ hir), + yCoefficient_congr (h _ (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyQuadratic_congr {dy : A} {U W : ℕ → Family A E} {r : ℕ} + (h : ∀ i < r - 1, U i = W i) : yyQuadratic dy U r = yyQuadratic dy W r := by + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [yCoefficient_congr (h _ (by omega)), yCoefficient_congr (h _ (by omega))] + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..310348d3c18d689c40d0ab660a56c8ee317a2522 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricCoordinates.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasMetric +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanTensor + +namespace OAI + +/-! Exact identification of the three coordinate metric entries of a +Euclidean periodic map in the primitive's product coordinates. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open JetPolynomial JetPolynomial.Perturbation SmallModes + +lemma metric_coordinate_pair {f : JetPolynomial.Base → ClosedSurfaceR4.Space} + (hf : ContDiff ℝ ∞ f) (p : JetPolynomial.Base) (b c : Bool) : + RealModes.realMetric (spaceCoordinates ∘ f ∘ planeCoordinateIsometry.symm) + (if b then dx else dy) (if c then dx else dy) (planeCoordinateIsometry p) = + inner ℝ + (fderiv ℝ f p (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ f p (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) := by + have he := euclidean_metric_coordinate_value (f ∘ planeCoordinateIsometry.symm) + ((hf.comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) (planeCoordinateIsometry p)) + (if b then dx else dy) (if c then dx else dy) + rw [RealModes.evaluate_realMetricTensor] at he + have hd (v : SmallModes.Base) : + fderiv ℝ (f ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry p) v = + fderiv ℝ f p (planeCoordinateIsometry.symm v) := by + rw [fderiv_comp _ (hf.differentiable (by simp) _) + planeCoordinateIsometry.symm.differentiableAt] + simp only [ContinuousLinearMap.comp_apply,planeCoordinateIsometry.symm_apply_apply] + change (fderiv ℝ f p) + ((fderiv ℝ planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap + (planeCoordinateIsometry p)) v) = _ + rw [planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap.fderiv] + rfl + have hdir (d : Bool) : planeCoordinateIsometry.symm (if d then dx else dy) = + MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) d := by + cases d <;> ext i <;> fin_cases i <;> rfl + simpa only [Function.comp_assoc,hd,hdir] using he + +lemma metric_coordinate_tensor {f : JetPolynomial.Base → ClosedSurfaceR4.Space} + (hf : ContDiff ℝ ∞ f) (p : JetPolynomial.Base) : + RealModes.realMetricTensor (spaceCoordinates ∘ f ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry p) = + ![inner ℝ (fderiv ℝ f p (coordinateVector 0)) (fderiv ℝ f p (coordinateVector 0)), + inner ℝ (fderiv ℝ f p (coordinateVector 0)) (fderiv ℝ f p (coordinateVector 1)), + inner ℝ (fderiv ℝ f p (coordinateVector 1)) (fderiv ℝ f p (coordinateVector 1))] := by + ext k + fin_cases k + · exact metric_coordinate_pair hf p true true + · exact metric_coordinate_pair hf p true false + · exact metric_coordinate_pair hf p false false + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..a246052f5675bab38b06c0bdd0d1d6ed9890d3fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicMetricRemainder.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicPolynomialExpansion + +namespace OAI + +/-! Smooth coefficient families and exact remainder of the finite metric expansion. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +def metricCoefficientFamily (n r : ℕ) (a b : ℕ → Family A E) : Family A ℝ := + ∑ i ∈ Finset.range (n + 1), ∑ j ∈ Finset.range (n + 1), + if i + j = r then (a i).inner (b j) else 0 + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma metricCoefficientFamily_apply (n r : ℕ) (a b : ℕ → Family A E) (p : A) (t : Period) : + (metricCoefficientFamily n r a b).val p t = + (metricPolynomial n (fun i => (a i).val p t) (fun i => (b i).val p t)).coeff r := by + simp only [metricCoefficientFamily, Family.sum_apply, metricPolynomial, Polynomial.finsetSum_coeff] + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + split_ifs with h + · simp only [h, Family.inner_apply, Polynomial.coeff_monomial_same] + · simp only [Polynomial.coeff_monomial, h, ite_false, Family.zero_apply] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +def xxRemainder (dx : A) (U : ℕ → Family A E) (L r : ℕ) : Family A ℝ := + metricCoefficientFamily L r (g.xTangent dx U L) (g.xTangent dx U L) + +def xyRemainder (dx : A) (U : ℕ → Family A E) (L r : ℕ) : Family A ℝ := + metricCoefficientFamily L r (g.xTangent dx U L) (g.yTangent U) + +def yyRemainder (U : ℕ → Family A E) (L r : ℕ) : Family A ℝ := + metricCoefficientFamily L r (g.yTangent U) (g.yTangent U) + +/-- Every finite construction has jointly smooth remainder coefficients. +The prescribed lower coefficients are independent of the fast angle. -/ +theorem exists_angle_independent_coefficients (dx : A) (L : ℕ) : + ∃ U : ℕ → Family A E, + U 0 = g.initial ∧ (∀ i p, average ((U i).val p) = 0) ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, g.initial.val p = 0) → + ∀ i p, p ∈ O → (U i).val p = 0) ∧ + ∀ r, 0 < r → r < L → ∀ p t, + (g.xxRemainder dx U L r).val p t = average ((g.xxCoefficient dx U r).val p) ∧ + (g.xyRemainder dx U L r).val p t = average ((g.xyCoefficient dx U r).val p) ∧ + (g.yyRemainder U L r).val p t = average ((g.yyCoefficient U r).val p) := by + obtain ⟨U, hinit, hU, hy₁, hsupport, hcoeff⟩ := g.exists_coefficients dx L + refine ⟨U, hinit, hU, hsupport, ?_⟩ + intro r hr hL p t + obtain ⟨hx, hxy, _⟩ := hcoeff r hr (by omega) + have hy : (g.yyCoefficient U r).fluct = 0 := by + by_cases he : r = 1 + · simpa only [he] using hy₁ + · have hprev := (hcoeff (r - 1) (by omega) (by omega)).2.2 + simpa only [Nat.sub_add_cancel (by omega : 1 ≤ r)] using hprev + have mean_eq (f : Family A ℝ) (hf : f.fluct = 0) : f.val p t = average (f.val p) := by + have ht := congrArg (fun w : Family A ℝ => w.val p t) hf + change f.val p t - average (f.val p) = 0 at ht + exact sub_eq_zero.mp ht + change (metricCoefficientFamily L r _ _).val p t = _ ∧ + (metricCoefficientFamily L r _ _).val p t = _ ∧ + (metricCoefficientFamily L r _ _).val p t = _ + simp only [metricCoefficientFamily_apply] + exact ⟨(g.xxPolynomial_coeff dx U hr hL p t).trans (mean_eq _ hx), + (g.xyPolynomial_coeff dx U hr hL p t).trans (mean_eq _ hxy), + (g.yyPolynomial_coeff U hr (by omega) p t).trans (mean_eq _ hy)⟩ + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicNormalStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicNormalStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..966d16c50b9024b9d36130996f87d2f63cf352da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicNormalStability.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactNormalTriple +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFamilies + +namespace OAI + +/-! Uniform normal margins over the compact position-period domain. -/ +noncomputable section +open Set +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes CovarianceCorrector + +variable {A : Type} [TopologicalSpace A] + +/-- A full real fast phase costs no compactness: periodicity reduces the +normal estimate to one compact period. -/ +theorem periodic_leading_normal_stability {K : Set A} (hK : IsCompact K) + {X Y C : A → Vec} (hX : Continuous X) (hY : Continuous Y) (hC : Continuous C) + (V : A → C(Period, Vec)) + (hVs : Continuous (fun p : A × ℝ => V p.1 (p.2 : Period))) + (hD : ∀ p ∈ K, gramDet (Y p) (C p) ≠ 0) + (hYV : ∀ p ∈ K, ∀ θ : Period, Y p ⬝ᵥ V p θ = 0) + (hCV : ∀ p ∈ K, ∀ θ : Period, C p ⬝ᵥ V p θ = 0) + (hV0 : ∀ p ∈ K, ∀ θ : Period, V p θ ≠ 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ p ∈ K, ∀ t : ℝ, ∀ H : NormalTriple, + ‖H-![leadingTangent (X p) (Y p) (C p) (V p (t : Period)),Y p,C p]‖ < ε → + gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖realNormalPart (H 0) (H 1) (H 2)‖ := by + obtain ⟨ε,c,hε,hc,hh⟩ := compact_leading_normal_stability + (hK.prod (isCompact_Icc : IsCompact (Icc (0 : ℝ) 1))) + (hX.comp continuous_fst).continuousOn (hY.comp continuous_fst).continuousOn + (hC.comp continuous_fst).continuousOn hVs.continuousOn + (fun p hp => hD p.1 hp.1) (fun p hp => hYV p.1 hp.1 (p.2 : Period)) + (fun p hp => hCV p.1 hp.1 (p.2 : Period)) + (fun p hp => hV0 p.1 hp.1 (p.2 : Period)) + refine ⟨ε,c,hε,hc,?_⟩ + intro p hp t H hH + let a : ℝ := AddCircle.equivIco 1 0 (t : Period) + have ha : a ∈ Ico (0 : ℝ) 1 := by + simpa only [zero_add] using (AddCircle.equivIco 1 0 (t : Period)).property + have he : (a : Period) = (t : Period) := AddCircle.coe_equivIco + apply hh (p,a) ⟨hp,ha.1,ha.2.le⟩ H + simpa only [he,Function.comp_apply] using hH + +/-- Componentwise `O(z)` errors in x, y and yy preserve a uniform normal +margin for all sufficiently small fast scales. -/ +theorem periodic_normal_stability_of_linear_error {K : Set A} (hK : IsCompact K) + {X Y C : A → Vec} (hX : Continuous X) (hY : Continuous Y) (hC : Continuous C) + (V : A → C(Period, Vec)) + (hVs : Continuous (fun p : A × ℝ => V p.1 (p.2 : Period))) + (hD : ∀ p ∈ K, gramDet (Y p) (C p) ≠ 0) + (hYV : ∀ p ∈ K, ∀ θ : Period, Y p ⬝ᵥ V p θ = 0) + (hCV : ∀ p ∈ K, ∀ θ : Period, C p ⬝ᵥ V p θ = 0) + (hV0 : ∀ p ∈ K, ∀ θ : Period, V p θ ≠ 0) + (D : ℝ) (hD0 : 0 ≤ D) : + ∃ η c : ℝ, 0 < η ∧ 0 < c ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ p ∈ K, ∀ t : ℝ, ∀ x y b : Vec, + ‖x-leadingTangent (X p) (Y p) (C p) (V p (t : Period))‖ ≤ D*z → + ‖y-Y p‖ ≤ D*z → ‖b-C p‖ ≤ D*z → + gramDet x y ≠ 0 ∧ c < ‖realNormalPart x y b‖ := by + obtain ⟨ε,c,hε,hc,hh⟩ := periodic_leading_normal_stability hK hX hY hC V hVs hD hYV hCV hV0 + refine ⟨ε/(D+1),c,div_pos hε (by linarith),hc,?_⟩ + intro z hz hzη p hp t x y b hx hy hb + have hsmall : D*z < ε := by + have hh := (lt_div_iff₀ (show 0 < D+1 by linarith)).mp hzη + nlinarith + apply hh p hp t ![x,y,b] + apply lt_of_le_of_lt _ hsmall + apply (pi_norm_le_iff_of_nonneg (mul_nonneg hD0 hz.le)).mpr + intro i + fin_cases i + · exact hx + · exact hy + · exact hb + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..280409c898c9326805acae7eaf73b6e45797b596 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicPrimitive.lean @@ -0,0 +1,112 @@ +import Mathlib + +namespace OAI + +/-! +The normalized periodic antiderivative used by the finite periodic expansion. +The primitive is constructed by integration, followed by subtraction of its +mean. The period is one, matching `UnitAddCircle`. +-/ + +noncomputable section + +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicPrimitive + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +def rawPrimitive (f : ℝ → E) (x : ℝ) : E := ∫ t in 0..x, f t + +def primitive (f : ℝ → E) (x : ℝ) : E := + rawPrimitive f x - ∫ t in 0..1, rawPrimitive f t + +theorem rawPrimitive_hasDerivAt {f : ℝ → E} (hf : Continuous f) (x : ℝ) : + HasDerivAt (rawPrimitive f) (f x) x := + (hf.integral_hasStrictDerivAt 0 x).hasDerivAt + +theorem rawPrimitive_continuous {f : ℝ → E} (hf : Continuous f) : + Continuous (rawPrimitive f) := + (show Differentiable ℝ (rawPrimitive f) from + fun x => (rawPrimitive_hasDerivAt hf x).differentiableAt).continuous + +theorem rawPrimitive_contDiff {f : ℝ → E} (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (rawPrimitive f) := by + apply contDiff_infty_iff_deriv.mpr + refine ⟨fun x => (rawPrimitive_hasDerivAt hf.continuous x).differentiableAt, ?_⟩ + have he : deriv (rawPrimitive f) = f := by + funext x + exact (rawPrimitive_hasDerivAt hf.continuous x).deriv + rwa [he] + +omit [CompleteSpace E] in +theorem rawPrimitive_periodic {f : ℝ → E} (hf : Continuous f) + (hperiod : Function.Periodic f 1) (hmean : (∫ t in 0..1, f t) = 0) : + Function.Periodic (rawPrimitive f) 1 := by + intro x + unfold rawPrimitive + rw [hperiod.intervalIntegral_add_eq_add 0 x (fun a b => hf.intervalIntegrable a b)] + simp only [zero_add, hmean, add_zero] + +theorem primitive_hasDerivAt {f : ℝ → E} (hf : Continuous f) (x : ℝ) : + HasDerivAt (primitive f) (f x) x := + (rawPrimitive_hasDerivAt hf x).sub_const _ + +theorem primitive_continuous {f : ℝ → E} (hf : Continuous f) : + Continuous (primitive f) := + (rawPrimitive_continuous hf).sub continuous_const + +theorem primitive_contDiff {f : ℝ → E} (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (primitive f) := + (rawPrimitive_contDiff hf).sub contDiff_const + +omit [CompleteSpace E] in +theorem primitive_periodic {f : ℝ → E} (hf : Continuous f) + (hperiod : Function.Periodic f 1) (hmean : (∫ t in 0..1, f t) = 0) : + Function.Periodic (primitive f) 1 := by + intro x + simp only [primitive, rawPrimitive_periodic hf hperiod hmean x] + +theorem primitive_mean_zero {f : ℝ → E} (hf : Continuous f) : + (∫ t in 0..1, primitive f t) = 0 := by + unfold primitive + rw [intervalIntegral.integral_sub + ((rawPrimitive_continuous hf).intervalIntegrable 0 1) intervalIntegrable_const] + simp only [intervalIntegral.integral_const, sub_zero, one_smul, sub_self] + +/-- A smooth mean-zero periodic function has a smooth mean-zero periodic +primitive, with no solvability hypothesis beyond its vanishing mean. -/ +theorem exists_smooth_periodic_primitive {f : ℝ → E} (hf : ContDiff ℝ ∞ f) + (hperiod : Function.Periodic f 1) (hmean : (∫ t in 0..1, f t) = 0) : + ∃ F : ℝ → E, ContDiff ℝ ∞ F ∧ Function.Periodic F 1 ∧ + (∀ x, HasDerivAt F (f x) x) ∧ (∫ t in 0..1, F t) = 0 := + ⟨primitive f, primitive_contDiff hf, primitive_periodic hf.continuous hperiod hmean, + primitive_hasDerivAt hf.continuous, primitive_mean_zero hf.continuous⟩ + +omit [CompleteSpace E] in +theorem integral_lift_eq_haar (f : UnitAddCircle → E) : + (∫ t in 0..1, f (t : UnitAddCircle)) = ∫ t, f t ∂AddCircle.haarAddCircle := by + calc + _ = ∫ t : UnitAddCircle, f t := by + simpa only [zero_add] using UnitAddCircle.intervalIntegral_preimage 0 f + _ = _ := by simpa only [inv_one, one_smul] using + (AddCircle.integral_haarAddCircle (f := f)).symm + +/-- Vanishing normalized Haar mean gives a smooth mean-zero periodic primitive. -/ +theorem exists_smooth_primitive_of_haar_mean_zero {f : UnitAddCircle → E} + (hf : ContDiff ℝ ∞ (fun t : ℝ => f (t : UnitAddCircle))) + (hmean : (∫ t, f t ∂AddCircle.haarAddCircle) = 0) : + ∃ F : ℝ → E, ContDiff ℝ ∞ F ∧ Function.Periodic F 1 ∧ + (∀ x : ℝ, HasDerivAt F (f (x : UnitAddCircle)) x) ∧ (∫ t in 0..1, F t) = 0 := by + apply exists_smooth_periodic_primitive hf + · intro x + change f ((x + 1 : ℝ) : UnitAddCircle) = f (x : UnitAddCircle) + rw [AddCircle.coe_add_period] + · rw [integral_lift_eq_haar, hmean] + +end ClosedSurfaceR4.PeriodicPrimitive + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSubspace.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSubspace.lean new file mode 100644 index 0000000000000000000000000000000000000000..892f80daa2661115a33d83b57db2ff932206f821 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSubspace.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CovarianceParameter +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicPrimitive + +namespace OAI + +/-! The explicit covariance and primitive operations preserve a fixed +subspace at each parameter value; no choice of a moving frame is required. -/ + +noncomputable section +open MeasureTheory + +namespace ClosedSurfaceR4.CovarianceCorrector + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma average_mem_submodule (P : Submodule ℝ E) {f : Period → E} + (hf : Continuous f) (hm : ∀ t, f t ∈ P) : average f ∈ P := + P.convex.integral_mem P.closed_of_finiteDimensional + (Filter.Eventually.of_forall hm) (integrable_of_continuous hf) + +lemma covariance_mem_submodule (P : Submodule ℝ E) {V : Period → E} + (hV : Continuous V) (hmem : ∀ t, V t ∈ P) {v : E} (hv : v ∈ P) (m : E) : + covariance V v m ∈ P := by + apply average_mem_submodule P + · exact ((hV.sub continuous_const).inner continuous_const).smul (hV.sub continuous_const) + · intro t + exact P.smul_mem _ (P.sub_mem (hmem t) hv) + +/-- The equation for m forces m into the velocity plane, since both terms +on its right side belong to that plane. -/ +lemma covarianceSolution_mem_submodule (P : Submodule ℝ E) + (V : C(Period, E)) (r : C(Period, ℝ)) (hmem : ∀ t, V t ∈ P) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + covarianceSolution V r q ∈ P := by + have hv := average_mem_submodule P V.continuous hmem + have hc := covariance_mem_submodule P V.continuous hmem hv (covarianceSolution V r q) + have hr : average (fun t => r t • V t) ∈ P := + average_mem_submodule P (r.continuous.smul V.continuous) + (fun t => P.smul_mem _ (hmem t)) + have he := covarianceSolution_equation r hq hcircle + rw [sub_eq_iff_eq_add] at he + rw [he] + exact P.add_mem hr (P.smul_mem _ hc) + +lemma parameterCorrector_mem_submodule {A : Type*} (P : A → Submodule ℝ E) + (V : A → C(Period, E)) (r : A → C(Period, ℝ)) (q : A → ℝ) + (hmem : ∀ p t, V p t ∈ P p) (hq : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) (p : A) (t : Period) : + parameterCorrector V r q p t ∈ P p := by + apply (P p).smul_mem + apply (P p).sub_mem + · exact (P p).smul_mem _ (hmem p t) + · exact covarianceSolution_mem_submodule (P p) (V p) (r p) (hmem p) (hq p) (hcircle p) + +end ClosedSurfaceR4.CovarianceCorrector + +namespace ClosedSurfaceR4.PeriodicPrimitive + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma intervalIntegral_mem_submodule (P : Submodule ℝ E) {f : ℝ → E} + (hf : Continuous f) (hm : ∀ t, f t ∈ P) (a b : ℝ) : + (∫ t in a..b, f t) ∈ P := by + let g : ℝ → P := fun t => ⟨f t, hm t⟩ + have hg : Continuous g := hf.subtype_mk _ + change (∫ t in a..b, P.subtypeL (g t)) ∈ P + rw [P.subtypeL.intervalIntegral_comp_comm (hg.intervalIntegrable a b)] + exact (∫ t in a..b, g t).property + +lemma primitive_mem_submodule (P : Submodule ℝ E) {f : ℝ → E} + (hf : Continuous f) (hm : ∀ t, f t ∈ P) (x : ℝ) : primitive f x ∈ P := by + apply P.sub_mem (intervalIntegral_mem_submodule P hf hm 0 x) + exact intervalIntegral_mem_submodule P (rawPrimitive_continuous hf) + (fun t => intervalIntegral_mem_submodule P hf hm 0 t) 0 1 + +end ClosedSurfaceR4.PeriodicPrimitive + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..44694e6ef155af402d59d4d0303192bfd985d87a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicSupport.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicMetricRemainder +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFiniteAnsatz +import OAI.Geometry.SurfaceImmersion.Geometry.FlatExtension + +namespace OAI + +/-! Support preservation for the actual finite periodic expansion. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma periodic_family_flat_on_closure (F : Family A E) {O : Set A} (hO : IsOpen O) + (hz : ∀ p ∈ O, F.val p = 0) (n : ℕ) {p : A} (hp : p ∈ closure O) (t : ℝ) : + iteratedFDeriv ℝ n (fun z : A × ℝ => F.val z.1 (z.2 : Period)) (p, t) = 0 := by + apply iteratedFDeriv_zero_on_closure F.smooth (hO.prod isOpen_univ) + (O := O ×ˢ (Set.univ : Set ℝ)) + · intro z hz' + rw [hz z.1 hz'.1] + rfl + · simpa only [closure_prod_eq, closure_univ, Set.mem_prod, Set.mem_univ, and_true] using hp + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma finiteAnsatz_eq_base_of_zero (F : A → E) (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {p : A} (hU : ∀ i, (U i).val p = 0) : + finiteAnsatz F U ℓ L z p = F p := by + simp only [finiteAnsatz, Family.fastValue, hU, ContinuousMap.zero_apply, + smul_zero, Finset.sum_const_zero, add_zero] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma metricCoefficientFamily_zero_of_positive_coefficients (n r : ℕ) (hr : 0 < r) + (a b : ℕ → Family A E) {p : A} + (ha : ∀ i, 0 < i → (a i).val p = 0) + (hb : ∀ i, 0 < i → (b i).val p = 0) : + (metricCoefficientFamily n r a b).val p = 0 := by + ext t + simp only [metricCoefficientFamily, Family.sum_apply] + apply Finset.sum_eq_zero + intro i hi + apply Finset.sum_eq_zero + intro j hj + by_cases hij : i + j = r + · simp only [hij, ite_true, Family.inner_apply] + by_cases hip : 0 < i + · rw [ha i hip] + exact inner_zero_left _ + · rw [hb j (by omega)] + exact inner_zero_right _ + · simp only [hij, ite_false, Family.zero_apply] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +omit [FiniteDimensional ℝ E] in +lemma initial_zero_of_constant {p : A} {w : E} + (hV : g.V.val p = ContinuousMap.const Period w) : g.initial.val p = 0 := by + have hw : (g.V - g.V.vectorMean).val p = 0 := by + ext t + change g.V.val p t - average (g.V.val p) = 0 + rw [hV] + change w - average (fun _ => w) = 0 + rw [average_const, sub_self] + exact primitiveFamily_zero_at (g.V - g.V.vectorMean).val + (g.V - g.V.vectorMean).smooth g.V.centered_mean_zero hw + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xTangent_zero_on {O : Set A} (hO : IsOpen O) (U : ℕ → Family A E) + (hU : ∀ i p, p ∈ O → (U i).val p = 0) (dx : A) (L i : ℕ) + (hi : 0 < i) {p : A} (hp : p ∈ O) : (g.xTangent dx U L i).val p = 0 := by + unfold xTangent + rw [ite_eq_right (ne_of_gt hi)] + split_ifs + · exact (U (i - 1)).slow_zero_on hO (hU (i - 1)) dx hp + · exact xCoefficient_zero_on hO U hU dx i hp + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yTangent_zero_on {O : Set A} (hO : IsOpen O) (U : ℕ → Family A E) + (hU : ∀ i p, p ∈ O → (U i).val p = 0) (i : ℕ) + (hi : 0 < i) {p : A} (hp : p ∈ O) : (g.yTangent U i).val p = 0 := by + rw [g.yTangent_pos U hi] + exact yCoefficient_zero_on hO U hU dy i hp + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma remainders_zero_on {O : Set A} (hO : IsOpen O) (U : ℕ → Family A E) + (hU : ∀ i p, p ∈ O → (U i).val p = 0) (dx : A) (L r : ℕ) + (hr : 0 < r) {p : A} (hp : p ∈ O) : + (g.xxRemainder dx U L r).val p = 0 ∧ + (g.xyRemainder dx U L r).val p = 0 ∧ + (g.yyRemainder U L r).val p = 0 := by + have hx := fun i hi => g.xTangent_zero_on hO U hU dx L i hi hp + have hy := fun i hi => g.yTangent_zero_on hO U hU i hi hp + exact ⟨metricCoefficientFamily_zero_of_positive_coefficients L r hr _ _ hx hx, + metricCoefficientFamily_zero_of_positive_coefficients L r hr _ _ hx hy, + metricCoefficientFamily_zero_of_positive_coefficients L r hr _ _ hy hy⟩ + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicTriangularRecursion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicTriangularRecursion.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea06e6ed603c9123e7116bdecbf9858e75d49e72 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicTriangularRecursion.lean @@ -0,0 +1,172 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCoefficientSupport +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicExpansionInit + +namespace OAI + +/-! Finite triangular recursion for the angle-independent metric coefficients. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxCoefficient_congr {dx : A} {U W : ℕ → Family A E} {r : ℕ} + (h : ∀ i ≤ r, U i = W i) : g.xxCoefficient dx U r = g.xxCoefficient dx W r := by + unfold xxCoefficient + rw [xCoefficient_congr (h _ (by omega)) (h _ le_rfl), + xxQuadratic_congr (fun i hi => h i (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyCoefficient_congr {dx : A} {U W : ℕ → Family A E} {r : ℕ} + (h : ∀ i ≤ r, U i = W i) : g.xyCoefficient dx U r = g.xyCoefficient dx W r := by + unfold xyCoefficient + rw [xCoefficient_congr (h _ (by omega)) (h _ le_rfl), + yCoefficient_congr (h _ (by omega)), xyQuadratic_congr (fun i hi => h i (by omega))] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyCoefficient_congr {U W : ℕ → Family A E} {r : ℕ} + (hr : 0 < r) (h : ∀ i < r, U i = W i) : g.yyCoefficient U r = g.yyCoefficient W r := by + unfold yyCoefficient + rw [yCoefficient_congr (h _ (by omega)), yyQuadratic_congr (fun i hi => h i (by omega))] + +/-- Add the next corrector while retaining every earlier coefficient. -/ +theorem advance (dx : A) (U : ℕ → Family A E) (r : ℕ) (hr : 0 < r) + (hU : ∀ i p, average ((U i).val p) = 0) : + ∃ W : ℕ → Family A E, + (∀ i < r, W i = U i) ∧ (∀ i p, average ((W i).val p) = 0) ∧ + (g.xxCoefficient dx W r).fluct = 0 ∧ + (g.xyCoefficient dx W r).fluct = 0 ∧ + (g.yyCoefficient W (r + 1)).fluct = 0 ∧ + (∀ O : Set A, IsOpen O → (∀ i p, p ∈ O → (U i).val p = 0) → + ∀ i p, p ∈ O → (W i).val p = 0) := by + let b := g.longitudinal.inner (yCoefficient dy U r) + + g.transverse.inner ((U (r - 1)).slow dx) + xyQuadratic dx dy U r + let c := g.longitudinal.inner ((U (r - 1)).slow dx) + + (1 / 2 : ℝ) • xxQuadratic dx U r + let d := yyQuadratic dy U (r + 1) + obtain ⟨u, hu0, hb, hc, hd, hzero⟩ := g.exists_cancellation b c d + let W := Function.update U r u + have hlow (i : ℕ) (hi : i < r) : W i = U i := by + exact Function.update_of_ne (a := i) (a' := r) (by omega) u U + have hprev : W (r - 1) = U (r - 1) := hlow _ (by omega) + have hcur : W r = u := Function.update_self r u U + have hA : xCoefficient dx W r = (U (r - 1)).slow dx + u.angle := by + simp only [xCoefficient, hprev, hcur] + have hB : yCoefficient dy W r = yCoefficient dy U r := yCoefficient_congr hprev + have hB' : yCoefficient dy W (r + 1) = u.slow dy := by + simp only [yCoefficient, Nat.add_sub_cancel, hcur] + have hxx := xxQuadratic_congr (dx := dx) hlow + have hxy := xyQuadratic_congr (dx := dx) (dy := dy) hlow + have hyy : yyQuadratic dy W (r + 1) = d := + yyQuadratic_congr (fun i hi => hlow i (by omega)) + refine ⟨W, hlow, ?_, ?_, ?_, ?_, ?_⟩ + · intro i p + by_cases hi : i = r + · subst i + rw [hcur] + exact hu0 p + · rw [show W i = U i from Function.update_of_ne hi u U] + exact hU i p + · have he : g.xxCoefficient dx W r = + (2 : ℝ) • (g.longitudinal.inner u.angle + c) := by + unfold xxCoefficient c + rw [hA, hxx, Family.inner_add_right] + module + rw [he, Family.fluct_smul, hc, smul_zero] + · have he : g.xyCoefficient dx W r = g.transverse.inner u.angle + b := by + unfold xyCoefficient b + rw [hA, hB, hxy, Family.inner_add_right] + abel + rw [he, hb] + · change ((2 : ℝ) • g.transverse.inner (yCoefficient dy W (r + 1)) + + yyQuadratic dy W (r + 1)).fluct = 0 + rw [hB', hyy] + exact hd + · intro O hO hUO i p hp + have huO : ∀ q ∈ O, u.val q = 0 := by + apply hzero O hO + · intro q hq + ext t + have hs := (U (r - 1)).slow_zero_on hO (hUO (r - 1)) dx hq + simp only [b, Family.add_apply, Family.inner_apply, + yCoefficient_zero_on hO U hUO dy r hq, hs, + xyQuadratic_zero_on hO U hUO dx dy r hq, + ContinuousMap.zero_apply, inner_zero_right, add_zero] + · intro q hq + ext t + have hs := (U (r - 1)).slow_zero_on hO (hUO (r - 1)) dx hq + simp only [c, Family.add_apply, Family.smul_apply, Family.inner_apply, + hs, xxQuadratic_zero_on hO U hUO dx r hq, + ContinuousMap.zero_apply, inner_zero_right, smul_zero, add_zero] + · intro q hq + exact yyQuadratic_zero_on hO U hUO dy (r + 1) hq + by_cases hi : i = r + · subst i + rw [hcur] + exact huO p hp + · rw [show W i = U i from Function.update_of_ne hi u U] + exact hUO i p hp + +/-- The finite recursion produces mean-zero smooth coefficients with no +angle dependence in all prescribed lower metric coefficients. -/ +theorem exists_coefficients (dx : A) (n : ℕ) : + ∃ U : ℕ → Family A E, + U 0 = g.initial ∧ (∀ i p, average ((U i).val p) = 0) ∧ + (g.yyCoefficient U 1).fluct = 0 ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, g.initial.val p = 0) → + ∀ i p, p ∈ O → (U i).val p = 0) ∧ + ∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient dx U r).fluct = 0 ∧ + (g.xyCoefficient dx U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0 := by + induction n with + | zero => + refine ⟨fun _ => g.initial, rfl, fun _ p => g.initial_mean_zero p, ?_, ?_, ?_⟩ + · have hz : g.yyCoefficient (fun _ => g.initial) 1 = 0 := by + simp only [yyCoefficient, yCoefficient, yyQuadratic, + Finset.Ico_self, Finset.sum_empty, g.initial_transverse_derivative, smul_zero, add_zero] + rw [hz] + ext p t + change (0 : ℝ) - average (fun _ => (0 : ℝ)) = 0 + rw [average_const, sub_self] + · intro O hO hz i p hp + exact hz p hp + · intro r hr hn + omega + | succ n ih => + obtain ⟨U, hinit, hU, hy₁, hsupport, hcoeff⟩ := ih + obtain ⟨W, hlow, hW, hxx, hxy, hyy, hzero⟩ := g.advance dx U (n + 1) (by omega) hU + refine ⟨W, (hlow 0 (by omega)).trans hinit, hW, ?_, ?_, ?_⟩ + · rw [g.yyCoefficient_congr (U := W) (W := U) (by omega : 0 < 1) + (fun i hi => hlow i (by omega))] + exact hy₁ + · intro O hO hz + exact hzero O hO (hsupport O hO hz) + · intro r hr hn + by_cases he : r = n + 1 + · subst r + exact ⟨hxx, hxy, hyy⟩ + · have hrn : r ≤ n := by omega + obtain ⟨hx, hxy', hy⟩ := hcoeff r hr hrn + rw [g.xxCoefficient_congr (fun i hi => hlow i (by omega)), + g.xyCoefficient_congr (fun i hi => hlow i (by omega)), + g.yyCoefficient_congr (by omega) (fun i hi => hlow i (by omega))] + exact ⟨hx, hxy', hy⟩ + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicVanishing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicVanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..43672e521a6dbadae5640d1d77226f9be852f49e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PeriodicVanishing.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SlowPeriodicDerivative + +namespace OAI + +/-! Periodic integration and differentiation preserve vanishing data. -/ + +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.SmoothPeriodicCalculus + +open CovarianceCorrector + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma derivativeFamily_zero_at (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) + {p : A} (hp : F p = 0) : derivativeFamily F hF p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro x + have hd := derivativeFamily_hasDerivAt F hF p x + have he : (fun s : ℝ => F p (s : Period)) = fun _ => (0 : E) := by + funext s + rw [hp] + rfl + rw [he] at hd + exact hd.unique (hasDerivAt_const x 0) + +lemma slowDerivativeFamily_zero_on (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) + {O : Set A} (hO : IsOpen O) (hz : ∀ p ∈ O, F p = 0) (v : A) + {p : A} (hp : p ∈ O) : slowDerivativeFamily F hF v p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro x + change slowDerivative (fun z : A × ℝ => F z.1 (z.2 : Period)) v (p, x) = 0 + rw [← fderiv_slice hF] + change fderiv ℝ (fun q => F q (x : Period)) p v = 0 + have he : (fun q => F q (x : Period)) =ᶠ[𝓝 p] fun _ => (0 : E) := by + filter_upwards [hO.mem_nhds hp] with q hq + rw [hz q hq] + rfl + rw [he.fderiv_eq, fderiv_const_apply, zero_apply] + +variable [FiniteDimensional ℝ A] [CompleteSpace E] + +lemma primitiveFamily_zero_at (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) + (hm : ∀ p, (∫ t, F p t ∂AddCircle.haarAddCircle) = 0) + {p : A} (hp : F p = 0) : primitiveFamily F hF hm p = 0 := by + ext t + refine Quotient.inductionOn' t ?_ + intro x + rw [primitiveFamily_apply] + have he : (fun s : ℝ => F p (s : Period)) = fun _ => (0 : E) := by + funext s + rw [hp] + rfl + rw [he] + exact PeriodicPrimitive.primitive_zero x + +end ClosedSurfaceR4.SmoothPeriodicCalculus + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PerturbedCircularCutoffs.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PerturbedCircularCutoffs.lean new file mode 100644 index 0000000000000000000000000000000000000000..aafaf8435419262b736d0b6322ee5675cc9c696a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PerturbedCircularCutoffs.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CircularSmoothingAtlas + +namespace OAI + +/-! Actual independent radius perturbations of circular manifold cutoffs. +A fixed larger disk supplies common support and uniform continuity. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularCoordinateRegion_mono (p : M) {r R : ℝ} (h : r^2 ≤ R^2) : + circularCoordinateRegion p r ⊆ circularCoordinateRegion p R := by + intro x hx + exact hx.trans h + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_mono (p : M) {r R : ℝ} (h : r^2 ≤ R^2) : + circularDiskClosure p r ⊆ circularDiskClosure p R := + image_mono (circularCoordinateRegion_mono p h) + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularManifoldBump_zero_off_larger_disk (p : M) {r R : ℝ} (hr : r^2 ≤ R^2) + {x : M} (hx : x ∉ circularDiskClosure p R) : circularManifoldBump p r x = 0 := by + classical + by_cases hs : x ∈ (coordinateChart p).source + · rw [circularManifoldBump,indicator_of_mem hs] + apply (circularFlatBump_zero_iff _ _ _).mpr + by_contra hn + apply hx + exact ⟨coordinateChart p x, (not_le.mp hn).le.trans hr, + (coordinateChart p).left_inv hs⟩ + · simp only [circularManifoldBump,indicator_of_notMem hs] + +omit [IsManifold planeModel ∞ M] in +/-- The radius and base point vary continuously together, including at the +chart boundary where the common compact support forces the cutoff to vanish. -/ +lemma circularManifoldBump_joint_continuousAt (p : M) {R r : ℝ} + (hregion : circularCoordinateRegion p R ⊆ (coordinateChart p).target) + (hr : |r| < R) (x : M) : + ContinuousAt (fun z : ℝ × M => circularManifoldBump p z.1 z.2) (r,x) := by + classical + by_cases hs : x ∈ (coordinateChart p).source + · have hc := ((coordinateChart p).continuousOn.continuousAt + ((coordinateChart p).open_source.mem_nhds hs)).comp (x := (r,x)) + continuous_snd.continuousAt + have hg : ContinuousAt (fun z : ℝ × M => + ((coordinateChart p p,z.1),coordinateChart p z.2)) (r,x) := + (continuousAt_const.prodMk continuous_fst.continuousAt).prodMk hc + have hf := circularFlatBump_joint_smooth.continuous.continuousAt.comp (x := (r,x)) hg + apply hf.congr_of_eventuallyEq + filter_upwards [continuous_snd.continuousAt.eventually + ((coordinateChart p).open_source.mem_nhds hs)] with z hz + exact indicator_of_mem hz _ + · have hK := circularDiskClosure_compact p R hregion + have hx : x ∉ circularDiskClosure p R := fun hx => + hs (circularDiskClosure_source p R hregion hx) + have hrad : r^2 < R^2 := by + have hR : 0 < R := (abs_nonneg r).trans_lt hr + nlinarith [sq_abs r, abs_nonneg r] + have hn : ∀ᶠ z : ℝ × M in 𝓝 (r,x), z.1^2 < R^2 := + ((continuous_fst.pow 2).continuousAt).eventually (gt_mem_nhds hrad) + have hk : ∀ᶠ z : ℝ × M in 𝓝 (r,x), z.2 ∉ circularDiskClosure p R := + (show ContinuousAt (Prod.snd : ℝ × M → M) (r,x) from continuous_snd.continuousAt).eventually + (hK.isClosed.isOpen_compl.mem_nhds hx) + apply (continuousAt_const : ContinuousAt (fun _ : ℝ × M => (0 : ℝ)) (r,x)).congr_of_eventuallyEq + filter_upwards [hn,hk] with z hz hzK + exact circularManifoldBump_zero_off_larger_disk p hz.le hzK + +variable [CompactSpace M] + +/-- Moving one radius slightly gives an actual smooth cutoff with one fixed +compact support and arbitrarily small global C0 error. The radius may be chosen +independently for each member of a later finite family. -/ +theorem circularManifoldBump_uniform_perturbation (p : M) {R r : ℝ} + (hregion : circularCoordinateRegion p R ⊆ (coordinateChart p).target) + (hr : |r| < R) {eps : ℝ} (heps : 0 < eps) : + ∃ delta : ℝ, 0 < delta ∧ ∀ r' : ℝ, |r'-r| < delta → + |r'| < R ∧ ContMDiff planeModel 𝓘(ℝ) ∞ (circularManifoldBump p r') ∧ + tsupport (circularManifoldBump p r') ⊆ circularDiskClosure p R ∧ + ∀ x : M, |circularManifoldBump p r' x-circularManifoldBump p r x| < eps := by + have hR : 0 < R := (abs_nonneg r).trans_lt hr + have hsq : r^2 ≤ R^2 := by nlinarith [sq_abs r, abs_nonneg r] + have hreg := (circularCoordinateRegion_mono p hsq).trans hregion + have hb := (circularManifoldBump_smooth_support p r hreg).1.continuous + have hv : ∀ᶠ r' in 𝓝 r, ∀ x : M, + |circularManifoldBump p r' x-circularManifoldBump p r x| < eps := by + have hv' : ∀ᶠ r' in 𝓝 r, ∀ x ∈ (univ : Set M), + |circularManifoldBump p r' x-circularManifoldBump p r x| < eps := by + apply isCompact_univ.eventually_forall_of_forall_eventually + intro x _ + have hc := ((circularManifoldBump_joint_continuousAt p hregion hr x).sub + (hb.comp continuous_snd).continuousAt).abs + have hzero : |circularManifoldBump p r x-circularManifoldBump p r x| < eps := by + simpa only [sub_self,abs_zero] using heps + exact hc.eventually (gt_mem_nhds hzero) + exact hv'.mono (fun r' hh x => hh x (mem_univ x)) + have hrad : ∀ᶠ r' in 𝓝 r, |r'| < R := + continuous_abs.continuousAt.eventually (gt_mem_nhds hr) + obtain ⟨delta,hdelta,hnear⟩ := Metric.eventually_nhds_iff.mp (hrad.and hv) + refine ⟨delta,hdelta,fun r' hr' => ?_⟩ + have hh := hnear (y := r') (by simpa only [Real.dist_eq] using hr') + have hsq' : r'^2 ≤ R^2 := by nlinarith [sq_abs r',abs_nonneg r',hh.1] + have hreg' := (circularCoordinateRegion_mono p hsq').trans hregion + have hs := circularManifoldBump_smooth_support p r' hreg' + exact ⟨hh.1,hs.1,hs.2.trans (circularDiskClosure_mono p hsq'),hh.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseAnsatzProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseAnsatzProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..5fca95e2eb7dc1404a7f85bbc64344d0223f314e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseAnsatzProfiles.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveProfiles + +namespace OAI + +/-! Retain the actual second jet of a supported phase-chart ansatz on the +inverse chart; this transfers the quantitative normal profile unchanged. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates + +lemma primitiveJetProfile_germ {f g : Base → Euclidean} {p : Base} + (h : f =ᶠ[𝓝 p] g) (z : ℝ) : primitiveJetProfile f z p = primitiveJetProfile g z p := by + have hd (v : Base) : PeriodicExpansion.directionalMap f v =ᶠ[𝓝 p] + PeriodicExpansion.directionalMap g v := + h.fderiv.mono (fun _ hh => congrArg (fun L : Base →L[ℝ] Euclidean => L v) hh) + ext k a + fin_cases k <;> simp only [primitiveJetProfile, + PeriodicExpansion.directionalMap,h.fderiv_eq,(hd (coordinateVector 0)).fderiv_eq, + (hd (coordinateVector 1)).fderiv_eq] + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial LocalPeriodicExpansion CovarianceCorrector SurfaceVelocityFamily.Loop +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseAtlasAnsatz_jetProfile (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {χ : JetPolynomial.Base → ℝ} (hχ : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsCompact K) + (hKA : e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {p : JetPolynomial.Base} (hp : p ∈ e.target) : + primitiveJetProfile (A.vectorChartRead i (A.phaseAtlasAnsatz i F e χ U ℓ L z) ∘ e.symm) z p = + primitiveJetProfile (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z) z p := + primitiveJetProfile_germ + (A.phaseAtlasAnsatz_inverse_germ i F e hi hχ U hK hKA hzero hone ℓ L z hp) z + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseBoundaryProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseBoundaryProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac8c1ee773801fcda502fd8edea44575d17f976f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseBoundaryProfile.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularSectionProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability + +namespace OAI + +/-! Read the exact immersion's five profiles in the real coordinate chart +used by the Gauss and boundary calculations. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def phaseRealChartMap (i : A.centers) (T : JetPolynomial.Base → JetPolynomial.Base) (F : M → Space) : RField 4 := + A.jetChartMap i F ∘ T ∘ baseEquiv.symm + +lemma phaseRealChartMap_smooth (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : + ContDiff ℝ ∞ (A.phaseRealChartMap i T F) := + (A.jetChartMap_smooth i hF).comp (hT.comp baseEquiv.symm.contDiff) + +lemma phaseRealChartMap_profile (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (z : ℝ) (p : JetPolynomial.Base) : + boundaryProfileMap (SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F ∘ T) z p) = + realBoundaryProfile (A.phaseRealChartMap i T F) z (baseEquiv p) := by + have he : (fun q => JetVelocityCoordinates.toEuclidean (A.phaseRealChartMap i T F (baseEquiv q))) = + A.vectorChartRead i F ∘ T := by + funext q + change spaceCoordinates.symm + (A.jetChartMap i F (T (baseEquiv.symm (baseEquiv q)))) = A.vectorChartRead i F (T q) + rw [baseEquiv.symm_apply_apply] + exact spaceCoordinates.symm_apply_apply _ + simpa only [he] using boundaryProfileMap_chart (A.phaseRealChartMap_smooth i hT hF) z p + +/-- The exact primitive's Euclidean profile estimate gives the real-coordinate +estimate used by the boundary preservation lemmas. -/ +lemma phaseRealChartMap_profile_error (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (z : ℝ) (p : JetPolynomial.Base) + (J : EuclideanBoundaryProfile) {ε : ℝ} (hε : 0 < ε) + (hclose : ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F ∘ T) z p - J‖ < + ε / (‖boundaryProfileMap‖ + 1)) : + ‖realBoundaryProfile (A.phaseRealChartMap i T F) z (baseEquiv p) - boundaryProfileMap J‖ < ε := by + rw [← A.phaseRealChartMap_profile i hT hF z p, ← map_sub] + calc + ‖boundaryProfileMap _‖ ≤ ‖boundaryProfileMap‖ * + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i F ∘ T) z p - J‖ := + boundaryProfileMap.le_opNorm _ + _ < (‖boundaryProfileMap‖ + 1) * (ε / (‖boundaryProfileMap‖ + 1)) := by + have hn := norm_nonneg boundaryProfileMap + have hd : 0 < ‖boundaryProfileMap‖ + 1 := by positivity + have he : 0 < ε / (‖boundaryProfileMap‖ + 1) := div_pos hε hd + nlinarith [mul_le_mul_of_nonneg_left hclose.le hn] + _ = ε := mul_div_cancel₀ ε (by positivity) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCircularPeriod.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCircularPeriod.lean new file mode 100644 index 0000000000000000000000000000000000000000..4407160501f70c29916290d82fb3a87bc9ba3c04 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCircularPeriod.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile + +namespace OAI + +/-! The analytic profile attached to an atlas phase chart is exactly one +of the real circular profiles used in the finite boundary construction. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates GeometryPreservation SurfaceVelocityFamily VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma phaseRealChartMap_comp_base (i : A.centers) (T : JetPolynomial.Base → JetPolynomial.Base) + (F : M → Space) : A.phaseRealChartMap i T F ∘ baseEquiv = A.jetChartMap i F ∘ T := by + funext p + simp only [Function.comp_apply,phaseRealChartMap,baseEquiv.symm_apply_apply] + +private lemma geometric_profile_congr {O : TopologicalSpace.Opens JetPolynomial.LowJet} + (l : Loop O) {S : TopologicalSpace.Opens JetPolynomial.Base} + {G H : JetPolynomial.Base → JetPolynomial.Space} (he : G = H) + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hGO : MapsTo (JetPolynomial.lowJet G) S O) (hHO : MapsTo (JetPolynomial.lowJet H) S O) + (p : JetPolynomial.Base) (t : CovarianceCorrector.Period) : + l.geometricLeadingProfile G hG hGO p t = l.geometricLeadingProfile H hH hHO p t := by + subst H + rfl + +lemma phase_circular_geometric_profile (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {Z : TopologicalSpace.Opens GeometricJet} {O : TopologicalSpace.Opens JetPolynomial.LowJet} + (hOZ : (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z) (l : Loop O) + (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hGO : MapsTo (JetPolynomial.lowJet (A.jetChartMap i F ∘ T)) S O) + {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + boundaryProfileMap (l.geometricLeadingProfile (A.jetChartMap i F ∘ T) + ((A.jetChartMap_smooth i hF).comp hT) hGO p (t : CovarianceCorrector.Period)) = + surfaceCircularProfile (A.phaseRealChartMap i T F) a e₁ e₂ α (baseEquiv p,t) := by + have hcomp := A.phaseRealChartMap_comp_base i T F + have hGO' : MapsTo (JetPolynomial.lowJet (A.phaseRealChartMap i T F ∘ baseEquiv)) S O := by + simpa only [hcomp] using hGO + have he := l.actual_circular_geometric_profile (A.phaseRealChartMap_smooth i hT hF) + ha hOZ hamp h₁ h₂ hα hvel hGO' hp t + have heq := geometric_profile_congr l hcomp + ((A.phaseRealChartMap_smooth i hT hF).comp baseEquiv.contDiff) + ((A.jetChartMap_smooth i hF).comp hT) hGO' hGO p (t : CovarianceCorrector.Period) + exact (congrArg boundaryProfileMap heq).symm.trans he + + +lemma phase_circular_period_profile (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {Z : TopologicalSpace.Opens GeometricJet} {O : TopologicalSpace.Opens JetPolynomial.LowJet} + (hOZ : (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z) (l : Loop O) + (hamp : l.HasSpatialAmplitude (a ∘ baseEquiv)) + {e₁ e₂ : GeometricJet → NormalFrame.Vec} + (h₁ : ContDiffOn ℝ ∞ e₁ Z) (h₂ : ContDiffOn ℝ ∞ e₂ Z) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) + (hvel : ∀ J ∈ O, ∀ t, l.velocity (J,t) = + velocityRadius (normal J) (a (decode J).1) • + VelocityFrame.direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hGO : MapsTo (JetPolynomial.lowJet (A.jetChartMap i F ∘ T)) S O) + {p : JetPolynomial.Base} (hp : p ∈ S) (t : CovarianceCorrector.Period) : + ∃ s : ℝ, s ∈ Icc (0 : ℝ) 1 ∧ + boundaryProfileMap (l.geometricLeadingProfile (A.jetChartMap i F ∘ T) + ((A.jetChartMap_smooth i hF).comp hT) hGO p t) = + surfaceCircularProfile (A.phaseRealChartMap i T F) a e₁ e₂ α (baseEquiv p,s) := by + have hcomp := A.phaseRealChartMap_comp_base i T F + have hGO' : MapsTo (JetPolynomial.lowJet (A.phaseRealChartMap i T F ∘ baseEquiv)) S O := by + simpa only [hcomp] using hGO + obtain ⟨s,hs,he⟩ := l.actual_circular_period_profile (A.phaseRealChartMap_smooth i hT hF) + ha hOZ hamp h₁ h₂ hα hvel hGO' hp t + have heq := geometric_profile_congr l hcomp + ((A.phaseRealChartMap_smooth i hT hF).comp baseEquiv.contDiff) + ((A.jetChartMap_smooth i hF).comp hT) hGO' hGO p t + exact ⟨s,hs,(congrArg boundaryProfileMap heq).symm.trans he⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCrossingTransversality.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCrossingTransversality.lean new file mode 100644 index 0000000000000000000000000000000000000000..9650b9493d927ed4bed5bbe616b7a2d9353352ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCrossingTransversality.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionRegularity +import OAI.Geometry.SurfaceImmersion.Geometry.CovectorPullbackParameters + +namespace OAI + +/-! Independent phase covectors give the nonzero first components of the +actual transported directions at every finite crossing. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes SurfaceJetCoordinates PhaseGeometry + +namespace PhaseGeometry + +def firstCoordinateCovector (L : Base →L[ℝ] Base) : Base := ((L dx).1,(L dy).1) + +lemma firstCoordinateCovector_apply (L : Base →L[ℝ] Base) (v : Base) : + phaseLinear (firstCoordinateCovector L) v = (L v).1 := by + have hv : v = v.1 • dx + v.2 • dy := by ext <;> simp [dx,dy] + conv_rhs => rw [hv] + simp only [map_add,map_smul,Prod.fst_add,Prod.smul_fst,smul_eq_mul] + change (L dx).1*v.1 + (L dy).1*v.2 = _ + ring + +lemma phaseDerivative_fst {T : Base → Base} {x : Base} (hT : DifferentiableAt ℝ T x) : + phaseDerivative (Prod.fst ∘ T) x = firstCoordinateCovector (fderiv ℝ T x) := by + have hd := ((ContinuousLinearMap.fst ℝ ℝ ℝ).hasFDerivAt.comp x hT.hasFDerivAt).fderiv + change fderiv ℝ (Prod.fst ∘ T) x = _ at hd + rw [phaseDerivative,hd] + rfl + +end PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem phase_crossing_first_nonzero (q₀ q₁ q₂ : M) + (e₀ e₁ e₂ : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he₀ : ContDiff ℝ ∞ e₀) (hi₀ : ContDiff ℝ ∞ e₀.symm) + (he₁ : ContDiff ℝ ∞ e₁) (hi₁ : ContDiff ℝ ∞ e₁.symm) + (he₂ : ContDiff ℝ ∞ e₂) + {p : M} (h₀ : p ∈ (surfacePhaseChart q₀ e₀).source) + (h₁ : p ∈ (surfacePhaseChart q₁ e₁).source) + (h₂ : p ∈ (surfacePhaseChart q₂ e₂).source) + (hcross : covectorDet + (firstCoordinateCovector (fderiv ℝ (surfacePhaseTransition q₀ e₀ q₁ e₁) (surfacePhaseChart q₀ e₀ p))) + (firstCoordinateCovector (fderiv ℝ (surfacePhaseTransition q₀ e₀ q₂ e₂) (surfacePhaseChart q₀ e₀ p))) ≠ 0) : + (fderiv ℝ (surfacePhaseTransition q₁ e₁ q₂ e₂) (surfacePhaseChart q₁ e₁ p) dy).1 ≠ 0 := by + let L₀₁ := fderiv ℝ (surfacePhaseTransition q₀ e₀ q₁ e₁) (surfacePhaseChart q₀ e₀ p) + let L₀₂ := fderiv ℝ (surfacePhaseTransition q₀ e₀ q₂ e₂) (surfacePhaseChart q₀ e₀ p) + let L₁₀ := fderiv ℝ (surfacePhaseTransition q₁ e₁ q₀ e₀) (surfacePhaseChart q₁ e₁ p) + let v := L₁₀ dy + have hv : v ≠ 0 := by + have hI := surfacePhaseTransition_fderiv_injective q₁ q₀ e₁ e₀ he₁ hi₁ he₀ hi₀ h₁ h₀ + intro hz + have hh : (dy : Base) = 0 := hI (hz.trans (map_zero _).symm) + exact (show (dy : Base) ≠ 0 by simp [dy]) hh + have hid := surfacePhaseTransition_fderiv_cocycle q₁ q₀ q₁ e₁ e₀ e₁ hi₁ he₀ hi₀ he₁ h₁ h₀ h₁ + rw [surfacePhaseTransition_self_fderiv q₁ e₁ ((surfacePhaseChart q₁ e₁).map_source h₁)] at hid + have hv₁ : phaseLinear (firstCoordinateCovector L₀₁) v = 0 := by + rw [firstCoordinateCovector_apply] + have hh := congrArg (fun L : Base →L[ℝ] Base => (L dy).1) hid + exact hh.symm + have hn := phaseLinear_ne_zero_on_kernel hcross hv hv₁ + rw [firstCoordinateCovector_apply] at hn + have hc := surfacePhaseTransition_fderiv_cocycle q₁ q₀ q₂ e₁ e₀ e₂ hi₁ he₀ hi₀ he₂ h₁ h₀ h₂ + rw [hc] + exact hn + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCurveCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCurveCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbf50661cc085b2f6bc1eebf57a31fdecd89ad4c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseCurveCrossings.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionCocycle + +namespace OAI + +/-! Intrinsic ordered crossing invariants for the fixed later curves. +Their values can be computed in whichever phase chart is being corrected. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c d : PhaseBoundaryCurve B) + +def crossing (F : M → Space) (p : M) : ℝ := + let H := B.phaseRealChartMap c.index c.phase.symm F + let T := surfacePhaseTransition (d.index : M) d.phase (c.index : M) c.phase + let v := fderiv ℝ T (d.coordinate p) dy + orderedCrossing H dy v (c.coordinate p) + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) + (c.coordinate p)) + +lemma crossing_transition (A : SmoothingAtlas M) (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : M} (hc : p ∈ c.carrier) (hd : p ∈ d.carrier) + (hp : p ∈ (surfacePhaseChart (i : M) e).source) (hw : A.weight i p ≠ 0) : + let H := A.phaseRealChartMap i e.symm F + let vc := fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) dy + let vd := fderiv ℝ (surfacePhaseTransition (d.index : M) d.phase (i : M) e) (d.coordinate p) dy + let q := baseEquiv (e (chart (i : M) p)) + c.crossing d F p = orderedCrossing H vc vd q + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) q) := by + have hpc : p ∈ (surfacePhaseChart (c.index : M) c.phase).source := c.source hc + have hpd : p ∈ (surfacePhaseChart (d.index : M) d.phase).source := d.source hd + have hback : (surfacePhaseChart (c.index : M) c.phase).symm (c.coordinate p) = p := + (surfacePhaseChart (c.index : M) c.phase).left_inv hpc + have hx : c.coordinate p ∈ (surfacePhaseTransition (c.index : M) c.phase (i : M) e).source := + surfacePhaseTransition_source _ _ _ _ hpc hp + let u := fderiv ℝ (surfacePhaseTransition (d.index : M) d.phase (c.index : M) c.phase) + (d.coordinate p) dy + have ht := B.phase_intrinsic_crossing_transition A c.index i c.phase e c.smooth c.inverse_smooth + he hi hF hx (by rw [hback]; exact c.active p hc) (by rwa [hback]) dy u + have hq : surfacePhaseTransition (c.index : M) c.phase (i : M) e (c.coordinate p) = + baseEquiv (e (chart (i : M) p)) := surfacePhaseTransition_apply _ _ _ _ hpc + have hcoc := surfacePhaseTransition_fderiv_cocycle (d.index : M) (c.index : M) (i : M) + d.phase c.phase e d.inverse_smooth c.smooth c.inverse_smooth he hpd hpc hp + have hvec : fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) u = + fderiv ℝ (surfacePhaseTransition (d.index : M) d.phase (i : M) e) (d.coordinate p) dy := by + exact (congrArg (fun L : SmallModes.Base →L[ℝ] SmallModes.Base => L dy) hcoc).symm + dsimp only at ht ⊢ + change c.crossing d F p = _ at ht + rw [hq,hvec] at ht + exact ht + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseLeadingProfileStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseLeadingProfileStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..55074b5926ff8b601f513ba05fa4ed89747abaf3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseLeadingProfileStability.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCompositionBound +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood + +namespace OAI + +/-! The global C3 displacement controls all five geometric leading profiles +in a fixed atlas chart, uniformly on compact sets and all periodic phases. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetVelocityCoordinates WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phase_geometricLeadingProfile_stability (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {S : TopologicalSpace.Opens JetPolynomial.Base} + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) + (hFO : MapsTo (lowJet (A.jetChartMap i F ∘ T)) S O) {K : Set JetPolynomial.Base} + (hK : IsCompact K) (hKS : K ⊆ S) (ε : ℝ) (hε : 0 < ε) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G : M → Space, ∀ hG : ContMDiff planeModel spaceModel ∞ G, + ∀ hGO : MapsTo (lowJet (A.jetChartMap i G ∘ T)) S O, + A.WeightedBound 1 3 ρ (G-F) → ∀ p ∈ K, ∀ t : CovarianceCorrector.Period, + ‖l.geometricLeadingProfile (A.jetChartMap i G ∘ T) ((A.jetChartMap_smooth i hG).comp hT) hGO p t- + l.geometricLeadingProfile (A.jetChartMap i F ∘ T) ((A.jetChartMap_smooth i hF).comp hT) hFO p t‖ < ε := by + obtain ⟨δ,hδ,hclose⟩ := l.geometricLeadingProfile_stability + ((A.jetChartMap_smooth i hF).comp hT) hFO hK hKS ε hε + obtain ⟨D₀,hD₀,hd⟩ := A.jetChartMap_bound i 3 + obtain ⟨D₁,hD₁,hcomp⟩ := compact_composition_bound (E := JetPolynomial.Space) hT S.isOpen hSc 3 + let ρ := δ/(D₁*D₀+1) + have hD : 0 ≤ D₁*D₀ := mul_nonneg (by linarith) hD₀ + have hρ : 0 < ρ := div_pos hδ (by positivity) + refine ⟨ρ,hρ,?_⟩ + intro G hG hGO hb p hp t + have hbound := hd (G-F) (hG.sub hF) ρ hρ.le hb + have hc := hcomp (A.jetChartMap i (G-F)) (D₀*ρ) + (mul_nonneg hD₀ hρ.le) (A.jetChartMap_smooth i (hG.sub hF)) hbound + rw [A.jetChartMap_sub] at hc + apply hclose _ ((A.jetChartMap_smooth i hG).comp hT) hGO _ p hp t + apply hc.mono_const + have he : ρ*(D₁*D₀+1) = δ := div_mul_cancel₀ δ (by positivity) + nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePreparedCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePreparedCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f6e3e62e61c3e2def7a60cb2a5f1515faac708a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePreparedCrossings.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseOrdinaryCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionRegularity + +namespace OAI + +/-! Prepared point inequalities transported into the fixed curve charts. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates RealModes SmallModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c d : PhaseBoundaryCurve B) + +lemma crossing_pos_of_coordinate_crossings {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : M} + (hc : p ∈ c.carrier) (hd : p ∈ d.carrier) + (hpos : ∀ v w : Base, v ≠ 0 → w ≠ 0 → + 0 < orderedCrossing (coordinateMap F (c.index : M)) v w (coordinateChart (c.index : M) p) + (coordinateGaussianCurvature (realMetric (coordinateMap F (c.index : M)) dx dx) + (realMetric (coordinateMap F (c.index : M)) dx dy) + (realMetric (coordinateMap F (c.index : M)) dy dy) (coordinateChart (c.index : M) p))) : + 0 < c.crossing d F p := by + let e := OpenPartialHomeomorph.refl JetPolynomial.Base + have he : ContDiff ℝ ∞ e := contDiff_id + have hi : ContDiff ℝ ∞ e.symm := contDiff_id + have hpc : p ∈ (surfacePhaseChart (c.index : M) c.phase).source := c.source hc + have hpd : p ∈ (surfacePhaseChart (d.index : M) d.phase).source := d.source hd + have hpi : p ∈ (surfacePhaseChart (c.index : M) e).source := by + rw [surfacePhaseChart_refl_source] + rw [coordinateChart_source,← chart_source] + exact (c.source hc).1 + have hx := surfacePhaseTransition_source (c.index : M) (c.index : M) c.phase e hpc hpi + let w := d.directionIn c p + have hdy : (dy : Base) ≠ 0 := by simp [dy] + have hw : w ≠ 0 := by + intro hz + have hinj := surfacePhaseTransition_fderiv_injective (d.index : M) (c.index : M) + d.phase c.phase d.smooth d.inverse_smooth c.smooth c.inverse_smooth hpd hpc + change Function.Injective (fderiv ℝ (surfacePhaseTransition (d.index : M) d.phase (c.index : M) c.phase) (d.coordinate p)) at hinj + exact hdy (hinj (by simpa only [w,directionIn,map_zero] using hz)) + have hI := surfacePhaseTransition_fderiv_injective (c.index : M) (c.index : M) + c.phase e c.smooth c.inverse_smooth he hi hpc hpi + change Function.Injective (fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (c.index : M) e) (c.coordinate p)) at hI + have hIv : fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (c.index : M) e) + (c.coordinate p) dy ≠ 0 := fun hz => hdy (hI (by simpa only [map_zero] using hz)) + have hIw : fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (c.index : M) e) + (c.coordinate p) w ≠ 0 := fun hz => hw (hI (by simpa only [map_zero] using hz)) + have ht := B.phase_intrinsic_crossing_transition B c.index c.index c.phase e + c.smooth c.inverse_smooth he hi hF hx + (by rw [(surfacePhaseChart (c.index : M) c.phase).left_inv hpc]; exact c.active p hc) (by rw [(surfacePhaseChart (c.index : M) c.phase).left_inv hpc]; exact c.active p hc) dy w + have htp : surfacePhaseTransition (c.index : M) c.phase (c.index : M) e (c.coordinate p) = + coordinateChart (c.index : M) p := + surfacePhaseTransition_apply (c.index : M) (c.index : M) c.phase e hpc + have hg := B.phaseRealChartMap_surface_germ c.index e F + ((surfacePhaseChart (c.index : M) e).map_source hpi) + (by rw [(surfacePhaseChart (c.index : M) e).left_inv hpi]; exact c.active p hc) + rw [surfacePhaseMap_refl] at hg + have hh := orderedCrossing_intrinsic_germ hg + (fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (c.index : M) e) (c.coordinate p) dy) + (fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (c.index : M) e) (c.coordinate p) w) + dsimp only at ht + change c.crossing d F p = _ at ht + rw [show surfacePhaseChart (c.index : M) c.phase p = c.coordinate p from rfl] at ht + rw [surfacePhaseChart_refl_apply] at hh + rw [ht,htp] + rw [hh] + exact hpos _ _ hIv hIw + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveBoundaryGauss.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveBoundaryGauss.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ddb2c11fe33352b6217d2a075f05279da3ea607 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveBoundaryGauss.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.AmplitudeBoundaryMetric +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedBoundaryInvariant +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Geometry.InverseTensorPullback +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedTensorPullbackBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorTransition + +namespace OAI + +/-! A tensor restored in a chart reads back exactly where its outer cutoff is one. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates +local instance boundaryGaussReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance boundaryGaussReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance boundaryGaussReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance boundaryGaussReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance boundaryGaussReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance boundaryGaussReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseMetricRead_primitive_germ (i : A.centers) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (g h : SmoothMetric M) (χ : Base → ℝ) (a : SmallModes.Base → ℝ) + (htarget : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {x : SmallModes.Base} (hx : baseEquiv.symm x ∈ e.target) + (hactive : A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) : + A.phaseMetricRead i e.symm h =ᶠ[𝓝 x] fun y => A.phaseMetricRead i e.symm g y + + χ (e.symm (baseEquiv.symm y)) • ![(a y)^2,0,0] := by + have ht := (e.open_target.preimage baseEquiv.symm.continuous).mem_nhds hx + have hn := (isOpen_ne.preimage ((A.chartWeight_smooth i).continuous.comp + (hi.continuous.comp baseEquiv.symm.continuous))).mem_nhds hactive + filter_upwards [ht,hn] with y hy hya + have hh := A.phaseMetricRead_primitive i e he hi g h χ a htarget hy hya + simpa only [baseEquiv.apply_symm_apply] using hh + +lemma phase_primitive_gauss_zero (i : A.centers) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (g h : SmoothMetric M) {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + (htarget : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {x : SmallModes.Base} (hx : baseEquiv.symm x ∈ e.target) + (hactive : A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hz : a x = 0) (hnonneg : ∀ᶠ y in 𝓝 x, 0 ≤ a y) : + RealModes.coordinateGauss (fun y => A.phaseMetricRead i e.symm h y 0) + (fun y => A.phaseMetricRead i e.symm h y 1) (fun y => A.phaseMetricRead i e.symm h y 2) x = + RealModes.coordinateGauss (fun y => A.phaseMetricRead i e.symm g y 0) + (fun y => A.phaseMetricRead i e.symm g y 1) (fun y => A.phaseMetricRead i e.symm g y 2) x := by + have heq := A.phaseMetricRead_primitive_germ i e he hi g h χ a htarget hx hactive + have h0 := heq.mono (fun y hy => congrFun hy 0) + have h1 : (fun y => A.phaseMetricRead i e.symm h y 1) =ᶠ[𝓝 x] + (fun y => A.phaseMetricRead i e.symm g y 1) := + heq.mono (fun y hy => by simpa using congrFun hy 1) + have h2 : (fun y => A.phaseMetricRead i e.symm h y 2) =ᶠ[𝓝 x] + (fun y => A.phaseMetricRead i e.symm g y 2) := + heq.mono (fun y hy => by simpa using congrFun hy 2) + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul,Matrix.cons_val_zero] at h0 + rw [RealModes.coordinateGauss_germ h0 h1 h2] + exact RealModes.coordinateGauss_add_factor_square_boundary + (contDiff_pi.mp (A.phaseMetricRead_smooth i hi g) 0) ha + (hχ.comp (hi.comp baseEquiv.symm.contDiff)) hz hnonneg + +/-- At a zero of the amplitude, the original immersion's ordered crossing +invariant is exactly the scalar boundary expression for the new metric. -/ +lemma phase_primitive_boundary_crossing (i : A.centers) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (h : SmoothMetric M) {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + (htarget : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {x : SmallModes.Base} (hx : baseEquiv.symm x ∈ e.target) + (hactive : A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0) + (hz : a x = 0) (hnonneg : ∀ᶠ y in 𝓝 x, 0 ≤ a y) + (hD : NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (A.phaseRealChartMap i e.symm F) x) + (SmallModes.coordDeriv SmallModes.dy (A.phaseRealChartMap i e.symm F) x) ≠ 0) + (hB : RealModes.realSecondForm (A.phaseRealChartMap i e.symm F) + SmallModes.dy SmallModes.dy x ≠ 0) (b c : ℝ) : + let H := A.phaseRealChartMap i e.symm F + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + VelocityFrame.orderedCrossing H SmallModes.dy (b,c) x κ = + ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx H) x ⬝ᵥ + VelocityFrame.normalize (RealModes.realSecondForm H SmallModes.dy SmallModes.dy x))*b + + Real.sqrt (RealModes.realSecondForm H SmallModes.dy SmallModes.dy x ⬝ᵥ + RealModes.realSecondForm H SmallModes.dy SmallModes.dy x)*c)^2 + + (RealModes.coordinateGauss (fun y => A.phaseMetricRead i e.symm h y 0) + (fun y => A.phaseMetricRead i e.symm h y 1) + (fun y => A.phaseMetricRead i e.symm h y 2) x)*b^2 := by + dsimp only + rw [VelocityFrame.orderedCrossing_dy (A.phaseRealChartMap_smooth i hi hF.1) x hD hB, + ← RealModes.coordinateGauss_eq_curvature_mul _ _ hD, + A.phaseGauss_isometry i hi hF hactive, + ← A.phase_primitive_gauss_zero i e he hi g h hχ ha htarget hx hactive hz hnonneg] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveGlobalTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveGlobalTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a239ddfe837ece440f95bba42044e19eb031331 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveGlobalTensor.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCoordinateCovector +import OAI.Geometry.SurfaceImmersion.Correction.TensorOperatorSmooth + +namespace OAI + +/-! Identification of a supported analytic primitive with the square of its +actual global surface phase differential. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates PhaseGeometry +local instance globalPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance globalPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma localized_primitive_tensor_at (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (χ : JetPolynomial.Base → ℝ) (a : SmallModes.Base → ℝ) + {phi : M → ℝ} {p : M} (hp : p ∈ (chart (i : M)).source) + (hphi : phi =ᶠ[𝓝 p] (fun q => (e (chart (i : M) q)) 0)) : + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y)) p = + (A.outer i p * χ (chart (i : M) p) * (a (surfacePhaseChart (i : M) e p))^2) • + phaseDifferentialSquare phi p := by + ext v w + rw [A.tensorRestore_apply i _ hp,localizedTensorPullback_first_square,map_smul] + simp only [smul_apply,smul_eq_mul,fiberFromThree_apply,covectorSquare_evaluate] + rw [← A.phaseFirst_mfderiv i e he hp hphi v,← A.phaseFirst_mfderiv i e he hp hphi w] + let dv : ℝ := mfderiv planeModel 𝓘(ℝ) phi p v + let dw : ℝ := mfderiv planeModel 𝓘(ℝ) phi p w + change A.outer i p * (χ (chart (i : M) p) * (a (baseEquiv (e (chart (i : M) p))))^2 * + (dv * dw)) = + (A.outer i p * χ (chart (i : M) p) * (a (baseEquiv (e (chart (i : M) p))))^2) * + (dv * dw) + ring + +theorem phase_primitive_global_tensor (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) {χ : JetPolynomial.Base → ℝ} + (hχs : tsupport χ ⊆ e.source) {a : SmallModes.Base → ℝ} + (ha0 : ∀ x, 0 ≤ a x) {D : Set M} + (hDs : D ⊆ (surfacePhaseChart (i : M) e).source) + (hapos : ∀ x, 0 < a x ↔ x ∈ (surfacePhaseChart (i : M) e) '' D) + {f phi : M → ℝ} + (haf : ∀ p ∈ D, a (surfacePhaseChart (i : M) e p) = f p) + (hfzero : ∀ p ∉ D, f p = 0) + (houter : ∀ p ∈ D, A.outer i p = 1) + (hone : ∀ p ∈ D, χ (chart (i : M) p) = 1) + (hphi : ∀ p ∈ D, phi =ᶠ[𝓝 p] (fun q => (e (chart (i : M) q)) 0)) : + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y)) = + fun p => (f p)^2 • phaseDifferentialSquare phi p := by + funext p + by_cases hpD : p ∈ D + · rw [A.localized_primitive_tensor_at i e he χ a (hDs hpD).1 (hphi p hpD), + houter p hpD,hone p hpD,haf p hpD,one_mul,one_mul] + rw [hfzero p hpD,zero_pow (by decide : 2 ≠ 0),zero_smul] + by_cases hp : p ∈ (chart (i : M)).source + · have hzero : localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) + (chart (i : M) p) = 0 := by + by_cases hχ : χ (chart (i : M) p) = 0 + · simp only [localizedTensorPullback,hχ,zero_smul] + have hep : p ∈ (surfacePhaseChart (i : M) e).source := + ⟨hp,hχs (subset_tsupport χ hχ)⟩ + have ha : a (surfacePhaseChart (i : M) e p) = 0 := by + apply le_antisymm _ (ha0 _) + apply le_of_not_gt + intro hpos + obtain ⟨q,hq,heq⟩ := (hapos _).mp hpos + have hqp : q = p := (surfacePhaseChart (i : M) e).injOn (hDs hq) hep heq + exact hpD (hqp ▸ hq) + rw [localizedTensorPullback_first_square] + change (χ (chart (i : M) p) * (a (surfacePhaseChart (i : M) e p))^2) • _ = 0 + rw [ha,zero_pow (by decide : 2 ≠ 0),mul_zero,zero_smul] + ext v w + rw [A.tensorRestore_apply i _ hp,hzero,map_zero] + simp + · have ho : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.outer_support i h)) + simp only [bundleRestore,ho,zero_smul] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveMetricRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveMetricRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..c0ce450a5590bfa409760a320b6b84bfab359801 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveMetricRead.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSelfTensorRead +import OAI.Geometry.SurfaceImmersion.Geometry.InverseTensorPullback +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedTensorPullbackBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorTransition + +namespace OAI + +/-! A tensor restored in a chart reads back exactly where its outer cutoff is one. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates +local instance primitiveReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance primitiveReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseMetricRead_primitive (i : A.centers) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (g h : SmoothMetric M) (χ : Base → ℝ) (a : SmallModes.Base → ℝ) + (htarget : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {p : Base} (hp : p ∈ e.target) (hactive : A.chartWeight i (e.symm p) ≠ 0) : + A.phaseMetricRead i e.symm h (baseEquiv p) = + A.phaseMetricRead i e.symm g (baseEquiv p) + + χ (e.symm p) • ![(a (baseEquiv p))^2,0,0] := by + have hx : e.symm p ∈ (chart (i : M)).target := by + by_contra hn + simp [chartWeight,hn] at hactive + have hw : A.weight i ((chart (i : M)).symm (e.symm p)) ≠ 0 := by + simpa only [chartWeight,indicator_of_mem hx] using hactive + have ho := A.outer_one i _ (subset_tsupport (A.weight i) hw) + simp only [phaseMetricRead,baseEquiv.symm_apply_apply] + rw [htarget,A.tensorChartRead_add,Pi.add_apply,map_add, + A.tensorChartRead_restore_self i _ hx ho,localizedTensorPullback,map_smul,e.right_inv hp, + tensorCoordinatePullback_inverse e he hi hp] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveNormalRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveNormalRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..520b095adf82884c1ba2c051733ecc256ca4d5ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveNormalRealization.lean @@ -0,0 +1,202 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.NonlinearLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveShiftedPowers +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveWeightedBudget +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAtlasNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance phasePrimitiveNormalRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phasePrimitiveNormalRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phasePrimitiveNormalRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phasePrimitiveNormalRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phasePrimitiveNormalRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phasePrimitiveNormalRealizationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for the actual supported primitive +in a fixed nonlinear phase chart, using only the proved polynomial mean iteration. -/ +theorem phase_primitive_normal_realization (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + (R N : ℕ) : + ∃ (b u η L C Cv c : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ 0 < c ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G V : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, data.A.ShiftedBound 2 m (z^b) (P m) G) ∧ + data.A.WeightedBound z R Cv V ∧ + data.A.ShiftedBound 2 R z (Cv/z^2) V ∧ + data.A.TensorWeightedBound 1 R (C*z^N) + (inducedTensor V-(g.inner+data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y)))) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖) ∧ + ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := data.A.nonlinear_lowJet_neighborhood_of_C2 i hF hi + S.isOpen hSc hQ O.isOpen hQO hFQ + obtain ⟨Pol,hPol,lm,hconstruct⟩ := data.A.supported_phase_primitive_metric i e he hi hχ hχc hχs + l ha hamp S hTS hQ' hQ'O (N+(R+2)) ℓ hℓx hℓy + obtain ⟨ln,ε,c,hε,hc,hnb⟩ := l.uniform_primitive_normal_geometry (S := S) + hQ' hQ'O (N+(R+2)) ℓ hℓx hℓy + let loss := max lm ln + have hcap : 0 < 1/(1+(loss : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hbl,hu,hη,hη1,hL,hC,hP,hmean⟩ := + data.polynomial_mean_approximation (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) + (data.A.primitiveAtlasPolynomial_smooth i hPol') hF hmetric (R+2) (N+(R+2)) + (1/(1+(loss : ℝ))) hcap + have hblm : b < 1/(1+(lm : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_left lm ln) 1)) + have hbln : b < 1/(1+(ln : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_right lm ln) 1)) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + obtain ⟨_,B,_,hB,hprofiles⟩ := data.A.nonlinear_jet_profiles i hi S.isOpen hSc P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B ((R+2)+(2*(N+(R+2)+1)+1))) (hB _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨ηn,hηn,_,hnsmall⟩ := primitive_normal_threshold hb hbln hε Dn + refine ⟨b,u,min η (min η₀ ηn),L,C+D,P 0+P R+Dmap,c,P,hb,hb16,hu,lt_min hη (lt_min hη₀ hηn), + (min_le_left _ _).trans hη1,hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,hc,hP,?_⟩ + intro z hz hzη + have hzη' : z < η := hzη.trans_le (min_le_left _ _) + have hz1 : z ≤ 1 := hzη'.le.trans hη1 + have hs : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hs1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hzs : z ≤ z^b := by + have hb1 : b ≤ 1 := by linarith + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hb1 + obtain ⟨G,hG,hclose,hmap,hmean⟩ := hmean z hz hzη' + have hGQ : MapsTo (lowJet (data.A.jetChartMap i G ∘ e.symm)) S Q' := + hnear G hG (fun j => ((hclose j).mono_order (by omega)).mono_const + (hsmall z hz (hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)))).le) + have hGv : ∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (data.A.jetChartMap i G ∘ e.symm) p,t) = + SurfaceVelocityFamily.normal (lowJet (data.A.jetChartMap i G ∘ e.symm) p) := by + intro p hp hpK t + exact hv _ (hQ'O (hGQ hp)) (by simpa only [lowJetPosition_lowJet] using hpK) t + obtain ⟨U,hzero,hUs,hrep,hinit,hVs,herror⟩ := hprimitive G hG hGQ K hK hKS hKA hone hGv + let V := data.A.phaseAtlasAnsatz i G e χ U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((R+2)+(2*(N+(R+2)+1)+1)) + have hsolved : data.A.TensorWeightedBound z (R+2) (C*z^(N+(R+2))) + (data.A.atlasPolynomialMetric (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) z G-g.inner) := + fun j => (hmean j).shrink_scale hz.le hz1 + have herr := (herror (z^b) z hz hzs hs1 hjet).2 g.inner g.contMDiff (C*z^(N+(R+2))) hsolved + have htot : 0 ≤ C*z^(N+(R+2))+D*z^(N+(R+2)+1)/(z^b)^lm := by positivity + have hfinal := data.A.tensorWeightedBound_unscaled hz hz1 htot herr + have hincrement := (herror (z^b) z hz hzs hs1 hjet).1 + have hsmallinc : Dmap*z/(z^b)^lm ≤ Dmap := by + apply (div_le_iff₀ (pow_pos hs _)).mpr + exact mul_le_mul_of_nonneg_left (slow_power_dominates_fast hz hz1 hb hblm) hDmap + have hGweighted := data.A.weighted_of_shifted_two hz.le hzs hs1 (hmap R) + have hincweighted : data.A.WeightedBound z R Dmap (V-G) := + fun j => ((hincrement j).mono_order (by omega)).mono_const hsmallinc + have hVweighted := data.A.weightedBound_add hG ((hVs z).sub hG) hz.le hGweighted hincweighted + have hvadd : G+(V-G) = V := by abel + change data.A.WeightedBound z R (P R+Dmap) (G+(V-G)) at hVweighted + rw [hvadd] at hVweighted + have hVweighted' : data.A.WeightedBound z R (P 0+P R+Dmap) V := + fun j => (hVweighted j).mono_const (by linarith [hP 0]) + have hshift := data.A.weighted_to_shifted (q := 2) (m := R) hz hz1 + (show 0 ≤ Dmap*z/(z^b)^lm by positivity) + (show data.A.WeightedBound z (2+R) (Dmap*z/(z^b)^lm) (V-G) from by + simpa only [V,Nat.add_comm R 2] using hincrement) + have hshift' : data.A.ShiftedBound 2 R z (Dmap/z^2) (V-G) := by + intro j k hk x + exact (hshift j k hk x).trans (div_le_div_of_nonneg_right hsmallinc (sq_nonneg z)) + have hvmap := data.A.shifted_map_recurrence hG ((hVs z).sub hG) + (hmap 0) (hmap R) hshift' hs hz.le hzs (hP 0) (hP R) + change data.A.ShiftedBound 2 R z (P 0+(z/(z^b))*P R+Dmap/z^2) (G+(V-G)) at hvmap + rw [hvadd] at hvmap + have hvmap' : data.A.ShiftedBound 2 R z ((P 0+P R+Dmap)/z^2) V := by + intro j k hk x + exact (hvmap j k hk x).trans (primitive_shifted_budget hz hz1 hzs (hP 0) (hP R) hDmap) + have hnall : ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + intro p hp + have heq := data.A.phaseAtlasAnsatz_normalTriple i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2 + change NormalFrame.gramDet _ _ ≠ 0 ∧ c < ‖_‖ + rw [show SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p = + SurfaceVelocityFamily.Loop.primitiveNormalTriple + (finiteAnsatz (data.A.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) p from heq] + have hh := hnormal (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) + hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + (hnsmall z hz (hzη.trans_le ((min_le_right _ _).trans (min_le_right _ _)))) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((data.A.jetChartMap i G ∘ e.symm) q)) = + data.A.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hvmap',?_,hnall,?_⟩ + · intro j + apply ((hfinal j).mono_order (by omega)).mono_const + have hlead : C*z^(N+(R+2))/z^(R+2) = C*z^N := by + rw [pow_add,← mul_assoc,mul_div_cancel_right₀ _ (pow_ne_zero _ hz.ne')] + rw [add_div,hlead] + have htail := mul_le_mul_of_nonneg_left + (primitive_tail_power_bound (N := N) (R := R+2) hz hz1 hb hblm) hD + have heq : D*z^(N+(R+2)+1)/(z^b)^lm/z^(R+2) = D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) := by ring + rw [heq] + calc + C*z^N+D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) ≤ C*z^N+D*z^N := add_le_add le_rfl htail + _ = (C+D)*z^N := by ring + · intro p hp + exact data.A.phaseAtlasAnsatz_eventuallyEq i G e hi hχs U hK hKA hzero ℓ (N+(R+2)+1) z hp + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d888a9f5990380b908d198efac7e57a808f6d4f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveSupport.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasAnsatz + +namespace OAI + +/-! Preserve the actual primitive support instead of enlarging it to the +whole atlas patch. The closure also works without a Hausdorff hypothesis. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def phaseSurfaceSupport (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (K : Set JetPolynomial.Base) : Set M := + closure ((chart (i : M)).symm '' (e.symm '' K)) + +lemma phaseSurfaceSupport_subset_weight (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set JetPolynomial.Base} + (hKA : e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + A.phaseSurfaceSupport i e K ⊆ tsupport (A.weight i) := by + apply closure_minimal _ (isClosed_tsupport _) + rintro _ ⟨q,hq,rfl⟩ + obtain ⟨p,hp,rfl⟩ := hKA hq + simpa only [(chart (i : M)).left_inv (A.weight_support i hp)] using hp + +omit [CompactSpace M] in +lemma phaseAtlasAnsatz_tsupport_sub (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {χ : JetPolynomial.Base → ℝ} (hχ : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsCompact K) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + tsupport (A.phaseAtlasAnsatz i F e χ U ℓ L z-F) ⊆ A.phaseSurfaceSupport i e K := by + let H := A.phaseAtlasLocalIncrement i F e χ U ℓ L z + have he : A.phaseAtlasAnsatz i F e χ U ℓ L z-F = restore (i : M) (A.outer i) H := by + funext p + change F p+restore (i : M) (A.outer i) H p-F p = _ + abel + rw [he] + apply closure_minimal _ isClosed_closure + intro p hp + by_cases hs : p ∈ (chart (i : M)).source + · have hn : H (chart (i : M) p) ≠ 0 := by + intro hz + apply hp + simp only [restore,indicator_of_mem hs,hz,smul_zero] + have hmem := A.phaseAtlasLocalIncrement_support i F e hi hχ U hK hzero ℓ L z + (subset_tsupport H hn) + apply subset_closure + exact ⟨chart (i : M) p,hmem,(chart (i : M)).left_inv hs⟩ + · exact False.elim (hp (by simp only [restore,indicator_of_notMem hs])) + +omit [CompactSpace M] in +lemma phaseAtlasAnsatz_eventuallyEq_precise (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {χ : JetPolynomial.Base → ℝ} (hχ : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsCompact K) + (hzero : ∀ j x, x ∉ K → (U j).val x = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {p : M} (hp : p ∉ A.phaseSurfaceSupport i e K) : + A.phaseAtlasAnsatz i F e χ U ℓ L z =ᶠ[𝓝 p] F := by + have hz := notMem_tsupport_iff_eventuallyEq.mp + (fun h => hp (A.phaseAtlasAnsatz_tsupport_sub i F e hi hχ U hK hzero ℓ L z h)) + filter_upwards [hz] with q hq + change A.phaseAtlasAnsatz i F e χ U ℓ L z q-F q = 0 at hq + exact sub_eq_zero.mp hq + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1d8a0a6aba54789cfffdb00dc83517e8898311b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhasePrimitiveTensor.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedTensorPullbackBound +import OAI.Geometry.Immersion.ClosedSurface.MetricCoordinates + +namespace OAI + +/-! The transported primitive is the square of the actual first phase +covector, with its supported amplitude. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.JetPolynomial + +def firstPhaseCovector (T : Base → Base) (x : Base) : SmallModes.Base := + ((fderiv ℝ T x (coordinateVector 0)) 0,(fderiv ℝ T x (coordinateVector 1)) 0) + +lemma tensorCoordinatePullback_first_square (T : Base → Base) (x : Base) (a : ℝ) : + tensorCoordinatePullbackValue T x ![a^2,0,0] = + a^2 • PhaseGeometry.covectorSquare (firstPhaseCovector T x) := by + have hx : planeCoordinateIsometry.symm SmallModes.dx = coordinateVector 0 := by + ext i + fin_cases i <;> rfl + have hy : planeCoordinateIsometry.symm SmallModes.dy = coordinateVector 1 := by + ext i + fin_cases i <;> rfl + ext k + rw [← tensorCoordinateJacobian_sum,Fin.sum_univ_three] + fin_cases k <;> simp [tensorCoordinateJacobian,firstPhaseCovector, + PhaseGeometry.covectorSquare,PhaseMean.firstDirection,PhaseMean.secondDirection, + hx,hy] <;> ring + +lemma localizedTensorPullback_first_square (T : Base → Base) (χ a : Base → ℝ) (x : Base) : + localizedTensorPullback T χ (fun y => ![a y^2,0,0]) x = + (χ x * (a (T x))^2) • PhaseGeometry.covectorSquare (firstPhaseCovector T x) := by + rw [localizedTensorPullback,tensorCoordinatePullback_first_square,smul_smul] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseProfileStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseProfileStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..e5312084812d2f0130eb064c896d94147b517530 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PhaseProfileStability.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCompositionBound + +namespace OAI + +/-! Stability of the five derivative profiles after a fixed nonlinear change +of coordinates, with a constant independent of the fast scale. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates WeightedEstimates PeriodicExpansion + +lemma primitiveJetProfile_bound_on {f : JetPolynomial.Base → Euclidean} + {S : Set JetPolynomial.Base} (hS : IsOpen S) + (hf : ContDiff ℝ ∞ f) {C z : ℝ} (hC : 0 ≤ C) (hz : 0 ≤ z) (hz1 : z ≤ 1) + (hb : WeightedBound S 1 2 C f) {p : JetPolynomial.Base} (hp : p ∈ S) : + ‖primitiveJetProfile f z p‖ ≤ C := by + have hw (vs : List (Fin 2)) (hlen : vs.length ≤ 2) : + ‖iteratedDirectional (vs.map coordinateVector) f p‖ ≤ C := by + have hv : ∀ v ∈ vs.map coordinateVector, ‖v‖ ≤ 1 := by + intro v hv + obtain ⟨j,_,rfl⟩ := List.mem_map.mp hv + exact norm_coordinateVector_le j + have hb' : WeightedBound S 1 (0+(vs.map coordinateVector).length) C f := + hb.mono_order (by simpa only [zero_add,List.length_map] using hlen) + have hh := hb'.iteratedDirectional hS zero_lt_one hC hf.contDiffOn + (vs.map coordinateVector) hv 0 + simpa only [one_pow,div_one] using hh.norm_le hp + have hx : ‖directionalMap f (coordinateVector 0) p‖ ≤ C := by + dsimp only [directionalMap] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [0] (by decide) + have hy : ‖directionalMap f (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1] (by decide) + have hdir (v : JetPolynomial.Base) : directionalMap f v = (fun q => fderiv ℝ f q v) := rfl + have hxx : ‖directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 0) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [0,0] (by decide) + have hxy : ‖directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1,0] (by decide) + have hyy : ‖directionalMap (directionalMap f (coordinateVector 1)) (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1,1] (by decide) + apply (pi_norm_le_iff_of_nonneg hC).mpr + intro i + fin_cases i + · exact hx + · exact hy + · exact hyy + · exact hxy + · change ‖z • directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 0) p‖ ≤ C + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hz] + exact (mul_le_mul_of_nonneg_left hxx hz).trans (mul_le_of_le_one_left hC hz1) + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceVelocityFamily.Loop +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phase_profile_correction_bound (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ∀ C z : ℝ, 0 ≤ C → 0 ≤ z → z ≤ 1 → A.WeightedBound 1 2 C (G-F) → + ∀ p ∈ S, + ‖primitiveJetProfile (A.vectorChartRead i G ∘ T) z p- + primitiveJetProfile (A.vectorChartRead i F ∘ T) z p‖ ≤ D*C := by + obtain ⟨D₀,hD₀,hd⟩ := A.vectorChartRead_bound (V := Space) i 2 + obtain ⟨D₁,hD₁,hcomp⟩ := compact_composition_bound (E := Space) hT hS hSc 2 + refine ⟨D₁*D₀,mul_nonneg (by linarith) hD₀,?_⟩ + intro F G hF hG C z hC hz hz1 hdiff p hp + have hb := hd (G-F) 1 C zero_lt_one le_rfl hC (hG.sub hF) hdiff + have hc := hcomp (A.vectorChartRead i (G-F)) (D₀*C) + (mul_nonneg hD₀ hC) (A.vectorChartRead_smooth i (hG.sub hF)) hb + have hid : A.vectorChartRead i (G-F) ∘ T = + (A.vectorChartRead i G ∘ T)-(A.vectorChartRead i F ∘ T) := by + rw [A.vectorChartRead_sub] + rfl + rw [hid] at hc + rw [← primitiveJetProfile_sub ((A.vectorChartRead_smooth i hG).comp hT) + ((A.vectorChartRead_smooth i hF).comp hT)] + have hh := primitiveJetProfile_bound_on hS + (((A.vectorChartRead_smooth i hG).comp hT).sub ((A.vectorChartRead_smooth i hF).comp hT)) + (mul_nonneg (by linarith : 0 ≤ D₁) (mul_nonneg hD₀ hC)) hz hz1 hc hp + change ‖primitiveJetProfile ((A.vectorChartRead i G ∘ T)-(A.vectorChartRead i F ∘ T)) z p‖ ≤ + D₁*(D₀*C) at hh + exact hh.trans_eq (mul_assoc D₁ D₀ C).symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveAtlasPrimitives.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveAtlasPrimitives.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d47cfdadbfe5597d0c555b87139f57dfa88f12e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveAtlasPrimitives.lean @@ -0,0 +1,170 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PositiveSmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDifferential + +namespace OAI + +/-! The normalized atlas gives an actual finite positive primitive family. +The amplitudes are smooth and supported in the original chart supports; +their rank-one tensors sum exactly to the given symmetric tensor. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance positivePrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance positivePrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance positivePrimitiveDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance positivePrimitiveDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance positivePrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance positivePrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) (P : A.centers → PhaseBasis) + (u : ∀ p : M, CovariantTwoTensor p) + +def positivePrimitiveAmplitude (a : A.centers × Fin 3) : M → ℝ := + A.positiveAtlas.rootPhaseAmplitude a.1 ((P a.1).Q a.2) 1 u + +def positivePrimitiveTensor (a : A.centers × Fin 3) (p : M) : CovariantTwoTensor p := + (A.positivePrimitiveAmplitude P u a p)^2 • + A.bundleRestore A.tensorTriv a.1 + (fun _ => fiberFromThree (covectorSquare ((P a.1).ξ a.2))) p + +lemma positivePrimitiveAmplitude_nonneg (a : A.centers × Fin 3) (p : M) : + 0 ≤ A.positivePrimitiveAmplitude P u a p := by + exact mul_nonneg (A.positiveWeight_nonneg a.1 p) + (div_nonneg (Real.sqrt_nonneg _) zero_le_one) + +lemma positivePrimitiveAmplitude_support (a : A.centers × Fin 3) : + tsupport (A.positivePrimitiveAmplitude P u a) ⊆ tsupport (A.weight a.1) := by + simpa only [positivePrimitiveAmplitude, A.positiveAtlas_weight_tsupport] using + A.positiveAtlas.rootPhaseAmplitude_support a.1 ((P a.1).Q a.2) 1 u + +lemma positivePrimitiveAmplitude_pos_iff + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) (p : M) : + 0 < A.positivePrimitiveAmplitude P u a p ↔ A.weight a.1 p ≠ 0 := by + constructor + · intro hp hw + have hz : A.positivePrimitiveAmplitude P u a p = 0 := by + simp only [positivePrimitiveAmplitude, rootPhaseAmplitude, positiveAtlas, + positiveWeight, hw, zero_pow (by decide : 2 ≠ 0), zero_div, zero_mul] + exact (ne_of_gt hp) hz + · intro hp + have hq := hpos a.1 a.2 p (subset_tsupport _ hp) + exact mul_pos ((A.positiveWeight_pos_iff a.1 p).mpr hp) + (div_pos (Real.sqrt_pos.mpr hq) zero_lt_one) + +lemma positivePrimitiveAmplitude_tsupport + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) : + tsupport (A.positivePrimitiveAmplitude P u a) = tsupport (A.weight a.1) := by + change closure (Function.support _) = closure (Function.support _) + congr 1 + ext p + change A.positivePrimitiveAmplitude P u a p ≠ 0 ↔ A.weight a.1 p ≠ 0 + constructor + · intro ha + exact (A.positivePrimitiveAmplitude_pos_iff P u hpos a p).mp + (lt_of_le_of_ne (A.positivePrimitiveAmplitude_nonneg P u a p) (Ne.symm ha)) + · intro hw + exact ne_of_gt ((A.positivePrimitiveAmplitude_pos_iff P u hpos a p).mpr hw) + +lemma positivePrimitiveTensor_apply (a : A.centers × Fin 3) (p : M) + (v w : TangentSpace planeModel p) : + A.positivePrimitiveTensor P u a p v w = + (A.positivePrimitiveAmplitude P u a p)^2 * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p w) := by + by_cases ha : A.positivePrimitiveAmplitude P u a p = 0 + · simp only [positivePrimitiveTensor, ha, zero_pow (by decide : 2 ≠ 0), + zero_smul, zero_apply] + let dv : ℝ := mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p v + let dw : ℝ := mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p w + change (0 : ℝ) = (0 : ℝ) * dv * dw + exact ((congrArg (fun x : ℝ => x * dw) (zero_mul dv)).trans (zero_mul dw)).symm + · have hp := A.positivePrimitiveAmplitude_support P u a (subset_tsupport _ ha) + change (A.positivePrimitiveAmplitude P u a p)^2 * + A.bundleRestore A.tensorTriv a.1 + (fun _ => fiberFromThree (covectorSquare ((P a.1).ξ a.2))) p v w = _ + rw [A.tensorRestore_covectorSquare a.1 _ (A.weight_support a.1 hp), A.outer_one a.1 p hp] + ring + +lemma positivePrimitiveTensor_symmetric (a : A.centers × Fin 3) (p : M) + (v w : TangentSpace planeModel p) : + A.positivePrimitiveTensor P u a p v w = A.positivePrimitiveTensor P u a p w v := by + rw [A.positivePrimitiveTensor_apply, A.positivePrimitiveTensor_apply] + ring + +lemma positivePrimitiveTensor_nonneg (a : A.centers × Fin 3) (p : M) + (v : TangentSpace planeModel p) : 0 ≤ A.positivePrimitiveTensor P u a p v v := by + rw [A.positivePrimitiveTensor_apply] + nlinarith [sq_nonneg (A.positivePrimitiveAmplitude P u a p * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p v))] + +theorem sum_positivePrimitiveTensor + (hu : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) (p : M) : + (∑ a : A.centers × Fin 3, A.positivePrimitiveTensor P u a p) = u p := by + have hp : ∀ i j p, p ∈ tsupport (A.positiveAtlas.weight i) → + 0 ≤ (P i).Q j (A.positiveAtlas.tensorChartRead i u (chart (i : M) p)) := by + intro i j p hp + exact hpos i j p ((A.positiveAtlas_weight_tsupport i) ▸ hp) + rw [← Finset.univ_product_univ, Finset.sum_product] + have hd := A.positiveAtlas.global_rootPhase_decomposition P (fun _ _ => 1) u hu + (fun _ _ => one_ne_zero) hp p + simp only [one_pow, mul_one] at hd + convert hd using 1 + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + rfl + +variable [CompactSpace M] + +lemma positivePrimitiveAmplitude_hasCompactSupport (a : A.centers × Fin 3) : + HasCompactSupport (A.positivePrimitiveAmplitude P u a) := + (isClosed_tsupport _).isCompact + +lemma positivePrimitiveAmplitude_smooth + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.positivePrimitiveAmplitude P u a) := by + apply A.positiveAtlas.rootPhaseAmplitude_smooth a.1 ((P a.1).Q a.2) 1 hu + intro p hp + exact hpos a.1 a.2 p ((A.positiveAtlas_weight_tsupport a.1) ▸ hp) + +lemma positivePrimitiveTensor_smooth + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.positivePrimitiveTensor P u a p)) := by + exact ((A.positivePrimitiveAmplitude_smooth P u hu hpos a).pow 2).smul_section + (A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain a.1 contDiff_const) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveDensityTurns.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveDensityTurns.lean new file mode 100644 index 0000000000000000000000000000000000000000..c66845461ccb15c087517bc46272cbbb13723cb2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PositiveDensityTurns.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveDensityReparam + +namespace OAI + +/-! Positive changes of circle coordinate preserve stationary points and their spatial jets. -/ +noncomputable section +open Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PositiveDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + {ρ : B × ℝ → ℝ} {U : Set B} + +lemma hasDerivAt_inverseClock (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) {b : B} (hb : b ∈ U) (θ : ℝ) : + HasDerivAt (inverseClock ρ b) (ρ (b, inverseClock ρ b θ))⁻¹ θ := by + have hi : Differentiable ℝ (inverseClock ρ b) := + (LocalPeriodicCalculus.smooth_slice hU + (inverseClock_smoothOn hU hρ hpos hper hmass) hb).differentiable (by simp) + have hc := (hasDerivAt_clock hU hρ hb (inverseClock ρ b θ)).comp θ (hi θ).hasDerivAt + have hid : (fun x => clock ρ b (inverseClock ρ b x)) = id := + funext (clock_inverseClock hU hρ hper hmass hb) + change HasDerivAt (fun x => clock ρ b (inverseClock ρ b x)) _ θ at hc + rw [hid] at hc + have heq : ρ (b, inverseClock ρ b θ) * deriv (inverseClock ρ b) θ = 1 := + hc.unique (hasDerivAt_id θ) + convert (hi θ).hasDerivAt using 1 + apply mul_left_cancel₀ (hpos b hb (inverseClock ρ b θ)).ne' + rw [mul_inv_cancel₀ (hpos b hb (inverseClock ρ b θ)).ne', heq] + +lemma deriv_reparametrize_eq_zero_iff + (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {F : B × ℝ → ℝ} (hF : ContDiffOn ℝ ∞ F (U ×ˢ univ)) + {b : B} (hb : b ∈ U) (θ : ℝ) : + deriv (fun t => reparametrize ρ F (b, t)) θ = 0 ↔ + deriv (fun t => F (b, t)) (inverseClock ρ b θ) = 0 := by + have hf := (LocalPeriodicCalculus.smooth_slice hU hF hb).differentiable (by simp) + have hd := (hf (inverseClock ρ b θ)).hasDerivAt.comp θ + (hasDerivAt_inverseClock hU hρ hpos hper hmass hb θ) + change deriv ((fun t => F (b, t)) ∘ inverseClock ρ b) θ = 0 ↔ _ + rw [hd.deriv] + simp [(hpos b hb (inverseClock ρ b θ)).ne'] + +variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- At a turn, the extra spatial chain-rule term from the inverse clock is zero. -/ +theorem spatial_derivative_at_turn + (hU : IsOpen U) (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + {F : B × ℝ → E} (hF : ContDiffOn ℝ ∞ F (U ×ˢ univ)) + {b : B} (hb : b ∈ U) (θ : ℝ) + (hzero : fderiv ℝ F (b, inverseClock ρ b θ) (0, 1) = 0) (v : B) : + fderiv ℝ (fun x => reparametrize ρ F (x, θ)) b v = + fderiv ℝ (fun x => F (x, inverseClock ρ b θ)) b v := by + have hInv : ContDiffAt ℝ ∞ (fun z : B × ℝ => inverseClock ρ z.1 z.2) (b, θ) := + (inverseClock_smoothOn hU hρ hpos hper hmass).contDiffAt + ((hU.prod isOpen_univ).mem_nhds ⟨hb, mem_univ θ⟩) + have hi : DifferentiableAt ℝ (fun x => inverseClock ρ x θ) b := + (hInv.comp b (contDiff_id.prodMk contDiff_const).contDiffAt).differentiableAt (by simp) + have hF' : DifferentiableAt ℝ F (b, inverseClock ρ b θ) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hb, mem_univ _⟩)).differentiableAt (by simp) + have hd := hF'.hasFDerivAt.comp b ((hasFDerivAt_id b).prodMk hi.hasFDerivAt) + have hf := hF'.hasFDerivAt.comp b (hasFDerivAt_prodMk_left (𝕜 := ℝ) b (inverseClock ρ b θ)) + simp only [id_eq] at hd + change fderiv ℝ (F ∘ fun x => (x, inverseClock ρ x θ)) b v = + fderiv ℝ (F ∘ fun x => (x, inverseClock ρ b θ)) b v + rw [hd.fderiv, hf.fderiv] + change fderiv ℝ F (b, inverseClock ρ b θ) + (v, fderiv ℝ (fun x => inverseClock ρ x θ) b v) = + fderiv ℝ F (b, inverseClock ρ b θ) (v, 0) + rw [show (v, fderiv ℝ (fun x => inverseClock ρ x θ) b v) = + (v, 0) + (fderiv ℝ (fun x => inverseClock ρ x θ) b v) • (0, 1) by simp] + rw [map_add, map_smul, hzero, smul_zero, add_zero] + +end ClosedSurfaceR4.PositiveDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedAnalyticProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedAnalyticProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cb2165fe6891cc84e9cd0483cd954c7bccf6bf9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedAnalyticProfiles.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.IntrinsicPhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.ActualAnalyticProfiledLoop + +namespace OAI + +/-! The supported geometric loop for a genuine centered phase and the +prepared finite family of coordinate circles. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry SurfaceVelocityFamily VelocityFrame NormalFrame SurfaceJetCoordinates GeometryPreservation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι : Type*} [Fintype ι] + +theorem prepared_circular_analytic_profiles + (q : M) (center : ι → M) (r : ι → ℝ) (hr : ∀ i, 0 < r i) + (hreg : ∀ i, circularCoordinateRegion (center i) (r i) ⊆ (coordinateChart (center i)).target) + (ell : Base) (L R : ℝ) (hpair : (circularCrossingSet center r).Finite) + (htang : ∀ i, (circularPhaseTangencies q (center i) ell L (r i) R).Finite) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) (hn : ContDiffOn ℝ ∞ n e.source) + (hI : ∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) + (hN : ∀ x ∈ e.source, (∀ v, fderiv ℝ F x v ⬝ᵥ n x = 0) ∧ n x ⬝ᵥ n x = 1) + (hHess : ∀ x ∈ e.source, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (inducedCoordinateMetric F) + (centeredConvexPhase ell L (coordinateChart q q)) x v v) + {T K : Set Base} (hT : IsCompact T) (hTe : T ⊆ e.target) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → ∀ v : Base, v ≠ 0 → + realSecondForm F v v (e.symm p) ≠ 0 ∧ + normalize (realSecondForm F v v (e.symm p)) ≠ -n (e.symm p)) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hcover : ∀ x ∈ K, ∃ i, (coordinateChart q).symm (e.symm x) ∈ circularBoundary (center i) (r i)) + (hregion : ∀ x ∈ K, (coordinateChart q).symm (e.symm x) ∈ circularDiskClosure q R) + : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → + ∃ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection (F ∘ e.symm) '' T ⊆ Z ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ + (∀ j ∈ Z, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∃ O : TopologicalSpace.Opens JetPolynomial.LowJet, (O : Set JetPolynomial.LowJet) ⊆ jetDomain Z ∧ + ∃ l : Loop O, + IsCompact (JetPolynomial.lowJet ((F ∘ e.symm) ∘ baseEquiv) '' (baseEquiv ⁻¹' T)) ∧ + JetPolynomial.lowJet ((F ∘ e.symm) ∘ baseEquiv) '' (baseEquiv ⁻¹' T) ⊆ O ∧ + l.HasSpatialAmplitude (a ∘ baseEquiv) ∧ + (∀ J ∈ O, a (baseEquiv (JetPolynomial.lowJetPosition J)) = 0 → + ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, + let J := surfaceCircularProfile (F ∘ e.symm) a e₁ e₂ α (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (profileCoefficients J 3 = 0 → H+2 < |profileCoefficients J 2|) := by + obtain ⟨P,hP,hPK,hlocal⟩ := prepared_circular_definers q center r hr hreg ell L R + hpair htang e he hi hdom hphase (hKT.trans hTe) hcover hregion + have hg := inverse_phase_chart_geometry hF + (centeredConvexPhase_smooth ell L (coordinateChart q q)) e he hi hphase hI hN hHess + have hn' : ContDiffOn ℝ ∞ (n ∘ e.symm) e.target := + hn.comp hi.contDiffOn (fun _ hp => e.map_target hp) + exact actual_analytic_surface_loop_profiles (hF.comp hi) ha hT e.open_target hTe hn' + (fun p hp => (hg p hp).1) (fun p hp => (hg p hp).2.1) (fun p hp => (hg p hp).2.2) + haT (fun p hp hz => inverse_phase_chart_antipode hF e he hi (hTe hp) + (hI _ (e.map_target (hTe hp))) (hboundary p hp hz)) + hK hKT haK hP hPK hlocal + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..468fee8fe47bd2f001d36211d3f93aa662d735b2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDefiners.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseLocalDefiner +import OAI.Geometry.SurfaceImmersion.Primitive.TransverseCircularRadii + +namespace OAI + +/-! Generic circle crossings and phase tangencies give exactly the finite +exception set used by the supported angular-loop construction. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι : Type*} [Fintype ι] + +lemma prepared_circular_definers (q : M) (center : ι → M) (r : ι → ℝ) + (hr : ∀ i, 0 < r i) + (hreg : ∀ i, circularCoordinateRegion (center i) (r i) ⊆ (coordinateChart (center i)).target) + (ell : Base) (L R : ℝ) + (hpair : (circularCrossingSet center r).Finite) + (htang : ∀ i, (circularPhaseTangencies q (center i) ell L (r i) R).Finite) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {K : Set Base} (hK : K ⊆ e.target) + (hcover : ∀ x ∈ K, ∃ i, (coordinateChart q).symm (e.symm x) ∈ circularBoundary (center i) (r i)) + (hregion : ∀ x ∈ K, (coordinateChart q).symm (e.symm x) ∈ circularDiskClosure q R) : + ∃ P : Set Base, P.Finite ∧ P ⊆ K ∧ + ∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ g : Base → ℝ, ContDiffOn ℝ ∞ g N ∧ (∀ x ∈ K ∩ N, g x = 0) ∧ + fderiv ℝ g p dy ≠ 0 := by + let m : Base → M := fun x => (coordinateChart q).symm (e.symm x) + let B : Set M := circularCrossingSet center r ∪ + ⋃ i, circularPhaseTangencies q (center i) ell L (r i) R + have hB : B.Finite := hpair.union (Set.finite_iUnion htang) + let P : Set Base := K ∩ (fun z : M => e (coordinateChart q z)) '' B + have hP : P.Finite := (hB.image _).subset inter_subset_right + have hinverse (x : Base) (hx : x ∈ K) : e (coordinateChart q (m x)) = x := by + dsimp only [m] + rw [(coordinateChart q).right_inv (hdom (e.map_target (hK hx))),e.right_inv (hK hx)] + have hnot (x : Base) (hx : x ∈ K \ P) : m x ∉ B := by + intro hb + exact hx.2 ⟨hx.1,⟨m x,hb,hinverse x hx.1⟩⟩ + refine ⟨P,hP,inter_subset_left,?_⟩ + apply finite_boundary_local_definers (fun i => circularBoundary (center i) (r i)) + (fun i => (circularBoundary_compact (center i) (hr i) (hreg i)).isClosed) m + · intro x hx + exact ((coordinateChart_symm_smoothOn q).contMDiffAt + ((coordinateChart q).open_target.mem_nhds (hdom (e.map_target (hK hx))))).continuousAt.comp + (hi.continuous.continuousAt) + · exact hcover + · intro i j hij x hx hxi hxj + refine ⟨hx,⟨m x,Or.inl ?_,hinverse x hx⟩⟩ + exact mem_iUnion.mpr ⟨⟨(i,j),hij⟩,⟨hxi,hxj⟩⟩ + · intro i x hx hxi + apply circular_boundary_phase_definer q (center i) ell L (r i) e he hi hdom hphase (hK hx.1) hxi + intro hz + apply hnot x hx + exact Or.inr (mem_iUnion.mpr ⟨i,⟨⟨hxi,hregion x hx.1⟩,hz⟩⟩) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDirections.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f524bef2cdcb62332090a58c1b0c001f3212d76 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularDirections.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedPhaseCrossingSlopes +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Primitive.TransverseCircularRadii + +namespace OAI + +/-! The chosen generic phase covectors give nonvertical remaining directions +at every crossing inside the current primitive disk. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [CompactSpace M] [T2Space M] [Fintype ι] [DecidableEq ι] in +lemma boundaryCrossingSet_eq_circular (curves : ι → PhaseBoundaryCurve B) (r : ι → ℝ) + (hc : ∀ j, (curves j).carrier = circularBoundary ((curves j).index : M) (r j)) : + boundaryCrossingSet curves univ = circularCrossingSet (fun j => ((curves j).index : M)) r := by + ext p + constructor + · rintro ⟨j,_,k,_,hjk,hj,hk⟩ + exact mem_iUnion.mpr ⟨⟨(j,k),hjk⟩,by rw [← hc j,← hc k]; exact ⟨hj,hk⟩⟩ + · intro hp + obtain ⟨⟨⟨j,k⟩,hjk⟩,hp⟩ := mem_iUnion.mp hp + exact ⟨j,mem_univ _,k,mem_univ _,hjk,by simpa only [hc] using hp.1, + by simpa only [hc] using hp.2⟩ + +omit [CompactSpace M] [Fintype ι] [DecidableEq ι] in +lemma prepared_circular_direction_first (curves : ι → PhaseBoundaryCurve B) + (r : ι → ℝ) (hr : ∀ j, 0 < r j) + (hc : ∀ j, (curves j).carrier = circularBoundary ((curves j).index : M) (r j)) + (hreg : ∀ j, circularCoordinateRegion ((curves j).index : M) (r j) ⊆ + (coordinateChart ((curves j).index : M)).target) + (hcover : ∀ j x, x ∈ circularCoordinateRegion ((curves j).index : M) (r j) → + baseEquiv.symm x ∈ (curves j).phase.source) + (ell : ι → Base) (L : ι → ℝ) + (hphase : ∀ j x, (baseEquiv ((curves j).phase x)).1 = + centeredConvexPhase (ell j) (L j) (coordinateChart ((curves j).index : M) (curves j).index) + (baseEquiv x)) + (hind : ∀ j k, j ≠ k → ∀ p ∈ circularCrossingSet (fun j => ((curves j).index : M)) r, + p ∈ (coordinateChart ((curves j).index : M)).source → + p ∈ (coordinateChart ((curves k).index : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase ((curves j).index : M) (ell j) (L j) ∘ + (coordinateChart ((curves j).index : M)).symm) (coordinateChart ((curves j).index : M) p)) + (phaseDerivative (centeredAtlasPhase ((curves k).index : M) (ell k) (L k) ∘ + (coordinateChart ((curves j).index : M)).symm) (coordinateChart ((curves j).index : M) p)) ≠ 0) + (a j : ι) (hja : j ≠ a) {p : M} + (hp : p ∈ boundaryCrossingSet curves univ ∩ circularCoordinateDisk ((curves a).index : M) (r a)) + (hpj : p ∈ (curves j).carrier) : ((curves j).directionIn (curves a) p).1 ≠ 0 := by + have hps := B.circular_closed_disk_phase_source (curves a).index (hr a) (hreg a) + (curves a).phase (hcover a) (subset_closure hp.2) + have hqj : p ∈ (coordinateChart ((curves j).index : M)).source := by + rw [coordinateChart_source,← chart_source] + exact ((curves j).source hpj).1 + have hqa : p ∈ (coordinateChart ((curves a).index : M)).source := by + rw [coordinateChart_source,← chart_source] + exact hps.1 + apply (curves j).directionIn_first_ne_of_covectors (curves a) ((curves j).index : M) + (centeredAtlasPhase ((curves j).index : M) (ell j) (L j)) + (centeredAtlasPhase ((curves a).index : M) (ell a) (L a)) + (centeredPhase_first _ _ _ _ (hphase j)) (centeredPhase_first _ _ _ _ (hphase a)) + hqj hpj hps + apply hind j a hja p _ hqj hqa + rw [← boundaryCrossingSet_eq_circular curves r hc] + exact hp.1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularFamilyGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularFamilyGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..5aaea6327f50ec59a43c84e1ae9849e3bd2518dc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularFamilyGeometry.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyGeometry + +namespace OAI + +/-! Selection of the whole finite circular geometry, before amplitudes are known. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + theorem prepared_circular_family_geometry (P : ι → Set Base) + (hP : ∀ i, IsCompact (P i)) (hP0 : ∀ i ell, ell ∈ P i → ell ≠ 0) + (L : ι → ℝ) (hL : ∀ i, 0 < L i) : + ∃ R : ι → ℝ, (∀ i, 0 < R i) ∧ + ∀ (index : ι → A.centers) (r₀ lo hi : ι → ℝ), + (∀ i, 0 < lo i) → (∀ i, lo i < hi i) → (∀ i, hi i < r₀ i) → + (∀ i, r₀ i ≤ R i) → + (∀ i p, 0 < A.weight (index i) p ↔ p ∈ circularCoordinateDisk (index i : M) (r₀ i)) → + (∀ i, circularCoordinateRegion (index i : M) (r₀ i) ⊆ (coordinateChart (index i : M)).target) → + ∀ U : Set (ι → Base), IsOpen U → U.Nonempty → (∀ ell ∈ U, ∀ i, ell i ∈ P i) → + ∃ d : CircularFamilyGeometry A ι, + d.linearPart ∈ U ∧ (∀ i, lo i < d.radius i ∧ d.radius i < hi i) ∧ + (∀ i, (d.curves i).index = index i) ∧ + d.outerRadius = r₀ ∧ d.chartRadius = r₀ ∧ d.convexPart = L := by + obtain ⟨R,hR,hchoose⟩ := A.prepared_circular_phase_curves P hP hP0 L hL + refine ⟨R,hR,?_⟩ + intro index r₀ lo hi hlo hlohi hhi hrR hpos hreg U hU hne hUP + obtain ⟨r,ell,curves,hell,hr,hindex,hcarrier,hphase,hcover,hcross,htriple,htrans,htan,hind⟩ := + hchoose index r₀ lo hi hlo hlohi hhi hrR hpos hreg U hU hne hUP + have hrpos (a : ι) : 0 < r a := (hlo a).trans (hr a).1 + have hrr₀ (a : ι) : r a < r₀ a := (hr a).2.trans (hhi a) + have hc (a : ι) : (curves a).carrier = circularBoundary ((curves a).index : M) (r a) := by + simpa only [hindex] using hcarrier a + have hreg' (a : ι) : circularCoordinateRegion ((curves a).index : M) (r a) ⊆ + (coordinateChart ((curves a).index : M)).target := by + simp only [hindex] + intro x hx + apply hreg a + change circularRadiusSquared (coordinateChart (index a : M) (index a)) x ≤ (r a)^2 at hx + change circularRadiusSquared (coordinateChart (index a : M) (index a)) x ≤ (r₀ a)^2 + exact hx.trans (by nlinarith [hrpos a,hrr₀ a]) + have hsubset : boundaryCrossingSet curves univ ⊆ circularCrossingSet (fun a => (index a : M)) r := by + rintro p ⟨a,_,b,_,hab,hpa,hpb⟩ + apply mem_iUnion.mpr + exact ⟨⟨(a,b),hab⟩,by rw [← hcarrier a,← hcarrier b]; exact ⟨hpa,hpb⟩⟩ + let d : CircularFamilyGeometry A ι := { + curves := curves, radius := r, outerRadius := r₀, chartRadius := r₀, + linearPart := ell, convexPart := L, + radius_pos := hrpos, + radius_outer := fun a => by nlinarith [hrpos a,hrr₀ a], + radius_chart := hrr₀, + weight_positive := fun a => by simpa only [hindex] using hpos a, + region := hreg', carrier := hc, + cover := fun a => by simpa only [hindex] using hcover a, + first_coordinate := fun a => by simpa only [hindex] using hphase a, + pair_finite := fun a b hab => hcross.subset (fun p hp => hsubset + (boundaryCrossingSet_pair curves (mem_univ a) (mem_univ b) hab hp.1 hp.2)), + triple_empty := htriple, + tangencies_finite := fun a b => by simpa only [hindex] using htan a b, + independent := by + intro a b hab p hp hpa hpb + simpa only [hindex] using hind a b hab p (hsubset hp) + (by simpa only [hindex] using hpa) (by simpa only [hindex] using hpb) } + exact ⟨d,hell,hr,hindex,rfl,rfl,rfl⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularPhaseCurves.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularPhaseCurves.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6df52c60eac216e34549aa24cad0cebc6bf1c01 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularPhaseCurves.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformCircularPhaseCharts +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteCircularPreparation + +namespace OAI + +/-! Actual fixed phase-curve families after generic radius and phase +selection. The admissible chart radii are fixed before either selection. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem prepared_circular_phase_curves (P : ι → Set Base) + (hP : ∀ i, IsCompact (P i)) (hP0 : ∀ i ell, ell ∈ P i → ell ≠ 0) + (L : ι → ℝ) (hL : ∀ i, 0 < L i) : + ∃ R : ι → ℝ, (∀ i, 0 < R i) ∧ + ∀ (index : ι → A.centers) (r₀ lo hi : ι → ℝ), + (∀ i, 0 < lo i) → (∀ i, lo i < hi i) → (∀ i, hi i < r₀ i) → + (∀ i, r₀ i ≤ R i) → + (∀ i p, 0 < A.weight (index i) p ↔ p ∈ circularCoordinateDisk (index i : M) (r₀ i)) → + (∀ i, circularCoordinateRegion (index i : M) (r₀ i) ⊆ (coordinateChart (index i : M)).target) → + ∀ U : Set (ι → Base), IsOpen U → U.Nonempty → (∀ ell ∈ U, ∀ i, ell i ∈ P i) → + ∃ (r : ι → ℝ) (ell : ι → Base) (curves : ι → PhaseBoundaryCurve A), + ell ∈ U ∧ (∀ i, lo i < r i ∧ r i < hi i) ∧ + (∀ i, (curves i).index = index i) ∧ + (∀ i, (curves i).carrier = circularBoundary (index i : M) (r i)) ∧ + (∀ i x, (baseEquiv ((curves i).phase x)).1 = + centeredConvexPhase (ell i) (L i) (coordinateChart (index i : M) (index i)) (baseEquiv x)) ∧ + (∀ i x, x ∈ circularCoordinateRegion (index i : M) (r i) → + baseEquiv.symm x ∈ (curves i).phase.source) ∧ + (circularCrossingSet (fun i => (index i : M)) r).Finite ∧ + (∀ i j k, i ≠ j → i ≠ k → j ≠ k → + (curves i).carrier ∩ (curves j).carrier ∩ (curves k).carrier = ∅) ∧ + (∀ i j, i ≠ j → ∀ p ∈ (curves i).carrier ∩ (curves j).carrier, + ∃ q : M, p ∈ (coordinateChart q).source ∧ + covectorDet (circularNormalCovector (index i : M) q p) + (circularNormalCovector (index j : M) q p) ≠ 0) ∧ + (∀ i j, (circularPhaseTangencies (index i : M) (index j : M) + (ell i) (L i) (r j) (r i)).Finite) ∧ + (∀ i j, i ≠ j → ∀ p ∈ circularCrossingSet (fun k => (index k : M)) r, + p ∈ (coordinateChart (index i : M)).source → p ∈ (coordinateChart (index j : M)).source → + covectorDet + (phaseDerivative (centeredAtlasPhase (index i : M) (ell i) (L i) ∘ + (coordinateChart (index i : M)).symm) (coordinateChart (index i : M) p)) + (phaseDerivative (centeredAtlasPhase (index j : M) (ell j) (L j) ∘ + (coordinateChart (index i : M)).symm) (coordinateChart (index i : M) p)) ≠ 0) := by + choose R hR hcharts using fun i => uniform_circular_phase_charts (M := M) (hP i) (hP0 i) (hL i) + refine ⟨R,hR,?_⟩ + intro index r₀ lo hi hlo hlohi hhi hrR hpos hreg U hU hne hUP + obtain ⟨r,ell,hell,hr,hcross,htriple,htrans,htangent,hind⟩ := + A.finite_circular_preparation index r₀ lo hi L hlo hlohi hhi hpos hreg U hU hne + have hrpos (i : ι) : 0 < r i := (hlo i).trans (hr i).1 + have hr0 (i : ι) : r i < r₀ i := (hr i).2.trans (hhi i) + have hrreg (i : ι) : circularCoordinateRegion (index i : M) (r i) ⊆ + (coordinateChart (index i : M)).target := by + intro x hx + apply hreg i + change circularRadiusSquared (coordinateChart (index i : M) (index i)) x ≤ (r i)^2 at hx + change circularRadiusSquared (coordinateChart (index i : M) (index i)) x ≤ (r₀ i)^2 + exact hx.trans (by nlinarith [hrpos i,hr0 i]) + choose e he hei hephase hecover using fun i => hcharts i (index i) (ell i) (hUP ell hell i) + have hcover (i : ι) : ∀ x ∈ circularCoordinateRegion (index i : M) (r i), + baseEquiv.symm x ∈ (e i).source := + hecover i (r i) (hrpos i).le ((hr0 i).le.trans (hrR i)) + let curves : ι → PhaseBoundaryCurve A := fun i => + A.circularPhaseBoundaryCurve (index i) (hrpos i) (by nlinarith [hrpos i,hr0 i]) + (hpos i) (hrreg i) (e i) (he i) (hei i) (hcover i) + refine ⟨r,ell,curves,hell,hr,(fun _ => rfl),(fun _ => rfl),hephase,hcover, + hcross,htriple,htrans,htangent,hind⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a6a68350f50fb48c7dd198234e486b6a4af7594 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedCircularSurfaceLoop.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.IntrinsicPhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.ActualSupportedSurfaceLoop + +namespace OAI + +/-! The supported geometric loop for a genuine centered phase and the +prepared finite family of coordinate circles. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry SurfaceVelocityFamily VelocityFrame NormalFrame SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι : Type*} [Fintype ι] + +theorem prepared_circular_surface_loop + (q : M) (center : ι → M) (r : ι → ℝ) (hr : ∀ i, 0 < r i) + (hreg : ∀ i, circularCoordinateRegion (center i) (r i) ⊆ (coordinateChart (center i)).target) + (ell : Base) (L R : ℝ) (hpair : (circularCrossingSet center r).Finite) + (htang : ∀ i, (circularPhaseTangencies q (center i) ell L (r i) R).Finite) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) (hn : ContDiffOn ℝ ∞ n e.source) + (hI : ∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) + (hN : ∀ x ∈ e.source, (∀ v, fderiv ℝ F x v ⬝ᵥ n x = 0) ∧ n x ⬝ᵥ n x = 1) + (hHess : ∀ x ∈ e.source, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (inducedCoordinateMetric F) + (centeredConvexPhase ell L (coordinateChart q q)) x v v) + {T K : Set Base} (hT : IsCompact T) (hTe : T ⊆ e.target) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → ∀ v : Base, v ≠ 0 → + realSecondForm F v v (e.symm p) ≠ 0 ∧ + normalize (realSecondForm F v v (e.symm p)) ≠ -n (e.symm p)) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hcover : ∀ x ∈ K, ∃ i, (coordinateChart q).symm (e.symm x) ∈ circularBoundary (center i) (r i)) + (hregion : ∀ x ∈ K, (coordinateChart q).symm (e.symm x) ∈ circularDiskClosure q R) + (turn : ℝ) : + ∃ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection (F ∘ e.symm) '' T ⊆ Z ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ + (∀ j ∈ Z, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection (F ∘ e.symm) '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection (F ∘ e.symm) x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection (F ∘ e.symm) y,0)) x dy ∧ + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection (F ∘ e.symm) y,τ x)) x dy := by + obtain ⟨P,hP,hPK,hlocal⟩ := prepared_circular_definers q center r hr hreg ell L R + hpair htang e he hi hdom hphase (hKT.trans hTe) hcover hregion + have hg := inverse_phase_chart_geometry hF + (centeredConvexPhase_smooth ell L (coordinateChart q q)) e he hi hphase hI hN hHess + have hn' : ContDiffOn ℝ ∞ (n ∘ e.symm) e.target := + hn.comp hi.contDiffOn (fun _ hp => e.map_target hp) + exact actual_supported_surface_loop (hF.comp hi) ha hT e.open_target hTe hn' + (fun p hp => (hg p hp).1) (fun p hp => (hg p hp).2.1) (fun p hp => (hg p hp).2.2) + haT (fun p hp hz => inverse_phase_chart_antipode hF e he hi (hTe hp) + (hI _ (e.map_target (hTe hp))) (hboundary p hp hz)) + hK hKT haK hP hPK hlocal turn + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedFixedFrameLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedFixedFrameLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3ba83e9a2281a1482753d9106c63ccb3e0f5edd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedFixedFrameLoop.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.IntrinsicPhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.ActualFixedFrameLoop + +namespace OAI + +/-! The supported geometric loop for a genuine centered phase and the +prepared finite family of coordinate circles. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry SurfaceVelocityFamily VelocityFrame NormalFrame SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {ι : Type*} [Fintype ι] + +theorem prepared_circular_surface_loop_fixed_frame + (q : M) (center : ι → M) (r : ι → ℝ) (hr : ∀ i, 0 < r i) + (hreg : ∀ i, circularCoordinateRegion (center i) (r i) ⊆ (coordinateChart (center i)).target) + (ell : Base) (L R : ℝ) (hpair : (circularCrossingSet center r).Finite) + (htang : ∀ i, (circularPhaseTangencies q (center i) ell L (r i) R).Finite) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hdom : e.source ⊆ (coordinateChart q).target) + (hphase : ∀ x, (e x).1 = centeredConvexPhase ell L (coordinateChart q q) x) + {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) (hn : ContDiffOn ℝ ∞ n e.source) + (hI : ∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) + (hN : ∀ x ∈ e.source, (∀ v, fderiv ℝ F x v ⬝ᵥ n x = 0) ∧ n x ⬝ᵥ n x = 1) + (hHess : ∀ x ∈ e.source, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (inducedCoordinateMetric F) + (centeredConvexPhase ell L (coordinateChart q q)) x v v) + {T K : Set Base} (hT : IsCompact T) (hTe : T ⊆ e.target) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → ∀ v : Base, v ≠ 0 → + realSecondForm F v v (e.symm p) ≠ 0 ∧ + normalize (realSecondForm F v v (e.symm p)) ≠ -n (e.symm p)) + (hK : IsCompact K) (hKT : K ⊆ T) (haK : ∀ p ∈ K, 0 < a p) + (hcover : ∀ x ∈ K, ∃ i, (coordinateChart q).symm (e.symm x) ∈ circularBoundary (center i) (r i)) + (hregion : ∀ x ∈ K, (coordinateChart q).symm (e.symm x) ∈ circularDiskClosure q R) + : + ∃ Ω : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection (F ∘ e.symm) '' T ⊆ Ω ∧ + (Ω : Set GeometricJet) ⊆ supportedJetDomain e.target (n ∘ e.symm) a ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Ω ∧ ContDiffOn ℝ ∞ e₂ Ω ∧ + (∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + ∀ turn : ℝ, ∃ Z : TopologicalSpace.Opens GeometricJet, + CollarVelocity.jetSection (F ∘ e.symm) '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection (F ∘ e.symm) '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection (F ∘ e.symm) x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection (F ∘ e.symm) y,0)) x dy ∧ + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection (F ∘ e.symm) y,τ x)) x dy := by + obtain ⟨P,hP,hPK,hlocal⟩ := prepared_circular_definers q center r hr hreg ell L R + hpair htang e he hi hdom hphase (hKT.trans hTe) hcover hregion + have hg := inverse_phase_chart_geometry hF + (centeredConvexPhase_smooth ell L (coordinateChart q q)) e he hi hphase hI hN hHess + have hn' : ContDiffOn ℝ ∞ (n ∘ e.symm) e.target := + hn.comp hi.contDiffOn (fun _ hp => e.map_target hp) + exact actual_supported_surface_loop_fixed_frame (hF.comp hi) ha hT e.open_target hTe hn' + (fun p hp => (hg p hp).1) (fun p hp => (hg p hp).2.1) (fun p hp => (hg p hp).2.2) + haT (fun p hp hz => inverse_phase_chart_antipode hF e he hi (hTe hp) + (hI _ (e.map_target (hTe hp))) (hboundary p hp hz)) + hK hKT haK hP hPK hlocal + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPhaseCrossingSlopes.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPhaseCrossingSlopes.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf6904f463250d88eab5b0e1d5c9c60c92b43aec --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPhaseCrossingSlopes.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.GenericPhaseCrossing +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteBoundaryCrossingSets +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCurvePairGeometry + +namespace OAI + +/-! The generic phase selection makes each relevant transported boundary +direction nonvertical, and a finite crossing set has a fixed slope bound. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {B : SmoothingAtlas M} +namespace PhaseBoundaryCurve + +lemma directionIn_first_ne_of_covectors (c d : PhaseBoundaryCurve B) + (q : M) (phi psi : M → ℝ) + (hc : ∀ p, (surfacePhaseChart (c.index : M) c.phase p).1 = phi p) + (hd : ∀ p, (surfacePhaseChart (d.index : M) d.phase p).1 = psi p) + {p : M} (hq : p ∈ (coordinateChart q).source) + (hp : p ∈ c.carrier) (hps : p ∈ (surfacePhaseChart (d.index : M) d.phase).source) + (hind : covectorDet + (phaseDerivative (phi ∘ (coordinateChart q).symm) (coordinateChart q p)) + (phaseDerivative (psi ∘ (coordinateChart q).symm) (coordinateChart q p)) ≠ 0) : + (c.directionIn d p).1 ≠ 0 := + generic_phase_crossing_first_nonzero q (c.index : M) (d.index : M) + c.phase d.phase c.smooth c.inverse_smooth d.smooth + phi psi hc hd hq (c.source hp) hps hind + +end PhaseBoundaryCurve + +lemma finite_crossing_slope_bound {σ : Type*} [Fintype σ] + (v w : σ → Base) : + ∃ L : ℝ, 0 ≤ L ∧ ∀ j, |(v j).2/(v j).1| ≤ L ∧ |(w j).2/(w j).1| ≤ L := by + classical + let L := ∑ j, (|(v j).2/(v j).1| + |(w j).2/(w j).1|) + have hnon (j : σ) : 0 ≤ |(v j).2/(v j).1| + |(w j).2/(w j).1| := + add_nonneg (abs_nonneg _) (abs_nonneg _) + refine ⟨L,Finset.sum_nonneg (fun j _ => hnon j),?_⟩ + intro j + have hj : |(v j).2/(v j).1| + |(w j).2/(w j).1| ≤ L := + Finset.single_le_sum (fun k _ => hnon k) (Finset.mem_univ j) + exact ⟨(le_add_of_nonneg_right (abs_nonneg _)).trans hj, + (le_add_of_nonneg_left (abs_nonneg _)).trans hj⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPointCrossings.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPointCrossings.lean new file mode 100644 index 0000000000000000000000000000000000000000..f340749ce8c9417a048fcdf0cb06eea59c8ebd35 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreparedPointCrossings.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PreparedPointCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.RadialFormCoordinateTransfer +import OAI.Geometry.SurfaceImmersion.Primitive.LocalIntrinsicCrossing + +namespace OAI + +/-! Initial crossing inequalities in every chart through a prepared point. +The curvature is the actual curvature of the scaled induced metric. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes SphericalJets VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem prepared_point_crossings {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (hunit : ∀ p, ‖G p‖ = 1) + {r : ℝ} (hr : 0 < r) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel (r • G) p)) + (i : A.centers) {p : M} (hp : A.weight i p ≠ 0) + (hflat : ∀ v w, sphericalSecondForm (G ∘ (chartAt Plane (i : M)).symm) + (chartAt Plane (i : M) p) v w = 0) + (q : M) (hq : p ∈ (coordinateChart q).source) : + (∀ v w, realSecondForm (coordinateMap (r • G) q) v w (coordinateChart q p) = + (r⁻¹*(coordDeriv v (coordinateMap (r • G) q) (coordinateChart q p) ⬝ᵥ + coordDeriv w (coordinateMap (r • G) q) (coordinateChart q p))) • spaceCoordinates (-G p)) ∧ + coordinateGaussianCurvature (realMetric (coordinateMap (r • G) q) dx dx) + (realMetric (coordinateMap (r • G) q) dx dy) + (realMetric (coordinateMap (r • G) q) dy dy) (coordinateChart q p) = (r⁻¹)^2 ∧ + ∀ v w : Base, v ≠ 0 → w ≠ 0 → + 0 < orderedCrossing (coordinateMap (r • G) q) v w (coordinateChart q p) + (coordinateGaussianCurvature (realMetric (coordinateMap (r • G) q) dx dx) + (realMetric (coordinateMap (r • G) q) dx dy) + (realMetric (coordinateMap (r • G) q) dy dy) (coordinateChart q p)) := by + have hs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hi : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i (subset_tsupport _ hp) + have hdi := coordinateMap_injective_of_immersion hs hI (i : M) + (by rw [← coordinateChart_target]; exact (coordinateChart (i : M)).map_source hi) + have hrad := A.prepared_point_radial_form hG hr.ne' hI i hp hflat + have hB := radial_form_coordinate_transfer hs (i : M) q p hi hq + (gramDet_ne_zero_of_injective _ hdi) (spaceCoordinates (-G p)) r hrad + have hdom : coordinateChart q p ∈ coordinateDomain q := by + rw [← coordinateChart_target] + exact (coordinateChart q).map_source hq + have hImm := coordinateMap_injective_of_immersion hs hI q hdom + have hD := gramDet_ne_zero_of_injective _ hImm + have hn : spaceCoordinates (-G p) ⬝ᵥ spaceCoordinates (-G p) = 1 := by + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,norm_neg,hunit] + norm_num + refine ⟨hB,coordinateGaussianCurvature_pure_radial_on (coordinateDomain_open q) + (coordinateMap_smoothOn hs q) hdom _ hn hD hB,?_⟩ + intro v w hv hw + apply orderedCrossing_intrinsic_pure_radial_on (coordinateDomain_open q) + (coordinateMap_smoothOn hs q) hdom v w _ hr hn hD hB + · intro hz + exact hv (hImm (by simpa only [coordDeriv,map_zero] using hz)) + · intro hz + exact hw (hImm (by simpa only [coordDeriv,map_zero] using hz)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffb14814e95893f12b446efb4bc6a0b81c30fd6d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularNormal.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PreservingCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSlopeNormal +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance preservingCircularNormalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance preservingCircularNormalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance preservingCircularNormalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance preservingCircularNormalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance preservingCircularNormalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance preservingCircularNormalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem preserving_circular_primitive_normal [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, data.A.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (data.A.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x)*(b j x)^2) + + {σ : Type*} [Fintype σ] [DecidableEq σ] + (left right : σ → ι) (x : σ → SmallModes.Base) (hxinj : Function.Injective x) + (hxE : ∀ j, x j ∈ E) + {V : Set SmallModes.Base} (hV : IsOpen V) (hxV : ∀ j, x j ∈ V) + (honly : ∀ j k, x j ∈ Curves k → k = left j ∨ k = right j) + (hfirst : ∀ j, b (left j) (x j) ≠ 0 ∧ b (right j) (x j) ≠ 0) + (hslopes : ∀ j, |c (left j) (x j)/b (left j) (x j)| ≤ slopeBound ∧ + |c (right j) (x j)/b (right j) (x j)| ≤ slopeBound) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := data.A.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + (∃ U₀ : Set SmallModes.Base, IsOpen U₀ ∧ baseEquiv '' C ⊆ U₀ ∧ + ∃ ν : SmallModes.Base → NormalFrame.Vec, ContDiffOn ℝ ∞ ν U₀ ∧ + (∀ p ∈ U₀, ν p ⬝ᵥ ν p = 1) ∧ + (∀ p ∈ U₀, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (data.A.phaseRealChartMap i e.symm W) p ⬝ᵥ ν p = 0) ∧ + (∀ p ∈ U₀, p ∉ V → ν p = + profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z p)) ∧ + (∀ j p, p ∈ Curves j → ν p ≠ -normalize + (realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j p,c j p) (b j p,c j p) p)) ∧ + ∀ j, + let H := data.A.phaseRealChartMap i e.symm W + let κ := coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy) (x j) + 0 < orderedCrossing H (b (left j) (x j),c (left j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) κ ∧ + 0 < orderedCrossing H (b (right j) (x j),c (right j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) κ ∧ + 0 < realSecondForm H (b (left j) (x j),c (left j) (x j)) + (b (left j) (x j),c (left j) (x j)) (x j) ⬝ᵥ ν (x j) ∧ + 0 < realSecondForm H (b (right j) (x j),c (right j) (x j)) + (b (right j) (x j),c (right j) (x j)) (x j) ⬝ᵥ ν (x j)) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + classical + let _ : Fintype ι := Fintype.ofFinite ι + intro ε hε ζ hζ + obtain ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,hrest⟩ := + data.preserving_circular_primitive_boundary hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess haT hboundary hCurves hCurvesT hP hlocal hE hET haE + slopeBound hSlope hb hc hbc S hSc hTS hST K hK hKS hKA hone haoff ℓ hℓx hℓy + h htarget hC hCS hCurveC hactiveC hEC hold ε hε ζ hζ + let H := data.A.phaseRealChartMap i e.symm W + let Y : ι → SmallModes.Base → SmallModes.Base := fun j p => (b j p,c j p) + have hmem (j : ι) (p : SmallModes.Base) (hp : p ∈ Curves j) : p ∈ baseEquiv '' C := + ⟨baseEquiv.symm p,hCurveC j p hp,baseEquiv.apply_symm_apply p⟩ + obtain ⟨U₀,hU₀,hCU₀,ν,hν,hνunit,hνnormal,hνout,hνavoid,hνcross⟩ := + compact_slope_crossing_normal (T := baseEquiv '' C) (data.A.phaseRealChartMap_smooth i hi hW.1) z hV + (by rintro _ ⟨p,hp,rfl⟩; exact hreg p hp) Y (fun j => (hb j).prodMk (hc j)) + left right x hxinj + (fun j => ⟨baseEquiv.symm (x j),hEC _ (hxE j),baseEquiv.apply_symm_apply _⟩) + hxV Curves (fun j => (hCurves j).isClosed) honly + (fun j p _ hp => (havoid j p hp).2) hfirst slopeBound hslopes + (coordinateGaussianCurvature (realMetric H SmallModes.dx SmallModes.dx) + (realMetric H SmallModes.dx SmallModes.dy) (realMetric H SmallModes.dy SmallModes.dy)) + (fun j => hcross (x j) (hxE j)) + refine ⟨z,hz,hzζ,hz1,W,hW,hdata,hreg,havoid,hcross,?_,hrest⟩ + exact ⟨U₀,hU₀,hCU₀,ν,hν,hνunit,hνnormal,hνout, + (fun j p hp => hνavoid j p (hmem j p hp) hp),hνcross⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5b702efe0fd110de428bb56a1322c02699a12c6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PreservingCircularPrimitive.lean @@ -0,0 +1,166 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussRepresentative +import OAI.Geometry.SurfaceImmersion.Primitive.AnalyticCurveCrossingLoop +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricPositive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularPrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRegularity +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCircularPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhaseOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.ExactGeometricFastFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes CovarianceCorrector GeometryPreservation +local instance preservingCircularBoundaryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance preservingCircularBoundaryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance preservingCircularBoundaryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance preservingCircularBoundaryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance preservingCircularBoundarySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance preservingCircularBoundarySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open SurfaceJetCoordinates SurfaceVelocityFamily VelocityFrame +variable {g : SmoothMetric M} {F : M → Space} + +theorem preserving_circular_primitive_boundary [T2Space M] (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {a : SmallModes.Base → ℝ} (ha : ContDiff ℝ ∞ a) + {n : SmallModes.Base → NormalFrame.Vec} {T U : Set SmallModes.Base} + (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ (data.A.phaseRealChartMap i e.symm F) p)) + (hN : ∀ p ∈ U, SmallModes.coordDeriv SmallModes.dx (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ + SmallModes.coordDeriv SmallModes.dy (data.A.phaseRealChartMap i e.symm F) p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < PhaseGeometry.coordinateMetricHessian + (RealModes.inducedCoordinateMetric (data.A.phaseRealChartMap i e.symm F)) Prod.fst p SmallModes.dy SmallModes.dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p ≠ 0 ∧ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy p) ≠ -n p) + {ι : Type*} [Finite ι] {Curves : ι → Set SmallModes.Base} + (hCurves : ∀ j, IsCompact (Curves j)) (hCurvesT : ∀ j, Curves j ⊆ T) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, Curves j) \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, Curves j) ∩ N, f x = 0) ∧ fderiv ℝ f p (0,1) ≠ 0) + {E : Set SmallModes.Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c : ι → SmallModes.Base → ℝ} + (hb : ∀ j, ContDiff ℝ ∞ (b j)) (hc : ∀ j, ContDiff ℝ ∞ (c j)) + (hbc : ∀ j, ∀ x ∈ Curves j, b j x ≠ 0 ∨ c j x ≠ 0) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + (hST : baseEquiv '' closure (S : Set JetPolynomial.Base) ⊆ T) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (haoff : ∀ p ∉ K, a (baseEquiv p) = 0) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![(a (baseEquiv q))^2,0,0]) y))) + {C : Set JetPolynomial.Base} (hC : IsCompact C) + (hCS : C ⊆ (S : Set JetPolynomial.Base) ∩ e.target) + (hCurveC : ∀ j x, x ∈ Curves j → baseEquiv.symm x ∈ C) + (hactiveC : ∀ p ∈ C, data.A.chartWeight i (e.symm p) ≠ 0) + (hEC : ∀ x ∈ E, baseEquiv.symm x ∈ C) + (hold : ∀ j, ∀ x ∈ Curves j, a x = 0 → + 0 < ((SmallModes.coordDeriv SmallModes.dy (SmallModes.coordDeriv SmallModes.dx + (data.A.phaseRealChartMap i e.symm F)) x ⬝ᵥ + normalize (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x))*b j x + + Real.sqrt (realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x ⬝ᵥ + realSecondForm (data.A.phaseRealChartMap i e.symm F) SmallModes.dy SmallModes.dy x)*c j x)^2 + (coordinateGauss (fun y => data.A.phaseMetricRead i e.symm h y 0) + (fun y => data.A.phaseMetricRead i e.symm h y 1) + (fun y => data.A.phaseMetricRead i e.symm h y 2) x)*(b j x)^2) + : + ∀ ε : ℝ, 0 < ε → ∀ ζ : ℝ, 0 < ζ → + ∃ z : ℝ, 0 < z ∧ z < ζ ∧ z ≤ 1 ∧ ∃ W : M → Space, + IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + (∀ p ∈ C, realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z (baseEquiv p) ∈ + regularBoundaryProfiles) ∧ + (∀ j x, x ∈ Curves j → + RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) (b j x,c j x) (b j x,c j x) x ≠ 0 ∧ + VelocityFrame.normalize (RealModes.realSecondForm (data.A.phaseRealChartMap i e.symm W) + (b j x,c j x) (b j x,c j x) x) ≠ + -profilePreferred (realBoundaryProfile (data.A.phaseRealChartMap i e.symm W) z x)) ∧ + (∀ x ∈ E, ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + let H := data.A.phaseRealChartMap i e.symm W + let κ := RealModes.coordinateGaussianCurvature + (RealModes.realMetric H SmallModes.dx SmallModes.dx) + (RealModes.realMetric H SmallModes.dx SmallModes.dy) + (RealModes.realMetric H SmallModes.dy SmallModes.dy) x + 0 < orderedCrossing H (1,r) (1,s) x κ ∧ 0 < orderedCrossing H (1,s) (1,r) x κ ∧ + ((0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x) ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ profilePreferred (realBoundaryProfile H z x)) ∨ + (0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ RealModes.realSecondForm H (1,s) (1,s) x ∧ + ∃ w : NormalFrame.Vec, profilePreferred (realBoundaryProfile H z x) ⬝ᵥ w = 0 ∧ + 0 < RealModes.realSecondForm H (1,r) (1,r) x ⬝ᵥ w ∧ + 0 < RealModes.realSecondForm H (1,s) (1,s) x ⬝ᵥ w))) ∧ + ∃ G : M → Space, ∃ _hG : ContMDiff planeModel spaceModel ∞ G, + data.A.WeightedBound 1 3 ε (G-F) ∧ + ∃ V : M → Space, ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 2 (z^8) (W-V) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + have hactiveR (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : + data.A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0 := by + rcases hx with ⟨p,hp,rfl⟩ + simpa only [baseEquiv.symm_apply_apply] using hactiveC p hp + have hdetR (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : + data.A.phaseMetricRead i e.symm h x 0 * data.A.phaseMetricRead i e.symm h x 2 - + (data.A.phaseMetricRead i e.symm h x 1)^2 ≠ 0 := by + rcases hx with ⟨p,hp,rfl⟩ + exact ne_of_gt (data.A.phaseMetricRead_positive i h e he hi (hCS hp).2 (hactiveC p hp)).2 + obtain ⟨V,hV,hCV,γ,hγ,hγeq,B,hB,hbound,_⟩ := data.A.phase_gauss_representative i hi h + (hC.image baseEquiv.continuous) hactiveR hdetR + have hmem (j : ι) (x : SmallModes.Base) (hx : x ∈ Curves j) : x ∈ baseEquiv '' C := by + exact ⟨baseEquiv.symm x,hCurveC j x hx,baseEquiv.apply_symm_apply x⟩ + have hmemE (x : SmallModes.Base) (hx : x ∈ E) : x ∈ baseEquiv '' C := + ⟨baseEquiv.symm x,hEC x hx,baseEquiv.apply_symm_apply x⟩ + have hγbound (x : SmallModes.Base) (hx : x ∈ baseEquiv '' C) : -B ≤ γ x := + (abs_le.mp (hbound x hx)).1 + apply data.constructed_circular_primitive_boundary hF hmetric i e he hi hχ hχc hχs hcover + ha hT hU hTU hn hI hN hHess haT hboundary hCurves hCurvesT hP hlocal hE hET haE + slopeBound hSlope hb hc (fun _ => hγ) hbc B (le_trans (by norm_num) hB) + (fun j x hx => hγbound x (hmem j x hx)) + (fun j x hx hz => ?_) S hSc hTS hST K hK hKS hKA hone haoff ℓ hℓx hℓy + h htarget hC hCS hCurveC + (fun j x hx => hactiveR x (hmem j x hx)) + (fun j x hx => le_of_eq (hγeq x (hCV (hmem j x hx)))) + hEC (fun x hx => hactiveR x (hmemE x hx)) + (fun x hx => ?_) + · rw [hγeq x (hCV (hmem j x hx))] + exact hold j x hx hz + · rw [← hγeq x (hCV (hmemE x hx))] + exact hγbound x (hmemE x hx) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeChain.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeChain.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce4ab88fe9b0f9a05daccc3b3711652efaa8d066 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeChain.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeParameterBounds + +namespace OAI + +/-! The ordinary chain-rule estimate used for each actual amplitude chart. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance ampChainFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance ampChainFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance ampChainTensorDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance ampChainTensorDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance ampChainPlaneDualNormed : NormedAddCommGroup (Plane →L[ℝ] ℝ) := inferInstance +local instance ampChainPlaneDualSpace : NormedSpace ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance ampChainFiberT2 : T2Space TensorFiber := inferInstance +local instance ampChainTensorDualT2 : T2Space (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance ampChainPlaneDualT2 : T2Space (Plane →L[ℝ] ℝ) := inferInstance +variable {ι : Type*} [Fintype ι] +local instance ampChainDataNormed : NormedAddCommGroup (PrimitiveAmplitudeData ι) := inferInstance +local instance ampChainDataSpace : NormedSpace ℝ (PrimitiveAmplitudeData ι) := inferInstance +local instance ampChainDataDualNormed : NormedAddCommGroup (PrimitiveAmplitudeData ι →L[ℝ] ℝ) := inferInstance +local instance ampChainDataDualSpace : NormedSpace ℝ (PrimitiveAmplitudeData ι →L[ℝ] ℝ) := inferInstance +local instance ampChainDataT2 : T2Space (PrimitiveAmplitudeData ι) := inferInstance + +theorem primitive_amplitude_chain_bound (a : ι) + (F : JetPolynomial.Base → PrimitiveAmplitudeData ι) (x : JetPolynomial.Base) + (hF : ContDiffAt ℝ ∞ F x) (hi : (primitiveDataOperator (F x).1).IsInvertible) + (hp : 0 < primitiveParameterCoefficient a (F x)) + {R D : ℝ} (hR : ‖fderiv ℝ (primitiveParameterAmplitude a) (F x)‖ ≤ R) + (hD : ‖fderiv ℝ F x‖ ≤ D) : + ‖fderiv ℝ (primitiveParameterAmplitude a ∘ F) x‖ ≤ R*D := by + have ho := primitiveParameterAmplitude_smoothAt a hi hp + have hRp : 0 ≤ R := (norm_nonneg (fderiv ℝ (primitiveParameterAmplitude a) (F x))).trans hR + rw [fderiv_comp x (ho.differentiableAt (by simp)) (hF.differentiableAt (by simp))] + calc + _ ≤ ‖fderiv ℝ (primitiveParameterAmplitude a) (F x)‖*‖fderiv ℝ F x‖ := + ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ R*D := mul_le_mul hR hD (norm_nonneg _) hRp + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeParameterBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeParameterBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..935466b43b992053d3ba20f7d58d87c3bd3cb57f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeParameterBounds.lean @@ -0,0 +1,130 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorStability + +namespace OAI + +/-! Compact C1 control of the actual inverse and square-root amplitude map. +The parameter bounds are fixed before a later family is composed with it. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance amplitudeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance amplitudeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance amplitudeFiberComplete : CompleteSpace TensorFiber := inferInstance +local instance amplitudeDualAdd : ContinuousAdd (Plane →L[ℝ] ℝ) := inferInstance +local instance amplitudeDualSmul : ContinuousSMul ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance amplitudeFiberGroup : AddCommGroup TensorFiber := amplitudeFiberNormed.toAddCommGroup +variable {ι : Type*} [Fintype ι] + +abbrev PrimitiveAmplitudeData (ι : Type*) := PrimitiveOperatorData ι × TensorFiber + +def primitiveParameterInverse (z : PrimitiveAmplitudeData ι) : TensorFiber →L[ℝ] TensorFiber := + (primitiveDataOperator z.1).inverse + +def primitiveParameterCoefficient (i : ι) (z : PrimitiveAmplitudeData ι) : ℝ := + z.1.1.1 i (primitiveParameterInverse z z.2) + +def primitiveParameterAmplitude (i : ι) (z : PrimitiveAmplitudeData ι) : ℝ := + z.1.1.2 i * Real.sqrt (primitiveParameterCoefficient i z) + +lemma primitiveParameterInverse_smoothAt {z : PrimitiveAmplitudeData ι} + (hz : (primitiveDataOperator z.1).IsInvertible) : + ContDiffAt ℝ ∞ primitiveParameterInverse z := + hz.contDiffAt_map_inverse.comp z + (primitiveDataOperator_smooth.contDiffAt.comp z contDiffAt_fst) + +lemma primitiveParameterCoefficient_smoothAt (i : ι) {z : PrimitiveAmplitudeData ι} + (hz : (primitiveDataOperator z.1).IsInvertible) : + ContDiffAt ℝ ∞ (primitiveParameterCoefficient i) z := by + have hq : ContDiff ℝ ∞ (fun w : PrimitiveAmplitudeData ι => w.1.1.1 i) := by + exact (contDiff_apply ℝ (TensorFiber →L[ℝ] ℝ) i).comp + (contDiff_fst.comp (contDiff_fst.comp contDiff_fst)) + exact hq.contDiffAt.clm_apply + ((primitiveParameterInverse_smoothAt hz).clm_apply contDiffAt_snd) + +lemma primitiveParameterAmplitude_smoothAt (i : ι) {z : PrimitiveAmplitudeData ι} + (hz : (primitiveDataOperator z.1).IsInvertible) + (hp : 0 < primitiveParameterCoefficient i z) : + ContDiffAt ℝ ∞ (primitiveParameterAmplitude i) z := by + have hw : ContDiff ℝ ∞ (fun w : PrimitiveAmplitudeData ι => w.1.1.2 i) := by + exact (contDiff_apply ℝ ℝ i).comp + (contDiff_snd.comp (contDiff_fst.comp contDiff_fst)) + exact hw.contDiffAt.mul ((Real.contDiffAt_sqrt hp.ne').comp z + (primitiveParameterCoefficient_smoothAt i hz)) + +private def parameterNormData (i : ι) (z : PrimitiveAmplitudeData ι) := + (primitiveParameterInverse z, + (fderiv ℝ primitiveParameterInverse z, + (primitiveParameterAmplitude i z, fderiv ℝ (primitiveParameterAmplitude i) z))) + +private lemma parameterNormData_continuousAt (i : ι) {z : PrimitiveAmplitudeData ι} + (hz : (primitiveDataOperator z.1).IsInvertible) + (hp : 0 < primitiveParameterCoefficient i z) : + ContinuousAt (parameterNormData i) z := by + have hi := primitiveParameterInverse_smoothAt hz + have ha := primitiveParameterAmplitude_smoothAt i hz hp + exact hi.continuousAt.prodMk + ((hi.continuousAt_fderiv (by simp)).prodMk + (ha.continuousAt.prodMk (ha.continuousAt_fderiv (by simp)))) + +/-- One neighborhood and one C1 constant control inverse operators and actual +amplitudes uniformly around any compact positive family of finite data. -/ +theorem compact_primitive_amplitude_C1 (i : ι) {K : Set (PrimitiveAmplitudeData ι)} + (hK : IsCompact K) + (hgood : ∀ z ∈ K, (primitiveDataOperator z.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient i z) : + ∃ eps C : ℝ, 0 < eps ∧ 1 ≤ C ∧ + ∀ z ∈ K, ∀ z' : PrimitiveAmplitudeData ι, ‖z'-z‖ < eps → + (primitiveDataOperator z'.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient i z' ∧ + ‖primitiveParameterInverse z'‖ ≤ C ∧ + ‖fderiv ℝ primitiveParameterInverse z'‖ ≤ C ∧ + |primitiveParameterAmplitude i z'| ≤ C ∧ + ‖fderiv ℝ (primitiveParameterAmplitude i) z'‖ ≤ C := by + have hc : ContinuousOn (parameterNormData i) K := fun z hz => + (parameterNormData_continuousAt i (hgood z hz).1 (hgood z hz).2).continuousWithinAt + obtain ⟨B,hB⟩ := hK.exists_bound_of_continuousOn (f := parameterNormData i) hc + let C : ℝ := max 1 (B+1) + let O : Set (PrimitiveAmplitudeData ι) := {z | + (primitiveDataOperator z.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient i z ∧ ‖parameterNormData i z‖ < C} + have hO : IsOpen O := by + rw [isOpen_iff_mem_nhds] + intro z hz + have hg : ∀ᶠ w in 𝓝 z, + (primitiveDataOperator w.1).IsInvertible ∧ + 0 < primitiveParameterCoefficient i w := + (isOpen_primitiveDataPositive i).eventually_mem ⟨hz.1,hz.2.1⟩ + have hnorm : ContinuousAt (fun w => ‖parameterNormData i w‖) z := + ContinuousAt.norm (f := parameterNormData i) + (parameterNormData_continuousAt i hz.1 hz.2.1) + have hn : ∀ᶠ w in 𝓝 z, ‖parameterNormData i w‖ < C := + hnorm.eventually (gt_mem_nhds hz.2.2) + exact (hg.and hn).mono (fun _ h => ⟨h.1.1,h.1.2,h.2⟩) + have hKO : K ⊆ O := by + intro z hz + refine ⟨(hgood z hz).1,(hgood z hz).2,?_⟩ + exact (hB z hz).trans_lt ((lt_add_one B).trans_le (le_max_right _ _)) + obtain ⟨eps,heps,hnear⟩ := hK.exists_thickening_subset_open hO hKO + refine ⟨eps,C,heps,le_max_left _ _,?_⟩ + intro z hz z' hdist + have hmem : z' ∈ O := hnear (Metric.mem_thickening_iff.mpr + ⟨z,hz,by simpa only [dist_eq_norm] using hdist⟩) + have hb : ‖parameterNormData i z'‖ ≤ C := hmem.2.2.le + have hinv := (norm_fst_le (parameterNormData i z')).trans hb + have hder := (norm_fst_le (parameterNormData i z').2).trans + ((norm_snd_le (parameterNormData i z')).trans hb) + have ha := (norm_fst_le (parameterNormData i z').2.2).trans + ((norm_snd_le (parameterNormData i z').2).trans + ((norm_snd_le (parameterNormData i z')).trans hb)) + have had := (norm_snd_le (parameterNormData i z').2.2).trans + ((norm_snd_le (parameterNormData i z').2).trans + ((norm_snd_le (parameterNormData i z')).trans hb)) + change ‖primitiveParameterAmplitude i z'‖ ≤ C at ha + exact ⟨hmem.1,hmem.2.1,hinv,hder,by simpa only [Real.norm_eq_abs] using ha,had⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeZero.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeZero.lean new file mode 100644 index 0000000000000000000000000000000000000000..df3a4388cd8b01dc32ae96295c0aafbf5ff2edb7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAmplitudeZero.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateData + +namespace OAI + +/-! Outside its original chart support the actual amplitude has zero first jet. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +lemma correctedAmplitude_zero_coordinate + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) + (hs : ∀ a, tsupport (psi a) ⊆ tsupport (B.weight a.1)) + (i : B.centers) (a : B.centers × Fin 3) {p : M} + (hi : p ∈ (chart (i : M)).source) (ha : p ∉ tsupport (B.weight a.1)) : + B.correctedPrimitiveAmplitude P psi phi u a p = 0 ∧ + fderiv ℝ (B.correctedPrimitiveAmplitude P psi phi u a ∘ (chart (i : M)).symm) + (chart (i : M) p) = 0 := by + have hn : p ∉ tsupport (B.correctedPrimitiveAmplitude P psi phi u a) := by + intro hp + exact ha (hs a (tsupport_mul_subset_left hp)) + have hz := notMem_tsupport_iff_eventuallyEq.mp hn + have hc : Tendsto (chart (i : M)).symm (𝓝 (chart (i : M) p)) (𝓝 p) := by + have h := ((chart (i : M)).continuousOn_symm _ ((chart (i : M)).map_source hi)).continuousAt + ((chart (i : M)).open_target.mem_nhds ((chart (i : M)).map_source hi)) + simpa only [(chart (i : M)).left_inv hi] using h.tendsto + have he : (B.correctedPrimitiveAmplitude P psi phi u a ∘ (chart (i : M)).symm) =ᶠ[𝓝 (chart (i : M) p)] + (fun _ => 0) := hz.comp_tendsto hc + exact ⟨hz.self_of_nhds,(he.fderiv_eq (𝕜 := ℝ)).trans (fderiv_const_apply _)⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAtlasNormalMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAtlasNormalMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..847560a386fd8aeb31478cda209674429545736f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveAtlasNormalMargin.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSecondFormMargin +import OAI.Geometry.SurfaceImmersion.Atlas.ChartSecondFormBounds +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry + +namespace OAI + +/-! The primitive's transverse margin and exterior convergence give a +uniform second-form lower bound in every chart of the fixed atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem primitive_atlas_normal_margin (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (i : data.A.centers) {c : ℝ} (hc : 0 < c) : + ∃ ρ c₀ : ℝ, 0 < ρ ∧ 0 < c₀ ∧ + ∀ (G V : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) → + ∀ b : ℝ, 0 ≤ b → b < ρ → data.A.WeightedBound 1 2 b (G-F) → + (∀ p ∈ tsupport (data.A.weight i), + c < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))‖) → + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) → + ∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + c₀ < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ := by + classical + obtain ⟨ρ,ce,hρ,hce,hextbound⟩ := data.uniform_secondForm_C2_margin hF + let K (j : data.A.centers) := tsupport (data.A.weight j) ∩ tsupport (data.A.weight i) + have hK (j : data.A.centers) : IsCompact (K j) := + ((isClosed_tsupport _).inter (isClosed_tsupport _)).isCompact + have hKs (j : data.A.centers) : K j ⊆ (coordinateChart (i : M)).source := by + intro p hp + simpa only [coordinateChart_source,chart_source] using data.A.weight_support i hp.2 + have hKt (j : data.A.centers) : K j ⊆ (coordinateChart (j : M)).source := by + intro p hp + simpa only [coordinateChart_source,chart_source] using data.A.weight_support j hp.1 + choose C hC hcompare using fun j => compact_overlap_secondTensor_bound (hK j) + (j : M) (i : M) (hKs j) (hKt j) + let C₀ := 1+∑ j, C j + have hsum : 0 ≤ ∑ j, C j := Finset.sum_nonneg (fun j _ => (hC j).le) + have hC₀ : 0 < C₀ := by + change 0 < 1+∑ j, C j + linarith + have hCC (j : data.A.centers) : C j ≤ C₀ := by + have hh := Finset.single_le_sum (fun k _ => (hC k).le) (Finset.mem_univ j) + change C j ≤ 1+∑ j, C j + linarith + refine ⟨ρ,min ce (c/C₀),hρ,lt_min hce (div_pos hc hC₀),?_⟩ + intro G V hG hV hI b hb hbρ hclose hlocal hexterior j x hx + obtain ⟨y,⟨p,hp,rfl⟩,rfl⟩ := hx + have hpoint (k : data.A.centers) : + coordinateChart (k : M) p = planeCoordinateIsometry (chart (k : M) p) := by + rw [planeCoordinateIsometry_chart] + rfl + by_cases hpi : p ∈ tsupport (data.A.weight i) + · have hxi : coordinateChart (j : M) p ∈ coordinateDomain (j : M) := by + rw [← coordinateChart_target] + exact (coordinateChart (j : M)).map_source (by + simpa only [coordinateChart_source,chart_source] using data.A.weight_support j hp) + have hcmp := hcompare j V hV p ⟨hp,hpi⟩ + (coordinateMap_injective_of_immersion hV hI (j : M) hxi) + have hei := (realSecondTensor_eventuallyEq + (data.A.vectorPlaneRead_eventually_coordinateMap V i (data.outer_locally_one i) hpi)).eq_of_nhds + have hej := (realSecondTensor_eventuallyEq + (data.A.vectorPlaneRead_eventually_coordinateMap V j (data.outer_locally_one j) hp)).eq_of_nhds + rw [hpoint i,hpoint j,← hei,← hej] at hcmp + have hnorm := (hlocal p hpi).trans_le (hcmp.trans + (mul_le_mul_of_nonneg_right (hCC j) (norm_nonneg _))) + exact (min_le_right _ _).trans_lt ((div_lt_iff₀ hC₀).mpr (by + simpa only [mul_comm] using hnorm)) + · have he := data.A.planeRead_eventuallyEq_on_weight (hexterior p hpi) j hp + (data.outer_locally_one j) + rw [(realSecondTensor_eventuallyEq he).eq_of_nhds] + exact (min_le_left _ _).trans_lt (hextbound G hG b hb hbρ hclose j _ + ⟨chart (j : M) p,⟨p,hp,rfl⟩,rfl⟩) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoefficientCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoefficientCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..2bb921a117db6107e8f5f056cfbdccc762505cb7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoefficientCoordinates.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFrameBounds + +namespace OAI + +/-! First-derivative bounds for coefficient functionals in each overlapping +primitive chart, fixed before choosing any independent phases or radii. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance coefficientReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coefficientReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance coefficientReadDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coefficientReadDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coefficientReadDerivativeNormed : NormedAddCommGroup + (JetPolynomial.Base →L[ℝ] TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coefficientReadDerivativeSpace : NormedSpace ℝ + (JetPolynomial.Base →L[ℝ] TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coefficientReadPairNormed : NormedAddCommGroup + ((TensorFiber →L[ℝ] ℝ) × (JetPolynomial.Base →L[ℝ] TensorFiber →L[ℝ] ℝ)) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance coefficientReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coefficientReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coefficientReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance coefficientReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def coefficientFrameRead (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) (y : JetPolynomial.Base) : TensorFiber →L[ℝ] ℝ := + B.coefficientFrame P i a ((chart (i : M)).symm y) + +omit [CompactSpace M] in +lemma coefficientFrame_smoothAt + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) {p : M} + (hi : p ∈ (chart (i : M)).source) (ha : p ∈ (chart (a.1 : M)).source) + (hQ : ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) : + ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] ℝ) ∞ (B.coefficientFrame P i a) p := by + have hq := hQ.contMDiffAt.comp p + ((chart_smooth (a.1 : M) p ha).contMDiffAt ((chart (a.1 : M)).open_source.mem_nhds ha)) + have hT := (contMDiffOn_coordChangeL (IB := planeModel) (n := ∞) + (B.tensorTriv i) (B.tensorTriv a.1)).contMDiffAt + ((B.tensorTriv i).open_baseSet.inter (B.tensorTriv a.1).open_baseSet |>.mem_nhds + ⟨B.tensorTriv_domain i hi,B.tensorTriv_domain a.1 ha⟩) + have hconst : ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] PhaseMean.Tensor) ∞ + (fun _ : M => fiberToThree) p := contMDiffAt_const + apply (hq.clm_comp (hconst.clm_comp hT)).congr_of_eventuallyEq + filter_upwards [((chart (i : M)).open_source.inter (chart (a.1 : M)).open_source).mem_nhds + ⟨hi,ha⟩] with q hq + exact B.coefficientFrame_coordChange P i a hq.1 hq.2 + +omit [CompactSpace M] in +lemma coefficientFrameRead_smoothAt + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) {p : M} + (hi : p ∈ (chart (i : M)).source) (ha : p ∈ (chart (a.1 : M)).source) + (hQ : ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) : + ContDiffAt ℝ ∞ (B.coefficientFrameRead P i a) (chart (i : M) p) := by + have hx := (chart (i : M)).map_source hi + have hsym := ((chart_symm_smooth (i : M)) _ hx).contMDiffAt + ((chart (i : M)).open_target.mem_nhds hx) + have hout : ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] ℝ) ∞ + (B.coefficientFrame P i a) ((chart (i : M)).symm (chart (i : M) p)) := by + rw [(chart (i : M)).left_inv hi] + exact B.coefficientFrame_smoothAt P i a hi ha hQ + have h := hout.comp (chart (i : M) p) hsym + exact h.contDiffAt + + theorem coefficientFrameRead_C1_bound + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (hQ : ∀ (a : B.centers × Fin 3) p, p ∈ tsupport (B.weight a.1) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ i a p, + p ∈ tsupport (B.weight i) → p ∈ tsupport (B.weight a.1) → + ‖B.coefficientFrameRead P i a (chart (i : M) p)‖ ≤ D ∧ + ‖fderiv ℝ (B.coefficientFrameRead P i a) (chart (i : M) p)‖ ≤ D := by + have hb (i : B.centers) (a : B.centers × Fin 3) : ∃ D : ℝ, 1 ≤ D ∧ + ∀ p ∈ tsupport (B.weight i) ∩ tsupport (B.weight a.1), + ‖B.coefficientFrameRead P i a (chart (i : M) p)‖ ≤ D ∧ + ‖fderiv ℝ (B.coefficientFrameRead P i a) (chart (i : M) p)‖ ≤ D := by + let K := (chart (i : M)) '' (tsupport (B.weight i) ∩ tsupport (B.weight a.1)) + have hK : IsCompact K := ((isClosed_tsupport (B.weight i)).inter + (isClosed_tsupport (B.weight a.1))).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ hp => B.weight_support i hp.1)) + have hc : ContinuousOn (fun y => (B.coefficientFrameRead P i a y, + fderiv ℝ (B.coefficientFrameRead P i a) y)) K := by + rintro y ⟨p,hp,rfl⟩ + have hs := B.coefficientFrameRead_smoothAt P i a (B.weight_support i hp.1) + (B.weight_support a.1 hp.2) (hQ a p hp.2) + exact (hs.continuousAt.prodMk (hs.continuousAt_fderiv (by simp))).continuousWithinAt + obtain ⟨D,hD⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max 1 D,le_max_left _ _,?_⟩ + intro p hp + have hh := (hD _ ⟨p,hp,rfl⟩).trans (le_max_right 1 D) + exact ⟨(norm_fst_le _).trans hh,(norm_snd_le _).trans hh⟩ + choose D hD hb using fun k : B.centers × (B.centers × Fin 3) => hb k.1 k.2 + refine ⟨1+∑ k, D k,?_,?_⟩ + · have := Finset.sum_nonneg (s := Finset.univ) (fun k _ => zero_le_one.trans (hD k)) + linarith + · intro i a p hi ha + have hle : D (i,a) ≤ 1+∑ k, D k := by + have := Finset.single_le_sum (fun k _ => zero_le_one.trans (hD k)) (Finset.mem_univ (i,a)) + linarith + exact ⟨((hb (i,a) p ⟨hi,ha⟩).1).trans hle,((hb (i,a) p ⟨hi,ha⟩).2).trans hle⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateData.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateData.lean new file mode 100644 index 0000000000000000000000000000000000000000..398d396951c71c684a168a3c6b9b607cb338d408 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateData.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCovectorFamily +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeParameterBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorMask + +namespace OAI + +/-! Fixed active-chart coordinate data represent the genuine inverse and +amplitude, while vanishing cutoff terms eliminate the other charts. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance coordinateDataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coordinateDataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance coordinateDataDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordinateDataDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordinateDataSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance coordinateDataSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def primitiveCoordinateData + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (u : ∀ p : M, CovariantTwoTensor p) (i : B.centers) + (S : Set (B.centers × Fin 3)) (y : JetPolynomial.Base) : + PrimitiveAmplitudeData (B.centers × Fin 3) := by + classical + exact (((fun a => if a ∈ S then B.coefficientFrameRead P i a y else 0, + fun a => psi a ((chart (i : M)).symm y)), + fun a => if a ∈ S then B.phaseCovectorRead i (phi a) y else 0), + (B.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm y) + (u ((chart (i : M)).symm y))) + +omit [CompactSpace M] in +lemma primitiveCoordinateData_operator + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (u : ∀ p : M, CovariantTwoTensor p) (i : B.centers) + (S : Set (B.centers × Fin 3)) {p : M} (hp : p ∈ (chart (i : M)).source) + (hz : ∀ a ∉ S, psi a p = 0) : + primitiveDataOperator (B.primitiveCoordinateData P psi phi u i S (chart (i : M) p)).1 = + B.tensorOperatorFrame i p (B.primitiveFullOperator P psi phi p) := by + classical + rw [B.primitiveFullOperator_frame P psi phi i hp, + completedPrimitiveOperator_mask _ _ _ (fun _ => 0) S hz] + unfold primitiveCoordinateData primitiveDataOperator + rw [(chart (i : M)).left_inv hp] + simp only [coefficientFrameRead,(chart (i : M)).left_inv hp] + congr 1 + funext a + split_ifs with ha + · exact (B.covectorFrame_mfderiv (phi a) (hphi a) i hp).symm + · rfl + +omit [CompactSpace M] in +lemma coefficientFrame_inverse + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) {p : M} + (hp : p ∈ (chart (i : M)).source) + (T : CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) (H : CovariantTwoTensor p) : + B.coefficientFrame P i a p + ((B.tensorOperatorFrame i p T).inverse ((B.tensorTriv i).continuousLinearMapAt ℝ p H)) = + B.primitiveCoefficientField P a p (T.inverse H) := by + rw [B.tensorOperatorFrame_inverse_apply i hp T H] + change B.primitiveCoefficientField P a p + ((B.tensorTriv i).symmL ℝ p ((B.tensorTriv i).continuousLinearMapAt ℝ p (T.inverse H))) = _ + erw [(B.tensorTriv i).symmL_continuousLinearMapAt (B.tensorTriv_domain i hp)] + +omit [CompactSpace M] in +lemma primitiveCoordinateData_amplitude + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (u : ∀ p : M, CovariantTwoTensor p) (i : B.centers) + (S : Set (B.centers × Fin 3)) (a : B.centers × Fin 3) (ha : a ∈ S) + {p : M} (hp : p ∈ (chart (i : M)).source) (hz : ∀ b ∉ S, psi b p = 0) : + primitiveParameterAmplitude a (B.primitiveCoordinateData P psi phi u i S (chart (i : M) p)) = + B.correctedPrimitiveAmplitude P psi phi u a p := by + classical + unfold primitiveParameterAmplitude primitiveParameterCoefficient primitiveParameterInverse + rw [B.primitiveCoordinateData_operator P psi phi hphi u i S hp hz] + change psi a ((chart (i : M)).symm (chart (i : M) p)) * + Real.sqrt ((if a ∈ S then B.coefficientFrameRead P i a (chart (i : M) p) else 0) + ((B.tensorOperatorFrame i p (B.primitiveFullOperator P psi phi p)).inverse + ((B.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm (chart (i : M) p)) + (u ((chart (i : M)).symm (chart (i : M) p)))))) = _ + rw [ite_eq_left ha,(chart (i : M)).left_inv hp] + unfold coefficientFrameRead + rw [(chart (i : M)).left_inv hp,B.coefficientFrame_inverse P i a hp] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d2939fe902fe4fcf8ef4503144d60ae169693d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateDerivative.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateGerms +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveDataC1 +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeChain + +namespace OAI + +/-! First-derivative control of the actual amplitude from its finite active +chart data. The data bounds involve only first jets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance coordDerivFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coordDerivFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance coordDerivDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coordDerivDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coordDerivCovectorNormed : NormedAddCommGroup (Plane →L[ℝ] ℝ) := inferInstance +local instance coordDerivCovectorSpace : NormedSpace ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance coordDerivFiberT2 : T2Space TensorFiber := inferInstance +local instance coordDerivDualT2 : T2Space (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coordDerivCovectorT2 : T2Space (Plane →L[ℝ] ℝ) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance coordDerivDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordDerivDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordDerivSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance coordDerivSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) +local instance coordDerivDataNormed : NormedAddCommGroup (PrimitiveAmplitudeData (B.centers × Fin 3)) := inferInstance +local instance coordDerivDataSpace : NormedSpace ℝ (PrimitiveAmplitudeData (B.centers × Fin 3)) := inferInstance +local instance coordDerivDataT2 : T2Space (PrimitiveAmplitudeData (B.centers × Fin 3)) := inferInstance +local instance coordDerivDataDualNormed : NormedAddCommGroup (PrimitiveAmplitudeData (B.centers × Fin 3) →L[ℝ] ℝ) := inferInstance +local instance coordDerivDataDualSpace : NormedSpace ℝ (PrimitiveAmplitudeData (B.centers × Fin 3) →L[ℝ] ℝ) := inferInstance + +theorem primitiveCoordinateData_fderiv_bound + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (hQ : ∀ (a : B.centers × Fin 3) (p : M), p ∈ tsupport (B.weight a.1) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (i : B.centers) {p : M} (hp : p ∈ tsupport (B.weight i)) + {D : ℝ} (hD : 0 ≤ D) + (hbq : ∀ a, p ∈ tsupport (B.weight a.1) → + ‖fderiv ℝ (B.coefficientFrameRead P i a) (chart (i : M) p)‖ ≤ D) + (hbw : ∀ a, ‖fderiv ℝ (psi a ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ D) + (hbv : ∀ a, p ∈ tsupport (B.weight a.1) → + ‖fderiv ℝ (B.phaseCovectorRead i (phi a)) (chart (i : M) p)‖ ≤ D) + (hbH : ‖fderiv ℝ (B.tensorFrameRead i u) (chart (i : M) p)‖ ≤ D) : + ‖fderiv ℝ (B.primitiveCoordinateData P psi phi u i + {a | p ∈ tsupport (B.weight a.1)}) (chart (i : M) p)‖ ≤ D := by + classical + let x := chart (i : M) p + let q := fun (a : B.centers × Fin 3) (y : JetPolynomial.Base) => if p ∈ tsupport (B.weight a.1) then B.coefficientFrameRead P i a y else 0 + let w := fun a => psi a ∘ (chart (i : M)).symm + let v := fun (a : B.centers × Fin 3) (y : JetPolynomial.Base) => if p ∈ tsupport (B.weight a.1) then B.phaseCovectorRead i (phi a) y else 0 + have hs := B.weight_support i hp + have ht := (chart (i : M)).map_source hs + have hq (a : B.centers × Fin 3) : DifferentiableAt ℝ (q a) x := by + dsimp only [q] + split_ifs with ha + · exact (B.coefficientFrameRead_smoothAt P i a hs (B.weight_support a.1 ha) + (hQ a p ha)).differentiableAt (by simp) + · exact differentiableAt_const _ + have hw (a : B.centers × Fin 3) : DifferentiableAt ℝ (w a) x := + (((hpsi a).comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn.contDiffAt + ((chart (i : M)).open_target.mem_nhds ht)).differentiableAt (by simp) + have hv (a : B.centers × Fin 3) : DifferentiableAt ℝ (v a) x := by + dsimp only [v] + split_ifs with ha + · exact ((B.phaseCovectorRead_smoothOn i (phi a) (hphi a)).contDiffAt + ((chart (i : M)).open_target.mem_nhds ht)).differentiableAt (by simp) + · exact differentiableAt_const _ + have hH := ((B.tensorFrameRead_smoothOn i u hu).contDiffAt + ((chart (i : M)).open_target.mem_nhds ht)).differentiableAt (by simp) + apply primitive_data_fderiv_bound q w v (B.tensorFrameRead i u) x hq hw hv hH hD + · intro a + dsimp only [q] + split_ifs with ha + · exact hbq a ha + · simpa only [fderiv_const_apply,norm_zero] using hD + · exact hbw + · intro a + dsimp only [v] + split_ifs with ha + · exact hbv a ha + · simpa only [fderiv_const_apply,norm_zero] using hD + · exact hbH + +theorem correctedAmplitude_coordinate_bound + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (hQ : ∀ (a : B.centers × Fin 3) (p : M), p ∈ tsupport (B.weight a.1) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) + (hs : ∀ a, tsupport (psi a) ⊆ tsupport (B.weight a.1)) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (i : B.centers) {p : M} (hp : p ∈ tsupport (B.weight i)) + (a : B.centers × Fin 3) (ha : p ∈ tsupport (B.weight a.1)) + (R D : ℝ) + (hdata : ‖fderiv ℝ (B.primitiveCoordinateData P psi phi u i + {b | p ∈ tsupport (B.weight b.1)}) (chart (i : M) p)‖ ≤ D) + (hparam : let z : PrimitiveAmplitudeData (B.centers × Fin 3) := + B.primitiveCoordinateData P psi phi u i {b | p ∈ tsupport (B.weight b.1)} (chart (i : M) p); + (primitiveDataOperator z.1).IsInvertible ∧ 0 < primitiveParameterCoefficient a z ∧ + |primitiveParameterAmplitude a z| ≤ R ∧ + ‖fderiv ℝ (primitiveParameterAmplitude a) z‖ ≤ R) : + |B.correctedPrimitiveAmplitude P psi phi u a p| ≤ R ∧ + ‖fderiv ℝ (B.correctedPrimitiveAmplitude P psi phi u a ∘ (chart (i : M)).symm) + (chart (i : M) p)‖ ≤ R*D := by + let F := B.primitiveCoordinateData P psi phi u i {b | p ∈ tsupport (B.weight b.1)} + have hg := B.primitiveCoordinateData_germ P psi phi hphi hs u i (B.weight_support i hp) a ha + have hv := hg.self_of_nhds + simp only [Function.comp_apply,(chart (i : M)).left_inv (B.weight_support i hp)] at hv + refine ⟨hv ▸ hparam.2.2.1,?_⟩ + have he := hg.fderiv_eq (𝕜 := ℝ) + change fderiv ℝ (primitiveParameterAmplitude a ∘ F) (chart (i : M) p) = _ at he + rw [← he] + exact primitive_amplitude_chain_bound a F (chart (i : M) p) + (B.primitiveCoordinateData_smoothAt P psi phi hpsi hphi hQ u hu i hp) + hparam.1 hparam.2.1 hparam.2.2.2 hdata + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..ceede3b64c3f871a25c3e13e55edd684790d2866 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateGerms.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateData +import OAI.Geometry.SurfaceImmersion.Geometry.TensorFrameReadBounds + +namespace OAI + +/-! The finite coordinate model agrees with the actual corrected amplitude +on a neighborhood, including at zero cutoff values. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance coordinateGermFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coordinateGermFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance coordinateGermDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance coordinateGermDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance coordinateGermDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordinateGermDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordinateGermSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance coordinateGermSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +lemma primitiveCoordinateData_germ + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (hs : ∀ a, tsupport (psi a) ⊆ tsupport (B.weight a.1)) + (u : ∀ p : M, CovariantTwoTensor p) (i : B.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) (a : B.centers × Fin 3) + (ha : p ∈ tsupport (B.weight a.1)) : + let S : Set (B.centers × Fin 3) := {b | p ∈ tsupport (B.weight b.1)} + (fun y => primitiveParameterAmplitude a (B.primitiveCoordinateData P psi phi u i S y)) =ᶠ[𝓝 (chart (i : M) p)] + (B.correctedPrimitiveAmplitude P psi phi u a ∘ (chart (i : M)).symm) := by + classical + dsimp only + have hz : ∀ᶠ q in 𝓝 p, ∀ b : B.centers × Fin 3, + p ∉ tsupport (B.weight b.1) → psi b q = 0 := by + apply Filter.eventually_all.mpr + intro b + by_cases hb : p ∈ tsupport (B.weight b.1) + · exact Filter.Eventually.of_forall (fun _ h => False.elim (h hb)) + · exact (notMem_tsupport_iff_eventuallyEq.mp (fun h => hb (hs b h))).mono (fun _ h _ => h) + have hc : ContinuousAt (chart (i : M)).symm (chart (i : M) p) := + ((chart (i : M)).continuousOn_symm _ ((chart (i : M)).map_source hp)).continuousAt + ((chart (i : M)).open_target.mem_nhds ((chart (i : M)).map_source hp)) + have hc' : Tendsto (chart (i : M)).symm (𝓝 (chart (i : M) p)) (𝓝 p) := by + simpa only [(chart (i : M)).left_inv hp] using hc.tendsto + filter_upwards [hc'.eventually hz, + (chart (i : M)).open_target.mem_nhds ((chart (i : M)).map_source hp)] with y hy hyT + have hq := (chart (i : M)).map_target hyT + have he := B.primitiveCoordinateData_amplitude P psi phi hphi u i + {b | p ∈ tsupport (B.weight b.1)} a ha hq hy + simpa only [(chart (i : M)).right_inv hyT,Function.comp_apply] using he + +lemma primitiveCoordinateData_smoothAt + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi phi : (B.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi a)) + (hQ : ∀ (a : B.centers × Fin 3) (p : M), p ∈ tsupport (B.weight a.1) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (i : B.centers) {p : M} (hp : p ∈ tsupport (B.weight i)) : + let S : Set (B.centers × Fin 3) := {b | p ∈ tsupport (B.weight b.1)} + ContDiffAt ℝ ∞ (B.primitiveCoordinateData P psi phi u i S) (chart (i : M) p) := by + classical + dsimp only + have hsource := B.weight_support i hp + have htarget := (chart (i : M)).map_source hsource + have hq (a : B.centers × Fin 3) : ContDiffAt ℝ ∞ + (fun y => if p ∈ tsupport (B.weight a.1) then B.coefficientFrameRead P i a y else 0) + (chart (i : M) p) := by + by_cases ha : p ∈ tsupport (B.weight a.1) + · simp only [ite_eq_left ha] + exact B.coefficientFrameRead_smoothAt P i a hsource (B.weight_support a.1 ha) (hQ a p ha) + · simpa only [ite_eq_right ha] using (contDiffAt_const : ContDiffAt ℝ ∞ + (fun _ : JetPolynomial.Base => (0 : TensorFiber →L[ℝ] ℝ)) (chart (i : M) p)) + have hw (a : B.centers × Fin 3) : ContDiffAt ℝ ∞ + (psi a ∘ (chart (i : M)).symm) (chart (i : M) p) := + ((hpsi a).comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn.contDiffAt + ((chart (i : M)).open_target.mem_nhds htarget) + have hv (a : B.centers × Fin 3) : ContDiffAt ℝ ∞ + (fun y => if p ∈ tsupport (B.weight a.1) then B.phaseCovectorRead i (phi a) y else 0) + (chart (i : M) p) := by + by_cases ha : p ∈ tsupport (B.weight a.1) + · simp only [ite_eq_left ha] + exact (B.phaseCovectorRead_smoothOn i (phi a) (hphi a)).contDiffAt + ((chart (i : M)).open_target.mem_nhds htarget) + · simpa only [ite_eq_right ha] using (contDiffAt_const : ContDiffAt ℝ ∞ + (fun _ : JetPolynomial.Base => (0 : Plane →L[ℝ] ℝ)) (chart (i : M) p)) + have hH := (B.tensorFrameRead_smoothOn i u hu).contDiffAt + ((chart (i : M)).open_target.mem_nhds htarget) + exact (((contDiffAt_pi.mpr hq).prodMk (contDiffAt_pi.mpr hw)).prodMk + (contDiffAt_pi.mpr hv)).prodMk hH + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d4ddcf20a3085237dc4ae154812550e8bcf39ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCoordinateTolerance.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateData + +namespace OAI + +/-! Entrywise perturbations bound the actual finite coordinate data. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance coordToleranceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coordToleranceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance coordToleranceDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordToleranceDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance coordToleranceSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance coordToleranceSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +lemma primitiveCoordinateData_sub_lt + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (psi psi0 phi phi0 : (B.centers × Fin 3) → M → ℝ) + (u u0 : ∀ p : M, CovariantTwoTensor p) (i : B.centers) + (S : Set (B.centers × Fin 3)) {p : M} (hp : p ∈ (chart (i : M)).source) + {eps : ℝ} (heps : 0 < eps) + (hw : ∀ a, |psi a p-psi0 a p| < eps) + (hv : ∀ a ∈ S, ‖B.phaseCovectorRead i (phi a) (chart (i : M) p)- + B.phaseCovectorRead i (phi0 a) (chart (i : M) p)‖ < eps) + (hH : ‖(B.tensorTriv i).continuousLinearMapAt ℝ p (u p)- + (B.tensorTriv i).continuousLinearMapAt ℝ p (u0 p)‖ < eps) : + ‖B.primitiveCoordinateData P psi phi u i S (chart (i : M) p)- + B.primitiveCoordinateData P psi0 phi0 u0 i S (chart (i : M) p)‖ < eps := by + classical + let q := fun a => if a ∈ S then B.coefficientFrameRead P i a (chart (i : M) p) else 0 + let v := fun a => if a ∈ S then B.phaseCovectorRead i (phi a) (chart (i : M) p) else 0 + let v0 := fun a => if a ∈ S then B.phaseCovectorRead i (phi0 a) (chart (i : M) p) else 0 + unfold primitiveCoordinateData + rw [(chart (i : M)).left_inv hp] + change max (max (max ‖q-q‖ ‖(fun a => psi a p)-(fun a => psi0 a p)‖) ‖v-v0‖) + ‖(B.tensorTriv i).continuousLinearMapAt ℝ p (u p)- + (B.tensorTriv i).continuousLinearMapAt ℝ p (u0 p)‖ < eps + rw [sub_self,norm_zero] + refine max_lt (max_lt (max_lt heps ?_) ?_) hH + · apply (pi_norm_lt_iff heps).mpr + intro a + simpa only [Pi.sub_apply,Real.norm_eq_abs] using hw a + · apply (pi_norm_lt_iff heps).mpr + intro a + dsimp only [v,v0,Pi.sub_apply] + split_ifs with ha + · exact hv a ha + · simpa only [sub_self,norm_zero] using heps + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleAssembly.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..28c2158deca587a71716b364933148ab68f55e70 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleAssembly.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPrimitiveFamily + +namespace OAI + +/-! Exact finite-cycle identities for independently chosen primitive families. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing.SmoothPrimitiveFamily +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance assemblyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance assemblyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance assemblyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance assemblyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance assemblySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance assemblySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +variable {ι : Type*} [Fintype ι] {u : ∀ p : M, CovariantTwoTensor p} + (d : SmoothPrimitiveFamily ι u) + +def cycleAmplitude (N : ℕ) (a : ι) (p : M) : ℝ := + d.amplitude a p/Real.sqrt (N : ℝ) + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleAmplitude_square (N : ℕ) (a : ι) (p : M) : + (d.cycleAmplitude N a p)^2 = (N : ℝ)⁻¹*(d.amplitude a p)^2 := by + rw [cycleAmplitude,div_pow,Real.sq_sqrt (Nat.cast_nonneg N)] + exact div_eq_inv_mul _ _ + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleAmplitude_smooth (N : ℕ) (a : ι) : + ContMDiff planeModel 𝓘(ℝ) ∞ (d.cycleAmplitude N a) := + (d.smoothAmplitude a).div_const _ + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleAmplitude_pos_iff {N : ℕ} (hN : 0 < N) (a : ι) (p : M) : + 0 < d.cycleAmplitude N a p ↔ 0 < d.amplitude a p := + div_pos_iff_of_pos_right (Real.sqrt_pos.mpr (by exact_mod_cast hN)) + +lemma cycleMetric_start (A : SmoothingAtlas M) (g : SmoothMetric M) (N : ℕ) : + (d.cycleMetric A g N 0 ∅).inner = g.inner := by + funext p + change g.inner p+d.cycleTensor N 0 ∅ p = g.inner p + rw [d.cycleTensor_empty] + simp + +lemma cycleMetric_step [DecidableEq ι] (A : SmoothingAtlas M) (g : SmoothMetric M) + (N c : ℕ) (s : Finset ι) (a : ι) (ha : a ∉ s) (p : M) + (v w : TangentSpace planeModel p) : + (d.cycleMetric A g N c (insert a s)).inner p v w = + (d.cycleMetric A g N c s).inner p v w+(d.cycleAmplitude N a p)^2* + (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p v)* + (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p w) := by + change (g.inner p+d.cycleTensor N c (insert a s) p) v w = _ + rw [d.cycleTensor_insert N c s a ha p] + change g.inner p v w+(d.cycleTensor N c s p v w+(N : ℝ)⁻¹*d.term a p v w) = _ + rw [d.term_apply,d.cycleAmplitude_square] + change g.inner p v w+(_+_) = (g.inner p v w+d.cycleTensor N c s p v w)+_ + ring + +lemma cycleMetric_next (e : SmoothPrimitiveFamily ι u) (A : SmoothingAtlas M) + (g : SmoothMetric M) (N c : ℕ) : + (d.cycleMetric A g N c Finset.univ).inner = (e.cycleMetric A g N (c+1) ∅).inner := by + funext p + change g.inner p+d.cycleTensor N c Finset.univ p = g.inner p+e.cycleTensor N (c+1) ∅ p + rw [d.cycleTensor_complete,e.cycleTensor_empty] + +lemma cycleMetric_finish (A : SmoothingAtlas M) (g : SmoothMetric M) {N : ℕ} (hN : 0 < N) : + (d.cycleMetric A g N N ∅).inner = g.inner+u := by + funext p + change g.inner p+d.cycleTensor N N ∅ p = g.inner p+u p + rw [d.cycleTensor_empty,div_self (by exact_mod_cast (Nat.ne_of_gt hN)),one_smul] + +end ClosedSurfaceR4.FiniteOrderSmoothing.SmoothPrimitiveFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d710aeca0219c112b7bfc1d29e55de1b10faa53 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleBounds.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPrimitiveFamily +import OAI.Geometry.SurfaceImmersion.Geometry.UniformMetricPathBounds + +namespace OAI + +/-! One fixed cycle count controls all partial metrics. The estimates allow +a different exact primitive decomposition in every cycle. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance cycleBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance cycleBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance cycleBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance cycleBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance cycleBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance cycleBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothPrimitiveFamily +variable {ι : Type*} [Fintype ι] {u : ∀ p : M, CovariantTwoTensor p} + (d : SmoothPrimitiveFamily ι u) (A : SmoothingAtlas M) + +lemma partial_tensor_bound {D : ℝ} (hD : 0 ≤ D) (m : ℕ) + (hb : ∀ a, A.TensorWeightedBound 1 m D (d.term a)) (s : Finset ι) : + A.TensorWeightedBound 1 m ((Fintype.card ι : ℝ)*D) (fun p => ∑ a ∈ s, d.term a p) := by + classical + intro i + change WeightedEstimates.WeightedBound univ 1 m _ + (A.bundleLocalize A.tensorTriv i (fun p => ∑ a ∈ s, d.term a p)) + rw [A.bundleLocalize_sum] + have hh := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ zero_le_one s + (fun _ : ι => D) (fun a => A.bundleLocalize A.tensorTriv i (d.term a)) + (fun a _ => (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i (d.term_smooth A a)).contDiffOn) + (fun a _ => hb a i) + apply hh.mono_const + simp only [Finset.sum_const, nsmul_eq_mul] + exact mul_le_mul_of_nonneg_right (by exact_mod_cast Finset.card_le_univ s) hD + +lemma scaled_partial_tensor_bound {D : ℝ} (hD : 0 ≤ D) (m : ℕ) + (hb : ∀ a, A.TensorWeightedBound 1 m D (d.term a)) (N : ℕ) (s : Finset ι) : + A.TensorWeightedBound 1 m ((Fintype.card ι : ℝ)*D/(N : ℝ)) + ((N : ℝ)⁻¹ • (fun p => ∑ a ∈ s, d.term a p)) := by + have hh := A.tensorWeightedBound_const_smul + (ContMDiff.sum_section (fun a _ => d.term_smooth A a)) + (d.partial_tensor_bound A hD m hb s) (N : ℝ)⁻¹ + convert hh using 1 + rw [abs_of_nonneg (inv_nonneg.mpr (Nat.cast_nonneg N))] + ring + +lemma cycleMetric_bound {D C : ℝ} (hD : 0 ≤ D) (m : ℕ) + (hb : ∀ a, A.TensorWeightedBound 1 m D (d.term a)) + (g : SmoothMetric M) (N c : ℕ) (s : Finset ι) + (hpath : A.TensorWeightedBound 1 m C (g.inner+((c : ℝ)/(N : ℝ)) • u)) : + A.TensorWeightedBound 1 m (C+(Fintype.card ι : ℝ)*D/(N : ℝ)) + (d.cycleMetric A g N c s).inner := by + have hsmooth := g.contMDiff.add_section + ((d.tensor_smooth A).const_smul_section (a := (c : ℝ)/(N : ℝ))) + have hss : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p ((N : ℝ)⁻¹ • ∑ a ∈ s, d.term a p)) := + (ContMDiff.sum_section (fun a _ => d.term_smooth A a)).const_smul_section + have hh := A.tensorWeightedBound_add hsmooth hss zero_le_one hpath + (d.scaled_partial_tensor_bound A hD m hb N s) + have he : (d.cycleMetric A g N c s).inner = + (g.inner+((c : ℝ)/(N : ℝ)) • u)+(N : ℝ)⁻¹ • (fun p => ∑ a ∈ s, d.term a p) := by + funext p + change g.inner p+(((c : ℝ)/(N : ℝ)) • u p+(N : ℝ)⁻¹ • ∑ a ∈ s, d.term a p) = _ + exact (add_assoc _ _ _).symm + rw [he] + exact hh + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma exists_cycle_count (D : ℝ) : + ∃ N : ℕ, 0 < N ∧ (Fintype.card ι : ℝ)*D/(N : ℝ) ≤ 1 := by + obtain ⟨N,hN⟩ := exists_nat_gt (max 0 ((Fintype.card ι : ℝ)*D)) + have hN0 : (0 : ℝ) < N := (le_max_left _ _).trans_lt hN + refine ⟨N,by exact_mod_cast hN0,?_⟩ + exact (div_le_one hN0).mpr ((le_max_right _ _).trans hN.le) + +end SmoothPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleMetrics.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleMetrics.lean new file mode 100644 index 0000000000000000000000000000000000000000..99d9958e5548cdbb3cb0ca5ca2061c5f0be78f15 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveCycleMetrics.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PositiveAtlasPrimitives + +namespace OAI + +/-! A finite positive primitive family can be repeated in equally weighted +cycles. Every partial cycle is an actual smooth positive metric, and every +completed cycle advances by exactly the prescribed fraction of the tensor. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance cycleFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance cycleFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance cycleDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance cycleDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance cycleSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance cycleSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) (P : A.centers → PhaseBasis) + (u : ∀ p : M, CovariantTwoTensor p) +local instance : DecidableEq (A.centers × Fin 3) := Classical.decEq _ + +def cyclePrimitiveAmplitude (N : ℕ) (a : A.centers × Fin 3) : M → ℝ := + fun p => A.positivePrimitiveAmplitude P u a p / Real.sqrt (N : ℝ) + +lemma cyclePrimitiveAmplitude_square (N : ℕ) + (a : A.centers × Fin 3) (p : M) : + (A.cyclePrimitiveAmplitude P u N a p)^2 = + (N : ℝ)⁻¹ * (A.positivePrimitiveAmplitude P u a p)^2 := by + unfold cyclePrimitiveAmplitude + rw [div_pow, Real.sq_sqrt (Nat.cast_nonneg N)] + exact div_eq_inv_mul _ _ + +lemma cyclePrimitiveAmplitude_pos_iff {N : ℕ} (hN : 0 < N) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (a : A.centers × Fin 3) (p : M) : + 0 < A.cyclePrimitiveAmplitude P u N a p ↔ A.weight a.1 p ≠ 0 := by + change 0 < A.positivePrimitiveAmplitude P u a p / Real.sqrt (N : ℝ) ↔ _ + rw [div_pos_iff_of_pos_right (Real.sqrt_pos.mpr (by exact_mod_cast hN))] + exact A.positivePrimitiveAmplitude_pos_iff P u hpos a p + +def primitiveCycleTensor (N c : ℕ) (s : Finset (A.centers × Fin 3)) + (p : M) : CovariantTwoTensor p := + ((c : ℝ) / (N : ℝ)) • u p + + (N : ℝ)⁻¹ • ∑ a ∈ s, A.positivePrimitiveTensor P u a p + +lemma primitiveCycleTensor_empty (N c : ℕ) (p : M) : + A.primitiveCycleTensor P u N c ∅ p = ((c : ℝ) / (N : ℝ)) • u p := by + simp only [primitiveCycleTensor, Finset.sum_empty, smul_zero, add_zero] + +lemma primitiveCycleTensor_start (N : ℕ) (p : M) : + A.primitiveCycleTensor P u N 0 ∅ p = 0 := by + rw [A.primitiveCycleTensor_empty] + simp only [Nat.cast_zero, zero_div, zero_smul] + +lemma primitiveCycleTensor_insert (N c : ℕ) (s : Finset (A.centers × Fin 3)) + (a : A.centers × Fin 3) (ha : a ∉ s) (p : M) : + A.primitiveCycleTensor P u N c (insert a s) p = + A.primitiveCycleTensor P u N c s p + (N : ℝ)⁻¹ • A.positivePrimitiveTensor P u a p := by + classical + simp only [primitiveCycleTensor, Finset.sum_insert ha, smul_add] + abel + +lemma primitiveCycleTensor_insert_apply (N c : ℕ) + (s : Finset (A.centers × Fin 3)) (a : A.centers × Fin 3) (ha : a ∉ s) + (p : M) (v w : TangentSpace planeModel p) : + A.primitiveCycleTensor P u N c (insert a s) p v w = + A.primitiveCycleTensor P u N c s p v w + + (A.cyclePrimitiveAmplitude P u N a p)^2 * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p w) := by + rw [A.primitiveCycleTensor_insert P u N c s a ha p] + change _ + (N : ℝ)⁻¹ * A.positivePrimitiveTensor P u a p v w = _ + rw [A.positivePrimitiveTensor_apply, A.cyclePrimitiveAmplitude_square P u N] + let dv : ℝ := mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p v + let dw : ℝ := mfderiv planeModel 𝓘(ℝ) (atlasPhase (a.1 : M) ((P a.1).ξ a.2)) p w + let r : ℝ := A.primitiveCycleTensor P u N c s p v w + change r + (N : ℝ)⁻¹ * ((A.positivePrimitiveAmplitude P u a p)^2 * dv * dw) = + r + ((N : ℝ)⁻¹ * (A.positivePrimitiveAmplitude P u a p)^2) * dv * dw + ring + +lemma primitiveCycleTensor_complete + (hu : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (N c : ℕ) (p : M) : + A.primitiveCycleTensor P u N c Finset.univ p = + A.primitiveCycleTensor P u N (c + 1) ∅ p := by + rw [primitiveCycleTensor, A.sum_positivePrimitiveTensor P u hu hpos, + A.primitiveCycleTensor_empty, ← add_smul] + congr 1 + simp only [Nat.cast_add, Nat.cast_one, div_eq_mul_inv, add_mul, one_mul] + +lemma primitiveCycleTensor_finish {N : ℕ} (hN : 0 < N) (p : M) : + A.primitiveCycleTensor P u N N ∅ p = u p := by + rw [A.primitiveCycleTensor_empty, div_self (by exact_mod_cast (Nat.ne_of_gt hN)), one_smul] + +lemma positivePrimitiveSum_nonneg + (hu : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (p : M) (v : TangentSpace planeModel p) : 0 ≤ u p v v := by + rw [← A.sum_positivePrimitiveTensor P u hu hpos p] + simp only [sum_apply] + exact Finset.sum_nonneg (fun a _ => A.positivePrimitiveTensor_nonneg P u a p v) + +lemma primitiveCycleTensor_nonneg + (hu : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (N c : ℕ) (s : Finset (A.centers × Fin 3)) (p : M) + (v : TangentSpace planeModel p) : 0 ≤ A.primitiveCycleTensor P u N c s p v v := by + change 0 ≤ (c : ℝ) / (N : ℝ) * u p v v + + (N : ℝ)⁻¹ * (∑ a ∈ s, A.positivePrimitiveTensor P u a p) v v + apply add_nonneg + · exact mul_nonneg (div_nonneg (Nat.cast_nonneg c) (Nat.cast_nonneg N)) + (A.positivePrimitiveSum_nonneg P u hu hpos p v) + · apply mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg N)) + simp only [sum_apply] + exact Finset.sum_nonneg (fun a _ => A.positivePrimitiveTensor_nonneg P u a p v) + +lemma primitiveCycleTensor_symmetric + (hu : ∀ p v w, u p v w = u p w v) + (N c : ℕ) (s : Finset (A.centers × Fin 3)) (p : M) + (v w : TangentSpace planeModel p) : + A.primitiveCycleTensor P u N c s p v w = A.primitiveCycleTensor P u N c s p w v := by + change (c : ℝ) / (N : ℝ) * u p v w + + (N : ℝ)⁻¹ * (∑ a ∈ s, A.positivePrimitiveTensor P u a p) v w = + (c : ℝ) / (N : ℝ) * u p w v + + (N : ℝ)⁻¹ * (∑ a ∈ s, A.positivePrimitiveTensor P u a p) w v + simp only [sum_apply] + rw [hu p v w] + congr 2 + apply Finset.sum_congr rfl + intro a _ + exact A.positivePrimitiveTensor_symmetric P u a p v w + +variable [CompactSpace M] + +lemma primitiveCycleTensor_smooth + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (N c : ℕ) (s : Finset (A.centers × Fin 3)) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.primitiveCycleTensor P u N c s p)) := by + apply hu.const_smul_section.add_section + apply ContMDiff.const_smul_section + apply ContMDiff.sum_section + intro a _ + exact A.positivePrimitiveTensor_smooth P u hu hpos a + +def primitiveCycleMetric (g : SmoothMetric M) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) + (hsymm : ∀ p v w, u p v w = u p w v) + (hpos : ∀ i j p, p ∈ tsupport (A.weight i) → + 0 < (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (N c : ℕ) (s : Finset (A.centers × Fin 3)) : SmoothMetric M where + inner p := g.inner p + A.primitiveCycleTensor P u N c s p + symm p v w := by + change g.inner p v w + A.primitiveCycleTensor P u N c s p v w = _ + rw [g.symm p v w, A.primitiveCycleTensor_symmetric P u hsymm N c s p v w] + rfl + pos p v hv := lt_of_lt_of_le (g.pos p v hv) + (le_add_of_nonneg_right (A.primitiveCycleTensor_nonneg P u hsymm + (fun i j p hp => (hpos i j p hp).le) N c s p v)) + isVonNBounded p := (g.isVonNBounded p).subset (by + intro v hv + exact lt_of_le_of_lt (le_add_of_nonneg_right (A.primitiveCycleTensor_nonneg P u hsymm + (fun i j p hp => (hpos i j p hp).le) N c s p v)) hv) + contMDiff := g.contMDiff.add_section (A.primitiveCycleTensor_smooth P u hu hpos N c s) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDataC1.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDataC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..934c100e5b02c758ee99de00e385085900561d7c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDataC1.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAmplitudeParameterBounds + +namespace OAI + +/-! First derivatives of finite primitive data are bounded componentwise. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance finiteDataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance finiteDataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance finiteDataDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance finiteDataDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance finiteDataCovectorNormed : NormedAddCommGroup (Plane →L[ℝ] ℝ) := inferInstance +local instance finiteDataCovectorSpace : NormedSpace ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance finiteDataFiberT2 : T2Space TensorFiber := inferInstance +local instance finiteDataDualT2 : T2Space (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance finiteDataCovectorT2 : T2Space (Plane →L[ℝ] ℝ) := inferInstance +variable {ι : Type*} [Fintype ι] +local instance finiteDataNormed : NormedAddCommGroup (PrimitiveAmplitudeData ι) := inferInstance +local instance finiteDataSpace : NormedSpace ℝ (PrimitiveAmplitudeData ι) := inferInstance +local instance finiteDataT2 : T2Space (PrimitiveAmplitudeData ι) := inferInstance + +theorem primitive_data_fderiv_bound + (q : ι → JetPolynomial.Base → TensorFiber →L[ℝ] ℝ) + (w : ι → JetPolynomial.Base → ℝ) + (v : ι → JetPolynomial.Base → Plane →L[ℝ] ℝ) + (H : JetPolynomial.Base → TensorFiber) (x : JetPolynomial.Base) + (hq : ∀ a, DifferentiableAt ℝ (q a) x) + (hw : ∀ a, DifferentiableAt ℝ (w a) x) + (hv : ∀ a, DifferentiableAt ℝ (v a) x) (hH : DifferentiableAt ℝ H x) + {D : ℝ} (hD : 0 ≤ D) + (hbq : ∀ a, ‖fderiv ℝ (q a) x‖ ≤ D) + (hbw : ∀ a, ‖fderiv ℝ (w a) x‖ ≤ D) + (hbv : ∀ a, ‖fderiv ℝ (v a) x‖ ≤ D) (hbH : ‖fderiv ℝ H x‖ ≤ D) : + ‖fderiv ℝ (fun y => (((((fun a => q a y),fun a => w a y),fun a => v a y),H y) : + PrimitiveAmplitudeData ι)) x‖ ≤ D := by + have hq' := hasFDerivAt_pi.mpr (fun a => (hq a).hasFDerivAt) + have hw' := hasFDerivAt_pi.mpr (fun a => (hw a).hasFDerivAt) + have hv' := hasFDerivAt_pi.mpr (fun a => (hv a).hasFDerivAt) + have he := ((hq'.prodMk hw').prodMk hv').prodMk hH.hasFDerivAt + change ‖fderiv ℝ (fun y => ((((fun a => q a y),fun a => w a y),fun a => v a y),H y)) x‖ ≤ D + rw [he.fderiv] + apply ContinuousLinearMap.opNorm_le_bound _ hD + intro y + have hqy : ‖fun a => fderiv ℝ (q a) x y‖ ≤ D*‖y‖ := + (pi_norm_le_iff_of_nonneg (mul_nonneg hD (norm_nonneg y))).mpr + (fun a => ((fderiv ℝ (q a) x).le_opNorm y).trans (mul_le_mul_of_nonneg_right (hbq a) (norm_nonneg y))) + have hwy : ‖fun a => fderiv ℝ (w a) x y‖ ≤ D*‖y‖ := + (pi_norm_le_iff_of_nonneg (mul_nonneg hD (norm_nonneg y))).mpr + (fun a => ((fderiv ℝ (w a) x).le_opNorm y).trans (mul_le_mul_of_nonneg_right (hbw a) (norm_nonneg y))) + have hvy : ‖fun a => fderiv ℝ (v a) x y‖ ≤ D*‖y‖ := + (pi_norm_le_iff_of_nonneg (mul_nonneg hD (norm_nonneg y))).mpr + (fun a => ((fderiv ℝ (v a) x).le_opNorm y).trans (mul_le_mul_of_nonneg_right (hbv a) (norm_nonneg y))) + have hHy := ((fderiv ℝ H x).le_opNorm y).trans (mul_le_mul_of_nonneg_right hbH (norm_nonneg y)) + exact max_le (max_le (max_le hqy hwy) hvy) hHy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDomainWindow.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDomainWindow.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4830193ebe3c740f95747a242f562f6d676aba2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveDomainWindow.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedPrimitiveSupport + +namespace OAI + +/-! The compact coordinate window and exact support location used by the +analytic primitive theorem. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates + + def phaseWindow {V : Set SmallModes.Base} (hV : IsOpen V) : TopologicalSpace.Opens JetPolynomial.Base := + ⟨baseEquiv ⁻¹' V,hV.preimage baseEquiv.continuous⟩ + +lemma phaseWindow_closure {V : Set SmallModes.Base} (hV : IsOpen V) : + closure (phaseWindow hV : Set JetPolynomial.Base) = baseEquiv ⁻¹' closure V := + (baseEquiv.toHomeomorph.preimage_closure V).symm + +lemma phaseWindow_compact {V : Set SmallModes.Base} (hV : IsOpen V) + (hVc : IsCompact (closure V)) : IsCompact (closure (phaseWindow hV : Set JetPolynomial.Base)) := by + rw [phaseWindow_closure] + exact baseEquiv.toHomeomorph.isCompact_preimage.mpr hVc + +lemma phaseWindow_real_closure {V : Set SmallModes.Base} (hV : IsOpen V) : + baseEquiv '' closure (phaseWindow hV : Set JetPolynomial.Base) = closure V := by + rw [phaseWindow_closure] + exact Set.image_preimage_eq _ baseEquiv.surjective + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseSupport_image_contains (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set JetPolynomial.Base} (hKt : K ⊆ e.target) + (hKA : e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + {y : JetPolynomial.Base} (hy : y ∈ K) : + ∃ p ∈ A.phaseSurfaceSupport i e K, surfacePhaseChart (i : M) e p = baseEquiv y := by + obtain ⟨p,hp,hpy⟩ := hKA (mem_image_of_mem e.symm hy) + have hps := A.weight_support i hp + refine ⟨p,?_,?_⟩ + · apply subset_closure + exact ⟨e.symm y,mem_image_of_mem e.symm hy,by rw [← hpy,(chart (i : M)).left_inv hps]⟩ + · change baseEquiv (e (chart (i : M) p)) = baseEquiv y + rw [hpy,e.right_inv (hKt hy)] + +lemma phaseSupport_window (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set JetPolynomial.Base} (hKt : K ⊆ e.target) + (hKA : e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + {V : Set SmallModes.Base} (hV : IsOpen V) + (hCV : (surfacePhaseChart (i : M) e) '' A.phaseSurfaceSupport i e K ⊆ V) : + K ⊆ (phaseWindow hV : Set JetPolynomial.Base) := by + intro y hy + obtain ⟨p,hp,heq⟩ := A.phaseSupport_image_contains i e hKt hKA hy + change baseEquiv y ∈ V + rw [← heq] + exact hCV (mem_image_of_mem _ hp) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFiberInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFiberInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..46025a585e36081734b257cf6679f425c1a758d0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFiberInverse.lean @@ -0,0 +1,181 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorFiberCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBasisPerturbation + +namespace OAI + +/-! The finite rank-one correction acts on symmetric tensors. Adding the +identity on the antisymmetric summand gives an honest invertible operator +on the full four-dimensional tensor fiber, without an orientation choice. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +local instance primitiveInverseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveInverseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance primitiveInverseFiberComplete : CompleteSpace TensorFiber := inferInstance +local instance primitiveInverseDualAdd : ContinuousAdd (Plane →L[ℝ] ℝ) := inferInstance +local instance primitiveInverseDualSmul : ContinuousSMul ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance primitiveInverseFiberGroup : AddCommGroup TensorFiber := + primitiveInverseFiberNormed.toAddCommGroup + +/-- Intrinsic symmetrization of a bilinear form. -/ +def tensorSymmetrizer : TensorFiber →L[ℝ] TensorFiber := + (1/2 : ℝ) • (ContinuousLinearMap.id ℝ TensorFiber + + (ContinuousLinearMap.flipₗᵢ ℝ Plane Plane ℝ).toContinuousLinearMap) + +lemma tensorSymmetrizer_apply (B : TensorFiber) (v w : Plane) : + tensorSymmetrizer B v w = (B v w+B w v)/2 := by + change (1/2 : ℝ)*(B v w+B w v) = (B v w+B w v)/2 + ring + +lemma tensorSymmetrizer_symmetric (B : TensorFiber) (v w : Plane) : + tensorSymmetrizer B v w = tensorSymmetrizer B w v := by + rw [tensorSymmetrizer_apply,tensorSymmetrizer_apply,add_comm] + +lemma tensorSymmetrizer_eq_self {B : TensorFiber} (hB : ∀ v w, B v w = B w v) : + tensorSymmetrizer B = B := by + ext v w + rw [tensorSymmetrizer_apply,hB v w] + ring + +lemma tensorSymmetrizer_idempotent (B : TensorFiber) : + tensorSymmetrizer (tensorSymmetrizer B) = tensorSymmetrizer B := + tensorSymmetrizer_eq_self (tensorSymmetrizer_symmetric B) + +variable {ι : Type*} [Fintype ι] + +/-- The actual finite supported primitive operator, in one fiber. -/ +def finitePrimitiveOperator (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) : TensorFiber →L[ℝ] TensorFiber := + ∑ i, (psi i)^2 • ((q i).comp tensorSymmetrizer).smulRight ((xi i).smulRight (xi i)) + +lemma finitePrimitiveOperator_apply (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) (B : TensorFiber) : + finitePrimitiveOperator q psi xi B = + ∑ i, ((psi i)^2*q i (tensorSymmetrizer B)) • ((xi i).smulRight (xi i)) := by + simp only [finitePrimitiveOperator,sum_apply,smul_apply, + ContinuousLinearMap.smulRight_apply,ContinuousLinearMap.comp_apply,smul_smul] + +lemma finitePrimitiveOperator_symmetric (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) (B : TensorFiber) (v w : Plane) : + finitePrimitiveOperator q psi xi B v w = finitePrimitiveOperator q psi xi B w v := by + simp only [finitePrimitiveOperator_apply,sum_apply,smul_apply,smul_eq_mul, + ContinuousLinearMap.smulRight_apply] + apply Finset.sum_congr rfl + intro i _ + ring + +lemma finitePrimitiveOperator_symmetrizer (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) (B : TensorFiber) : + finitePrimitiveOperator q psi xi (tensorSymmetrizer B) = finitePrimitiveOperator q psi xi B := by + simp only [finitePrimitiveOperator_apply,tensorSymmetrizer_idempotent] + +def completedPrimitiveOperator (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) : TensorFiber →L[ℝ] TensorFiber := + finitePrimitiveOperator q psi xi + ContinuousLinearMap.id ℝ TensorFiber - tensorSymmetrizer + +lemma completedPrimitiveOperator_apply (q : ι → TensorFiber →L[ℝ] ℝ) + (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) (B : TensorFiber) : + completedPrimitiveOperator q psi xi B = + finitePrimitiveOperator q psi xi B+B-tensorSymmetrizer B := rfl + +lemma completedPrimitiveOperator_eq_id + (q : ι → TensorFiber →L[ℝ] ℝ) (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) + (hbase : ∀ B : TensorFiber, (∀ v w, B v w = B w v) → + finitePrimitiveOperator q psi xi B = B) : + completedPrimitiveOperator q psi xi = ContinuousLinearMap.id ℝ TensorFiber := by + ext B v w + have hb := hbase (tensorSymmetrizer B) (tensorSymmetrizer_symmetric B) + rw [finitePrimitiveOperator_symmetrizer] at hb + rw [completedPrimitiveOperator_apply,hb] + simp only [add_apply,sub_apply,ContinuousLinearMap.id_apply] + ring + +/-- The inverse of the completed operator solves precisely the original +symmetric rank-one equation; the auxiliary antisymmetric identity vanishes. -/ +theorem completedPrimitiveOperator_inverse_symmetric + (q : ι → TensorFiber →L[ℝ] ℝ) (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) + (hinv : (completedPrimitiveOperator q psi xi).IsInvertible) + {H : TensorFiber} (hH : ∀ v w, H v w = H w v) : + let B := (completedPrimitiveOperator q psi xi).inverse H + (∀ v w, B v w = B w v) ∧ finitePrimitiveOperator q psi xi B = H := by + dsimp only + let B := (completedPrimitiveOperator q psi xi).inverse H + have hsolve : completedPrimitiveOperator q psi xi B = H := hinv.self_apply_inverse H + have hsym : ∀ v w, B v w = B w v := by + intro v w + have hvw := congrArg (fun C : TensorFiber => C v w) hsolve + have hwv := congrArg (fun C : TensorFiber => C w v) hsolve + have hfin := finitePrimitiveOperator_symmetric q psi xi B v w + rw [completedPrimitiveOperator_apply] at hvw hwv + simp only [add_apply,sub_apply] at hvw hwv + have hs := tensorSymmetrizer_symmetric B v w + have ht := hH v w + linarith + refine ⟨hsym,?_⟩ + rw [completedPrimitiveOperator_apply,tensorSymmetrizer_eq_self hsym,add_sub_cancel_right] at hsolve + exact hsolve + +abbrev PrimitiveFiberParameters (ι : Type*) := (ι → ℝ) × (ι → Plane →L[ℝ] ℝ) + +lemma completedPrimitiveOperator_smooth (q : ι → TensorFiber →L[ℝ] ℝ) : + ContDiff ℝ ∞ (fun z : PrimitiveFiberParameters ι => completedPrimitiveOperator q z.1 z.2) := by + have hs : ContDiff ℝ ∞ + (fun z : PrimitiveFiberParameters ι => finitePrimitiveOperator q z.1 z.2) := by + apply ContDiff.sum + intro i _ + have hp : ContDiff ℝ ∞ (fun z : PrimitiveFiberParameters ι => z.1 i) := + (contDiff_apply ℝ ℝ i).comp contDiff_fst + have hv : ContDiff ℝ ∞ (fun z : PrimitiveFiberParameters ι => z.2 i) := + (contDiff_apply ℝ (Plane →L[ℝ] ℝ) i).comp contDiff_snd + have hq : ContDiff ℝ ∞ (fun _ : PrimitiveFiberParameters ι => (q i).comp tensorSymmetrizer) := + contDiff_const + exact (hp.pow 2).smul (hq.smulRight (hv.smulRight hv)) + exact (hs.add contDiff_const).sub contDiff_const + +/-- Invertibility and positivity are obtained on an actual open neighborhood +of the reference cutoff/covector data, uniformly for a compact target set. -/ +theorem compact_positive_primitive_inverse + (q : ι → TensorFiber →L[ℝ] ℝ) (psi₀ : ι → ℝ) (xi₀ : ι → Plane →L[ℝ] ℝ) + (hbase : ∀ B : TensorFiber, (∀ v w, B v w = B w v) → + finitePrimitiveOperator q psi₀ xi₀ B = B) + {K : Set TensorFiber} (hK : IsCompact K) + (hpos : ∀ H ∈ K, ∀ i, 0 < q i H) : + ∃ eps : ℝ, 0 < eps ∧ ∀ z : PrimitiveFiberParameters ι, + ‖z-(psi₀,xi₀)‖ < eps → + (completedPrimitiveOperator q z.1 z.2).IsInvertible ∧ + ∀ H ∈ K, ∀ i, 0 < q i ((completedPrimitiveOperator q z.1 z.2).inverse H) := by + let z₀ : PrimitiveFiberParameters ι := (psi₀,xi₀) + have heq := completedPrimitiveOperator_eq_id q psi₀ xi₀ hbase + have hi : (completedPrimitiveOperator q psi₀ xi₀).IsInvertible := by + rw [heq] + exact ⟨ContinuousLinearEquiv.refl ℝ TensorFiber,rfl⟩ + have hs := completedPrimitiveOperator_smooth q + have hiNear : ∀ᶠ z in 𝓝 z₀, (completedPrimitiveOperator q z.1 z.2).IsInvertible := + hs.continuous.continuousAt.eventually hi.eventually_nhds + have hpNear : ∀ᶠ z in 𝓝 z₀, ∀ H ∈ K, ∀ i, + 0 < q i ((completedPrimitiveOperator q z.1 z.2).inverse H) := by + apply hK.eventually_forall_of_forall_eventually + intro H hH + rw [Filter.eventually_all] + intro i + have hmaps : ContDiffAt ℝ ∞ + (fun z : PrimitiveFiberParameters ι × TensorFiber => + completedPrimitiveOperator q z.1.1 z.1.2) (z₀,H) := + hs.contDiffAt.comp (z₀,H) contDiffAt_fst + have hv := (hi.contDiffAt_map_inverse.comp (z₀,H) hmaps).clm_apply contDiffAt_snd + have hq := ((q i).contDiff.contDiffAt.comp (z₀,H) hv).continuousAt + have hp : 0 < q i ((completedPrimitiveOperator q z₀.1 z₀.2).inverse H) := by + simpa only [z₀,heq,ContinuousLinearMap.inverse_id,ContinuousLinearMap.id_apply] using hpos H hH i + exact hq.eventually (lt_mem_nhds hp) + obtain ⟨eps,heps,hsmall⟩ := Metric.eventually_nhds_iff.mp (hiNear.and hpNear) + refine ⟨eps,heps,fun z hz => hsmall (y := z) ?_⟩ + simpa only [dist_eq_norm,z₀] using hz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFrameBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFrameBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d7c53fd745cbdaa2a6c469f697270dff19d0bf2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveFrameBounds.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorFrameAlgebra +import OAI.Geometry.SurfaceImmersion.Correction.TensorOperatorSmooth +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds + +namespace OAI + +/-! Compact bounds for actual coefficient and differential fields in the +fixed tensor frames, including overlapping phase charts. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance frameBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance frameBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance frameBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance frameBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance frameBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance frameBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +omit [CompactSpace M] [T2Space M] in +lemma coefficientFrame_coordChange + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (i : B.centers) (a : B.centers × Fin 3) {p : M} + (hi : p ∈ (chart (i : M)).source) (ha : p ∈ (chart (a.1 : M)).source) : + B.coefficientFrame P i a p = + ((P a.1 (chart (a.1 : M) p)).Q a.2).comp (fiberToThree.comp + ((B.tensorTriv i).coordChangeL ℝ (B.tensorTriv a.1) p : TensorFiber →L[ℝ] TensorFiber)) := by + apply ContinuousLinearMap.ext + intro H + change (P a.1 (chart (a.1 : M) p)).Q a.2 + (fiberToThree ((B.tensorTriv a.1).continuousLinearMapAt ℝ p + ((B.tensorTriv i).symmL ℝ p H))) = _ + rw [(B.tensorTriv a.1).continuousLinearMapAt_apply_of_mem ℝ (B.tensorTriv_domain a.1 ha), + (B.tensorTriv i).symmL_apply (R := ℝ) (B.tensorTriv_domain i hi), + ← (B.tensorTriv i).coordChangeL_apply (R := ℝ) (B.tensorTriv a.1) + ⟨B.tensorTriv_domain i hi,B.tensorTriv_domain a.1 ha⟩] + rfl + +omit [T2Space M] in + theorem coefficientFrame_bound + (P : B.centers → JetPolynomial.Base → PhaseGeometry.PhaseBasis) + (hQ : ∀ (a : B.centers × Fin 3) p, p ∈ tsupport (B.weight a.1) → + ContDiffAt ℝ ∞ (fun y => (P a.1 y).Q a.2) (chart (a.1 : M) p)) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ i a p, + p ∈ tsupport (B.weight i) → p ∈ tsupport (B.weight a.1) → + ‖B.coefficientFrame P i a p‖ ≤ D := by + have hbound (i : B.centers) (a : B.centers × Fin 3) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ p ∈ tsupport (B.weight i) ∩ tsupport (B.weight a.1), + ‖B.coefficientFrame P i a p‖ ≤ D := by + let K := tsupport (B.weight i) ∩ tsupport (B.weight a.1) + have hc : ContinuousOn (B.coefficientFrame P i a) K := by + intro p hp + have hi := B.weight_support i hp.1 + have ha := B.weight_support a.1 hp.2 + have hq := (hQ a p hp.2).contMDiffAt.comp p + ((chart_smooth (a.1 : M) p ha).contMDiffAt ((chart (a.1 : M)).open_source.mem_nhds ha)) + have hT := (contMDiffOn_coordChangeL (IB := planeModel) (n := ∞) (B.tensorTriv i) (B.tensorTriv a.1)).contMDiffAt + ((B.tensorTriv i).open_baseSet.inter (B.tensorTriv a.1).open_baseSet |>.mem_nhds + ⟨B.tensorTriv_domain i hi,B.tensorTriv_domain a.1 ha⟩) + have hconst : ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] PhaseMean.Tensor) ∞ + (fun _ : M => fiberToThree) p := contMDiffAt_const + have hs : ContinuousWithinAt (fun q => + ((P a.1 (chart (a.1 : M) q)).Q a.2).comp (fiberToThree.comp + ((B.tensorTriv i).coordChangeL ℝ (B.tensorTriv a.1) q : TensorFiber →L[ℝ] TensorFiber))) K p := + (hq.clm_comp (hconst.clm_comp hT)).continuousAt.continuousWithinAt + apply hs.congr + · intro q hq + exact (B.coefficientFrame_coordChange P i a (B.weight_support i hq.1) + (B.weight_support a.1 hq.2)) + · exact (B.coefficientFrame_coordChange P i a hi ha) + obtain ⟨D,hD⟩ := ((isClosed_tsupport (B.weight i)).inter + (isClosed_tsupport (B.weight a.1))).isCompact.exists_bound_of_continuousOn hc + exact ⟨max 1 D,le_max_left _ _,fun p hp => (hD p hp).trans (le_max_right _ _)⟩ + choose D hD hb using fun k : B.centers × (B.centers × Fin 3) => hbound k.1 k.2 + refine ⟨1+∑ k, D k,?_,?_⟩ + · have := Finset.sum_nonneg (s := Finset.univ) (fun k _ => (zero_le_one.trans (hD k))) + linarith + · intro i a p hi ha + exact (hb (i,a) p ⟨hi,ha⟩).trans (by + have := Finset.single_le_sum (fun k _ => zero_le_one.trans (hD k)) (Finset.mem_univ (i,a)) + linarith) + +omit [CompactSpace M] [T2Space M] in +lemma covectorFrame_norm_sq (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) + (v : Plane →L[ℝ] ℝ) : + ‖B.covectorFrame i p v‖^2 = ‖(B.tensorTriv i).continuousLinearMapAt ℝ p (v.smulRight v)‖ := by + rw [B.tensor_frame_square i hp,ContinuousLinearMap.norm_smulRight_apply,pow_two] + +omit [T2Space M] in + theorem covectorFrame_bound_at (phi : M → ℝ) (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) + (i : B.centers) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ p ∈ tsupport (B.weight i), + ‖B.covectorFrame i p (mfderiv planeModel 𝓘(ℝ) phi p)‖ ≤ D := by + have hsec := B.phaseDifferentialSquare_smooth phi hphi + have hc := (B.bundleComponent_smooth_on B.tensorTriv B.tensorTriv_domain i hsec).continuousOn.mono + (B.weight_support i) + obtain ⟨C,hC⟩ := (isClosed_tsupport (B.weight i)).isCompact.exists_bound_of_continuousOn hc + refine ⟨|C|+1,by linarith [abs_nonneg C],?_⟩ + intro p hp + have hh := hC p hp + let v : Plane →L[ℝ] ℝ := mfderiv planeModel 𝓘(ℝ) phi p + have he := B.covectorFrame_norm_sq i (B.weight_support i hp) v + change ‖(B.tensorTriv i).continuousLinearMapAt ℝ p (v.smulRight v)‖ ≤ C at hh + rw [← he] at hh + change ‖B.covectorFrame i p v‖ ≤ |C|+1 + nlinarith [norm_nonneg (B.covectorFrame i p v),le_abs_self C,abs_nonneg C] + +omit [T2Space M] in + theorem covectorFrame_bound (phi : M → ℝ) (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ i p, p ∈ tsupport (B.weight i) → + ‖B.covectorFrame i p (mfderiv planeModel 𝓘(ℝ) phi p)‖ ≤ D := by + choose D hD hb using B.covectorFrame_bound_at phi hphi + refine ⟨1+∑ i, D i,?_,?_⟩ + · have := Finset.sum_nonneg (s := Finset.univ) (fun i _ => zero_le_one.trans (hD i)); linarith + · intro i p hp + exact (hb i p hp).trans (by + have := Finset.single_le_sum (fun i _ => zero_le_one.trans (hD i)) (Finset.mem_univ i) + linarith) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveGeometricApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveGeometricApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6e916ca603ae263ad6a2ba25e73e2c1d4465347 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveGeometricApproximation.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance primitiveGeometryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveGeometryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveGeometryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveGeometryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveGeometrySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveGeometrySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem primitive_geometric_approximation (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + (R N : ℕ) : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∃ η C Cv R₁ c₁ c₂ : ℝ, + 0 < η ∧ η ≤ 1 ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ 0 < R₁ ∧ 0 < c₁ ∧ 0 < c₂ ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ V : M → Space, + ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound z (R+2) Cv V ∧ + data.A.ShiftedBound 2 R z (Cv/z^2) V ∧ + data.A.TensorWeightedBound 1 R (C*z^(N+1)) (inducedTensor V-h.inner) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) ∧ + ∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ ≤ R₁ ∧ + c₁ ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x).1 + (firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x).2 ∧ + c₂ < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ := by + have hFO : MapsTo (lowJet (data.A.jetChartMap i F)) S O := fun x hx => hQO (hFQ hx) + have hzero := data.A.primitive_amplitude_zero_off_weight i l hamp S houter + (data.A.jetChartMap i F) hFO K hKA hv + let h := data.A.primitiveMetric g i a ha hzero + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨b,u,η,L,C,Cv,c,c₂,P,hb,hb16,hu,hη,hη1,hL,hC,hCv,hc,hc₂,hP,hfamily⟩ := + data.primitive_mean_realization hF hmetric i l ha hamp S T hST houter hQ hQO hFQ + K hK hKS hKA hv ℓ hℓx hℓy (R+2) (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold C (N+1) ρ + (by positivity) hρ + refine ⟨h,rfl,min η η₀,C,Cv,R₁,c₁,c₂,lt_min hη hη₀, + (min_le_left _ _).trans hη1,hC,hCv,hR₁,hc₁,hc₂,?_⟩ + intro z hz hzη + obtain ⟨G,V,hG,hV,hclose,hslow,hweighted,hshift,herror,hI,hB,hBmargin,hN,hext⟩ := + hfamily z hz (hzη.trans_le (min_le_left _ _)) + have herr : data.A.TensorWeightedBound 1 R (C*z^(N+1)) (inducedTensor V-h.inner) := + fun j => (herror j).mono_order (by omega) + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV (C*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using + hsmall z hz (hzη.trans_le (min_le_right _ _))) + (fun j => (herr j).mono_order (Nat.zero_le R)) + refine ⟨V,hV,hweighted,(fun j k hk x => hshift j k (by omega) x),herr,hI,hB,?_⟩ + intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,hBmargin j x hx⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveIncrementBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveIncrementBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..af34e2c5463c99345a4365318a9dd13d4714d821 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveIncrementBounds.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIsometryBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetSegment + +namespace OAI + +/-! Preservation of the primitive iteration's derivative profiles by the +actual supported increment, including its positional two-jet. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open WeightedEstimates JetPolynomial + +lemma weighted_increment_prefix {U : Set JetPolynomial.Base} + {W : JetPolynomial.Base → JetPolynomial.Space} {τ δ S : ℝ} {m j : ℕ} + (hτ : 0 < τ) (hτ1 : τ ≤ 1) (_hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hS : 0 ≤ S) + (hb : WeightedBound U τ m (S*δ*τ) W) (hj : j ≤ m) : + WeightedBound U 1 j (S/τ^(j-2)) W := by + intro k hk x hx + simp only [one_pow,one_mul] + apply (hb.deriv_le hτ (hk.trans hj) hx).trans + apply (div_le_div_iff₀ (pow_pos hτ k) (pow_pos hτ (j-2))).2 + calc + (S*δ*τ)*τ^(j-2) ≤ S*(τ^2*τ^(j-2)) := by + have hp := mul_le_mul_of_nonneg_right hδτ hτ.le + have htp : δ*τ ≤ τ^2 := by nlinarith only [hp] + nlinarith only [mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right htp (pow_nonneg hτ.le (j-2))) hS] + _ = S*τ^(2+(j-2)) := by rw [pow_add] + _ ≤ S*τ^k := mul_le_mul_of_nonneg_left + (pow_le_pow_of_le_one hτ.le hτ1 (by omega : k ≤ 2+(j-2))) hS + +lemma primitive_increment_prefix {U : Set JetPolynomial.Base} (hU : IsOpen U) + {G W : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (hW : ContDiff ℝ ∞ W) + {s τ δ P S : ℝ} {m : ℕ} (_hs : 0 < s) (hτ : 0 < τ) (hτs : τ ≤ s) + (hs1 : s ≤ 1) (hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hP : 0 ≤ P) (hS : 0 ≤ S) + (hGb : ∀ j ≤ m, WeightedBound U 1 j (P/s^(j-2)) G) + (hWb : WeightedBound U τ m (S*δ*τ) W) : + ∀ j ≤ m, WeightedBound U 1 j ((P+S)/τ^(j-2)) (G+W) := by + intro j hj + have hG' := (hGb j hj).mono_const (div_le_div_of_nonneg_left hP + (pow_pos hτ _) (pow_le_pow_left₀ hτ.le hτs _)) + have hW' := weighted_increment_prefix hτ (hτs.trans hs1) hδ hδτ hS hWb hj + have hb := hG'.add hU.uniqueDiffOn zero_le_one hG.contDiffOn hW.contDiffOn hW' + change WeightedBound U 1 j ((P+S)/τ^(j-2)) (fun x => G x+W x) + simpa only [add_div] using hb + +lemma primitive_increment_lowJet {U : Set JetPolynomial.Base} (hU : IsOpen U) + {G W : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (hW : ContDiff ℝ ∞ W) + {s τ δ B S : ℝ} {m : ℕ} (hτ : 0 < τ) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hS : 0 ≤ S) + (hGb : WeightedBound U s m B (lowJet G)) + (hWb : WeightedBound U τ (m+2) (S*δ*τ) W) : + WeightedBound U τ m (B+S) (lowJet (G+W)) := by + have hg := hGb.shrink_scale hτ.le hτs + have hh := lowJet_segment_bound hU hG hW hτ (hτs.trans hs1) + (mul_nonneg (mul_nonneg hS hδ) hτ.le) hg hWb (t := 1) (by constructor <;> norm_num) + have hc : (S*δ*τ)/τ^2 ≤ S := by + apply (div_le_iff₀ (sq_pos_of_pos hτ)).2 + nlinarith only [mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right hδτ hτ.le) hS] + apply (hh.mono_const (add_le_add_right hc B)).congr + intro x _ + change lowJet (fun p => G p+W p) x = lowJet (fun p => G p+1 • W p) x + simp only [one_smul] + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveInitialFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveInitialFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..58361d334660a87ac0a956992e7207c128b5dd98 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveInitialFamily.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSeedBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSlowScales + +namespace OAI + +/-! The concrete starting family for the finite primitive iteration. +At amplitude z^(1/4), both its C2 displacement and its normalized mean +defect are bounded by fixed multiples of z^(1/2). -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates + +lemma initial_amplitude_square {z : ℝ} (hz : 0 < z) : + (z^(1/4 : ℝ))^2 = z^(1/2 : ℝ) := by + rw [← Real.rpow_mul_natCast hz.le] + norm_num + +lemma initial_error_quotient {z : ℝ} (hz : 0 < z) : + z/(z^(1/4 : ℝ))^2 = z^(1/2 : ℝ) := by + rw [initial_amplitude_square hz] + calc + z / z^(1/2 : ℝ) = z^(1 : ℝ)/z^(1/2 : ℝ) := by rw [Real.rpow_one] + _ = z^((1 : ℝ)-1/2) := (Real.rpow_sub hz _ _).symm + _ = z^(1/2 : ℝ) := by norm_num + +theorem primitive_initial_family {n : ℕ} {U : Set JetPolynomial.Base} + (hU : IsOpen U) (K : Compacts JetPolynomial.Base) (hUK : U ⊆ K) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) : + ∃ A : ℝ, 1 ≤ A ∧ ∃ B E : ℕ → ℝ, (∀ m, 1 ≤ B m) ∧ (∀ m, 1 ≤ E m) ∧ + ∀ z : ℝ, 0 < z → z ≤ 1 → + ContDiff ℝ ∞ (primitiveSeed (z^(1/4 : ℝ)) F) ∧ + WeightedBound U 1 2 (A*z^(1/2 : ℝ)) (primitiveSeed (z^(1/4 : ℝ)) F-F) ∧ + (∀ m, WeightedBound U 1 m (B m) (lowJet (primitiveSeed (z^(1/4 : ℝ)) F))) ∧ + (∀ m, WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) 1 m (E m*z^(1/2 : ℝ)) + (normalizedMeanDefect (z^(1/4 : ℝ)) + (RealModes.realMetricTensor (F ∘ planeCoordinateIsometry.symm)) + (coordinateMetricMap P z (primitiveSeed (z^(1/4 : ℝ)) F)))) := by + obtain ⟨Q,hQ,A,B,hA,hB,hseed⟩ := compact_primitiveSeed_bounds hU K hUK hF + choose E hE he using fun m => primitiveSeed_defect_bound hQ P hP m + (B (m+tensorOrder P)) (hB (m+tensorOrder P)) + refine ⟨A 2,hA 2,B,(fun m => 1+E m),hB,?_,?_⟩ + · intro m + exact le_add_of_nonneg_right (hE m) + · intro z hz hz1 + have hδ : 0 < z^(1/4 : ℝ) := Real.rpow_pos_of_pos hz _ + have hδ1 : (z^(1/4 : ℝ))^2 ≤ 1 := by + rw [initial_amplitude_square hz] + exact Real.rpow_le_one hz.le hz1 (by norm_num) + obtain ⟨hGQ,hGb,_,hclose⟩ := hseed (z^(1/4 : ℝ)) hδ1 + refine ⟨primitiveSeed_smooth _ hF,?_,hGb,?_⟩ + · simpa only [initial_amplitude_square hz] using hclose 2 + · intro m + have hb := he m U hU hF (z^(1/4 : ℝ)) z hδ.ne' hδ1 hz.le hz1 hGQ + (hGb (m+tensorOrder P)) + apply hb.mono_const + calc + E m*z/(z^(1/4 : ℝ))^2 = E m*(z/(z^(1/4 : ℝ))^2) := by ring + _ = E m*z^(1/2 : ℝ) := by rw [initial_error_quotient hz] + _ ≤ (1+E m)*z^(1/2 : ℝ) := mul_le_mul_of_nonneg_right + (le_add_of_nonneg_left zero_le_one) (Real.rpow_pos_of_pos hz _).le + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..264dafad1d4a508f8ff4d3ac61f88f78fff4dcb9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetric.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDifferential +import OAI.Geometry.SurfaceImmersion.Primitive.SpatialLoopAmplitude +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights + +namespace OAI + +/-! The supported primitive tensor is positive semidefinite, so the target +of a primitive addition is an actual smooth Riemannian metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates + +lemma amplitude_eq_zero_of_velocity_eq_normal {O : TopologicalSpace.Opens LowJet} + (l : SurfaceVelocityFamily.Loop O) {J : LowJet} (hJ : J ∈ O) + (hv : l.velocity (J,0) = SurfaceVelocityFamily.normal J) : l.amplitude J = 0 := by + have hh := l.length J hJ 0 + rw [hv] at hh + nlinarith [sq_nonneg (l.amplitude J)] + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +local instance primitiveMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def primitiveTensor (i : A.centers) (a : JetPolynomial.Base → ℝ) : ∀ p : M, CovariantTwoTensor p := + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree ![a y^2,0,0]) + +omit [CompactSpace M] in +lemma primitiveTensor_smooth (i : A.centers) {a : JetPolynomial.Base → ℝ} + (ha : ContDiff ℝ ∞ a) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.primitiveTensor i a p)) := by + apply A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + apply fiberFromThree.contDiff.comp + apply contDiff_pi.mpr + intro j + fin_cases j + · exact ha.pow 2 + · exact contDiff_const + · exact contDiff_const + +omit [CompactSpace M] in +lemma primitiveTensor_symmetric (i : A.centers) (a : JetPolynomial.Base → ℝ) + (p : M) (v w : TangentSpace planeModel p) : + A.primitiveTensor i a p v w = A.primitiveTensor i a p w v := by + by_cases hp : p ∈ (chart (i : M)).source + · rw [primitiveTensor,A.tensorRestore_apply i _ hp,A.tensorRestore_apply i _ hp, + fiberFromThree_symmetric] + · have hz : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.outer_support i h)) + simp [primitiveTensor,bundleRestore,hz] + +omit [CompactSpace M] in +lemma primitiveTensor_nonneg (i : A.centers) (a : JetPolynomial.Base → ℝ) + (hzero : ∀ p ∈ tsupport (A.outer i), p ∉ tsupport (A.weight i) → + a (chart (i : M) p) = 0) (p : M) (v : TangentSpace planeModel p) : + 0 ≤ A.primitiveTensor i a p v v := by + by_cases ho : p ∈ tsupport (A.outer i) + · rw [primitiveTensor,A.tensorRestore_apply i _ (A.outer_support i ho),fiberFromThree_apply] + by_cases hw : p ∈ tsupport (A.weight i) + · rw [A.outer_one i p hw] + have hsquare (r t : ℝ) : 0 ≤ r^2*t*t := by nlinarith [sq_nonneg (r*t)] + simpa [PhaseMean.evaluate] using hsquare (a (chart (i : M) p)) + (planeCoordinates ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v)).1 + · rw [hzero p ho hw] + simp [PhaseMean.evaluate] + · have hz : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport ho + simp [primitiveTensor,bundleRestore,hz] + +def primitiveMetric (g : SmoothMetric M) (i : A.centers) (a : JetPolynomial.Base → ℝ) + (ha : ContDiff ℝ ∞ a) + (hzero : ∀ p ∈ tsupport (A.outer i), p ∉ tsupport (A.weight i) → + a (chart (i : M) p) = 0) : SmoothMetric M where + inner p := g.inner p+A.primitiveTensor i a p + symm p v w := by + change g.inner p v w+A.primitiveTensor i a p v w = _ + rw [g.symm p v w,A.primitiveTensor_symmetric i a p v w] + rfl + pos p v hv := lt_of_lt_of_le (g.pos p v hv) + (le_add_of_nonneg_right (A.primitiveTensor_nonneg i a hzero p v)) + isVonNBounded p := (g.isVonNBounded p).subset (by + intro v hv + exact lt_of_le_of_lt (le_add_of_nonneg_right (A.primitiveTensor_nonneg i a hzero p v)) hv) + contMDiff := g.contMDiff.add_section (A.primitiveTensor_smooth i ha) + +lemma primitive_amplitude_zero_off_weight (i : A.centers) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (houter : (chart (i : M)) '' tsupport (A.outer i) ⊆ S) + (G : JetPolynomial.Base → JetPolynomial.Space) (hGO : MapsTo (lowJet G) S O) + (K : Set JetPolynomial.Base) (hKA : K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) : + ∀ p ∈ tsupport (A.outer i), p ∉ tsupport (A.weight i) → a (chart (i : M) p) = 0 := by + intro p hp hwp + let x := chart (i : M) p + have hx : x ∈ S := houter ⟨p,hp,rfl⟩ + have hxK : x ∉ K := by + intro hk + obtain ⟨q,hq,he⟩ := hKA hk + have hqp : q = p := (chart (i : M)).injOn (A.weight_support i hq) (A.outer_support i hp) he + exact hwp (hqp ▸ hq) + rw [← l.amplitude_at_lowJet hamp G (hGO hx)] + exact l.amplitude_eq_zero_of_velocity_eq_normal (hGO hx) + (hv _ (hGO hx) (by simpa only [lowJetPosition_lowJet] using hxK) 0) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetricPowers.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetricPowers.lean new file mode 100644 index 0000000000000000000000000000000000000000..b95cb89100bcbdcdb1913d886c7218870637f10b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveMetricPowers.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSlowErrorProfiles + +namespace OAI + +/-! The fast remainder stays arbitrarily small at a prescribed unweighted +order when the slow exponent is chosen after its fixed loss. -/ +noncomputable section +namespace ClosedSurfaceR4.PrimitiveRealization + +lemma primitive_tail_power_bound {z b : ℝ} {N R loss : ℕ} + (hz : 0 < z) (hz1 : z ≤ 1) (hb : 0 ≤ b) (hbl : b < 1/(1+(loss : ℝ))) : + z^(N+R+1)/(z^b)^loss/z^R ≤ z^N := by + have hl : 0 ≤ (loss : ℝ) := Nat.cast_nonneg _ + have hbl' : b*(1+(loss : ℝ)) < 1 := (lt_div_iff₀ (by positivity)).mp hbl + have he : (N : ℝ) ≤ (N+R+1 : ℕ)-b*(loss : ℝ)-(R : ℝ) := by + push_cast + nlinarith + have hid : z^(N+R+1)/(z^b)^loss/z^R = + z^((N+R+1 : ℕ)-b*(loss : ℝ)-(R : ℝ)) := by + rw [← Real.rpow_natCast z (N+R+1),← Real.rpow_mul_natCast hz.le, + ← Real.rpow_natCast z R,← Real.rpow_sub hz,← Real.rpow_sub hz] + rw [hid] + simpa only [Real.rpow_natCast] using Real.rpow_le_rpow_of_exponent_ge hz hz1 he + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveNormalCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveNormalCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f45468b3d1f0f9cd2ab10b4d039d0db569aadec --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveNormalCoordinates.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets + +namespace OAI + +/-! The normal triple estimates imply the actual good phase and injective +differential in the plane coordinates used by the exact correction. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates SurfaceJetCoordinates + +lemma primitiveNormalTriple_toEuclidean {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (p : JetPolynomial.Base) : + primitiveNormalTriple (fun q => JetVelocityCoordinates.toEuclidean (G q)) p = + ![slot 1 (lowJet G p),slot 2 (lowJet G p),slot 6 (lowJet G p)] := by + have hy : (fun q => fderiv ℝ (fun r => JetVelocityCoordinates.toEuclidean (G r)) q + (coordinateVector 1)) = fun q => JetVelocityCoordinates.toEuclidean (slot 2 (lowJet G q)) := + funext (euclidean_first_derivative hG 1) + ext k a + fin_cases k + · change spaceCoordinates (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (coordinateVector 0)) a = _ + rw [euclidean_first_derivative hG] + rfl + · change spaceCoordinates (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (coordinateVector 1)) a = _ + rw [euclidean_first_derivative hG] + rfl + · change spaceCoordinates (fderiv ℝ + (fun q => fderiv ℝ (fun r => JetVelocityCoordinates.toEuclidean (G r)) q + (coordinateVector 1)) p (coordinateVector 1)) a = _ + rw [hy,euclidean_y_derivative hG] + rfl + +lemma primitiveNormalTriple_chart {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : JetPolynomial.Base) : + primitiveNormalTriple (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p = + ![realTwoJet F (baseEquiv p) 0,realTwoJet F (baseEquiv p) 1, + realTwoJet F (baseEquiv p) 4] := by + have he := primitiveNormalTriple_toEuclidean (hF.comp baseEquiv.contDiff) p + simp only [Function.comp_apply] at he + rw [he] + have hh := decode_lowJet hF p + ext k a + fin_cases k + · exact congrArg (fun J : CollarVelocity.JetBase => J.2 0 a) hh + · exact congrArg (fun J : CollarVelocity.JetBase => J.2 1 a) hh + · exact congrArg (fun J : CollarVelocity.JetBase => J.2 4 a) hh + +theorem good_phase_of_primitive_normal {F : RField 4} (hF : ContDiff ℝ ∞ F) + (p : JetPolynomial.Base) + (hD : + let H := primitiveNormalTriple + (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0) + (hB : + let H := primitiveNormalTriple + (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p + realNormalPart (H 0) (H 1) (H 2) ≠ 0) : + Function.Injective (fderiv ℝ F (baseEquiv p)) ∧ + PhaseGeometry.Good (realSecondTensor F (baseEquiv p)) SmallModes.dx := by + dsimp only at hD hB + rw [primitiveNormalTriple_chart hF] at hD hB + change realSecondForm F SmallModes.dy SmallModes.dy (baseEquiv p) ≠ 0 at hB + refine ⟨injective_of_gramDet_ne_zero _ hD,?_,?_⟩ + · intro hz + exact one_ne_zero (congrArg Prod.fst hz) + · simpa [PhaseGeometry.secondQuadratic,realSecondTensor,SmallModes.dx,SmallModes.dy] using hB + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorConjugation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorConjugation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dcad719216d904141c1223b229d0e2ea40bbd0a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorConjugation.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFiberInverse + +namespace OAI + +/-! Conjugation of the finite primitive operator by tensor coordinates. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance conjugateFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance conjugateFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {ι : Type*} [Fintype ι] + +lemma completedPrimitiveOperator_conjugate (e f : TensorFiber →L[ℝ] TensorFiber) + (q : ι → TensorFiber →L[ℝ] ℝ) (w : ι → ℝ) + (v v' : ι → Plane →L[ℝ] ℝ) + (hef : ∀ H, e (f H) = H) + (hf : ∀ H, tensorSymmetrizer (f H) = f (tensorSymmetrizer H)) + (hv : ∀ a, e ((v a).smulRight (v a)) = (v' a).smulRight (v' a)) : + e.comp ((completedPrimitiveOperator q w v).comp f) = + completedPrimitiveOperator (fun a => (q a).comp f) w v' := by + apply ContinuousLinearMap.ext + intro H + simp only [ContinuousLinearMap.comp_apply,completedPrimitiveOperator_apply, + finitePrimitiveOperator_apply,map_sub,map_add,map_sum,map_smul,hf,hef,hv] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorMask.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorMask.lean new file mode 100644 index 0000000000000000000000000000000000000000..42e9d4c92d66c06916369e9bd92cf6d32078db9f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorMask.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFiberInverse + +namespace OAI + +/-! Inactive primitive entries may be replaced before estimating the +finite operator; their cutoff is exactly zero. -/ +noncomputable section +open Set +open scoped BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance maskFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance maskFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {ι : Type*} [Fintype ι] + +lemma completedPrimitiveOperator_mask + (q : ι → TensorFiber →L[ℝ] ℝ) (w : ι → ℝ) + (v v₀ : ι → Plane →L[ℝ] ℝ) (S : Set ι) [DecidablePred (· ∈ S)] + (hz : ∀ a, a ∉ S → w a = 0) : + completedPrimitiveOperator q w v = + completedPrimitiveOperator (fun a => if a ∈ S then q a else 0) w + (fun a => if a ∈ S then v a else v₀ a) := by + apply ContinuousLinearMap.ext + intro H + simp only [completedPrimitiveOperator_apply,finitePrimitiveOperator_apply] + congr 2 + apply Finset.sum_congr rfl + intro a _ + by_cases ha : a ∈ S + · simp only [ha,ite_true] + · simp only [ha,ite_false,hz a ha,zero_pow (by decide : 2 ≠ 0),zero_mul,zero_smul] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8faa7dc8447501363c3fb1c4c536da1c842a8f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOperatorStability.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFiberInverse +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Uniform stability of the finite primitive inverse when its coefficient +functionals, cutoffs and phase covectors all vary independently. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +local instance dataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance dataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance dataFiberComplete : CompleteSpace TensorFiber := inferInstance +local instance dataDualAdd : ContinuousAdd (Plane →L[ℝ] ℝ) := inferInstance +local instance dataDualSmul : ContinuousSMul ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance dataFiberGroup : AddCommGroup TensorFiber := dataFiberNormed.toAddCommGroup +variable {ι : Type*} [Fintype ι] + +abbrev PrimitiveOperatorData (ι : Type*) := + ((ι → TensorFiber →L[ℝ] ℝ) × (ι → ℝ)) × (ι → Plane →L[ℝ] ℝ) + +def primitiveDataOperator (z : PrimitiveOperatorData ι) : TensorFiber →L[ℝ] TensorFiber := + completedPrimitiveOperator z.1.1 z.1.2 z.2 + +lemma primitiveDataOperator_smooth : + ContDiff ℝ ∞ (primitiveDataOperator (ι := ι)) := by + have hs : ContDiff ℝ ∞ (fun z : PrimitiveOperatorData ι => + finitePrimitiveOperator z.1.1 z.1.2 z.2) := by + apply ContDiff.sum + intro i _ + have hp : ContDiff ℝ ∞ (fun z : PrimitiveOperatorData ι => z.1.2 i) := + (contDiff_apply ℝ ℝ i).comp (contDiff_snd.comp contDiff_fst) + have hv : ContDiff ℝ ∞ (fun z : PrimitiveOperatorData ι => z.2 i) := + (contDiff_apply ℝ (Plane →L[ℝ] ℝ) i).comp contDiff_snd + have hq : ContDiff ℝ ∞ (fun z : PrimitiveOperatorData ι => + (z.1.1 i).comp tensorSymmetrizer) := + ((contDiff_apply ℝ (TensorFiber →L[ℝ] ℝ) i).comp + (contDiff_fst.comp contDiff_fst)).clm_comp contDiff_const + exact (hp.pow 2).smul (hq.smulRight (hv.smulRight hv)) + exact (hs.add contDiff_const).sub contDiff_const + +lemma primitiveDataInverse_smoothAt {z : PrimitiveOperatorData ι} + (hz : (primitiveDataOperator z).IsInvertible) (H : TensorFiber) : + ContDiffAt ℝ ∞ (fun w : PrimitiveOperatorData ι × TensorFiber => + (primitiveDataOperator w.1).inverse w.2) (z, H) := by + exact (hz.contDiffAt_map_inverse.comp (z,H) + (primitiveDataOperator_smooth.contDiffAt.comp (z,H) contDiffAt_fst)).clm_apply contDiffAt_snd + +lemma isOpen_primitiveDataPositive (i : ι) : + IsOpen {w : PrimitiveOperatorData ι × TensorFiber | + (primitiveDataOperator w.1).IsInvertible ∧ + 0 < w.1.1.1 i ((primitiveDataOperator w.1).inverse w.2)} := by + rw [isOpen_iff_mem_nhds] + intro w hw + have hop : ContinuousAt (fun z : PrimitiveOperatorData ι × TensorFiber => + primitiveDataOperator z.1) w := + (primitiveDataOperator_smooth.continuous.comp continuous_fst).continuousAt + have hi := hop.eventually hw.1.eventually_nhds + have hinv := (hw.1.contDiffAt_map_inverse (n := ∞)).continuousAt.comp (x := w) hop + have hval := hinv.clm_apply continuous_snd.continuousAt + have hcoeff : Continuous (fun z : PrimitiveOperatorData ι × TensorFiber => z.1.1.1 i) := by + fun_prop + exact hi.and ((hcoeff.continuousAt.clm_apply hval).eventually (lt_mem_nhds hw.2)) + +/-- On a compact family of exact reference decompositions, independent +perturbations of every entry preserve invertibility and the selected positive +amplitude coefficient. In particular the coefficient functionals may vary. -/ +theorem compact_primitiveData_stability (i : ι) + {K : Set (PrimitiveOperatorData ι × TensorFiber)} (hK : IsCompact K) + (hid : ∀ w ∈ K, primitiveDataOperator w.1 = ContinuousLinearMap.id ℝ TensorFiber) + (hpos : ∀ w ∈ K, 0 < w.1.1.1 i w.2) : + ∃ eps : ℝ, 0 < eps ∧ ∀ w ∈ K, ∀ w' : PrimitiveOperatorData ι × TensorFiber, + ‖w'-w‖ < eps → (primitiveDataOperator w'.1).IsInvertible ∧ + 0 < w'.1.1.1 i ((primitiveDataOperator w'.1).inverse w'.2) := by + have hsub : K ⊆ {w : PrimitiveOperatorData ι × TensorFiber | + (primitiveDataOperator w.1).IsInvertible ∧ + 0 < w.1.1.1 i ((primitiveDataOperator w.1).inverse w.2)} := by + intro w hw + change (primitiveDataOperator w.1).IsInvertible ∧ + 0 < w.1.1.1 i ((primitiveDataOperator w.1).inverse w.2) + rw [hid w hw,ContinuousLinearMap.inverse_id,ContinuousLinearMap.id_apply] + exact ⟨⟨ContinuousLinearEquiv.refl ℝ TensorFiber,rfl⟩,hpos w hw⟩ + obtain ⟨eps,heps,hnear⟩ := hK.exists_thickening_subset_open + (isOpen_primitiveDataPositive i) hsub + refine ⟨eps,heps,fun w hw w' hdist => hnear ?_⟩ + exact Metric.mem_thickening_iff.mpr ⟨w,hw,by simpa only [dist_eq_norm] using hdist⟩ + + +/-- A local matrix and the one active coefficient are enough for compact +stability. No continuity of inactive chart functionals is required. -/ +theorem compact_inverse_coefficient_stability + {K : Set (((TensorFiber →L[ℝ] TensorFiber) × (TensorFiber →L[ℝ] ℝ)) × TensorFiber)} + (hK : IsCompact K) + (hid : ∀ w ∈ K, w.1.1 = ContinuousLinearMap.id ℝ TensorFiber) + (hpos : ∀ w ∈ K, 0 < w.1.2 w.2) : + ∃ eps : ℝ, 0 < eps ∧ ∀ w ∈ K, + ∀ w' : ((TensorFiber →L[ℝ] TensorFiber) × (TensorFiber →L[ℝ] ℝ)) × TensorFiber, + ‖w'-w‖ < eps → w'.1.1.IsInvertible ∧ 0 < w'.1.2 (w'.1.1.inverse w'.2) := by + let O : Set (((TensorFiber →L[ℝ] TensorFiber) × (TensorFiber →L[ℝ] ℝ)) × TensorFiber) := + {w | w.1.1.IsInvertible ∧ 0 < w.1.2 (w.1.1.inverse w.2)} + have hO : IsOpen O := by + rw [isOpen_iff_mem_nhds] + intro w hw + have hop : ContinuousAt (fun z : ((TensorFiber →L[ℝ] TensorFiber) × + (TensorFiber →L[ℝ] ℝ)) × TensorFiber => z.1.1) w := + continuous_fst.fst.continuousAt + have hi := hop.eventually hw.1.eventually_nhds + have hinv := (hw.1.contDiffAt_map_inverse (n := ∞)).continuousAt.comp (x := w) hop + have hval := hinv.clm_apply continuous_snd.continuousAt + have hcoeff : Continuous (fun z : ((TensorFiber →L[ℝ] TensorFiber) × + (TensorFiber →L[ℝ] ℝ)) × TensorFiber => z.1.2) := continuous_fst.snd + exact hi.and ((hcoeff.continuousAt.clm_apply hval).eventually (lt_mem_nhds hw.2)) + have hKO : K ⊆ O := by + intro w hw + change w.1.1.IsInvertible ∧ 0 < w.1.2 (w.1.1.inverse w.2) + rw [hid w hw,ContinuousLinearMap.inverse_id,ContinuousLinearMap.id_apply] + exact ⟨⟨ContinuousLinearEquiv.refl ℝ TensorFiber,rfl⟩,hpos w hw⟩ + obtain ⟨eps,heps,hnear⟩ := hK.exists_thickening_subset_open hO hKO + refine ⟨eps,heps,fun w hw w' hdist => hnear ?_⟩ + exact Metric.mem_thickening_iff.mpr ⟨w,hw,by simpa only [dist_eq_norm] using hdist⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOuterGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOuterGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..a30ffc7c29c4847cced27f30fcb82f414e34661d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveOuterGeometry.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseOuterImmersion + +namespace OAI + +/-! Convert the prescribed metric's convexity and the chosen outer plateau +into all geometric hypotheses of the supported primitive loop. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates JetPolynomial SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem primitive_outer_geometry (i : A.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {phi : SmallModes.Base → ℝ} (hphi : ContDiff ℝ ∞ phi) + (hphase : ∀ x, (realPhaseChart e x).1 = phi x) + {T Ω : Set SmallModes.Base} (hΩ : IsOpen Ω) (hTΩ : T ⊆ Ω) + (hΩe : Ω ⊆ (surfacePhaseChart (i : M) e).target) + (houter : ∀ x ∈ T, A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1)) + (hconvex : ∀ x ∈ Ω, ∀ v : SmallModes.Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (i : M)) phi + (coordinateChart (i : M) ((surfacePhaseChart (i : M) e).symm x)) v v) : + ∃ U : Set SmallModes.Base, IsOpen U ∧ T ⊆ U ∧ U ⊆ Ω ∧ + ContDiffOn ℝ ∞ (n.inPhase (i : M) e) U ∧ + (∀ x ∈ U, Function.Injective (fderiv ℝ (A.phaseRealChartMap i e.symm F) x)) ∧ + (∀ x ∈ U, coordDeriv dx (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n.inPhase (i : M) e x = 0 ∧ + coordDeriv dy (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n.inPhase (i : M) e x = 0 ∧ + n.inPhase (i : M) e x ⬝ᵥ n.inPhase (i : M) e x = 1) ∧ + ∀ x ∈ U, 0 < coordinateMetricHessian + (inducedCoordinateMetric (A.phaseRealChartMap i e.symm F)) Prod.fst x dy dy := by + obtain ⟨U,hU,hTU,hUΩ,ho⟩ := A.phase_outer_neighborhood i e hΩ hTΩ hΩe houter + let E := surfacePhaseChart (i : M) e + have hUE : U ⊆ E.target := hUΩ.trans hΩe + refine ⟨U,hU,hTU,hUΩ,(n.inPhase_smooth (i : M) e hi).mono hUE,?_,?_,?_⟩ + · intro x hx + have hp := E.map_target (hUE hx) + have hh := A.phase_injective_of_outer i hF e he hi hp (ho x hx) + change Function.Injective (fderiv ℝ (A.phaseRealChartMap i e.symm F) (E (E.symm x))) at hh + rwa [E.right_inv (hUE hx)] at hh + · intro x hx + exact ⟨A.preferred_normal_in_phase_of_outer i hF.1 n e hi (hUE hx) (ho x hx) dx, + A.preferred_normal_in_phase_of_outer i hF.1 n e hi (hUE hx) (ho x hx) dy, + n.inPhase_unit (i : M) e x⟩ + · intro x hx + have hh := A.phase_hessian_positive_of_outer i hF e he hi hphi hphase + (E.map_target (hUE hx)) (ho x hx) (hconvex x (hUΩ hx)) + change 0 < coordinateMetricHessian _ Prod.fst (E (E.symm x)) dy dy at hh + rwa [E.right_inv (hUE hx)] at hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundary.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ffd6af6880aa37b4e32df4f36a4ec0b99e1575a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundary.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchCurves +import OAI.Geometry.SurfaceImmersion.Atlas.RestrictedPhaseTransition +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCurveCrossings + +namespace OAI + +/-! Transfer the actual old boundary invariant to the new analytic patch. +The source restriction preserves the current primitive's vertical direction. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {A B : SmoothingAtlas M} {i : A.centers} + {e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base} + {F : M → Space} {amp phi : M → ℝ} {D : Set M} +namespace SupportedPrimitivePatch +variable (d : SupportedPrimitivePatch A i e F amp phi D) + +omit [T2Space M] in +include d in +lemma current_second (c₀ : PhaseBoundaryCurve B) + (hi : (i : M) = (c₀.index : M)) (he : ∀ x, e x = c₀.phase x) + {g : SmoothMetric M} (hF : IsSmoothIsometricImmersion M g F) + {p : M} (hp : p ∈ c₀.carrier) (hpD : p ∈ closure D) : + c₀.second F p = realSecondForm (A.phaseRealChartMap i e.symm F) dy dy + (surfacePhaseChart (i : M) e p) := by + have hs := c₀.second_transition A i e d.phase_smooth d.inverse_smooth hF hp + (d.source_closed hpD) (d.active_closed p hpD) + have ht := same_phase_transition_fderiv (c₀.index : M) (i : M) hi.symm c₀.phase e he (c₀.source hp) + change fderiv ℝ (surfacePhaseTransition (c₀.index : M) c₀.phase (i : M) e) + (c₀.coordinate p) = ContinuousLinearMap.id ℝ Base at ht + dsimp only at hs + rw [ht,ContinuousLinearMap.id_apply] at hs + exact hs + +omit [T2Space M] in +lemma zero_amplitude_frontier (c : PhaseBoundaryCurve B) (hD : IsOpen D) + {p : M} (hp : p ∈ c.carrier ∩ closure D) + (ha : d.amplitude (surfacePhaseChart (i : M) e p) = 0) : p ∈ frontier D := by + refine ⟨hp.2,?_⟩ + rw [hD.interior_eq] + intro hpin + have hpos := (d.amplitude_positive _).mpr ⟨p,hpin,rfl⟩ + rw [ha] at hpos + exact lt_irrefl _ hpos + +omit [T2Space M] in +lemma old_boundary_crossing (c₀ c : PhaseBoundaryCurve B) + (hi : (i : M) = (c₀.index : M)) (he : ∀ x, e x = c₀.phase x) + (hD : IsOpen D) (hfront : c₀.carrier = frontier D) + {g : SmoothMetric M} (hF : IsSmoothIsometricImmersion M g F) + (b k : Base → ℝ) + (hv : ∀ p ∈ c.carrier ∩ closure D, + (b (surfacePhaseChart (i : M) e p),k (surfacePhaseChart (i : M) e p)) = + fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) dy) + (hpositive : ∀ p ∈ c.carrier ∩ frontier D, 0 < c₀.crossing c F p) : + ∀ x ∈ d.curve c, d.amplitude x = 0 → + 0 < orderedCrossing (A.phaseRealChartMap i e.symm F) dy (b x,k x) x + (coordinateGaussianCurvature (realMetric (A.phaseRealChartMap i e.symm F) dx dx) + (realMetric (A.phaseRealChartMap i e.symm F) dx dy) + (realMetric (A.phaseRealChartMap i e.symm F) dy dy) x) := by + rintro x ⟨p,hp,rfl⟩ ha + have hpf := d.zero_amplitude_frontier c hD hp ha + have hp₀ : p ∈ c₀.carrier := hfront.symm ▸ hpf + have hcross := c₀.crossing_transition c A i e d.phase_smooth d.inverse_smooth hF hp₀ hp.1 + (d.source_closed hp.2) (d.active_closed p hp.2) + have ht := same_phase_transition_fderiv (c₀.index : M) (i : M) hi.symm c₀.phase e he (c₀.source hp₀) + change fderiv ℝ (surfacePhaseTransition (c₀.index : M) c₀.phase (i : M) e) + (c₀.coordinate p) = ContinuousLinearMap.id ℝ Base at ht + dsimp only at hcross + rw [ht,ContinuousLinearMap.id_apply,← hv p hp] at hcross + have hc := hpositive p ⟨hp.1,hpf⟩ + rw [hcross] at hc + exact hc + +end SupportedPrimitivePatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundaryStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundaryStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb189e7697bd8400baf0d652ff2faf145cb8134a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchBoundaryStep.lean @@ -0,0 +1,180 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentCircularBoundaryStep +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchBoundary +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryStepGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedPhaseCrossingSlopes + +namespace OAI + +/-! The constructed local primitive data feed the exact analytic theorem, +with the global rank-one metric written in the original surface variables. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +local instance patchStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance patchStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance patchStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance patchStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance patchStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance patchStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SupportedPrimitivePatch +variable {A : SmoothingAtlas M} {i : A.centers} + {e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base} + {F : M → Space} {amp phi : M → ℝ} {D : Set M} + +theorem boundary_step {B : SmoothingAtlas M} {ι : Type*} [Fintype ι] + (d : SupportedPrimitivePatch A i e F amp phi D) + (c₀ : PhaseBoundaryCurve B) (hi : (i : M) = (c₀.index : M)) + (he : ∀ x, e x = c₀.phase x) + (curves : ι → PhaseBoundaryCurve B) + (hpair : ∀ j k, j ≠ k → ((curves j).carrier ∩ (curves k).carrier).Finite) + (htriple : ∀ j k l, j ≠ k → j ≠ l → k ≠ l → + (curves j).carrier ∩ (curves k).carrier ∩ (curves l).carrier = ∅) + (hD : IsOpen D) (hDr : interior (closure D) = D) (hfront : c₀.carrier = frontier D) + (hEf : Disjoint (boundaryCrossingSet curves univ) (frontier D)) + {g : SmoothMetric M} (data : MetricGoodPhaseData g F) + (hF : IsSmoothIsometricImmersion M g F) (n : PreferredNormal F) + (hgeom : FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) F n) + (hcurrent : ∀ p ∈ c₀.carrier, c₀.second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (c₀.second F p)) + (hfrontGeom : ∀ j p, p ∈ (curves j).carrier ∩ frontier D → + 0 < (curves j).second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < c₀.crossing (curves j) F p) + (hfirst : ∀ j p, p ∈ boundaryCrossingSet curves univ ∩ D → p ∈ (curves j).carrier → + (fderiv ℝ (surfacePhaseTransition ((curves j).index : M) (curves j).phase + (i : M) e) ((curves j).coordinate p) dy).1 ≠ 0) + {P : Set SmallModes.Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ j, d.curve (curves j)) \ P, + ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ + (∀ x ∈ (⋃ j, d.curve (curves j)) ∩ N, f x = 0) ∧ fderiv ℝ f p dy ≠ 0) + (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) ∧ + ∃ N : PreferredNormal W, FiniteBoundaryGeometry curves (boundaryCrossingSet curves univ) W N := by + classical + let E₀ := boundaryCrossingSet curves (univ : Set ι) + have hE₀ : E₀.Finite := boundaryCrossingSet_finite curves univ hpair + let σ := E₀ ∩ D + let : Fintype σ := (hE₀.inter_of_left D).fintype + obtain ⟨l,r,hlr,honly⟩ := boundaryCrossingSet_select curves univ htriple + let left : σ → ι := fun p => l ⟨p,p.2.1⟩ + let right : σ → ι := fun p => r ⟨p,p.2.1⟩ + let x : σ → SmallModes.Base := fun p => surfacePhaseChart (i : M) e p + choose b k hb hk hbk hv using fun j => d.curve_coefficients (curves j) + have hsource (p : σ) : (p : M) ∈ (surfacePhaseChart (i : M) e).source := + d.source_closed (subset_closure p.2.2) + have hxback (p : σ) : (surfacePhaseChart (i : M) e).symm (x p) = p := + (surfacePhaseChart (i : M) e).left_inv (hsource p) + have hxinj : Function.Injective x := by + intro p q hpq + apply Subtype.ext + have hh := congrArg (surfacePhaseChart (i : M) e).symm hpq + simpa only [hxback] using hh + have hxE (p : σ) : x p ∈ d.innerCrossings E₀ := ⟨p,p.2,rfl⟩ + have hxl (p : σ) : (p : M) ∈ (curves (left p)).carrier := (hlr ⟨p,p.2.1⟩).2.2.2.1 + have hxr (p : σ) : (p : M) ∈ (curves (right p)).carrier := (hlr ⟨p,p.2.1⟩).2.2.2.2 + have hfirst' (p : σ) : b (left p) (x p) ≠ 0 ∧ b (right p) (x p) ≠ 0 := by + have hf (j : ι) (hp : (p : M) ∈ (curves j).carrier) : b j (x p) ≠ 0 := by + have hh := congrArg Prod.fst (hv j p ⟨hp,subset_closure p.2.2⟩) + change b j (x p) = _ at hh + rw [hh] + exact hfirst j p p.2 hp + exact ⟨hf _ (hxl p),hf _ (hxr p)⟩ + obtain ⟨L,hL,hslopes⟩ := finite_crossing_slope_bound + (fun p : σ => (b (left p) (x p),k (left p) (x p))) + (fun p : σ => (b (right p) (x p),k (right p) (x p))) + have hmetric : g.inner = inducedTensor F := by + funext p + ext v w + exact (hF.2 p v w).symm + have htarget' : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e d.cutoff + (fun q => ![(d.amplitude (baseEquiv q))^2,0,0]) y)) := by + rw [d.tensor] + exact htarget + have hCS : d.compactSet ⊆ (d.window : Set JetPolynomial.Base) ∩ e.target := + fun _ hx => ⟨d.support_window hx,d.target hx⟩ + let ell : JetPolynomial.Base →L[ℝ] ℝ := ContinuousLinearMap.proj 0 + have hell₀ : ell (coordinateVector 0) = 1 := by simp [ell,coordinateVector] + have hell₁ : ell (coordinateVector 1) = 0 := by simp [ell,coordinateVector] + have hworld : ∀ p ∈ frontier D, + realSecondForm (A.phaseRealChartMap i e.symm F) dy dy (surfacePhaseChart (i : M) e p) ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize + (realSecondForm (A.phaseRealChartMap i e.symm F) dy dy (surfacePhaseChart (i : M) e p)) := by + intro p hp + have hpc : p ∈ c₀.carrier := hfront.symm ▸ hp + rw [← d.current_second c₀ hi he hF hpc hp.1] + exact hcurrent p hpc + have honly' : ∀ p j, x p ∈ d.curve (curves j) → j = left p ∨ j = right p := by + intro p j hp + obtain ⟨q,hq,hqp⟩ := hp + have heq : q = (p : M) := (surfacePhaseChart (i : M) e).injOn + (d.source_closed hq.2) (hsource p) hqp + subst q + exact honly ⟨p,p.2.1⟩ j hq.1 + have hafront : ∀ p ∈ frontier D, d.amplitude (surfacePhaseChart (i : M) e p) = 0 := by + intro p hp + have hz : ¬ 0 < d.amplitude (surfacePhaseChart (i : M) e p) := by + rw [d.amplitude_positive] + rintro ⟨q,hq,heq⟩ + have hqp := (surfacePhaseChart (i : M) e).injOn + (d.source_closed (subset_closure hq)) (d.source_closed hp.1) heq + subst q + exact hp.2 (hD.interior_eq.symm ▸ hq) + exact le_antisymm (le_of_not_gt hz) (d.amplitude_nonneg _) + have hvfront : ∀ p ∈ frontier D, surfacePhaseChart (i : M) e p ∉ (surfacePhaseChart (i : M) e) '' D := by + intro p hp hpin + obtain ⟨q,hq,heq⟩ := hpin + have hqp := (surfacePhaseChart (i : M) e).injOn + (d.source_closed (subset_closure hq)) (d.source_closed hp.1) heq + subst q + exact hp.2 (hD.interior_eq.symm ▸ hq) + obtain ⟨W,hW,hgood,N,havoid,hcross⟩ := + data.independent_circular_primitive_boundary_step A d.outer hF.1 hmetric i e + d.phase_smooth d.inverse_smooth d.cutoff_smooth d.cutoff_compact d.cutoff_source d.cover + d.amplitude_smooth d.region_compact d.open_region d.region_open d.normal_smooth + d.immersion d.normal_properties d.convexity d.amplitude_nonneg d.boundary + (fun j => d.curve_compact (curves j)) (fun j => d.curve_region (curves j)) hP hlocal + (d.innerCrossings_finite hE₀) (d.innerCrossings_region E₀) (d.innerCrossings_positive E₀) + L hL hb hk hbk d.window d.window_compact d.phase_window d.window_region + d.compactSet d.compact d.support_window d.inverse_support d.cutoff_one d.amplitude_off + ell hell₀ hell₁ h htarget' d.compact hCS + (fun j => d.curve_compact_coordinates (curves j)) d.compact_active + (d.innerCrossings_compact_coordinates E₀) + (fun j => d.old_boundary_crossing c₀ (curves j) hi he hD hfront hF (b j) (k j) + (hv j) (fun p hp => (hfrontGeom j p hp).2)) + left right x hxinj hxE (V := (surfacePhaseChart (i : M) e) '' D) + ((surfacePhaseChart (i : M) e).isOpen_image_of_subset_source hD + (fun p hp => d.source_closed (subset_closure hp))) + (fun p => ⟨p,p.2.2,rfl⟩) honly' hfirst' hslopes B curves n + (fun j p hp => ⟨hgeom.nonzero j p hp,hgeom.avoids j p hp⟩) + hD hDr (fun p hp => (d.source_closed hp).1) (fun p hp => (d.source_closed hp).2) + d.active_closed E₀ hE₀ hEf d.support d.closed_coordinates + (fun j p hp hpD => ⟨p,⟨hp,hpD⟩,rfl⟩) + (fun j p hp hpD => hv j p ⟨hp,hpD⟩) hworld + hafront (fun j p hp hpD => (hfrontGeom j p ⟨hp,hpD⟩).1) hvfront + (fun p => by rw [hxback]; exact p.2) + (fun p hp hpD => ⟨⟨p,hp,hpD⟩,hxback ⟨p,hp,hpD⟩⟩) + (fun j k hjk p hp hj hk => + ⟨⟨hgeom.positive j k hjk p hp hj hk,hgeom.positive k j hjk.symm p hp hk hj⟩, + hgeom.crossing j k hjk p hp hj hk,hgeom.crossing k j hjk.symm p hp hk hj⟩) + exact ⟨W,hW,hgood,N,{ + nonzero := fun j p hp => (havoid j p hp).1 + avoids := fun j p hp => (havoid j p hp).2 + positive := fun j k hjk p hp hj hk => (hcross j k hjk p hp hj hk).1.1 + crossing := fun j k hjk p hp hj hk => (hcross j k hjk p hp hj hk).2.1 }⟩ + +end SupportedPrimitivePatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchCurves.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchCurves.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb7259778620ce0fb4f3a80276ce66d4a968ad5b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchCurves.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseCurveVectors + +namespace OAI + +/-! Actual remaining boundary curves and finite crossing points inside a +constructed primitive patch. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {A B : SmoothingAtlas M} {i : A.centers} + {e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base} + {F : M → Space} {amp phi : M → ℝ} {D : Set M} +namespace SupportedPrimitivePatch +variable (d : SupportedPrimitivePatch A i e F amp phi D) + +omit [T2Space M] in +lemma coordinate_mem_compact {p : M} (hp : p ∈ closure D) : + baseEquiv.symm (surfacePhaseChart (i : M) e p) ∈ d.compactSet := by + change baseEquiv.symm (baseEquiv (e (chart (i : M) p))) ∈ _ + rw [baseEquiv.symm_apply_apply] + exact d.closed_coordinates p hp + +omit [T2Space M] in +lemma coordinate_mem_region {p : M} (hp : p ∈ closure D) : + surfacePhaseChart (i : M) e p ∈ d.region := by + apply d.window_region + refine ⟨baseEquiv.symm (surfacePhaseChart (i : M) e p),?_,baseEquiv.apply_symm_apply _⟩ + exact subset_closure (d.support_window (d.coordinate_mem_compact hp)) + +def curve (_d : SupportedPrimitivePatch A i e F amp phi D) (c : PhaseBoundaryCurve B) : Set Base := c.inPhase (i : M) e (closure D) + +lemma curve_compact (c : PhaseBoundaryCurve B) : IsCompact (d.curve c) := + c.inPhase_compact (i : M) e isClosed_closure.isCompact d.source_closed + +omit [T2Space M] in +lemma curve_region (c : PhaseBoundaryCurve B) : d.curve c ⊆ d.region := by + rintro x ⟨p,hp,rfl⟩ + exact d.coordinate_mem_region hp.2 + +omit [T2Space M] in +lemma curve_compact_coordinates (c : PhaseBoundaryCurve B) : + ∀ x ∈ d.curve c, baseEquiv.symm x ∈ d.compactSet := by + rintro x ⟨p,hp,rfl⟩ + exact d.coordinate_mem_compact hp.2 + +theorem curve_coefficients (c : PhaseBoundaryCurve B) : + ∃ b k : Base → ℝ, ContDiff ℝ ∞ b ∧ ContDiff ℝ ∞ k ∧ + (∀ x ∈ d.curve c, b x ≠ 0 ∨ k x ≠ 0) ∧ + ∀ p ∈ c.carrier ∩ closure D, + (b (surfacePhaseChart (i : M) e p),k (surfacePhaseChart (i : M) e p)) = + fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) dy := + c.inPhase_direction_coefficients (i : M) e d.phase_smooth d.inverse_smooth + isClosed_closure.isCompact d.source_closed + +def innerCrossings (_d : SupportedPrimitivePatch A i e F amp phi D) (E : Set M) : Set Base := (surfacePhaseChart (i : M) e) '' (E ∩ D) + +omit [T2Space M] in +lemma innerCrossings_finite {E : Set M} (hE : E.Finite) : (d.innerCrossings E).Finite := + (hE.inter_of_left D).image _ + +omit [T2Space M] in +lemma innerCrossings_positive (E : Set M) : ∀ x ∈ d.innerCrossings E, 0 < d.amplitude x := by + rintro x ⟨p,hp,rfl⟩ + exact (d.amplitude_positive _).mpr ⟨p,hp.2,rfl⟩ + +omit [T2Space M] in +lemma innerCrossings_region (E : Set M) : d.innerCrossings E ⊆ d.region := by + rintro x ⟨p,hp,rfl⟩ + exact d.coordinate_mem_region (subset_closure hp.2) + +omit [T2Space M] in +lemma innerCrossings_compact_coordinates (E : Set M) : + ∀ x ∈ d.innerCrossings E, baseEquiv.symm x ∈ d.compactSet := by + rintro x ⟨p,hp,rfl⟩ + exact d.coordinate_mem_compact (subset_closure hp.2) + +end SupportedPrimitivePatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..34be2afef2a0505088966334040f7320f132412f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchDefiners.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitivePatchCurves +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPatchDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceRealPhaseChart + +namespace OAI + +/-! The generic circular tangencies supply the actual patch's local definers. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +variable {A B : SmoothingAtlas M} {i : A.centers} + {e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base} + {F : M → Space} {amp phi : M → ℝ} {D : Set M} +namespace SupportedPrimitivePatch + +lemma circular_definers (d : SupportedPrimitivePatch A i e F amp phi D) + (ell : Base) (L R : ℝ) (hR : 0 < R) + (hD : D = circularCoordinateDisk (i : M) R) + (hphase : ∀ x, (JetPolynomial.realPhaseChart e x).1 = + centeredConvexPhase ell L (coordinateChart (i : M) i) x) + (hreg : circularCoordinateRegion (i : M) R ⊆ (coordinateChart (i : M)).target) + {ι : Type*} [Fintype ι] (curves : ι → PhaseBoundaryCurve B) + (r : ι → ℝ) (hr : ∀ j, 0 < r j) + (hcarrier : ∀ j, (curves j).carrier = circularBoundary ((curves j).index : M) (r j)) + (hregions : ∀ j, circularCoordinateRegion ((curves j).index : M) (r j) ⊆ + (coordinateChart ((curves j).index : M)).target) + (E₀ : Set M) (hE₀ : E₀.Finite) + (hcross : ∀ j k, j ≠ k → (curves j).carrier ∩ (curves k).carrier ⊆ E₀) + (htan : ∀ j, (circularPhaseTangencies (i : M) ((curves j).index : M) + ell L (r j) R).Finite) : + ∃ P : Set Base, P.Finite ∧ ∀ p ∈ (⋃ j, d.curve (curves j)) \ P, + ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ ∃ f : Base → ℝ, + ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ (⋃ j, d.curve (curves j)) ∩ N, f x = 0) ∧ + fderiv ℝ f p dy ≠ 0 := by + have hcl : closure D = circularDiskClosure (i : M) R := by + rw [hD,circularCoordinateDisk_closure (i : M) hR hreg] + have hc : circularDiskClosure (i : M) R ⊆ + ((coordinateChart (i : M)).trans (JetPolynomial.realPhaseChart e)).source := by + rw [← surfacePhaseChart_real_source,← hcl] + exact d.source_closed + have hC (j : ι) : d.curve (curves j) = + ((coordinateChart (i : M)).trans (JetPolynomial.realPhaseChart e)) '' + (circularBoundary ((curves j).index : M) (r j) ∩ circularDiskClosure (i : M) R) := by + change (surfacePhaseChart (i : M) e) '' ((curves j).carrier ∩ closure D) = _ + rw [hcarrier,hcl] + congr 1 + funext p + exact surfacePhaseChart_real_apply (i : M) p e + obtain ⟨_,P,hP,hlocal⟩ := circular_phase_defining_family_local (i : M) ell L R + (JetPolynomial.realPhaseChart e) (JetPolynomial.realPhaseChart_smooth e d.phase_smooth) + (JetPolynomial.realPhaseChart_symm_smooth e d.inverse_smooth) hphase hreg hc + (fun j => ((curves j).index : M)) r hr hregions E₀ hE₀ + (fun j k hjk => by simpa only [← hcarrier] using hcross j k hjk) htan + refine ⟨P,hP,?_⟩ + simpa only [hC] using hlocal + +end SupportedPrimitivePatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d634cee6deee5a0f00f657ce44091c566a28459 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitivePatchRealization.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitivePatch +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentConstructedCircular + +namespace OAI + +/-! The constructed local primitive data feed the exact analytic theorem, +with the global rank-one metric written in the original surface variables. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +local instance patchRealizeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance patchRealizeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance patchRealizeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance patchRealizeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance patchRealizeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance patchRealizeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SupportedPrimitivePatch +variable {A : SmoothingAtlas M} {i : A.centers} + {e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base} + {F : M → Space} {amp phi : M → ℝ} {D : Set M} + +theorem exact_metric (d : SupportedPrimitivePatch A i e F amp phi D) + {g : SmoothMetric M} (data : MetricGoodPhaseData g F) + (hF : IsSmoothIsometricImmersion M g F) (h : SmoothMetric M) + (htarget : h.inner = g.inner + (fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p)) : + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ Nonempty (MetricGoodPhaseData h W) := by + have hmetric : g.inner = inducedTensor F := by + funext p + ext v w + exact (hF.2 p v w).symm + have htarget' : h.inner = g.inner + A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e d.cutoff + (fun q => ![(d.amplitude (baseEquiv q))^2,0,0]) y)) := by + rw [d.tensor] + exact htarget + have hCS : d.compactSet ⊆ (d.window : Set JetPolynomial.Base) ∩ e.target := + fun _ hx => ⟨d.support_window hx,d.target hx⟩ + let ell : JetPolynomial.Base →L[ℝ] ℝ := ContinuousLinearMap.proj 0 + have hell₀ : ell (coordinateVector 0) = 1 := by simp [ell,coordinateVector] + have hell₁ : ell (coordinateVector 1) = 0 := by simp [ell,coordinateVector] + obtain ⟨z,hz,hz1,hzle,W,hW,hgood,_⟩ := + data.independent_constructed_circular_primitive_boundary A d.outer hF.1 hmetric + i e d.phase_smooth d.inverse_smooth d.cutoff_smooth d.cutoff_compact d.cutoff_source d.cover + d.amplitude_smooth d.region_compact d.open_region d.region_open d.normal_smooth + d.immersion d.normal_properties d.convexity (fun p _ => d.amplitude_nonneg p) d.boundary + (Curves := fun _ : Fin 0 => (∅ : Set SmallModes.Base)) + (fun _ => isCompact_empty) (fun _ => empty_subset _) (P := ∅) finite_empty + (by simp) (E := ∅) finite_empty (empty_subset _) (by simp) + 0 le_rfl (b := fun _ : Fin 0 => fun _ => 0) (c := fun _ : Fin 0 => fun _ => 0) + (k := fun _ : Fin 0 => fun _ => 0) + (fun _ => contDiff_const) (fun _ => contDiff_const) (fun _ => contDiff_const) + (fun j => Fin.elim0 j) 0 le_rfl (fun j => Fin.elim0 j) (fun j => Fin.elim0 j) + d.window d.window_compact d.phase_window d.window_region d.compactSet d.compact + d.support_window d.inverse_support d.cutoff_one d.amplitude_off ell hell₀ hell₁ h htarget' + d.compact hCS (fun j => Fin.elim0 j) (fun j => Fin.elim0 j) (fun j => Fin.elim0 j) + (by simp) (by simp) (by simp) 1 zero_lt_one 1 zero_lt_one + exact ⟨W,hW,hgood⟩ + +end SupportedPrimitivePatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveProfileStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveProfileStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..5199b7c8aba34519f2cacd6520b0514d76cf61e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveProfileStability.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveProfiles +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedActualJets +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! The five primitive derivative components are stable under a global C2 +correction. Their bound is uniform in the fast scale between zero and one. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates WeightedEstimates PeriodicExpansion + +lemma primitiveJetProfile_bound {f : JetPolynomial.Base → Euclidean} + (hf : ContDiff ℝ ∞ f) {C z : ℝ} (hC : 0 ≤ C) (hz : 0 ≤ z) (hz1 : z ≤ 1) + (hb : WeightedBound univ 1 2 C f) (p : JetPolynomial.Base) : + ‖primitiveJetProfile f z p‖ ≤ C := by + have hw (vs : List (Fin 2)) (hlen : vs.length ≤ 2) : + ‖iteratedDirectional (vs.map coordinateVector) f p‖ ≤ C := by + have hv : ∀ v ∈ vs.map coordinateVector, ‖v‖ ≤ 1 := by + intro v hv + obtain ⟨j,_,rfl⟩ := List.mem_map.mp hv + exact norm_coordinateVector_le j + have hb' : WeightedBound univ 1 (0+(vs.map coordinateVector).length) C f := + hb.mono_order (by simpa only [zero_add,List.length_map] using hlen) + have hh := hb'.iteratedDirectional isOpen_univ zero_lt_one hC hf.contDiffOn + (vs.map coordinateVector) hv 0 + simpa only [one_pow,div_one] using hh.norm_le (mem_univ p) + have hx : ‖directionalMap f (coordinateVector 0) p‖ ≤ C := by + dsimp only [directionalMap] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [0] (by decide) + have hy : ‖directionalMap f (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1] (by decide) + have hdir (v : JetPolynomial.Base) : directionalMap f v = (fun q => fderiv ℝ f q v) := rfl + have hxx : ‖directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 0) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [0,0] (by decide) + have hxy : ‖directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1,0] (by decide) + have hyy : ‖directionalMap (directionalMap f (coordinateVector 1)) (coordinateVector 1) p‖ ≤ C := by + dsimp only [directionalMap] + rw [hdir] + simpa only [List.map_cons,List.map_nil,iteratedDirectional,directionalMap] using hw [1,1] (by decide) + apply (pi_norm_le_iff_of_nonneg hC).mpr + intro i + fin_cases i + · exact hx + · exact hy + · exact hyy + · exact hxy + · change ‖z • directionalMap (directionalMap f (coordinateVector 0)) (coordinateVector 0) p‖ ≤ C + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hz] + exact (mul_le_mul_of_nonneg_left hxx hz).trans (mul_le_of_le_one_left hC hz1) + +private lemma directional_sub {f g : JetPolynomial.Base → Euclidean} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (v : JetPolynomial.Base) : + directionalMap (f-g) v = directionalMap f v-directionalMap g v := by + funext p + change (fderiv ℝ (fun q => f q-g q) p) v = (fderiv ℝ f p) v-(fderiv ℝ g p) v + rw [fderiv_fun_sub (hf.differentiable (by simp) p) (hg.differentiable (by simp) p)] + rfl + +lemma primitiveJetProfile_sub {f g : JetPolynomial.Base → Euclidean} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (z : ℝ) (p : JetPolynomial.Base) : + primitiveJetProfile (f-g) z p = primitiveJetProfile f z p-primitiveJetProfile g z p := by + have hsecond (v w : JetPolynomial.Base) : + directionalMap (directionalMap (f-g) v) w = + directionalMap (directionalMap f v) w-directionalMap (directionalMap g v) w := by + rw [directional_sub hf hg,directional_sub (directionalMap_smooth hf v) (directionalMap_smooth hg v)] + unfold primitiveJetProfile + simp only [hsecond] + simp only [directional_sub hf hg] + ext i + fin_cases i <;> simp [smul_sub] + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceVelocityFamily.Loop +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma vectorChartRead_sub (i : A.centers) (F G : M → Space) : + A.vectorChartRead i (G-F) = A.vectorChartRead i G-A.vectorChartRead i F := by + funext x + unfold vectorChartRead localize + by_cases hx : x ∈ (chart (i : M)).target <;> simp [hx,smul_sub] + +theorem primitive_profile_correction_bound (i : A.centers) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ F G : M → Space, + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ∀ C z : ℝ, 0 ≤ C → 0 ≤ z → z ≤ 1 → A.WeightedBound 1 2 C (G-F) → + ∀ p : JetPolynomial.Base, + ‖primitiveJetProfile (A.vectorChartRead i G) z p- + primitiveJetProfile (A.vectorChartRead i F) z p‖ ≤ D*C := by + obtain ⟨D,hD,hd⟩ := A.vectorChartRead_bound (V := Space) i 2 + refine ⟨D,hD,?_⟩ + intro F G hF hG C z hC hz hz1 hdiff p + have hb := hd (G-F) 1 C zero_lt_one le_rfl hC (hG.sub hF) hdiff + rw [A.vectorChartRead_sub] at hb + rw [← primitiveJetProfile_sub (A.vectorChartRead_smooth i hG) (A.vectorChartRead_smooth i hF)] + exact primitiveJetProfile_bound ((A.vectorChartRead_smooth i hG).sub + (A.vectorChartRead_smooth i hF)) (mul_nonneg hD hC) hz hz1 hb p + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSeedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSeedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d85b5867a3ccb861d903d1983e4dbd1b7cc982db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSeedBounds.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PrimitiveInitialMean +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetCompactRange + +namespace OAI + +/-! One compact jet range and derivative profiles for all scalar seeds. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open JetPolynomial WeightedEstimates + +lemma primitiveSeed_factor_bound {δ : ℝ} (hδ : δ^2 ≤ 1) : + |Real.sqrt (1-δ^2)| ≤ 1 ∧ |Real.sqrt (1-δ^2)-1| ≤ δ^2 := by + have hs := Real.sq_sqrt (sub_nonneg.mpr hδ) + have hn := Real.sqrt_nonneg (1-δ^2) + have hu : Real.sqrt (1-δ^2) ≤ 1 := by nlinarith [sq_nonneg δ] + rw [abs_of_nonneg hn,abs_of_nonpos (sub_nonpos.mpr hu)] + exact ⟨hu,by nlinarith⟩ + +theorem compact_primitiveSeed_bounds {U : Set Base} (hU : IsOpen U) + (K : Compacts Base) (hUK : U ⊆ K) {F : JetPolynomial.Base → JetPolynomial.Space} + (hF : ContDiff ℝ ∞ F) : + ∃ Q : Set LowJet, IsCompact Q ∧ ∃ A B : ℕ → ℝ, + (∀ m, 1 ≤ A m) ∧ (∀ m, 1 ≤ B m) ∧ + ∀ δ : ℝ, δ^2 ≤ 1 → Set.MapsTo (lowJet (primitiveSeed δ F)) U Q ∧ + (∀ m, WeightedBound U 1 m (B m) (lowJet (primitiveSeed δ F))) ∧ + (∀ m, WeightedBound U 1 (m+2) (A m) (primitiveSeed δ F)) ∧ + (∀ m, WeightedBound U 1 m (A m * δ^2) (primitiveSeed δ F-F)) := by + choose A hA ha using fun m => compact_local_weighted_bound hU isOpen_univ K.isCompact + hUK (Set.subset_univ _) hF.contDiffOn (m+2) + choose D hD hd using fun m => bounded_lowJet_prefix hU K hUK m + obtain ⟨Q,hQ,hQG⟩ := bounded_lowJet_range hU K hUK (zero_le_one.trans (hA 0)) + refine ⟨Q,hQ,A,(fun m => D m+A m),hA,?_,?_⟩ + · intro m + exact (hD m).trans (le_add_of_nonneg_right (zero_le_one.trans (hA m))) + · intro δ hδ + have hfactor := primitiveSeed_factor_bound hδ + have hseed (m : ℕ) : WeightedBound U 1 (m+2) (A m) (primitiveSeed δ F) := by + apply ((ha m 1 zero_le_one le_rfl).const_smul hU.uniqueDiffOn hF.contDiffOn + (Real.sqrt (1-δ^2))).mono_const + exact mul_le_of_le_one_left (zero_le_one.trans (hA m)) hfactor.1 + refine ⟨hQG _ (primitiveSeed_smooth δ hF) (hseed 0),?_,hseed,?_⟩ + · intro m + apply hd m _ (primitiveSeed_smooth δ hF) 1 (A m) zero_lt_one le_rfl + (zero_le_one.trans (hA m)) + intro j hj + simpa only [one_pow,div_one] using (hseed m).mono_order hj + · intro m + have hb := ((ha m 1 zero_le_one le_rfl).mono_order (by omega : m ≤ m+2)).const_smul + hU.uniqueDiffOn hF.contDiffOn (Real.sqrt (1-δ^2)-1) + apply (hb.mono_const (by + calc + |Real.sqrt (1-δ^2)-1| * A m ≤ δ^2 * A m := + mul_le_mul_of_nonneg_right hfactor.2 (zero_le_one.trans (hA m)) + _ = A m * δ^2 := mul_comm _ _)).congr + intro x _ + ext k + simp only [primitiveSeed,Pi.sub_apply,Pi.smul_apply,smul_eq_mul] + ring + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveShiftedPowers.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveShiftedPowers.lean new file mode 100644 index 0000000000000000000000000000000000000000..552e68db468a7b238c294cd35d9ec1e50663d4b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveShiftedPowers.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetricPowers + +namespace OAI + +/-! The chosen slow scale also gives the finite two-jet input budget for +the actual periodic primitive. -/ +noncomputable section +namespace ClosedSurfaceR4.PrimitiveRealization + +lemma slow_power_dominates_fast {z b : ℝ} {loss : ℕ} + (hz : 0 < z) (hz1 : z ≤ 1) (hb : 0 ≤ b) (hbl : b < 1/(1+(loss : ℝ))) : + z ≤ (z^b)^loss := by + have hbl' : b*(1+(loss : ℝ)) < 1 := (lt_div_iff₀ (by positivity)).mp hbl + have hpow : b*(loss : ℝ) ≤ 1 := by nlinarith + rw [← Real.rpow_mul_natCast hz.le] + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hpow + +lemma primitive_shifted_budget {z s P Q D : ℝ} + (hz : 0 < z) (hz1 : z ≤ 1) (hzs : z ≤ s) + (hP : 0 ≤ P) (hQ : 0 ≤ Q) (_hD : 0 ≤ D) : + P+(z/s)*Q+D/z^2 ≤ (P+Q+D)/z^2 := by + have hs : 0 < s := hz.trans_le hzs + have hratio : z/s ≤ 1 := (div_le_one hs).mpr hzs + have hbase : P+(z/s)*Q ≤ P+Q := by + exact add_le_add le_rfl (mul_le_of_le_one_left hQ hratio) + have hbase0 : 0 ≤ P+(z/s)*Q := add_nonneg hP (mul_nonneg (div_nonneg hz.le hs.le) hQ) + have hzsq : z^2 ≤ 1 := by nlinarith + apply (le_div_iff₀ (sq_pos_of_pos hz)).mpr + calc + (P+(z/s)*Q+D/z^2)*z^2 = (P+(z/s)*Q)*z^2+D := by field_simp + _ ≤ P+(z/s)*Q+D := add_le_add (mul_le_of_le_one_right hbase0 hzsq) le_rfl + _ ≤ P+Q+D := add_le_add hbase le_rfl + +lemma primitive_normal_threshold {b ε : ℝ} {loss : ℕ} (hb : 0 ≤ b) + (hbl : b < 1/(1+(loss : ℝ))) (hε : 0 < ε) (D : ℝ) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ z : ℝ, 0 < z → z < η → + D*z/(z^b)^loss < ε := by + have hbl' : b*(1+(loss : ℝ)) < 1 := (lt_div_iff₀ (by positivity)).mp hbl + have he : 0 < 1-b*(loss : ℝ) := by nlinarith + obtain ⟨η,hη,hη1,hh⟩ := ExactCorrection.positive_power_threshold D (1-b*(loss : ℝ)) ε he hε + refine ⟨η,hη,hη1,?_⟩ + intro z hz hzη + have hid : D*z/(z^b)^loss = D*z^(1-b*(loss : ℝ)) := by + rw [← Real.rpow_mul_natCast hz.le,Real.rpow_sub hz,Real.rpow_one,mul_div_assoc] + rw [hid] + exact hh z hz hzη + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowErrorProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowErrorProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..71f0caa891f7abad5ec4bed6ce2ff855ebf0681a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowErrorProfiles.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSlowScales + +namespace OAI + +/-! Uniform all-order power profiles for the two primitive error terms. -/ +noncomputable section +namespace ClosedSurfaceR4.PrimitiveRealization + +lemma normalized_slow_error_profile {z d d' b κ a η C : ℝ} {q : ℕ} + (hz : 0 < z) (hz1 : z ≤ 1) (hC : 0 ≤ C) (hη : 0 ≤ η) + (hηb : η ≤ 2*z^κ) + (ha : a ≤ d+κ*q-2*d') (hb : a ≤ 3*d-b-2*d') : + (C*(z^d*η^q+(z^d)^3/z^b))/(z^d')^2 ≤ C*(2^q+1)*z^a := by + have hpa : z^d*(z^κ)^q/(z^d')^2 = z^(d+κ*q-2*d') := by + simpa only [Real.rpow_zero,div_one,Real.rpow_natCast,sub_zero] using + ExactCorrection.scale_ratio_power hz d κ 0 (q : ℝ) d' + have hpb := ExactCorrection.scale_cubic_quotient hz d b d' + calc + _ ≤ (C*(z^d*(2*z^κ)^q+(z^d)^3/z^b))/(z^d')^2 := by gcongr + _ = C*2^q*z^(d+κ*q-2*d')+C*z^(3*d-b-2*d') := by + rw [mul_pow] + calc + _ = (C*2^q)*(z^d*(z^κ)^q/(z^d')^2)+C*(((z^d)^3/z^b)/(z^d')^2) := by ring + _ = _ := by rw [hpa,hpb] + _ ≤ C*2^q*z^a+C*z^a := add_le_add + (mul_le_mul_of_nonneg_left (Real.rpow_le_rpow_of_exponent_ge hz hz1 ha) + (mul_nonneg hC (pow_nonneg (by norm_num) _))) + (mul_le_mul_of_nonneg_left (Real.rpow_le_rpow_of_exponent_ge hz hz1 hb) hC) + _ = _ := by ring + +lemma slow_parameter_bound_of_exponents {z b b' : ℝ} {loss : ℕ} + (hz : 0 < z) (hz1 : z ≤ 1) : + z^b'/z^b+z/(z^b')^loss ≤ 2*z^(min (b'-b) (1-b'*loss)) := by + have hfirst : z^b'/z^b = z^(b'-b) := (Real.rpow_sub hz _ _).symm + have hsecond : z/(z^b')^loss = z^(1-b'*(loss : ℝ)) := by + rw [← Real.rpow_natCast,← Real.rpow_mul hz.le,Real.rpow_sub hz,Real.rpow_one] + rw [hfirst,hsecond] + have h₁ := Real.rpow_le_rpow_of_exponent_ge hz hz1 + (min_le_left (b'-b) (1-b'*loss)) + have h₂ := Real.rpow_le_rpow_of_exponent_ge hz hz1 + (min_le_right (b'-b) (1-b'*loss)) + linarith + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..770f0478fdb305e62c54430a430501318d553534 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowIncrement.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveIncrementBounds +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleAlgebra + +namespace OAI + +/-! Derivative and positional two-jet bounds for the actual slow-map +increment. Position coordinates cancel before the two-derivative estimate +is applied. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open WeightedEstimates JetPolynomial + +lemma lowJet_increment_eq_variation {G H : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) : + lowJet (fun x => G x + H x) - lowJet G = variationLowJet H := by + funext x + have he : lowJet (fun y => G y + H y) x = lowJet G x + variationLowJet H x := by + simpa only [one_smul] using lowJet_affine hG hH 1 x + change lowJet (fun y => G y + H y) x - lowJet G x = _ + rw [he,add_sub_cancel_left] + +lemma lowJet_increment_position (G H : JetPolynomial.Base → JetPolynomial.Space) (x : JetPolynomial.Base) (i : Fin 2) : + (lowJet (fun y => G y + H y) x - lowJet G x) (.inl i) = 0 := by + change x i - x i = 0 + exact sub_self _ + +lemma weighted_increment_unscaled {U : Set JetPolynomial.Base} {W : JetPolynomial.Base → JetPolynomial.Space} + {τ C : ℝ} {m : ℕ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hC : 0 ≤ C) + (hb : WeightedBound U τ m C W) : + WeightedBound U 1 m (C / τ ^ m) W := by + intro j hj x hx + simp only [one_pow,one_mul] + exact (hb.deriv_le hτ hj hx).trans (div_le_div_of_nonneg_left hC (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le hτ1 hj)) + +lemma slow_increment_C3 {W : RealModes.RField 4} (hW : ContDiff ℝ ∞ W) + {τ δ S : ℝ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hδ : 0 ≤ δ) (hS : 0 ≤ S) + (hb : WeightedBound Set.univ τ 3 (S * δ * τ) W) : + WeightedBound Set.univ 1 3 (S * δ / τ ^ 2) (W ∘ planeCoordinateIsometry) := by + have hc := weightedBound_comp_isometry planeCoordinateIsometry hW hb + have hh := weighted_increment_unscaled hτ hτ1 + (mul_nonneg (mul_nonneg hS hδ) hτ.le) hc + convert hh using 1 + field_simp + +lemma slow_increment_lowJet {G : JetPolynomial.Base → JetPolynomial.Space} {W : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hW : ContDiff ℝ ∞ W) + {τ δ S : ℝ} {m : ℕ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) + (hδ : 0 ≤ δ) (hS : 0 ≤ S) + (hb : WeightedBound Set.univ τ (m + 2) (S * δ * τ) W) : + WeightedBound Set.univ τ m (S * δ / τ) + (lowJet (fun x => G x + W (planeCoordinateIsometry x)) - lowJet G) := by + have hc := weightedBound_comp_isometry planeCoordinateIsometry hW hb + have hh := weighted_variationLowJet isOpen_univ + (hW.comp planeCoordinateIsometry.contDiff) hτ hτ1 + (mul_nonneg (mul_nonneg hS hδ) hτ.le) m hc + have hh' : WeightedBound Set.univ τ m (S * δ / τ) + (variationLowJet (W ∘ planeCoordinateIsometry)) := by + convert hh using 1 + field_simp + apply hh'.congr + intro x _ + exact congrFun (lowJet_increment_eq_variation hG + (hW.comp planeCoordinateIsometry.contDiff)) x + +lemma slow_increment_ratio {z : ℝ} (hz : 0 < z) (d b S : ℝ) : + S * z ^ d / z ^ b = S * z ^ (d - b) := by + rw [mul_div_assoc,← Real.rpow_sub hz] + +lemma slow_increment_C3_ratio {z : ℝ} (hz : 0 < z) (d b S : ℝ) : + S * z ^ d / (z ^ b) ^ (2 : ℕ) = S * z ^ (d - 2 * b) := by + have he : (z ^ b) ^ (2 : ℕ) = z ^ (2 * b) := by + rw [← Real.rpow_natCast,← Real.rpow_mul hz.le] + congr 1 + ring + rw [he,mul_div_assoc,← Real.rpow_sub hz] + +/-- The actual update has small C3 displacement and small positional +two-jet at every fixed order. The exponents are independent of the order. -/ +theorem primitive_slow_increment_bounds {G : JetPolynomial.Base → JetPolynomial.Space} {W : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hW : ContDiff ℝ ∞ W) + {z d b : ℝ} (hz : 0 < z) (hz1 : z ≤ 1) (hb : 0 ≤ b) + (S : ℕ → ℝ) (hS : ∀ m, 0 ≤ S m) + (hWb : ∀ m, WeightedBound Set.univ (z ^ b) m + (S m * z ^ d * z ^ b) W) : + WeightedBound Set.univ 1 3 (S 3 * z ^ (d - 2 * b)) + ((fun x => G x + W (planeCoordinateIsometry x)) - G) ∧ + (∀ m, WeightedBound Set.univ (z ^ b) m (S (m + 2) * z ^ (d - b)) + (lowJet (fun x => G x + W (planeCoordinateIsometry x)) - lowJet G)) := by + have hτ : 0 < z ^ b := Real.rpow_pos_of_pos hz _ + have hτ1 : z ^ b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hδ : 0 ≤ z ^ d := Real.rpow_nonneg hz.le _ + constructor + · have hh := slow_increment_C3 hW hτ hτ1 hδ (hS 3) (hWb 3) + rw [slow_increment_C3_ratio hz] at hh + apply hh.congr + intro x _ + exact add_sub_cancel_left _ _ + · intro m + have hh := slow_increment_lowJet hG hW hτ hτ1 hδ (hS (m + 2)) (hWb (m + 2)) + simpa only [slow_increment_ratio hz] using hh + +lemma primitive_slow_increment_derivative {G : JetPolynomial.Base → JetPolynomial.Space} {W : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hW : ContDiff ℝ ∞ W) + {z d b : ℝ} (hz : 0 < z) (hz1 : z ≤ 1) (hb : 0 ≤ b) + (S : ℕ → ℝ) (hS : ∀ m, 0 ≤ S m) + (hWb : ∀ m, WeightedBound Set.univ (z ^ b) m + (S m * z ^ d * z ^ b) W) {j : ℕ} (hj : j ≤ 3) (x : JetPolynomial.Base) : + ‖iteratedFDeriv ℝ j ((fun y => G y + W (planeCoordinateIsometry y)) - G) x‖ ≤ + S 3 * z ^ (d - 2 * b) := by + have hh := (primitive_slow_increment_bounds hG hW hz hz1 hb S hS hWb).1 + j hj x (Set.mem_univ x) + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hh + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowScales.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowScales.lean new file mode 100644 index 0000000000000000000000000000000000000000..8df8daf7ee22cd7d3b90f2ad3b5005669f66d41b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveSlowScales.lean @@ -0,0 +1,172 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold + +namespace OAI + +/-! The finite slow scales in the high-accuracy primitive realization. +These choices precede every accuracy order in its mean iteration. -/ +noncomputable section +namespace ClosedSurfaceR4.PrimitiveRealization + +def amplitudeExponent (j : ℕ) : ℝ := (1/4)*(6/5 : ℝ)^j +def scaleExponent (σ : ℝ) (steps j : ℕ) : ℝ := (j : ℝ)*σ/(steps : ℝ) + +lemma amplitudeExponent_pos (j : ℕ) : 0 < amplitudeExponent j := by + unfold amplitudeExponent + positivity + +lemma amplitudeExponent_zero : amplitudeExponent 0 = 1/4 := by + simp [amplitudeExponent] + +lemma amplitudeExponent_succ (j : ℕ) : + amplitudeExponent (j+1) = (6/5)*amplitudeExponent j := by + simp only [amplitudeExponent,pow_succ] + ring + +lemma amplitudeExponent_lower (j : ℕ) : 1/4 ≤ amplitudeExponent j := by + induction j with + | zero => rw [amplitudeExponent_zero] + | succ j ih => rw [amplitudeExponent_succ]; linarith + +/-- A finite number of amplitude improvements achieves any prescribed finite +metric order. No derivative count enters the later accuracy choices. -/ +lemma exists_amplitude_steps (R N : ℕ) : + ∃ steps : ℕ, 1 ≤ steps ∧ (N : ℝ)+R+1 < 2*amplitudeExponent steps := by + obtain ⟨j,hj⟩ := exists_nat_gt (10*((N : ℝ)+R+1)) + have hpow : 1+(j : ℝ)/5 ≤ (6/5 : ℝ)^j := by + convert one_add_mul_le_pow (a := (1/5 : ℝ)) (by norm_num) j using 1 <;> ring + refine ⟨j+1,by omega,?_⟩ + rw [amplitudeExponent_succ] + have hp : 0 < (6/5 : ℝ)^j := by positivity + dsimp [amplitudeExponent] + nlinarith + +/-- The loss powers determine one slow exponent before choosing the finite +substitution accuracies in the primitive realization argument. -/ +theorem exists_slow_exponent (R N L : ℕ) (hL : N+R < L) (p p₁ : ℝ) : + ∃ σ : ℝ, 0 < σ ∧ σ < 1 ∧ σ*(p₁+2) < 1 ∧ σ*p < 1/2 ∧ + σ < 1/16 ∧ (L : ℝ)-R-σ*p₁ > N := by + have hgap : 0 < (L : ℝ)-R-N := by + have hh : (N : ℝ)+R < L := by exact_mod_cast hL + linarith + obtain ⟨η₁,hη₁,_,hb₁⟩ := ExactCorrection.positive_power_threshold (p₁+2) 1 1 + zero_lt_one zero_lt_one + obtain ⟨η₂,hη₂,_,hb₂⟩ := ExactCorrection.positive_power_threshold p 1 (1/2) + zero_lt_one (by norm_num) + obtain ⟨η₃,hη₃,_,hb₃⟩ := ExactCorrection.positive_power_threshold p₁ 1 + ((L : ℝ)-R-N) zero_lt_one hgap + let η := min (1/32) (min η₁ (min η₂ η₃)) + have hη : 0 < η := lt_min (by norm_num) (lt_min hη₁ (lt_min hη₂ hη₃)) + let σ := η/2 + have hσ : 0 < σ := half_pos hη + have hση : σ < η := half_lt_self hη + have hσ32 : σ < 1/32 := hση.trans_le (min_le_left _ _) + have hσ₁ : σ < η₁ := hση.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hσ₂ : σ < η₂ := hση.trans_le + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have hσ₃ : σ < η₃ := hση.trans_le + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + have h₁ := hb₁ σ hσ hσ₁ + have h₂ := hb₂ σ hσ hσ₂ + have h₃ := hb₃ σ hσ hσ₃ + simp only [Real.rpow_one] at h₁ h₂ h₃ + refine ⟨σ,hσ,by linarith,by linarith,by linarith,by linarith,by linarith⟩ + +lemma scaleExponent_bounds {σ : ℝ} (hσ : 0 < σ) {steps j : ℕ} + (hs : 1 ≤ steps) (hj : j ≤ steps) : + 0 ≤ scaleExponent σ steps j ∧ scaleExponent σ steps j ≤ σ := by + have hs' : 0 < (steps : ℝ) := by exact_mod_cast (by omega : 0 < steps) + have hj' : (j : ℝ) ≤ steps := by exact_mod_cast hj + unfold scaleExponent + constructor + · positivity + · apply (div_le_iff₀ hs').mpr + nlinarith + +lemma scaleExponent_step {σ : ℝ} {steps j : ℕ} : + scaleExponent σ steps (j+1)-scaleExponent σ steps j = σ/(steps : ℝ) := by + simp only [scaleExponent,Nat.cast_add,Nat.cast_one] + ring + +/-- Both the normalized cubic remainder and the C3 displacement decay at +every stage of the finite slow iteration. -/ +theorem slow_step_positive_powers {σ : ℝ} (hσ : 0 < σ) (hσsmall : σ < 1/16) + {steps j : ℕ} (hs : 1 ≤ steps) (hj : j < steps) : + 0 < 3*amplitudeExponent j-scaleExponent σ steps (j+1)-2*amplitudeExponent (j+1) ∧ + 0 < amplitudeExponent j-2*scaleExponent σ steps (j+1) ∧ + 0 < min (σ/(steps : ℝ)) (1/2) := by + have he := (scaleExponent_bounds hσ hs (Nat.succ_le_of_lt hj)).2 + have hd := amplitudeExponent_lower j + have hs' : 0 < (steps : ℝ) := by exact_mod_cast (by omega : 0 < steps) + rw [amplitudeExponent_succ] + refine ⟨by linarith,by linarith,lt_min (div_pos hσ hs') (by norm_num)⟩ + +/-- Accuracy orders can be chosen after all scale and loss exponents are +fixed; this prevents a circular dependence of the slow scale on accuracy. -/ +theorem exists_step_accuracy {κ : ℝ} (hκ : 0 < κ) (j : ℕ) : + ∃ q : ℕ, amplitudeExponent j+κ*q > 2*amplitudeExponent (j+1) := by + obtain ⟨q,hq⟩ := exists_nat_gt ((2*amplitudeExponent (j+1)-amplitudeExponent j)/κ) + refine ⟨q,?_⟩ + have hh := (div_lt_iff₀ hκ).mp hq + nlinarith + +/-- The perturbed mean parameter has a positive decay exponent independent +of the accuracy order chosen at this stage. -/ +theorem slow_parameter_bound {σ p z : ℝ} (hσ : 0 < σ) (hp : 0 ≤ p) + (hσp : σ*p < 1/2) (hz : 0 < z) (hz1 : z ≤ 1) + {steps j : ℕ} (hs : 1 ≤ steps) (hj : j < steps) : + z^(scaleExponent σ steps (j+1))/z^(scaleExponent σ steps j)+ + z/(z^(scaleExponent σ steps (j+1)))^p ≤ + 2*z^(min (σ/(steps : ℝ)) (1/2)) := by + let κ := min (σ/(steps : ℝ)) (1/2) + have hscale := (scaleExponent_bounds hσ hs (Nat.succ_le_of_lt hj)).2 + have hgap : κ ≤ 1-scaleExponent σ steps (j+1)*p := by + have hm := mul_le_mul_of_nonneg_right hscale hp + have hk : κ ≤ 1/2 := min_le_right _ _ + linarith + have hfirst : z^(σ/(steps : ℝ)) ≤ z^κ := + Real.rpow_le_rpow_of_exponent_ge hz hz1 (min_le_left _ _) + have hsecond : z^(1-scaleExponent σ steps (j+1)*p) ≤ z^κ := + Real.rpow_le_rpow_of_exponent_ge hz hz1 hgap + rw [← Real.rpow_sub hz,scaleExponent_step,← Real.rpow_mul hz.le] + have hratio (a : ℝ) : z/z^a = z^(1-a) := by + rw [Real.rpow_sub hz,Real.rpow_one] + rw [hratio] + linarith + +/-- A small-increment error with the paper's two terms becomes arbitrarily +small after division by the next amplitude squared. This is the finite +inductive step used to improve the primitive's metric accuracy. -/ +theorem normalized_slow_error_threshold {d d' b κ C e : ℝ} {q : ℕ} + (hC : 0 ≤ C) (he : 0 < e) + (ha : 0 < d+κ*q-2*d') (hb : 0 < 3*d-b-2*d') : + ∃ ζ : ℝ, 0 < ζ ∧ ζ ≤ 1 ∧ ∀ z : ℝ, 0 < z → z < ζ → + ∀ η : ℝ, 0 ≤ η → η ≤ 2*z^κ → + (C*(z^d*η^q+(z^d)^3/z^b))/(z^d')^2 < e := by + obtain ⟨ζ₁,hζ₁,hζ₁1,h₁⟩ := ExactCorrection.positive_power_threshold + (C*2^q) (d+κ*q-2*d') (e/2) ha (half_pos he) + obtain ⟨ζ₂,hζ₂,_,h₂⟩ := ExactCorrection.positive_power_threshold + C (3*d-b-2*d') (e/2) hb (half_pos he) + refine ⟨min ζ₁ ζ₂,lt_min hζ₁ hζ₂,(min_le_left _ _).trans hζ₁1,?_⟩ + intro z hz hzζ η hη hηb + have hpa : z^d*(z^κ)^q/(z^d')^2 = z^(d+κ*q-2*d') := by + simpa only [Real.rpow_zero,div_one,Real.rpow_natCast,sub_zero] using + ExactCorrection.scale_ratio_power hz d κ 0 (q : ℝ) d' + have hpb := ExactCorrection.scale_cubic_quotient hz d b d' + have hbound : (C*(z^d*η^q+(z^d)^3/z^b))/(z^d')^2 ≤ + (C*2^q)*z^(d+κ*q-2*d')+C*z^(3*d-b-2*d') := by + calc + _ ≤ (C*(z^d*(2*z^κ)^q+(z^d)^3/z^b))/(z^d')^2 := by + gcongr + _ = (C*2^q)*(z^d*(z^κ)^q/(z^d')^2)+ + C*(((z^d)^3/z^b)/(z^d')^2) := by rw [mul_pow]; ring + _ = _ := by rw [hpa,hpb] + exact hbound.trans_lt (by + have h₁' := h₁ z hz (hzζ.trans_le (min_le_left _ _)) + have h₂' := h₂ z hz (hzζ.trans_le (min_le_right _ _)) + linarith) + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTensorRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTensorRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..975ca60e3bcebd2bd4a938546fe0ab8c0f5d1337 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTensorRemainder.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveRemainder +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicMetricCoordinates +import OAI.Geometry.SurfaceImmersion.Primitive.LocalAnsatzProfiles + +namespace OAI + +/-! The three scalar remainder estimates control the actual full metric +tensor of the same finite periodic ansatz. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_primitive_metric_remainder {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hamp : l.HasSpatialAmplitude a) {S : TopologicalSpace.Opens JetPolynomial.Base} + {K : Set LowJet} (hK : IsCompact K) (hKO : K ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGK : MapsTo (lowJet G) S K) (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m+(2*(n+1)+1)) B (lowJet G) → + let g := l.geometry G hG (fun _ hp => hKO (hGK hp)) + ∀ U : ℕ → Family S Euclidean, + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + U 0 = g.initial → (g.yyCoefficient U 1).fluct = 0 → + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.yyCoefficient U (r+1)).fluct = 0) → + WeightedBound S z m (D*z^(n+1)/s^loss) + (fun p => RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) U ℓ (n+1) z ∘ + planeCoordinateIsometry.symm) (planeCoordinateIsometry p)- + l.meanTensorOperator n z G (planeCoordinateIsometry p)-![a p^2,0,0]) := by + obtain ⟨loss,hb⟩ := l.uniform_primitive_remainder ha hamp hK hKO n ℓ hℓx hℓy + refine ⟨loss,?_⟩ + intro m B hB + obtain ⟨D,hD,hd⟩ := hb m B hB + refine ⟨D,hD,?_⟩ + intro G hG hGK s z hz hzs hs1 hGb g U hrep hU hinit hy hcoeff + have hs : 0 < s := hz.trans_le hzs + have hGO : MapsTo (lowJet G) S O := fun _ hp => hKO (hGK hp) + let f := finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) U ℓ (n+1) z + have hf : ContDiff ℝ ∞ f := by + exact PeriodicExpansion.finiteAnsatz_smooth (JetVelocityCoordinates.toEuclidean.contDiff.comp hG) + (globalCoefficients U hU) ℓ (n+1) z + let E : Bool → Bool → JetPolynomial.Base → ℝ := fun b c p => + inner ℝ + (fderiv ℝ f p (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ f p (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c))- + (l.meanOperator n b c z G p+(if b && c then a p^2 else 0)) + have hEs (b c : Bool) : ContDiffOn ℝ ∞ (E b c) S := by + have hdf := hf.fderiv_right (m := ∞) (by simp) + apply ((hdf.clm_apply contDiff_const).inner ℝ (hdf.clm_apply contDiff_const)).contDiffOn.sub + apply (l.meanOperator_smooth hG hGO n b c z).add + split_ifs + · exact (ha.pow 2).contDiffOn + · exact contDiffOn_const + have hEb (b c : Bool) : WeightedBound S z m (D*z^(n+1)/s^loss) (E b c) := + hd G hG hGK s z hz hzs hs1 hGb U hrep hinit hy hcoeff b c + let bf : Fin 3 → Bool := ![true,true,false] + let cf : Fin 3 → Bool := ![true,false,false] + have hbvec := WeightedBound.pi S.isOpen.uniqueDiffOn hz + (div_nonneg (mul_nonneg hD (pow_nonneg hz.le _)) (pow_nonneg hs.le _)) + (fun k : Fin 3 => hEs (bf k) (cf k)) (fun k => hEb (bf k) (cf k)) + have heq : (fun p => RealModes.realMetricTensor + (spaceCoordinates ∘ f ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry p)- + l.meanTensorOperator n z G (planeCoordinateIsometry p)-![a p^2,0,0]) = + (fun p k => E (bf k) (cf k) p) := by + funext p k + rw [metric_coordinate_tensor hf p] + fin_cases k <;> + simp [E,bf,cf,meanTensorOperator,MetricPolynomial.metricDirection] + ring + rw [heq] + exact hbvec + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTermC1Bounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTermC1Bounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c7639ea1b9e55443cc5ee8c6609b8d5d6ff5737 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveTermC1Bounds.lean @@ -0,0 +1,209 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCovectorFamily +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPrimitiveFamily +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds + +namespace OAI + +/-! Actual primitive tensor terms have a uniform C1 bound from their scalar +amplitude and phase-covector coordinate bounds. All constants precede those +functions and every later cycle count. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates +local instance termBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance termBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance termBoundDualNormed : NormedAddCommGroup (Plane →L[ℝ] ℝ) := inferInstance +local instance termBoundDualSpace : NormedSpace ℝ (Plane →L[ℝ] ℝ) := inferInstance + +private abbrev PrimitiveLocalData := ℝ × (ℝ × (Plane →L[ℝ] ℝ)) +private def primitiveLocalPolynomial (z : PrimitiveLocalData) : TensorFiber := + (z.1^2*z.2.1^2) • z.2.2.smulRight z.2.2 + +private lemma primitiveLocalPolynomial_smooth : ContDiff ℝ ∞ primitiveLocalPolynomial := by + unfold primitiveLocalPolynomial + exact ((contDiff_fst.pow 2).mul (contDiff_snd.fst.pow 2)).smul + (contDiff_snd.snd.smulRight contDiff_snd.snd) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance termBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance termBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance termBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance termBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma primitive_term_localized (amp phi : M → ℝ) + (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) (i : B.centers) + {y : JetPolynomial.Base} (hy : y ∈ (chart (i : M)).target) : + B.bundleLocalize B.tensorTriv i + (fun p => (amp p)^2 • phaseDifferentialSquare phi p) y = + primitiveLocalPolynomial (B.chartWeight i y, + (amp ((chart (i : M)).symm y),B.phaseCovectorRead i phi y)) := by + let p := (chart (i : M)).symm y + have hp : p ∈ (chart (i : M)).source := (chart (i : M)).map_target hy + have hpy : chart (i : M) p = y := (chart (i : M)).right_inv hy + change (chart (i : M)).target.indicator (fun x => (B.weight i ((chart (i : M)).symm x))^2 • + (B.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm x) + ((amp ((chart (i : M)).symm x))^2 • phaseDifferentialSquare phi ((chart (i : M)).symm x))) y = _ + rw [indicator_of_mem hy,map_smul,smul_smul] + change (B.weight i p^2*amp p^2) • + (B.tensorTriv i).continuousLinearMapAt ℝ p (phaseDifferentialSquare phi p) = _ + unfold phaseDifferentialSquare + erw [B.tensor_frame_square i hp,B.covectorFrame_mfderiv phi hphi i hp,hpy] + simp only [primitiveLocalPolynomial,chartWeight,indicator_of_mem hy] + rfl + +/-- A bound on the actual coordinate amplitude and covector, including +one derivative, controls the genuine globally supported primitive term. -/ +theorem primitive_term_tensor_C1_bound {D : ℝ} (hD : 0 ≤ D) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ amp phi : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ amp → ContMDiff planeModel 𝓘(ℝ) ∞ phi → + (∀ i p, p ∈ tsupport (B.weight i) → + |amp p| ≤ D ∧ ‖fderiv ℝ (amp ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ D) → + (∀ i y, y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base) → + ‖B.phaseCovectorRead i phi y‖ ≤ D ∧ + ‖fderiv ℝ (B.phaseCovectorRead i phi) y‖ ≤ D) → + B.TensorWeightedBound 1 1 E (fun p => (amp p)^2 • phaseDifferentialSquare phi p) := by + classical + have hwcompact (i : B.centers) : HasCompactSupport (B.chartWeight i) := + (B.chartWeightCompact i).isCompact.of_isClosed_subset (isClosed_tsupport _) + (B.supportedChartWeight i).tsupport_subset + choose W hW hw using fun i => compact_smooth_bound (B.chartWeight_smooth i) (hwcompact i) 1 + let R : ℝ := 1+D+∑ i : B.centers, W i + have hsum : 0 ≤ ∑ i : B.centers, W i := Finset.sum_nonneg (fun i _ => hW i) + have hR : 1 ≤ R := by dsimp only [R]; linarith + have hDR : D ≤ R := by dsimp only [R]; linarith + have hWR (i : B.centers) : W i ≤ R := by + have hh := Finset.single_le_sum (fun j _ => hW j) (Finset.mem_univ i) + dsimp only [R] + linarith + obtain ⟨K,hK,hpoly⟩ := compact_coefficient_bound uniqueDiffOn_univ + (isCompact_closedBall (0 : PrimitiveLocalData) R) (subset_univ _) + primitiveLocalPolynomial_smooth.contDiffOn 1 + refine ⟨K*R,mul_nonneg (zero_le_one.trans hK) (zero_le_one.trans hR),?_⟩ + intro amp phi hamp hphi hampBound hphiBound + let T : ∀ p : M, CovariantTwoTensor p := fun p => (amp p)^2 • phaseDifferentialSquare phi p + have hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p)) := + (hamp.pow 2).smul_section (B.phaseDifferentialSquare_smooth phi hphi) + have hpoint (i : B.centers) (y : JetPolynomial.Base) + (hy : y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base)) : + ‖B.bundleLocalize B.tensorTriv i T y‖ ≤ K*R ∧ + ‖fderiv ℝ (B.bundleLocalize B.tensorTriv i T) y‖ ≤ K*R := by + rcases hy with ⟨p,hp,rfl⟩ + have hpS := B.weight_support i hp + have hyT := (chart (i : M)).map_source hpS + let a : JetPolynomial.Base → ℝ := amp ∘ (chart (i : M)).symm + let v : JetPolynomial.Base → Plane →L[ℝ] ℝ := B.phaseCovectorRead i phi + let X : JetPolynomial.Base → PrimitiveLocalData := fun x => (B.chartWeight i x,(a x,v x)) + have ha : ContDiffAt ℝ ∞ a (chart (i : M) p) := + ((hamp.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn).contDiffAt + ((chart (i : M)).open_target.mem_nhds hyT) + have hv : ContDiffAt ℝ ∞ v (chart (i : M) p) := + (B.phaseCovectorRead_smoothOn i phi hphi).contDiffAt + ((chart (i : M)).open_target.mem_nhds hyT) + have hw' := (B.chartWeight_smooth i).contDiffAt (x := chart (i : M) p) + have hX : ContDiffAt ℝ ∞ X (chart (i : M) p) := hw'.prodMk (ha.prodMk hv) + have haw := hampBound i p hp + have hvw := hphiBound i (chart (i : M) p) ⟨p,hp,rfl⟩ + have hweight : ‖B.chartWeight i (chart (i : M) p)‖ ≤ R := + ((hw i).norm_le (mem_univ _)).trans (hWR i) + have hweightD : ‖fderiv ℝ (B.chartWeight i) (chart (i : M) p)‖ ≤ R := by + have hh := (hw i).deriv_le zero_lt_one le_rfl (mem_univ (chart (i : M) p)) + simp only [iteratedFDerivWithin_univ,one_pow,div_one,norm_iteratedFDeriv_one] at hh + exact hh.trans (hWR i) + have ha0 : ‖a (chart (i : M) p)‖ ≤ R := by + simpa only [a,Function.comp_apply,(chart (i : M)).left_inv hpS,Real.norm_eq_abs] using haw.1.trans hDR + have hXnorm : ‖X (chart (i : M) p)‖ ≤ R := by + simpa only [X,Prod.norm_def,max_le_iff] using + And.intro hweight (And.intro ha0 (hvw.1.trans hDR)) + have hDX : ‖fderiv ℝ X (chart (i : M) p)‖ ≤ R := by + rw [((hw'.differentiableAt (by simp)).hasFDerivAt.prodMk + ((ha.differentiableAt (by simp)).hasFDerivAt.prodMk + (hv.differentiableAt (by simp)).hasFDerivAt)).fderiv] + simp only [ContinuousLinearMap.opNorm_prod,Prod.norm_def,max_le_iff] + exact ⟨hweightD,haw.2.trans hDR,hvw.2.trans hDR⟩ + have hball : X (chart (i : M) p) ∈ Metric.closedBall (0 : PrimitiveLocalData) R := by + simpa only [Metric.mem_closedBall,dist_zero_right] using hXnorm + have hvalue : ‖primitiveLocalPolynomial (X (chart (i : M) p))‖ ≤ K := by + simpa only [iteratedFDerivWithin_univ,norm_iteratedFDeriv_zero] using hpoly 0 (by omega) _ hball + have hderiv : ‖fderiv ℝ primitiveLocalPolynomial (X (chart (i : M) p))‖ ≤ K := by + simpa only [iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] using hpoly 1 le_rfl _ hball + have he : B.bundleLocalize B.tensorTriv i T =ᶠ[𝓝 (chart (i : M) p)] + primitiveLocalPolynomial ∘ X := by + filter_upwards [(chart (i : M)).open_target.mem_nhds hyT] with x hx + exact B.primitive_term_localized amp phi hphi i hx + refine ⟨?_,?_⟩ + · rw [he.self_of_nhds] + exact hvalue.trans (le_mul_of_one_le_right (zero_le_one.trans hK) hR) + · rw [he.fderiv_eq,fderiv_comp (chart (i : M) p) + (primitiveLocalPolynomial_smooth.differentiable (by simp) _) + (hX.differentiableAt (by simp))] + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + (mul_le_mul hderiv hDX (norm_nonneg _) (zero_le_one.trans hK)) + intro i j hj y _ + simp only [one_pow,one_mul,iteratedFDerivWithin_univ] + by_cases hy : y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base) + · rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hj with rfl | rfl + · simpa only [norm_iteratedFDeriv_zero] using (hpoint i y hy).1 + · simpa only [norm_iteratedFDeriv_one] using (hpoint i y hy).2 + · have hz : iteratedFDeriv ℝ j (B.bundleLocalize B.tensorTriv i T) y = 0 := by + apply image_eq_zero_of_notMem_tsupport + intro hh + exact hy ((localize_tsupport (i : M) (B.weight_support i) _) + (tsupport_iteratedFDeriv_subset j hh)) + rw [hz,norm_zero] + exact mul_nonneg (zero_le_one.trans hK) (zero_le_one.trans hR) + +/-- The same primitive bound is measured in any fixed background atlas. -/ +theorem primitive_term_background_C1_bound (A : SmoothingAtlas M) {D : ℝ} (hD : 0 ≤ D) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ amp phi : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ amp → ContMDiff planeModel 𝓘(ℝ) ∞ phi → + (∀ i p, p ∈ tsupport (B.weight i) → + |amp p| ≤ D ∧ ‖fderiv ℝ (amp ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ D) → + (∀ i y, y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base) → + ‖B.phaseCovectorRead i phi y‖ ≤ D ∧ + ‖fderiv ℝ (B.phaseCovectorRead i phi) y‖ ≤ D) → + A.TensorWeightedBound 1 1 E (fun p => (amp p)^2 • phaseDifferentialSquare phi p) := by + obtain ⟨E,hE,hbound⟩ := B.primitive_term_tensor_C1_bound hD + obtain ⟨C,hC,hchange⟩ := B.tensorWeightedBound_change_atlas A 1 + refine ⟨C*E,mul_nonneg hC hE,?_⟩ + intro amp phi hamp hphi ha hp + exact hchange _ 1 E zero_lt_one le_rfl hE + ((hamp.pow 2).smul_section (B.phaseDifferentialSquare_smooth phi hphi)) + (hbound amp phi hamp hphi ha hp) + +end SmoothingAtlas + +namespace SmoothPrimitiveFamily +variable {ι : Type*} [Fintype ι] {u : ∀ p : M, CovariantTwoTensor p} + +/-- A single bound works for every term of every family with these actual +coordinate amplitude and phase-covector estimates. -/ +theorem term_background_C1_bound (B A : SmoothingAtlas M) {D : ℝ} (hD : 0 ≤ D) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ d : SmoothPrimitiveFamily ι u, + (∀ a i p, p ∈ tsupport (B.weight i) → + |d.amplitude a p| ≤ D ∧ + ‖fderiv ℝ (d.amplitude a ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ D) → + (∀ a i y, y ∈ (B.chartWeightCompact i : Set JetPolynomial.Base) → + ‖B.phaseCovectorRead i (d.phase a) y‖ ≤ D ∧ + ‖fderiv ℝ (B.phaseCovectorRead i (d.phase a)) y‖ ≤ D) → + ∀ a, A.TensorWeightedBound 1 1 E (d.term a) := by + obtain ⟨E,hE,hbound⟩ := B.primitive_term_background_C1_bound A hD + exact ⟨E,hE,fun d ha hp a => hbound (d.amplitude a) (d.phase a) + (d.smoothAmplitude a) (d.smoothPhase a) (ha a) (hp a)⟩ + +end SmoothPrimitiveFamily +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveWeightedBudget.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveWeightedBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..3612f22284f8f5c3c2da716c938403f609bbdbcf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PrimitiveWeightedBudget.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalInputRecurrence + +namespace OAI + +/-! A slow two-jet profile gives a uniform fast weighted budget, including +the low derivatives that are obscured by the shifted budget alone. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma weighted_of_shifted_two {F : M → V} {z s C : ℝ} {m : ℕ} + (hz : 0 ≤ z) (hzs : z ≤ s) (hs1 : s ≤ 1) + (hb : A.ShiftedBound 2 m s C F) : A.WeightedBound z m C F := by + intro i j hj x _ + rw [iteratedFDerivWithin_univ] + have hp : z^j ≤ s^(j-2) := + (pow_le_pow_left₀ hz hzs j).trans + (pow_le_pow_of_le_one (hz.trans hzs) hs1 (Nat.sub_le j 2)) + exact (mul_le_mul_of_nonneg_right hp (norm_nonneg _)).trans + (hb i j (by omega) x) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingChoice.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..af5983082496442dcf1e18c631e4d2a89696882c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingChoice.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCrossing +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCrossingPath + +namespace OAI + +/-! Transfer the compact turn/nonturn alternative to a unit normal path in +the actual normal plane, with both required endpoint inequalities. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +variable {X : Type*} [TopologicalSpace X] [CompactSpace X] + +/-- The turn threshold is chosen from the fixed metric and slope bounds, +before the loop and its mixed/longitudinal derivatives are supplied. -/ +theorem compact_actual_profile_crossing_choice (sLo sHi K d T : ℝ) + (hsLo : 0 < sLo) (hsHi : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ J : X → BoundaryProfile, Continuous J → + (∀ x, J x ∈ regularBoundaryProfiles) → + (∀ x, sLo ≤ profileCoefficients (J x) 0) → + (∀ x, profileCoefficients (J x) 0 ≤ sHi) → + (∀ x, |profileCoefficients (J x) 1| ≤ d) → + (∀ x, profileCoefficients (J x) 3 = 0 → H+2 < |profileCoefficients (J x) 2|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x : X, + ∀ F : RField 4, ContDiff ℝ ∞ F → ∀ p : Base, + ‖realBoundaryProfile F z p-J x‖ < η → + -K ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ t u : ℝ, |t| ≤ T → |u| ≤ T → + (0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ profilePreferred (realBoundaryProfile F z p) ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ profilePreferred (realBoundaryProfile F z p)) ∨ + (0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ realSecondForm F (1,u) (1,u) p ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile F z p) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ w ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ w) := by + obtain ⟨H,hH,hcross⟩ := compact_crossing_normal_choice (E := Space) (X := X) + (sLo/2) (sHi+1) K (d+1) T (half_pos hsLo) (by linarith) hK (by linarith) hT + refine ⟨H,hH,?_⟩ + intro J hJ hreg hlo hhi hD hturn + have hc : Continuous (fun x => profileCoefficients (J x)) := by + apply continuous_iff_continuousAt.mpr + intro x + exact (contDiffAt_profileCoefficients (hreg x)).continuousAt.comp hJ.continuousAt + let A : X → ℝ := fun x => profileCoefficients (J x) 3 + let N₀ : X → ℝ := fun x => profileCoefficients (J x) 2 + have hA : Continuous A := (continuous_apply 3).comp hc + have hN₀ : Continuous N₀ := (continuous_apply 2).comp hc + obtain ⟨η₀,hη₀,hpreserve⟩ := hcross univ isCompact_univ A N₀ hA hN₀ + (fun x _ hx => hturn x hx) + let ε := min 1 (min (sLo/2) η₀) + have hε : 0 < ε := lt_min zero_lt_one (lt_min (half_pos hsLo) hη₀) + obtain ⟨δ,hδ,hprofile⟩ := compact_boundary_profile_stability + (isCompact_univ.image hJ) (by rintro _ ⟨x,_,rfl⟩; exact hreg x) ε hε + refine ⟨min δ η₀,lt_min hδ hη₀,?_⟩ + intro z hz hzη x F hF p herror hcurv t u ht hu + obtain ⟨hactual,hnear⟩ := hprofile (J x) (mem_image_of_mem J (mem_univ x)) + (realBoundaryProfile F z p) (herror.trans_le (min_le_left _ _)) + obtain ⟨f,hn,hm,hcoef⟩ := exists_profile_secondFormFrame hF z p hactual + have hdiff (j : Fin 4) : + |(![f.S,f.D,f.N,z*f.L] j)-profileCoefficients (J x) j| < ε := by + rw [← hcoef] + exact (profileCoefficient_sub_le _ _ j).trans_lt hnear + have hS : |f.S-profileCoefficients (J x) 0| < ε := by simpa using hdiff 0 + have hD' : |f.D-profileCoefficients (J x) 1| < ε := by simpa using hdiff 1 + have hN : |f.N-N₀ x| < η₀ := by + exact (show |f.N-N₀ x| < ε by simpa [N₀] using hdiff 2).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hL : |z*f.L-A x| < η₀ := by + exact (show |z*f.L-A x| < ε by simpa [A] using hdiff 3).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hεone : ε ≤ 1 := min_le_left _ _ + have hεS : ε ≤ sLo/2 := (min_le_right 1 _).trans (min_le_left _ _) + have hsmin : sLo/2 ≤ f.S := by + have hh := (abs_lt.mp hS).1 + linarith [hlo x] + have hsmax : f.S ≤ sHi+1 := by + have hh := (abs_lt.mp hS).2 + linarith [hhi x] + have hdbound : |f.D| ≤ d+1 := by + have hh := abs_sub_le f.D (profileCoefficients (J x) 1) 0 + simp only [sub_zero] at hh + linarith [hD x] + have hmn : inner ℝ (spaceCoordinates.symm f.m) (spaceCoordinates.symm f.n) = 0 := by + rw [spaceCoordinates_symm_inner,dotProduct_comm] + exact f.orthogonal + have hh := hpreserve z hz (hzη.trans_le (min_le_right _ _)) x (mem_univ x) + (spaceCoordinates.symm f.n) (spaceCoordinates.symm f.m) + (spaceCoordinates_norm_unit f.unit_n) (spaceCoordinates_norm_unit f.unit_m) hmn + f.S f.D f.N f.L _ t u hsmin hsmax hcurv hdbound ht hu hN hL + rw [← f.slope_space_components hF t,← f.slope_space_components hF u] at hh + rcases hh with hpos | ⟨hpq,w,hnw,hpw,hqw⟩ + · left + simpa only [spaceCoordinates_symm_inner,hn] using hpos + · right + refine ⟨by simpa only [spaceCoordinates_symm_inner] using hpq,spaceCoordinates w,?_,?_,?_⟩ + · rw [← hn] + simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hnw + · simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hpw + · simpa only [← spaceCoordinates_symm_inner,ContinuousLinearEquiv.symm_apply_apply] using hqw + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..450e7d0a7e6a37a86778c329afd7f50efe202441 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfileCrossingPath.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCrossing +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCrossingPath + +namespace OAI + +/-! Transfer the compact turn/nonturn alternative to a unit normal path in +the actual normal plane, with both required endpoint inequalities. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +variable {X : Type*} [TopologicalSpace X] [CompactSpace X] + +/-- The turn threshold is chosen from the fixed metric and slope bounds, +before the loop and its mixed/longitudinal derivatives are supplied. -/ +theorem compact_actual_profile_normal_paths (sLo sHi K d T : ℝ) + (hsLo : 0 < sLo) (hsHi : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ J : X → BoundaryProfile, Continuous J → + (∀ x, J x ∈ regularBoundaryProfiles) → + (∀ x, sLo ≤ profileCoefficients (J x) 0) → + (∀ x, profileCoefficients (J x) 0 ≤ sHi) → + (∀ x, |profileCoefficients (J x) 1| ≤ d) → + (∀ x, profileCoefficients (J x) 3 = 0 → H+2 < |profileCoefficients (J x) 2|) → + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → ∀ x : X, + ∀ F : RField 4, ContDiff ℝ ∞ F → ∀ p : Base, + ‖realBoundaryProfile F z p-J x‖ < η → + -K ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + ∀ t u : ℝ, |t| ≤ T → |u| ≤ T → + ∃ γ : ℝ → Vec, ContDiffOn ℝ ∞ γ (Icc (0 : ℝ) 1) ∧ + γ 0 = profilePreferred (realBoundaryProfile F z p) ∧ + (∀ s ∈ Icc (0 : ℝ) 1, + γ s ⬝ᵥ γ s = 1 ∧ + γ s ≠ -normalize (realSecondForm F (1,t) (1,t) p) ∧ + γ s ≠ -normalize (realSecondForm F (1,u) (1,u) p) ∧ + coordDeriv dx F p ⬝ᵥ γ s = 0 ∧ coordDeriv dy F p ⬝ᵥ γ s = 0) ∧ + 0 < realSecondForm F (1,t) (1,t) p ⬝ᵥ γ 1 ∧ + 0 < realSecondForm F (1,u) (1,u) p ⬝ᵥ γ 1 := by + obtain ⟨H,hH,hcross⟩ := compact_crossing_normal_choice (E := Space) (X := X) + (sLo/2) (sHi+1) K (d+1) T (half_pos hsLo) (by linarith) hK (by linarith) hT + refine ⟨H,hH,?_⟩ + intro J hJ hreg hlo hhi hD hturn + have hc : Continuous (fun x => profileCoefficients (J x)) := by + apply continuous_iff_continuousAt.mpr + intro x + exact (contDiffAt_profileCoefficients (hreg x)).continuousAt.comp hJ.continuousAt + let A : X → ℝ := fun x => profileCoefficients (J x) 3 + let N₀ : X → ℝ := fun x => profileCoefficients (J x) 2 + have hA : Continuous A := (continuous_apply 3).comp hc + have hN₀ : Continuous N₀ := (continuous_apply 2).comp hc + obtain ⟨η₀,hη₀,hpreserve⟩ := hcross univ isCompact_univ A N₀ hA hN₀ + (fun x _ hx => hturn x hx) + let ε := min 1 (min (sLo/2) η₀) + have hε : 0 < ε := lt_min zero_lt_one (lt_min (half_pos hsLo) hη₀) + obtain ⟨δ,hδ,hprofile⟩ := compact_boundary_profile_stability + (isCompact_univ.image hJ) (by rintro _ ⟨x,_,rfl⟩; exact hreg x) ε hε + refine ⟨min δ η₀,lt_min hδ hη₀,?_⟩ + intro z hz hzη x F hF p herror hcurv t u ht hu + obtain ⟨hactual,hnear⟩ := hprofile (J x) (mem_image_of_mem J (mem_univ x)) + (realBoundaryProfile F z p) (herror.trans_le (min_le_left _ _)) + obtain ⟨f,hn,hm,hcoef⟩ := exists_profile_secondFormFrame hF z p hactual + have hdiff (j : Fin 4) : + |(![f.S,f.D,f.N,z*f.L] j)-profileCoefficients (J x) j| < ε := by + rw [← hcoef] + exact (profileCoefficient_sub_le _ _ j).trans_lt hnear + have hS : |f.S-profileCoefficients (J x) 0| < ε := by simpa using hdiff 0 + have hD' : |f.D-profileCoefficients (J x) 1| < ε := by simpa using hdiff 1 + have hN : |f.N-N₀ x| < η₀ := by + exact (show |f.N-N₀ x| < ε by simpa [N₀] using hdiff 2).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hL : |z*f.L-A x| < η₀ := by + exact (show |z*f.L-A x| < ε by simpa [A] using hdiff 3).trans_le + ((min_le_right 1 _).trans (min_le_right _ _)) + have hεone : ε ≤ 1 := min_le_left _ _ + have hεS : ε ≤ sLo/2 := (min_le_right 1 _).trans (min_le_left _ _) + have hsmin : sLo/2 ≤ f.S := by + have hh := (abs_lt.mp hS).1 + linarith [hlo x] + have hsmax : f.S ≤ sHi+1 := by + have hh := (abs_lt.mp hS).2 + linarith [hhi x] + have hdbound : |f.D| ≤ d+1 := by + have hh := abs_sub_le f.D (profileCoefficients (J x) 1) 0 + simp only [sub_zero] at hh + linarith [hD x] + have hmn : inner ℝ (spaceCoordinates.symm f.m) (spaceCoordinates.symm f.n) = 0 := by + rw [spaceCoordinates_symm_inner,dotProduct_comm] + exact f.orthogonal + have hh := hpreserve z hz (hzη.trans_le (min_le_right _ _)) x (mem_univ x) + (spaceCoordinates.symm f.n) (spaceCoordinates.symm f.m) + (spaceCoordinates_norm_unit f.unit_n) (spaceCoordinates_norm_unit f.unit_m) hmn + f.S f.D f.N f.L _ t u hsmin hsmax hcurv hdbound ht hu hN hL + obtain ⟨γ,hγ,hzero,hunit,hpos⟩ := f.actual_crossing_path hF t u hh + exact ⟨γ,hγ,hzero.trans hn,hunit,hpos⟩ + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledNearbyAtlasSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledNearbyAtlasSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ebc0db2af90de4e057ccd18d07b5a4b48a3376b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledNearbyAtlasSmallIncrement.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.InputAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.ProfiledAtlasAdjustedMean + +namespace OAI + +/-! Finite mean adjustment gives a small increment uniformly over nearby input maps. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates FiniteMean +local instance profiledSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem profiled_nearby_atlas_small_increment + {n : A.centers → ℕ} {P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression} + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {r₁ ρ R : ℝ} (hr₁ : 0 < r₁) (hρ : 0 < ρ) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 r₁ ρ R (A.tensorPlaneRead i reference)) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (hphase₀ : ∀ i j, coordinatePhase ((d₀ i).phase j) = phaseLinear (w i j • (Q i).ξ j)) + (hImm : ∀ k l x, x ∈ (modeSupport + (A.quadraticOverlapCompact (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) x)) + (hgood : ∀ k l x, x ∈ (modeSupport + (A.quadraticOverlapCompact (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) k l)) x)) + (D : ℕ → ℝ) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) : + ∃ r D₀ : ℝ, 0 < r ∧ 1 ≤ D₀ ∧ D₀*r ≤ r₁ ∧ + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → + ∃ (ρ₀ η₀ : ℝ) (B T : ℕ → ℝ), 0 < ρ₀ ∧ 0 < η₀ ∧ η₀ ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → ∀ b : ℝ, + 0 ≤ b → b < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + ∀ (H : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ x v v', H x v v' = H x v' v) → + (∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∀ d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (D₀*r) ρ R (A.tensorPlaneRead i reference), + (∀ i, (d i).Fits (p i)) → + (∀ i, (d i).phase = (d₀ i).phase) → + (∀ i, (d i).G = A.jetChartMap i G) → + (∀ i j x, x ∈ ((d i).solver j).e.source → + ((d i).data j).cutoff (((d i).solver j).e x) = A.planeWeight i x / w i j) → + (∀ i j x, x ∈ ((d i).solver j).e.source → + ((d i).data j).form (((d i).solver j).e x) = (Q i).Q j) → + (∀ i j, tsupport (A.planeWeight i) ⊆ ((d i).solver j).e.source) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (G+X) - inducedTensor G - δ^2 • H)) := by + obtain ⟨r,D₀,hr,hD₀,hDr,β,κ,hmean⟩ := A.profiled_atlas_adjusted_mean + p hr₁ hρ reference href Q w hw q + refine ⟨r,D₀,hr,hD₀,hDr,?_⟩ + intro C hC + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let Cu := fun m => max 1 (sizeBound L C β q m) + let E := fun m => max 1 (differenceBound L C β κ q m) + have hCu (m) : 0 ≤ Cu m := zero_le_one.trans (le_max_left _ _) + have hE (m) : 0 ≤ E m := zero_le_one.trans (le_max_left _ _) + obtain ⟨ρ₀,B,T,hρ₀,hB,hT,hsmall⟩ := A.input_atlas_small_increment F hF p hρ + (fun _ => D₀*r) (fun _ => r₁) (fun i => A.tensorPlaneRead i reference) + d₀ hImm hgood D hD Cu E hCu hE q + obtain ⟨η₀,hη₀,hη₁,hmeanUniform⟩ := hmean C hC q + refine ⟨ρ₀,η₀,B,T,hρ₀,hη₀,hη₁,hB,hT,?_⟩ + intro G hG b hb hbρ hclose s hs hs1 hd H hH hsym hnear hbC τ δ hτ hτs hη hδ hδτ d hfit hphase hmap hcut hform hsup hK + have hbuild := hmeanUniform s hs hs1 H hH hsym hnear hbC + have hphase' (i j) : coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j) := by + rw [hphase i] + exact hphase₀ i j + obtain ⟨u,hu,_,_,hball,hsize,herror⟩ := hbuild 0 τ hτ hτs (le_refl 0) (by norm_num) + (by simpa only [zero_div,add_zero] using hη) d hfit hphase' hcut hform hsup δ hδ q le_rfl + have hbu (m) : A.TensorWeightedBound s m (Cu m) u := + fun k => (hsize m k).mono_const (le_max_right _ _) + have hmu (m) : A.TensorWeightedBound τ m (E m*δ^2*(τ/s)^(q+1)) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H) := by + intro k + have hh := (herror m k).shrink_scale hτ.le hτs + simp only [zero_div,add_zero] at hh + apply hh.mono_const + calc + δ^2*(differenceBound L C β κ q m*(τ/s)^(q+1)) ≤ + δ^2*(E m*(τ/s)^(q+1)) := mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right (le_max_right _ _) (pow_nonneg (div_nonneg hτ.le hs.le) _)) (sq_nonneg δ) + _ = _ := by ring + exact hsmall G hG b hb hbρ hclose d hfit hphase hmap hτ hs hτs hs1 hd hK + δ hδ.le hδτ u H hu hH hball hbu hmu + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhaseFastFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhaseFastFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..b86ecf9ea1a84fe56fdc3c21c148b6dfbc1eca12 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhaseFastFamily.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins +import OAI.Geometry.SurfaceImmersion.Geometry.ExactFastFamily + +namespace OAI + +/-! Actual fast approximants with prescribed accuracy in the leading five +primitive derivatives and the slow baseline, retained for the exact step. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PrimitiveRealization CovarianceCorrector +local instance profiledPhasePrimitiveFamilyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledPhasePrimitiveFamilyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledPhasePrimitiveFamilyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledPhasePrimitiveFamilyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledPhasePrimitiveFamilySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledPhasePrimitiveFamilySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas + +def PhasePrimitiveProfileNear (A : SmoothingAtlas M) (F : M → Space) (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + (S : TopologicalSpace.Opens JetPolynomial.Base) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (K : Set JetPolynomial.Base) (ε z : ℝ) (V : M → Space) : Prop := + ∃ G : M → Space, ∃ hG : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (A.jetChartMap i G ∘ e.symm)) S O, + A.WeightedBound 1 3 ε (G-F) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let geom := l.geometry (A.jetChartMap i G ∘ e.symm) ((A.jetChartMap_smooth i hG).comp hi) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i V ∘ e.symm) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ ε) ∧ + (∀ p ∉ tsupport (A.weight i), V =ᶠ[𝓝 p] G) ∧ + ∀ p ∉ A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G + +end SmoothingAtlas +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem profiled_phase_primitive_fast_family (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + + (h : SmoothMetric M) + (htarget : h.inner = g.inner + data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y))) : + ∃ V₀ R₁ c₁ c₂ : ℝ, 0 ≤ V₀ ∧ 0 < R₁ ∧ 0 < c₁ ∧ 0 < c₂ ∧ ∀ ε : ℝ, 0 < ε → + data.A.GeometricFastFamilyWithProperty h R₁ c₁ c₂ V₀ + (data.A.PhasePrimitiveProfileNear F i e hi l S ℓ K ε) := by + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨c,c₂,V₀,hc,hc₂,hV₀,hfamilies⟩ := data.profiled_phase_primitive_realization + hF hmetric i e he hi hχ hχc hχs hcover l ha hamp S hSc hTS + hQ hQO hFQ K hK hKS hKA hone hv ℓ hℓx hℓy + refine ⟨V₀,R₁,c₁,c₂,hV₀,hR₁,hc₁,hc₂,?_⟩ + intro ε hε N + obtain ⟨lp,b,u,η,L,C,Cv,Dp,P,hb,_,hu,hη,hη1,hL,hC,hCv,_,hblp,hP,hfamily⟩ := + hfamilies 442 (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold C (N+1) ρ + (by positivity) hρ + obtain ⟨ηs,hηs,_,hslow⟩ := ExactCorrection.positive_power_threshold L u ε hu hε + obtain ⟨ηp,hηp,_,hprofile⟩ := primitive_normal_threshold hb hblp hε Dp + refine ⟨min η (min η₀ (min ηs ηp)),C,Cv, + lt_min hη (lt_min hη₀ (lt_min hηs hηp)),hC,hCv,?_⟩ + intro z hz hzη + have hzbase := hzη.trans_le (min_le_left _ _) + have hzother := hzη.trans_le (min_le_right _ _) + have hzmetric := hzother.trans_le (min_le_left _ _) + have hzprofiles := hzother.trans_le (min_le_right _ _) + have hzslow := hzprofiles.trans_le (min_le_left _ _) + have hzprofile := hzprofiles.trans_le (min_le_right _ _) + obtain ⟨G,V,hG,hV,hclose,hmap,hweighted,hzeroV,hshift,herror,hI,hB,hBmargin,hN,hext,hextK,hGs,hGO,hprof⟩ := + hfamily z hz hzbase + have herr : data.A.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor V-h.inner) := by + rw [htarget] + exact fun j => (herror j).mono_order (by omega) + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV (C*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using hsmall z hz hzmetric) + (fun j => (herr j).mono_order (by omega)) + refine ⟨V,hV,?_,hzeroV,hweighted,(fun j k hk x => hshift j k (by omega) x),herr,?_⟩ + · refine ⟨G,hGs,hGO,?_,?_,hext,hextK⟩ + · exact fun j => (hclose j).mono_const (hslow z hz hzslow).le + · intro p hp + exact (hprof p hp).trans (hprofile z hz hzprofile).le + · intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,(hBmargin j x hx).le⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhasePrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhasePrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6fdb63a9fec84b7c6d5f301009574c2bef81de6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPhasePrimitive.lean @@ -0,0 +1,318 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveSupport +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseAnsatzProfiles +import OAI.Geometry.SurfaceImmersion.Correction.UniformPrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedPatchGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseNormalMargin +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.NonlinearLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveShiftedPowers +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveWeightedBudget +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAtlasNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance profiledPhasePrimitiveRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledPhasePrimitiveRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledPhasePrimitiveRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledPhasePrimitiveRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledPhasePrimitiveRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledPhasePrimitiveRealizationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for the actual supported primitive +in a fixed nonlinear phase chart, using only the proved polynomial mean iteration. -/ +theorem profiled_phase_primitive_realization (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ c cB V₀ : ℝ, 0 < c ∧ 0 < cB ∧ 0 ≤ V₀ ∧ ∀ R N : ℕ, + ∃ lp : ℕ, ∃ (b u η L C Cv Dp : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ 0 ≤ Dp ∧ + b < 1/(1+(lp : ℝ)) ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G V : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, data.A.ShiftedBound 2 m (z^b) (P m) G) ∧ + data.A.WeightedBound z R Cv V ∧ + data.A.WeightedBound 1 0 V₀ V ∧ + data.A.ShiftedBound 2 R z (Cv/z^2) V ∧ + data.A.TensorWeightedBound 1 R (C*z^N) + (inducedTensor V-(g.inner+data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y)))) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + RealModes.realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) ∧ + (∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + cB < ‖RealModes.realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖) ∧ + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) ∧ + (∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G) ∧ + ∃ hGs : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (data.A.jetChartMap i G ∘ e.symm)) S O, + ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let geom := l.geometry (data.A.jetChartMap i G ∘ e.symm) + ((data.A.jetChartMap_smooth i hGs).comp hi) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile + (data.A.vectorChartRead i V ∘ e.symm) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ + Dp*z/(z^b)^lp := by + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := data.A.nonlinear_lowJet_neighborhood_of_C2 i hF hi + S.isOpen hSc hQ O.isOpen hQO hFQ + obtain ⟨ε,c,hε,hc,hnallOrders⟩ := l.all_orders_primitive_normal_geometry (S := S) + hQ' hQ'O ℓ hℓx hℓy + obtain ⟨Dt,hDt,htransport⟩ := data.A.phase_normal_margin i e he hi hcover + have hcLocal : 0 < c/Dt := div_pos hc hDt + obtain ⟨ρg,hρg,hgeometry⟩ := data.supported_patch_geometry hF i + obtain ⟨ρB,cB,hρB,hcB,hmargin⟩ := data.primitive_atlas_normal_margin hF i hcLocal + obtain ⟨V₀,hV₀,hF₀⟩ := data.A.exists_shifted_bound 2 0 hF + refine ⟨c,cB,V₀+1,hc,hcB,by positivity,?_⟩ + intro R N + obtain ⟨Pol,hPol,lm,hconstruct⟩ := data.A.supported_phase_primitive_metric i e he hi hχ hχc hχs + l ha hamp S hTS hQ' hQ'O (N+(R+2)) ℓ hℓx hℓy + obtain ⟨ln,hnb⟩ := hnallOrders (N+(R+2)) + obtain ⟨lp,hpb⟩ := l.uniform_primitive_five_profiles (S := S) hQ' hQ'O + (N+(R+2)) ℓ hℓx hℓy + let loss := max (max lm ln) lp + have hcap : 0 < 1/(1+(loss : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hbl,hu,hη,hη1,hL,hC,hP,hmean⟩ := + data.polynomial_mean_approximation (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) + (data.A.primitiveAtlasPolynomial_smooth i hPol') hF hmetric (R+2) (N+(R+2)) + (1/(1+(loss : ℝ))) hcap + have hblm : b < 1/(1+(lm : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left ((Nat.le_max_left lm ln).trans (Nat.le_max_left _ _)) 1)) + have hbln : b < 1/(1+(ln : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left ((Nat.le_max_right lm ln).trans (Nat.le_max_left _ _)) 1)) + have hblp : b < 1/(1+(lp : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_right (max lm ln) lp) 1)) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + obtain ⟨ηg,hηg,_,hgsmall⟩ := ExactCorrection.positive_power_threshold L u ρg hu hρg + obtain ⟨ηB,hηB,_,hBsmall⟩ := ExactCorrection.positive_power_threshold L u ρB hu hρB + obtain ⟨_,B,_,hB,hprofiles⟩ := data.A.nonlinear_jet_profiles i hi S.isOpen hSc P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B ((R+2)+(2*(N+(R+2)+1)+1))) (hB _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨Dp,hDp,hprofile⟩ := hpb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨ηn,hηn,_,hnsmall⟩ := primitive_normal_threshold hb hbln hε Dn + obtain ⟨ηs,hηs,_,hslowzero⟩ := ExactCorrection.positive_power_threshold L u (1/2) hu (by norm_num) + obtain ⟨ηv,hηv,_,hinczero⟩ := primitive_normal_threshold hb hblm (by norm_num : (0:ℝ) < 1/2) Dmap + let ηold := min η (min η₀ (min ηn (min ηg ηB))) + have hηold : 0 < ηold := lt_min hη (lt_min hη₀ (lt_min hηn (lt_min hηg hηB))) + refine ⟨lp,b,u,min ηold (min ηs ηv),L,C+D,P 0+P R+Dmap,Dp,P,hb,hb16,hu, + lt_min hηold (lt_min hηs hηv), + (min_le_left _ _).trans ((min_le_left _ _).trans hη1),hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,hDp,hblp,hP,?_⟩ + intro z hz hznew + have hzη : z < ηold := hznew.trans_le (min_le_left _ _) + have hzs0 : z < ηs := hznew.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzv0 : z < ηv := hznew.trans_le ((min_le_right _ _).trans (min_le_right _ _)) + have hzη' : z < η := hzη.trans_le (min_le_left _ _) + have hz1 : z ≤ 1 := hzη'.le.trans hη1 + have hs : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hs1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hzs : z ≤ z^b := by + have hb1 : b ≤ 1 := by linarith + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hb1 + obtain ⟨G,hG,hclose,hmap,hmean⟩ := hmean z hz hzη' + have hGQ : MapsTo (lowJet (data.A.jetChartMap i G ∘ e.symm)) S Q' := + hnear G hG (fun j => ((hclose j).mono_order (by omega)).mono_const + (hsmall z hz (hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)))).le) + have hGv : ∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (data.A.jetChartMap i G ∘ e.symm) p,t) = + SurfaceVelocityFamily.normal (lowJet (data.A.jetChartMap i G ∘ e.symm) p) := by + intro p hp hpK t + exact hv _ (hQ'O (hGQ hp)) (by simpa only [lowJetPosition_lowJet] using hpK) t + obtain ⟨U,hzero,hUs,hrep,hinit,hVs,herror⟩ := hprimitive G hG hGQ K hK hKS hKA hone hGv + let V := data.A.phaseAtlasAnsatz i G e χ U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((R+2)+(2*(N+(R+2)+1)+1)) + have hsolved : data.A.TensorWeightedBound z (R+2) (C*z^(N+(R+2))) + (data.A.atlasPolynomialMetric (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) z G-g.inner) := + fun j => (hmean j).shrink_scale hz.le hz1 + have herr := (herror (z^b) z hz hzs hs1 hjet).2 g.inner g.contMDiff (C*z^(N+(R+2))) hsolved + have htot : 0 ≤ C*z^(N+(R+2))+D*z^(N+(R+2)+1)/(z^b)^lm := by positivity + have hfinal := data.A.tensorWeightedBound_unscaled hz hz1 htot herr + have hincrement := (herror (z^b) z hz hzs hs1 hjet).1 + have hsmallinc : Dmap*z/(z^b)^lm ≤ Dmap := by + apply (div_le_iff₀ (pow_pos hs _)).mpr + exact mul_le_mul_of_nonneg_left (slow_power_dominates_fast hz hz1 hb hblm) hDmap + have hGweighted := data.A.weighted_of_shifted_two hz.le hzs hs1 (hmap R) + have hincweighted : data.A.WeightedBound z R Dmap (V-G) := + fun j => ((hincrement j).mono_order (by omega)).mono_const hsmallinc + have hVweighted := data.A.weightedBound_add hG ((hVs z).sub hG) hz.le hGweighted hincweighted + have hvadd : G+(V-G) = V := by abel + change data.A.WeightedBound z R (P R+Dmap) (G+(V-G)) at hVweighted + rw [hvadd] at hVweighted + have hVweighted' : data.A.WeightedBound z R (P 0+P R+Dmap) V := + fun j => (hVweighted j).mono_const (by linarith [hP 0]) + have hshift := data.A.weighted_to_shifted (q := 2) (m := R) hz hz1 + (show 0 ≤ Dmap*z/(z^b)^lm by positivity) + (show data.A.WeightedBound z (2+R) (Dmap*z/(z^b)^lm) (V-G) from by + simpa only [V,Nat.add_comm R 2] using hincrement) + have hshift' : data.A.ShiftedBound 2 R z (Dmap/z^2) (V-G) := by + intro j k hk x + exact (hshift j k hk x).trans (div_le_div_of_nonneg_right hsmallinc (sq_nonneg z)) + have hvmap := data.A.shifted_map_recurrence hG ((hVs z).sub hG) + (hmap 0) (hmap R) hshift' hs hz.le hzs (hP 0) (hP R) + change data.A.ShiftedBound 2 R z (P 0+(z/(z^b))*P R+Dmap/z^2) (G+(V-G)) at hvmap + rw [hvadd] at hvmap + have hvmap' : data.A.ShiftedBound 2 R z ((P 0+P R+Dmap)/z^2) V := by + intro j k hk x + exact (hvmap j k hk x).trans (primitive_shifted_budget hz hz1 hzs (hP 0) (hP R) hDmap) + have hnall : ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + intro p hp + have heq := data.A.phaseAtlasAnsatz_normalTriple i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2 + change NormalFrame.gramDet _ _ ≠ 0 ∧ c < ‖_‖ + rw [show SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p = + SurfaceVelocityFamily.Loop.primitiveNormalTriple + (finiteAnsatz (data.A.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) p from heq] + have hh := hnormal (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) + hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + (hnsmall z hz (hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))))) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((data.A.jetChartMap i G ∘ e.symm) q)) = + data.A.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + have hext : ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + intro p hp + exact data.A.phaseAtlasAnsatz_eventuallyEq i G e hi hχs U hK hKA hzero ℓ (N+(R+2)+1) z hp + have hextK : ∀ p ∉ data.A.phaseSurfaceSupport i e K, V =ᶠ[𝓝 p] G := by + intro p hp + exact data.A.phaseAtlasAnsatz_eventuallyEq_precise i G e hi hχs U hK hzero ℓ + (N+(R+2)+1) z hp + have hlocal : ∀ p ∈ tsupport (data.A.weight i), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + c/Dt < ‖RealModes.realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))‖ := by + intro p hp + have hx : chart (i : M) p ∈ (data.A.chartWeightCompact i : Set JetPolynomial.Base) := ⟨p,hp,rfl⟩ + exact htransport V (hVs z) _ hx c hc + (hnall _ ⟨hTS (hcover hx),e.map_source (hcover hx)⟩) + have hglobal := hgeometry G V hG (hVs z) (L*z^u) (by positivity) + (hgsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))))) + (fun j => (hclose j).mono_order (by omega)) + (fun p hp => ⟨(hlocal p hp).1,norm_pos_iff.mp (hcLocal.trans (hlocal p hp).2)⟩) hext + have hBglobal := hmargin G V hG (hVs z) hglobal.1 (L*z^u) (by positivity) + (hBsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)))))) + (fun j => (hclose j).mono_order (by omega)) (fun p hp => (hlocal p hp).2) hext + have hFzero : data.A.WeightedBound 1 0 V₀ F := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hF₀ j 0 (by omega) x + have hslow0 : data.A.WeightedBound 1 0 (1/2) (G-F) := fun j => + ((hclose j).mono_order (Nat.zero_le _)).mono_const (hslowzero z hz hzs0).le + have hinc0 : data.A.WeightedBound 1 0 (1/2) (V-G) := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + have hh := hincrement j 0 (by omega) x hx + simp only [pow_zero,one_mul] at hh ⊢ + exact hh.trans (hinczero z hz hzv0).le + have hsum0 := data.A.weightedBound_add hF (hG.sub hF) zero_le_one hFzero hslow0 + have hsum1 := data.A.weightedBound_add (hF.add (hG.sub hF)) ((hVs z).sub hG) + zero_le_one hsum0 hinc0 + have hVzero : data.A.WeightedBound 1 0 (V₀+1) V := by + change data.A.WeightedBound 1 0 (V₀+1/2+1/2) (F+(G-F)+(V-G)) at hsum1 + have hsumid : F+(G-F)+(V-G) = V := by abel + rw [hsumid] at hsum1 + convert hsum1 using 1; ring + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hVzero,hvmap',?_,hglobal.1,hglobal.2,hBglobal,hnall,hext,hextK,?_⟩ + · intro j + apply ((hfinal j).mono_order (by omega)).mono_const + have hlead : C*z^(N+(R+2))/z^(R+2) = C*z^N := by + rw [pow_add,← mul_assoc,mul_div_cancel_right₀ _ (pow_ne_zero _ hz.ne')] + rw [add_div,hlead] + have htail := mul_le_mul_of_nonneg_left + (primitive_tail_power_bound (N := N) (R := R+2) hz hz1 hb hblm) hD + have heq : D*z^(N+(R+2)+1)/(z^b)^lm/z^(R+2) = D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) := by ring + rw [heq] + calc + C*z^N+D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) ≤ C*z^N+D*z^N := add_le_add le_rfl htail + _ = (C+D)*z^N := by ring + + · refine ⟨hG,fun p hp => hQ'O (hGQ hp),?_⟩ + intro p hp + change ‖SurfaceVelocityFamily.Loop.primitiveJetProfile + (data.A.vectorChartRead i V ∘ e.symm) z p - _‖ ≤ _ + rw [show SurfaceVelocityFamily.Loop.primitiveJetProfile + (data.A.vectorChartRead i V ∘ e.symm) z p = + SurfaceVelocityFamily.Loop.primitiveJetProfile + (finiteAnsatz (data.A.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) z p from + data.A.phaseAtlasAnsatz_jetProfile i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2] + have hh := hprofile (data.A.jetChartMap i G ∘ e.symm) + ((data.A.jetChartMap_smooth i hG).comp hi) hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((data.A.jetChartMap i G ∘ e.symm) q)) = + data.A.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPrimitiveFastFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPrimitiveFastFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..17493f6ab80f27bd80ac98e657a583d758afa313 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledPrimitiveFastFamily.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveGeometricApproximation +import OAI.Geometry.SurfaceImmersion.Geometry.ExactFastFamily + +namespace OAI + +/-! Actual fast approximants with prescribed accuracy in the leading five +primitive derivatives and the slow baseline, retained for the exact step. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PrimitiveRealization CovarianceCorrector +local instance profiledPrimitiveFamilyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledPrimitiveFamilyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledPrimitiveFamilyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledPrimitiveFamilyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledPrimitiveFamilySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledPrimitiveFamilySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas + +def PrimitiveProfileNear (A : SmoothingAtlas M) (F : M → Space) (i : A.centers) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + (S : TopologicalSpace.Opens JetPolynomial.Base) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (ε z : ℝ) (V : M → Space) : Prop := + ∃ G : M → Space, ∃ hG : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (A.jetChartMap i G)) S O, + A.WeightedBound 1 3 ε (G-F) ∧ + (∀ p ∈ S, + let geom := l.geometry (A.jetChartMap i G) (A.jetChartMap_smooth i hG) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (A.vectorChartRead i V) z p- + ![geom.longitudinal.val p t,geom.Y p,geom.C p, + (geom.longitudinal.slow (coordinateVector 1)).val p t,geom.V.angle.val p t]‖ ≤ ε) ∧ + ∀ p ∉ tsupport (A.weight i), V =ᶠ[𝓝 p] G + +end SmoothingAtlas +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem profiled_primitive_fast_family (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∃ V₀ R₁ c₁ c₂ : ℝ, 0 ≤ V₀ ∧ 0 < R₁ ∧ 0 < c₁ ∧ 0 < c₂ ∧ ∀ ε : ℝ, 0 < ε → + data.A.GeometricFastFamilyWithProperty h R₁ c₁ c₂ V₀ + (data.A.PrimitiveProfileNear F i l S ℓ ε) := by + have hFO : MapsTo (lowJet (data.A.jetChartMap i F)) S O := fun x hx => hQO (hFQ hx) + have hzero := data.A.primitive_amplitude_zero_off_weight i l hamp S houter + (data.A.jetChartMap i F) hFO K hKA hv + let h := data.A.primitiveMetric g i a ha hzero + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨c,c₂,V₀,hc,hc₂,hV₀,hfamilies⟩ := data.profiled_primitive_mean_realization + hF hmetric i l ha hamp S T hST houter hQ hQO hFQ K hK hKS hKA hv ℓ hℓx hℓy + refine ⟨h,rfl,V₀,R₁,c₁,c₂,hV₀,hR₁,hc₁,hc₂,?_⟩ + intro ε hε N + obtain ⟨lp,b,u,η,L,C,Cv,Dp,P,hb,_,hu,hη,hη1,hL,hC,hCv,_,hblp,hP,hfamily⟩ := + hfamilies 442 (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold C (N+1) ρ + (by positivity) hρ + obtain ⟨ηs,hηs,_,hslow⟩ := ExactCorrection.positive_power_threshold L u ε hu hε + obtain ⟨ηp,hηp,_,hprofile⟩ := primitive_normal_threshold hb hblp hε Dp + refine ⟨min η (min η₀ (min ηs ηp)),C,Cv, + lt_min hη (lt_min hη₀ (lt_min hηs hηp)),hC,hCv,?_⟩ + intro z hz hzη + have hzbase := hzη.trans_le (min_le_left _ _) + have hzother := hzη.trans_le (min_le_right _ _) + have hzmetric := hzother.trans_le (min_le_left _ _) + have hzprofiles := hzother.trans_le (min_le_right _ _) + have hzslow := hzprofiles.trans_le (min_le_left _ _) + have hzprofile := hzprofiles.trans_le (min_le_right _ _) + obtain ⟨G,V,hG,hV,hclose,hmap,hweighted,hzeroV,hshift,herror,hI,hB,hBmargin,hN,hext,hGs,hGO,hprof⟩ := + hfamily z hz hzbase + have herr : data.A.TensorWeightedBound 1 440 (C*z^(N+1)) (inducedTensor V-h.inner) := + fun j => (herror j).mono_order (by omega) + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV (C*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using hsmall z hz hzmetric) + (fun j => (herr j).mono_order (by omega)) + refine ⟨V,hV,?_,hzeroV,hweighted,(fun j k hk x => hshift j k (by omega) x),herr,?_⟩ + · refine ⟨G,hGs,hGO,?_,?_,hext⟩ + · exact fun j => (hclose j).mono_const (hslow z hz hzslow).le + · intro p hp + exact (hprof p hp).trans (hprofile z hz hzprofile).le + · intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,(hBmargin j x hx).le⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledSplitCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledSplitCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..720e468edcec376e2974fc79619dbbcda0035d5c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProfiledSplitCancellation.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialProfileTransfer +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSplitCancellation + +namespace OAI + +/-! +Uniform finite cancellation from actual-scale solver records with fixed +numeric profiles. No reference solver at unit scale is used. All constants +are selected before the map, phase, target and both scales. +-/ + +noncomputable section + +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal + +namespace ClosedSurfaceR4.PhaseGeometry + +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem profiled_split_cancellation {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin 3 → Fin n → Expression) (K : Compacts SmallModes.Base) + (L : ι → Compacts JetPolynomial.Base) + (T : (i : ι) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i))) + (hLK : ∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) + (C J I : ι → ℕ → ℝ) (hC : ∀ i m, 0 ≤ C i m) + (hJ : ∀ i m, 1 ≤ J i m) (hI : ∀ i m, 1 ≤ I i m) + (S : ℕ → ℝ) (hS : ∀ m, 1 ≤ S m) + (hT : ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → ∀ m i A, + supportedWeightedSeminorm (modeSupport (L i)) s m (T i A) ≤ + S m * supportedWeightedSeminorm K s m A) + (hsum : ∀ A x, ∑ i, T i A x = A x) (q : ℕ) : + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (φ : JetPolynomial.Base → ℝ) (τ : ℝ) (s : ℝ≥0), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ (c : (i : ι) → PolynomialSolveData P 0 G hG φ (L i) τ s), + (∀ i, (c i).C = C i) → (∀ i, (c i).D = 0) → (∀ i, (c i).J = J i) → + (∀ i m j, 1 ≤ j → j ≤ m → ∀ x ∈ (c i).e.target, + ‖iteratedFDerivWithin ℝ j (c i).e.symm (c i).e.target x‖ ≤ I i m) → + ∀ A : SupportedField (F := ComplexTensor) K, + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m + (Cv m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := P) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ / s) ^ (q + 1) * Ct m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := P) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + let b : ι → ℕ → ℝ := fun i m => + tensorChartBudget m (I i m) (I i (m + 1)) * S m + have hbn (i : ι) (m : ℕ) : 0 ≤ b i m := + mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans (hI i m)) + (zero_le_one.trans (hI i (m + 1)))) (zero_le_one.trans (hS m)) + let V : ι → ℕ → ℝ := fun i m => + PolynomialSolveData.sizeProfile P (C i) 0 (J i) q m + let R : ι → ℕ → ℝ := fun i m => + PolynomialSolveData.residualProfile P (C i) 0 (J i) q m + have hV (i : ι) (m : ℕ) : 0 ≤ V i m := + PolynomialSolveData.sizeProfile_nonneg P (C i) 0 (J i) (hC i) + (fun m => zero_le_one.trans (hJ i m)) q m + have hR (i : ι) (m : ℕ) : 0 ≤ R i m := + PolynomialSolveData.residualProfile_nonneg P (C i) 0 (J i) (hC i) + (fun m => zero_le_one.trans (hJ i m)) q m + let Cv := fun m => ∑ i, V i m * b i (PolynomialSolveData.inputOrder (P := P) q m) + let Ct := fun m => ∑ i, R i m * b i (PolynomialSolveData.inputOrder (P := P) q m) + refine ⟨Cv, Ct, ?_, ?_, ?_⟩ + · intro m + exact Finset.sum_nonneg (fun i _ => mul_nonneg (hV i m) (hbn i _)) + · intro m + exact Finset.sum_nonneg (fun i _ => mul_nonneg (hR i m) (hbn i _)) + · intro G hG φ τ s hτ hs hτs hs1 c hc hd hj hi A + have hsmall : τ / s + (0 : ℝ) / τ ^ tensorLoss P ≤ 1 := by + simpa only [zero_div, add_zero] using (div_le_one₀ hs).mpr hτs + obtain ⟨X, hX, hsp, hb, hr⟩ := finite_polynomial_cancellation P 0 hG + (fun _ : ι => φ) L c hτ hs hτs hs1 le_rfl hsmall (fun i => T i A) q + have hn (i : ι) (m : ℕ) : (c i).norm (T i A) m ≤ + b i m * supportedWeightedSeminorm K s m A := by + have hbound := (c i).norm_le_of_weightedBound hs hs1 (I i) (hI i) (hi i) m + (mul_nonneg (zero_le_one.trans (hS m)) (apply_nonneg _ _)) (T i A) + ((weightedBound_of_supportedSeminorm s m (T i A)).mono_const + (hT s hs hs1 m i A)) + simpa only [b, mul_assoc] using hbound + have hsz (i : ι) (m : ℕ) : (c i).size (T i A) q m ≤ + (V i m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + rw [(c i).size_eq_factor, (c i).sizeFactor_eq_sizeProfile (hc i) (hd i) (hj i)] + exact (mul_le_mul_of_nonneg_left (hn i _) (hV i m)).trans_eq (mul_assoc _ _ _).symm + have hres (i : ι) (m : ℕ) : (c i).residual (T i A) q m ≤ + (τ / s) ^ (q + 1) * (R i m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + rw [(c i).residual_eq_factor, (c i).residualFactor_eq_residualProfile (hc i) (hd i) (hj i)] + simp only [zero_div, add_zero] + calc + _ ≤ ((τ / s) ^ (q + 1) * R i m) * + (b i (PolynomialSolveData.inputOrder (P := P) q m) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A) := + mul_le_mul_of_nonneg_left (hn i _) + (mul_nonneg (pow_nonneg (div_nonneg hτ.le hs.le) _) (hR i m)) + _ = _ := by ring + have hdisp (x : SmallModes.Base) : + ∑ i, QuadraticMean.displacement τ (coordinatePhase φ) (T i A) x = + QuadraticMean.displacement τ (coordinatePhase φ) A x := by + simp only [QuadraticMean.displacement] + rw [← QuadraticMean.realMode_sum, hsum A x] + refine ⟨X, hX, ?_, ?_, ?_⟩ + · intro x hx + obtain ⟨i, hi⟩ := mem_iUnion.mp (hsp hx) + exact hLK i hi + · intro m + apply (hb m).mono_const + calc + _ ≤ ∑ i, (V i m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := + Finset.sum_le_sum (fun i _ => hsz i m) + _ = _ := (Finset.sum_mul _ _ _).symm + · intro m + have hbound : (∑ i, (c i).residual (T i A) q m) ≤ + (τ / s) ^ (q + 1) * Ct m * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + calc + _ ≤ ∑ i, (τ / s) ^ (q + 1) * + (R i m * b i (PolynomialSolveData.inputOrder (P := P) q m)) * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := + Finset.sum_le_sum (fun i _ => hres i m) + _ = _ := by rw [← Finset.sum_mul, ← Finset.mul_sum] + simpa only [coordinateFullLinearized_unperturbed, hdisp, Pi.add_def] using + (hr m).mono_const hbound + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProjectedVelocityFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProjectedVelocityFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..81ab620da2fb10c5728a586a1fd2eb82dd263396 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ProjectedVelocityFrame.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityPlaneRays + +namespace OAI + +/-! The actual frame formed from the projected tangent and preferred normal. -/ +noncomputable section +open Set +open scoped Matrix ContDiff + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +def projectedFirst (X Y C n : Vec) (t : ℝ) : Vec := + first (realNormalPart Y C X) (realNormalPart Y C n) t + +def projectedSecond (X Y C n : Vec) (t : ℝ) : Vec := + unitPerp Y C (projectedFirst X Y C n t) + +lemma projected_blend_nonzero {X Y B C n : Vec} {a b t : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a < 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) + (hXn : X ⬝ᵥ n = 0) (hYn : Y ⬝ᵥ n = 0) (hn : n ⬝ᵥ n = 1) + (ht : t ∈ Icc (0 : ℝ) 1) (hB : t < 1 → B ≠ 0) + (hanti : t < 1 → normalize B ≠ -n) : + blend (realNormalPart Y C X) (realNormalPart Y C n) t ≠ 0 := by + have hn0 : n ≠ 0 := by + intro hz + rw [hz] at hn + norm_num at hn + have hpn := projected_normal_ne_zero hD ha.ne hXB hYB hC hXn hYn hn0 + have hD' := (velocity_gram_pos hD ha.ne hXB hYB hC).ne' + apply blend_nonzero_of_not_opposite hpn ht + · intro ht0 hpX + have ht1 : t < 1 := by rw [ht0]; norm_num + have hpb := projected_normal_ne_zero hD ha.ne hXB hYB hC hXB hYB (hB ht1) + apply hpb + rw [projected_second_form hD' hC, hpX, smul_zero] + · intro ht1 + exact projected_tangent_no_opposite_ray hD ha hXB hYB hC hXn hYn + (no_opposite_ray_of_normalized (hB ht1) hn (hanti ht1)) + +theorem projected_frame_orthonormal {X Y C n : Vec} {t : ℝ} + (hD : gramDet Y C ≠ 0) + (hn : blend (realNormalPart Y C X) (realNormalPart Y C n) t ≠ 0) : + projectedFirst X Y C n t ⬝ᵥ projectedFirst X Y C n t = 1 ∧ + projectedSecond X Y C n t ⬝ᵥ projectedSecond X Y C n t = 1 ∧ + projectedFirst X Y C n t ⬝ᵥ projectedSecond X Y C n t = 0 ∧ + Y ⬝ᵥ projectedFirst X Y C n t = 0 ∧ C ⬝ᵥ projectedFirst X Y C n t = 0 ∧ + Y ⬝ᵥ projectedSecond X Y C n t = 0 ∧ C ⬝ᵥ projectedSecond X Y C n t = 0 := by + have hx := realNormalPart_perp Y C X hD + have hn' := realNormalPart_perp Y C n hD + exact frame_orthonormal_of_nonzero hD hn hx.1 hn'.1 hx.2 hn'.2 + +lemma projectedFirst_zero (X Y C n : Vec) : + projectedFirst X Y C n 0 = normalize (realNormalPart Y C X) := by + simp [projectedFirst, first, blend] + +lemma projectedFirst_one (X Y C n : Vec) : + projectedFirst X Y C n 1 = normalize (realNormalPart Y C n) := by + simp [projectedFirst, first, blend] + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem projected_frame_smoothOn {X Y C n : E → Vec} {t : E → ℝ} {U : Set E} + (hU : IsOpen U) (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hC : ContDiffOn ℝ ∞ C U) (hn : ContDiffOn ℝ ∞ n U) (ht : ContDiffOn ℝ ∞ t U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hblend : ∀ x ∈ U, blend (realNormalPart (Y x) (C x) (X x)) + (realNormalPart (Y x) (C x) (n x)) (t x) ≠ 0) : + ContDiffOn ℝ ∞ (fun x => projectedFirst (X x) (Y x) (C x) (n x) (t x)) U ∧ + ContDiffOn ℝ ∞ (fun x => projectedSecond (X x) (Y x) (C x) (n x) (t x)) U := by + have hfirst (x : E) (hx : x ∈ U) : + ContDiffAt ℝ ∞ (fun z => projectedFirst (X z) (Y z) (C z) (n z) (t z)) x := by + have hy := hY.contDiffAt (hU.mem_nhds hx) + have hc := hC.contDiffAt (hU.mem_nhds hx) + exact first_smoothAt_of_nonzero + (contDiffAt_realNormalPart hy hc (hX.contDiffAt (hU.mem_nhds hx)) (hD x hx)) + (contDiffAt_realNormalPart hy hc (hn.contDiffAt (hU.mem_nhds hx)) (hD x hx)) + (ht.contDiffAt (hU.mem_nhds hx)) (hblend x hx) + refine ⟨fun x hx => (hfirst x hx).contDiffWithinAt, ?_⟩ + intro x hx + have hy := hY.contDiffAt (hU.mem_nhds hx) + have hc := hC.contDiffAt (hU.mem_nhds hx) + have hpx := realNormalPart_perp (Y x) (C x) (X x) (hD x hx) + have hpn := realNormalPart_perp (Y x) (C x) (n x) (hD x hx) + exact (contDiffAt_unitPerp hy hc (hfirst x hx) (hD x hx) + (normalize_nonzero (hblend x hx)) + (first_perp hpx.1 hpn.1 _) (first_perp hpx.2 hpn.2 _)).contDiffWithinAt + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/PureRadialCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PureRadialCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ca65b293194e8863ed493b91a2127898b92af23 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/PureRadialCrossing.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedBoundaryInvariant + +namespace OAI + +/-! At a prepared point, a pure radial second form gives the strict ordered +crossing inequality even for proportional nonzero tangent directions. -/ +noncomputable section +open scoped Matrix +namespace ClosedSurfaceR4.VelocityFrame +open RealModes SmallModes NormalFrame + +lemma normalize_positive_smul {n : Vec} (hn : n ⬝ᵥ n = 1) {c : ℝ} (hc : 0 < c) : + normalize (c • n) = n := by + have hs : Real.sqrt (c*c) = c := by + nlinarith [Real.sq_sqrt (show 0 ≤ c*c by positivity),Real.sqrt_nonneg (c*c)] + simp only [normalize,smul_dotProduct,dotProduct_smul,smul_eq_mul,hn,mul_one,hs,smul_smul, + inv_mul_cancel₀ hc.ne',one_smul] + +lemma orderedCrossing_pure_radial {F : RField 4} (p v w : Base) (n : Vec) + {r : ℝ} (hr : 0 < r) (hn : n ⬝ᵥ n = 1) + (hv : coordDeriv v F p ≠ 0) (hw : coordDeriv w F p ≠ 0) + (hvv : realSecondForm F v v p = + (r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv v F p)) • n) + (hvw : realSecondForm F v w p = + (r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv w F p)) • n) : + orderedCrossing F v w p ((r⁻¹)^2) = + (r⁻¹)^2*(coordDeriv v F p ⬝ᵥ coordDeriv v F p)* + (coordDeriv w F p ⬝ᵥ coordDeriv w F p) ∧ + 0 < orderedCrossing F v w p ((r⁻¹)^2) := by + have hpos : 0 < r⁻¹*(coordDeriv v F p ⬝ᵥ coordDeriv v F p) := + mul_pos (inv_pos.mpr hr) (dot_self_pos hv) + have he : orderedCrossing F v w p ((r⁻¹)^2) = + (r⁻¹)^2*(coordDeriv v F p ⬝ᵥ coordDeriv v F p)* + (coordDeriv w F p ⬝ᵥ coordDeriv w F p) := by + simp only [orderedCrossing,hvv,hvw,normalize_positive_smul hn hpos,smul_dotProduct, + smul_eq_mul,hn,mul_one,NormalFrame.gramDet] + ring + exact ⟨he,he.symm ▸ mul_pos (mul_pos (sq_pos_of_pos (inv_pos.mpr hr)) + (dot_self_pos hv)) (dot_self_pos hw)⟩ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a240ed3e4cc627e6e0045d87ee48a9c38835c14 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularAtlas.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformConvexCircularAtlas +import OAI.Geometry.SurfaceImmersion.Atlas.LocalReferencePhaseBasis +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseParameterBalls + +namespace OAI + +/-! A reference circular atlas with positive coefficient forms and convex +phases, chosen before the number of cycles or generic perturbations. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +structure ReferenceCircularAtlas (A : SmoothingAtlas M) (gref g : SmoothMetric M) (c C : ℝ) where + B : SmoothingAtlas M + P : B.centers → PhaseBasis + L : B.centers → ℝ + radius : B.centers → ℝ + epsilon : B.centers → ℝ + L_pos : ∀ i, 0 < L i + radius_pos : ∀ i, 0 < radius i + epsilon_pos : ∀ i, 0 < epsilon i + region : ∀ i : B.centers, circularCoordinateRegion (i : M) (radius i) ⊆ (coordinateChart (i : M)).target + weight_nonneg : ∀ i p, 0 ≤ B.weight i p + weight_positive : ∀ i p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) (radius i) + outer : ∀ i p, p ∈ tsupport (B.weight i) → B.outer i =ᶠ[𝓝 p] (fun _ => 1) + parameters : ∀ i j ell, ell ∈ Metric.closedBall ((P i).ξ j) (epsilon i) → + ell ≠ 0 ∧ ‖ell‖ ≤ ‖(P i).ξ‖+1 + admissible : ∀ (i : B.centers) p, p ∈ circularDiskClosure (i : M) (radius i) → + admissiblePhaseCovectors (P i) (fun j => phaseDerivative + (centeredConvexPhase ((P i).ξ j) (L i) (coordinateChart (i : M) i)) (coordinateChart (i : M) p)) + positive : ∀ (i : B.centers) p, p ∈ circularDiskClosure (i : M) (radius i) → ∀ j, + 0 < (centeredSpatialBasis (P i) (P i).ξ (L i) (coordinateChart (i : M) i) + (coordinateChart (i : M) p)).Q j (coordinateMetric gref (i : M) (coordinateChart (i : M) p)) + convex : ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 C h.inner → + (∀ q v, c*g.inner q v v ≤ h.inner q v v) → + ∀ (i : B.centers) p, p ∈ circularDiskClosure (i : M) (radius i) → + ∀ ell : Base, ‖ell‖ ≤ ‖(P i).ξ‖+1 → ∀ v : Base, + (L i/2)*(v.1^2+v.2^2) ≤ coordinateMetricHessian (coordinateMetric h (i : M)) + (centeredConvexPhase ell (L i) (coordinateChart (i : M) i)) (coordinateChart (i : M) p) v v + charts : ∀ (i : B.centers) j ell, ell ∈ Metric.closedBall ((P i).ξ j) (epsilon i) → + ∃ e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base, + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + (∀ x, (baseEquiv (e x)).1 = centeredConvexPhase ell (L i) + (coordinateChart (i : M) i) (baseEquiv x)) ∧ + ∀ x ∈ circularCoordinateRegion (i : M) (radius i), baseEquiv.symm x ∈ e.source + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exists_reference_circular_atlas (gref g : SmoothMetric M) {c C : ℝ} + (hc : 0 < c) (hC : 0 ≤ C) : Nonempty (ReferenceCircularAtlas A gref g c C) := by + classical + choose P hP using fun p : M => positive_tensor_has_basis + (coordinateMetric_positive_center gref p).1 (coordinateMetric_positive_center gref p).2 + choose eps heps heps1 hparams using fun p => phase_parameter_balls (P p) + obtain ⟨L,hL,hchoose⟩ := A.uniform_convex_circular_atlas g hc hC + (fun p => ‖(P p).ξ‖+1) (fun _ => by positivity) + choose R hR hcharts using fun (p : M) (j : Fin 3) => + uniform_circular_phase_charts (M := M) (isCompact_closedBall ((P p).ξ j) (eps p)) + (fun ell hell => ((hparams p j).2 ell hell).1) (hL p) + let R₀ : M → ℝ := fun p => min (R p 0) (min (R p 1) (R p 2)) + have hR₀ (p : M) : 0 < R₀ p := lt_min (hR p 0) (lt_min (hR p 1) (hR p 2)) + have hRle (p : M) (j : Fin 3) : R₀ p ≤ R p j := by + fin_cases j + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (min_le_left _ _) + · exact (min_le_right _ _).trans (min_le_right _ _) + choose U hU hpU hUs hgood using fun p => local_reference_phase_basis gref p (P p) (hP p) (L p) + obtain ⟨B,r,hr,hinside,hreg,hnon,hpos,houter,hconvex⟩ := hchoose R₀ hR₀ U hU hpU + refine ⟨{ + B := B, P := fun i => P i, L := fun i => L i, + radius := r, epsilon := fun i => eps i, + L_pos := fun i => hL i, radius_pos := fun i => (hr i).1, + epsilon_pos := fun i => heps i, region := hreg, + weight_nonneg := hnon, weight_positive := hpos, outer := houter, + parameters := fun i j ell hell => (hparams i j).2 ell hell, + admissible := fun i p hp => (hgood i p (hinside i hp)).1, + positive := fun i p hp => (hgood i p (hinside i hp)).2, + convex := hconvex, + charts := ?_ }⟩ + intro i j ell hell + obtain ⟨e,he,hei,heq,hcover⟩ := hcharts (i : M) j (i : M) ell hell + exact ⟨e,he,hei,heq,hcover (r i) (hr i).1.le ((hr i).2.trans (hRle i j))⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..7aa7a044775efc1d82197a3d5ff5f018498b1f1e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularMargins.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ReferenceCircularOperator +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorStability + +namespace OAI + +/-! Compact positive inverse margins in the actual reference chart frames. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance referenceMarginFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance referenceMarginFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance referenceMarginFiberComplete : CompleteSpace TensorFiber := inferInstance +open PhaseMean PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +def chartCoefficient (i : d.B.centers) (j : Fin 3) (y : JetPolynomial.Base) : TensorFiber →L[ℝ] ℝ := + ((d.basis i y).Q j).comp fiberToThree + +def chartReference (i : d.B.centers) (y : JetPolynomial.Base) : TensorFiber := + fiberFromThree (d.B.tensorChartRead i gref.inner y) + +lemma chartCoefficient_smoothOn (i : d.B.centers) (j : Fin 3) : + ContDiffOn ℝ ∞ (d.chartCoefficient i j) (d.B.chartWeightCompact i : Set JetPolynomial.Base) := by + rintro y ⟨p,hp,rfl⟩ + exact ((d.basis_smooth i hp j).clm_comp contDiffAt_const).contDiffWithinAt + +omit [T2Space M] in +lemma chartReference_smooth (i : d.B.centers) : ContDiff ℝ ∞ (d.chartReference i) := + fiberFromThree.contDiff.comp (d.B.tensorChartRead_smooth i gref.contMDiff) + +lemma chartCoefficient_positive (i : d.B.centers) (j : Fin 3) {y : JetPolynomial.Base} + (hy : y ∈ (d.B.chartWeightCompact i : Set JetPolynomial.Base)) : + 0 < d.chartCoefficient i j y (d.chartReference i y) := by + obtain ⟨p,hp,rfl⟩ := hy + change 0 < (d.basis i (chart (i : M) p)).Q j + (fiberToThree (fiberFromThree (d.B.tensorChartRead i gref.inner (chart (i : M) p)))) + rw [fiberToThree_fromThree,d.B.tensorChartRead_on_weight i gref.inner hp] + exact d.coefficient_positive i hp j + + theorem inverse_margin (i : d.B.centers) (j : Fin 3) : + ∃ eps : ℝ, 0 < eps ∧ + ∀ y ∈ (d.B.chartWeightCompact i : Set JetPolynomial.Base), + ∀ (T : TensorFiber →L[ℝ] TensorFiber) (H : TensorFiber), + ‖T-ContinuousLinearMap.id ℝ TensorFiber‖ < eps → + ‖H-d.chartReference i y‖ < eps → + T.IsInvertible ∧ 0 < d.chartCoefficient i j y (T.inverse H) := by + let f := fun y : JetPolynomial.Base => + ((ContinuousLinearMap.id ℝ TensorFiber,d.chartCoefficient i j y),d.chartReference i y) + have hf : ContinuousOn f (d.B.chartWeightCompact i : Set JetPolynomial.Base) := + (continuousOn_const.prodMk (d.chartCoefficient_smoothOn i j).continuousOn).prodMk + (d.chartReference_smooth i).continuous.continuousOn + have hK := (d.B.chartWeightCompact i).isCompact.image_of_continuousOn hf + obtain ⟨eps,heps,hmargin⟩ := compact_inverse_coefficient_stability hK + (by rintro _ ⟨y,hy,rfl⟩; rfl) + (by rintro _ ⟨y,hy,rfl⟩; exact d.chartCoefficient_positive i j hy) + refine ⟨eps,heps,?_⟩ + intro y hy T H hT hH + apply hmargin (f y) ⟨y,hy,rfl⟩ ((T,d.chartCoefficient i j y),H) + change max (max ‖T-ContinuousLinearMap.id ℝ TensorFiber‖ + ‖d.chartCoefficient i j y-d.chartCoefficient i j y‖) ‖H-d.chartReference i y‖ < eps + rw [sub_self,norm_zero,max_eq_left (norm_nonneg _)] + exact max_lt hT hH + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..854c7ded4f3a2588651cf25e48020ac25d7b60a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ReferenceCircularOperator.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ReferenceCircularAtlas +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentCircularRealization +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveOperator + +namespace OAI + +/-! The selected reference atlas supplies the actual identity operator, +smooth coefficient germs, and positive metric coefficients. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +def localPhases := d.B.centeredPhaseFamily (fun i => (d.P i).ξ) d.L + +def basis := d.B.centeredAtlasBasis d.P (fun i => (d.P i).ξ) d.L + +def globalPhases := d.B.curvedAtlasPhase d.localPhases + +omit [CompactSpace M] in +lemma supported (i : d.B.centers) : + tsupport (d.B.weight i) ⊆ circularDiskClosure (i : M) (d.radius i) := + circular_weight_support d.radius d.region d.weight_nonneg d.weight_positive i + +omit [CompactSpace M] in +lemma basis_covectors (i : d.B.centers) {p : M} (hp : p ∈ tsupport (d.B.weight i)) : + (d.basis i (chart (i : M) p)).ξ = + fun j => phaseDerivative (d.localPhases i j) (coordinateChart (i : M) p) := + centeredSpatialBasis_covectors _ _ _ _ _ (d.admissible i p (d.supported i hp)) + +omit [CompactSpace M] in +lemma basis_smooth (i : d.B.centers) {p : M} (hp : p ∈ tsupport (d.B.weight i)) (j : Fin 3) : + ContDiffAt ℝ ∞ (fun y => (d.basis i y).Q j) (chart (i : M) p) := by + exact (centeredSpatialBasis_coefficient_smoothAt _ _ _ _ + (d.admissible i p (d.supported i hp)) j).comp (chart (i : M) p) + JetPolynomial.planeCoordinateIsometry.contDiff.contDiffAt + +omit [CompactSpace M] in +lemma operator_identity (p : M) : + d.B.primitiveFullOperator d.basis (fun a => d.B.weight a.1) d.globalPhases p = + ContinuousLinearMap.id ℝ (CovariantTwoTensor p) := + d.B.primitiveFullOperator_reference d.basis d.localPhases + (fun _ _ => centeredConvexPhase_smooth _ _ _) d.outer + (fun i _ _p hp => congrFun (d.basis_covectors i hp) _) p + +omit [CompactSpace M] in +lemma coefficient_positive (i : d.B.centers) {p : M} (hp : p ∈ tsupport (d.B.weight i)) (j : Fin 3) : + 0 < d.B.primitiveCoefficientField d.basis (i,j) p (gref.inner p) := by + have hm := d.B.tensorPlaneRead_metric_on_weight gref i hp + change d.B.tensorChartRead i gref.inner + (JetPolynomial.planeCoordinateIsometry.symm (JetPolynomial.planeCoordinateIsometry (chart (i : M) p))) = + coordinateMetric gref (i : M) (coordinateChart (i : M) p) at hm + rw [LinearIsometryEquiv.symm_apply_apply] at hm + rw [d.B.tensorChartRead_on_weight i gref.inner hp] at hm + change 0 < (d.basis i (chart (i : M) p)).Q j + (fiberToThree (d.B.bundleComponent d.B.tensorTriv i gref.inner p)) + rw [hm] + exact d.positive i p (d.supported i hp) j + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/RegularCurveLoopRemoval.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/RegularCurveLoopRemoval.lean new file mode 100644 index 0000000000000000000000000000000000000000..607b8b8fe9ac45eeb76e5cfaea1a7ddd8d1015ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/RegularCurveLoopRemoval.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularCurvePieces + +namespace OAI + +/-! Finite loop removal for a compact regular curve. The selected embedded +path uses only its original image and retains a finite smooth decomposition. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +theorem regular_curve_loop_removal {γ : ℝ → M} {U : Set ℝ} {a b : ℝ} + (hU : IsOpen U) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ U) + (hreg : ∀ t ∈ U, Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) + (hab : a < b) (hsub : Icc a b ⊆ U) + (hstart : ∀ t ∈ Ioc a b, γ t ≠ γ a) : + ∃ P : Path (γ a) (γ b), FiniteRegularPath planeModel P ∧ + Function.Injective P ∧ range P ⊆ γ '' Icc a b := by + obtain ⟨τ,N,hzero,hmono,hbounds,hend,hpieces⟩ := + regular_curve_finite_pieces hU hγ hreg hab.le hsub + have hstep (n : ℕ) : τ n = a ∨ + ∃ P : Path (γ a) (γ (τ n)), FiniteRegularPath planeModel P ∧ + Function.Injective P ∧ range P ⊆ γ '' Icc a (τ n) := by + induction n with + | zero => exact Or.inl hzero + | succ n ih => + by_cases heq : τ (n+1) = a + · exact Or.inl heq + right + by_cases hn : τ n = τ (n+1) + · rcases ih with ha | ⟨P,hPp,hPi,hPr⟩ + · exact False.elim (heq (hn.symm.trans ha)) + · let Q : Path (γ a) (γ (τ (n+1))) := P.cast rfl (congrArg γ hn.symm) + refine ⟨Q,hPp.cast _ _,hPi,?_⟩ + change range P ⊆ _ + rw [← hn] + exact hPr + have hlt : τ n < τ (n+1) := lt_of_le_of_ne (hmono (Nat.le_succ n)) hn + obtain ⟨R,hRc,hRs,hRf⟩ := hpieces n hlt + have hleft : γ (τ n) = R.curve R.start := by rw [hRc,hRs] + have hright : γ (τ (n+1)) = R.curve R.finish := by rw [hRc,hRf] + let δ : Path (γ (τ n)) (γ (τ (n+1))) := R.path.cast hleft hright + have hδp : FiniteRegularPath planeModel δ := (FiniteRegularPath.arc R).cast hleft hright + have hδi : Function.Injective δ := R.path_injective + have hδr : range δ = γ '' Icc (τ n) (τ (n+1)) := by + change range R.path = _ + rw [R.path_range,hRc,hRs,hRf] + by_cases ha : τ n = a + · let Q : Path (γ a) (γ (τ (n+1))) := δ.cast (congrArg γ ha.symm) rfl + refine ⟨Q,hδp.cast _ _,hδi,?_⟩ + change range δ ⊆ _ + rw [hδr,ha] + · obtain ⟨P,hPp,hPi,hPr⟩ := ih.resolve_left ha + have hna : a < τ n := lt_of_le_of_ne (hbounds n).1 (Ne.symm ha) + have hn1a : a < τ (n+1) := hna.trans hlt + have havoid : γ a ∉ range δ := by + rw [hδr] + rintro ⟨t,ht,het⟩ + exact hstart t ⟨hna.trans_le ht.1,ht.2.trans (hbounds (n+1)).2⟩ het + obtain ⟨Q,hQp,hQi,hQr⟩ := finite_regular_path_join hPp hδp hPi hδi + (hstart _ ⟨hn1a,(hbounds (n+1)).2⟩).symm havoid + refine ⟨Q,hQp,hQi,hQr.trans ?_⟩ + apply union_subset + · exact hPr.trans (image_mono (Icc_subset_Icc_right (hmono (Nat.le_succ n)))) + · rw [hδr] + exact image_mono (Icc_subset_Icc_left (hbounds n).1) + rcases hstep N with hNa | ⟨P,hPp,hPi,hPr⟩ + · exact False.elim (hab.ne (hNa.symm.trans (hend N le_rfl))) + · let Q : Path (γ a) (γ b) := P.cast rfl (congrArg γ (hend N le_rfl).symm) + refine ⟨Q,hPp.cast _ _,hPi,?_⟩ + change range P ⊆ _ + rw [← hend N le_rfl] + exact hPr + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/RestrictedSurfaceLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/RestrictedSurfaceLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b95a5779eb1118c29593904524c144326df1aa9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/RestrictedSurfaceLoop.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SpatialLoopAmplitude + +namespace OAI + +/-! Restrict a constructed loop to a neighborhood where every zero-amplitude +jet has the constant normal velocity required by the supported expansion. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial + +variable {O : TopologicalSpace.Opens LowJet} + +def restrict (l : SurfaceVelocityFamily.Loop O) (V : TopologicalSpace.Opens LowJet) + (hVO : (V : Set LowJet) ⊆ O) : SurfaceVelocityFamily.Loop V where + amplitude := l.amplitude + smoothAmplitude := l.smoothAmplitude.mono hVO + velocity := l.velocity + smoothVelocity := l.smoothVelocity.mono (Set.prod_mono hVO Subset.rfl) + periodic J hJ := l.periodic J (hVO hJ) + gram_ne J hJ := l.gram_ne J (hVO hJ) + nonzero J hJ := l.nonzero J (hVO hJ) + perpY J hJ := l.perpY J (hVO hJ) + perpC J hJ := l.perpC J (hVO hJ) + length J hJ := l.length J (hVO hJ) + mean J hJ := l.mean J (hVO hJ) + +lemma restrict_hasSpatialAmplitude (l : SurfaceVelocityFamily.Loop O) + (V : TopologicalSpace.Opens LowJet) (hVO : (V : Set LowJet) ⊆ O) + {a : Base → ℝ} (ha : l.HasSpatialAmplitude a) : + (l.restrict V hVO).HasSpatialAmplitude a := fun J hJ => ha J (hVO hJ) + +theorem restrict_zero_collar (l : SurfaceVelocityFamily.Loop O) + {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + {Q W : Set LowJet} (hQ : Q ⊆ O) (hW : IsOpen W) + (hQW : ∀ J ∈ Q, a (lowJetPosition J) = 0 → J ∈ W) + (hzero : ∀ J ∈ W, a (lowJetPosition J) = 0 → ∀ t, l.velocity (J,t) = normal J) : + ∃ V : TopologicalSpace.Opens LowJet, Q ⊆ V ∧ (V : Set LowJet) ⊆ O ∧ + ∃ l' : SurfaceVelocityFamily.Loop V, l'.HasSpatialAmplitude a ∧ + (l'.velocity = l.velocity) ∧ + ∀ J ∈ V, a (lowJetPosition J) = 0 → ∀ t, l'.velocity (J,t) = normal J := by + let C : Set LowJet := {J | a (lowJetPosition J) ≠ 0} ∪ W + have hC : IsOpen C := (isClosed_eq ((ha.comp lowJetPosition.contDiff).continuous) + continuous_const).isOpen_compl.union hW + let V : TopologicalSpace.Opens LowJet := ⟨(O : Set LowJet) ∩ C,O.isOpen.inter hC⟩ + have hVO : (V : Set LowJet) ⊆ O := inter_subset_left + refine ⟨V,?_,hVO,l.restrict V hVO,l.restrict_hasSpatialAmplitude V hVO hamp,rfl,?_⟩ + · intro J hJ + refine ⟨hQ hJ,?_⟩ + by_cases hz : a (lowJetPosition J) = 0 + · exact Or.inr (hQW J hJ hz) + · exact Or.inl hz + · intro J hJ hz t + have hJW : J ∈ W := hJ.2.resolve_left (not_not_intro hz) + exact hzero J hJW hz t + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SecondCoefficientProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SecondCoefficientProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..32c680b5f2fe5f6e0d5c15982c9bc008124d1ba2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SecondCoefficientProfiles.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CoefficientJetBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCoefficientProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.JetVelocityCoordinates + +namespace OAI + +/-! Second coefficient derivatives agree with the local represented jets, +even when only their germs agree after the first derivative. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector JetPolynomial + +lemma global_angle_eq_local_of_eqOn {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] {O : TopologicalSpace.Opens A} + (W : PeriodicExpansion.Family A E) (U : Family O E) + (hW : ∀ p ∈ O, ∀ t : Period, W.val p t = U.val p t) + {p : A} (hp : p ∈ O) (t : Period) : W.angle.val p t = U.angle.val p t := by + refine Quotient.inductionOn' t ?_ + intro s + rw [PeriodicExpansion.Family.angle_apply,Family.angle_apply U hp] + have he : (fun z : A × ℝ => W.val z.1 (z.2 : Period)) =ᶠ[nhds (p,s)] + (fun z => U.val z.1 (z.2 : Period)) := by + filter_upwards [(O.isOpen.prod isOpen_univ).mem_nhds ⟨hp,mem_univ s⟩] with z hz + exact hW z.1 hz.1 (z.2 : Period) + exact congrArg (fun L : (A × ℝ) →L[ℝ] E => L (0,1)) he.fderiv_eq + +def globalCoefficientDerivative (W : PeriodicExpansion.Family Base JetVelocityCoordinates.Euclidean) + (k : Fin 3) : PeriodicExpansion.Family Base JetVelocityCoordinates.Euclidean := + ![W.slow (coordinateVector 0),W.slow (coordinateVector 1),W.angle] k + +lemma global_coefficientDerivative_eq_local {S : TopologicalSpace.Opens Base} + (W : PeriodicExpansion.Family Base JetVelocityCoordinates.Euclidean) + (U : Family S JetVelocityCoordinates.Euclidean) + (hW : ∀ p ∈ S, ∀ t : Period, W.val p t = U.val p t) + (k : Fin 3) {p : Base} (hp : p ∈ S) (t : Period) : + (globalCoefficientDerivative W k).val p t = + (VectorExpression.coefficientFamilyDerivative U k).val p t := by + fin_cases k + · exact global_slow_eq_local_of_eqOn W U hW _ hp t + · exact global_slow_eq_local_of_eqOn W U hW _ hp t + · exact global_angle_eq_local_of_eqOn W U hW hp t + +lemma global_second_coefficientDerivative_eq_local {S : TopologicalSpace.Opens Base} + (W : PeriodicExpansion.Family Base JetVelocityCoordinates.Euclidean) + (U : Family S JetVelocityCoordinates.Euclidean) (hW : W.val = U.val) + (k j : Fin 3) {p : Base} (hp : p ∈ S) (t : Period) : + (globalCoefficientDerivative (globalCoefficientDerivative W k) j).val p t = + (VectorExpression.coefficientFamilyDerivative + (VectorExpression.coefficientFamilyDerivative U k) j).val p t := by + apply global_coefficientDerivative_eq_local _ _ _ j hp t + intro q hq r + exact global_coefficientDerivative_eq_local W U (by intro q _ t; rw [hW]) k hq r + +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/ShrinkingCircularWeight.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ShrinkingCircularWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..398c724cb3b8a559f0fbb5697794a69b11998758 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/ShrinkingCircularWeight.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PerturbedCircularCutoffs + +namespace OAI + +/-! Weight-preserving independent disk shrinkage. The quotient is only +used where the original bump is positive; the smaller compact support +makes the resulting weight globally smooth. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularManifoldBump_mono_sq (p x : M) {r R : ℝ} (h : r^2 ≤ R^2) : + circularManifoldBump p r x ≤ circularManifoldBump p R x := by + classical + by_cases hx : x ∈ (coordinateChart p).source + · simp only [circularManifoldBump,indicator_of_mem hx,circularFlatBump] + exact expNegInvGlue.monotone (sub_le_sub_right h _) + · simp only [circularManifoldBump,indicator_of_notMem hx,le_refl] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_subset_disk (p : M) {r R : ℝ} (h : r^2 < R^2) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + circularDiskClosure p r ⊆ circularCoordinateDisk p R := by + rintro x ⟨y,hy,rfl⟩ + refine ⟨(coordinateChart p).map_target (hreg hy),?_⟩ + change circularRadiusSquared (coordinateChart p p) + (coordinateChart p ((coordinateChart p).symm y)) < R^2 + rw [(coordinateChart p).right_inv (hreg hy)] + exact hy.trans_lt h + +/-- The original weight is recovered at the original radius, even though +both circular bumps vanish on and outside its boundary. -/ +def shrinkingCircularWeight (p : M) (w : M → ℝ) (r0 r : ℝ) (x : M) : ℝ := + w x * (circularManifoldBump p r x / circularManifoldBump p r0 x) + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma shrinkingCircularWeight_nonneg_le (p : M) (w : M → ℝ) + (hw : ∀ x, 0 ≤ w x) {r0 r : ℝ} (hr : r^2 ≤ r0^2) (x : M) : + 0 ≤ shrinkingCircularWeight p w r0 r x ∧ shrinkingCircularWeight p w r0 r x ≤ w x := by + have hb := circularManifoldBump_mono_sq p x hr + have hn := circularManifoldBump_nonneg p x r + have hd := circularManifoldBump_nonneg p x r0 + refine ⟨mul_nonneg (hw x) (div_nonneg hn hd),?_⟩ + by_cases hp : 0 < circularManifoldBump p r0 x + · exact mul_le_of_le_one_right (hw x) ((div_le_one hp).mpr hb) + · have hz : circularManifoldBump p r0 x = 0 := le_antisymm (not_lt.mp hp) hd + simpa only [shrinkingCircularWeight,hz,div_zero,mul_zero] using hw x + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma shrinkingCircularWeight_reference (p : M) (w : M → ℝ) (r0 : ℝ) + (hw : ∀ x, 0 ≤ w x) + (hpos : ∀ x, 0 < w x ↔ x ∈ circularCoordinateDisk p r0) : + shrinkingCircularWeight p w r0 r0 = w := by + funext x + by_cases hb : circularManifoldBump p r0 x = 0 + · have hz : w x = 0 := le_antisymm (le_of_not_gt (fun hp => + ((circularManifoldBump_pos_iff p x r0).mpr ((hpos x).mp hp)).ne' hb)) (hw x) + simp only [shrinkingCircularWeight,hz,zero_mul] + · simp only [shrinkingCircularWeight,div_self hb,mul_one] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma shrinkingCircularWeight_pos_iff (p : M) (w : M → ℝ) + (_hw : ∀ x, 0 ≤ w x) {r0 r : ℝ} (hr : r^2 ≤ r0^2) + (hpos : ∀ x, 0 < w x ↔ x ∈ circularCoordinateDisk p r0) (x : M) : + 0 < shrinkingCircularWeight p w r0 r x ↔ x ∈ circularCoordinateDisk p r := by + constructor + · intro h + apply (circularManifoldBump_pos_iff p x r).mp + apply lt_of_le_of_ne (circularManifoldBump_nonneg p x r) + intro hb + have hz : shrinkingCircularWeight p w r0 r x = 0 := by + simp only [shrinkingCircularWeight,← hb,zero_div,mul_zero] + exact h.ne' hz + · intro hx + have hb := (circularManifoldBump_pos_iff p x r).mpr hx + have hb0 := hb.trans_le (circularManifoldBump_mono_sq p x hr) + have hw0 := (hpos x).mpr ((circularManifoldBump_pos_iff p x r0).mp hb0) + exact mul_pos hw0 (div_pos hb hb0) + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma shrinkingCircularWeight_support (p : M) (w : M → ℝ) (r0 r : ℝ) : + tsupport (shrinkingCircularWeight p w r0 r) ⊆ tsupport (circularManifoldBump p r) := by + apply closure_mono + intro x hx + contrapose! hx + simp only [Function.mem_support,not_not] at hx ⊢ + simp only [shrinkingCircularWeight,hx,zero_div,mul_zero] + +/-- Every strictly smaller radius gives a globally smooth actual weight, +with support in the smaller closed disk. -/ +theorem shrinkingCircularWeight_smooth (p : M) (w : M → ℝ) + (hw : ContMDiff planeModel 𝓘(ℝ) ∞ w) {r0 r : ℝ} + (hreg0 : circularCoordinateRegion p r0 ⊆ (coordinateChart p).target) + (hr : r^2 < r0^2) : + ContMDiff planeModel 𝓘(ℝ) ∞ (shrinkingCircularWeight p w r0 r) ∧ + tsupport (shrinkingCircularWeight p w r0 r) ⊆ circularDiskClosure p r := by + have hreg := (circularCoordinateRegion_mono p hr.le).trans hreg0 + have hb := circularManifoldBump_smooth_support p r hreg + have hb0 := circularManifoldBump_smooth_support p r0 hreg0 + have hs := (shrinkingCircularWeight_support p w r0 r).trans hb.2 + refine ⟨?_,hs⟩ + apply contMDiff_of_tsupport + intro x hx + have hd := (circularDiskClosure_subset_disk p hr hreg) (hs hx) + have hp := (circularManifoldBump_pos_iff p x r0).mpr hd + exact (hw x).mul ((hb.1 x).div₀ (hb0.1 x) hp.ne') + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SlowPeriodicDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SlowPeriodicDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..929481afff76cd3d44771f3c3a0d09745711e317 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SlowPeriodicDerivative.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral + +namespace OAI + +/-! Slow differentiation commutes with the periodic mean. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +def slowDerivative (F : A × ℝ → E) (v : A) (z : A × ℝ) : E := + fderiv ℝ F z (v, 0) + +lemma contDiff_slowDerivative {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (v : A) : + ContDiff ℝ ∞ (slowDerivative F v) := + (hF.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + +lemma fderiv_slice {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (p v : A) (t : ℝ) : + fderiv ℝ (fun q => F (q, t)) p v = slowDerivative F v (p, t) := by + rw [(SmoothParameterIntegral.partial_hasFDerivAt hF p t).fderiv] + rfl + +lemma periodic_slowDerivative {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) + (hp : ∀ p, Function.Periodic (fun t => F (p, t)) 1) (v p : A) : + Function.Periodic (fun t => slowDerivative F v (p, t)) 1 := by + intro t + have he : (fun q => F (q, t + 1)) = fun q => F (q, t) := funext (fun q => hp q t) + have hd := congrArg (fun f : A → E => fderiv ℝ f p v) he + simpa only [fderiv_slice hF] using hd + +def slowDerivativeFamily (F : A → C(CovarianceCorrector.Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : CovarianceCorrector.Period))) (v : A) : + A → C(CovarianceCorrector.Period, E) := + bundleFamily (slowDerivative (fun z : A × ℝ => F z.1 (z.2 : CovarianceCorrector.Period)) v) + (contDiff_slowDerivative hF v) (periodic_slowDerivative hF (periodic_lift F) v) + +lemma slowDerivativeFamily_smooth (F : A → C(CovarianceCorrector.Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : CovarianceCorrector.Period))) (v : A) : + ContDiff ℝ ∞ (fun z : A × ℝ => slowDerivativeFamily F hF v z.1 + (z.2 : CovarianceCorrector.Period)) := contDiff_slowDerivative hF v + +variable [FiniteDimensional ℝ A] + +lemma slowDerivativeFamily_mean_zero (F : A → C(CovarianceCorrector.Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : CovarianceCorrector.Period))) + (hm : ∀ p, (∫ t, F p t ∂AddCircle.haarAddCircle) = 0) (v p : A) : + (∫ t, slowDerivativeFamily F hF v p t ∂AddCircle.haarAddCircle) = 0 := by + let f : A × ℝ → E := fun z => F z.1 (z.2 : CovarianceCorrector.Period) + have hzero : (fun p => ∫ t in 0..1, f (p, t)) = fun _ => (0 : E) := by + funext q + exact (PeriodicPrimitive.integral_lift_eq_haar (F q)).trans (hm q) + have hd := (SmoothParameterIntegral.hasFDerivAt_integral hF 0 1 p).fderiv + change fderiv ℝ (fun q => ∫ t in 0..1, f (q, t)) p = _ at hd + rw [hzero, fderiv_const_apply] at hd + have he := congrArg (fun L : A →L[ℝ] E => L v) hd.symm + have hi := ContinuousLinearMap.intervalIntegral_apply (μ := volume) + (φ := fun t => SmoothParameterIntegral.partialDerivative f (p, t)) + ((SmoothParameterIntegral.contDiff_partialDerivative hF).continuous.comp + (continuous_const.prodMk continuous_id) |>.intervalIntegrable 0 1) v + rw [← PeriodicPrimitive.integral_lift_eq_haar] + change (∫ t in 0..1, slowDerivative f v (p, t)) = 0 + calc + _ = (∫ t in 0..1, SmoothParameterIntegral.partialDerivative f (p, t)) v := hi.symm + _ = 0 := he + +end ClosedSurfaceR4.SmoothPeriodicCalculus + +namespace ClosedSurfaceR4.PeriodicCorrector + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The differentiated pairing constraint in an arbitrary slow direction. -/ +theorem directional_pairing_constraint {Y U : A → E} {H : A → ℝ} + {p v : A} {C : E} {j : ℝ} + (hY : DifferentiableAt ℝ Y p) (hU : DifferentiableAt ℝ U p) + (hH : DifferentiableAt ℝ H p) (he : ∀ q, inner ℝ (Y q) (U q) = H q) + (hC : fderiv ℝ Y p v = C) + (hK : inner ℝ C (U p) = fderiv ℝ H p v - j) : + inner ℝ (Y p) (fderiv ℝ U p v) = j := by + have hd := hY.hasFDerivAt.inner ℝ hU.hasFDerivAt + have hid : (fun q => inner ℝ (Y q) (U q)) = H := funext he + rw [hid] at hd + have hv := congrArg (fun L : A →L[ℝ] ℝ => L v) (hd.unique hH.hasFDerivAt) + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.prod_apply, + fderivInnerCLM_apply] at hv + rw [hC] at hv + linarith + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SmallTurnFunction.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SmallTurnFunction.lean new file mode 100644 index 0000000000000000000000000000000000000000..94a352f57cc150ac9b34720ca0cb3da6f1dcd063 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SmallTurnFunction.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalDefiningFunction +import OAI.Geometry.SurfaceImmersion.Primitive.BlendedSpatialTurns + +namespace OAI + +/-! Choose the small translation of the angle with a large derivative at both +turns. Compactness bounds the endpoint-amplitude derivative before this choice. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open TransverseSmallFunction + +/-- The two endpoint derivatives can be made arbitrarily large while the +translation itself is arbitrarily small. The geometric input is the checked +local curve-equation form of the finite-curve correction lemma. -/ +theorem exists_small_turn_function {K O P : Set Base} + (hK : IsCompact K) (hO : IsOpen O) (hKO : K ⊆ O) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f U ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {a A s : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hA : ContDiff ℝ ∞ A) (hs : ContDiff ℝ ∞ s) (T : ℝ) + {ε : ℝ} (hε : 0 < ε) : + ∃ h : Base → ℝ, ContDiff ℝ ∞ h ∧ HasCompactSupport h ∧ tsupport h ⊆ O ∧ + (∀ x, |h x| < ε) ∧ ∀ x ∈ K, + T < fderiv ℝ (fun y => h y + blendedAmplitude (a y) (A y) (s y)) x (0, 1) ∧ + T < fderiv ℝ (fun y => h y - blendedAmplitude (a y) (A y) (s y)) x (0, 1) := by + let amp := fun y => blendedAmplitude (a y) (A y) (s y) + have hamp : ContDiff ℝ ∞ amp := blendedAmplitude_smooth ha hA hs + have hD : Continuous (fun x => fderiv ℝ amp x (0, 1)) := + ((hamp.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + obtain ⟨M, hM⟩ := hK.exists_bound_of_continuousOn hD.continuousOn + obtain ⟨h, hh, hhc, hhs, hhb, hhd⟩ := small_value_prescribed_derivative + hK hO hKO hP hPK hlocal (M + T + 1) hε + refine ⟨h, hh, hhc, hhs, hhb, ?_⟩ + intro x hx + have hb : |fderiv ℝ amp x (0, 1)| ≤ M := hM x hx + have hlow := (abs_le.mp hb).1 + have hupp := (abs_le.mp hb).2 + have hp := hhd x hx + have hd₁ := fderiv_fun_add (hh.differentiable (by simp) x) + (hamp.differentiable (by simp) x) + have hd₂ := fderiv_fun_sub (hh.differentiable (by simp) x) + (hamp.differentiable (by simp) x) + constructor + · change T < fderiv ℝ (fun y => h y + amp y) x (0, 1) + rw [hd₁, add_apply, hp] + linarith + · change T < fderiv ℝ (fun y => h y - amp y) x (0, 1) + rw [hd₂, sub_apply, hp] + linarith + +/-- Any subsequently chosen positive density retains the large spatial derivatives. -/ +theorem large_turns_after_reparametrization + {a A s h : Base → ℝ} {K U : Set Base} {T : ℝ} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hh : ContDiff ℝ ∞ h) + (hU : IsOpen U) (hKU : K ⊆ U) {ρ : Base × ℝ → ℝ} + (hρ : ContDiffOn ℝ ∞ ρ (U ×ˢ univ)) + (hpos : ∀ b ∈ U, ∀ t, 0 < ρ (b, t)) + (hper : ∀ b ∈ U, Function.Periodic (fun t => ρ (b, t)) 1) + (hmass : ∀ b ∈ U, (∫ t in 0..1, ρ (b, t)) = 1) + (hlarge : ∀ x ∈ K, + T < fderiv ℝ (fun y => h y + blendedAmplitude (a y) (A y) (s y)) x (0, 1) ∧ + T < fderiv ℝ (fun y => h y - blendedAmplitude (a y) (A y) (s y)) x (0, 1)) : + let F := fun z : Base × ℝ => unitAngle (a z.1) (A z.1) (s z.1) (h z.1) z.2 + ∀ x ∈ K, + T < fderiv ℝ (fun y => PositiveDensity.reparametrize ρ F (y, 0)) x (0, 1) ∧ + T < fderiv ℝ (fun y => PositiveDensity.reparametrize ρ F + (y, PositiveDensity.clock ρ x (1 / 2))) x (0, 1) := by + intro F x hx + obtain ⟨hd₁, hd₂⟩ := reparametrized_spatial_turns ha hA hs hh hU hρ hpos hper hmass + (hKU hx) (0, 1) + obtain ⟨h₁, h₂⟩ := hlarge x hx + rw [fderiv_fun_add (hh.differentiable (by simp) x) + ((blendedAmplitude_smooth ha hA hs).differentiable (by simp) x), add_apply] at h₁ + rw [fderiv_fun_sub (hh.differentiable (by simp) x) + ((blendedAmplitude_smooth ha hA hs).differentiable (by simp) x), sub_apply] at h₂ + exact ⟨hd₁.symm ▸ h₁, hd₂.symm ▸ h₂⟩ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SpatialLoopAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SpatialLoopAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bf21b8980067625360134a8bcb076e96845401d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SpatialLoopAmplitude.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanPolynomial + +namespace OAI + +/-! A prescribed spatial amplitude is independent of the varying immersion, +even though the coefficient calculus stores it as a function of the full jet. -/ + +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +/-- The position slots of an actual low jet. -/ +def lowJetPosition : LowJet →L[ℝ] Base := + ContinuousLinearMap.pi (fun i => ContinuousLinearMap.proj (.inl i)) + +@[simp] lemma lowJetPosition_apply (J : LowJet) (i : Fin 2) : + lowJetPosition J i = J (.inl i) := rfl + +@[simp] lemma lowJetPosition_lowJet (G : Base → Space) (p : Base) : + lowJetPosition (lowJet G p) = p := by + ext i + rfl + +@[simp] lemma lowJetPosition_variationLowJet (H : Base → Space) (p : Base) : + lowJetPosition (variationLowJet H p) = 0 := by + ext i + rfl + +/-- Store a fixed function of position in the existing low-jet coefficient API. -/ +def spatialAmplitude (a : Base → ℝ) : LowJet → ℝ := fun J => a (lowJetPosition J) + +lemma spatialAmplitude_smooth {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) : + ContDiff ℝ ∞ (spatialAmplitude a) := ha.comp lowJetPosition.contDiff + +@[simp] lemma spatialAmplitude_lowJet (a : Base → ℝ) (G : Base → Space) (p : Base) : + spatialAmplitude a (lowJet G p) = a p := by + simp only [spatialAmplitude,lowJetPosition_lowJet] + +/-- The spatial coefficient has zero derivative in every actual map-variation +direction: none of the position slots changes with the immersion. -/ +lemma spatialAmplitude_variation_zero {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (J : LowJet) (H : Base → Space) (p : Base) : + fderiv ℝ (spatialAmplitude a) J (variationLowJet H p) = 0 := by + change fderiv ℝ (a ∘ lowJetPosition) J (variationLowJet H p) = 0 + rw [fderiv_comp J (ha.differentiable (by simp) (lowJetPosition J)) + lowJetPosition.differentiableAt,ContinuousLinearMap.comp_apply, + ContinuousLinearMap.fderiv,lowJetPosition_variationLowJet,map_zero] + +end ClosedSurfaceR4.JetPolynomial + +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector + +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +/-- The given amplitude is fixed as a function of the base point, throughout +the whole open jet domain used for nearby immersions. -/ +def HasSpatialAmplitude (a : Base → ℝ) : Prop := + ∀ J ∈ O, l.amplitude J = a (lowJetPosition J) + +lemma amplitude_at_lowJet {a : Base → ℝ} (ha : l.HasSpatialAmplitude a) + (G : JetPolynomial.Base → JetPolynomial.Space) {p : JetPolynomial.Base} + (hp : lowJet G p ∈ O) : + l.amplitude (lowJet G p) = a p := by + simpa only [lowJetPosition_lowJet] using ha (lowJet G p) hp + +/-- In particular, changing the immersion does not change the primitive +amplitude at the same spatial point. -/ +lemma amplitude_independent_of_map {a : Base → ℝ} (ha : l.HasSpatialAmplitude a) + (G H : JetPolynomial.Base → JetPolynomial.Space) {p : JetPolynomial.Base} + (hG : lowJet G p ∈ O) (hH : lowJet H p ∈ O) : + l.amplitude (lowJet G p) = l.amplitude (lowJet H p) := + (l.amplitude_at_lowJet ha G hG).trans (l.amplitude_at_lowJet ha H hH).symm + +/-- Normalize the record field itself to the fixed spatial function while +preserving the same velocity loop and its proved geometric identities. -/ +def withSpatialAmplitude (a : Base → ℝ) (ha : ContDiff ℝ ∞ a) + (he : l.HasSpatialAmplitude a) : SurfaceVelocityFamily.Loop O where + amplitude := spatialAmplitude a + smoothAmplitude := (spatialAmplitude_smooth ha).contDiffOn + velocity := l.velocity + smoothVelocity := l.smoothVelocity + periodic := l.periodic + gram_ne := l.gram_ne + nonzero J hJ := by + rw [show spatialAmplitude a J = l.amplitude J from (he J hJ).symm] + exact l.nonzero J hJ + perpY := l.perpY + perpC := l.perpC + length J hJ t := by + rw [show spatialAmplitude a J = l.amplitude J from (he J hJ).symm] + exact l.length J hJ t + mean := l.mean + +@[simp] lemma withSpatialAmplitude_amplitude (a : Base → ℝ) (ha : ContDiff ℝ ∞ a) + (he : l.HasSpatialAmplitude a) (J : LowJet) : + (l.withSpatialAmplitude a ha he).amplitude J = a (lowJetPosition J) := rfl + +lemma withSpatialAmplitude_fixed (a : Base → ℝ) (ha : ContDiff ℝ ∞ a) + (he : l.HasSpatialAmplitude a) : (l.withSpatialAmplitude a ha he).HasSpatialAmplitude a := + fun _ _ => rfl + +/-- The existing mean-polynomial theorem with its primitive rank-one term +written as the prescribed spatial amplitude, uniformly for all nearby maps. -/ +theorem meanMetric_eq_spatial_polynomial {a : Base → ℝ} (ha : l.HasSpatialAmplitude a) + {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) (n : ℕ) (b c : Bool) + (U : ℕ → Family S Euclidean) + (hU : ∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) + (z : ℝ) {p : JetPolynomial.Base} (hp : p ∈ S) : + MetricPolynomial.meanMetric (l.geometry G hG hGO) (coordinateVector 0) U n b c z p = + inner ℝ + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) + + (if b && c then a p^2 else 0) + + Perturbation.eval (l.meanPolynomial n b c) z G (p,0) := by + rw [l.meanMetric_eq_polynomial hG hGO n b c U hU z hp, + l.amplitude_at_lowJet ha G (hGO hp)] + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedCrossingAdjustment.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedCrossingAdjustment.lean new file mode 100644 index 0000000000000000000000000000000000000000..60ed43bdac5dffce875d8382407d3e3a042706a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedCrossingAdjustment.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AdmissibleCrossingPath +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Localize a crossing-normal path by a smooth cutoff. The resulting +section stays smooth even where the first pure vector vanishes outside +the cutoff support. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem supported_crossing_adjustment {U W : Set E} (hU : IsOpen U) (hW : IsOpen W) + (hWU : W ⊆ U) {n p q m : E → Vec} {χ : E → ℝ} + (hn : ContDiffOn ℝ ∞ n U) (hp : ContDiffOn ℝ ∞ p W) + (hχ : ContDiff ℝ ∞ χ) (hχrange : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + (hχsupport : tsupport χ ⊆ W) (hnunit : ∀ x ∈ U, n x ⬝ᵥ n x = 1) + (hgeom : ∀ x ∈ W, n x ⬝ᵥ m x = 0 ∧ 0 < p x ⬝ᵥ m x ∧ + 0 < q x ⬝ᵥ m x ∧ 0 < p x ⬝ᵥ q x) : + let g := fun x => first (n x) (normalize (p x)) (χ x) + ContDiffOn ℝ ∞ g U ∧ + (∀ x ∈ U, g x ⬝ᵥ g x = 1) ∧ + (∀ x ∈ U, x ∉ tsupport χ → g x = n x) ∧ + (∀ x ∈ W, g x ≠ -normalize (p x) ∧ g x ≠ -normalize (q x)) ∧ + (∀ x ∈ W, χ x = 1 → 0 < p x ⬝ᵥ g x ∧ 0 < q x ⬝ᵥ g x) ∧ + (∀ x ∈ U, ∀ v : Vec, v ⬝ᵥ n x = 0 → v ⬝ᵥ p x = 0 → v ⬝ᵥ g x = 0) := by + dsimp only + have hzero (x : E) (hx : x ∉ tsupport χ) : χ x = 0 := by + by_contra he + exact hx (subset_tsupport χ (Function.mem_support.mpr he)) + have heq (x : E) (hxU : x ∈ U) (hx : x ∉ tsupport χ) : + first (n x) (normalize (p x)) (χ x) = n x := by + rw [hzero x hx,first_zero (hnunit x hxU)] + refine ⟨?_,?_,heq,?_,?_,?_⟩ + · intro x hxU + by_cases hxW : x ∈ W + · exact (crossing_normal_path_smoothAt + (hn.contDiffAt (hU.mem_nhds hxU)) (hp.contDiffAt (hW.mem_nhds hxW)) + hχ.contDiffAt (hnunit x hxU) (hgeom x hxW).1 (hgeom x hxW).2.1 + (hχrange x)).contDiffWithinAt + · have hx : x ∉ tsupport χ := fun h => hxW (hχsupport h) + apply ((hn.contDiffAt (hU.mem_nhds hxU)).congr_of_eventuallyEq ?_).contDiffWithinAt + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx,hU.mem_nhds hxU] with y hy hyU + simp only [Pi.zero_apply] at hy + rw [hy,first_zero (hnunit y hyU)] + · intro x hxU + by_cases hxW : x ∈ W + · exact (crossing_normal_path (hnunit x hxU) (hgeom x hxW).1 + (hgeom x hxW).2.1 (hgeom x hxW).2.2.1 (hχrange x)).1 + · rw [heq x hxU (fun h => hxW (hχsupport h))] + exact hnunit x hxU + · intro x hx + exact (crossing_normal_path (hnunit x (hWU hx)) (hgeom x hx).1 + (hgeom x hx).2.1 (hgeom x hx).2.2.1 (hχrange x)).2 + · intro x hx hχx + rw [hχx] + exact crossing_normal_path_endpoint (hgeom x hx).2.1 (hgeom x hx).2.2.2 + · intro x _ v hvn hvp + change v ⬝ᵥ normalize (blend (n x) (normalize (p x)) (χ x)) = 0 + apply dot_normalize_zero + simp only [blend,dotProduct_add,dotProduct_smul,smul_eq_mul,hvn, + show v ⬝ᵥ normalize (p x) = 0 from dot_normalize_zero hvp,mul_zero,add_zero] + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..d88d199110f1eb94f3880e0cbef0fb90f94c5d30 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveExpansion.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveTensorRemainder + +namespace OAI + +/-! The finite recursion supplies the same supported coefficients for the +actual primitive and its full tensor remainder. Both losses are fixed before +the differentiation order and before the slow map. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem supported_primitive_expansion {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hamp : l.HasSpatialAmplitude a) {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ C D : ℝ, 0 ≤ C ∧ 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G) + (_hGQ : MapsTo (lowJet G) S Q), + ∀ K : Set JetPolynomial.Base, IsClosed K → K ⊆ S → + (∀ p ∈ S, p ∉ K → ∀ t, l.velocity (lowJet G p,t) = normal (lowJet G p)) → + ∃ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) ∧ + (∀ i p, p ∉ K → (U i).val p = 0) ∧ + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) ∧ + U 0 = (l.geometry G _hG (fun _ hp => hQO (_hGQ hp))).initial ∧ + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m+(2*(n+1)+1)) B (lowJet G) → + WeightedBound S z m (C*z/s^loss) + (fun p => finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z p-JetVelocityCoordinates.toEuclidean (G p)) ∧ + WeightedBound S z m (D*z^(n+1)/s^loss) + (fun p => RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry p)- + l.meanTensorOperator n z G (planeCoordinateIsometry p)-![a p^2,0,0]) := by + obtain ⟨dc,hc⟩ := l.bounded_surface_correction (S := S) hQ hQO n ℓ + obtain ⟨de,he⟩ := l.uniform_primitive_metric_remainder (S := S) ha hamp hQ hQO n ℓ hℓx hℓy + refine ⟨max dc de,?_⟩ + intro m B hB + obtain ⟨C,hC,hcb⟩ := hc m B hB + obtain ⟨D,hD,heb⟩ := he m B hB + refine ⟨C,D,hC,hD,?_⟩ + intro G hG hGQ K hK hKS hv + obtain ⟨U,hinit,_,hU,hzero,hy,hcoeff,hrep,hbound⟩ := hcb G hG hGQ K hK hKS hv + refine ⟨U,hU,hzero,hrep,hinit,?_⟩ + intro s z hz hzs hs1 hb + have hs : 0 < s := hz.trans_le hzs + have hden (d : ℕ) (hd : d ≤ max dc de) : s^(max dc de) ≤ s^d := + pow_le_pow_of_le_one hs.le hs1 hd + constructor + · exact (hbound s z hz hzs hs1 (hb.mono_order (by omega))).mono_const + (div_le_div_of_nonneg_left (mul_nonneg hC hz.le) + (pow_pos hs _) (hden dc (le_max_left _ _))) + · exact (heb G hG hGQ s z hz hzs hs1 hb U hrep hU hinit hy hcoeff).mono_const + (div_le_div_of_nonneg_left (mul_nonneg hD (pow_nonneg hz.le _)) + (pow_pos hs _) (hden de (le_max_right _ _))) + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..93f3c8589d9cba4f0423328b669bc2a3990b3602 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitiveGeometry.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasImmersionGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.UniformMetricPhaseGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! The local primitive normal bound and exterior C2 proximity together +preserve immersion and a nonzero second form on the entire surface. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +lemma coordinateMap_eventuallyEq_at {F G : M → Space} {p : M} + (hFG : F =ᶠ[𝓝 p] G) (q : M) (hp : p ∈ (coordinateChart q).source) : + coordinateMap F q =ᶠ[𝓝 (coordinateChart q p)] coordinateMap G q := by + have ht : Tendsto (coordinateChart q).symm (𝓝 (coordinateChart q p)) (𝓝 p) := by + simpa only [(coordinateChart q).left_inv hp] using + ((coordinateChart q).continuousAt_symm ((coordinateChart q).map_source hp)).tendsto + filter_upwards [hFG.comp_tendsto ht] with x hx + change spaceCoordinates (F (coordinateInverse q x)) = spaceCoordinates (G (coordinateInverse q x)) + rw [← coordinateChart_symm_apply] + exact congrArg spaceCoordinates hx + +namespace FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation JetVelocityCoordinates SurfaceJetCoordinates SurfaceVelocityFamily.Loop +variable [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma planeRead_eventuallyEq_on_weight {F G : M → Space} {p : M} + (hFG : F =ᶠ[𝓝 p] G) (i : A.centers) (hp : p ∈ tsupport (A.weight i)) + (houter : ∀ x ∈ tsupport (A.weight i), A.outer i =ᶠ[𝓝 x] (fun _ => 1)) : + (spaceCoordinates ∘ A.vectorPlaneRead i F) =ᶠ[ + 𝓝 (planeCoordinateIsometry (chart (i : M) p))] + (spaceCoordinates ∘ A.vectorPlaneRead i G) := by + have he := coordinateMap_eventuallyEq_at hFG (i : M) + (by simpa [coordinateChart_source,chart] using A.weight_support i hp) + have hpoint : coordinateChart (i : M) p = planeCoordinateIsometry (chart (i : M) p) := by + rw [planeCoordinateIsometry_chart] + rfl + rw [hpoint] at he + exact (A.vectorPlaneRead_eventually_coordinateMap F i houter hp).trans + (he.trans (A.vectorPlaneRead_eventually_coordinateMap G i houter hp).symm) + +end SmoothingAtlas +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem supported_primitive_geometry (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (i : data.A.centers) : + ∃ ρ : ℝ, 0 < ρ ∧ + ∀ (G V : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ∀ b : ℝ, 0 ≤ b → b < ρ → + data.A.WeightedBound 1 2 b (G-F) → + (∀ p ∈ tsupport (data.A.weight i), + let H := primitiveNormalTriple (data.A.vectorChartRead i V) (chart (i : M) p) + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ realNormalPart (H 0) (H 1) (H 2) ≠ 0) → + (∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G) → + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) := by + obtain ⟨ρ,hρ,hnear⟩ := data.uniform_C2_geometry hF + refine ⟨ρ,hρ,?_⟩ + intro G V hG hV b hb hbρ hclose hnormal hexterior + obtain ⟨hImm,hgood,_⟩ := hnear G hG b hb hbρ hclose + apply data.A.geometry_of_chartwise_good hV data.outer_locally_one + intro p + by_cases hp : p ∈ tsupport (data.A.weight i) + · obtain ⟨hD,hN⟩ := hnormal p hp + have hh := good_phase_of_primitive_normal + (spaceCoordinates.contDiff.comp (data.A.vectorPlaneRead_smooth i hV)) + (chart (i : M) p) + (by rw [data.A.vectorChartRead_from_plane]; exact hD) + (by rw [data.A.vectorChartRead_from_plane]; exact hN) + exact ⟨i,hp,hh.1,dx,hh.2⟩ + · obtain ⟨j,hj⟩ : ∃ j : data.A.centers, data.A.weight j p ≠ 0 := by + by_contra! hzero + have hh := data.A.partition p + simp only [hzero,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hh + norm_num at hh + have hjp : p ∈ tsupport (data.A.weight j) := subset_tsupport _ hj + have hx : planeCoordinateIsometry (chart (j : M) p) ∈ + (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) := + ⟨chart (j : M) p,⟨p,hjp,rfl⟩,rfl⟩ + have he := data.A.planeRead_eventuallyEq_on_weight (hexterior p hp) j hjp + (data.outer_locally_one j) + refine ⟨j,hjp,?_,(data.Q j).ξ 0,?_⟩ + · rw [he.fderiv_eq] + exact hImm j _ hx + · rw [(realSecondTensor_eventuallyEq he).eq_of_nhds] + exact hgood j 0 _ hx + +end MetricGoodPhaseData +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitivePatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitivePatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5596533a25f0a4951e84aa4e3daeff358098ad9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SupportedPrimitivePatch.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveDomainWindow +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOuterGeometry + +namespace OAI + +/-! The constructed support and geometric domain of one actual primitive. +Every field is data or a local identity needed by the analytic realization. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry VelocityFrame +local instance patchFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance patchFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance patchDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance patchDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance patchSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance patchSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +structure SupportedPrimitivePatch (A : SmoothingAtlas M) (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (F : M → Space) (amp phi : M → ℝ) (D : Set M) where + phase_smooth : ContDiff ℝ ∞ e + inverse_smooth : ContDiff ℝ ∞ e.symm + outer : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1) + cover : (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source + cutoff : JetPolynomial.Base → ℝ + cutoff_smooth : ContDiff ℝ ∞ cutoff + cutoff_compact : HasCompactSupport cutoff + cutoff_source : tsupport cutoff ⊆ e.source + amplitude : SmallModes.Base → ℝ + amplitude_smooth : ContDiff ℝ ∞ amplitude + amplitude_nonneg : ∀ x, 0 ≤ amplitude x + amplitude_surface : ∀ p ∈ (surfacePhaseChart (i : M) e).source, + amplitude (surfacePhaseChart (i : M) e p) = amp p + amplitude_positive : ∀ x, 0 < amplitude x ↔ x ∈ (surfacePhaseChart (i : M) e) '' D + compactSet : Set JetPolynomial.Base + compact : IsCompact compactSet + target : compactSet ⊆ e.target + support : A.phaseSurfaceSupport i e compactSet = closure D + inverse_support : e.symm '' compactSet ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) + cutoff_one : ∀ x ∈ e.symm '' compactSet, cutoff x = 1 + amplitude_off : ∀ x ∉ compactSet, amplitude (baseEquiv x) = 0 + compact_active : ∀ x ∈ compactSet, A.chartWeight i (e.symm x) ≠ 0 + closed_coordinates : ∀ p ∈ closure D, e (chart (i : M) p) ∈ compactSet + source_closed : closure D ⊆ (surfacePhaseChart (i : M) e).source + active_closed : ∀ p ∈ closure D, A.weight i p ≠ 0 + window : TopologicalSpace.Opens JetPolynomial.Base + window_compact : IsCompact (closure (window : Set JetPolynomial.Base)) + phase_window : MapsTo e e.source window + support_window : compactSet ⊆ window + region : Set SmallModes.Base + region_compact : IsCompact region + window_region : baseEquiv '' closure (window : Set JetPolynomial.Base) ⊆ region + openRegion : Set SmallModes.Base + open_region : IsOpen openRegion + region_open : region ⊆ openRegion + normal : SmallModes.Base → NormalFrame.Vec + normal_smooth : ContDiffOn ℝ ∞ normal openRegion + immersion : ∀ x ∈ openRegion, Function.Injective (fderiv ℝ (A.phaseRealChartMap i e.symm F) x) + normal_properties : ∀ x ∈ openRegion, + coordDeriv dx (A.phaseRealChartMap i e.symm F) x ⬝ᵥ normal x = 0 ∧ + coordDeriv dy (A.phaseRealChartMap i e.symm F) x ⬝ᵥ normal x = 0 ∧ normal x ⬝ᵥ normal x = 1 + convexity : ∀ x ∈ openRegion, 0 < coordinateMetricHessian + (inducedCoordinateMetric (A.phaseRealChartMap i e.symm F)) Prod.fst x dy dy + boundary : ∀ x ∈ region, amplitude x = 0 → + realSecondForm (A.phaseRealChartMap i e.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (A.phaseRealChartMap i e.symm F) dy dy x) ≠ -normal x + tensor : A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e cutoff (fun q => ![(amplitude (baseEquiv q))^2,0,0]) y)) = + fun p => (amp p)^2 • SmoothingAtlas.phaseDifferentialSquare phi p + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem supported_primitive_patch (i : A.centers) {F : M → Space} + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) + (hcover : (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {D : Set M} (hDs : closure D ⊆ (surfacePhaseChart (i : M) e).source) + (hactive : ∀ p ∈ closure D, A.weight i p ≠ 0) + {amp phi : M → ℝ} (hamp : ContMDiff planeModel 𝓘(ℝ) ∞ amp) + (hamp0 : ∀ p, 0 ≤ amp p) (hamppos : ∀ p, 0 < amp p ↔ p ∈ D) + (hphi : ∀ p ∈ D, phi =ᶠ[𝓝 p] (fun q => (e (chart (i : M) q)) 0)) + {V U : Set SmallModes.Base} (hV : IsOpen V) (hVc : IsCompact (closure V)) + (hDV : (surfacePhaseChart (i : M) e) '' closure D ⊆ V) + (heV : MapsTo e e.source (baseEquiv ⁻¹' V)) + (hU : IsOpen U) (hVU : closure V ⊆ U) + {n : SmallModes.Base → NormalFrame.Vec} (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ x ∈ U, Function.Injective (fderiv ℝ (A.phaseRealChartMap i e.symm F) x)) + (hN : ∀ x ∈ U, coordDeriv dx (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n x = 0 ∧ + coordDeriv dy (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n x = 0 ∧ n x ⬝ᵥ n x = 1) + (hH : ∀ x ∈ U, 0 < coordinateMetricHessian + (inducedCoordinateMetric (A.phaseRealChartMap i e.symm F)) Prod.fst x dy dy) + (hb : ∀ x ∈ closure V \ (surfacePhaseChart (i : M) e) '' D, + realSecondForm (A.phaseRealChartMap i e.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (A.phaseRealChartMap i e.symm F) dy dy x) ≠ -n x) : + Nonempty (SupportedPrimitivePatch A i e F amp phi D) := by + obtain ⟨K,hK,hKt,hs,hKA,hDK,hKa,χ,hχ,hχc,hχs,hχone,a,ha,ha0,haf,hapos,haoff,htensor⟩ := + A.constructed_primitive_support i e he hi hDs hactive hamp hamp0 hamppos hphi + have hKS : K ⊆ (phaseWindow hV : Set JetPolynomial.Base) := by + apply A.phaseSupport_window i e hKt hKA hV + rwa [hs] + refine ⟨{ + phase_smooth := he, inverse_smooth := hi, + outer := houter, cover := hcover, cutoff := χ, cutoff_smooth := hχ, + cutoff_compact := hχc, cutoff_source := hχs, amplitude := a, amplitude_smooth := ha, + amplitude_nonneg := ha0, amplitude_surface := haf, amplitude_positive := hapos, + compactSet := K, compact := hK, target := hKt, support := hs, inverse_support := hKA, + cutoff_one := hχone, amplitude_off := haoff, compact_active := hKa, + closed_coordinates := hDK, source_closed := hDs, active_closed := hactive, + window := phaseWindow hV, window_compact := phaseWindow_compact hV hVc, + phase_window := heV, support_window := hKS, region := closure V, region_compact := hVc, + window_region := ?_, openRegion := U, open_region := hU, region_open := hVU, + normal := n, normal_smooth := hn, immersion := hI, normal_properties := hN, + convexity := hH, boundary := ?_, tensor := htensor }⟩ + · rw [phaseWindow_real_closure] + · intro x hx ha0x + apply hb x ⟨hx,?_⟩ + intro hin + have hp := (hapos x).mpr hin + rw [ha0x] at hp + exact lt_irrefl _ hp + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCircularThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCircularThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f12e091b04045125e68d42bc71a90ce62ffb71e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCircularThreshold.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualFixedFrameLoop +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCircularFamilyThreshold + +namespace OAI + +/-! Freeze the circular coefficient bounds on the original surface before +choosing its supported angle and its smaller jet neighborhood. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation + +def surfaceCircularProfile (F : Base → Vec) (a : Base → ℝ) + (e₁ e₂ : GeometricJet → Vec) (α : GeometricJet × ℝ → ℝ) : Base × ℝ → BoundaryProfile := + circularFamilyProfile + (fun x => coordDeriv dx F x - jetNormal (CollarVelocity.jetSection F x)) + (coordDeriv dx F) (coordDeriv dy F) (coordDeriv dy (coordDeriv dy F)) + (fun x => velocityRadius (jetNormal (CollarVelocity.jetSection F x)) (a x)) + (e₁ ∘ CollarVelocity.jetSection F) (e₂ ∘ CollarVelocity.jetSection F) + (fun z => α (CollarVelocity.jetSection F z.1,z.2)) dy + +theorem compact_surface_circular_threshold {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {U K : Set Base} {Ω : TopologicalSpace.Opens GeometricJet} + (hΩ : (Ω : Set GeometricJet) ⊆ supportedJetDomain U n a) + (hK : IsCompact K) (hKΩ : CollarVelocity.jetSection F '' K ⊆ Ω) + {e₁ e₂ : GeometricJet → Vec} (h₁ : ContDiffOn ℝ ∞ e₁ Ω) (h₂ : ContDiffOn ℝ ∞ e₂ Ω) + (hframe : ∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) : + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ H : ℝ, 0 ≤ H → ∃ Λ : ℝ, 0 < Λ ∧ + ∀ Z : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' K ⊆ Z → + (Z : Set GeometricJet) ⊆ Ω → + ∀ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) → + ∀ x ∈ K, ∀ t : ℝ, + let J := surfaceCircularProfile F a e₁ e₂ α (x,t) + J ∈ regularBoundaryProfiles ∧ + sLo ≤ profileCoefficients J 0 ∧ profileCoefficients J 0 ≤ sHi ∧ + |profileCoefficients J 1| ≤ D ∧ + (Λ < fderiv ℝ (fun z => α (CollarVelocity.jetSection F z.1,z.2)) (x,t) (dy,0) → + H+2 < |profileCoefficients J 2|) := by + let V : Set Base := CollarVelocity.jetSection F ⁻¹' Ω + have hσ := CollarVelocity.jetSection_smooth hF + have hV : IsOpen V := Ω.isOpen.preimage hσ.continuous + have hKV : K ⊆ V := fun x hx => hKΩ (mem_image_of_mem _ hx) + have hmaps : MapsTo (CollarVelocity.jetSection F) V Ω := fun _ hx => hx + have hD : ∀ x ∈ V, gramDet (coordDeriv dy F x) (coordDeriv dy (coordDeriv dy F) x) ≠ 0 := + fun x hx => preferredJetDomain_velocity_gram (hΩ hx).1 + have hv : ContDiffOn ℝ ∞ (fun x => jetNormal (CollarVelocity.jetSection F x)) V := + (jetNormal_smooth (fun j hj => preferredJetDomain_velocity_gram (hΩ hj).1)).comp hσ.contDiffOn hmaps + have hnonzero : ∀ x ∈ V, jetNormal (CollarVelocity.jetSection F x) ≠ 0 ∨ a x ≠ 0 := + fun _ hx => (hΩ hx).2 + have hR := velocityRadius_smoothOn hv ha.contDiffOn hnonzero + have hx := (contDiff_real_coordDeriv hF dx).contDiffOn (s := V) + have hy := (contDiff_real_coordDeriv hF dy).contDiffOn (s := V) + have hc := (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dy).contDiffOn (s := V) + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hbounds⟩ := compact_circular_family_threshold_local + hV hK hKV (hx.sub hv) hx hy hc hR + (h₁.comp hσ.contDiffOn hmaps) (h₂.comp hσ.contDiffOn hmaps) hD + (fun x hx => hframe (CollarVelocity.jetSection F x) hx) + (fun x hx => velocityRadius_pos (hnonzero x hx)) dy + refine ⟨sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro H hH + obtain ⟨Λ,hΛ,hbound⟩ := hbounds H hH + refine ⟨Λ,hΛ,?_⟩ + intro Z hKZ hZΩ α hα x hx t + let W : Set Base := CollarVelocity.jetSection F ⁻¹' Z + have hW : IsOpen W := Z.isOpen.preimage hσ.continuous + have hKW : K ⊆ W := fun x hx => hKZ (mem_image_of_mem _ hx) + have hWV : W ⊆ V := fun _ hx => hZΩ hx + have hα' : ContDiffOn ℝ ∞ (fun z : Base × ℝ => α (CollarVelocity.jetSection F z.1,z.2)) + (W ×ˢ univ) := + hα.comp ((hσ.comp contDiff_fst).prodMk contDiff_snd).contDiffOn (fun _ hz => ⟨hz.1,hz.2⟩) + exact hbound W hW hKW hWV _ hα' x hx t + +lemma surfaceCircularProfile_turn_iff {F n : Base → Vec} {a : Base → ℝ} + {U : Set Base} {Ω : Set GeometricJet} (hΩ : Ω ⊆ supportedJetDomain U n a) + {e₁ e₂ : GeometricJet → Vec} + (hframe : ∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) + (α : GeometricJet × ℝ → ℝ) {x : Base} (hx : CollarVelocity.jetSection F x ∈ Ω) (t : ℝ) : + profileCoefficients (surfaceCircularProfile F a e₁ e₂ α (x,t)) 3 = 0 ↔ + fderiv ℝ (fun z => α (CollarVelocity.jetSection F z.1,z.2)) (x,t) (0,1) = 0 := by + exact circularFamilyProfile_turn_iff _ _ _ _ _ _ _ _ _ _ _ + (preferredJetDomain_velocity_gram (hΩ hx).1) + (velocityRadius_pos (hΩ hx).2).ne' (hframe _ hx) + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCrossingExterior.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCrossingExterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..84256fb5505e6952d60903dd7c713e59303177fb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCrossingExterior.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCurvePairGeometry + +namespace OAI + +/-! Both intrinsic crossing invariants and positive normal pairings survive +on the exterior part of any compact set of mutual curve intersections. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c d : PhaseBoundaryCurve B) + +theorem exterior_crossing_preservation (A : SmoothingAtlas M) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (n : PreferredNormal F) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {K : Set M} (hK : IsCompact K) (hKc : K ⊆ c.carrier) (hKd : K ⊆ d.carrier) + (O : Set M) (hKO : K ⊆ closure O) + (hpositive : ∀ p ∈ K, 0 < c.second F p ⬝ᵥ spaceCoordinates (n.vector p) ∧ + 0 < d.second F p ⬝ᵥ spaceCoordinates (n.vector p)) + (hcross : ∀ p ∈ K, 0 < c.crossing d F p ∧ 0 < d.crossing c F p) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ∀ h : SmoothMetric M, IsSmoothIsometricImmersion M h W → + ∀ b a : ℝ, 0 ≤ b → 0 ≤ a → b+a < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 a (W-V) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ p ∈ K, + (0 < c.second W p ⬝ᵥ spaceCoordinates (A.unitProjectedNormalField W n.vector p) ∧ + 0 < d.second W p ⬝ᵥ spaceCoordinates (A.unitProjectedNormalField W n.vector p)) ∧ + 0 < c.crossing d W p ∧ 0 < d.crossing c W p := by + have : CompactSpace K := isCompact_iff_compactSpace.mp hK + let Q : K → JetPolynomial.Base := fun p => c.phase (chart (c.index : M) p) + have hQ : Continuous Q := ((chart (c.index : M)).trans c.phase).continuousOn.comp_continuous + continuous_subtype_val (fun p => c.source (hKc p.property)) + obtain ⟨S,hS,hQS,hSc,_⟩ := CollarVelocity.compact_open_thickening (isCompact_range hQ) + isOpen_univ (subset_univ _) + let P := phaseExteriorDomain (c.index : M) c.phase O + have hP := phaseExteriorDomain_properties (c.index : M) c.phase O + have hu : Continuous (fun p : K => d.directionIn c p) := + (d.directionIn_continuousOn c).comp_continuous continuous_subtype_val + (fun p => ⟨hKd p.property,hKc p.property⟩) + have hleft {h : SmoothMetric M} {W : M → Space} (hW : IsSmoothIsometricImmersion M h W) + (p : K) := c.second_eq W (hKc p.property) + have hright {h : SmoothMetric M} {W : M → Space} (hW : IsSmoothIsometricImmersion M h W) + (p : K) := d.second_in_chart c hW (hKd p.property) (hKc p.property) + have hrev {h : SmoothMetric M} {W : M → Space} (hW : IsSmoothIsometricImmersion M h W) + (p : K) := d.reverse_crossing_in_chart c hW (hKd p.property) (hKc p.property) + obtain ⟨ρ,hρ,hpres⟩ := A.compact_phase_exterior_crossing_preservation B hF.1 + (IsSmoothIsometricImmersion.mfderiv_injective hF) n houter c.index c.inverse_smooth hS hSc + continuous_subtype_val hQ O P (fun y hy => (hP y hy).1) (fun y hy => (hP y hy).2) + (fun p : K => hKO p.property) + (fun p : K => ⟨phaseExteriorDomain_closure (c.index : M) c.phase O + (c.source (hKc p.property)) (hKO p.property),hQS (mem_range_self p)⟩) + (fun p : K => B.phase_gram_at_source c.index c.phase c.smooth c.inverse_smooth hF + (c.source (hKc p.property)) (c.active p (hKc p.property))) + (v := fun _ => dy) (w := fun p : K => d.directionIn c p) continuous_const hu + (fun p : K => by + have hh := hpositive p p.property + rw [hleft hF p,hright hF p] at hh + exact hh) + (fun p : K => by + have hh := hcross p p.property + rw [hrev hF p] at hh + exact hh) + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV h hW b a hb ha hba hGF hWV hext p hp + have hh := hpres G V W hG hV hW.1 b a hb ha hba hGF hWV hext (⟨p,hp⟩ : K) + rw [hleft hW ⟨p,hp⟩,hright hW ⟨p,hp⟩,hrev hW ⟨p,hp⟩] + exact hh + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCurveCrossingLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCurveCrossingLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..01a89a94c469bc1f20e8565bb3df66b14c7805af --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceCurveCrossingLoop.lean @@ -0,0 +1,222 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualSurfaceCollarProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceFrozenCoefficients +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCurveCover +import OAI.Geometry.SurfaceImmersion.Primitive.ProfileCrossingChoice + +namespace OAI + +/-! One supported loop preserves a finite family of later curves. The +boundary collars are fixed before selecting the compact interior and the +large transverse derivative. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation CollarVelocity PhaseGeometry SurfaceJetCoordinates + +variable {ι : Type*} [Finite ι] + +theorem actual_supported_curve_crossing_loop {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + {K : ι → Set Base} (hK : ∀ i, IsCompact (K i)) (hKT : ∀ i, K i ⊆ T) + {P : Set Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ i, K i) \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ (⋃ i, K i) ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) + {E : Set Base} (hE : E.Finite) (hET : E ⊆ T) (haE : ∀ x ∈ E, 0 < a x) + (slopeBound : ℝ) (hSlope : 0 ≤ slopeBound) + {b c k : ι → Base → ℝ} + (hb : ∀ i, ContDiff ℝ ∞ (b i)) (hc : ∀ i, ContDiff ℝ ∞ (c i)) + (hk : ∀ i, ContDiff ℝ ∞ (k i)) + (hbc : ∀ i, ∀ x ∈ K i, b i x ≠ 0 ∨ c i x ≠ 0) + (B : ℝ) (hB : 0 ≤ B) (hkb : ∀ i, ∀ x ∈ K i, -B ≤ k i x) + (hold : ∀ i, ∀ x ∈ K i, a x = 0 → + 0 < ((coordDeriv dy (coordDeriv dx F) x ⬝ᵥ normalize (realSecondForm F dy dy x))*b i x + + Real.sqrt (realSecondForm F dy dy x ⬝ᵥ realSecondForm F dy dy x)*c i x)^2 + k i x*(b i x)^2) : + ∃ Z : TopologicalSpace.Opens GeometricJet, + jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ e₁ e₂ : GeometricJet → Vec, ∃ α : GeometricJet × ℝ → ℝ, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + (∀ x ∈ T, ∀ t : ℝ, surfaceCircularProfile F a e₁ e₂ α (x,t) ∈ regularBoundaryProfiles) ∧ + ∃ η : ℝ, 0 < η ∧ + (∀ z : ℝ, 0 < z → z < η → + ∀ i, ∀ x ∈ K i, ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α (x,t)‖ < η → + k i x ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + realSecondForm G (b i x,c i x) (b i x,c i x) p ≠ 0 ∧ + normalize (realSecondForm G (b i x,c i x) (b i x,c i x) p) ≠ + -profilePreferred (realBoundaryProfile G z p)) ∧ + ∀ z : ℝ, 0 < z → z < η → ∀ x ∈ E, ∀ t ∈ Icc (0 : ℝ) 1, + ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α (x,t)‖ < η → + ∀ κ : ℝ, + coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p = + κ*gramDet (coordDeriv dx G p) (coordDeriv dy G p) → + -B ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + ∀ r s : ℝ, |r| ≤ slopeBound → |s| ≤ slopeBound → + 0 < orderedCrossing G (1,r) (1,s) p κ ∧ + 0 < orderedCrossing G (1,s) (1,r) p κ ∧ + ((0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p) ∧ + 0 < realSecondForm G (1,s) (1,s) p ⬝ᵥ profilePreferred (realBoundaryProfile G z p)) ∨ + (0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ realSecondForm G (1,s) (1,s) p ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile G z p) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm G (1,r) (1,r) p ⬝ᵥ w ∧ + 0 < realSecondForm G (1,s) (1,s) p ⬝ᵥ w)) := by + classical + let _ := Fintype.ofFinite ι + obtain ⟨Ω,hTΩ,hΩ,e₁,e₂,h₁,h₂,hframe,hadapt,sLo,sHi,D,hsLo,hsHi,hD,hfamily⟩ := + actual_surface_collar_profile_family hF ha hT hU hTU hn hI hN hHess haT hboundary + obtain ⟨A,hA,hCA,hAe⟩ := hadapt + let C₀ : Set Base := {p ∈ T | a p = 0} + have hC : IsCompact C₀ := hT.inter_right (isClosed_eq ha.continuous continuous_const) + have hcol (i : ι) := surface_zero_amplitude_collar hF ha hΩ (hK i) + (fun _ hx => hTΩ (image_mono (hKT i) hx)) hC.isClosed (fun x hx => hx.2) h₁ h₂ hframe hA hCA + (fun j hj => (hAe j hj).2) (hb i).contDiffOn (hc i).contDiffOn (hk i).contDiffOn + (fun x hx => hold i x hx.1 hx.2.2) + choose W hW hCW ε hε hcollar using hcol + obtain ⟨δ,hδ,hδε⟩ := finite_positive_lower hε + obtain ⟨V,hV,hCV,hconstruct⟩ := hfamily δ hδ + let W₀ : Set Base := V ∩ ⋂ i, W i + have hW₀ : IsOpen W₀ := hV.inter (isOpen_iInter_of_finite hW) + have hCW₀ : C₀ ⊆ W₀ := fun x hx => ⟨hCV hx,mem_iInter.mpr (fun i => hCW i hx)⟩ + obtain ⟨V₀,hV₀,hCV₀,_,hV₀W⟩ := compact_open_thickening hC hW₀ hCW₀ + let L : Set Base := ⋃ i, K i + have hL : IsCompact L := isCompact_iUnion hK + have hLT : L ⊆ T := iUnion_subset hKT + let I : Set Base := (L \ V₀) ∪ E + have hIc : IsCompact I := (hL.diff hV₀).union hE.isCompact + have hIT : I ⊆ T := union_subset (fun _ hx => hLT hx.1) hET + have haI : ∀ x ∈ I, 0 < a x := by + intro x hx + rcases hx with hx | hx + · apply lt_of_le_of_ne (haT x (hLT hx.1)) + intro hz + exact hx.2 (hCV₀ ⟨hLT hx.1,hz.symm⟩) + · exact haE x hx + let P₀ := (P ∩ I) ∪ E + have hP₀ : P₀.Finite := (hP.inter_of_left I).union hE + have hP₀I : P₀ ⊆ I := union_subset inter_subset_right subset_union_right + have hlocalI : ∀ p ∈ I \ P₀, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ I ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0 := by + intro p hp + have hpE : p ∉ E := fun h => hp.2 (Or.inr h) + have hpL : p ∈ L := (hp.1.resolve_right hpE).1 + obtain ⟨N,hN,hpN,f,hf,hzero,hderiv⟩ := hlocal p ⟨hpL,fun h => hp.2 (Or.inl ⟨h,hp.1⟩)⟩ + refine ⟨N ∩ Eᶜ,hN.inter hE.isClosed.isOpen_compl,⟨hpN,hpE⟩,f,hf.mono inter_subset_left,?_,hderiv⟩ + intro x hx + have hxL := hx.1.resolve_right hx.2.2 + exact hzero x ⟨hxL.1,hx.2.1⟩ + let X (i : ι) := ↥(K i ×ˢ Icc (0 : ℝ) 1) + let (i : ι) : CompactSpace (X i) := isCompact_iff_compactSpace.mp ((hK i).prod isCompact_Icc) + let C (i : ι) : Set (X i) := {w | w.val.1 ∈ closure V₀} + let Q (i : ι) : Set (X i) := {w | w.val.1 ∉ V₀} + have hC' (i : ι) : IsClosed (C i) := isClosed_closure.preimage (continuous_fst.comp continuous_subtype_val) + have hQ' (i : ι) : IsClosed (Q i) := hV₀.isClosed_compl.preimage (continuous_fst.comp continuous_subtype_val) + have hcover (i : ι) : ∀ w : X i, w ∈ C i ∨ w ∈ Q i := by + intro w + by_cases h : w.val.1 ∈ V₀ + · exact Or.inl (subset_closure h) + · exact Or.inr h + have hthreshold (i : ι) := compact_actual_profile_curve_cover (hC' i) (hQ' i) (hcover i) + sLo B D hsLo hB hD + choose H hH htransfer using hthreshold + obtain ⟨Hbase,hHbase,hHHbase⟩ := finite_positive_upper H + let Y := ↥(E ×ˢ Icc (0 : ℝ) 1) + let : CompactSpace Y := isCompact_iff_compactSpace.mp (hE.isCompact.prod isCompact_Icc) + obtain ⟨Hcross,hHcross,hcross⟩ := compact_actual_profile_crossings (X := Y) + sLo sHi B D slopeBound hsLo hsHi hB hD hSlope + obtain ⟨Hnormal,hHnormal,hnormal⟩ := compact_actual_profile_crossing_choice (X := Y) + sLo sHi B D slopeBound hsLo hsHi hB hD hSlope + let H₀ := max Hbase (max Hcross Hnormal) + have hH₀ : 0 < H₀ := hHbase.trans_le (le_max_left _ _) + have hHH₀ (i : ι) : H i ≤ H₀ := (hHHbase i).trans (le_max_left _ _) + have hCrossH : Hcross ≤ H₀ := (le_max_left _ _).trans (le_max_right _ _) + have hNormalH : Hnormal ≤ H₀ := (le_max_right _ _).trans (le_max_right _ _) + obtain ⟨Z,hTZ,hZΩ,l,hamp,hzero,α,hα,hper,hvel,hsmall,hprofile,hturn⟩ := + hconstruct I P₀ hIc hIT haI hP₀ hP₀I hlocalI H₀ hH₀.le + have hgood (i : ι) : ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ w : X i, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α w.val‖ < η → + k i w.val.1 ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + realSecondForm G (b i w.val.1,c i w.val.1) (b i w.val.1,c i w.val.1) p ≠ 0 ∧ + normalize (realSecondForm G (b i w.val.1,c i w.val.1) (b i w.val.1,c i w.val.1) p) ≠ + -profilePreferred (realBoundaryProfile G z p) := by + let J : X i → BoundaryProfile := fun w => surfaceCircularProfile F a e₁ e₂ α w.val + have hJ : Continuous J := by + exact ((surfaceCircularProfile_smoothOn hF ha hΩ hZΩ h₁ h₂ hα).continuousOn.mono + (fun w hw => ⟨hTZ (mem_image_of_mem _ (hKT i hw.1)),mem_univ _⟩)).domRestrict + have hd (w : X i) := hprofile w.val.1 (hKT i w.property.1) w.val.2 + have hturn' : ∀ w ∈ Q i, profileCoefficients (J w) 3 = 0 → + H i+2 < |profileCoefficients (J w) 2| := by + intro w hw hz + have hh := hturn w.val.1 (Or.inl ⟨mem_iUnion.mpr ⟨i,w.property.1⟩,hw⟩) w.val.2 w.property.2 hz + linarith [hHH₀ i] + apply htransfer i J hJ (fun w => (hd w).1) (fun w => (hd w).2.1) + (fun w => (hd w).2.2.2) hturn' + (fun w => b i w.val.1) (fun w => c i w.val.1) (fun w => k i w.val.1) + ((hb i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + ((hc i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + ((hk i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + (fun w => hbc i w.val.1 w.property.1) (fun w => hkb i w.val.1 w.property.1) + intro w hw + have hWmem : w.val.1 ∈ W i := mem_iInter.mp (hV₀W hw).2 i + have hVmem : w.val.1 ∈ V := (hV₀W hw).1 + have hθ := (hsmall w.val.1 hVmem w.val.2).trans_le (hδε i) + obtain ⟨hS,hD'⟩ := surfaceCircularProfile_frozen_coefficients hF ha hΩ hZΩ h₁ h₂ hframe hα + (hTZ (mem_image_of_mem _ (hKT i w.property.1))) w.val.2 + change 0 < (profileCoefficients _ 1 * _ + profileCoefficients _ 0 * _)^2 + _ + rw [hS,hD'] + exact hcollar i w.val.1 ⟨w.property.1,hWmem⟩ _ hθ + choose η hη hgood' using hgood + obtain ⟨η₀,hη₀,hη₀η⟩ := finite_positive_lower hη + let J : Y → BoundaryProfile := fun w => surfaceCircularProfile F a e₁ e₂ α w.val + have hJ : Continuous J := + ((surfaceCircularProfile_smoothOn hF ha hΩ hZΩ h₁ h₂ hα).continuousOn.mono + (fun w hw => ⟨hTZ (mem_image_of_mem _ (hET hw.1)),mem_univ _⟩)).domRestrict + have hd (w : Y) := hprofile w.val.1 (hET w.property.1) w.val.2 + have ht (w : Y) (hz : profileCoefficients (J w) 3 = 0) := + hturn w.val.1 (Or.inr w.property.1) w.val.2 w.property.2 hz + obtain ⟨ηc,hηc,hcross'⟩ := hcross J hJ (fun w => (hd w).1) (fun w => (hd w).2.1) + (fun w => (hd w).2.2.1) (fun w => (hd w).2.2.2) + (fun w hz => lt_of_le_of_lt (add_le_add hCrossH le_rfl) (ht w hz)) + obtain ⟨ηn,hηn,hnormal'⟩ := hnormal J hJ (fun w => (hd w).1) (fun w => (hd w).2.1) + (fun w => (hd w).2.2.1) (fun w => (hd w).2.2.2) + (fun w hz => lt_of_le_of_lt (add_le_add hNormalH le_rfl) (ht w hz)) + let ηall := min η₀ (min ηc ηn) + have hηall : 0 < ηall := lt_min hη₀ (lt_min hηc hηn) + have hηcurve : ηall ≤ η₀ := min_le_left _ _ + have hηcross : ηall ≤ ηc := (min_le_right _ _).trans (min_le_left _ _) + have hηnormal : ηall ≤ ηn := (min_le_right _ _).trans (min_le_right _ _) + refine ⟨Z,hTZ,fun j hj => hΩ (hZΩ hj),l,hamp,hzero,e₁,e₂,α,h₁.mono hZΩ,h₂.mono hZΩ, + hα,hper,hvel,(fun x hx t => (hprofile x hx t).1),ηall,hηall,?_,?_⟩ + · intro z hz hzη i x hx t ht G hG p herr hcurv + exact hgood' i z hz (hzη.trans_le (hηcurve.trans (hη₀η i))) ⟨(x,t),hx,ht⟩ G hG p + (herr.trans_le (hηcurve.trans (hη₀η i))) hcurv + · intro z hz hzη x hx t ht G hG p herr κ hκ hcurv r s hr hs + obtain ⟨hleft,hright⟩ := hcross' z hz (hzη.trans_le hηcross) ⟨(x,t),hx,ht⟩ + G hG p (herr.trans_le hηcross) κ hκ hcurv r s hr hs + exact ⟨hleft,hright,hnormal' z hz (hzη.trans_le hηnormal) ⟨(x,t),hx,ht⟩ + G hG p (herr.trans_le hηnormal) hcurv r s hr hs⟩ + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceFiniteCurveLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceFiniteCurveLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2c994a2a7d67d0be4da6108576c6edef2d9bc33 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceFiniteCurveLoop.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualSurfaceCollarProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceFrozenCoefficients +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCurveCover + +namespace OAI + +/-! One supported loop preserves a finite family of later curves. The +boundary collars are fixed before selecting the compact interior and the +large transverse derivative. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation CollarVelocity PhaseGeometry SurfaceJetCoordinates + +variable {ι : Type*} [Finite ι] + +theorem actual_supported_finite_curve_loop {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + {K : ι → Set Base} (hK : ∀ i, IsCompact (K i)) (hKT : ∀ i, K i ⊆ T) + {P : Set Base} (hP : P.Finite) + (hlocal : ∀ p ∈ (⋃ i, K i) \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ (⋃ i, K i) ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) + {b c k : ι → Base → ℝ} + (hb : ∀ i, ContDiff ℝ ∞ (b i)) (hc : ∀ i, ContDiff ℝ ∞ (c i)) + (hk : ∀ i, ContDiff ℝ ∞ (k i)) + (hbc : ∀ i, ∀ x ∈ K i, b i x ≠ 0 ∨ c i x ≠ 0) + (B : ℝ) (hB : 0 ≤ B) (hkb : ∀ i, ∀ x ∈ K i, -B ≤ k i x) + (hold : ∀ i, ∀ x ∈ K i, a x = 0 → + 0 < ((coordDeriv dy (coordDeriv dx F) x ⬝ᵥ normalize (realSecondForm F dy dy x))*b i x + + Real.sqrt (realSecondForm F dy dy x ⬝ᵥ realSecondForm F dy dy x)*c i x)^2 + k i x*(b i x)^2) : + ∃ Z : TopologicalSpace.Opens GeometricJet, + jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ e₁ e₂ : GeometricJet → Vec, ∃ α : GeometricJet × ℝ → ℝ, + ContDiffOn ℝ ∞ e₁ Z ∧ ContDiffOn ℝ ∞ e₂ Z ∧ ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ i, ∀ x ∈ K i, ∀ t ∈ Icc (0 : ℝ) 1, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α (x,t)‖ < η → + k i x ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + realSecondForm G (b i x,c i x) (b i x,c i x) p ≠ 0 ∧ + normalize (realSecondForm G (b i x,c i x) (b i x,c i x) p) ≠ + -profilePreferred (realBoundaryProfile G z p) := by + classical + let _ := Fintype.ofFinite ι + obtain ⟨Ω,hTΩ,hΩ,e₁,e₂,h₁,h₂,hframe,hadapt,sLo,sHi,D,hsLo,_,hD,hfamily⟩ := + actual_surface_collar_profile_family hF ha hT hU hTU hn hI hN hHess haT hboundary + obtain ⟨A,hA,hCA,hAe⟩ := hadapt + let C₀ : Set Base := {p ∈ T | a p = 0} + have hC : IsCompact C₀ := hT.inter_right (isClosed_eq ha.continuous continuous_const) + have hcol (i : ι) := surface_zero_amplitude_collar hF ha hΩ (hK i) + (fun _ hx => hTΩ (image_mono (hKT i) hx)) hC.isClosed (fun x hx => hx.2) h₁ h₂ hframe hA hCA + (fun j hj => (hAe j hj).2) (hb i).contDiffOn (hc i).contDiffOn (hk i).contDiffOn + (fun x hx => hold i x hx.1 hx.2.2) + choose W hW hCW ε hε hcollar using hcol + obtain ⟨δ,hδ,hδε⟩ := finite_positive_lower hε + obtain ⟨V,hV,hCV,hconstruct⟩ := hfamily δ hδ + let W₀ : Set Base := V ∩ ⋂ i, W i + have hW₀ : IsOpen W₀ := hV.inter (isOpen_iInter_of_finite hW) + have hCW₀ : C₀ ⊆ W₀ := fun x hx => ⟨hCV hx,mem_iInter.mpr (fun i => hCW i hx)⟩ + obtain ⟨V₀,hV₀,hCV₀,_,hV₀W⟩ := compact_open_thickening hC hW₀ hCW₀ + let L : Set Base := ⋃ i, K i + have hL : IsCompact L := isCompact_iUnion hK + have hLT : L ⊆ T := iUnion_subset hKT + let I : Set Base := L \ V₀ + have hIc : IsCompact I := hL.diff hV₀ + have hIT : I ⊆ T := fun _ hx => hLT hx.1 + have haI : ∀ x ∈ I, 0 < a x := by + intro x hx + apply lt_of_le_of_ne (haT x (hIT hx)) + intro hz + exact hx.2 (hCV₀ ⟨hIT hx,hz.symm⟩) + let P₀ := P ∩ I + have hP₀ : P₀.Finite := hP.inter_of_left I + have hlocalI : ∀ p ∈ I \ P₀, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ I ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0 := by + intro p hp + obtain ⟨N,hN,hpN,f,hf,hzero,hderiv⟩ := hlocal p ⟨hp.1.1,fun h => hp.2 ⟨h,hp.1⟩⟩ + exact ⟨N,hN,hpN,f,hf,fun x hx => hzero x ⟨hx.1.1,hx.2⟩,hderiv⟩ + let X (i : ι) := ↥(K i ×ˢ Icc (0 : ℝ) 1) + let (i : ι) : CompactSpace (X i) := isCompact_iff_compactSpace.mp ((hK i).prod isCompact_Icc) + let C (i : ι) : Set (X i) := {w | w.val.1 ∈ closure V₀} + let Q (i : ι) : Set (X i) := {w | w.val.1 ∉ V₀} + have hC' (i : ι) : IsClosed (C i) := isClosed_closure.preimage (continuous_fst.comp continuous_subtype_val) + have hQ' (i : ι) : IsClosed (Q i) := hV₀.isClosed_compl.preimage (continuous_fst.comp continuous_subtype_val) + have hcover (i : ι) : ∀ w : X i, w ∈ C i ∨ w ∈ Q i := by + intro w + by_cases h : w.val.1 ∈ V₀ + · exact Or.inl (subset_closure h) + · exact Or.inr h + have hthreshold (i : ι) := compact_actual_profile_curve_cover (hC' i) (hQ' i) (hcover i) + sLo B D hsLo hB hD + choose H hH htransfer using hthreshold + obtain ⟨H₀,hH₀,hHH₀⟩ := finite_positive_upper H + obtain ⟨Z,hTZ,hZΩ,l,hamp,hzero,α,hα,hper,hvel,hsmall,hprofile,hturn⟩ := + hconstruct I P₀ hIc hIT haI hP₀ inter_subset_right hlocalI H₀ hH₀.le + have hgood (i : ι) : ∃ η : ℝ, 0 < η ∧ ∀ z : ℝ, 0 < z → z < η → + ∀ w : X i, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ p : Base, + ‖realBoundaryProfile G z p-surfaceCircularProfile F a e₁ e₂ α w.val‖ < η → + k i w.val.1 ≤ coordinateGauss (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) p → + realSecondForm G (b i w.val.1,c i w.val.1) (b i w.val.1,c i w.val.1) p ≠ 0 ∧ + normalize (realSecondForm G (b i w.val.1,c i w.val.1) (b i w.val.1,c i w.val.1) p) ≠ + -profilePreferred (realBoundaryProfile G z p) := by + let J : X i → BoundaryProfile := fun w => surfaceCircularProfile F a e₁ e₂ α w.val + have hJ : Continuous J := by + exact ((surfaceCircularProfile_smoothOn hF ha hΩ hZΩ h₁ h₂ hα).continuousOn.mono + (fun w hw => ⟨hTZ (mem_image_of_mem _ (hKT i hw.1)),mem_univ _⟩)).domRestrict + have hd (w : X i) := hprofile w.val.1 (hKT i w.property.1) w.val.2 + have hturn' : ∀ w ∈ Q i, profileCoefficients (J w) 3 = 0 → + H i+2 < |profileCoefficients (J w) 2| := by + intro w hw hz + have hh := hturn w.val.1 ⟨mem_iUnion.mpr ⟨i,w.property.1⟩,hw⟩ w.val.2 w.property.2 hz + linarith [hHH₀ i] + apply htransfer i J hJ (fun w => (hd w).1) (fun w => (hd w).2.1) + (fun w => (hd w).2.2.2) hturn' + (fun w => b i w.val.1) (fun w => c i w.val.1) (fun w => k i w.val.1) + ((hb i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + ((hc i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + ((hk i).continuous.comp (continuous_fst.comp continuous_subtype_val)) + (fun w => hbc i w.val.1 w.property.1) (fun w => hkb i w.val.1 w.property.1) + intro w hw + have hWmem : w.val.1 ∈ W i := mem_iInter.mp (hV₀W hw).2 i + have hVmem : w.val.1 ∈ V := (hV₀W hw).1 + have hθ := (hsmall w.val.1 hVmem w.val.2).trans_le (hδε i) + obtain ⟨hS,hD'⟩ := surfaceCircularProfile_frozen_coefficients hF ha hΩ hZΩ h₁ h₂ hframe hα + (hTZ (mem_image_of_mem _ (hKT i w.property.1))) w.val.2 + change 0 < (profileCoefficients _ 1 * _ + profileCoefficients _ 0 * _)^2 + _ + rw [hS,hD'] + exact hcollar i w.val.1 ⟨w.property.1,hWmem⟩ _ hθ + choose η hη hgood' using hgood + obtain ⟨η₀,hη₀,hη₀η⟩ := finite_positive_lower hη + refine ⟨Z,hTZ,fun j hj => hΩ (hZΩ hj),l,hamp,hzero,e₁,e₂,α,h₁.mono hZΩ,h₂.mono hZΩ, + hα,hper,hvel,η₀,hη₀,?_⟩ + intro z hz hzη i x hx t ht G hG p herr hcurv + exact hgood' i z hz (hzη.trans_le (hη₀η i)) ⟨(x,t),hx,ht⟩ G hG p + (herr.trans_le (hη₀η i)) hcurv + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfacePrimitiveError.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfacePrimitiveError.lean new file mode 100644 index 0000000000000000000000000000000000000000..86d2deffa2890be9d1b3cd4f5a1a49fca3abf913 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfacePrimitiveError.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SpatialLoopAmplitude + +namespace OAI + +/-! The finite primitive's actual metric error is the sum of its solved mean +error and the fast finite tail. The prescribed amplitude is fixed in position. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector +open WeightedEstimates + +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +def meanOperator (n : ℕ) (b c : Bool) (z : ℝ) (G : JetPolynomial.Base → JetPolynomial.Space) (p : Base) : ℝ := + inner ℝ + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) + + Perturbation.eval (l.meanPolynomial n b c) z G (p,0) + +lemma meanOperator_smooth {S : TopologicalSpace.Opens Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) (hGO : MapsTo (lowJet G) S O) + (n : ℕ) (b c : Bool) (z : ℝ) : ContDiffOn ℝ ∞ (l.meanOperator n b c z G) S := by + have hF := JetVelocityCoordinates.toEuclidean.contDiff.comp hG + have hd := hF.fderiv_right (m := ∞) (by simp) + apply ((hd.clm_apply contDiff_const).inner ℝ (hd.clm_apply contDiff_const)).contDiffOn.add + have he := Perturbation.eval_smooth (fun r => l.meanPolynomial_smooth n b c r) z hG hGO + exact he.comp (contDiff_id.prodMk contDiff_const).contDiffOn (fun p hp => ⟨hp,mem_univ _⟩) + +lemma meanMetric_eq_meanOperator {a : Base → ℝ} (ha : l.HasSpatialAmplitude a) + {S : TopologicalSpace.Opens Base} {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) (n : ℕ) (b c : Bool) (z : ℝ) + (U : ℕ → Family S Euclidean) + (hU : ∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) + {p : Base} (hp : p ∈ S) : + MetricPolynomial.meanMetric (l.geometry G hG hGO) (coordinateVector 0) U n b c z p = + l.meanOperator n b c z G p+(if b && c then a p^2 else 0) := by + rw [l.meanMetric_eq_spatial_polynomial ha hG hGO n b c U hU z hp] + unfold meanOperator + ring + +/-- A solved mean equation controls the actual primitive metric at every +finite weighted order. The tail loss is chosen before the order or slow map. -/ +theorem compact_primitive_error {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hamp : l.HasSpatialAmplitude a) {S : TopologicalSpace.Opens Base} + {K : Set LowJet} (hK : IsCompact K) (hKO : K ⊆ O) + (n : ℕ) (b c : Bool) (ℓ : Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ d : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) (hGK : MapsTo (lowJet G) S K) + (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m+(2*(n+1)+1)) B (lowJet G) → + let g := l.geometry G hG (fun _ hp => hKO (hGK hp)) + ∀ U : ℕ → Family S Euclidean, + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = g.initial → (g.yyCoefficient U 1).fluct = 0 → + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.yyCoefficient U (r+1)).fluct = 0) → + ∀ (H : Base → ℝ), ContDiffOn ℝ ∞ H S → ∀ E : ℝ, + WeightedBound S s m E (l.meanOperator n b c z G-H) → + WeightedBound S z m (D*z^(n+1)/s^d+E) + (fun p => inner ℝ + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) - + (H p+(if b && c then a p^2 else 0))) := by + obtain ⟨d,hd⟩ := l.compact_surface_metric_error (S := S) hK hKO n b c ℓ hℓx hℓy + refine ⟨d,?_⟩ + intro m B hB + obtain ⟨D,hD,hbound⟩ := hd m B hB + refine ⟨D,hD,?_⟩ + intro G hG hGK s z hz hzs hs1 hGb g U hU hinit hy hc H hH E hErr + have hGO : MapsTo (lowJet G) S O := fun _ hp => hKO (hGK hp) + have htail := hbound G hG hGK s z hz hzs hs1 hGb U hU hinit hy hc + have hbase : ContDiffOn ℝ ∞ (fun q => JetVelocityCoordinates.toEuclidean (G q)) S := + (JetVelocityCoordinates.toEuclidean.contDiff.comp hG).contDiffOn + have hfinite := finiteAnsatz_smooth hbase U ℓ (n+1) z + have hfd := hfinite.fderiv_of_isOpen S.isOpen (m := ∞) (by simp) + have hmetric : ContDiffOn ℝ ∞ (fun p => inner ℝ + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c))) S := + (hfd.clm_apply contDiffOn_const).inner ℝ (hfd.clm_apply contDiffOn_const) + have hmean := l.meanOperator_smooth hG hGO n b c z + have hAmp : ContDiffOn ℝ ∞ (fun p => if b && c then a p^2 else 0) S := by + split_ifs + · exact (ha.pow 2).contDiffOn + · exact contDiffOn_const + have hMeanMetric : ContDiffOn ℝ ∞ + (MetricPolynomial.meanMetric g (coordinateVector 0) U n b c z) S := by + apply (hmean.add hAmp).congr + intro p hp + exact l.meanMetric_eq_meanOperator hamp hG hGO n b c z U hU hp + have hsErr := hErr.shrink_scale hz.le hzs + have hb := htail.add S.isOpen.uniqueDiffOn hz.le (hmetric.sub hMeanMetric) + (hmean.sub hH) hsErr + apply hb.congr + intro p hp + dsimp only [g] + rw [l.meanMetric_eq_meanOperator hamp hG hGO n b c z U hU hp] + ring + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..d83563ddbb55e519cc41d6f53cd63816b47bfc89 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityFamily.lean @@ -0,0 +1,144 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.JetVelocityCoordinates +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionInit + +namespace OAI + +/-! Convert a geometric second-jet velocity loop into the exact family of +Euclidean data used by the supported finite periodic recursion. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates CovarianceCorrector +open LocalPeriodicExpansion LocalPeriodicCalculus +local notation "ι" => JetVelocityCoordinates.toEuclidean + +def normal (J : LowJet) : RVec 4 := realNormalPart (slot 2 J) (slot 6 J) (slot 1 J) +def tangent (J : LowJet) : RVec 4 := slot 1 J - normal J + +/-- The actual geometric hypotheses on the second-jet neighborhood. The +first and second derivatives are fixed coordinate projections of that jet. -/ +structure Loop (O : TopologicalSpace.Opens LowJet) where + amplitude : LowJet → ℝ + smoothAmplitude : ContDiffOn ℝ ∞ amplitude O + velocity : LowJet × ℝ → RVec 4 + smoothVelocity : ContDiffOn ℝ ∞ velocity (O ×ˢ univ) + periodic : ∀ J ∈ O, Function.Periodic (fun t => velocity (J, t)) 1 + gram_ne : ∀ J ∈ O, NormalFrame.gramDet (slot 2 J) (slot 6 J) ≠ 0 + nonzero : ∀ J ∈ O, normal J ≠ 0 ∨ amplitude J ≠ 0 + perpY : ∀ J ∈ O, ∀ t, slot 2 J ⬝ᵥ velocity (J, t) = 0 + perpC : ∀ J ∈ O, ∀ t, slot 6 J ⬝ᵥ velocity (J, t) = 0 + length : ∀ J ∈ O, ∀ t, velocity (J, t) ⬝ᵥ velocity (J, t) = + normal J ⬝ᵥ normal J + amplitude J ^ 2 + mean : ∀ J ∈ O, (∫ t in 0..1, velocity (J, t)) = normal J + +namespace Loop +variable {O : TopologicalSpace.Opens LowJet} (l : Loop O) + +include l in +lemma smoothNormal : ContDiffOn ℝ ∞ normal O := by + intro J hJ + exact (contDiffAt_realNormalPart (slot_smooth 2).contDiffAt + (slot_smooth 6).contDiffAt (slot_smooth 1).contDiffAt (l.gram_ne J hJ)).contDiffWithinAt + +include l in +lemma smoothTangent : ContDiffOn ℝ ∞ tangent O := (slot_smooth 1).contDiffOn.sub l.smoothNormal + +def q (J : LowJet) : ℝ := normal J ⬝ᵥ normal J + l.amplitude J ^ 2 + +lemma smoothQ : ContDiffOn ℝ ∞ l.q O := + (VelocityFrame.dot_smoothOn l.smoothNormal l.smoothNormal).add (l.smoothAmplitude.pow 2) + +lemma q_pos {J : LowJet} (hJ : J ∈ O) : 0 < l.q J := by + exact Real.sqrt_pos.mp (VelocityFrame.velocityRadius_pos (l.nonzero J hJ)) + +def euclideanVelocity : LowJet → C(Period, Euclidean) := + bundleOn (fun z => ι (l.velocity z)) O O.isOpen + (JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn l.smoothVelocity) + (fun J hJ t => congrArg ι (l.periodic J hJ t)) + +lemma euclideanVelocity_apply {J : LowJet} (hJ : J ∈ O) (t : ℝ) : + l.euclideanVelocity J (t : Period) = ι (l.velocity (J, t)) := + bundleOn_apply _ _ _ _ _ hJ t + +lemma euclideanVelocity_smooth : + ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => l.euclideanVelocity z.1 (z.2 : Period)) + (O ×ˢ univ) := bundleOn_smooth _ _ _ _ _ + +lemma euclideanVelocity_mean {J : LowJet} (hJ : J ∈ O) : + average (l.euclideanVelocity J) = ι (normal J) := by + rw [average, ← PeriodicPrimitive.integral_lift_eq_haar] + simp only [l.euclideanVelocity_apply hJ] + have hi : IntervalIntegrable (fun t => l.velocity (J, t)) MeasureTheory.volume 0 1 := + (smooth_slice O.isOpen l.smoothVelocity hJ).continuous.intervalIntegrable 0 1 + exact (JetVelocityCoordinates.toEuclidean.toContinuousLinearMap.intervalIntegral_comp_comm hi).trans + (congrArg ι (l.mean J hJ)) + +lemma euclideanVelocity_length {J : LowJet} (hJ : J ∈ O) (t : Period) : + inner ℝ (l.euclideanVelocity J t) (l.euclideanVelocity J t) = l.q J := by + refine Quotient.inductionOn' t ?_ + intro t + rw [l.euclideanVelocity_apply hJ, inner_toEuclidean] + exact l.length J hJ t + +def plane (J : LowJet) : Submodule ℝ Euclidean := + LinearMap.ker (innerSL ℝ (ι (slot 2 J))).toLinearMap ⊓ + LinearMap.ker (innerSL ℝ (ι (slot 6 J))).toLinearMap + +lemma mem_plane {J : LowJet} {w : Euclidean} : + w ∈ plane J ↔ inner ℝ (ι (slot 2 J)) w = 0 ∧ + inner ℝ (ι (slot 6 J)) w = 0 := Iff.rfl + +lemma tangent_perp {J : LowJet} {w : Euclidean} (hw : w ∈ plane J) : + inner ℝ (ι (tangent J)) w = 0 := by + obtain ⟨hy, hc⟩ := mem_plane.mp hw + have hw' : ι (JetVelocityCoordinates.toEuclidean.symm w) = w := JetVelocityCoordinates.toEuclidean.apply_symm_apply w + rw [← hw', inner_toEuclidean] at hy hc ⊢ + exact tangential_part_perp _ _ _ _ hy hc + +/-- Pulling back through the actual second jet supplies the differentiated +constraint `Y_y=C`, rather than adding that constraint as a new input. -/ +def geometry {S : TopologicalSpace.Opens JetPolynomial.Base} + (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) : Geometry (E := Euclidean) S (coordinateVector 1) where + plane p := plane (lowJet G p) + Y p := ι (slot 2 (lowJet G p)) + C p := ι (slot 6 (lowJet G p)) + X₀ p := ι (tangent (lowJet G p)) + smoothY := (JetVelocityCoordinates.toEuclidean.contDiff.comp ((slot_smooth 2).comp (lowJet_smooth hG))).contDiffOn + smoothC := (JetVelocityCoordinates.toEuclidean.contDiff.comp ((slot_smooth 6).comp (lowJet_smooth hG))).contDiffOn + smoothX₀ := JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn + (l.smoothTangent.comp (lowJet_smooth hG).contDiffOn hGO) + derivativeY p _ := euclidean_y_derivative hG p + gram_ne p hp := by rw [gram_toEuclidean]; exact l.gram_ne _ (hGO hp) + perpY _ _ _ hw := (mem_plane.mp hw).1 + perpC _ _ _ hw := (mem_plane.mp hw).2 + perpX₀ _ _ _ hw := tangent_perp hw + V := Family.ofLocal (fun p => l.euclideanVelocity (lowJet G p)) + (l.euclideanVelocity_smooth.comp + ((lowJet_smooth hG).contDiffOn.comp contDiffOn_fst (fun z _ => mem_univ z.1) + |>.prodMk contDiffOn_snd) (fun z hz => ⟨hGO hz.1, mem_univ z.2⟩)) + V_mem p hp t := by + rw [Family.ofLocal_apply _ _ hp] + refine Quotient.inductionOn' t ?_ + intro t + rw [l.euclideanVelocity_apply (hGO hp)] + apply mem_plane.mpr + constructor + · rw [inner_toEuclidean]; exact l.perpY _ (hGO hp) t + · rw [inner_toEuclidean]; exact l.perpC _ (hGO hp) t + q p := l.q (lowJet G p) + smoothq := l.smoothQ.comp (lowJet_smooth hG).contDiffOn hGO + q_pos _ hp := l.q_pos (hGO hp) + circle p hp t := by + rw [Family.ofLocal_apply _ _ hp] + exact l.euclideanVelocity_length (hGO hp) t + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityIdentities.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityIdentities.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b67a14cfbca5a4ca29d2aa0573ccf84ceddc28a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/SurfaceVelocityIdentities.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityFamily + +namespace OAI + +/-! The leading metric and support of the actual second-jet family. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates CovarianceCorrector +open LocalPeriodicExpansion +local notation "ι" => JetVelocityCoordinates.toEuclidean + +lemma first_slot {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (i : Fin 2) (p : JetPolynomial.Base) : + slot (![1, 2] i) (lowJet G p) = fderiv ℝ G p (coordinateVector i) := by + funext a + have he := congrArg (fun L : JetPolynomial.Base →L[ℝ] ℝ => L (coordinateVector i)) + (fderiv_apply (hG.differentiable (by simp) p) a) + calc + _ = fderiv ℝ (fun q => G q a) p (coordinateVector i) := by fin_cases i <;> rfl + _ = _ := he + +lemma euclidean_first_derivative {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (i : Fin 2) (p : JetPolynomial.Base) : + fderiv ℝ (fun q => ι (G q)) p (coordinateVector i) = + ι (slot (![1, 2] i) (lowJet G p)) := by + have hd := (JetVelocityCoordinates.toEuclidean.hasFDerivAt.comp p + (hG.differentiable (by simp) p).hasFDerivAt).fderiv + calc + _ = ι (fderiv ℝ G p (coordinateVector i)) := + congrArg (fun L : JetPolynomial.Base →L[ℝ] Euclidean => L (coordinateVector i)) hd + _ = _ := congrArg ι (first_slot hG i p).symm + +namespace Loop +variable {O : TopologicalSpace.Opens LowJet} (l : Loop O) + +lemma leading_xx {J : LowJet} (hJ : J ∈ O) : + inner ℝ (ι (tangent J)) (ι (tangent J)) + l.q J = + inner ℝ (ι (slot 1 J)) (ι (slot 1 J)) + l.amplitude J ^ 2 := by + have hp := realNormalPart_perp (slot 2 J) (slot 6 J) (slot 1 J) (l.gram_ne J hJ) + have ht : tangent J ⬝ᵥ normal J = 0 := tangential_part_perp _ _ _ _ hp.1 hp.2 + have hx : slot 1 J = tangent J + normal J := by dsimp [tangent]; abel + simp only [inner_toEuclidean, q] + conv_rhs => rw [hx] + simp only [add_dotProduct, dotProduct_add, ht, dotProduct_comm (normal J) (tangent J)] + ring + +include l in +lemma leading_xy {J : LowJet} (hJ : J ∈ O) : + inner ℝ (ι (tangent J)) (ι (slot 2 J)) = + inner ℝ (ι (slot 1 J)) (ι (slot 2 J)) := by + have hp := realNormalPart_perp (slot 2 J) (slot 6 J) (slot 1 J) (l.gram_ne J hJ) + simp only [inner_toEuclidean, tangent, sub_dotProduct] + rw [dotProduct_comm (normal J) (slot 2 J), show slot 2 J ⬝ᵥ normal J = 0 from hp.1, sub_zero] + +variable {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) + +lemma geometry_velocity {p : JetPolynomial.Base} (hp : p ∈ S) : + (l.geometry G hG hGO).V.val p = l.euclideanVelocity (lowJet G p) := by + apply ContinuousMap.ext + intro t + change (Family.ofLocal (fun q => l.euclideanVelocity (lowJet G q)) _).val p t = _ + exact Family.ofLocal_apply _ _ hp t + +lemma geometry_mean {p : JetPolynomial.Base} (hp : p ∈ S) : + average ((l.geometry G hG hGO).V.val p) = ι (normal (lowJet G p)) := by + rw [l.geometry_velocity hG hGO hp] + exact l.euclideanVelocity_mean (hGO hp) + +lemma geometry_dx {p : JetPolynomial.Base} (hp : p ∈ S) : + fderiv ℝ (fun q => ι (G q)) p (coordinateVector 0) = + (l.geometry G hG hGO).X₀ p + average ((l.geometry G hG hGO).V.val p) := by + rw [euclidean_first_derivative hG, l.geometry_mean hG hGO hp] + change ι (slot 1 (lowJet G p)) = ι (tangent (lowJet G p)) + ι (normal (lowJet G p)) + rw [← map_add] + congr 1 + dsimp [tangent] + abel + +lemma geometry_dy (p : JetPolynomial.Base) : + fderiv ℝ (fun q => ι (G q)) p (coordinateVector 1) = (l.geometry G hG hGO).Y p := + euclidean_first_derivative hG 1 p + +lemma geometry_initial_zero {p : JetPolynomial.Base} (hp : p ∈ S) + (hz : ∀ t, l.velocity (lowJet G p, t) = normal (lowJet G p)) : + (l.geometry G hG hGO).initial.val p = 0 := by + apply Family.primitive_zero_at _ _ hp + apply ContinuousMap.ext + intro t + rw [Family.sub_apply, Family.vectorMean_apply, l.geometry_mean hG hGO hp, + l.geometry_velocity hG hGO hp] + refine Quotient.inductionOn' t ?_ + intro t + rw [l.euclideanVelocity_apply (hGO hp), hz, sub_self] + rfl + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/TransverseCircularRadii.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/TransverseCircularRadii.lean new file mode 100644 index 0000000000000000000000000000000000000000..b53c5ba6ca9191baa4669a48a539c61546c31ca4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/TransverseCircularRadii.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.GenericCircularRadii +import OAI.Geometry.SurfaceImmersion.Primitive.CircularRadiusCovectors + +namespace OAI + +/-! Generic radii give transverse actual coordinate circles, not merely +regular levels of their auxiliary global extensions. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry PublishedInputs +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {ι : Type*} [Fintype ι] [DecidableEq ι] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exists_transverse_circular_radii + (index : ι → A.centers) (r0 lo hi : ι → ℝ) + (hlo : ∀ i, 0 < lo i) (hlohi : ∀ i, lo i < hi i) (hhi : ∀ i, hi i < r0 i) + (hpos : ∀ i p, 0 < A.weight (index i) p ↔ p ∈ circularCoordinateDisk (index i : M) (r0 i)) : + ∃ r : ι → ℝ, (∀ i, lo i < r i ∧ r i < hi i) ∧ + (∀ i j, i ≠ j → (circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j)).Finite) ∧ + (∀ i j k, i ≠ j → i ≠ k → j ≠ k → + circularBoundary (index i : M) (r i) ∩ circularBoundary (index j : M) (r j) ∩ + circularBoundary (index k : M) (r k) = ∅) ∧ + (∀ i j, i ≠ j → ∀ p ∈ circularBoundary (index i : M) (r i) ∩ + circularBoundary (index j : M) (r j), + ∃ q : M, p ∈ (coordinateChart q).source ∧ + covectorDet (circularNormalCovector (index i : M) q p) + (circularNormalCovector (index j : M) q p) ≠ 0) := by + obtain ⟨r,hr,hfinite,htriple,hregular⟩ := + A.exists_generic_circular_radii index r0 lo hi hlo hlohi hhi hpos + have hsmall (i : ι) : (r i)^2 < (r0 i)^2 := by + have h1 := hlo i + have h2 := hr i + have h3 := hhi i + nlinarith + refine ⟨r,hr,hfinite,htriple,?_⟩ + intro i j hij p hp + obtain ⟨q,hq,hreg⟩ := hregular i j hij p hp + exact ⟨q,by simpa only [coordinateChart_source] using hq, + A.actual_circular_normals_independent index r r0 i j hsmall hpos hp hq hreg⟩ + +end SmoothingAtlas + +def circularCrossingSet (center : ι → M) (r : ι → ℝ) : Set M := + ⋃ a : DistinctRadiusPairs ι, circularBoundary (center a.1.1) (r a.1.1) ∩ + circularBoundary (center a.1.2) (r a.1.2) + +omit [IsManifold planeModel ∞ M] [CompactSpace M] [DecidableEq ι] in +lemma circularCrossingSet_finite (center : ι → M) (r : ι → ℝ) + (hfinite : ∀ i j, i ≠ j → (circularBoundary (center i) (r i) ∩ + circularBoundary (center j) (r j)).Finite) : (circularCrossingSet center r).Finite := + Set.finite_iUnion (fun a => hfinite a.1.1 a.1.2 a.2) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/TwoMechanismCrossing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/TwoMechanismCrossing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5794d9dc5125e7e9c2f25cc1d2f280f2fbf231da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/TwoMechanismCrossing.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactTurnDichotomy + +namespace OAI + +/-! The turn threshold is fixed before any bound on the loop's transverse +coefficient. The longitudinal threshold is allowed to depend on that bound. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem longitudinal_ordered_crossing_threshold (sHi K d B T : ℝ) + (hsHi : 0 ≤ sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hB : 0 ≤ B) (hT : 0 ≤ T) : + ∃ J : ℝ, 0 < J ∧ ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, 0 < S → S ≤ sHi → -K ≤ k → |D| ≤ d → |N| ≤ B → + |t| ≤ T → |u| ≤ T → J < |L| → + 0 < modelOrderedCrossing n m S D N L k t u ∧ + 0 < modelOrderedCrossing n m S D N L k u t := by + let R := Real.sqrt (K*(2*T)^2)+1 + have hR : 0 ≤ R := by dsimp [R]; positivity + obtain ⟨J,hJ,hproj⟩ := longitudinal_projection_threshold + (E := E) sHi d B T R hsHi hd hB hT hR + refine ⟨J,hJ,?_⟩ + intro n m hn hm hmn S D N L k t u hS hSmax hk hD hN ht hu hL + exact ⟨crossing_positive_of_projection hK hk ht hu + (hproj n m hn hm hmn S D N L k t u hS hSmax hD hN ht hu hL), + crossing_positive_of_projection hK hk hu ht + (hproj n m hn hm hmn S D N L k u t hS hSmax hD hN hu ht hL)⟩ + +theorem two_mechanism_crossing_threshold (sLo sHi K d T : ℝ) + (hmin : 0 < sLo) (hmax : 0 < sHi) (hK : 0 ≤ K) (hd : 0 ≤ d) (hT : 0 ≤ T) : + ∃ H : ℝ, 0 < H ∧ ∀ B : ℝ, 0 ≤ B → ∃ J : ℝ, 0 < J ∧ + ∀ n m : E, ‖n‖ = 1 → ‖m‖ = 1 → inner ℝ m n = 0 → + ∀ S D N L k t u : ℝ, sLo ≤ S → S ≤ sHi → -K ≤ k → |D| ≤ d → |N| ≤ B → + |t| ≤ T → |u| ≤ T → (H < |N| ∨ J < |L|) → + 0 < modelOrderedCrossing n m S D N L k t u ∧ + 0 < modelOrderedCrossing n m S D N L k u t := by + obtain ⟨H,hH,hturn⟩ := ordered_crossing_threshold (E := E) sLo sHi K d T + hmin hmax hK hd hT + refine ⟨H,hH,?_⟩ + intro B hB + obtain ⟨J,hJ,hlong⟩ := longitudinal_ordered_crossing_threshold (E := E) + sHi K d B T hmax.le hK hd hB hT + refine ⟨J,hJ,?_⟩ + intro n m hn hm hmn S D N L k t u hSmin hSmax hk hD hN ht hu halt + rcases halt with hlargeN | hlargeL + · exact (hturn n m hn hm hmn S D N L k t u hSmin hSmax hk hD ht hu hlargeN).2.2 + · exact hlong n m hn hm hmn S D N L k t u (hmin.trans_le hSmin) + hSmax hk hD hN ht hu hlargeL + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularPhaseCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularPhaseCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..79937d14afeb0cd81f03a4cf498a4b44d1f468c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularPhaseCharts.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.JetPhaseChartFromReal +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseBoundaryCurve + +namespace OAI + +/-! Phase charts for entire circular patches, chosen with a radius uniform +in the center and in a compact family of nonzero linear phase parameters. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +theorem uniform_circular_phase_charts {P : Set Base} (hP : IsCompact P) + (hP0 : ∀ ell ∈ P, ell ≠ 0) {L : ℝ} (hL : 0 < L) : + ∃ R : ℝ, 0 < R ∧ ∀ (q : M) (ell : Base), ell ∈ P → + ∃ e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base, + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + (∀ x, (baseEquiv (e x)).1 = centeredConvexPhase ell L (coordinateChart q q) (baseEquiv x)) ∧ + ∀ r : ℝ, 0 ≤ r → r ≤ R → ∀ x ∈ circularCoordinateRegion q r, + baseEquiv.symm x ∈ e.source := by + obtain ⟨R,hR,hcharts⟩ := compact_uniform_centered_charts hP hP0 hL + refine ⟨R,hR,?_⟩ + intro q ell hell + obtain ⟨e,hphase,he,hi,hcover⟩ := hcharts ell hell (coordinateChart q q) + refine ⟨jetPhaseChart e,jetPhaseChart_smooth he,jetPhaseChart_symm_smooth hi,?_,?_⟩ + · intro x + rw [jetPhaseChart_apply,baseEquiv.apply_symm_apply,hphase] + · intro r hr hrR x hx + rw [jetPhaseChart_source] + change baseEquiv (baseEquiv.symm x) ∈ e.source + rw [baseEquiv.apply_symm_apply] + apply hcover + rw [Metric.mem_closedBall,dist_eq_norm] + exact (circularRadiusSquared_le_norm hx).trans (by simpa only [abs_of_nonneg hr] using hrR) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..eac551ed303053b85ab6f21c9b695574a48e207b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularRealization.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformOrderedCycleConvexity +import OAI.Geometry.SurfaceImmersion.Geometry.UniformCycleConvexity + +namespace OAI + +/-! The preselected convex phases apply to the actual ordered prefix metrics. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + theorem uniform_circular_realization (m : ℕ) + (g : SmoothMetric M) {c C K : ℝ} (hc : 0 < c) (hC : 0 ≤ C) (hK : 0 ≤ K) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ ∀ D : ℝ, 0 ≤ D → + ∃ N : ℕ, 0 < N ∧ ∀ (g₀ : SmoothMetric M), + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) → + ∀ (u : ∀ p : M, CovariantTwoTensor p) + (f : Fin N → SmoothPrimitiveFamily (Fin m) u), + (∀ k a, A.TensorWeightedBound 1 1 D ((f k).term a)) → + (∀ k : Fin N, A.TensorWeightedBound 1 1 C (g₀.inner+((k.val : ℝ)/(N : ℝ)) • u)) → + ∀ d : CircularPrimitiveFamily A (Fin (N*m)), + (∀ a p, d.amplitude a p = (f a.divNat).cycleAmplitude N a.modNat p) → + (∀ a, d.phase a = (f a.divNat).phase a.modNat) → + (∀ a, d.convexPart a = L) → (∀ a, ‖d.linearPart a‖ ≤ K) → + (∀ a, d.chartRadius a ≤ r) → + ∀ (h : SmoothMetric M), h.inner = g₀.inner+u → + ∀ (F : M → Space) (n : PreferredNormal F), + IsSmoothIsometricImmersion M g₀ F → MetricGoodPhaseData g₀ F → + FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) F n → + ∃ W : M → Space, IsSmoothIsometricImmersion M h W ∧ + Nonempty (MetricGoodPhaseData h W) := by + obtain ⟨L,r,hL,hr,hchoose⟩ := A.uniform_ordered_cycle_convexity m g hc hC hK houter + refine ⟨L,r,hL,hr,?_⟩ + intro D hD + obtain ⟨N,hN,hcv⟩ := hchoose D hD + refine ⟨N,hN,?_⟩ + intro g₀ hlower u f hb hpath d ha hp hLpart hlinear hradius h htarget F n hF data hgeom + have hconvex := hcv g₀ hlower u f hb hpath d ha hp hLpart hlinear hradius + apply d.realize_total g₀ h _ hconvex n hF data hgeom + rw [d.totalTensor_cycle f ha hp hN] + exact htarget + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..c31b6e2d3f805a3a78087772aaed74d141b0d0a6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCircularStartingFamily.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedBoundaryStartingFamily +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSphericalGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePreparedCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorMetric +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! Uniform spherical starting immersions carrying all actual finite +boundary invariants. The scale and estimates precede the crossing set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_circular_starting_family (g : SmoothMetric M) {I : M → Space} + (hI : ContMDiff planeModel spaceModel ∞ I) (hunit : ∀ p, ‖I p‖ = 1) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel I p)) + {η : ℝ} (hη : 0 < η) : + ∃ r D c : ℝ, 0 < r ∧ r ≤ 1 ∧ 0 ≤ D ∧ 0 < c ∧ + ∀ (n : ℕ) (B : SmoothingAtlas M) (d : CircularFamilyGeometry B (Fin n)) + (ε : ℝ), 0 < ε → + ∃ (G : M → Space) (g₀ : SmoothMetric M) (normal : PreferredNormal (r • G)), + ContMDiff planeModel spaceModel ∞ G ∧ (∀ p, ‖G p‖ = 1) ∧ + IsSmoothIsometricImmersion M g₀ (r • G) ∧ + g₀.inner = inducedTensor (r • G) ∧ Nonempty (MetricGoodPhaseData g₀ (r • G)) ∧ + normal.vector = (fun p => -G p) ∧ + A.WeightedBound 1 1 ε (G-I) ∧ A.WeightedBound 1 2 D G ∧ + (∀ p v, c*g.inner p v v ≤ g₀.inner p v v) ∧ + A.TensorWeightedBound 1 1 η g₀.inner ∧ + (∀ p v, g₀.inner p v v ≤ (1/2 : ℝ)*g.inner p v v) ∧ + FiniteBoundaryGeometry d.curves (boundaryCrossingSet d.curves univ) (r • G) normal := by + obtain ⟨r,D,c,hr,hr1,hD,hc,hprep⟩ := A.small_metric_boundary_family g hI hunit hImm hη + refine ⟨r,D,r^2*c,hr,hr1,hD,mul_pos (sq_pos_of_pos hr) hc,?_⟩ + intro n B d ε hε + let E := (boundaryCrossingSet_finite d.curves univ d.pair_finite).toFinset + obtain ⟨G,normal,hG,hu,hGI,hn,hclose,hbound,hlower,hmetric,hshort,hbase,hcross⟩ := hprep E ε hε + have hs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + let g₀ := A.immersionMetric hs hGI + have hF : IsSmoothIsometricImmersion M g₀ (r • G) := ⟨hs,fun _ _ _ => rfl⟩ + have hdata : Nonempty (MetricGoodPhaseData g₀ (r • G)) := + MetricGoodPhaseData.nonempty g₀ hs hGI (fun p => ⟨dy,dy, + (hbase p dy (by simp [dy])).2.1⟩) + have hscaled (p : M) (v : TangentSpace planeModel p) : + (r^2*c)*g.inner p v v ≤ g₀.inner p v v := by + change (r^2*c)*g.inner p v v ≤ inducedTensor (r • G) p v v + rw [inducedTensor_const_smul hG r] + change (r^2*c)*g.inner p v v ≤ r^2*inducedForm G p v v + calc + _ = r^2*(c*g.inner p v v) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (hlower p v) (sq_nonneg r) + refine ⟨G,g₀,normal,hG,hu,hF,rfl,hdata,hn,hclose,hbound,hscaled,hmetric,hshort,?_⟩ + refine ⟨?_,?_,?_,?_⟩ + · intro j p hp + exact ((d.curves j).spherical_second_positive hr hu hF hp).2.1 + · intro j p hp + rw [hn] + exact ((d.curves j).spherical_second_positive hr hu hF hp).2.2 + · intro j k _ p _ hp _ + rw [hn] + exact ((d.curves j).spherical_second_positive hr hu hF hp).1 + · intro j k _ p hp hj hk + apply (d.curves j).crossing_pos_of_coordinate_crossings (d.curves k) hF hj hk + have hsource : p ∈ (coordinateChart ((d.curves j).index : M)).source := by + rw [coordinateChart_source,← chart_source] + exact ((d.curves j).source hj).1 + have hpE : p ∈ E := by simpa only [E,Set.Finite.mem_toFinset] using hp + exact ((hcross ⟨p,hpE⟩).2 ((d.curves j).index : M) hsource).2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformConvexCircularAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformConvexCircularAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..11538ffb4128fa5628f05f29f645969a38879104 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformConvexCircularAtlas.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalUniformConvexity + +namespace OAI + +/-! A circular cover selected after local phase convexity has been fixed. +All metric bounds are measured in the original, independent atlas. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] in +lemma circular_radius_le_of_subordinate (p : M) {r R : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + (hsmall : ∀ q ∈ circularDiskClosure p r, + ‖coordinateChart p q-coordinateChart p p‖ < R) : r ≤ R := by + let x : Base := ((coordinateChart p p).1+r,(coordinateChart p p).2) + have hx : x ∈ circularCoordinateRegion p r := by + change circularRadiusSquared (coordinateChart p p) x ≤ r^2 + dsimp [x,circularRadiusSquared] + ring_nf + exact le_refl _ + have hh := hsmall ((coordinateChart p).symm x) ⟨x,hx,rfl⟩ + rw [(coordinateChart p).right_inv (hreg hx)] at hh + have he : x-coordinateChart p p = (r,0) := by ext <;> simp [x] + rw [he,Prod.norm_def] at hh + simpa only [Real.norm_eq_abs,abs_of_pos hr,norm_zero,max_eq_left hr.le] using hh.le + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_convex_circular_atlas (g : SmoothMetric M) {c C : ℝ} + (hc : 0 < c) (hC : 0 ≤ C) (K : M → ℝ) (hK : ∀ p, 0 ≤ K p) : + ∃ L : M → ℝ, (∀ p, 0 < L p) ∧ + ∀ R : M → ℝ, (∀ p, 0 < R p) → + ∀ V : M → Set M, (∀ p, IsOpen (V p)) → (∀ p, p ∈ V p) → + ∃ (B : SmoothingAtlas M) (r : B.centers → ℝ), + (∀ i : B.centers, 0 < r i ∧ r i ≤ R (i : M)) ∧ + (∀ i : B.centers, circularDiskClosure (i : M) (r i) ⊆ V i) ∧ + (∀ i : B.centers, circularCoordinateRegion (i : M) (r i) ⊆ (coordinateChart (i : M)).target) ∧ + (∀ i p, 0 ≤ B.weight i p) ∧ + (∀ i p, 0 < B.weight i p ↔ p ∈ circularCoordinateDisk (i : M) (r i)) ∧ + (∀ i p, p ∈ tsupport (B.weight i) → B.outer i =ᶠ[𝓝 p] (fun _ => 1)) ∧ + ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 C h.inner → + (∀ q v, c*g.inner q v v ≤ h.inner q v v) → + ∀ (i : B.centers) (q : M), q ∈ circularDiskClosure (i : M) (r i) → + ∀ ell : Base, ‖ell‖ ≤ K i → ∀ v : Base, + (L i/2)*(v.1^2+v.2^2) ≤ coordinateMetricHessian (coordinateMetric h (i : M)) + (centeredConvexPhase ell (L i) (coordinateChart (i : M) (i : M))) + (coordinateChart (i : M) q) v v := by + classical + choose L U hL hU hpU hUs hconvex using fun p => + A.local_uniform_convexity g hc hC (hK p) p + refine ⟨L,hL,?_⟩ + intro R hR V hV hpV + let W : M → Set M := fun p => (U p ∩ V p) ∩ ((coordinateChart p).source ∩ + (coordinateChart p) ⁻¹' Metric.ball (coordinateChart p p) (R p)) + have hW (p : M) : IsOpen (W p) := + ((hU p).inter (hV p)).inter ((coordinateChart p).isOpen_inter_preimage Metric.isOpen_ball) + have hpW (p : M) : p ∈ W p := by + refine ⟨⟨hpU p,hpV p⟩,?_,Metric.mem_ball_self (hR p)⟩ + rw [coordinateChart_source]; exact mem_chart_source Plane p + obtain ⟨B,r,hr,hreg,hinside,hwnon,hwpos,_hsupp,houter⟩ := + exists_circular_smoothingAtlas W hW hpW + refine ⟨B,r,fun i => ⟨hr i,?_⟩,(fun i p hp => (hinside i hp).1.2),hreg,hwnon,hwpos,houter,?_⟩ + · apply circular_radius_le_of_subordinate (i : M) (hr i) (hreg i) + intro q hq + have hh : coordinateChart (i : M) q ∈ Metric.ball (coordinateChart (i : M) (i : M)) (R (i : M)) := + (hinside i hq).2.2 + simpa only [Metric.mem_ball,dist_eq_norm] using hh + · intro h hb hlower i q hq ell hell v + exact hconvex i h hb hlower q (hinside i hq).1.1 ell hell v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCrossingBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCrossingBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2586f4e60e348d7e07674dfc70bf7f2ae066b1b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformCrossingBounds.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingProjectionBounds + +namespace OAI + +/-! Uniform crossing estimates with no dependence on the longitudinal +second-form coefficient. -/ +noncomputable section +namespace ClosedSurfaceR4.GeometryPreservation + +lemma crossing_first_lower {S D N L k t sLo sHi K : ℝ} + (hmin : 0 < sLo) (hSmin : sLo ≤ S) (hSmax : S ≤ sHi) (hK : 0 ≤ K) (hk : -K ≤ k) : + N^2/sHi-K/sLo ≤ (slopePure S D N L k t).1 := by + have hS : 0 < S := hmin.trans_le hSmin + have hN := div_le_div_of_nonneg_left (sq_nonneg N) hS hSmax + have hK' := div_le_div_of_nonneg_left hK hmin hSmin + have hk' := div_le_div_of_nonneg_right hk hS.le + have hsquare := div_nonneg (sq_nonneg (D+S*t)) hS.le + change _ ≤ (N^2+k+(D+S*t)^2)/S + rw [add_div,add_div] + rw [neg_div] at hk' + linarith + +lemma crossing_slope_bound {S D N t u sHi d T : ℝ} + (hS : 0 ≤ S) (hSmax : S ≤ sHi) (hd : |D| ≤ d) + (ht : |t| ≤ T) (hu : |u| ≤ T) : + |u-t| * (|D+S*t|+|N|) ≤ 2*T*(d+sHi*T+|N|) := by + have hT : 0 ≤ T := (abs_nonneg t).trans ht + have hsHi : 0 ≤ sHi := hS.trans hSmax + have hdiff : |u-t| ≤ 2*T := by + have hh := (abs_sub u t).trans (add_le_add hu ht) + linarith + have hlinear : |D+S*t| ≤ d+sHi*T := by + calc + |D+S*t| ≤ |D|+|S*t| := abs_add_le _ _ + _ = |D|+S*|t| := by rw [abs_mul,abs_of_nonneg hS] + _ ≤ d+sHi*T := add_le_add hd (mul_le_mul hSmax ht (abs_nonneg _) hsHi) + exact mul_le_mul hdiff (add_le_add hlinear le_rfl) (by positivity) (by positivity) + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem uniform_crossing_projection_lower {n m : E} + (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) (hmn : inner ℝ m n = 0) + {S D N L k t u sLo sHi K d T : ℝ} + (hmin : 0 < sLo) (hSmin : sLo ≤ S) (hSmax : S ≤ sHi) + (hK : 0 ≤ K) (hk : -K ≤ k) (hd : |D| ≤ d) (ht : |t| ≤ T) (hu : |u| ≤ T) + (hlarge : K/sLo < N^2/sHi) : + 0 < (slopePure S D N L k t).1 ∧ + N^2/sHi-K/sLo-2*T*(d+sHi*T+|N|) ≤ + inner ℝ (frameVector n m (slopeMixed S D N L k t u)) + (‖frameVector n m (slopePure S D N L k t)‖⁻¹ • + frameVector n m (slopePure S D N L k t)) := by + have hfirst := crossing_first_lower (N := N) (D := D) (L := L) (t := t) hmin hSmin hSmax hK hk + have hpos : 0 < (slopePure S D N L k t).1 := by linarith + refine ⟨hpos,?_⟩ + have hbound := crossing_slope_bound (N := N) (hmin.le.trans hSmin) hSmax hd ht hu + exact (sub_le_sub hfirst hbound).trans + (crossing_projection_lower hn hm hmn (hmin.trans_le hSmin).ne' hpos) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformLongitudinalProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformLongitudinalProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c79bbbb83b5ce835e0d95771640e69917e2fdce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformLongitudinalProfile.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CoefficientJetBounds +import OAI.Geometry.SurfaceImmersion.Primitive.LongitudinalCoefficientProfile +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanPolynomial + +namespace OAI + +/-! The first longitudinal profile is uniform over the compact admissible +jet family, with a fixed loss and the actual represented coefficients. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_longitudinal_profile {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (hx : ℓ (coordinateVector 0) = 1) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G), + MapsTo (lowJet G) S Q → ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + ∀ p ∈ S, + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + let f := finiteAnsatz F U ℓ (n+1) z + ‖PeriodicExpansion.directionalMap f (coordinateVector 0) p- + (PeriodicExpansion.directionalMap F (coordinateVector 0) p+(U 0).angle.fastValue ℓ z p)‖ ≤ + D*z/s^loss := by + obtain ⟨loss,hb⟩ := VectorExpression.compact_coefficient_two_jets (S := S) O.isOpen hQ hQO + (l.coefficientExpressions n) (n+1) (2*n+2) (by omega) + (fun i _ => l.coefficientExpressions_smooth n i) + (fun i hi a => (MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n i a).trans (by omega)) ℓ + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := hb B hB + refine ⟨2*(n+1)*D,mul_nonneg (by positivity) hD,?_⟩ + intro G hG hGQ s z hz hzs hs1 hGb U hU hrep p hp + let W := globalCoefficients U hU + have hc := hd G s z hz hzs hs1 hG hGQ hGb U (fun i _ => hrep i) + have hC : 0 ≤ D/s^loss := div_nonneg hD (pow_nonneg (hz.le.trans hzs) _) + have hfirst (i : ℕ) (hi : i < n+1) : + ‖((W i).slow (coordinateVector 0)).fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖((W i).slow (coordinateVector 0)).val p ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [global_slow_eq_local (W i) (U i) rfl (coordinateVector 0) hp] + exact (hc i hi 0 0 p hp).1 + have hangle (i : ℕ) (hi : i < n+1) : + ‖(W i).angle.fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖(W i).angle.val p ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [global_angle_eq_local (W i) (U i) rfl hp] + exact (hc i hi 2 0 p hp).1 + have hout := PeriodicExpansion.longitudinal_profile_of_coefficients + (JetVelocityCoordinates.toEuclidean.contDiff.comp hG) W ℓ n hx hz (hzs.trans hs1) hC hfirst hangle + have he : (2*((n : ℝ)+1))*(D/s^loss)*z = (2*((n : ℝ)+1))*D*z/s^loss := by ring + rw [he] at hout + have hangle0 : (W 0).angle.fastValue ℓ z p = (U 0).angle.fastValue ℓ z p := + global_angle_eq_local (W 0) (U 0) rfl hp _ + rw [hangle0] at hout + simpa only [W,globalCoefficients_finiteAnsatz,Function.comp_def, + Nat.cast_add,Nat.cast_one,Nat.cast_mul,Nat.cast_ofNat] using hout + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformMixedProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformMixedProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..62b6428e034a516b9e6a527fd28fe2c8e16e90ee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformMixedProfile.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SecondCoefficientProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.HigherLongitudinalProfiles +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanPolynomial + +namespace OAI + +/-! The mixed derivative estimate is uniform for the actual varying slow +maps and the same finite represented coefficients. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_mixed_profile {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G), + MapsTo (lowJet G) S Q → ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + ∀ p ∈ S, + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + let f := finiteAnsatz F U ℓ (n+1) z + ‖PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 0)) + (coordinateVector 1) p- + (PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap F (coordinateVector 0)) + (coordinateVector 1) p+((U 0).angle.slow (coordinateVector 1)).fastValue ℓ z p)‖ ≤ + D*z/s^loss := by + obtain ⟨loss,hb⟩ := VectorExpression.compact_coefficient_two_jets (S := S) O.isOpen hQ hQO + (l.coefficientExpressions n) (n+1) (2*n+2) (by omega) + (fun i _ => l.coefficientExpressions_smooth n i) + (fun i hi a => (MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n i a).trans (by omega)) ℓ + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := hb B hB + refine ⟨2*(n+1)*D,mul_nonneg (by positivity) hD,?_⟩ + intro G hG hGQ s z hz hzs hs1 hGb U hU hrep p hp + let W := globalCoefficients U hU + have hc := hd G s z hz hzs hs1 hG hGQ hGb U (fun i _ => hrep i) + have hC : 0 ≤ D/s^loss := div_nonneg hD (pow_nonneg (hz.le.trans hzs) _) + have hss (i : ℕ) (hi : i < n+1) : + ‖(((W i).slow (coordinateVector 0)).slow (coordinateVector 1)).fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖(globalCoefficientDerivative (globalCoefficientDerivative (W i) 0) 1).val p + ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [global_second_coefficientDerivative_eq_local (W i) (U i) rfl 0 1 hp] + exact (hc i hi 0 1 p hp).2 + have has (i : ℕ) (hi : i < n+1) : + ‖((W i).angle.slow (coordinateVector 1)).fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖(globalCoefficientDerivative (globalCoefficientDerivative (W i) 2) 1).val p + ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [global_second_coefficientDerivative_eq_local (W i) (U i) rfl 2 1 hp] + exact (hc i hi 2 1 p hp).2 + have hout := PeriodicExpansion.mixed_profile_of_coefficients + (JetVelocityCoordinates.toEuclidean.contDiff.comp hG) W ℓ n hx hy hz (hzs.trans hs1) hC hss has + have he : (2*((n : ℝ)+1))*(D/s^loss)*z = (2*((n : ℝ)+1))*D*z/s^loss := by ring + rw [he] at hout + have hlead : ((W 0).angle.slow (coordinateVector 1)).fastValue ℓ z p = + ((U 0).angle.slow (coordinateVector 1)).fastValue ℓ z p := + global_second_coefficientDerivative_eq_local (W 0) (U 0) rfl 2 1 hp _ + rw [hlead] at hout + simpa only [W,globalCoefficients_finiteAnsatz,Function.comp_def, + Nat.cast_add,Nat.cast_one,Nat.cast_mul,Nat.cast_ofNat] using hout + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPhasePrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPhasePrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbde0596188126b089babea9afa9300e62c524b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPhasePrimitive.lean @@ -0,0 +1,272 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedPatchGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseNormalMargin +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseAnsatzNormal +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.NonlinearJetProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.NonlinearLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLowJetNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveShiftedPowers +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveWeightedBudget +import OAI.Geometry.SurfaceImmersion.Primitive.SupportedPrimitiveGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveAtlasNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Construct the actual globally supported primitive from the finite recursion +and its extended polynomial mean operator. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance uniformPhasePrimitiveRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformPhasePrimitiveRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformPhasePrimitiveRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformPhasePrimitiveRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformPhasePrimitiveRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformPhasePrimitiveRealizationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for the actual supported primitive +in a fixed nonlinear phase chart, using only the proved polynomial mean iteration. -/ +theorem uniform_phase_primitive_realization (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχc : HasCompactSupport χ) (hχs : tsupport χ ⊆ e.source) + (hcover : (data.A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) + {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (hSc : IsCompact (closure (S : Set JetPolynomial.Base))) (hTS : MapsTo e e.source S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F ∘ e.symm)) S Q) + (K : Set JetPolynomial.Base) (hK : IsCompact K) (hKS : K ⊆ S) + (hKA : e.symm '' K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ c cB V₀ : ℝ, 0 < c ∧ 0 < cB ∧ 0 ≤ V₀ ∧ ∀ R N : ℕ, + ∃ (b u η L C Cv : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G V : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, data.A.ShiftedBound 2 m (z^b) (P m) G) ∧ + data.A.WeightedBound z R Cv V ∧ + data.A.WeightedBound 1 0 V₀ V ∧ + data.A.ShiftedBound 2 R z (Cv/z^2) V ∧ + data.A.TensorWeightedBound 1 R (C*z^N) + (inducedTensor V-(g.inner+data.A.bundleRestore data.A.tensorTriv i + (fun y => fiberFromThree (localizedTensorPullback e χ (fun q => ![a q^2,0,0]) y)))) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + RealModes.realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) ∧ + (∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + cB < ‖RealModes.realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖) ∧ + (∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖) ∧ + ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := data.A.nonlinear_lowJet_neighborhood_of_C2 i hF hi + S.isOpen hSc hQ O.isOpen hQO hFQ + obtain ⟨ε,c,hε,hc,hnallOrders⟩ := l.all_orders_primitive_normal_geometry (S := S) + hQ' hQ'O ℓ hℓx hℓy + obtain ⟨Dt,hDt,htransport⟩ := data.A.phase_normal_margin i e he hi hcover + have hcLocal : 0 < c/Dt := div_pos hc hDt + obtain ⟨ρg,hρg,hgeometry⟩ := data.supported_patch_geometry hF i + obtain ⟨ρB,cB,hρB,hcB,hmargin⟩ := data.primitive_atlas_normal_margin hF i hcLocal + obtain ⟨V₀,hV₀,hF₀⟩ := data.A.exists_shifted_bound 2 0 hF + refine ⟨c,cB,V₀+1,hc,hcB,by positivity,?_⟩ + intro R N + obtain ⟨Pol,hPol,lm,hconstruct⟩ := data.A.supported_phase_primitive_metric i e he hi hχ hχc hχs + l ha hamp S hTS hQ' hQ'O (N+(R+2)) ℓ hℓx hℓy + obtain ⟨ln,hnb⟩ := hnallOrders (N+(R+2)) + let loss := max lm ln + have hcap : 0 < 1/(1+(loss : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hbl,hu,hη,hη1,hL,hC,hP,hmean⟩ := + data.polynomial_mean_approximation (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) + (data.A.primitiveAtlasPolynomial_smooth i hPol') hF hmetric (R+2) (N+(R+2)) + (1/(1+(loss : ℝ))) hcap + have hblm : b < 1/(1+(lm : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_left lm ln) 1)) + have hbln : b < 1/(1+(ln : ℝ)) := hbl.trans_le + (one_div_le_one_div_of_le (by positivity) + (by dsimp [loss]; exact_mod_cast Nat.add_le_add_left (Nat.le_max_right lm ln) 1)) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + obtain ⟨ηg,hηg,_,hgsmall⟩ := ExactCorrection.positive_power_threshold L u ρg hu hρg + obtain ⟨ηB,hηB,_,hBsmall⟩ := ExactCorrection.positive_power_threshold L u ρB hu hρB + obtain ⟨_,B,_,hB,hprofiles⟩ := data.A.nonlinear_jet_profiles i hi S.isOpen hSc P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B ((R+2)+(2*(N+(R+2)+1)+1))) (hB _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B ((2*(N+(R+2))+2)+2)) (hB _) + obtain ⟨ηn,hηn,_,hnsmall⟩ := primitive_normal_threshold hb hbln hε Dn + obtain ⟨ηs,hηs,_,hslowzero⟩ := ExactCorrection.positive_power_threshold L u (1/2) hu (by norm_num) + obtain ⟨ηv,hηv,_,hinczero⟩ := primitive_normal_threshold hb hblm (by norm_num : (0:ℝ) < 1/2) Dmap + let ηold := min η (min η₀ (min ηn (min ηg ηB))) + have hηold : 0 < ηold := lt_min hη (lt_min hη₀ (lt_min hηn (lt_min hηg hηB))) + refine ⟨b,u,min ηold (min ηs ηv),L,C+D,P 0+P R+Dmap,P,hb,hb16,hu, + lt_min hηold (lt_min hηs hηv), + (min_le_left _ _).trans ((min_le_left _ _).trans hη1),hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,hP,?_⟩ + intro z hz hznew + have hzη : z < ηold := hznew.trans_le (min_le_left _ _) + have hzs0 : z < ηs := hznew.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzv0 : z < ηv := hznew.trans_le ((min_le_right _ _).trans (min_le_right _ _)) + have hzη' : z < η := hzη.trans_le (min_le_left _ _) + have hz1 : z ≤ 1 := hzη'.le.trans hη1 + have hs : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hs1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hzs : z ≤ z^b := by + have hb1 : b ≤ 1 := by linarith + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hz hz1 hb1 + obtain ⟨G,hG,hclose,hmap,hmean⟩ := hmean z hz hzη' + have hGQ : MapsTo (lowJet (data.A.jetChartMap i G ∘ e.symm)) S Q' := + hnear G hG (fun j => ((hclose j).mono_order (by omega)).mono_const + (hsmall z hz (hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)))).le) + have hGv : ∀ p ∈ S, p ∉ K → ∀ t, + l.velocity (lowJet (data.A.jetChartMap i G ∘ e.symm) p,t) = + SurfaceVelocityFamily.normal (lowJet (data.A.jetChartMap i G ∘ e.symm) p) := by + intro p hp hpK t + exact hv _ (hQ'O (hGQ hp)) (by simpa only [lowJetPosition_lowJet] using hpK) t + obtain ⟨U,hzero,hUs,hrep,hinit,hVs,herror⟩ := hprimitive G hG hGQ K hK hKS hKA hone hGv + let V := data.A.phaseAtlasAnsatz i G e χ U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((R+2)+(2*(N+(R+2)+1)+1)) + have hsolved : data.A.TensorWeightedBound z (R+2) (C*z^(N+(R+2))) + (data.A.atlasPolynomialMetric (data.A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback Pol e e.symm))) z G-g.inner) := + fun j => (hmean j).shrink_scale hz.le hz1 + have herr := (herror (z^b) z hz hzs hs1 hjet).2 g.inner g.contMDiff (C*z^(N+(R+2))) hsolved + have htot : 0 ≤ C*z^(N+(R+2))+D*z^(N+(R+2)+1)/(z^b)^lm := by positivity + have hfinal := data.A.tensorWeightedBound_unscaled hz hz1 htot herr + have hincrement := (herror (z^b) z hz hzs hs1 hjet).1 + have hsmallinc : Dmap*z/(z^b)^lm ≤ Dmap := by + apply (div_le_iff₀ (pow_pos hs _)).mpr + exact mul_le_mul_of_nonneg_left (slow_power_dominates_fast hz hz1 hb hblm) hDmap + have hGweighted := data.A.weighted_of_shifted_two hz.le hzs hs1 (hmap R) + have hincweighted : data.A.WeightedBound z R Dmap (V-G) := + fun j => ((hincrement j).mono_order (by omega)).mono_const hsmallinc + have hVweighted := data.A.weightedBound_add hG ((hVs z).sub hG) hz.le hGweighted hincweighted + have hvadd : G+(V-G) = V := by abel + change data.A.WeightedBound z R (P R+Dmap) (G+(V-G)) at hVweighted + rw [hvadd] at hVweighted + have hVweighted' : data.A.WeightedBound z R (P 0+P R+Dmap) V := + fun j => (hVweighted j).mono_const (by linarith [hP 0]) + have hshift := data.A.weighted_to_shifted (q := 2) (m := R) hz hz1 + (show 0 ≤ Dmap*z/(z^b)^lm by positivity) + (show data.A.WeightedBound z (2+R) (Dmap*z/(z^b)^lm) (V-G) from by + simpa only [V,Nat.add_comm R 2] using hincrement) + have hshift' : data.A.ShiftedBound 2 R z (Dmap/z^2) (V-G) := by + intro j k hk x + exact (hshift j k hk x).trans (div_le_div_of_nonneg_right hsmallinc (sq_nonneg z)) + have hvmap := data.A.shifted_map_recurrence hG ((hVs z).sub hG) + (hmap 0) (hmap R) hshift' hs hz.le hzs (hP 0) (hP R) + change data.A.ShiftedBound 2 R z (P 0+(z/(z^b))*P R+Dmap/z^2) (G+(V-G)) at hvmap + rw [hvadd] at hvmap + have hvmap' : data.A.ShiftedBound 2 R z ((P 0+P R+Dmap)/z^2) V := by + intro j k hk x + exact (hvmap j k hk x).trans (primitive_shifted_budget hz hz1 hzs (hP 0) (hP R) hDmap) + have hnall : ∀ p ∈ (S : Set JetPolynomial.Base) ∩ e.target, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + intro p hp + have heq := data.A.phaseAtlasAnsatz_normalTriple i G e hi hχs U hK hKA hzero hone ℓ + (N+(R+2)+1) z hp.2 + change NormalFrame.gramDet _ _ ≠ 0 ∧ c < ‖_‖ + rw [show SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V ∘ e.symm) p = + SurfaceVelocityFamily.Loop.primitiveNormalTriple + (finiteAnsatz (data.A.vectorChartRead i G ∘ e.symm) U ℓ (N+(R+2)+1) z) p from heq] + have hh := hnormal (data.A.jetChartMap i G ∘ e.symm) ((data.A.jetChartMap_smooth i hG).comp hi) + hGQ (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 ((2*(N+(R+2))+2)+2)) + (hnsmall z hz (hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))))) + U hUs hrep hinit p hp.1 + have heuc : (fun q => JetVelocityCoordinates.toEuclidean ((data.A.jetChartMap i G ∘ e.symm) q)) = + data.A.vectorChartRead i G ∘ e.symm := by + funext q + exact spaceCoordinates.symm_apply_apply _ + rw [heuc] at hh + exact hh + have hext : ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + intro p hp + exact data.A.phaseAtlasAnsatz_eventuallyEq i G e hi hχs U hK hKA hzero ℓ (N+(R+2)+1) z hp + have hlocal : ∀ p ∈ tsupport (data.A.weight i), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + c/Dt < ‖RealModes.realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))‖ := by + intro p hp + have hx : chart (i : M) p ∈ (data.A.chartWeightCompact i : Set JetPolynomial.Base) := ⟨p,hp,rfl⟩ + exact htransport V (hVs z) _ hx c hc + (hnall _ ⟨hTS (hcover hx),e.map_source (hcover hx)⟩) + have hglobal := hgeometry G V hG (hVs z) (L*z^u) (by positivity) + (hgsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))))) + (fun j => (hclose j).mono_order (by omega)) + (fun p hp => ⟨(hlocal p hp).1,norm_pos_iff.mp (hcLocal.trans (hlocal p hp).2)⟩) hext + have hBglobal := hmargin G V hG (hVs z) hglobal.1 (L*z^u) (by positivity) + (hBsmall z hz (hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)))))) + (fun j => (hclose j).mono_order (by omega)) (fun p hp => (hlocal p hp).2) hext + have hFzero : data.A.WeightedBound 1 0 V₀ F := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hF₀ j 0 (by omega) x + have hslow0 : data.A.WeightedBound 1 0 (1/2) (G-F) := fun j => + ((hclose j).mono_order (Nat.zero_le _)).mono_const (hslowzero z hz hzs0).le + have hinc0 : data.A.WeightedBound 1 0 (1/2) (V-G) := by + intro j k hk x hx + have hk0 : k = 0 := by omega + subst k + have hh := hincrement j 0 (by omega) x hx + simp only [pow_zero,one_mul] at hh ⊢ + exact hh.trans (hinczero z hz hzv0).le + have hsum0 := data.A.weightedBound_add hF (hG.sub hF) zero_le_one hFzero hslow0 + have hsum1 := data.A.weightedBound_add (hF.add (hG.sub hF)) ((hVs z).sub hG) + zero_le_one hsum0 hinc0 + have hVzero : data.A.WeightedBound 1 0 (V₀+1) V := by + change data.A.WeightedBound 1 0 (V₀+1/2+1/2) (F+(G-F)+(V-G)) at hsum1 + have hsumid : F+(G-F)+(V-G) = V := by abel + rw [hsumid] at hsum1 + convert hsum1 using 1; ring + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hVzero,hvmap',?_,hglobal.1,hglobal.2,hBglobal,hnall,hext⟩ + · intro j + apply ((hfinal j).mono_order (by omega)).mono_const + have hlead : C*z^(N+(R+2))/z^(R+2) = C*z^N := by + rw [pow_add,← mul_assoc,mul_div_cancel_right₀ _ (pow_ne_zero _ hz.ne')] + rw [add_div,hlead] + have htail := mul_le_mul_of_nonneg_left + (primitive_tail_power_bound (N := N) (R := R+2) hz hz1 hb hblm) hD + have heq : D*z^(N+(R+2)+1)/(z^b)^lm/z^(R+2) = D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) := by ring + rw [heq] + calc + C*z^N+D*(z^(N+(R+2)+1)/(z^b)^lm/z^(R+2)) ≤ C*z^N+D*z^N := add_le_add le_rfl htail + _ = (C+D)*z^N := by ring + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveGeometricApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveGeometricApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c5039efd60263128c366e87d6b8f08d20d99bc5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveGeometricApproximation.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Actual finite-accuracy primitive immersions with a Riemannian target, +uniform first-jet bounds, and a uniform nonzero second-form margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes +local instance uniformPrimitiveGeometryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformPrimitiveGeometryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformPrimitiveGeometryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformPrimitiveGeometryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformPrimitiveGeometrySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformPrimitiveGeometrySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem uniform_primitive_geometric_approximation (data : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (i : data.A.centers) {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) (hamp : l.HasSpatialAmplitude a) + (S : TopologicalSpace.Opens JetPolynomial.Base) + (T : TopologicalSpace.Compacts JetPolynomial.Base) (hST : (S : Set JetPolynomial.Base) ⊆ T) + (houter : (chart (i : M)) '' tsupport (data.A.outer i) ⊆ S) + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (data.A.jetChartMap i F)) S Q) + (K : Set JetPolynomial.Base) (hK : IsClosed K) (hKS : K ⊆ S) + (hKA : K ⊆ (data.A.chartWeightCompact i : Set JetPolynomial.Base)) + (hv : ∀ J ∈ O, lowJetPosition J ∉ K → ∀ t, l.velocity (J,t) = SurfaceVelocityFamily.normal J) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) + : + ∃ h : SmoothMetric M, h.inner = g.inner+data.A.primitiveTensor i a ∧ + ∃ V₀ R₁ c₁ c₂ : ℝ, 0 ≤ V₀ ∧ 0 < R₁ ∧ 0 < c₁ ∧ 0 < c₂ ∧ + ∀ R N : ℕ, ∃ η C Cv : ℝ, 0 < η ∧ η ≤ 1 ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ V : M → Space, + ContMDiff planeModel spaceModel ∞ V ∧ + data.A.WeightedBound z (R+2) Cv V ∧ + data.A.WeightedBound 1 0 V₀ V ∧ + data.A.ShiftedBound 2 R z (Cv/z^2) V ∧ + data.A.TensorWeightedBound 1 R (C*z^(N+1)) (inducedTensor V-h.inner) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel V p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0) ∧ + ∀ j x, x ∈ (modeSupport (data.A.chartWeightCompact j) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ ≤ R₁ ∧ + c₁ ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x).1 + (firstJetPair (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x).2 ∧ + c₂ < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead j V) x‖ := by + have hFO : MapsTo (lowJet (data.A.jetChartMap i F)) S O := fun x hx => hQO (hFQ hx) + have hzero := data.A.primitive_amplitude_zero_off_weight i l hamp S houter + (data.A.jetChartMap i F) hFO K hKA hv + let h := data.A.primitiveMetric g i a ha hzero + obtain ⟨ρ,R₁,c₁,hρ,hR₁,hc₁,hjet⟩ := data.A.metric_firstJet_margin h + obtain ⟨c,c₂,V₀,hc,hc₂,hV₀,hfamilies⟩ := + data.uniform_primitive_mean_realization hF hmetric i l ha hamp S T hST houter hQ hQO hFQ + K hK hKS hKA hv ℓ hℓx hℓy + refine ⟨h,rfl,V₀,R₁,c₁,c₂,hV₀,hR₁,hc₁,hc₂,?_⟩ + intro R N + obtain ⟨b,u,η,L,C,Cv,P,hb,hb16,hu,hη,hη1,hL,hC,hCv,hP,hfamily⟩ := hfamilies (R+2) (N+1) + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold C (N+1) ρ + (by positivity) hρ + refine ⟨min η η₀,C,Cv,lt_min hη hη₀,(min_le_left _ _).trans hη1,hC,hCv,?_⟩ + intro z hz hzη + obtain ⟨G,V,hG,hV,hclose,hslow,hweighted,hzero,hshift,herror,hI,hB,hBmargin,hN,hext⟩ := + hfamily z hz (hzη.trans_le (min_le_left _ _)) + have herr : data.A.TensorWeightedBound 1 R (C*z^(N+1)) (inducedTensor V-h.inner) := + fun j => (herror j).mono_order (by omega) + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + have hjet' := hjet V hV (C*z^(N+1)) (by positivity) + (by simpa only [hexp,Real.rpow_natCast] using + hsmall z hz (hzη.trans_le (min_le_right _ _))) + (fun j => (herr j).mono_order (Nat.zero_le R)) + refine ⟨V,hV,hweighted,hzero,(fun j k hk x => hshift j k (by omega) x),herr,hI,hB,?_⟩ + intro j x hx + exact ⟨(hjet' j x hx).1,(hjet' j x hx).2,hBmargin j x hx⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c3c7cabe3c82a632c600cc34cd8297c3ceb5ef6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveNormal.lean @@ -0,0 +1,161 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformLongitudinalProfile +import OAI.Geometry.SurfaceImmersion.Primitive.UniformTransverseProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.LoopCompactNormalMargin +import OAI.Geometry.SurfaceImmersion.Primitive.LocalAnsatzProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityIdentities + +namespace OAI + +/-! The same finite coefficients used for the metric expansion preserve +transverse normal acceleration uniformly over a compact low-jet family. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector +open WeightedEstimates NormalFrame +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +def primitiveNormalTriple (f : JetPolynomial.Base → Euclidean) (p : JetPolynomial.Base) : + VelocityFrame.NormalTriple := + ![spaceCoordinates (fderiv ℝ f p (coordinateVector 0)), + spaceCoordinates (fderiv ℝ f p (coordinateVector 1)), + spaceCoordinates (fderiv ℝ (fun q => fderiv ℝ f q (coordinateVector 1)) + p (coordinateVector 1))] + +lemma geometry_longitudinal_coordinates {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + spaceCoordinates ((l.geometry G hG hGO).longitudinal.val p (t : Period)) = + VelocityFrame.leadingTangent (slot 1 (lowJet G p)) (slot 2 (lowJet G p)) + (slot 6 (lowJet G p)) (l.velocity (lowJet G p,t)) := by + rw [LocalPeriodicExpansion.Geometry.longitudinal,Family.add_apply, + Family.constant_apply _ _ hp,map_add,l.geometry_velocity hG hGO hp, + l.euclideanVelocity_apply (hGO hp)] + change spaceCoordinates (JetVelocityCoordinates.toEuclidean (tangent (lowJet G p)))+ + l.velocity (lowJet G p,t) = _ + simp only [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply, + tangent,normal,VelocityFrame.leadingTangent] + +theorem uniform_primitive_normal_triple {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGQ : MapsTo (lowJet G) S Q), + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = (l.geometry G hG (fun _ hp => hQO (hGQ hp))).initial → + ∀ p ∈ S, + ‖primitiveNormalTriple (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p- + ![VelocityFrame.leadingTangent (slot 1 (lowJet G p)) (slot 2 (lowJet G p)) + (slot 6 (lowJet G p)) (l.velocity (lowJet G p,ℓ p/z)), + slot 2 (lowJet G p),slot 6 (lowJet G p)]‖ ≤ D*z/s^loss := by + obtain ⟨lx,hxb⟩ := l.uniform_longitudinal_profile (S := S) hQ hQO n ℓ hx + obtain ⟨ly,hyb⟩ := l.uniform_transverse_profiles (S := S) hQ hQO n ℓ hy + refine ⟨max lx ly,?_⟩ + intro B hB + obtain ⟨Dx,hDx,hxb⟩ := hxb B hB + obtain ⟨Dy,hDy,hyb⟩ := hyb B hB + let D := ‖spaceCoordinates.toContinuousLinearMap‖*(Dx+Dy) + refine ⟨D,mul_nonneg (norm_nonneg _) (add_nonneg hDx hDy),?_⟩ + intro G hG hGQ s z hz hzs hs1 hb U hU hrep hinit p hp + have hs : 0 < s := hz.trans_le hzs + have hGO : MapsTo (lowJet G) S O := fun _ hq => hQO (hGQ hq) + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + let f := finiteAnsatz F U ℓ (n+1) z + let g := l.geometry G hG hGO + have hbound (C : ℝ) (hC : 0 ≤ C) (hC' : C ≤ Dx+Dy) + (d : ℕ) (hd : d ≤ max lx ly) : C*z/s^d ≤ (Dx+Dy)*z/s^(max lx ly) := by + calc + _ ≤ C*z/s^(max lx ly) := div_le_div_of_nonneg_left (mul_nonneg hC hz.le) + (pow_pos hs _) (pow_le_pow_of_le_one hs.le hs1 hd) + _ ≤ _ := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right hC' hz.le) + (pow_nonneg hs.le _) + have hxerr := (hxb G hG hGQ s z hz hzs hs1 hb U hU hrep p hp).trans + (hbound Dx hDx (by linarith) lx (le_max_left _ _)) + obtain ⟨hyerr,hyyerr⟩ := hyb G hG hGQ s z hz hzs hs1 hb U hU hrep p hp + have hdy := hbound Dy hDy (by linarith) ly (le_max_right _ _) + replace hyerr := hyerr.trans hdy + replace hyyerr := hyyerr.trans hdy + let W := globalCoefficients U hU + have hW : (W 0).val = g.initial.val := by + change (U 0).val = g.initial.val + rw [hinit] + have hx0 := g.initial_global_longitudinal (W 0) hW (coordinateVector 0) + (fun q hq => l.geometry_dx hG hGO hq) hp ((ℓ p/z : ℝ) : Period) + rw [global_angle_eq_local (W 0) (U 0) rfl hp] at hx0 + change PeriodicExpansion.directionalMap F (coordinateVector 0) p+ + (U 0).angle.fastValue ℓ z p = g.longitudinal.val p ((ℓ p/z : ℝ) : Period) at hx0 + rw [hx0] at hxerr + have hy0 : PeriodicExpansion.directionalMap F (coordinateVector 1) = + fun q => JetVelocityCoordinates.toEuclidean (slot 2 (lowJet G q)) := by + funext q + exact euclidean_first_derivative hG 1 q + rw [hy0] at hyerr hyyerr + change ‖PeriodicExpansion.directionalMap f (coordinateVector 1) p- + JetVelocityCoordinates.toEuclidean (slot 2 (lowJet G p))‖ ≤ _ at hyerr + change ‖PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 1)) + (coordinateVector 1) p-fderiv ℝ (fun q => + JetVelocityCoordinates.toEuclidean (slot 2 (lowJet G q))) p (coordinateVector 1)‖ ≤ _ at hyyerr + rw [euclidean_y_derivative hG] at hyyerr + have hcoord {u v : Euclidean} (he : ‖u-v‖ ≤ (Dx+Dy)*z/s^(max lx ly)) : + ‖spaceCoordinates u-spaceCoordinates v‖ ≤ D*z/s^(max lx ly) := by + calc + _ = ‖spaceCoordinates (u-v)‖ := by rw [map_sub] + _ ≤ ‖spaceCoordinates.toContinuousLinearMap‖*‖u-v‖ := + spaceCoordinates.toContinuousLinearMap.le_opNorm _ + _ ≤ ‖spaceCoordinates.toContinuousLinearMap‖*((Dx+Dy)*z/s^(max lx ly)) := + mul_le_mul_of_nonneg_left he (norm_nonneg _) + _ = _ := by dsimp [D]; ring + have hxc := hcoord hxerr + rw [l.geometry_longitudinal_coordinates hG hGO hp] at hxc + have hyc := hcoord hyerr + have hyyc := hcoord hyyerr + simp only [JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.apply_symm_apply] at hyc hyyc + refine (pi_norm_le_iff_of_nonneg (div_nonneg (mul_nonneg (mul_nonneg (norm_nonneg _) + (add_nonneg hDx hDy)) hz.le) (pow_nonneg hs.le _))).mpr ?_ + intro k + fin_cases k + · exact hxc + · exact hyc + · exact hyyc + +theorem uniform_primitive_normal_geometry {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ + ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGQ : MapsTo (lowJet G) S Q), + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → D*z/s^loss < ε → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = (l.geometry G hG (fun _ hp => hQO (hGQ hp))).initial → + ∀ p ∈ S, + let H := primitiveNormalTriple (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖realNormalPart (H 0) (H 1) (H 2)‖ := by + obtain ⟨loss,hb⟩ := l.uniform_primitive_normal_triple (S := S) hQ hQO n ℓ hx hy + obtain ⟨ε,c,hε,hc,hn⟩ := l.compact_normal_margin hQ hQO + refine ⟨loss,ε,c,hε,hc,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := hb B hB + refine ⟨D,hD,?_⟩ + intro G hG hGQ s z hz hzs hs1 hbound hsmall U hU hrep hinit p hp + exact hn _ (hGQ hp) (ℓ p/z) _ + ((hd G hG hGQ s z hz hzs hs1 hbound U hU hrep hinit p hp).trans_lt hsmall) + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..933586514e14def29316257db5f79cb617ca1bd3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveProfiles.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveNormal +import OAI.Geometry.SurfaceImmersion.Primitive.UniformMixedProfile +import OAI.Geometry.SurfaceImmersion.Primitive.UniformScaledLongitudinalProfile + +namespace OAI + +/-! All five actual derivative profiles share a loss fixed before the slow +map. The leading profiles are the geometric velocity and its derivatives. -/ +noncomputable section +open Set +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +def primitiveJetProfile (f : JetPolynomial.Base → Euclidean) (z : ℝ) + (p : JetPolynomial.Base) : Fin 5 → Euclidean := + ![PeriodicExpansion.directionalMap f (coordinateVector 0) p, + PeriodicExpansion.directionalMap f (coordinateVector 1) p, + PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 1)) + (coordinateVector 1) p, + PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 0)) + (coordinateVector 1) p, + z • PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 0)) + (coordinateVector 0) p] + +theorem uniform_primitive_five_profiles {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGQ : MapsTo (lowJet G) S Q), + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = (l.geometry G hG (fun _ hp => hQO (hGQ hp))).initial → + ∀ p ∈ S, + let g := l.geometry G hG (fun _ hp => hQO (hGQ hp)) + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖primitiveJetProfile (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) z p- + ![g.longitudinal.val p t,g.Y p,g.C p, + (g.longitudinal.slow (coordinateVector 1)).val p t,g.V.angle.val p t]‖ ≤ D*z/s^loss := by + obtain ⟨lx,hxb⟩ := l.uniform_longitudinal_profile (S := S) hQ hQO n ℓ hx + obtain ⟨ly,hyb⟩ := l.uniform_transverse_profiles (S := S) hQ hQO n ℓ hy + obtain ⟨lm,hmb⟩ := l.uniform_mixed_profile (S := S) hQ hQO n ℓ hx hy + obtain ⟨la,hab⟩ := l.uniform_scaled_longitudinal_profile (S := S) hQ hQO n ℓ hx + let loss := max (max lx ly) (max lm la) + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨Dx,hDx,hxbound⟩ := hxb B hB + obtain ⟨Dy,hDy,hybound⟩ := hyb B hB + obtain ⟨Dm,hDm,hmbound⟩ := hmb B hB + obtain ⟨Da,hDa,habound⟩ := hab B hB + let D := Dx+Dy+Dm+Da + have hD : 0 ≤ D := by dsimp [D]; positivity + refine ⟨D,hD,?_⟩ + intro G hG hGQ s z hz hzs hs1 hb U hU hrep hinit p hp + have hs : 0 < s := hz.trans_le hzs + have hbound (C : ℝ) (hC : 0 ≤ C) (hCD : C ≤ D) (d : ℕ) (hd : d ≤ loss) : + C*z/s^d ≤ D*z/s^loss := by + exact (div_le_div_of_nonneg_left (mul_nonneg hC hz.le) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 hd)).trans + (div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right hCD hz.le) (pow_nonneg hs.le _)) + have hxd : lx ≤ loss := (le_max_left lx ly).trans (le_max_left _ _) + have hyd : ly ≤ loss := (le_max_right lx ly).trans (le_max_left _ _) + have hmd : lm ≤ loss := (le_max_left lm la).trans (le_max_right _ _) + have had : la ≤ loss := (le_max_right lm la).trans (le_max_right _ _) + have hxerr := (hxbound G hG hGQ s z hz hzs hs1 hb U hU hrep p hp).trans + (hbound Dx hDx (by dsimp [D]; linarith) lx hxd) + obtain ⟨hyerr,hyyerr⟩ := hybound G hG hGQ s z hz hzs hs1 hb U hU hrep p hp + have hdy := hbound Dy hDy (by dsimp [D]; linarith) ly hyd + replace hyerr := hyerr.trans hdy + replace hyyerr := hyyerr.trans hdy + have hmerr := (hmbound G hG hGQ s z hz hzs hs1 hb U hU hrep p hp).trans + (hbound Dm hDm (by dsimp [D]; linarith) lm hmd) + have haerr := (habound G hG hGQ s z hz hzs hs1 hb U hU hrep p hp).trans + (hbound Da hDa (by dsimp [D]; linarith) la had) + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + have hFs : ContDiff ℝ ∞ F := JetVelocityCoordinates.toEuclidean.contDiff.comp hG + have hGO : MapsTo (lowJet G) S O := fun _ hq => hQO (hGQ hq) + let g := l.geometry G hG hGO + let W := globalCoefficients U hU + have hW : (W 0).val = g.initial.val := by + change (U 0).val = g.initial.val + rw [hinit] + have hx0 := g.initial_global_longitudinal (W 0) hW (coordinateVector 0) + (fun q hq => l.geometry_dx hG hGO hq) hp ((ℓ p/z : ℝ) : Period) + rw [global_angle_eq_local (W 0) (U 0) rfl hp] at hx0 + change PeriodicExpansion.directionalMap F (coordinateVector 0) p+ + (U 0).angle.fastValue ℓ z p = g.longitudinal.val p ((ℓ p/z : ℝ) : Period) at hx0 + rw [hx0] at hxerr + have hy0 : PeriodicExpansion.directionalMap F (coordinateVector 1) =ᶠ[𝓝 p] g.Y := by + filter_upwards [S.isOpen.mem_nhds hp] with q hq + exact l.geometry_dy hG hGO q + have hyy0 : PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap F (coordinateVector 1)) (coordinateVector 1) p = g.C p := + (congrArg (fun L : JetPolynomial.Base →L[ℝ] Euclidean => L (coordinateVector 1)) + hy0.fderiv_eq).trans (g.derivativeY p hp) + rw [hy0.eq_of_nhds] at hyerr + rw [hyy0] at hyyerr + have hm0 := g.initial_global_longitudinal_slow hFs (W 0) hW (coordinateVector 0) + (fun q hq => l.geometry_dx hG hGO hq) hp (ℓ p/z) + rw [global_slow_eq_local_of_eqOn (W 0).angle (U 0).angle + (fun q hq t => global_angle_eq_local (W 0) (U 0) rfl hq t) (coordinateVector 1) hp] at hm0 + change PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap F (coordinateVector 0)) + (coordinateVector 1) p+((U 0).angle.slow (coordinateVector 1)).fastValue ℓ z p = _ at hm0 + rw [hm0] at hmerr + have ha0 := g.initial_global_angle_angle (W 0) hW hp ((ℓ p/z : ℝ) : Period) + have haLocal : (W 0).angle.angle.val p ((ℓ p/z : ℝ) : Period) = + (U 0).angle.angle.val p ((ℓ p/z : ℝ) : Period) := + global_second_coefficientDerivative_eq_local (W 0) (U 0) rfl 2 2 hp _ + rw [haLocal] at ha0 + change (U 0).angle.angle.fastValue ℓ z p = _ at ha0 + rw [ha0] at haerr + apply (pi_norm_le_iff_of_nonneg (div_nonneg (mul_nonneg hD hz.le) (pow_nonneg hs.le _))).mpr + intro k + fin_cases k + · exact hxerr + · exact hyerr + · exact hyyerr + · exact hmerr + · exact haerr + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..91b066ff2f84e081c11e7e67f7d2f49ff338d6e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformPrimitiveRemainder.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfacePrimitiveError + +namespace OAI + +/-! One finite loss and one coefficient profile control all metric components +of the actual periodic primitive, before the slow map is selected. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_primitive_remainder {a : JetPolynomial.Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hamp : l.HasSpatialAmplitude a) {S : TopologicalSpace.Opens JetPolynomial.Base} + {K : Set LowJet} (hK : IsCompact K) (hKO : K ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hℓx : ℓ (coordinateVector 0) = 1) (hℓy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGK : MapsTo (lowJet G) S K) (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m+(2*(n+1)+1)) B (lowJet G) → + let g := l.geometry G hG (fun _ hp => hKO (hGK hp)) + ∀ U : ℕ → Family S Euclidean, + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + U 0 = g.initial → (g.yyCoefficient U 1).fluct = 0 → + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector 0) U r).fluct = 0 ∧ + (g.yyCoefficient U (r+1)).fluct = 0) → + ∀ b c : Bool, WeightedBound S z m (D*z^(n+1)/s^loss) + (fun p => inner ℝ + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (G q)) + U ℓ (n+1) z) p + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c))- + (l.meanOperator n b c z G p+(if b && c then a p^2 else 0))) := by + classical + choose d hd using fun bc : Bool × Bool => l.compact_primitive_error ha hamp hK hKO n bc.1 bc.2 ℓ hℓx hℓy + let loss := Finset.univ.sup d + refine ⟨loss,?_⟩ + intro m B hB + choose C hC hc using fun bc : Bool × Bool => hd bc m B hB + let D := ∑ bc : Bool × Bool, C bc + have hD : 0 ≤ D := Finset.sum_nonneg (fun bc _ => hC bc) + have hCD (bc : Bool × Bool) : C bc ≤ D := + Finset.single_le_sum (fun bc _ => hC bc) (Finset.mem_univ _) + refine ⟨D,hD,?_⟩ + intro G hG hGK s z hz hzs hs1 hGb g U hU hinit hy hcoeff b c + have hs : 0 < s := hz.trans_le hzs + have hmean := l.meanOperator_smooth hG (fun _ hp => hKO (hGK hp)) n b c z + have hzero : WeightedBound S s m 0 + (l.meanOperator n b c z G-l.meanOperator n b c z G) := by + have he : l.meanOperator n b c z G-l.meanOperator n b c z G = (fun _ => (0 : ℝ)) := by + funext p + exact sub_self _ + rw [he] + exact weightedBound_zero (S : Set JetPolynomial.Base) s m (F := ℝ) + have hb := hc (b,c) G hG hGK s z hz hzs hs1 hGb U hU hinit hy hcoeff + (l.meanOperator n b c z G) hmean 0 hzero + simp only [add_zero] at hb + apply hb.mono_const + have hdl : d (b,c) ≤ loss := Finset.le_sup (Finset.mem_univ _) + have hp : s^loss ≤ s^d (b,c) := pow_le_pow_of_le_one hs.le hs1 hdl + calc + C (b,c)*z^(n+1)/s^d (b,c) ≤ D*z^(n+1)/s^d (b,c) := + div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right (hCD (b,c)) (pow_nonneg hz.le _)) (pow_nonneg hs.le _) + _ ≤ D*z^(n+1)/s^loss := div_le_div_of_nonneg_left + (mul_nonneg hD (pow_nonneg hz.le _)) (pow_pos hs _) hp + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformScaledLongitudinalProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformScaledLongitudinalProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..43d207cfa5f814d519a2668e15b7829714eddc6e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformScaledLongitudinalProfile.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SecondCoefficientProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.HigherLongitudinalProfiles +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanPolynomial +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityIdentities + +namespace OAI + +/-! Uniform control of the rescaled longitudinal second derivative of +the actual finite primitive. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.JetVelocityCoordinates +open JetPolynomial + +lemma slot_x_derivative {G : Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) (p : Base) : + fderiv ℝ (fun q => slot 1 (lowJet G q)) p (coordinateVector 0) = slot 3 (lowJet G p) := by + funext a + have hs := (slot_smooth 1).comp (lowJet_smooth hG) + have he := congrArg (fun L : Base →L[ℝ] ℝ => L (coordinateVector 0)) + (fderiv_apply (hs.differentiable (by simp) p) a) + calc + _ = fderiv ℝ (fun q => lowJet G q (.inr (1,a))) p (coordinateVector 0) := he.symm + _ = lowDerivative G 0 p (.inr (1,a)) := lowJet_coordinate_derivative G 0 _ p + _ = slot 3 (lowJet G p) a := rfl + +lemma euclidean_x_derivative {G : Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) (p : Base) : + fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (slot 1 (lowJet G q))) p + (coordinateVector 0) = JetVelocityCoordinates.toEuclidean (slot 3 (lowJet G p)) := by + have hs := (slot_smooth 1).comp (lowJet_smooth hG) + have hd := (JetVelocityCoordinates.toEuclidean.hasFDerivAt.comp p + (hs.differentiable (by simp) p).hasFDerivAt).fderiv + calc + _ = JetVelocityCoordinates.toEuclidean + (fderiv ℝ (fun q => slot 1 (lowJet G q)) p (coordinateVector 0)) := + congrArg (fun L : Base →L[ℝ] Euclidean => L (coordinateVector 0)) hd + _ = _ := congrArg JetVelocityCoordinates.toEuclidean (slot_x_derivative hG p) + +lemma norm_slot_le (j : Fin 7) (J : LowJet) : ‖slot j J‖ ≤ ‖J‖ := by + apply (pi_norm_le_iff_of_nonneg (norm_nonneg J)).mpr + intro a + exact norm_le_pi_norm J (.inr (j,a)) + +end ClosedSurfaceR4.JetVelocityCoordinates + +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_scaled_longitudinal_profile {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (hx : ℓ (coordinateVector 0) = 1) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G), + MapsTo (lowJet G) S Q → ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + ∀ p ∈ S, + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + let f := finiteAnsatz F U ℓ (n+1) z + ‖z • PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 0)) + (coordinateVector 0) p-(U 0).angle.angle.fastValue ℓ z p‖ ≤ D*z/s^loss := by + obtain ⟨loss,hb⟩ := VectorExpression.compact_coefficient_two_jets (S := S) O.isOpen hQ hQO + (l.coefficientExpressions n) (n+1) (2*n+2) (by omega) + (fun i _ => l.coefficientExpressions_smooth n i) + (fun i hi a => (MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n i a).trans (by omega)) ℓ + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := hb B hB + let K := ‖JetVelocityCoordinates.toEuclidean.toContinuousLinearMap‖ + have hB0 : 0 ≤ B := zero_le_one.trans hB + have hK : 0 ≤ K := norm_nonneg _ + have hsum : 0 ≤ D+K*B := add_nonneg hD (mul_nonneg hK hB0) + refine ⟨4*(n+1)*(D+K*B),mul_nonneg (by positivity) hsum,?_⟩ + intro G hG hGQ s z hz hzs hs1 hGb U hU hrep p hp + let W := globalCoefficients U hU + have hs : 0 < s := hz.trans_le hzs + have hc := hd G s z hz hzs hs1 hG hGQ hGb U (fun i _ => hrep i) + have hC : 0 ≤ (D+K*B)/s^loss := div_nonneg hsum (pow_nonneg hs.le _) + have hCD : D/s^loss ≤ (D+K*B)/s^loss := div_le_div_of_nonneg_right + (le_add_of_nonneg_right (mul_nonneg hK hB0)) (pow_nonneg hs.le _) + have hb2 (i : ℕ) (hi : i < n+1) (k j : Fin 3) : + ‖(globalCoefficientDerivative (globalCoefficientDerivative (W i) k) j).fastValue ℓ z p‖ ≤ + (D+K*B)/s^loss := by + change ‖(globalCoefficientDerivative (globalCoefficientDerivative (W i) k) j).val p + ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [global_second_coefficientDerivative_eq_local (W i) (U i) rfl k j hp] + exact (hc i hi k j p hp).2.trans hCD + have hfirst : PeriodicExpansion.directionalMap (fun q => JetVelocityCoordinates.toEuclidean (G q)) + (coordinateVector 0) = fun q => JetVelocityCoordinates.toEuclidean (slot 1 (lowJet G q)) := + funext (euclidean_first_derivative hG 0) + have hFxx : ‖PeriodicExpansion.directionalMap + (PeriodicExpansion.directionalMap (fun q => JetVelocityCoordinates.toEuclidean (G q)) + (coordinateVector 0)) (coordinateVector 0) p‖ ≤ (D+K*B)/s^loss := by + rw [hfirst] + change ‖fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (slot 1 (lowJet G q))) p + (coordinateVector 0)‖ ≤ _ + rw [euclidean_x_derivative hG] + have hv : ‖JetVelocityCoordinates.toEuclidean (slot 3 (lowJet G p))‖ ≤ K*B := + (JetVelocityCoordinates.toEuclidean.toContinuousLinearMap.le_opNorm _).trans + (mul_le_mul_of_nonneg_left ((norm_slot_le 3 _).trans (hGb.norm_le hp)) hK) + apply hv.trans + apply (le_div_iff₀ (pow_pos hs _)).mpr + exact (mul_le_of_le_one_right (mul_nonneg hK hB0) (pow_le_one₀ hs.le hs1)).trans + (le_add_of_nonneg_left hD) + have hout := PeriodicExpansion.scaled_longitudinal_profile_of_coefficients + (JetVelocityCoordinates.toEuclidean.contDiff.comp hG) W ℓ n hx hz (hzs.trans hs1) hC hFxx + (fun i hi => hb2 i hi 0 0) (fun i hi => hb2 i hi 0 2) + (fun i hi => hb2 i hi 2 0) (fun i hi => hb2 i hi 2 2) + have he : (4*((n : ℝ)+1))*((D+K*B)/s^loss)*z = (4*((n : ℝ)+1))*(D+K*B)*z/s^loss := by ring + rw [he] at hout + have hlead : (W 0).angle.angle.fastValue ℓ z p = (U 0).angle.angle.fastValue ℓ z p := + global_second_coefficientDerivative_eq_local (W 0) (U 0) rfl 2 2 hp _ + rw [hlead] at hout + simpa only [W,globalCoefficients_finiteAnsatz,Function.comp_def, + Nat.cast_add,Nat.cast_one,Nat.cast_mul,Nat.cast_ofNat] using hout + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformTransverseProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformTransverseProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ccde7013af390ecc85250923eabb7fd626d3165 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/UniformTransverseProfiles.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseCoefficientBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCoefficientProfiles +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanPolynomial + +namespace OAI + +/-! The actual primitive's transverse first and second derivatives approach +the slow baseline uniformly over all maps in the fixed compact jet domain. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem uniform_transverse_profiles {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (hy : ℓ (coordinateVector 1) = 0) : + ∃ loss : ℕ, ∀ B : ℝ, 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G), + MapsTo (lowJet G) S Q → ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s ((2*n+2)+2) B (lowJet G) → + ∀ U : ℕ → Family S Euclidean, + (∀ i, ContDiff ℝ ∞ (fun y : JetPolynomial.Base × ℝ => (U i).val y.1 (y.2 : Period))) → + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) → + ∀ p ∈ S, + let F := fun q => JetVelocityCoordinates.toEuclidean (G q) + let f := finiteAnsatz F U ℓ (n+1) z + ‖PeriodicExpansion.directionalMap f (coordinateVector 1) p- + PeriodicExpansion.directionalMap F (coordinateVector 1) p‖ ≤ D*z/s^loss ∧ + ‖PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap f (coordinateVector 1)) + (coordinateVector 1) p- + PeriodicExpansion.directionalMap (PeriodicExpansion.directionalMap F (coordinateVector 1)) + (coordinateVector 1) p‖ ≤ D*z/s^loss := by + obtain ⟨loss,hb⟩ := VectorExpression.compact_transverse_coefficients (S := S) O.isOpen hQ hQO + (l.coefficientExpressions n) (n+1) (2*n+2) (by omega) + (fun i _ => l.coefficientExpressions_smooth n i) + (fun i hi a => (MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n i a).trans (by omega)) ℓ + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := hb B hB + refine ⟨(n+1)*D,mul_nonneg (by positivity) hD,?_⟩ + intro G hG hGQ s z hz hzs hs1 hGb U hU hrep p hp + let W := globalCoefficients U hU + have hw1 (i : ℕ) (q : JetPolynomial.Base) (hq : q ∈ S) (t : Period) : + ((W i).slow (coordinateVector 1)).val q t = + ((U i).slow (coordinateVector 1)).val q t := + global_slow_eq_local (W i) (U i) rfl (coordinateVector 1) hq t + have hw2 (i : ℕ) (q : JetPolynomial.Base) (hq : q ∈ S) (t : Period) : + (((W i).slow (coordinateVector 1)).slow (coordinateVector 1)).val q t = + (((U i).slow (coordinateVector 1)).slow (coordinateVector 1)).val q t := + global_slow_eq_local_of_eqOn ((W i).slow (coordinateVector 1)) + ((U i).slow (coordinateVector 1)) (hw1 i) (coordinateVector 1) hq t + have hc := hd G s z hz hzs hs1 hG hGQ hGb U (fun i _ => hrep i) + have hC : 0 ≤ D/s^loss := div_nonneg hD (pow_nonneg (hz.le.trans hzs) _) + have hfirst (i : ℕ) (hi : i < n+1) : + ‖((W i).slow (coordinateVector 1)).fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖((W i).slow (coordinateVector 1)).val p ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [hw1 i p hp] + exact hc i hi false p hp + have hsecond (i : ℕ) (hi : i < n+1) : + ‖(((W i).slow (coordinateVector 1)).slow (coordinateVector 1)).fastValue ℓ z p‖ ≤ D/s^loss := by + change ‖(((W i).slow (coordinateVector 1)).slow (coordinateVector 1)).val p + ((ℓ p/z : ℝ) : Period)‖ ≤ _ + rw [hw2 i p hp] + exact hc i hi true p hp + have hout := PeriodicExpansion.transverse_profiles_of_coefficients + (JetVelocityCoordinates.toEuclidean.contDiff.comp hG) W ℓ (n+1) hy hz (hzs.trans hs1) hC hfirst hsecond + have he : ((n+1 : ℕ) : ℝ)*(D/s^loss)*z = ((n+1 : ℕ) : ℝ)*D*z/s^loss := by ring + rw [he] at hout + simpa only [W,globalCoefficients_finiteAnsatz,Function.comp_def, + Nat.cast_add,Nat.cast_one,Nat.cast_mul,Nat.cast_ofNat] using hout + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityAngleInterpolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityAngleInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..a99fefb1ba83256196efa5d8cb802ee42a842342 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityAngleInterpolation.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityTurns + +namespace OAI + +/-! Interpolate the collar angle to a circle-covering interior angle without extra turns. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def blendedAngle (a A s h t : ℝ) : ℝ := + h + (1 - s) * baseAngle a t + s * (A * Real.cos t) + +lemma hasDerivAt_blendedAngle (a A s h t : ℝ) : + HasDerivAt (blendedAngle a A s h) + (-Real.sin t * ((1 - s) * (2 * a / (1 + (a * Real.cos t) ^ 2)) + s * A)) t := by + have hd := (((hasDerivAt_baseAngle a t).const_mul (1 - s)).add + (((Real.hasDerivAt_cos t).const_mul A).const_mul s)).const_add h + convert hd using 1 + · funext u + simp only [blendedAngle, Pi.add_apply] + ring + · ring + +lemma blended_speed_positive {a A s : ℝ} (ha : 0 < a) (hA : 0 < A) + (hs : 0 ≤ s) (hs1 : s ≤ 1) (t : ℝ) : + 0 < (1 - s) * (2 * a / (1 + (a * Real.cos t) ^ 2)) + s * A := by + have hd : 0 < 2 * a / (1 + (a * Real.cos t) ^ 2) := + div_pos (by positivity) (arcDen_pos a t) + by_cases hz : s = 0 + · simpa only [hz, sub_zero, one_mul, zero_mul, add_zero] using hd + · exact add_pos_of_nonneg_of_pos + (mul_nonneg (sub_nonneg.mpr hs1) hd.le) (mul_pos (lt_of_le_of_ne hs (Ne.symm hz)) hA) + +/-- All interpolation parameters preserve the same two stationary positions. -/ +lemma blended_deriv_eq_zero_iff {a A s : ℝ} (ha : 0 < a) (hA : 0 < A) + (hs : 0 ≤ s) (hs1 : s ≤ 1) (h t : ℝ) : + deriv (blendedAngle a A s h) t = 0 ↔ Real.sin t = 0 := by + rw [(hasDerivAt_blendedAngle a A s h t).deriv] + simp [(blended_speed_positive ha hA hs hs1 t).ne'] + +lemma blendedAngle_zero (a A s h : ℝ) : + blendedAngle a A s h 0 = h + ((1 - s) * (2 * Real.arctan a) + s * A) := by + simp [blendedAngle, baseAngle] + ring + +lemma blendedAngle_pi (a A s h : ℝ) : + blendedAngle a A s h Real.pi = h - ((1 - s) * (2 * Real.arctan a) + s * A) := by + simp [blendedAngle, baseAngle, Real.arctan_neg] + ring + +/-- The interior angle covers every direction once its amplitude exceeds pi. -/ +lemma interior_angle_covers {A β : ℝ} (hA : Real.pi ≤ A) + (hβ : β ∈ Set.Icc (-Real.pi) Real.pi) : + ∃ t ∈ Set.Icc (0 : ℝ) Real.pi, A * Real.cos t = β := by + have hAp : 0 < A := lt_of_lt_of_le Real.pi_pos hA + have hl : -1 ≤ β / A := (le_div_iff₀ hAp).2 (by linarith [hβ.1]) + have hu : β / A ≤ 1 := (div_le_iff₀ hAp).2 (by linarith [hβ.2]) + refine ⟨Real.arccos (β / A), ⟨Real.arccos_nonneg _, Real.arccos_le_pi _⟩, ?_⟩ + rw [Real.cos_arccos hl hu] + field_simp + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCircleLift.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCircleLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b8b39d1fdba2a096524d7e032b2c3734a0aaaf2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCircleLift.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityMoments + +namespace OAI + +/-! Lift a normalized planar loop to the actual four-dimensional velocity +plane, retaining its exact mean, length, and leading metric. -/ +noncomputable section +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +/-- The fixed orthonormal-plane inclusion, written as a continuous linear map. -/ +def planeLift (e₁ e₂ : Vec) : LoopDensity.Plane →L[ℝ] Vec := + (ContinuousLinearMap.proj 0).smulRight e₁ + (ContinuousLinearMap.proj 1).smulRight e₂ + +@[simp] lemma planeLift_apply (e₁ e₂ : Vec) (p : LoopDensity.Plane) : + planeLift e₁ e₂ p = p 0 • e₁ + p 1 • e₂ := rfl + +lemma planeLift_unit {e₁ e₂ : Vec} {p : LoopDensity.Plane} + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hp : p 0 ^ 2 + p 1 ^ 2 = 1) : + planeLift e₁ e₂ p ⬝ᵥ planeLift e₁ e₂ p = 1 := by + have horth' : e₂ ⬝ᵥ e₁ = 0 := (dotProduct_comm _ _).trans horth + simp only [planeLift_apply, add_dotProduct, dotProduct_add, smul_dotProduct, + dotProduct_smul, smul_eq_mul, h₁, h₂, horth, horth', mul_zero, zero_add, add_zero, mul_one] + nlinarith + +lemma planeLift_perp {e₁ e₂ w : Vec} (h₁ : w ⬝ᵥ e₁ = 0) (h₂ : w ⬝ᵥ e₂ = 0) + (p : LoopDensity.Plane) : w ⬝ᵥ planeLift e₁ e₂ p = 0 := by + simp [planeLift_apply, dotProduct_add, dotProduct_smul, h₁, h₂] + +lemma planeLift_scaled_length {e₁ e₂ : Vec} {p : LoopDensity.Plane} + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hp : p 0 ^ 2 + p 1 ^ 2 = 1) (R : ℝ) : + (R • planeLift e₁ e₂ p) ⬝ᵥ (R • planeLift e₁ e₂ p) = R ^ 2 := by + rw [smul_dotProduct, dotProduct_smul, smul_eq_mul, smul_eq_mul, + planeLift_unit h₁ h₂ horth hp] + ring + +lemma planeLift_mean (e₁ e₂ : Vec) (R : ℝ) {p : ℝ → LoopDensity.Plane} + (hp : Continuous p) {c : LoopDensity.Plane} (hmean : (∫ t in 0..1, p t) = c) : + (∫ t in 0..1, R • planeLift e₁ e₂ (p t)) = R • planeLift e₁ e₂ c := by + rw [intervalIntegral.integral_smul] + have hi : IntervalIntegrable p MeasureTheory.volume 0 1 := hp.intervalIntegrable 0 1 + have he := (planeLift e₁ e₂).intervalIntegral_comp_comm hi + change R • (∫ t in 0..1, (planeLift e₁ e₂) (p t)) = _ + rw [he, hmean] + +/-- The real coordinate form of the leading rank-one metric identity. -/ +theorem real_leading_metric {X Y C V : Vec} {a : ℝ} + (hD : gramDet Y C ≠ 0) (hYV : Y ⬝ᵥ V = 0) (hCV : C ⬝ᵥ V = 0) + (hR : V ⬝ᵥ V = realNormalPart Y C X ⬝ᵥ realNormalPart Y C X + a ^ 2) : + leadingTangent X Y C V ⬝ᵥ leadingTangent X Y C V = X ⬝ᵥ X + a ^ 2 ∧ + leadingTangent X Y C V ⬝ᵥ Y = X ⬝ᵥ Y := by + let P := realNormalPart Y C X + have hP := realNormalPart_perp Y C X hD + have hVP : V ⬝ᵥ P = V ⬝ᵥ X := + dot_normalPart_eq ((dotProduct_comm _ _).trans hYV) ((dotProduct_comm _ _).trans hCV) + have hPP : P ⬝ᵥ P = P ⬝ᵥ X := + dot_normalPart_eq ((dotProduct_comm _ _).trans hP.1) ((dotProduct_comm _ _).trans hP.2) + constructor + · change (X - P + V) ⬝ᵥ (X - P + V) = _ + simp only [add_dotProduct, sub_dotProduct, dotProduct_add, dotProduct_sub] + have hPV := (dotProduct_comm P V).trans hVP + have hXP := (dotProduct_comm X P).trans hPP.symm + have hXV := dotProduct_comm X V + change V ⬝ᵥ V = P ⬝ᵥ P + a ^ 2 at hR + linarith + · change (X - P + V) ⬝ᵥ Y = _ + simp only [add_dotProduct, sub_dotProduct] + rw [(dotProduct_comm P Y).trans hP.1, (dotProduct_comm V Y).trans hYV] + ring + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCoordinateData.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCoordinateData.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb9d1c6348c9825107d826cb3ab352b542b2f5b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityCoordinateData.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityPlaneBasis + +namespace OAI + +/-! Smooth velocity coordinates and their calibrated collar values. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma dot_smoothOn {f g : E → Vec} {U : Set E} + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) : + ContDiffOn ℝ ∞ (fun x => f x ⬝ᵥ g x) U := + ContDiffOn.sum (fun i _ => (contDiffOn_pi.mp hf i).mul (contDiffOn_pi.mp hg i)) + +lemma plane_coordinates_smoothOn {v e₁ e₂ : E → Vec} {U : Set E} + (hv : ContDiffOn ℝ ∞ v U) (h₁ : ContDiffOn ℝ ∞ e₁ U) + (h₂ : ContDiffOn ℝ ∞ e₂ U) : + ContDiffOn ℝ ∞ (fun x => planeCoordinates (e₁ x) (e₂ x) (v x)) U := by + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact dot_smoothOn hv h₁ + · exact dot_smoothOn hv h₂ + +lemma norm_smul_normalize {v : Vec} (hv : v ≠ 0) : + Real.sqrt (v ⬝ᵥ v) • normalize v = v := by + simp [normalize, smul_smul, (Real.sqrt_pos.mpr (dot_self_pos hv)).ne'] + +lemma dot_normalize_self {v : Vec} (hv : v ≠ 0) : + v ⬝ᵥ normalize v = Real.sqrt (v ⬝ᵥ v) := by + have hp := dot_self_pos hv + have hn := (Real.sqrt_pos.mpr hp).ne' + simp only [normalize, dotProduct_smul, smul_eq_mul] + apply (inv_mul_eq_iff_eq_mul₀ hn).mpr + nlinarith [Real.sq_sqrt hp.le] + +lemma collar_coordinates {v e₁ e₂ : Vec} (hv : v ≠ 0) + (he : e₁ = normalize v) (horth : e₁ ⬝ᵥ e₂ = 0) : + 0 < v ⬝ᵥ e₁ ∧ v ⬝ᵥ e₂ = 0 := by + refine ⟨?_, ?_⟩ + · rw [he, dot_normalize_self hv] + exact Real.sqrt_pos.mpr (dot_self_pos hv) + · calc + v ⬝ᵥ e₂ = (Real.sqrt (v ⬝ᵥ v) • e₁) ⬝ᵥ e₂ := by rw [he, norm_smul_normalize hv] + _ = 0 := by rw [smul_dotProduct, horth, smul_zero] + +def velocityRadius (v : Vec) (a : ℝ) : ℝ := Real.sqrt (v ⬝ᵥ v + a ^ 2) + +lemma velocityRadius_sq (v : Vec) (a : ℝ) : + velocityRadius v a ^ 2 = v ⬝ᵥ v + a ^ 2 := by + apply Real.sq_sqrt + exact add_nonneg (Finset.sum_nonneg fun i _ => mul_self_nonneg (v i)) (sq_nonneg a) + +lemma velocityRadius_pos {v : Vec} {a : ℝ} (h : v ≠ 0 ∨ a ≠ 0) : + 0 < velocityRadius v a := by + apply Real.sqrt_pos.mpr + rcases h with hv | ha + · exact add_pos_of_pos_of_nonneg (dot_self_pos hv) (sq_nonneg a) + · exact add_pos_of_nonneg_of_pos + (Finset.sum_nonneg fun i _ => mul_self_nonneg (v i)) (sq_pos_of_ne_zero ha) + +lemma velocityRadius_smoothOn {v : E → Vec} {a : E → ℝ} {U : Set E} + (hv : ContDiffOn ℝ ∞ v U) (ha : ContDiffOn ℝ ∞ a U) + (hn : ∀ x ∈ U, v x ≠ 0 ∨ a x ≠ 0) : + ContDiffOn ℝ ∞ (fun x => velocityRadius (v x) (a x)) U := by + apply ((dot_smoothOn hv hv).add (ha.pow 2)).sqrt + intro x hx + have hp := velocityRadius_pos (hn x hx) + exact (Real.sqrt_pos.mp hp).ne' + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..d575183ee7a2408b2477327df08e0a0f4074fa4c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityFrame.lean @@ -0,0 +1,188 @@ +import OAI.Geometry.Immersion.ClosedSurface.NormalProjection +import OAI.Geometry.Immersion.ClosedSurface.NormalJets + +namespace OAI + +/-! Smooth orthonormal frames obtained by interpolating non-antipodal plane directions. -/ +noncomputable section +open scoped Matrix ContDiff + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +def normalize (v : Vec) : Vec := (Real.sqrt (v ⬝ᵥ v))⁻¹ • v + +lemma dot_self_pos {v : Vec} (hv : v ≠ 0) : 0 < v ⬝ᵥ v := by + have hn : 0 ≤ v ⬝ᵥ v := Finset.sum_nonneg (fun i _ => mul_self_nonneg (v i)) + exact hn.lt_of_ne' ((dotProduct_self_eq_zero).not.mpr hv) + +lemma normalize_unit {v : Vec} (hv : v ≠ 0) : normalize v ⬝ᵥ normalize v = 1 := by + have hp := dot_self_pos hv + have hs : Real.sqrt (v ⬝ᵥ v) ≠ 0 := (Real.sqrt_pos.mpr hp).ne' + simp only [normalize, smul_dotProduct, dotProduct_smul, smul_eq_mul] + have heq := Real.sq_sqrt hp.le + field_simp + nlinarith [heq] + +lemma dot_normalize_zero {v w : Vec} (h : w ⬝ᵥ v = 0) : w ⬝ᵥ normalize v = 0 := by + simp [normalize, dotProduct_smul, h] + +lemma normalize_nonzero {v : Vec} (hv : v ≠ 0) : normalize v ≠ 0 := by + intro hz + have hu := normalize_unit hv + rw [hz] at hu + norm_num at hu + +def blend (u v : Vec) (t : ℝ) : Vec := (1 - t) • u + t • v + +lemma blend_nonzero_of_not_opposite {u v : Vec} {t : ℝ} + (hv : v ≠ 0) (ht : t ∈ Set.Icc (0 : ℝ) 1) (hu : t = 0 → u ≠ 0) + (hanti : t < 1 → ∀ r : ℝ, 0 < r → u ≠ -r • v) : blend u v t ≠ 0 := by + by_cases ht0 : t = 0 + · simpa [blend, ht0] using hu ht0 + by_cases ht1 : t = 1 + · simpa [blend, ht1] using hv + have htpos : 0 < t := lt_of_le_of_ne ht.1 (Ne.symm ht0) + have htlt : t < 1 := lt_of_le_of_ne ht.2 ht1 + have hden : 0 < 1 - t := sub_pos.mpr htlt + intro hz + apply hanti htlt (t / (1 - t)) (div_pos htpos hden) + ext i + have hi : (1 - t) * u i + t * v i = 0 := congrFun hz i + change u i = -(t / (1 - t)) * v i + field_simp [hden.ne'] + linear_combination hi + +lemma blend_nonzero {u v : Vec} (hu : u ⬝ᵥ u = 1) (hv : v ⬝ᵥ v = 1) + (huv : -1 < u ⬝ᵥ v) {t : ℝ} (ht : t ∈ Set.Icc (0 : ℝ) 1) : blend u v t ≠ 0 := by + by_cases ht0 : t = 0 + · intro hz + have huz : u = 0 := by simpa [blend, ht0] using hz + rw [huz] at hu + norm_num at hu + by_cases ht1 : t = 1 + · intro hz + have hvz : v = 0 := by simpa [blend, ht1] using hz + rw [hvz] at hv + norm_num at hv + have htpos : 0 < t := lt_of_le_of_ne ht.1 (Ne.symm ht0) + have htlt : t < 1 := lt_of_le_of_ne ht.2 ht1 + have hs : blend u v t ⬝ᵥ blend u v t = + (1 - 2 * t) ^ 2 + 2 * t * (1 - t) * (1 + u ⬝ᵥ v) := by + simp only [blend, add_dotProduct, dotProduct_add, smul_dotProduct, dotProduct_smul, + smul_eq_mul, hu, hv, dotProduct_comm v u] + ring + have hp : 0 < (1 - 2 * t) ^ 2 + 2 * t * (1 - t) * (1 + u ⬝ᵥ v) := + add_pos_of_nonneg_of_pos (sq_nonneg _) (mul_pos + (mul_pos (mul_pos (by norm_num) htpos) (sub_pos.mpr htlt)) (by linarith)) + intro hz + rw [hz] at hs + simp only [dotProduct_zero] at hs + linarith + +def first (u v : Vec) (t : ℝ) : Vec := normalize (blend u v t) + +lemma first_unit {u v : Vec} (hu : u ⬝ᵥ u = 1) (hv : v ⬝ᵥ v = 1) + (huv : -1 < u ⬝ᵥ v) {t : ℝ} (ht : t ∈ Set.Icc (0 : ℝ) 1) : + first u v t ⬝ᵥ first u v t = 1 := normalize_unit (blend_nonzero hu hv huv ht) + +lemma first_perp {u v w : Vec} (hu : w ⬝ᵥ u = 0) (hv : w ⬝ᵥ v = 0) (t : ℝ) : + w ⬝ᵥ first u v t = 0 := by + apply dot_normalize_zero + simp [blend, dotProduct_add, dotProduct_smul, hu, hv] + +lemma normalize_of_unit {v : Vec} (hv : v ⬝ᵥ v = 1) : normalize v = v := by + simp [normalize, hv] + +lemma first_zero {u v : Vec} (hu : u ⬝ᵥ u = 1) : first u v 0 = u := by + simpa [first, blend] using normalize_of_unit hu + +lemma first_one {u v : Vec} (hv : v ⬝ᵥ v = 1) : first u v 1 = v := by + simpa [first, blend] using normalize_of_unit hv + +def second (Y C u v : Vec) (t : ℝ) : Vec := unitPerp Y C (first u v t) + +theorem frame_orthonormal_of_nonzero {Y C u v : Vec} {t : ℝ} + (hD : gramDet Y C ≠ 0) (hn : blend u v t ≠ 0) + (hYu : Y ⬝ᵥ u = 0) (hYv : Y ⬝ᵥ v = 0) + (hCu : C ⬝ᵥ u = 0) (hCv : C ⬝ᵥ v = 0) : + first u v t ⬝ᵥ first u v t = 1 ∧ + second Y C u v t ⬝ᵥ second Y C u v t = 1 ∧ + first u v t ⬝ᵥ second Y C u v t = 0 ∧ + Y ⬝ᵥ first u v t = 0 ∧ C ⬝ᵥ first u v t = 0 ∧ + Y ⬝ᵥ second Y C u v t = 0 ∧ C ⬝ᵥ second Y C u v t = 0 := by + have hfirst := normalize_unit hn + have hnonzero := normalize_nonzero hn + have hY := first_perp hYu hYv t + have hC := first_perp hCu hCv t + have hsecond := unitPerp_unit hD hnonzero hY hC + have horth := unitPerp_orthogonal Y C (first u v t) + exact ⟨hfirst, hsecond, horth.2.2, hY, hC, horth.1, horth.2.1⟩ + +theorem frame_orthonormal {Y C u v : Vec} {t : ℝ} + (hD : gramDet Y C ≠ 0) (hu : u ⬝ᵥ u = 1) (hv : v ⬝ᵥ v = 1) + (huv : -1 < u ⬝ᵥ v) (ht : t ∈ Set.Icc (0 : ℝ) 1) + (hYu : Y ⬝ᵥ u = 0) (hYv : Y ⬝ᵥ v = 0) + (hCu : C ⬝ᵥ u = 0) (hCv : C ⬝ᵥ v = 0) : + first u v t ⬝ᵥ first u v t = 1 ∧ + second Y C u v t ⬝ᵥ second Y C u v t = 1 ∧ + first u v t ⬝ᵥ second Y C u v t = 0 ∧ + Y ⬝ᵥ first u v t = 0 ∧ C ⬝ᵥ first u v t = 0 ∧ + Y ⬝ᵥ second Y C u v t = 0 ∧ C ⬝ᵥ second Y C u v t = 0 := by + have hfirst := first_unit hu hv huv ht + have hnonzero : first u v t ≠ 0 := by + intro hz + rw [hz] at hfirst + norm_num at hfirst + have hY := first_perp hYu hYv t + have hC := first_perp hCu hCv t + have hsecond := unitPerp_unit hD hnonzero hY hC + have horth := unitPerp_orthogonal Y C (first u v t) + exact ⟨hfirst, hsecond, horth.2.2, hY, hC, horth.1, horth.2.1⟩ + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma normalize_smoothAt {v : E → Vec} {x : E} (hv : ContDiffAt ℝ ∞ v x) (hn : v x ≠ 0) : + ContDiffAt ℝ ∞ (fun z => normalize (v z)) x := by + have hd : ContDiffAt ℝ ∞ (fun z => v z ⬝ᵥ v z) x := + ContDiffAt.sum (fun i _ => (contDiffAt_pi.mp hv i).mul (contDiffAt_pi.mp hv i)) + have hp := dot_self_pos hn + exact ((hd.sqrt hp.ne').inv (Real.sqrt_pos.mpr hp).ne').smul hv + +lemma first_smoothAt {u v : E → Vec} {t : E → ℝ} {x : E} + (hu : ContDiffAt ℝ ∞ u x) (hv : ContDiffAt ℝ ∞ v x) (ht : ContDiffAt ℝ ∞ t x) + (hu1 : u x ⬝ᵥ u x = 1) (hv1 : v x ⬝ᵥ v x = 1) + (huv : -1 < u x ⬝ᵥ v x) (ht01 : t x ∈ Set.Icc (0 : ℝ) 1) : + ContDiffAt ℝ ∞ (fun z => first (u z) (v z) (t z)) x := + normalize_smoothAt (((contDiffAt_const.sub ht).smul hu).add (ht.smul hv)) + (blend_nonzero hu1 hv1 huv ht01) + +lemma first_smoothAt_of_nonzero {u v : E → Vec} {t : E → ℝ} {x : E} + (hu : ContDiffAt ℝ ∞ u x) (hv : ContDiffAt ℝ ∞ v x) (ht : ContDiffAt ℝ ∞ t x) + (hn : blend (u x) (v x) (t x) ≠ 0) : + ContDiffAt ℝ ∞ (fun z => first (u z) (v z) (t z)) x := + normalize_smoothAt (((contDiffAt_const.sub ht).smul hu).add (ht.smul hv)) hn + +lemma second_smoothAt {Y C u v : E → Vec} {t : E → ℝ} {x : E} + (hY : ContDiffAt ℝ ∞ Y x) (hC : ContDiffAt ℝ ∞ C x) + (hu : ContDiffAt ℝ ∞ u x) (hv : ContDiffAt ℝ ∞ v x) (ht : ContDiffAt ℝ ∞ t x) + (hD : gramDet (Y x) (C x) ≠ 0) + (hu1 : u x ⬝ᵥ u x = 1) (hv1 : v x ⬝ᵥ v x = 1) + (huv : -1 < u x ⬝ᵥ v x) (ht01 : t x ∈ Set.Icc (0 : ℝ) 1) + (hYu : Y x ⬝ᵥ u x = 0) (hYv : Y x ⬝ᵥ v x = 0) + (hCu : C x ⬝ᵥ u x = 0) (hCv : C x ⬝ᵥ v x = 0) : + ContDiffAt ℝ ∞ (fun z => second (Y z) (C z) (u z) (v z) (t z)) x := by + have hfirst := first_smoothAt hu hv ht hu1 hv1 huv ht01 + have hnonzero : first (u x) (v x) (t x) ≠ 0 := by + intro hz + have he := first_unit hu1 hv1 huv ht01 + rw [hz] at he + norm_num at he + exact contDiffAt_unitPerp hY hC hfirst hD hnonzero + (first_perp hYu hYv _) (first_perp hCu hCv _) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..fdee7bf53ef49b425d256a97636afdfa035bf6e8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalBounds.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalNonvanishing +import OAI.Geometry.Immersion.ClosedSurface.NormalJets + +namespace OAI + +/-! Smoothness and compact positive lower bounds for the limiting normal component. -/ +noncomputable section +open Set +open scoped Matrix ContDiff + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +def leadingNormal (X Y C V : Vec) : Vec := + realNormalPart (leadingTangent X Y C V) Y C + +def normalSize (X Y C V : Vec) : ℝ := + Real.sqrt (leadingNormal X Y C V ⬝ᵥ leadingNormal X Y C V) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {X Y C V : E → Vec} {U : Set E} + +lemma leadingTangent_smoothOn (hU : IsOpen U) + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hC : ContDiffOn ℝ ∞ C U) (hV : ContDiffOn ℝ ∞ V U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) : + ContDiffOn ℝ ∞ (fun x => leadingTangent (X x) (Y x) (C x) (V x)) U := by + intro x hx + have hm := hU.mem_nhds hx + exact (((hX.contDiffAt hm).sub (contDiffAt_realNormalPart + (hY.contDiffAt hm) (hC.contDiffAt hm) (hX.contDiffAt hm) (hD x hx))).add + (hV.contDiffAt hm)).contDiffWithinAt + +lemma leadingNormal_smoothOn (hU : IsOpen U) + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hC : ContDiffOn ℝ ∞ C U) (hV : ContDiffOn ℝ ∞ V U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hYV : ∀ x ∈ U, Y x ⬝ᵥ V x = 0) (hCV : ∀ x ∈ U, C x ⬝ᵥ V x = 0) + (hV0 : ∀ x ∈ U, V x ≠ 0) : + ContDiffOn ℝ ∞ (fun x => leadingNormal (X x) (Y x) (C x) (V x)) U := by + have hT := leadingTangent_smoothOn hU hX hY hC hV hD + intro x hx + have hm := hU.mem_nhds hx + exact (contDiffAt_realNormalPart (hT.contDiffAt hm) (hY.contDiffAt hm) + (hC.contDiffAt hm) (leading_normal_nondegenerate (hD x hx) + (hYV x hx) (hCV x hx) (hV0 x hx)).1).contDiffWithinAt + +lemma normalSize_positive {X Y C V : Vec} (hD : gramDet Y C ≠ 0) + (hYV : Y ⬝ᵥ V = 0) (hCV : C ⬝ᵥ V = 0) (hV : V ≠ 0) : + 0 < normalSize X Y C V := + Real.sqrt_pos.mpr (dot_self_pos (leading_normal_nondegenerate hD hYV hCV hV).2) + +/-- Both the normal length and its reciprocal are uniformly controlled on compact data. -/ +theorem compact_normalSize_bounds (hU : IsOpen U) + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hC : ContDiffOn ℝ ∞ C U) (hV : ContDiffOn ℝ ∞ V U) + (hD : ∀ x ∈ U, gramDet (Y x) (C x) ≠ 0) + (hYV : ∀ x ∈ U, Y x ⬝ᵥ V x = 0) (hCV : ∀ x ∈ U, C x ⬝ᵥ V x = 0) + (hV0 : ∀ x ∈ U, V x ≠ 0) {K : Set E} (hK : IsCompact K) (hKU : K ⊆ U) : + ∃ c D : ℝ, 0 < c ∧ 0 < D ∧ ∀ x ∈ K, + c ≤ normalSize (X x) (Y x) (C x) (V x) ∧ + normalSize (X x) (Y x) (C x) (V x) ≤ D ∧ + 1 / normalSize (X x) (Y x) (C x) (V x) ≤ 1 / c := by + let S : E → ℝ := fun x => normalSize (X x) (Y x) (C x) (V x) + have hN := (leadingNormal_smoothOn hU hX hY hC hV hD hYV hCV hV0).continuousOn + have hS : ContinuousOn S K := by + apply ContinuousOn.sqrt + exact (continuousOn_finsetSum Finset.univ (fun i _ => + ((continuous_apply i).comp_continuousOn (hN.mono hKU)).mul + ((continuous_apply i).comp_continuousOn (hN.mono hKU)))) + have hpos (x : E) (hx : x ∈ K) : 0 < S x := + normalSize_positive (hD x (hKU hx)) (hYV x (hKU hx)) (hCV x (hKU hx)) (hV0 x (hKU hx)) + rcases K.eq_empty_or_nonempty with hzero | hne + · refine ⟨1, 1, zero_lt_one, zero_lt_one, ?_⟩ + simp [hzero] + obtain ⟨xmin, hxmin, hmin⟩ := hK.exists_isMinOn hne hS + obtain ⟨xmax, hxmax, hmax⟩ := hK.exists_isMaxOn hne hS + refine ⟨S xmin, S xmax, hpos xmin hxmin, hpos xmax hxmax, ?_⟩ + intro x hx + exact ⟨hmin hx, hmax hx, one_div_le_one_div_of_le (hpos xmin hxmin) (hmin hx)⟩ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalEstimates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..285a13b10a2bd5c7e1c5459787279defe9891026 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalEstimates.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalGeometry + +namespace OAI + +/-! Normal-component bounds independent of the chosen angular derivative. -/ +noncomputable section +open scoped Matrix BigOperators + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +lemma unit_coordinate_abs_le {m : Vec} (hm : m ⬝ᵥ m = 1) (i : Fin 4) : |m i| ≤ 1 := by + have hs : m i ^ 2 ≤ m ⬝ᵥ m := by + simpa only [dotProduct, pow_two] using + (Finset.single_le_sum (fun j (_ : j ∈ (Finset.univ : Finset (Fin 4))) => + mul_self_nonneg (m j)) (Finset.mem_univ i)) + rw [hm] at hs + exact (sq_le_one_iff_abs_le_one _).mp hs + +lemma abs_dot_unit_le (W : Vec) {m : Vec} (hm : m ⬝ᵥ m = 1) : + |W ⬝ᵥ m| ≤ 4 * ‖W‖ := by + calc + |W ⬝ᵥ m| ≤ ∑ i : Fin 4, |W i * m i| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ i : Fin 4, |W i| := by + apply Finset.sum_le_sum + intro i _ + rw [abs_mul] + exact mul_le_of_le_one_right (abs_nonneg _) (unit_coordinate_abs_le hm i) + _ ≤ 4 * ‖W‖ := by + simpa only [Real.norm_eq_abs, Fintype.card_fin, nsmul_eq_mul, Nat.cast_ofNat] using + Pi.sum_norm_apply_le_norm W + +theorem first_normal_bound {W m n : Vec} (hn : n ⬝ᵥ n = 1) (hmn : m ⬝ᵥ n = 0) (R d : ℝ) : + |(W + (R * d) • m) ⬝ᵥ n| ≤ 4 * ‖W‖ := by + rw [first_normal_derivative_independent hmn] + exact abs_dot_unit_le W hn + +theorem second_normal_error_bound {W m : Vec} (hm : m ⬝ᵥ m = 1) (R d : ℝ) : + |(W + (R * d) • m) ⬝ᵥ m - R * d| ≤ 4 * ‖W‖ := by + rw [second_normal_derivative hm] + simpa only [add_sub_cancel_left] using abs_dot_unit_le W hm + +/-- A fixed threshold is exceeded by a sufficiently large derivative at a turn. -/ +theorem turn_dominates {r R B M T C d E : ℝ} + (hr : 0 < r) (hR : r ≤ R) (hT : 0 ≤ T) (hC : 0 ≤ C) + (hB : M + (T + C + 1) / r < B) (hd : B - M ≤ d) (hE : |E| ≤ C) : + T + 1 < R * d + E := by + have hdiv : (T + C + 1) / r < B - M := by linarith + have hprod : T + C + 1 < r * (B - M) := by + have hh := (div_lt_iff₀ hr).mp hdiv + nlinarith + have hBM : 0 < B - M := by nlinarith + have hdpos : 0 < d := lt_of_lt_of_le hBM hd + have hscale : r * d ≤ R * d := mul_le_mul_of_nonneg_right hR hdpos.le + have hbase : r * (B - M) ≤ r * d := mul_le_mul_of_nonneg_left hd hr.le + have hElow : -C ≤ E := (abs_le.mp hE).1 + linarith + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..00aced500f75f2d71f6035e9ce063ee715213f3c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalGeometry.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalBounds + +namespace OAI + +/-! The angular derivative contributes only to the complementary normal component. -/ +noncomputable section +open scoped Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +def direction (e₁ e₂ : Vec) (α : ℝ) : Vec := Real.cos α • e₁ + Real.sin α • e₂ +def angularDirection (e₁ e₂ : Vec) (α : ℝ) : Vec := -Real.sin α • e₁ + Real.cos α • e₂ + +lemma direction_unit {e₁ e₂ : Vec} (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (horth : e₁ ⬝ᵥ e₂ = 0) (α : ℝ) : direction e₁ e₂ α ⬝ᵥ direction e₁ e₂ α = 1 := by + have horth' : e₂ ⬝ᵥ e₁ = 0 := (dotProduct_comm _ _).trans horth + simp only [direction, add_dotProduct, dotProduct_add, smul_dotProduct, dotProduct_smul, + smul_eq_mul, h₁, h₂, horth, horth', mul_zero, mul_one, zero_add, add_zero] + nlinarith [Real.sin_sq_add_cos_sq α] + +lemma angularDirection_unit {e₁ e₂ : Vec} (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (horth : e₁ ⬝ᵥ e₂ = 0) (α : ℝ) : + angularDirection e₁ e₂ α ⬝ᵥ angularDirection e₁ e₂ α = 1 := by + have horth' : e₂ ⬝ᵥ e₁ = 0 := (dotProduct_comm _ _).trans horth + simp only [angularDirection, add_dotProduct, dotProduct_add, smul_dotProduct, dotProduct_smul, + smul_eq_mul, h₁, h₂, horth, horth', mul_zero, mul_one, zero_add, add_zero] + nlinarith [Real.sin_sq_add_cos_sq α] + +lemma direction_angular_perp {e₁ e₂ : Vec} (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (horth : e₁ ⬝ᵥ e₂ = 0) (α : ℝ) : + direction e₁ e₂ α ⬝ᵥ angularDirection e₁ e₂ α = 0 := by + have horth' : e₂ ⬝ᵥ e₁ = 0 := (dotProduct_comm _ _).trans horth + simp only [direction, angularDirection, add_dotProduct, dotProduct_add, smul_dotProduct, + dotProduct_smul, smul_eq_mul, h₁, h₂, horth, horth', mul_zero, mul_one, zero_add, add_zero] + ring + +lemma angularDirection_perp {e₁ e₂ w : Vec} (h₁ : w ⬝ᵥ e₁ = 0) (h₂ : w ⬝ᵥ e₂ = 0) (α : ℝ) : + w ⬝ᵥ angularDirection e₁ e₂ α = 0 := by + simp [angularDirection, dotProduct_add, dotProduct_smul, h₁, h₂] + +lemma dot_normalPart_eq {X Y w m : Vec} (hX : m ⬝ᵥ X = 0) (hY : m ⬝ᵥ Y = 0) : + m ⬝ᵥ realNormalPart X Y w = m ⬝ᵥ w := by + simp [realNormalPart, dotProduct_sub, dotProduct_smul, hX, hY] + +lemma dot_leadingTangent_zero {X Y C V m : Vec} + (hY : m ⬝ᵥ Y = 0) (hC : m ⬝ᵥ C = 0) (hV : m ⬝ᵥ V = 0) : + m ⬝ᵥ leadingTangent X Y C V = 0 := by + simp only [leadingTangent, dotProduct_add, dotProduct_sub, dot_normalPart_eq hY hC, + sub_self, hV, add_zero] + +lemma angularDirection_normal_perp {X Y C e₁ e₂ : Vec} (R α : ℝ) + (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) (horth : e₁ ⬝ᵥ e₂ = 0) + (hY₁ : Y ⬝ᵥ e₁ = 0) (hY₂ : Y ⬝ᵥ e₂ = 0) + (hC₁ : C ⬝ᵥ e₁ = 0) (hC₂ : C ⬝ᵥ e₂ = 0) : + angularDirection e₁ e₂ α ⬝ᵥ normalize (leadingNormal X Y C (R • direction e₁ e₂ α)) = 0 := by + have hY : angularDirection e₁ e₂ α ⬝ᵥ Y = 0 := + (dotProduct_comm _ _).trans (angularDirection_perp hY₁ hY₂ α) + have hC : angularDirection e₁ e₂ α ⬝ᵥ C = 0 := + (dotProduct_comm _ _).trans (angularDirection_perp hC₁ hC₂ α) + have hV : angularDirection e₁ e₂ α ⬝ᵥ (R • direction e₁ e₂ α) = 0 := by + rw [dotProduct_smul, dotProduct_comm (angularDirection _ _ _) (direction _ _ _), + direction_angular_perp h₁ h₂ horth, smul_zero] + have hT := dot_leadingTangent_zero (X := X) hY hC hV + apply dot_normalize_zero + change angularDirection e₁ e₂ α ⬝ᵥ realNormalPart + (leadingTangent X Y C (R • direction e₁ e₂ α)) Y C = 0 + rw [dot_normalPart_eq hT hY, hC] + +/-- The first normal coefficient does not contain the angular derivative. -/ +lemma first_normal_derivative_independent {W m n : Vec} (hmn : m ⬝ᵥ n = 0) (R d : ℝ) : + (W + (R * d) • m) ⬝ᵥ n = W ⬝ᵥ n := by + simp [add_dotProduct, smul_dotProduct, hmn] + +/-- The complementary normal coefficient contains that derivative with coefficient `R`. -/ +lemma second_normal_derivative {W m : Vec} (hm : m ⬝ᵥ m = 1) (R d : ℝ) : + (W + (R * d) • m) ⬝ᵥ m = R * d + W ⬝ᵥ m := by + simp only [add_dotProduct, smul_dotProduct, smul_eq_mul, hm, mul_one] + ring + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalNonvanishing.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalNonvanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5852a6a0a3cc1104e097a1f8c5e5fec989c788ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityNormalNonvanishing.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityPlaneCoordinates + +namespace OAI + +/-! The old second derivative has a nonzero normal component after changing velocity. -/ +noncomputable section +open scoped Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +lemma gram_ne_zero_of_projection {X Y : Vec} {P : Vec → Vec} + (hP : IsLinearMap ℝ P) (hPY : P Y = 0) (hPX : P X ≠ 0) (hY : Y ≠ 0) : + gramDet X Y ≠ 0 := by + have hYY : Y ⬝ᵥ Y ≠ 0 := (dotProduct_self_eq_zero).not.mpr hY + intro hD + let W := (Y ⬝ᵥ Y) • X - (X ⬝ᵥ Y) • Y + have hW : W ⬝ᵥ W = (Y ⬝ᵥ Y) * gramDet X Y := by + simp only [W, gramDet, sub_dotProduct, dotProduct_sub, smul_dotProduct, + dotProduct_smul, smul_eq_mul, dotProduct_comm Y X] + ring + have hW0 : W = 0 := dotProduct_self_eq_zero.mp (by rw [hW, hD, mul_zero]) + have hpW : (Y ⬝ᵥ Y) • P X = 0 := by + have he := congrArg P hW0 + simpa only [W, hP.map_sub, hP.map_smul, hPY, smul_zero, sub_zero, hP.map_zero] using he + exact hPX ((smul_eq_zero.mp hpW).resolve_left hYY) + +lemma normalPart_ne_zero_of_projection {X Y C : Vec} {P : Vec → Vec} + (hP : IsLinearMap ℝ P) (hPY : P Y = 0) (hPC : P C = 0) (hPX : P X ≠ 0) + (hD : gramDet Y C ≠ 0) : realNormalPart X Y C ≠ 0 := by + intro hz + let c := ((Y ⬝ᵥ Y) * (X ⬝ᵥ C) - (X ⬝ᵥ Y) * (Y ⬝ᵥ C)) / gramDet X Y + let d := ((X ⬝ᵥ X) * (Y ⬝ᵥ C) - (X ⬝ᵥ Y) * (X ⬝ᵥ C)) / gramDet X Y + have hspan : C = c • X + d • Y := by + apply sub_eq_zero.mp + calc + C - (c • X + d • Y) = C - c • X - d • Y := by abel + _ = 0 := hz + have hc : c = 0 := by + have he := congrArg P hspan + have he' : c • P X = 0 := by + simpa only [hPC, hP.map_add, hP.map_smul, hPY, smul_zero, add_zero] using he.symm + exact (smul_eq_zero.mp he').resolve_right hPX + have hC : C = d • Y := by simpa only [hc, zero_smul, zero_add] using hspan + apply hD + rw [hC] + simp only [gramDet, dotProduct_smul, smul_dotProduct, smul_eq_mul] + ring + +def leadingTangent (X Y C V : Vec) : Vec := X - realNormalPart Y C X + V + +lemma leadingTangent_projection {X Y C V : Vec} (hD : gramDet Y C ≠ 0) + (hYV : Y ⬝ᵥ V = 0) (hCV : C ⬝ᵥ V = 0) : + realNormalPart Y C (leadingTangent X Y C V) = V := by + have hP := realNormalPart_linear Y C + have hpX := realNormalPart_perp Y C X hD + change realNormalPart Y C (X - realNormalPart Y C X + V) = V + rw [hP.map_add, hP.map_sub, + realNormalPart_of_perp Y C (realNormalPart Y C X) hpX.1 hpX.2, + realNormalPart_of_perp Y C V hYV hCV, sub_self, zero_add] + +/-- Neither the leading tangent pair nor the normal component of `C` degenerates. -/ +theorem leading_normal_nondegenerate {X Y C V : Vec} (hD : gramDet Y C ≠ 0) + (hYV : Y ⬝ᵥ V = 0) (hCV : C ⬝ᵥ V = 0) (hV : V ≠ 0) : + gramDet (leadingTangent X Y C V) Y ≠ 0 ∧ + realNormalPart (leadingTangent X Y C V) Y C ≠ 0 := by + have hP := realNormalPart_linear Y C + have hPY := realNormalPart_self_left Y C hD + have hPC := realNormalPart_self_right Y C hD + have hPX : realNormalPart Y C (leadingTangent X Y C V) ≠ 0 := by + rwa [leadingTangent_projection hD hYV hCV] + have hY : Y ≠ 0 := by + intro hz + apply hD + simp [gramDet, hz] + exact ⟨gram_ne_zero_of_projection hP hPY hPX hY, + normalPart_ne_zero_of_projection hP hPY hPC hPX hD⟩ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlane.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlane.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f50bbbcbb9823250ee3d9d7d43983adaf2e28ef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlane.lean @@ -0,0 +1,139 @@ +import Mathlib + +namespace OAI + +/-! The normal-plane projection used in the velocity-circle construction. -/ + +noncomputable section + +namespace ClosedSurfaceR4.VelocityPlane + +abbrev Space := EuclideanSpace ℝ (Fin 4) + +def tangentPlane (X Y : Space) : Submodule ℝ Space := + Submodule.span ℝ ({X, Y} : Set Space) + +def oldNormal (X Y : Space) : Submodule ℝ Space := (tangentPlane X Y)ᗮ + +def velocityPlane (Y C : Space) : Submodule ℝ Space := (tangentPlane Y C)ᗮ + +lemma left_mem_tangent (X Y : Space) : X ∈ tangentPlane X Y := + Submodule.subset_span (by simp) + +lemma right_mem_tangent (X Y : Space) : Y ∈ tangentPlane X Y := + Submodule.subset_span (by simp) + +lemma coefficients_eq_zero {X Y : Space} (hXY : LinearIndependent ℝ ![X, Y]) + {a b : ℝ} (h : a • X + b • Y = 0) : a = 0 ∧ b = 0 := by + have hc := (Fintype.linearIndependent_iff.mp hXY) ![a, b] + (by simpa [Fin.sum_univ_two] using h) + exact ⟨by simpa using hc 0, by simpa using hc 1⟩ + +/-- A nonzero longitudinal Hessian coefficient makes projection onto the new +velocity plane injective on the old normal plane. -/ +theorem projection_kernel_on_oldNormal {X Y B C n : Space} {a b : ℝ} + (hXY : LinearIndependent ℝ ![X, Y]) (ha : a ≠ 0) + (hB : B ∈ oldNormal X Y) (hC : C = a • X + b • Y + B) + (hn : n ∈ oldNormal X Y) + (hp : (velocityPlane Y C).starProjection n = 0) : n = 0 := by + have hmem : n ∈ tangentPlane Y C := by + have hh := (Submodule.starProjection_apply_eq_zero_iff (velocityPlane Y C)).mp hp + simpa only [velocityPlane, Submodule.orthogonal_orthogonal] using hh + obtain ⟨c, d, hcd⟩ := Submodule.mem_span_pair.mp hmem + have hqx : (tangentPlane X Y).starProjection X = X := + Submodule.starProjection_eq_self_iff.mpr (left_mem_tangent X Y) + have hqy : (tangentPlane X Y).starProjection Y = Y := + Submodule.starProjection_eq_self_iff.mpr (right_mem_tangent X Y) + have hqb : (tangentPlane X Y).starProjection B = 0 := + (Submodule.starProjection_apply_eq_zero_iff (tangentPlane X Y)).mpr hB + have hqn : (tangentPlane X Y).starProjection n = 0 := + (Submodule.starProjection_apply_eq_zero_iff (tangentPlane X Y)).mpr hn + have he := congrArg (tangentPlane X Y).starProjection hcd + simp only [hC, map_add, map_smul, hqx, hqy, hqb, hqn, add_zero] at he + have hz : (d * a) • X + (c + d * b) • Y = 0 := by + calc + (d * a) • X + (c + d * b) • Y = c • Y + d • (a • X + b • Y) := by + simp only [smul_add, add_smul, smul_smul] + abel + _ = 0 := he + obtain ⟨hda, hcb⟩ := coefficients_eq_zero hXY hz + have hd : d = 0 := (mul_eq_zero.mp hda).resolve_right ha + have hc : c = 0 := by simpa only [hd, zero_mul, add_zero] using hcb + simpa only [hc, hd, zero_smul, add_zero] using hcd.symm + +theorem projection_injective_on_oldNormal {X Y B C : Space} {a b : ℝ} + (hXY : LinearIndependent ℝ ![X, Y]) (ha : a ≠ 0) + (hB : B ∈ oldNormal X Y) (hC : C = a • X + b • Y + B) : + Set.InjOn (velocityPlane Y C).starProjection (oldNormal X Y : Set Space) := by + intro n hn m hm hnm + apply sub_eq_zero.mp + apply projection_kernel_on_oldNormal hXY ha hB hC + ((oldNormal X Y).sub_mem hn hm) + simp only [map_sub, hnm, sub_self] + +theorem projected_normal_ne_zero {X Y B C n : Space} {a b : ℝ} + (hXY : LinearIndependent ℝ ![X, Y]) (ha : a ≠ 0) + (hB : B ∈ oldNormal X Y) (hC : C = a • X + b • Y + B) + (hn : n ∈ oldNormal X Y) (hn0 : n ≠ 0) : + (velocityPlane Y C).starProjection n ≠ 0 := + fun hp => hn0 (projection_kernel_on_oldNormal hXY ha hB hC hn hp) + +/-- The projected old second form points oppositely to the projected +longitudinal tangent when the longitudinal Hessian coefficient is positive. -/ +theorem projected_second_form {X Y B C : Space} {a b : ℝ} + (hC : C = a • X + b • Y + B) : + (velocityPlane Y C).starProjection B = + -a • (velocityPlane Y C).starProjection X := by + have hy : (velocityPlane Y C).starProjection Y = 0 := by + apply (Submodule.starProjection_apply_eq_zero_iff (velocityPlane Y C)).mpr + simpa only [velocityPlane, Submodule.orthogonal_orthogonal] using + left_mem_tangent Y C + have hc : (velocityPlane Y C).starProjection C = 0 := by + apply (Submodule.starProjection_apply_eq_zero_iff (velocityPlane Y C)).mpr + simpa only [velocityPlane, Submodule.orthogonal_orthogonal] using + right_mem_tangent Y C + have he : a • (velocityPlane Y C).starProjection X + + (velocityPlane Y C).starProjection B = 0 := by + calc + _ = (velocityPlane Y C).starProjection (a • X + b • Y + B) := by + simp only [map_add, map_smul, hy, smul_zero, add_zero] + _ = (velocityPlane Y C).starProjection C := congrArg _ hC.symm + _ = 0 := hc + simpa only [neg_smul] using (eq_neg_of_add_eq_zero_right he) + +/-- Replacing the projected velocity by a longer vector in the same plane +adds precisely a rank-one term to the metric. -/ +theorem leading_metric {X Y C V : Space} {a : ℝ} + (hV : V ∈ velocityPlane Y C) + (hR : ‖V‖ ^ 2 = ‖(velocityPlane Y C).starProjection X‖ ^ 2 + a ^ 2) : + ‖X - (velocityPlane Y C).starProjection X + V‖ ^ 2 = ‖X‖ ^ 2 + a ^ 2 ∧ + inner ℝ (X - (velocityPlane Y C).starProjection X + V) Y = inner ℝ X Y := by + let P := velocityPlane Y C + have hp : P.starProjection X ∈ P := P.orthogonalProjectionOnto X |>.property + have hxv : inner ℝ (X - P.starProjection X) V = 0 := + P.starProjection_inner_eq_zero X V hV + have hxp : inner ℝ (X - P.starProjection X) (P.starProjection X) = 0 := + P.starProjection_inner_eq_zero X _ hp + have hold : ‖X‖ ^ 2 = ‖X - P.starProjection X‖ ^ 2 + ‖P.starProjection X‖ ^ 2 := by + calc + ‖X‖ ^ 2 = ‖X - P.starProjection X + P.starProjection X‖ ^ 2 := by + rw [sub_add_cancel] + _ = _ := by rw [norm_add_sq_real, hxp]; ring + have hvy : inner ℝ V Y = 0 := by + exact (real_inner_comm Y V).trans + ((Submodule.mem_orthogonal _ _).mp hV Y (left_mem_tangent Y C)) + have hpy : inner ℝ (P.starProjection X) Y = 0 := by + exact (real_inner_comm Y (P.starProjection X)).trans + ((Submodule.mem_orthogonal _ _).mp hp Y (left_mem_tangent Y C)) + constructor + · change ‖X - P.starProjection X + V‖ ^ 2 = _ + rw [norm_add_sq_real, hxv] + linarith + · change inner ℝ (X - P.starProjection X + V) Y = _ + simp only [inner_add_left, inner_sub_left, hvy, hpy, sub_zero, add_zero] + +end ClosedSurfaceR4.VelocityPlane + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneBasis.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneBasis.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8aeef52e1d41cdfa838a9c5331b6daf9f9ac3fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneBasis.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCircleLift + +namespace OAI + +/-! Coordinates in the actual two-dimensional velocity plane. -/ +noncomputable section +open scoped Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +lemma velocity_frame_independent {Y C e₁ e₂ : Vec} + (hD : gramDet Y C ≠ 0) (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (h12 : e₁ ⬝ᵥ e₂ = 0) (hY1 : Y ⬝ᵥ e₁ = 0) (hY2 : Y ⬝ᵥ e₂ = 0) + (hC1 : C ⬝ᵥ e₁ = 0) (hC2 : C ⬝ᵥ e₂ = 0) : + LinearIndependent ℝ ![Y, C, e₁, e₂] := by + apply Fintype.linearIndependent_iff.mpr + intro a ha + have he : a 0 • Y + (a 1 • C + (a 2 • e₁ + a 3 • e₂)) = 0 := by + simpa [Fin.sum_univ_succ] using ha + have hy := congrArg (fun w => Y ⬝ᵥ w) he + have hc := congrArg (fun w => C ⬝ᵥ w) he + simp only [dotProduct_add, dotProduct_smul, smul_eq_mul, hY1, hY2, hC1, hC2, + mul_zero, add_zero, dotProduct_zero, dotProduct_comm C Y] at hy hc + have haD : a 0 * gramDet Y C = 0 := by + unfold gramDet + linear_combination (C ⬝ᵥ C) * hy - (Y ⬝ᵥ C) * hc + have hbD : a 1 * gramDet Y C = 0 := by + unfold gramDet + linear_combination (Y ⬝ᵥ Y) * hc - (Y ⬝ᵥ C) * hy + have ha0 := (mul_eq_zero.mp haD).resolve_right hD + have ha1 := (mul_eq_zero.mp hbD).resolve_right hD + have hz : a 2 • e₁ + a 3 • e₂ = 0 := by simpa [ha0, ha1] using he + have h2 := congrArg (fun w => e₁ ⬝ᵥ w) hz + have h3 := congrArg (fun w => e₂ ⬝ᵥ w) hz + simp only [dotProduct_add, dotProduct_smul, smul_eq_mul, h₁, h₂, h12, + dotProduct_comm e₂ e₁, mul_one, mul_zero, add_zero, zero_add, dotProduct_zero] at h2 h3 + intro i + fin_cases i + · exact ha0 + · exact ha1 + · exact h2 + · exact h3 + +lemma orthogonal_frame_eq_zero {Y C e₁ e₂ w : Vec} + (hlin : LinearIndependent ℝ ![Y, C, e₁, e₂]) + (hY : Y ⬝ᵥ w = 0) (hC : C ⬝ᵥ w = 0) + (h1 : e₁ ⬝ᵥ w = 0) (h2 : e₂ ⬝ᵥ w = 0) : w = 0 := by + have hs := hlin.span_eq_top_of_card_eq_finrank (by simp [Vec]) + have hw : w ∈ Submodule.span ℝ (Set.range ![Y, C, e₁, e₂]) := by + rw [hs] + trivial + obtain ⟨a, ha⟩ := (Submodule.mem_span_range_iff_exists_fun ℝ).mp hw + apply dotProduct_self_eq_zero.mp + calc + w ⬝ᵥ w = (∑ i, a i • (![Y, C, e₁, e₂] i)) ⬝ᵥ w := by rw [ha] + _ = 0 := by simp [Fin.sum_univ_succ, add_dotProduct, smul_dotProduct, hY, hC, h1, h2] + +def planeCoordinates (e₁ e₂ v : Vec) : LoopDensity.Plane := ![v ⬝ᵥ e₁, v ⬝ᵥ e₂] + +theorem plane_coordinates_reconstruct {Y C e₁ e₂ v : Vec} + (hD : gramDet Y C ≠ 0) (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (h12 : e₁ ⬝ᵥ e₂ = 0) (hY1 : Y ⬝ᵥ e₁ = 0) (hY2 : Y ⬝ᵥ e₂ = 0) + (hC1 : C ⬝ᵥ e₁ = 0) (hC2 : C ⬝ᵥ e₂ = 0) + (hYv : Y ⬝ᵥ v = 0) (hCv : C ⬝ᵥ v = 0) : + planeLift e₁ e₂ (planeCoordinates e₁ e₂ v) = v := by + apply sub_eq_zero.mp + apply orthogonal_frame_eq_zero (velocity_frame_independent hD h₁ h₂ h12 hY1 hY2 hC1 hC2) + all_goals simp [planeLift_apply, planeCoordinates, dotProduct_sub, dotProduct_add, + dotProduct_smul, hY1, hY2, hC1, hC2, hYv, hCv, h₁, h₂, h12, + dotProduct_comm e₂ e₁, dotProduct_comm e₁ v, dotProduct_comm e₂ v] + +lemma plane_coordinates_length {Y C e₁ e₂ v : Vec} + (hD : gramDet Y C ≠ 0) (h₁ : e₁ ⬝ᵥ e₁ = 1) (h₂ : e₂ ⬝ᵥ e₂ = 1) + (h12 : e₁ ⬝ᵥ e₂ = 0) (hY1 : Y ⬝ᵥ e₁ = 0) (hY2 : Y ⬝ᵥ e₂ = 0) + (hC1 : C ⬝ᵥ e₁ = 0) (hC2 : C ⬝ᵥ e₂ = 0) + (hYv : Y ⬝ᵥ v = 0) (hCv : C ⬝ᵥ v = 0) : + (v ⬝ᵥ e₁) ^ 2 + (v ⬝ᵥ e₂) ^ 2 = v ⬝ᵥ v := by + have hr := plane_coordinates_reconstruct hD h₁ h₂ h12 hY1 hY2 hC1 hC2 hYv hCv + have hd := congrArg (fun w => w ⬝ᵥ w) hr + simpa [planeLift_apply, planeCoordinates, add_dotProduct, dotProduct_add, + smul_dotProduct, dotProduct_smul, h₁, h₂, h12, dotProduct_comm e₂ e₁, pow_two] using hd + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a6dd2e23f6634848c52ddbd2ae44e603cf2d63e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneCoordinates.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityFrame + +namespace OAI + +/-! Coordinate nondegeneracy of the moving velocity plane and its normal projection. -/ +noncomputable section +open scoped Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +lemma velocity_gram_formula {X Y B C : Vec} {a b : ℝ} + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) : + gramDet Y C = a ^ 2 * gramDet X Y + (Y ⬝ᵥ Y) * (B ⬝ᵥ B) := by + rw [hC] + simp only [gramDet, dotProduct_add, add_dotProduct, smul_dotProduct, dotProduct_smul, + smul_eq_mul, dotProduct_comm B X, dotProduct_comm B Y, dotProduct_comm Y X, + hXB, hYB, mul_zero, add_zero, zero_add] + ring + +lemma velocity_gram_pos {X Y B C : Vec} {a b : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a ≠ 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) : 0 < gramDet Y C := by + rw [velocity_gram_formula hXB hYB hC] + exact add_pos_of_pos_of_nonneg (mul_pos (sq_pos_of_ne_zero ha) (gramDet_pos hD)) + (mul_nonneg (Finset.sum_nonneg (fun i _ => mul_self_nonneg (Y i))) + (Finset.sum_nonneg (fun i _ => mul_self_nonneg (B i)))) + +lemma projected_normal_kernel {X Y B C n : Vec} {a b : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a ≠ 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) + (hXn : X ⬝ᵥ n = 0) (hYn : Y ⬝ᵥ n = 0) + (hp : realNormalPart Y C n = 0) : n = 0 := by + let c := ((C ⬝ᵥ C) * (Y ⬝ᵥ n) - (Y ⬝ᵥ C) * (C ⬝ᵥ n)) / gramDet Y C + let d := ((Y ⬝ᵥ Y) * (C ⬝ᵥ n) - (Y ⬝ᵥ C) * (Y ⬝ᵥ n)) / gramDet Y C + have hspan : n = c • Y + d • C := by + apply sub_eq_zero.mp + calc + n - (c • Y + d • C) = n - c • Y - d • C := by abel + _ = 0 := hp + have hx : c * (X ⬝ᵥ Y) + d * (a * (X ⬝ᵥ X) + b * (X ⬝ᵥ Y)) = 0 := by + have he := congrArg (fun w => X ⬝ᵥ w) hspan + rw [hXn, hC] at he + simpa only [dotProduct_add, dotProduct_smul, smul_eq_mul, hXB, add_zero] using he.symm + have hy : c * (Y ⬝ᵥ Y) + d * (a * (X ⬝ᵥ Y) + b * (Y ⬝ᵥ Y)) = 0 := by + have he := congrArg (fun w => Y ⬝ᵥ w) hspan + rw [hYn, hC] at he + simpa only [dotProduct_add, dotProduct_smul, smul_eq_mul, hYB, add_zero, + dotProduct_comm Y X] using he.symm + have hd : d * a * gramDet X Y = 0 := by + unfold gramDet + linear_combination (Y ⬝ᵥ Y) * hx - (X ⬝ᵥ Y) * hy + have hd0 : d = 0 := (mul_eq_zero.mp ((mul_eq_zero.mp hd).resolve_right hD)).resolve_right ha + have hYY : Y ⬝ᵥ Y ≠ 0 := by + intro hz + have hY : Y = 0 := dotProduct_self_eq_zero.mp hz + apply hD + simp [gramDet, hY] + have hc0 : c = 0 := by + rw [hd0, zero_mul, add_zero] at hy + exact (mul_eq_zero.mp hy).resolve_right hYY + simpa only [hc0, hd0, zero_smul, add_zero] using hspan + +lemma projected_normal_ne_zero {X Y B C n : Vec} {a b : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a ≠ 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) + (hXn : X ⬝ᵥ n = 0) (hYn : Y ⬝ᵥ n = 0) (hn : n ≠ 0) : + realNormalPart Y C n ≠ 0 := + fun hp => hn (projected_normal_kernel hD ha hXB hYB hC hXn hYn hp) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneRays.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneRays.lean new file mode 100644 index 0000000000000000000000000000000000000000..74ca3b9c62ccf9b56e12e26b46f2cdf73746c3e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityPlaneRays.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityPlaneCoordinates + +namespace OAI + +/-! The boundary non-antipodality condition survives projection to the velocity plane. -/ +noncomputable section +open scoped Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +lemma no_opposite_ray_of_normalized {B n : Vec} (hB : B ≠ 0) + (hn : n ⬝ᵥ n = 1) (hanti : normalize B ≠ -n) : + ∀ r : ℝ, 0 < r → n ≠ -r • B := by + intro r hr he + have hp := dot_self_pos hB + have hs : Real.sqrt (B ⬝ᵥ B) ≠ 0 := (Real.sqrt_pos.mpr hp).ne' + have hsq : r ^ 2 * (B ⬝ᵥ B) = 1 := by + rw [he] at hn + simpa only [smul_dotProduct, dotProduct_smul, smul_eq_mul, neg_mul_neg, + ← mul_assoc, ← pow_two, neg_sq] using hn + have hroot : (r * Real.sqrt (B ⬝ᵥ B)) ^ 2 = 1 := by + rw [mul_pow, Real.sq_sqrt hp.le, hsq] + have hpos : 0 < r * Real.sqrt (B ⬝ᵥ B) := mul_pos hr (Real.sqrt_pos.mpr hp) + have heq : r * Real.sqrt (B ⬝ᵥ B) = 1 := by nlinarith + have hr' : r = (Real.sqrt (B ⬝ᵥ B))⁻¹ := by + apply mul_right_cancel₀ hs + rw [heq, inv_mul_cancel₀ hs] + apply hanti + rw [he, neg_smul, neg_neg, hr'] + rfl + +lemma projected_second_form {X Y B C : Vec} {a b : ℝ} + (hD : gramDet Y C ≠ 0) (hC : C = a • X + b • Y + B) : + realNormalPart Y C B = -a • realNormalPart Y C X := by + have hlin := realNormalPart_linear Y C + have he := congrArg (realNormalPart Y C) hC + rw [realNormalPart_self_right _ _ hD] at he + simp only [hlin.map_add, hlin.map_smul, realNormalPart_self_left _ _ hD, + smul_zero, add_zero] at he + simpa only [neg_smul] using (eq_neg_of_add_eq_zero_right he.symm) + +lemma projection_preserves_no_opposite_ray {X Y B C n : Vec} {a b : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a ≠ 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) + (hXn : X ⬝ᵥ n = 0) (hYn : Y ⬝ᵥ n = 0) + (hanti : ∀ r : ℝ, 0 < r → n ≠ -r • B) : + ∀ r : ℝ, 0 < r → realNormalPart Y C B ≠ -r • realNormalPart Y C n := by + intro r hr hrel + have hlin := realNormalPart_linear Y C + have himage : realNormalPart Y C (B + r • n) = 0 := by + rw [hlin.map_add, hlin.map_smul, hrel] + simp [neg_smul] + have hz : B + r • n = 0 := projected_normal_kernel hD ha hXB hYB hC + (by simp [dotProduct_add, dotProduct_smul, hXB, hXn]) + (by simp [dotProduct_add, dotProduct_smul, hYB, hYn]) himage + apply hanti (1 / r) (one_div_pos.mpr hr) + ext i + have hi : B i + r * n i = 0 := congrFun hz i + change n i = -(1 / r) * B i + field_simp [hr.ne'] + linear_combination hi + +lemma projected_tangent_no_opposite_ray {X Y B C n : Vec} {a b : ℝ} + (hD : gramDet X Y ≠ 0) (ha : a < 0) + (hXB : X ⬝ᵥ B = 0) (hYB : Y ⬝ᵥ B = 0) + (hC : C = a • X + b • Y + B) + (hXn : X ⬝ᵥ n = 0) (hYn : Y ⬝ᵥ n = 0) + (hanti : ∀ r : ℝ, 0 < r → n ≠ -r • B) : + ∀ r : ℝ, 0 < r → realNormalPart Y C X ≠ -r • realNormalPart Y C n := by + have hD' := (velocity_gram_pos hD ha.ne hXB hYB hC).ne' + have hsecond := projected_second_form hD' hC + intro r hr hx + have he : realNormalPart Y C B = -((-a) * r) • realNormalPart Y C n := by + rw [hsecond, hx, smul_smul] + congr 1 + ring + exact projection_preserves_no_opposite_ray hD ha.ne hXB hYB hC hXn hYn hanti + ((-a) * r) (mul_pos (neg_pos.mpr ha) hr) he + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..221d4f300b8a5e2d70c1e28a50b208952ed68904 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialBounds.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocitySpatialDerivative + +namespace OAI + +/-! Compact bounds for the actual circular velocity derivative, uniform in +both the angle and its arbitrarily large derivatives. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_spatialError_bound {Q : E → Vec} {R : E → ℝ} {e₁ e₂ : E → Vec} + (hQ : ContDiff ℝ ∞ Q) (hR : ContDiff ℝ ∞ R) + (h₁ : ContDiff ℝ ∞ e₁) (h₂ : ContDiff ℝ ∞ e₂) + {K : Set E} (hK : IsCompact K) (v : E) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (α : E → ℝ) x, x ∈ K → + ‖spatialError Q R e₁ e₂ α x v‖ ≤ C := by + have hDQ : Continuous (fun x => fderiv ℝ Q x v) := + ((hQ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + have hDR : Continuous (fun x => fderiv ℝ R x v) := + ((hR.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + have hD₁ : Continuous (fun x => fderiv ℝ e₁ x v) := + ((h₁.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + have hD₂ : Continuous (fun x => fderiv ℝ e₂ x v) := + ((h₂.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + let L : E → ℝ := fun x => ‖fderiv ℝ Q x v‖ + + |fderiv ℝ R x v| * (‖e₁ x‖ + ‖e₂ x‖) + + |R x| * (‖fderiv ℝ e₁ x v‖ + ‖fderiv ℝ e₂ x v‖) + have hL : Continuous L := + (hDQ.norm.add (hDR.abs.mul (h₁.continuous.norm.add h₂.continuous.norm))).add + (hR.continuous.abs.mul (hD₁.norm.add hD₂.norm)) + obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn hL.continuousOn + refine ⟨max 0 C, le_max_left _ _, fun α x hx => ?_⟩ + exact (spatialError_bound Q R e₁ e₂ α x v).trans + ((le_abs_self (L x)).trans ((hC x hx).trans (le_max_right _ _))) + +theorem compact_spatialError_bound_on {Q : E → Vec} {R : E → ℝ} {e₁ e₂ : E → Vec} + {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hR : ContDiffOn ℝ ∞ R U) + (h₁ : ContDiffOn ℝ ∞ e₁ U) (h₂ : ContDiffOn ℝ ∞ e₂ U) (v : E) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (α : E → ℝ) x, x ∈ K → + ‖spatialError Q R e₁ e₂ α x v‖ ≤ C := by + have hDQ : ContinuousOn (fun x => fderiv ℝ Q x v) U := + ((hQ.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).continuousOn + have hDR : ContinuousOn (fun x => fderiv ℝ R x v) U := + ((hR.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).continuousOn + have hD₁ : ContinuousOn (fun x => fderiv ℝ e₁ x v) U := + ((h₁.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).continuousOn + have hD₂ : ContinuousOn (fun x => fderiv ℝ e₂ x v) U := + ((h₂.fderiv_of_isOpen hU (m := ∞) (by simp)).clm_apply contDiffOn_const).continuousOn + let L : E → ℝ := fun x => ‖fderiv ℝ Q x v‖ + + |fderiv ℝ R x v| * (‖e₁ x‖ + ‖e₂ x‖) + + |R x| * (‖fderiv ℝ e₁ x v‖ + ‖fderiv ℝ e₂ x v‖) + have hL : ContinuousOn L U := + (hDQ.norm.add (hDR.abs.mul (h₁.continuousOn.norm.add h₂.continuousOn.norm))).add + (hR.continuousOn.abs.mul (hD₁.norm.add hD₂.norm)) + obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn (hL.mono hKU) + refine ⟨max 0 C, le_max_left _ _, fun α x hx => ?_⟩ + exact (spatialError_bound Q R e₁ e₂ α x v).trans + ((le_abs_self (L x)).trans ((hC x hx).trans (le_max_right _ _))) + +/-- The true differentiated velocity has the first normal bound, with no angular derivative. -/ +theorem circular_first_normal_bound {Q : E → Vec} {R : E → ℝ} + {e₁ e₂ : E → Vec} {α : E → ℝ} {x v : E} {n : Vec} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) (hn : n ⬝ᵥ n = 1) + (horth : angularDirection (e₁ x) (e₂ x) (α x) ⬝ᵥ n = 0) : + |fderiv ℝ (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) x v ⬝ᵥ n| ≤ + 4 * ‖spatialError Q R e₁ e₂ α x v‖ := by + rw [circular_velocity_derivative hQ hR h₁ h₂ hα] + exact first_normal_bound hn horth _ _ + +/-- The other normal coefficient is `R` times the angular derivative plus the same bounded error. -/ +theorem circular_second_normal_bound {Q : E → Vec} {R : E → ℝ} + {e₁ e₂ : E → Vec} {α : E → ℝ} {x v : E} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) + (hunit : angularDirection (e₁ x) (e₂ x) (α x) ⬝ᵥ + angularDirection (e₁ x) (e₂ x) (α x) = 1) : + |fderiv ℝ (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) x v ⬝ᵥ + angularDirection (e₁ x) (e₂ x) (α x) - R x * fderiv ℝ α x v| ≤ + 4 * ‖spatialError Q R e₁ e₂ α x v‖ := by + rw [circular_velocity_derivative hQ hR h₁ h₂ hα] + exact second_normal_error_bound hunit _ _ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..809e6174f029768e0c185bb490b07105ceeb6326 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocitySpatialDerivative.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalEstimates + +namespace OAI + +/-! Exact spatial differentiation of the actual circular velocity, separating +all dependence on the angular derivative from the bounded remainder. -/ +noncomputable section +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def spatialError (Q : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) + (α : E → ℝ) (x v : E) : Vec := + fderiv ℝ Q x v + (fderiv ℝ R x v) • direction (e₁ x) (e₂ x) (α x) + + R x • (Real.cos (α x) • fderiv ℝ e₁ x v + Real.sin (α x) • fderiv ℝ e₂ x v) + +theorem circular_velocity_derivative {Q : E → Vec} {R : E → ℝ} + {e₁ e₂ : E → Vec} {α : E → ℝ} {x : E} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) (v : E) : + fderiv ℝ (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) x v = + spatialError Q R e₁ e₂ α x v + + (R x * fderiv ℝ α x v) • angularDirection (e₁ x) (e₂ x) (α x) := by + have hd := hQ.hasFDerivAt.add (hR.hasFDerivAt.smul + ((hα.hasFDerivAt.cos.smul h₁.hasFDerivAt).add + (hα.hasFDerivAt.sin.smul h₂.hasFDerivAt))) + change HasFDerivAt (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) _ x at hd + rw [hd.fderiv] + ext i + simp only [spatialError, direction, angularDirection, add_apply, smul_apply, + ContinuousLinearMap.smulRight_apply, Pi.add_apply, Pi.smul_apply, Pi.smul_apply', smul_eq_mul, + neg_mul] + ring + +lemma norm_direction_le (e₁ e₂ : Vec) (α : ℝ) : + ‖direction e₁ e₂ α‖ ≤ ‖e₁‖ + ‖e₂‖ := by + calc + ‖direction e₁ e₂ α‖ ≤ ‖Real.cos α • e₁‖ + ‖Real.sin α • e₂‖ := norm_add_le _ _ + _ ≤ ‖e₁‖ + ‖e₂‖ := add_le_add + (by rw [norm_smul, Real.norm_eq_abs]; exact mul_le_of_le_one_left (norm_nonneg _) (Real.abs_cos_le_one α)) + (by rw [norm_smul, Real.norm_eq_abs]; exact mul_le_of_le_one_left (norm_nonneg _) (Real.abs_sin_le_one α)) + +/-- The bound does not contain a derivative of `α`. -/ +theorem spatialError_bound (Q : E → Vec) (R : E → ℝ) (e₁ e₂ : E → Vec) + (α : E → ℝ) (x v : E) : + ‖spatialError Q R e₁ e₂ α x v‖ ≤ + ‖fderiv ℝ Q x v‖ + |fderiv ℝ R x v| * (‖e₁ x‖ + ‖e₂ x‖) + + |R x| * (‖fderiv ℝ e₁ x v‖ + ‖fderiv ℝ e₂ x v‖) := by + unfold spatialError + calc + ‖fderiv ℝ Q x v + (fderiv ℝ R x v) • direction (e₁ x) (e₂ x) (α x) + + R x • (Real.cos (α x) • fderiv ℝ e₁ x v + Real.sin (α x) • fderiv ℝ e₂ x v)‖ + ≤ ‖fderiv ℝ Q x v‖ + ‖(fderiv ℝ R x v) • direction (e₁ x) (e₂ x) (α x)‖ + + ‖R x • (Real.cos (α x) • fderiv ℝ e₁ x v + Real.sin (α x) • fderiv ℝ e₂ x v)‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) (le_refl _)) + _ ≤ ‖fderiv ℝ Q x v‖ + |fderiv ℝ R x v| * (‖e₁ x‖ + ‖e₂ x‖) + + |R x| * (‖fderiv ℝ e₁ x v‖ + ‖fderiv ℝ e₂ x v‖) := by + simp only [norm_smul, Real.norm_eq_abs] + exact add_le_add (add_le_add (le_refl _) + (mul_le_mul_of_nonneg_left (norm_direction_le _ _ _) (abs_nonneg _))) + (mul_le_mul_of_nonneg_left (norm_direction_le _ _ _) (abs_nonneg _)) + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityTurnDominance.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityTurnDominance.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb05ea4ecb340e154d2985385a9c4ba1ae774f79 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/VelocityTurnDominance.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocitySpatialBounds + +namespace OAI + +/-! A large spatial angular derivative gives the required strict lower bound +for the actual complementary normal component of the circular velocity. -/ +noncomputable section +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem circular_turn_dominates {Q : E → Vec} {R : E → ℝ} + {e₁ e₂ : E → Vec} {α : E → ℝ} {x v : E} {r C T : ℝ} + (hQ : DifferentiableAt ℝ Q x) (hR : DifferentiableAt ℝ R x) + (h₁ : DifferentiableAt ℝ e₁ x) (h₂ : DifferentiableAt ℝ e₂ x) + (hα : DifferentiableAt ℝ α x) + (hunit : angularDirection (e₁ x) (e₂ x) (α x) ⬝ᵥ + angularDirection (e₁ x) (e₂ x) (α x) = 1) + (hr : 0 < r) (hRx : r ≤ R x) (hC : 0 ≤ C) (hT : 0 ≤ T) + (hbound : ‖spatialError Q R e₁ e₂ α x v‖ ≤ C) + (hlarge : (T + 4 * C + 1) / r < fderiv ℝ α x v) : + T + 1 < fderiv ℝ (fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y)) x v ⬝ᵥ + angularDirection (e₁ x) (e₂ x) (α x) := by + have herr := circular_second_normal_bound (v := v) hQ hR h₁ h₂ hα hunit + have hE := abs_le.mp (herr.trans (mul_le_mul_of_nonneg_left hbound (by norm_num : (0 : ℝ) ≤ 4))) + have hprod : T + 4 * C + 1 < r * fderiv ℝ α x v := by + have hd := (div_lt_iff₀ hr).mp hlarge + nlinarith + have hdpos : 0 < fderiv ℝ α x v := by + have hpos : 0 < (T + 4 * C + 1) / r := div_pos (by linarith) hr + exact hpos.trans hlarge + have hscale := mul_le_mul_of_nonneg_right hRx hdpos.le + linarith [hE.1] + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Primitive/WeightedPeriodicPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Primitive/WeightedPeriodicPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b53115baa9c571d021916f7984824cf97063e77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Primitive/WeightedPeriodicPrimitive.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ParameterIntegralDerivatives +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicPrimitive + +namespace OAI + +/-! Periodic integration preserves weighted slow-parameter estimates. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u +namespace ClosedSurfaceR4.SmoothParameterIntegral +open PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Every slow parameter derivative commutes with the normalized primitive. -/ +theorem partialIterated_primitive {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + (n : ℕ) (p : P) (x : ℝ) : + partialIterated n (fun z : P × ℝ => primitive (fun t => F (z.1, t)) z.2) (p, x) = + primitive (fun t => partialIterated n F (p, t)) x := by + let G : P × ℝ → E := fun z => rawPrimitive (fun t => F (z.1, t)) z.2 + have hG : ContDiff ℝ ∞ G := contDiff_rawPrimitive_joint hF + have hr : ContDiff ℝ ∞ (fun q => rawPrimitive (fun t => F (q, t)) x) := + contDiff_integral hF 0 x + have hm : ContDiff ℝ ∞ (fun q => ∫ t in (0 : ℝ)..1, G (q, t)) := + contDiff_integral hG 0 1 + change iteratedFDeriv ℝ n + ((fun q => rawPrimitive (fun t => F (q, t)) x) - + (fun q => ∫ t in (0 : ℝ)..1, G (q, t))) p = _ + rw [iteratedFDeriv_sub_apply ((hr.of_le (by simp : (n : ℕ∞ω) ≤ ∞)).contDiffAt) + ((hm.of_le (by simp : (n : ℕ∞ω) ≤ ∞)).contDiffAt)] + change iteratedFDeriv ℝ n (fun q => ∫ t in (0 : ℝ)..x, F (q, t)) p - + iteratedFDeriv ℝ n (fun q => ∫ t in (0 : ℝ)..1, G (q, t)) p = _ + rw [iteratedFDeriv_integral hF 0 x, iteratedFDeriv_integral hG 0 1] + change (∫ t in (0 : ℝ)..x, partialIterated n F (p, t)) - + (∫ t in (0 : ℝ)..1, partialIterated n G (p, t)) = + (∫ t in (0 : ℝ)..x, partialIterated n F (p, t)) - + (∫ t in (0 : ℝ)..1, ∫ r in (0 : ℝ)..t, partialIterated n F (p, r)) + congr 1 + apply intervalIntegral.integral_congr + intro t _ + exact iteratedFDeriv_integral hF 0 t n p + +end ClosedSurfaceR4.SmoothParameterIntegral + +namespace ClosedSurfaceR4.WeightedEstimates +open SmoothParameterIntegral PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +theorem weighted_rawPrimitive {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + {U : Set P} (hU : IsOpen U) {s C : ℝ} (hs : 0 < s) (hC : 0 ≤ C) (m : ℕ) + (hb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Set.Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j F (p, t)‖ ≤ C) + {x : ℝ} (hx : x ∈ Set.Icc (0 : ℝ) 1) : + WeightedBound U s m C (fun p => rawPrimitive (fun t => F (p, t)) x) := by + have h := weighted_parameter_integral hF hU hs m 0 x (fun j hj p hp t ht => + hb j hj p hp t (by + rw [Set.uIcc_of_le hx.1] at ht + exact ⟨ht.1, ht.2.trans hx.2⟩)) + apply h.mono_const + simpa only [sub_zero, abs_of_nonneg hx.1] using mul_le_of_le_one_right hC hx.2 + +/-- The normalized primitive has weighted parameter norm at most twice +that of its input, uniformly over a fundamental period and at every order. -/ +theorem weighted_periodicPrimitive {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + {U : Set P} (hU : IsOpen U) {s C : ℝ} (hs : 0 < s) (hC : 0 ≤ C) (m : ℕ) + (hb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Set.Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j F (p, t)‖ ≤ C) + {x : ℝ} (hx : x ∈ Set.Icc (0 : ℝ) 1) : + WeightedBound U s m (2 * C) (fun p => primitive (fun t => F (p, t)) x) := by + let G : P × ℝ → E := fun z => rawPrimitive (fun t => F (z.1, t)) z.2 + have hG : ContDiff ℝ ∞ G := contDiff_rawPrimitive_joint hF + have hGb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Set.uIcc (0 : ℝ) 1, + s ^ j * ‖partialIterated j G (p, t)‖ ≤ C := by + intro j hj p hp t ht + rw [Set.uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1)] at ht + have hh := weighted_rawPrimitive hF hU hs hC m hb ht j hj p hp + have hGt : ContDiff ℝ ∞ (fun q => G (q, t)) := + hG.comp (contDiff_id.prodMk contDiff_const) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn + ((hGt.of_le (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) hp] at hh + exact hh + have hmean := weighted_parameter_integral hG hU hs m 0 1 hGb + simp only [sub_zero, abs_one, mul_one] at hmean + have hraw := weighted_rawPrimitive hF hU hs hC m hb hx + have hr : ContDiffOn ℝ ∞ (fun p => rawPrimitive (fun t => F (p, t)) x) U := + (hG.comp (contDiff_id.prodMk contDiff_const)).contDiffOn + have hm : ContDiffOn ℝ ∞ (fun p => ∫ t in (0 : ℝ)..1, G (p, t)) U := + (contDiff_integral hG 0 1).contDiffOn + have h := hraw.sub hU.uniqueDiffOn hs.le hr hm hmean + convert h using 1 <;> (first | rfl | ring) + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualProfileCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualProfileCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab1d3982f0f315bd22d2995ec2b8f38d331fd401 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualProfileCollar.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualProfileCurve + +namespace OAI + +/-! The positive boundary invariant on the zero-amplitude collar survives +small errors in the five profiles. No large angular derivative is needed there. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +private def collarInvariant (J : BoundaryProfile) (v : ℝ × ℝ × ℝ) : ℝ := + (profileCoefficients J 1 * v.1 + profileCoefficients J 0 * v.2.1)^2 + v.2.2 * v.1^2 + +private lemma continuousAt_collarInvariant {J : BoundaryProfile} + (hJ : J ∈ regularBoundaryProfiles) (v : ℝ × ℝ × ℝ) : + ContinuousAt (fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => collarInvariant w.1 w.2) (J,v) := by + have hc : ContinuousAt (fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => + profileCoefficients w.1) (J,v) := + ContinuousAt.comp (f := fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => w.1) + (x := (J,v)) (contDiffAt_profileCoefficients hJ).continuousAt continuous_fst.continuousAt + have hS := (continuous_apply 0).continuousAt.comp hc + have hD := (continuous_apply 1).continuousAt.comp hc + have hb : ContinuousAt (fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => w.2.1) (J,v) := + (continuous_fst.comp continuous_snd).continuousAt + have hcc : ContinuousAt (fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => w.2.2.1) (J,v) := + (continuous_fst.comp (continuous_snd.comp continuous_snd)).continuousAt + have hk : ContinuousAt (fun w : BoundaryProfile × (ℝ × ℝ × ℝ) => w.2.2.2) (J,v) := + (continuous_snd.comp (continuous_snd.comp continuous_snd)).continuousAt + exact (((hD.mul hb).add (hS.mul hcc)).pow 2).add (hk.mul (hb.pow 2)) + +theorem compact_profile_collar {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} (hJ : Continuous J) + (hreg : ∀ x, J x ∈ regularBoundaryProfiles) + {b c k : X → ℝ} (hb : Continuous b) (hc : Continuous c) (hk : Continuous k) + (hpos : ∀ x, 0 < (profileCoefficients (J x) 1 * b x + + profileCoefficients (J x) 0 * c x)^2 + k x * b x^2) : + ∃ η : ℝ, 0 < η ∧ ∀ x : X, ∀ H : BoundaryProfile, ‖H-J x‖ < η → + H ∈ regularBoundaryProfiles ∧ + 0 < (profileCoefficients H 1 * b x + profileCoefficients H 0 * c x)^2 + k x * b x^2 := by + let V : Set (BoundaryProfile × (ℝ × ℝ × ℝ)) := regularBoundaryProfiles ×ˢ univ + let O : Set (BoundaryProfile × (ℝ × ℝ × ℝ)) := + V ∩ (fun w => collarInvariant w.1 w.2) ⁻¹' Ioi 0 + have hcont : ContinuousOn (fun w => collarInvariant w.1 w.2) V := by + intro w hw + exact (continuousAt_collarInvariant hw.1 w.2).continuousWithinAt + have hO : IsOpen O := hcont.isOpen_inter_preimage + (isOpen_regularBoundaryProfiles.prod isOpen_univ) isOpen_Ioi + let f : X → BoundaryProfile × (ℝ × ℝ × ℝ) := fun x => (J x,b x,c x,k x) + have hf : Continuous f := hJ.prodMk (hb.prodMk (hc.prodMk hk)) + have hfO : range f ⊆ O := by + rintro _ ⟨x,rfl⟩ + exact ⟨⟨hreg x,mem_univ _⟩,hpos x⟩ + obtain ⟨η,hη,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open hO hfO + refine ⟨η,hη,?_⟩ + intro x H hclose + have hH : (H,b x,c x,k x) ∈ Metric.cthickening η (range f) := by + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (H,(b x,c x,k x)) (J x,(b x,c x,k x)) < η + rw [dist_prod_same_right,dist_eq_norm] + exact hclose + exact ⟨(hsub hH).1.1,(hsub hH).2⟩ + +/-- Transfer collar positivity to nonvanishing and antipode avoidance for the +actual second form, using the intrinsic curvature lower bound. -/ +theorem compact_actual_profile_collar {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} (hJ : Continuous J) + (hreg : ∀ x, J x ∈ regularBoundaryProfiles) + {b c k : X → ℝ} (hb : Continuous b) (hc : Continuous c) (hk : Continuous k) + (hpos : ∀ x, 0 < (profileCoefficients (J x) 1 * b x + + profileCoefficients (J x) 0 * c x)^2 + k x * b x^2) : + ∃ η : ℝ, 0 < η ∧ ∀ x : X, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ z : ℝ, ∀ p : Base, ‖realBoundaryProfile F z p-J x‖ < η → + k x ≤ coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p → + realSecondForm F (b x,c x) (b x,c x) p ≠ 0 ∧ + normalize (realSecondForm F (b x,c x) (b x,c x) p) ≠ + -profilePreferred (realBoundaryProfile F z p) := by + obtain ⟨η,hη,hclose⟩ := compact_profile_collar hJ hreg hb hc hk hpos + refine ⟨η,hη,?_⟩ + intro x F hF z p herr hcurv + obtain ⟨hactual,hpositive⟩ := hclose x (realBoundaryProfile F z p) herr + obtain ⟨f,hn,_,hcoef⟩ := exists_profile_secondFormFrame hF z p hactual + have hpositive' : 0 < (f.D*b x+f.S*c x)^2+k x*b x^2 := by + simpa only [hcoef,Matrix.cons_val_zero,Matrix.cons_val_one] using hpositive + have hactualpos : 0 < (f.D*b x+f.S*c x)^2+ + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p*b x^2 := + hpositive'.trans_le (add_le_add_right (mul_le_mul_of_nonneg_right hcurv (sq_nonneg _)) _) + have hcomp := pure_first_positive_of_collar (N := f.N) (L := f.L) f.size_pos hactualpos + simpa only [hn] using f.actual_curve_avoidance hF (b x) (c x) (Or.inl hcomp) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRelativeFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRelativeFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0e25279aaf4a95e4a1aff958756e0125d8faf8c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRelativeFrame.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalFrameTransport + +namespace OAI + +/-! Smooth transport and exact exterior pasting produce a genuine formal +differential for the original Euclidean surface map. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma transportedNormalFrame_smoothOn {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (a : FrameTarget) {d : ℝ → Base} (hd : ContDiff ℝ ∞ d) + {B : Base → Base →L[ℝ] FrameTarget} (hB : ContDiff ℝ ∞ B) + {V : Set Base} (hV : V ⊆ normalFrameDomain φ a) : + ContDiffOn ℝ ∞ (transportedNormalFrame φ a d B) V := by + have hu := transverseDerivative_smooth hφ + have hcross : ContDiff ℝ ∞ (fun x => transverseDerivative φ x ⨯₃ a) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [cross_apply] <;> fun_prop + have hframe : ContDiff ℝ ∞ (fun x => curveNormalLinear (transverseDerivative φ x) a) := + ((contDiff_const.smulRight hu).add contDiff_const).add (contDiff_const.smulRight hcross) + have hc : ContDiffOn ℝ ∞ (longitudinalCoefficient φ a) V := by + intro x hx + have hi := (curveNormalLinear_invertible (normalFrameDomain_nonzero (hV hx)) + (normalFrameDomain_transverse (hV hx))).contDiffAt_map_inverse.comp x hframe.contDiffAt + exact (hi.clm_apply ((coordinateDifferential_smooth hφ).clm_apply contDiff_const).contDiffAt).snd.contDiffWithinAt + exact hframe.contDiffOn.clm_comp + (((normalOutput_smooth.comp (hd.comp (contDiff_apply ℝ ℝ 1))).contDiffOn).clm_comp + (hB.contDiffOn.clm_comp (longitudinalShear_smooth.comp_contDiffOn hc))) + +theorem actual_relative_frame {φ : Base → ProjectionTarget 3} (hφ : ContDiff ℝ ∞ φ) + (a : FrameTarget) {d : ℝ → Base} (hd : ContDiff ℝ ∞ d) + {V : Set Base} (hV : IsOpen V) (hVF : V ⊆ normalFrameDomain φ a) + (hdn : ∀ x ∈ V, d (x 1) ≠ 0) {G : Base → Base} + (hG : EqOn G (axisNormalizedDefect d (normalDefect φ a)) V) + (hfill : HasRelativeDefectFilling G V) : + ∃ (A : Base → Base →L[ℝ] ProjectionTarget 3) (K : Set Base), + ContDiff ℝ ∞ A ∧ IsCompact K ∧ K ⊆ V ∧ + tsupport (A-fderiv ℝ φ) ⊆ K ∧ (∀ x ∈ V, Function.Injective (A x)) := by + obtain ⟨B,K,hB,hK,hKV,hBI,hBe⟩ := hfill + let C := transportedNormalFrame φ a d B + have hC : ContDiffOn ℝ ∞ C V := transportedNormalFrame_smoothOn hφ a hd hB hVF + have hCI : ∀ x ∈ V, Function.Injective (C x) := by + intro x hx + exact transportedNormalFrame_injective (normalFrameDomain_nonzero (hVF hx)) + (normalFrameDomain_transverse (hVF hx)) (hdn x hx) (hBI x hx) + have hCe : ∀ x ∈ V, x ∉ K → C x = coordinateDifferential φ x := by + intro x hx hxK + have hb : B x = defectFrame (axisNormalizedDefect d (normalDefect φ a)) x := by + rw [hBe x hxK] + unfold defectFrame + rw [hG hx] + change (curveNormalLinear (transverseDerivative φ x) a).comp + ((normalOutput (d (x 1))).comp ((B x).comp (longitudinalShear (longitudinalCoefficient φ a x)))) = _ + rw [hb] + exact transportedNormalFrame_exact φ a d x (normalFrameDomain_nonzero (hVF hx)) + (normalFrameDomain_transverse (hVF hx)) (hdn x hx) + obtain ⟨D,hD,hDs,hDC,hDe⟩ := compact_relative_field (coordinateDifferential_smooth hφ) + hV hC hK hKV hCe + let E := (EuclideanSpace.equiv (Fin 3) ℝ).symm.toContinuousLinearMap + let A := fun x => E.comp (D x) + have hA : ContDiff ℝ ∞ A := contDiff_const.clm_comp hD + have hAe : ∀ x ∉ K, A x = fderiv ℝ φ x := by + intro x hx + dsimp [A,E] + rw [hDe x hx] + ext v + simp [coordinateDifferential] + refine ⟨A,K,hA,hK,hKV,?_,?_⟩ + · apply closure_minimal _ hK.isClosed + intro x hx + by_contra hxK + exact hx (by simp only [Pi.sub_apply,hAe x hxK,sub_self]) + · intro x hx + apply (EuclideanSpace.equiv (Fin 3) ℝ).symm.injective.comp + rw [hDC hx] + exact hCI x hx + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledCrosscapStrip.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledCrosscapStrip.lean new file mode 100644 index 0000000000000000000000000000000000000000..09d14784b2dfb98ac0c517778be708fa33245134 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledCrosscapStrip.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualRuledRectangle +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapArcGermRestriction + +namespace OAI + +/-! The supported replacement retains actual endpoint crosscap charts + and the same full source strip, rather than just formal derivative data. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} +variable {S : CrosscapCoordinateStrip A} {c d : ℝ} + +theorem ActualRuledRectangle.crosscap_strip (R : ActualRuledRectangle S c d) : + ∃ (B : CrosscapConnectingArc R.replacement p q) (T : CrosscapCoordinateStrip B), + B.arc = A.arc ∧ T.chart = S.chart ∧ T.model = R.model ∧ T.domain = S.domain := by + obtain ⟨B,hB⟩ := A.restrict_germs R.left_germ R.right_germ R.regular_iff + have hfirst : ∀ t, fderiv ℝ R.model (![0,t] : Base) = + fderiv ℝ S.model (![0,t] : Base) := by + intro t + simpa only [crosscapAxis_apply] using (R.axis_jets t).2.1 + let T : CrosscapCoordinateStrip B := { + chart := S.chart + width := S.width + width_pos := S.width_pos + chart_smooth := S.chart_smooth + inverse_smooth := S.inverse_smooth + model := R.model + model_smooth := R.model_smooth + domain := S.domain + domain_open := S.domain_open + domain_target := S.domain_target + model_eq := R.model_eq + axis := by simpa only [hB] using S.axis + rectangle := by simpa only [hB] using S.rectangle + transverse := by + intro t ht + rw [hfirst] + exact S.transverse t (by simpa only [hB] using ht) + interior_regular := by + intro t ht + rw [hfirst] + exact S.interior_regular t (by simpa only [hB] using ht) + left_vertical := by + rw [hB,hfirst] + exact S.left_vertical + right_vertical := by + rw [hB,hfirst] + exact S.right_vertical } + exact ⟨B,T,hB,rfl,rfl,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledRectangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledRectangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..229d29e75fc3a1b623716427b2901f3ae1fc6ced --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledRectangle.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceRuledInterior +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAxisGermEquality + +namespace OAI + +/-! A single explicit rectangular ruled region in the supported surface +replacement, with retained actual coordinate and crosscap jets. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +structure ActualRuledRectangle (S : CrosscapCoordinateStrip A) (c d : ℝ) where + replacement : M → ProjectionTarget 3 + model : Base → ProjectionTarget 3 + support : Set M + radius : ℝ + radius_pos : 0 < radius + smooth : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ replacement + model_smooth : ContDiff ℝ ∞ model + support_compact : IsCompact support + support_source : support ⊆ S.chart.source + exterior : ∀ x ∉ support, replacement =ᶠ[𝓝 x] f + left_germ : replacement =ᶠ[𝓝 p] f + right_germ : replacement =ᶠ[𝓝 q] f + model_eq : EqOn model (replacement ∘ S.chart.symm) S.domain + regular_iff : ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) replacement x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) + axis_jets : ∀ t, model (crosscapAxis t) = S.model (crosscapAxis t) ∧ + fderiv ℝ model (crosscapAxis t) = fderiv ℝ S.model (crosscapAxis t) ∧ + axisDirectionJet model (crosscapAxis t) = axisDirectionJet S.model (crosscapAxis t) + ruled_rectangle : ∀ x ∈ Icc (-radius) radius, + ∀ t ∈ Icc (c-radius) (d+radius), (![x,t] : Base) ∈ S.domain ∧ + model ![x,t] = transverseRuling S.model ![x,t] + +theorem CrosscapCoordinateStrip.exists_actual_ruled_rectangle (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {c d : ℝ} (hac : A.arc.start < c) (hcd : c ≤ d) (hdb : d < A.arc.finish) : + Nonempty (ActualRuledRectangle S c d) := by + obtain ⟨g,K,G,hg,hK,hKS,hG,hmodel,hjets,hreg,hout,hl,hr,hinner⟩ := + S.surface_ruled_interior hf hac hdb + have haxis : ∀ t ∈ Icc c d, crosscapAxis t ∈ S.domain := by + intro t ht + rw [crosscapAxis_apply] + apply S.rectangle 0 ⟨by linarith [S.width_pos],by linarith [S.width_pos]⟩ t + constructor <;> linarith [ht.1,ht.2,S.width_pos] + obtain ⟨δ,hδ,hrect⟩ := compact_axis_germ_equality hcd S.domain_open haxis + (fun t ht => (hinner t ht).1) + exact ⟨⟨g,G,K,δ,hδ,hg,hG,hK,hKS,hout,hl,hr,hmodel,hreg,hjets,hrect⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTargetTube.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTargetTube.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e6caa624ed6e650c532078201c78e1bb640c279 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTargetTube.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualRuledCrosscapStrip +import OAI.Geometry.SurfaceImmersion.Geometry.CompactVaryingFrameTube +import OAI.Geometry.SurfaceImmersion.Whitney.RulingLinearTarget + +namespace OAI + +/-! The constructed surface contains a genuine framed target tube on + its ruled inner rectangle, with uniformly invertible differential. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} +variable {S : CrosscapCoordinateStrip A} {c d : ℝ} + +theorem ActualRuledRectangle.target_tube (R : ActualRuledRectangle S c d) + (hac : A.arc.start < c) (hcd : c ≤ d) (hdb : d < A.arc.finish) : + ∃ (T : Base × ℝ → Fin 3 → ℝ) (r : ℝ) (U : Set ℝ), + ContDiff ℝ ∞ T ∧ 0 < r ∧ IsOpen U ∧ Icc c d ⊆ U ∧ + (∀ x : Base, ‖x‖ < r → ∀ t ∈ U, Function.Bijective (fderiv ℝ T (x,t))) ∧ + ∀ x : ℝ, |x| < r → ∀ t ∈ Icc c d, + T (![x,0],t) = EuclideanSpace.equiv (Fin 3) ℝ (R.model ![x,t]) := by + let E := (EuclideanSpace.equiv (Fin 3) ℝ).toContinuousLinearMap + let F : Base → Fin 3 → ℝ := E ∘ S.model + have hF : ContDiff ℝ ∞ F := E.contDiff.comp S.model_smooth + have hI : ∀ t ∈ Icc c d, Function.Injective (fderiv ℝ F (crosscapAxis t)) := by + intro t ht + have htab : t ∈ Ioo A.arc.start A.arc.finish := + ⟨hac.trans_le ht.1,ht.2.trans_lt hdb⟩ + dsimp only [F] + rw [fderiv_comp _ E.differentiableAt (S.model_smooth.differentiable (by simp) _),E.fderiv] + have hbase : Function.Injective (fderiv ℝ S.model (crosscapAxis t)) := by + simpa only [crosscapAxis_apply] using S.interior_regular t htab + intro u v huv + apply hbase + exact (EuclideanSpace.equiv (Fin 3) ℝ).injective huv + let T := varyingFramedCurveTube (axisValue F) (axisTransverse F) + have hT : ContDiff ℝ ∞ T := varyingFramedCurveTube_smooth + (axisValue_smooth hF) (axisTransverse_smooth hF) + obtain ⟨ρ,U,hρ,hU,hKU,hTI⟩ := compact_varying_frame_tube + (axisValue_smooth hF) (axisTransverse_smooth hF) isCompact_Icc + (nonempty_Icc.mpr hcd) (fun t ht => (regular_axis_transverse hF (hI t ht)).1) + (fun t ht => (regular_axis_transverse hF (hI t ht)).2) + refine ⟨T,min ρ R.radius,U,hT,lt_min hρ R.radius_pos,hU,hKU,?_,?_⟩ + · intro x hx t ht + exact hTI x (hx.trans_le (min_le_left _ _)) t ht + · intro x hx t ht + have hxr : |x| ≤ R.radius := (hx.trans_le (min_le_right _ _)).le + have htr : t ∈ Icc (c-R.radius) (d+R.radius) := + ⟨by linarith [ht.1,R.radius_pos],by linarith [ht.2,R.radius_pos]⟩ + have he := (R.ruled_rectangle x (abs_le.mp hxr) t htr).2 + change varyingFramedCurveTube (axisValue F) (axisTransverse F) (![x,0],t) = E (R.model ![x,t]) + rw [varyingFramedCurveTube_zero_normal,he] + exact ruling_linear_target E S.model_smooth ![x,t] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTwist.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTwist.lean new file mode 100644 index 0000000000000000000000000000000000000000..70cd83330261540d6eeb3378f14095f48f85e40a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualRuledTwist.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TwistedTargetTube + +namespace OAI + +/-! Compactly supported twists inside the actual ruled target tube lift + to smooth surface maps and preserve the complete singular set. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} +variable {S : CrosscapCoordinateStrip A} {c d : ℝ} + +theorem ActualRuledRectangle.twist_family (R : ActualRuledRectangle S c d) + (hac : A.arc.start < c) (hcd : c ≤ d) (hdb : d < A.arc.finish) : + ∃ (T : Base × ℝ → Fin 3 → ℝ) (ε : ℝ), ContDiff ℝ ∞ T ∧ 0 < ε ∧ + ∀ θ : Base → ℝ, ContDiff ℝ ∞ θ → HasCompactSupport θ → + tsupport θ ⊆ {x | |x 0| < ε ∧ x 1 ∈ Ioo c d} → + ∃ (g : M → ProjectionTarget 3) (K : Set M), + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ IsCompact K ∧ + K ⊆ S.chart.source ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + (∀ x ∉ K, g =ᶠ[𝓝 x] R.replacement) ∧ + ∀ x ∈ S.chart.source, |S.chart x 0| < ε → S.chart x 1 ∈ Ioo c d → + g =ᶠ[𝓝 x] (twistedTubeSurface T θ) ∘ S.chart := by + obtain ⟨T,r,U,hT,hr,hU,hKU,hTI,hTM⟩ := R.target_tube hac hcd hdb + let ε := min r R.radius + have hε : 0 < ε := lt_min hr R.radius_pos + let Ω : Set Base := {x | |x 0| < ε ∧ x 1 ∈ Ioo c d} + have hΩ : IsOpen Ω := by + change IsOpen ({x : Base | |x 0| < ε} ∩ ((fun x : Base => x 1) ⁻¹' Ioo c d)) + exact (isOpen_lt (continuous_apply (0 : Fin 2)).abs continuous_const).inter + (isOpen_Ioo.preimage (continuous_apply 1)) + have hΩD : Ω ⊆ S.domain := by + intro x hx + have hx0 : |x 0| ≤ R.radius := (hx.1.trans_le (min_le_right _ _)).le + have ht : x 1 ∈ Icc (c-R.radius) (d+R.radius) := by + constructor <;> linarith [hx.2.1,hx.2.2,R.radius_pos] + have hh := (R.ruled_rectangle (x 0) (abs_le.mp hx0) (x 1) ht).1 + convert hh using 1 + ext i; fin_cases i <;> rfl + have hbase : ∀ x ∈ Ω, R.model =ᶠ[𝓝 x] twistedTubeSurface T 0 := by + intro x hx + filter_upwards [hΩ.mem_nhds hx] with y hy + have he := hTM (y 0) (hy.1.trans_le (min_le_left _ _)) (y 1) ⟨hy.2.1.le,hy.2.2.le⟩ + have hyid : (![y 0,y 1] : Base) = y := by ext i; fin_cases i <;> rfl + rw [hyid] at he + change R.model y = (EuclideanSpace.equiv (Fin 3) ℝ).symm + (T (twistedRuledCoordinates 0 y)) + rw [twistedRuledCoordinates_zero (show (0 : Base → ℝ) y = 0 from rfl),he] + exact ((EuclideanSpace.equiv (Fin 3) ℝ).symm_apply_apply _).symm + have hregular : ∀ θ : Base → ℝ, ContDiff ℝ ∞ θ → ∀ x ∈ Ω, + Function.Injective (fderiv ℝ (twistedTubeSurface T θ) x) := by + intro θ hθ x hx + apply twistedTubeSurface_immersion hT hθ + apply (hTI (twistedRuledCoordinates θ x).1 ?_ (x 1) (hKU ⟨hx.2.1.le,hx.2.2.le⟩)).1 + exact (twistedRuledCoordinates_bound θ x).trans_lt (hx.1.trans_le (min_le_left _ _)) + refine ⟨T,ε,hT,hε,?_⟩ + intro θ hθ hc hs + let Q := twistedTubeSurface T θ-twistedTubeSurface T 0 + have hQ : ContDiff ℝ ∞ Q := + (twistedTubeSurface_smooth hT hθ).sub (twistedTubeSurface_smooth hT contDiff_const) + have hQs : tsupport Q ⊆ tsupport θ := twistedTubeSurface_difference_support T θ + have hQc : HasCompactSupport Q := hc.of_isClosed_subset (isClosed_tsupport Q) hQs + have he : ∀ x ∈ Ω, R.model+Q =ᶠ[𝓝 x] twistedTubeSurface T θ := by + intro x hx + filter_upwards [hbase x hx] with y hy + change R.model y+(twistedTubeSurface T θ y-twistedTubeSurface T 0 y) = _ + rw [hy] + abel + have hrel : ∀ x ∈ tsupport Q, Function.Injective (fderiv ℝ (R.model+Q) x) ↔ + Function.Injective (fderiv ℝ R.model x) := by + intro x hx + have hxΩ : x ∈ Ω := hs (hQs hx) + rw [(he x hxΩ).fderiv_eq,(hbase x hxΩ).fderiv_eq] + exact iff_of_true (hregular θ hθ x hxΩ) (hregular 0 contDiff_const x hxΩ) + obtain ⟨g,hg,hreg,hout,hin⟩ := coordinate_regular_replacement S.chart S.chart_smooth + S.inverse_smooth R.smooth hQ hQc S.domain_open S.domain_target + (hQs.trans (hs.trans hΩD)) R.model_eq hrel + let K := S.chart.symm '' tsupport θ + have hKD : tsupport θ ⊆ S.chart.target := hs.trans (hΩD.trans S.domain_target) + have hK : IsCompact K := hc.image_of_continuousOn (S.chart.continuousOn_symm.mono hKD) + refine ⟨g,K,hg,hK,?_,fun x => (hreg x).trans (R.regular_iff x),?_,?_⟩ + · rintro x ⟨y,hy,rfl⟩ + exact S.chart.map_target (hKD hy) + · intro x hx + apply hout x + intro hxin + apply hx + exact image_mono hQs hxin + · intro x hx h0 h1 + have hxΩ : S.chart x ∈ Ω := ⟨h0,h1⟩ + exact (hin x hx (hΩD hxΩ)).trans + (coordinate_replacement_germ S.chart hx (he (S.chart x) hxΩ)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..56c6ad631487434eda5fb1a11cfaf70983da7b23 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarFamily.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ConstructedCollarFamily +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedJetDomain + +namespace OAI + +/-! The preferred frame and its domain are fixed before prescribing the +transverse turn size in the actual supported loop construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates + +theorem actual_surface_collar_family {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + : + ∃ Ω : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Ω ∧ + (Ω : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Ω ∧ ContDiffOn ℝ ∞ e₂ Ω ∧ + (∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + (∃ B : Set GeometricJet, IsOpen B ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ B ∧ + ∀ j ∈ B, jetNormal j ≠ 0 ∧ e₁ j = normalize (jetNormal j)) ∧ + ∀ ε : ℝ, 0 < ε → ∃ V : Set Base, IsOpen V ∧ {p ∈ T | a p = 0} ⊆ V ∧ + ∀ (K P : Set Base), IsCompact K → K ⊆ T → (∀ p ∈ K, 0 < a p) → + P.Finite → P ⊆ K → + (∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) → + ∀ turn : ℝ, ∃ Z : TopologicalSpace.Opens GeometricJet, + CollarVelocity.jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + (∀ x ∈ V, ∀ t, |α (CollarVelocity.jetSection F x,t)| < ε) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,0)) x dy ∧ + turn < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,τ x)) x dy := by + let C₀ : Set Base := {p ∈ T | a p = 0} + have hC : IsCompact C₀ := hT.inter_right (isClosed_eq ha.continuous continuous_const) + have hCU : C₀ ⊆ U := fun _ hp => hTU hp.1 + obtain ⟨W,hW,hCW,hWΩ,e₁,e₂,he₁,he₂,hframe,hcollar⟩ := exists_preferred_jet_frame + hF hU hn hC hCU hI hN hHess (fun p hp => hboundary p hp.1 hp.2) + let Ω := supportedJetDomain U n a + have hΩ : IsOpen Ω := supportedJetDomain_open hU hn ha + let L := CollarVelocity.jetSection F '' T + let Cj := CollarVelocity.jetSection F '' C₀ + have hL : IsCompact L := hT.image (CollarVelocity.jetSection_smooth hF).continuous + have hCj : IsCompact Cj := hC.image (CollarVelocity.jetSection_smooth hF).continuous + have hLΩ : L ⊆ Ω := by + rintro _ ⟨p,hp,rfl⟩ + exact actual_jet_mem_supported_domain hF (hTU hp) (hI p (hTU hp)) + (hN p (hTU hp)) (hHess p (hTU hp)) (fun h => (hboundary p hp h).1) + let V₀ : Set GeometricJet := W ∩ Ω + have hV₀ : IsOpen V₀ := hW.inter hΩ + have hCV₀ : Cj ⊆ V₀ := by + rintro _ ⟨p,hp,rfl⟩ + exact ⟨hCW (mem_image_of_mem _ hp),hLΩ (mem_image_of_mem _ hp.1)⟩ + have hAmp : ∀ j ∈ L \ Cj, 0 < a j.1 := by + rintro j ⟨⟨p,hp,rfl⟩,hj⟩ + apply lt_of_le_of_ne (haT p hp) + intro hz + exact hj (mem_image_of_mem _ ⟨hp,hz.symm⟩) + have hCL : Cj ⊆ L := image_mono (fun _ hp => hp.1) + have hV₀Ω : V₀ ⊆ Ω := inter_subset_right + have he1 : ContDiffOn ℝ ∞ e₁ Ω := he₁.mono (fun _ hj => hj.1) + have he2 : ContDiffOn ℝ ∞ e₂ Ω := he₂.mono (fun _ hj => hj.1) + have hfr := fun j (hj : j ∈ Ω) => hframe j hj.1 + obtain ⟨W₀,hW₀,hCW₀,_,hfamily⟩ := constructed_surface_collar_family hF hCj hL hCL + hV₀ hΩ hCV₀ hV₀Ω hLΩ he1 he2 (ha.comp contDiff_fst).contDiffOn + (fun j hj => preferredJetDomain_velocity_gram hj.1) hfr + (fun j hj => hcollar j hj.1) (fun j hj => hj.2) hAmp + (by rintro _ ⟨p,hp,rfl⟩; exact hp.2) + refine ⟨⟨Ω,hΩ⟩,hLΩ,Subset.rfl,e₁,e₂,he1,he2,hfr,⟨W,hW,hCW,hcollar⟩,?_⟩ + intro ε hε + obtain ⟨V,hV,hCV,_,hfamily'⟩ := hfamily ε hε + refine ⟨CollarVelocity.jetSection F ⁻¹' V,hV.preimage (CollarVelocity.jetSection_smooth hF).continuous, + (fun p hp => hCV (mem_image_of_mem _ hp)),?_⟩ + intro K P hK hKT haK hP hPK hlocal turn + obtain ⟨O,hO,hKO,_,hOpos⟩ := CollarVelocity.compact_open_thickening hK + (isOpen_lt continuous_const ha.continuous) haK + have hCO : ∀ j ∈ Cj, j.1 ∉ closure O := by + rintro _ ⟨p,hp,rfl⟩ hx + have hh := hOpos hx + change 0 < a p at hh + rw [hp.2] at hh + exact lt_irrefl _ hh + obtain ⟨Z,hLZ,hZΩ,l,hl,hzero,α,hα,hper,hvel,hsmall,τ,hturn,hlarge⟩ := + hfamily' K O P hK (fun _ hx => mem_image_of_mem _ (hKT hx)) hO hKO hCO hP hPK hlocal turn + refine ⟨Z,hLZ,hZΩ,l,hl,?_,α,hα,hper,hvel,?_,τ,hturn,hlarge⟩ + · obtain ⟨W',hW',hCW',_,hzero'⟩ := hzero + exact ⟨W',hW',hCW',hzero'⟩ + · exact fun x hx t => hsmall _ hx t + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbf8f135aeea767c14349b0e6204930a586b0611 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ActualSurfaceCollarProfiles.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualSurfaceCollarFamily +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCircularThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.ClosedIntervalTurns + +namespace OAI + +/-! The preferred frame and its domain are fixed before prescribing the +transverse turn size in the actual supported loop construction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame PhaseGeometry SurfaceJetCoordinates GeometryPreservation + +theorem actual_surface_collar_profile_family {F n : Base → Vec} {a : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (ha : ContDiff ℝ ∞ a) + {T U : Set Base} (hT : IsCompact T) (hU : IsOpen U) (hTU : T ⊆ U) + (hn : ContDiffOn ℝ ∞ n U) + (hI : ∀ p ∈ U, Function.Injective (fderiv ℝ F p)) + (hN : ∀ p ∈ U, coordDeriv dx F p ⬝ᵥ n p = 0 ∧ coordDeriv dy F p ⬝ᵥ n p = 0 ∧ + n p ⬝ᵥ n p = 1) + (hHess : ∀ p ∈ U, 0 < coordinateMetricHessian (inducedCoordinateMetric F) Prod.fst p dy dy) + (haT : ∀ p ∈ T, 0 ≤ a p) + (hboundary : ∀ p ∈ T, a p = 0 → realSecondForm F dy dy p ≠ 0 ∧ + normalize (realSecondForm F dy dy p) ≠ -n p) + : + ∃ Ω : TopologicalSpace.Opens GeometricJet, CollarVelocity.jetSection F '' T ⊆ Ω ∧ + (Ω : Set GeometricJet) ⊆ supportedJetDomain U n a ∧ + ∃ e₁ e₂ : GeometricJet → Vec, + ContDiffOn ℝ ∞ e₁ Ω ∧ ContDiffOn ℝ ∞ e₂ Ω ∧ + (∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) ∧ + (∃ B : Set GeometricJet, IsOpen B ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ B ∧ + ∀ j ∈ B, jetNormal j ≠ 0 ∧ e₁ j = normalize (jetNormal j)) ∧ + ∃ sLo sHi D : ℝ, 0 < sLo ∧ 0 < sHi ∧ 0 ≤ D ∧ + ∀ ε : ℝ, 0 < ε → ∃ V : Set Base, IsOpen V ∧ {p ∈ T | a p = 0} ⊆ V ∧ + ∀ (K P : Set Base), IsCompact K → K ⊆ T → (∀ p ∈ K, 0 < a p) → + P.Finite → P ⊆ K → + (∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) → + ∀ H : ℝ, 0 ≤ H → ∃ Z : TopologicalSpace.Opens GeometricJet, + CollarVelocity.jetSection F '' T ⊆ Z ∧ (Z : Set GeometricJet) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), + (∀ J, l.amplitude J = a (decode J).1) ∧ + (∃ W : Set GeometricJet, IsOpen W ∧ + CollarVelocity.jetSection F '' {p ∈ T | a p = 0} ⊆ W ∧ + ∀ J, decode J ∈ W → a (decode J).1 = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : GeometricJet × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J).1) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + (∀ x ∈ V, ∀ t, |α (CollarVelocity.jetSection F x,t)| < ε) ∧ + (∀ x ∈ T, ∀ t : ℝ, + let J := surfaceCircularProfile F a e₁ e₂ α (x,t) + J ∈ regularBoundaryProfiles ∧ sLo ≤ profileCoefficients J 0 ∧ + profileCoefficients J 0 ≤ sHi ∧ |profileCoefficients J 1| ≤ D) ∧ + ∀ x ∈ K, ∀ t ∈ Icc (0 : ℝ) 1, + profileCoefficients (surfaceCircularProfile F a e₁ e₂ α (x,t)) 3 = 0 → + H+2 < |profileCoefficients (surfaceCircularProfile F a e₁ e₂ α (x,t)) 2| := by + obtain ⟨Ω,hTΩ,hΩ,e₁,e₂,h₁,h₂,hframe,hcollar,hfamily⟩ := + actual_surface_collar_family hF ha hT hU hTU hn hI hN hHess haT hboundary + obtain ⟨sLo,sHi,D,hsLo,hsHi,hD0,hthreshold⟩ := + compact_surface_circular_threshold hF ha hΩ hT hTΩ h₁ h₂ hframe + refine ⟨Ω,hTΩ,hΩ,e₁,e₂,h₁,h₂,hframe,hcollar,sLo,sHi,D,hsLo,hsHi,hD0,?_⟩ + intro ε hε + obtain ⟨V,hV,hCV,hfamily'⟩ := hfamily ε hε + refine ⟨V,hV,hCV,?_⟩ + intro K P hK hKT haK hP hPK hlocal H hH + obtain ⟨Λ,_,hprofile⟩ := hthreshold H hH + obtain ⟨Z,hTZ,hZΩ,l,hamp,hzero,α,hα,hper,hvel,hsmall,τ,hturn,hlarge⟩ := + hfamily' K P hK hKT haK hP hPK hlocal Λ + refine ⟨Z,hTZ,hZΩ,l,hamp,hzero,α,hα,hper,hvel,hsmall,?_,?_⟩ + · intro x hx t + obtain ⟨hreg,hlo,hhi,hd,_⟩ := hprofile Z hTZ hZΩ α hα x hx t + exact ⟨hreg,hlo,hhi,hd⟩ + · let W : Set Base := CollarVelocity.jetSection F ⁻¹' Z + have hσ := CollarVelocity.jetSection_smooth hF + have hW : IsOpen W := Z.isOpen.preimage hσ.continuous + have hKW : K ⊆ W := fun x hx => hTZ (mem_image_of_mem _ (hKT hx)) + have hα' : ContDiffOn ℝ ∞ (fun z : Base × ℝ => α (CollarVelocity.jetSection F z.1,z.2)) + (W ×ˢ univ) := + hα.comp ((hσ.comp contDiff_fst).prodMk contDiff_snd).contDiffOn (fun _ hz => ⟨hz.1,hz.2⟩) + have hturn' := closed_interval_turns hW hKW hα' + (fun x hx => hper (CollarVelocity.jetSection F x) hx) hturn hlarge + intro x hx t ht hz + apply (hprofile Z hTZ hZΩ α hα x (hKT hx) t).2.2.2.2 + apply hturn' x hx t ht + exact (surfaceCircularProfile_turn_iff hΩ hframe α + (hTΩ (mem_image_of_mem _ (hKT hx))) t).mp hz + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdaptedDoubleSheetModels.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdaptedDoubleSheetModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3faba2ac9bce7d93779d85b4a528f1d8087cfb3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdaptedDoubleSheetModels.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateSurfaceModels +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingCoordinateMap +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleAtlas +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveVelocities + +namespace OAI + +/-! Constructed smooth models of the two actual sheets, using the same +parameter on their common curve. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +structure LocalDoubleSheetModel (f : M → ProjectionTarget 3) (x y : M) (t : ℝ) where + left : OpenPartialHomeomorph M Base + right : OpenPartialHomeomorph M Base + F : Base → ProjectionTarget 3 + G : Base → ProjectionTarget 3 + left_mem : x ∈ left.source + right_mem : y ∈ right.source + left_center : left x = ![0,t] + right_center : right y = ![0,t] + left_smooth : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ left left.source + right_smooth : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ right right.source + left_inverse_smooth : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ left.symm left.target + right_inverse_smooth : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ right.symm right.target + F_smooth : ContDiff ℝ ∞ F + G_smooth : ContDiff ℝ ∞ G + left_model : f =ᶠ[𝓝 x] F ∘ left + right_model : f =ᶠ[𝓝 y] G ∘ right + common_axis : (fun s => F ![0,s]) =ᶠ[𝓝 t] (fun s => G ![0,s]) + transverse : Function.Surjective (fun z : Base × Base => + fderiv ℝ F ![0,t] z.1-fderiv ℝ G ![0,t] z.2) + +namespace SmoothDoubleChart +variable {f : M → ProjectionTarget 3} + +theorem adapted_sheet_models (c : SmoothDoubleChart f) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {t : ℝ} + (ht : t ∈ c.coord.target) + (hreg : Function.Surjective (surfacePairDerivative f (c.coord.symm t).val.1 (c.coord.symm t).val.2)) + (hAf : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (c.coord.symm t).val.1)) + (hBf : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (c.coord.symm t).val.2)) : + Nonempty (LocalDoubleSheetModel f (c.coord.symm t).val.1 (c.coord.symm t).val.2 t) := by + let A : ℝ → M := fun s => (c.coord.symm s).val.1 + let B : ℝ → M := fun s => (c.coord.symm s).val.2 + have hAs := c.inverse_left_smooth.contMDiffAt (c.coord.open_target.mem_nhds ht) + have hBs := c.inverse_right_smooth.contMDiffAt (c.coord.open_target.mem_nhds ht) + have hEq : f ∘ A =ᶠ[𝓝 t] f ∘ B := + Filter.Eventually.of_forall fun s => (c.coord.symm s).property.2 + obtain ⟨hAI,hBI⟩ := regular_double_curve_velocities hf hAs hBs hEq (c.inverse_regular t ht) hAf hBf + obtain ⟨a,U,hU,htU,hUT,has,hai,haxisA⟩ := + surface_curve_coordinates c.coord.open_target c.inverse_left_smooth ht hAI + obtain ⟨b,V,hV,htV,hVT,hbs,hbi,haxisB⟩ := + surface_curve_coordinates c.coord.open_target c.inverse_right_smooth ht hBI + have ha := (haxisA t htU).1 + have hb := (haxisB t htV).1 + have hac := (haxisA t htU).2 + have hbc := (haxisB t htV).2 + obtain ⟨P,F,hP,hxP,hPa,hF,hFP⟩ := coordinate_representative a hai hf ha + obtain ⟨Q,G,hQ,hyQ,hQb,hG,hGQ⟩ := coordinate_representative b hbi hf hb + have hFm := coordinate_representative_germ a ha hP hxP hFP + have hGm := coordinate_representative_germ b hb hQ hyQ hGQ + have htrans := coordinate_pair_surjective a b has hbs ha hb hF hG hFm hGm hreg + rw [hac,hbc] at htrans + let J := U ∩ V ∩ (fun s => (![0,s] : Base)) ⁻¹' (P ∩ Q) + have hJ : IsOpen J := (hU.inter hV).inter ((hP.inter hQ).preimage (by fun_prop)) + have htJ : t ∈ J := by + refine ⟨⟨htU,htV⟩,?_,?_⟩ + · change (![0,t] : Base) ∈ P + rwa [← hac] + · change (![0,t] : Base) ∈ Q + rwa [← hbc] + have haxis : (fun s => F ![0,s]) =ᶠ[𝓝 t] (fun s => G ![0,s]) := by + filter_upwards [hJ.mem_nhds htJ] with s hs + have hsa := haxisA s hs.1.1 + have hsb := haxisB s hs.1.2 + calc + F ![0,s] = f (a.symm ![0,s]) := hFP hs.2.1 + _ = f (A s) := by rw [← hsa.2,a.left_inv hsa.1] + _ = f (B s) := (c.coord.symm s).property.2 + _ = G ![0,s] := by + rw [hGQ hs.2.2] + change f (B s) = f (b.symm ![0,s]) + rw [← hsb.2,b.left_inv hsb.1] + exact ⟨⟨a,b,F,G,ha,hb,hac,hbc,has,hbs,hai,hbi,hF,hG,hFm,hGm,haxis,htrans⟩⟩ + +end SmoothDoubleChart + +omit [IsManifold planeModel ∞ M] in +lemma LocalDoubleSheetModel.crossing_regular {f : M → ProjectionTarget 3} + {x y : M} {t : ℝ} (m : LocalDoubleSheetModel f x y t) : + Function.Bijective (fderiv ℝ (crossingCoordinateMap m.F m.G) (0,t)) := + crossingCoordinateMap_regular m.F_smooth m.G_smooth t m.common_axis m.transverse + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0c2dd3dd60b205ed1850df02a6544f041b1a352 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerArc.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.AdvancingCornerParameters +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledGraphJoin +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcChartTransport + +namespace OAI + +/-! An advancing corner has an actual regular embedded surface rounding in +any prescribed open neighborhood, with the original branch germs at both ends. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} +namespace RegularPathCornerChart + +theorem advancing_corner_arc (C : RegularPathCornerChart γ t) + (hl : StrictMono C.leftParameter) (hr : StrictMono C.rightParameter) + {O : Set M} (hO : IsOpen O) (htO : γ.extend t ∈ O) : + ∃ (P : SmoothCompactArc planeModel M) (a b l r : ℝ), + P.start = -2 ∧ P.finish = 2 ∧ 0 < b ∧ + C.lower < l ∧ l < t ∧ t < r ∧ r < C.upper ∧ + P.curve P.start = γ.extend l ∧ P.curve P.finish = γ.extend r ∧ + MapsTo P.curve (Icc P.start P.finish) O ∧ + (∀ s ∈ Icc P.start P.finish, + P.curve s ∈ C.chart.source ∧ C.chart (P.curve s) = + scaledGraphJoin C.leftGraph C.rightGraph a b s) ∧ + P.curve =ᶠ[𝓝 P.start] + (fun s => γ.extend (C.leftParameter.symm (a+b*s))) ∧ + P.curve =ᶠ[𝓝 P.finish] + (fun s => γ.extend (C.rightParameter.symm (a+b*s))) := by + let V := C.chart.target ∩ C.chart.symm ⁻¹' O + have hV : IsOpen V := C.chart.continuousOn_symm.isOpen_inter_preimage C.chart.open_target hO + have htS := (C.left_chart t ⟨C.lower_lt.le,le_rfl⟩).1 + have htV : C.chart (γ.extend t) ∈ V := + ⟨C.chart.map_source htS,by simpa only [mem_preimage,C.chart.left_inv htS] using htO⟩ + let a := C.leftParameter t + obtain ⟨b,hb,htraceL,htraceR,hblend⟩ := C.advancing_corner_parameters hl hr hV htV + obtain ⟨Q,hQs,hQf,hQc,hQL,hQR⟩ := scaled_graph_join_arc C.left_smooth C.right_smooth a hb.ne' + have hQV : MapsTo Q.curve (Icc Q.start Q.finish) V := by + intro s hs + rw [hQc,scaledGraphJoin_eq_blend] + apply hblend s (by simpa only [hQs,hQf] using hs) + exact centeredSmoothStep_bounds s + obtain ⟨P,hPs,hPf,hPc,hcoord⟩ := smooth_arc_chart_transport Q C.chart + C.chart_smooth C.inverse_smooth (fun s hs => (hQV hs).1) + have hPs' : P.start = -2 := hPs.trans hQs + have hPf' : P.finish = 2 := hPf.trans hQf + obtain ⟨l,hlt,hel⟩ := htraceL + obtain ⟨r,hrt,her⟩ := htraceR + have hLn : ∀ᶠ s in 𝓝 P.start, + a+b*s ∈ C.leftParameter '' Ioo C.lower t := by + have he : a+b*P.start = a-2*b := by rw [hPs']; ring + apply (show Continuous (fun s : ℝ => a+b*s) by fun_prop).continuousAt.preimage_mem_nhds + rw [he] + exact (C.leftParameter.isOpenMap _ isOpen_Ioo).mem_nhds ⟨l,hlt,hel⟩ + have hRn : ∀ᶠ s in 𝓝 P.finish, + a+b*s ∈ C.rightParameter '' Ioo t C.upper := by + have he : a+b*P.finish = a+2*b := by rw [hPf']; ring + apply (show Continuous (fun s : ℝ => a+b*s) by fun_prop).continuousAt.preimage_mem_nhds + rw [he] + exact (C.rightParameter.isOpenMap _ isOpen_Ioo).mem_nhds ⟨r,hrt,her⟩ + have hPL : P.curve =ᶠ[𝓝 P.start] + (fun s => γ.extend (C.leftParameter.symm (a+b*s))) := by + have hQL' : Q.curve =ᶠ[𝓝 P.start] (fun s => ![a+b*s,C.leftGraph (a+b*s)]) := by + simpa only [hPs] using hQL + filter_upwards [hQL',hLn] with s hs hxs + rw [hPc] + change C.chart.symm (Q.curve s) = _ + rw [hs] + exact (C.left_graph_realized (image_mono Ioo_subset_Icc_self hxs)).2 + have hPR : P.curve =ᶠ[𝓝 P.finish] + (fun s => γ.extend (C.rightParameter.symm (a+b*s))) := by + have hQR' : Q.curve =ᶠ[𝓝 P.finish] (fun s => ![a+b*s,C.rightGraph (a+b*s)]) := by + simpa only [hPf] using hQR + filter_upwards [hQR',hRn] with s hs hxs + rw [hPc] + change C.chart.symm (Q.curve s) = _ + rw [hs] + exact (C.right_graph_realized (image_mono Ioo_subset_Icc_self hxs)).2 + refine ⟨P,a,b,l,r,hPs',hPf',hb,hlt.1,hlt.2,hrt.1,hrt.2,?_,?_,?_,?_,hPL,hPR⟩ + · have he : a+b*P.start = a-2*b := by rw [hPs']; ring + rw [hPL.eq_of_nhds,he,← hel,C.leftParameter.symm_apply_apply] + · have he : a+b*P.finish = a+2*b := by rw [hPf']; ring + rw [hPR.eq_of_nhds,he,← her,C.rightParameter.symm_apply_apply] + · intro s hs + have hsQ : s ∈ Icc Q.start Q.finish := by simpa only [hPs,hPf] using hs + rw [hPc] + exact (hQV hsQ).2 + · intro s hs + have hc := hcoord s (P.interval_subset hs) + rw [hQc] at hc + exact hc + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerParameters.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..56627b9a4e77e56159189ba76569bb781424b826 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AdvancingCornerParameters.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ReturningCornerParameters + +namespace OAI + +/-! Small-scale data for graph branches advancing in the same horizontal direction. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} +namespace RegularPathCornerChart + +theorem advancing_corner_parameters (C : RegularPathCornerChart γ t) + (hl : StrictMono C.leftParameter) (hr : StrictMono C.rightParameter) + {V : Set Base} (hV : IsOpen V) (htV : C.chart (γ.extend t) ∈ V) : + ∃ b > 0, + C.leftParameter t-2*b ∈ C.leftParameter '' Ioo C.lower t ∧ + C.leftParameter t+2*b ∈ C.rightParameter '' Ioo t C.upper ∧ + ∀ s ∈ Icc (-2:ℝ) 2, ∀ θ ∈ Icc (0:ℝ) 1, + (1-θ) • graphPoint C.leftGraph (C.leftParameter t+b*s) + + θ • graphPoint C.rightGraph (C.leftParameter t+b*s) ∈ V := by + have hp : graphPoint C.leftGraph (C.leftParameter t) ∈ V := by + rw [graphPoint,← (C.left_chart t ⟨C.lower_lt.le,le_rfl⟩).2] + exact htV + obtain ⟨δ,hδ,hblend⟩ := small_graph_blends C.left_smooth.continuous C.right_smooth.continuous + (C.leftParameter t) C.graphs_meet hV hp + let w := min δ (min (C.leftParameter t-C.leftParameter C.lower) + (C.rightParameter C.upper-C.leftParameter t)) + have hL : 0 < C.leftParameter t-C.leftParameter C.lower := sub_pos.mpr (hl C.lower_lt) + have hR : 0 < C.rightParameter C.upper-C.leftParameter t := by + rw [C.parameter_match] + exact sub_pos.mpr (hr C.lt_upper) + have hw : 0 < w := lt_min hδ (lt_min hL hR) + have hwδ : w ≤ δ := min_le_left _ _ + have hwL : w ≤ C.leftParameter t-C.leftParameter C.lower := + (min_le_right _ _).trans (min_le_left _ _) + have hwR : w ≤ C.rightParameter C.upper-C.leftParameter t := + (min_le_right _ _).trans (min_le_right _ _) + let b := w/4 + have hb : 0 < b := div_pos hw (by norm_num) + refine ⟨b,hb,?_,?_,?_⟩ + · rw [C.leftParameter.continuous.continuousOn.image_Ioo_of_strictMonoOn + C.lower_lt.le (hl.strictMonoOn _)] + dsimp only [b] + constructor <;> linarith + · rw [C.rightParameter.continuous.continuousOn.image_Ioo_of_strictMonoOn + C.lt_upper.le (hr.strictMonoOn _),← C.parameter_match] + dsimp only [b] + constructor <;> linarith + · intro s hs θ hθ + apply hblend _ _ θ hθ + dsimp only [b] + have h1 := mul_le_mul_of_nonneg_left hs.1 hw.le + have h2 := mul_le_mul_of_nonneg_left hs.2 hw.le + constructor <;> linarith + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcDensityLocal.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcDensityLocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..be887fc46c6661972047c1e014ff56e4f633a0bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcDensityLocal.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.LoopDensityArcTriangle +import OAI.Geometry.SurfaceImmersion.Geometry.InteriorDensityLocal + +namespace OAI + +/-! Positive averaging densities when a symmetric circular arc surrounds the target. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LoopDensity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem positive_density_near_of_arc_coverage + {p : B → ℝ → Plane} {c : B → Plane} + (hp : ContDiff ℝ ∞ (fun z : B × ℝ => p z.1 z.2)) (hc : ContDiff ℝ ∞ c) + {b₀ : B} {m A : ℝ} (hc₀ : c b₀ = ![m, 0]) (hm : -1 < m) (hm1 : m < 1) + (hA : Real.arccos m < A) + (hcover : ∀ β ∈ Ioo (-A) A, + ∃ t ∈ Ioo (0 : ℝ) 1, p b₀ t = ![Real.cos β, Real.sin β]) : + ∃ U : Set B, IsOpen U ∧ b₀ ∈ U ∧ ∃ ρ : B × ℝ → ℝ, + ContDiffOn ℝ ∞ ρ (U ×ˢ univ) ∧ + (∀ b ∈ U, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + ∀ b ∈ U, (∫ t in 0..1, ρ (b, t) • augment (p b t)) = augment (c b) := by + let β := (Real.arccos m + min A Real.pi) / 2 + have hmin : Real.arccos m < min A Real.pi := + lt_min hA (Real.arccos_lt_pi.mpr hm) + have hβlo : Real.arccos m < β := by dsimp [β]; linarith + have hβhi : β < min A Real.pi := by dsimp [β]; linarith + have hβpos : 0 < β := lt_of_le_of_lt (Real.arccos_nonneg m) hβlo + have hβA : β < A := lt_of_lt_of_le hβhi (min_le_left _ _) + have hβπ : β < Real.pi := lt_of_lt_of_le hβhi (min_le_right _ _) + have hcos : Real.cos β < m := by + have hh := Real.cos_lt_cos_of_nonneg_of_le_pi (Real.arccos_nonneg m) hβπ.le hβlo + rwa [Real.cos_arccos hm.le hm1.le] at hh + have hAp : 0 < A := lt_trans hβpos hβA + obtain ⟨t₀, ht₀, hp₀⟩ := hcover 0 (by constructor <;> linarith) + obtain ⟨t₁, ht₁, hp₁⟩ := hcover β ⟨by linarith, hβA⟩ + obtain ⟨t₂, ht₂, hp₂⟩ := hcover (-β) ⟨by linarith, by linarith⟩ + let t : Fin 3 → ℝ := ![t₀, t₁, t₂] + have ht (i : Fin 3) : t i ∈ Ioo (0 : ℝ) 1 := by + fin_cases i + · exact ht₀ + · exact ht₁ + · exact ht₂ + have hpt (i : Fin 3) : p b₀ (t i) = arcTriangle (Real.cos β) (Real.sin β) i := by + fin_cases i + · simpa [t, arcTriangle] using hp₀ + · exact hp₁ + · simpa [t, arcTriangle, Real.cos_neg, Real.sin_neg] using hp₂ + have hcols : (fun i => augment (p b₀ (t i))) = + fun i => augment (arcTriangle (Real.cos β) (Real.sin β) i) := by + funext i + rw [hpt] + have hq : Real.cos β ≠ 1 := ne_of_lt (lt_trans hcos hm1) + have hM : (columnOperator (fun i => augment (p b₀ (t i)))).IsInvertible := by + rw [hcols] + exact arcTriangle_invertible hq (Real.sin_pos_of_pos_of_lt_pi hβpos hβπ).ne' + have hbary : columnOperator (fun i => augment (p b₀ (t i))) + (arcWeights (Real.cos β) m) = augment (c b₀) := by + rw [hcols, arcTriangle_barycenter hq, hc₀] + have hpcont : Continuous (p b₀) := hp.continuous.comp (continuous_const.prodMk continuous_id) + obtain ⟨ψ, hψ, hper, hn, _hmass, ε, hε, hMψ, hw⟩ := + select_positive_moment_bumps hpcont ht hM (arcWeights_pos hcos hm1) hbary + exact exists_positive_density_near hp hc hψ hn hper hε hMψ hw + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcJoinOrientation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcJoinOrientation.lean new file mode 100644 index 0000000000000000000000000000000000000000..59e8b65e9fe00324b756c822c9cf0e05022f175e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcJoinOrientation.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCompactArc +import Mathlib.Analysis.Calculus.Deriv.Slope + +namespace OAI + +/-! The orientation required for joining is forced by separation of the +old and new compact arc interiors. It is not an additional geometric choice. -/ +noncomputable section +open Set Filter +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {N : Type*} + +theorem arc_join_deriv_pos {γ δ : ℝ → N} {h : ℝ → ℝ} {l a c d : ℝ} + (hla : l < a) (hcd : c < d) (hh : DifferentiableAt ℝ h a) + (hne : deriv h a ≠ 0) (ha : h a = c) + (he : γ =ᶠ[𝓝 a] δ ∘ h) + (hcross : ∀ s ∈ Icc l a, ∀ t ∈ Ioc c d, γ s ≠ δ t) : + 0 < deriv h a := by + have hsmall : ∀ᶠ t in 𝓝 a, l < t ∧ h t < d := + (eventually_gt_nhds hla).and (hh.continuousAt.eventually (gt_mem_nhds (ha ▸ hcd))) + have hslope : ∀ᶠ t in 𝓝[<] a, 0 ≤ slope h a t := by + filter_upwards [hsmall.filter_mono nhdsWithin_le_nhds, + he.filter_mono nhdsWithin_le_nhds,self_mem_nhdsWithin] with t ht heq hta + have hc : h t ≤ c := by + by_contra hc + exact hcross t ⟨ht.1.le,hta.le⟩ (h t) ⟨lt_of_not_ge hc,ht.2.le⟩ heq + rw [slope_def_field] + exact div_nonneg_of_nonpos (sub_nonpos.mpr (ha ▸ hc)) (sub_nonpos.mpr hta.le) + have hlim := (hasDerivAt_iff_tendsto_slope_left_right.mp hh.hasDerivAt).1 + exact lt_of_le_of_ne (ge_of_tendsto hlim hslope) hne.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeChartPartition.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeChartPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..00658225d931de676573d3f5010f2dad11a93d41 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeChartPartition.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceArcTimeCoordinates +import Mathlib.Topology.UnitInterval + +namespace OAI + +/-! A finite ordered subdivision of the actual embedded arc, in charts +which all use the same global longitudinal coordinate. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +structure SurfaceTimeChart (F : M → ℝ) where + coord : OpenPartialHomeomorph M Base + smooth : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ coord coord.source + inverse_smooth : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ coord.symm coord.target + time : ∀ x ∈ coord.source, coord x 1 = F x + +theorem arc_time_chart_partition (P : SmoothCompactArc planeModel M) + {F : M → ℝ} (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) + (hFP : ∀ s ∈ Icc P.start P.finish, F (P.curve s) = s) : + ∃ (τ : ℕ → ℝ) (N : ℕ), τ 0 = P.start ∧ Monotone τ ∧ + (∀ n, τ n ∈ Icc P.start P.finish) ∧ (∀ n ≥ N, τ n = P.finish) ∧ + ∀ n, ∃ c : SurfaceTimeChart F, + ∀ s ∈ Icc (τ n) (τ (n+1)), P.curve s ∈ c.coord.source ∧ c.coord (P.curve s) = ![0,s] := by + classical + choose d J hJ htJ hds hdi hdF haxis using + fun t : Icc P.start P.finish => surface_arc_time_coordinates P hF hFP t.property + let C : Icc P.start P.finish → Set (Icc P.start P.finish) := + fun t => (fun s : Icc P.start P.finish => (s:ℝ)) ⁻¹' J t + have hC : ∀ t, IsOpen (C t) := fun t => (hJ t).preimage continuous_subtype_val + have hcover : univ ⊆ ⋃ t, C t := by + intro t _ + exact mem_iUnion.mpr ⟨t,htJ t⟩ + obtain ⟨τ,hzero,hmono,⟨N,hend⟩,hsub⟩ := + exists_monotone_Icc_subset_open_cover_Icc P.start_lt_finish.le hC hcover + refine ⟨fun n => (τ n:ℝ),N,hzero,fun _ _ h => hmono h,fun n => (τ n).property,hend,?_⟩ + intro n + obtain ⟨t,ht⟩ := hsub n + refine ⟨⟨d t,hds t,hdi t,hdF t⟩,?_⟩ + intro s hs + have hsP : s ∈ Icc P.start P.finish := + ⟨(τ n).property.1.trans hs.1,hs.2.trans (τ (n+1)).property.2⟩ + have hsJ : s ∈ J t := ht (show (⟨s,hsP⟩ : Icc P.start P.finish) ∈ Icc (τ n) (τ (n+1)) from hs) + refine ⟨(haxis t s hsJ).1,?_⟩ + exact (haxis t s hsJ).2.trans (by rw [hFP s hsP]) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeGermPartition.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeGermPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..cea837fbffd6a0272b0dbdf0568405b69a957258 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcTimeGermPartition.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ArcTimeChartPartition + +namespace OAI + +/-! The finite time-chart subdivision retains axis germs relative to the +entire compact arc, including at subdivision points. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem arc_time_chart_germ_partition (P : SmoothCompactArc planeModel M) + {F : M → ℝ} (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) + (hFP : ∀ s ∈ Icc P.start P.finish, F (P.curve s) = s) : + ∃ (τ : ℕ → ℝ) (N : ℕ), τ 0 = P.start ∧ Monotone τ ∧ + (∀ n, τ n ∈ Icc P.start P.finish) ∧ (∀ n ≥ N, τ n = P.finish) ∧ + ∀ n, ∃ c : SurfaceTimeChart F, + ∀ s ∈ Icc (τ n) (τ (n+1)), ∀ᶠ u in 𝓝[Icc P.start P.finish] s, + P.curve u ∈ c.coord.source ∧ c.coord (P.curve u) = ![0,u] := by + classical + choose d J hJ htJ hds hdi hdF haxis using + fun t : Icc P.start P.finish => surface_arc_time_coordinates P hF hFP t.property + let C : Icc P.start P.finish → Set (Icc P.start P.finish) := + fun t => (fun s : Icc P.start P.finish => (s:ℝ)) ⁻¹' J t + have hC : ∀ t, IsOpen (C t) := fun t => (hJ t).preimage continuous_subtype_val + have hcover : univ ⊆ ⋃ t, C t := by + intro t _ + exact mem_iUnion.mpr ⟨t,htJ t⟩ + obtain ⟨τ,hzero,hmono,⟨N,hend⟩,hsub⟩ := + exists_monotone_Icc_subset_open_cover_Icc P.start_lt_finish.le hC hcover + refine ⟨fun n => (τ n:ℝ),N,hzero,fun _ _ h => hmono h,fun n => (τ n).property,hend,?_⟩ + intro n + obtain ⟨t,ht⟩ := hsub n + refine ⟨⟨d t,hds t,hdi t,hdF t⟩,?_⟩ + intro s hs + have hsP : s ∈ Icc P.start P.finish := + ⟨(τ n).property.1.trans hs.1,hs.2.trans (τ (n+1)).property.2⟩ + have hsJ : s ∈ J t := ht (show (⟨s,hsP⟩ : Icc P.start P.finish) ∈ Icc (τ n) (τ (n+1)) from hs) + filter_upwards [nhdsWithin_le_nhds ((hJ t).mem_nhds hsJ), + self_mem_nhdsWithin] with u huJ huW + exact ⟨(haxis t u huJ).1,(haxis t u huJ).2.trans (by rw [hFP u huW])⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcVertexCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcVertexCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..7cf8e47ce4fd5755aa0924343c7276aa57e3a156 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ArcVertexCoordinates.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SubarcTopology +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteIntervalChopping + +namespace OAI + +/-! A finite ambient vertex set induces a finite ordered cut set in +each embedded arc. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem arc_vertex_coordinates (A : CompactCurveArc X) (V : Set X) (hV : V.Finite) : + ∃ S : Finset ℝ, + (∀ t : Icc A.left A.right, (t:ℝ) ∈ S ↔ A.map t ∈ V) ∧ + ∀ r ∈ S, A.left ≤ r ∧ r ≤ A.right := by + classical + have hpre : (A.map ⁻¹' V).Finite := hV.preimage A.embedding.injective.injOn + let R : Set ℝ := Subtype.val '' (A.map ⁻¹' V) + have hR : R.Finite := hpre.image Subtype.val + refine ⟨hR.toFinset,?_,?_⟩ + · intro t + rw [Set.Finite.mem_toFinset] + constructor + · rintro ⟨u,hu,he⟩ + change A.map u ∈ V at hu + have hut : u = t := Subtype.ext he + simpa only [hut] using hu + · intro ht + exact ⟨t,ht,rfl⟩ + · intro r hr + rw [Set.Finite.mem_toFinset] at hr + obtain ⟨t,_,rfl⟩ := hr + exact t.property + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/AxisCollarJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AxisCollarJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d7b4aa9f109c4ac018b805504990e0538850401 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/AxisCollarJet.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ExactRegularCollar + +namespace OAI + +/-! The zero-parameter collar jet is the actual first derivative of the +outer map along the shared boundary. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +lemma axis_collar_jet {f : Base → W} {V : ℝ × ℝ → W} + (hf : ContDiff ℝ ∞ f) + (hV0 : ∀ t, V (0,t) = axisTransverse f t) (t : ℝ) : + homotopyCollarJet (axisValue f) V 0 t 0 0 = fderiv ℝ f (crosscapAxis t) := by + calc + _ = fderiv ℝ (transverseRuling f) (crosscapAxis t) := by + ext v + rw [transverseRuling_fderiv hf] + simp [homotopyCollarJet, hV0, crosscapAxis_apply] + _ = _ := transverseRuling_first_jet hf t + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/BoundaryInvariantCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/BoundaryInvariantCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..79ac69d38f94fa41ae070702bc8c8c790882f807 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/BoundaryInvariantCollar.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactCollarPositivity + +namespace OAI + +/-! Uniform collar positivity for the normal invariant used by later curves. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def normalInvariant (D S : E × ℝ → ℝ) (b c k : E → ℝ) (z : E × ℝ) : ℝ := + (D z * b z.1 + S z * c z.1) ^ 2 + k z.1 * b z.1 ^ 2 + +lemma normalInvariant_smoothOn {D S : E × ℝ → ℝ} {b c k : E → ℝ} {Ω : Set E} + (hD : ContDiffOn ℝ ∞ D (Ω ×ˢ univ)) (hS : ContDiffOn ℝ ∞ S (Ω ×ˢ univ)) + (hb : ContDiffOn ℝ ∞ b Ω) (hc : ContDiffOn ℝ ∞ c Ω) (hk : ContDiffOn ℝ ∞ k Ω) : + ContDiffOn ℝ ∞ (normalInvariant D S b c k) (Ω ×ˢ univ) := by + have hbf : ContDiffOn ℝ ∞ (fun z : E × ℝ => b z.1) (Ω ×ˢ univ) := + hb.comp contDiffOn_fst (fun z hz => hz.1) + have hcf : ContDiffOn ℝ ∞ (fun z : E × ℝ => c z.1) (Ω ×ˢ univ) := + hc.comp contDiffOn_fst (fun z hz => hz.1) + have hkf : ContDiffOn ℝ ∞ (fun z : E × ℝ => k z.1) (Ω ×ˢ univ) := + hk.comp contDiffOn_fst (fun z hz => hz.1) + exact (((hD.mul hbf).add (hS.mul hcf)).pow 2).add (hkf.mul (hbf.pow 2)) + +theorem boundary_invariant_collar {K C Ω : Set E} {J : Set ℝ} + (hK : IsCompact K) (hC : IsClosed C) (hΩ : IsOpen Ω) (hKΩ : K ⊆ Ω) + (hJ : IsCompact J) {D S β : E × ℝ → ℝ} {b c k : E → ℝ} + (hD : ContDiffOn ℝ ∞ D (Ω ×ˢ univ)) (hS : ContDiffOn ℝ ∞ S (Ω ×ˢ univ)) + (hβ : ContDiffOn ℝ ∞ β (Ω ×ˢ univ)) + (hb : ContDiffOn ℝ ∞ b Ω) (hc : ContDiffOn ℝ ∞ c Ω) (hk : ContDiffOn ℝ ∞ k Ω) + (hzero : ∀ x ∈ K ∩ C, ∀ t ∈ J, β (x, t) = 0) + (hboundary : ∀ x ∈ K ∩ C, 0 < normalInvariant D S b c k (x, 0)) : + ∃ W : Set E, IsOpen W ∧ C ⊆ W ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ x ∈ K ∩ W, ∀ t ∈ J, ∀ h : ℝ, |h| < ε → + 0 < normalInvariant D S b c k (x, β (x, t) + h) := by + let A : Set (E × (ℝ × ℝ)) := Ω ×ˢ univ + have hp : ContDiffOn ℝ ∞ (fun z : E × (ℝ × ℝ) => (z.1, z.2.1)) A := + contDiffOn_fst.prodMk (contDiffOn_fst.comp contDiffOn_snd (fun _ _ => mem_univ _)) + have hb' : ContDiffOn ℝ ∞ (fun z : E × (ℝ × ℝ) => β (z.1, z.2.1)) A := + hβ.comp hp (fun z hz => ⟨hz.1, mem_univ _⟩) + have hh : ContDiffOn ℝ ∞ (fun z : E × (ℝ × ℝ) => z.2.2) A := + contDiffOn_snd.comp contDiffOn_snd (fun _ _ => mem_univ _) + have hshift : ContDiffOn ℝ ∞ + (fun z : E × (ℝ × ℝ) => (z.1, β (z.1, z.2.1) + z.2.2)) A := + contDiffOn_fst.prodMk (hb'.add hh) + have hF : ContDiffOn ℝ ∞ + (fun z : E × (ℝ × ℝ) => normalInvariant D S b c k + (z.1, β (z.1, z.2.1) + z.2.2)) A := + (normalInvariant_smoothOn hD hS hb hc hk).comp hshift + (fun z hz => ⟨hz.1, mem_univ _⟩) + apply compact_collar_positive_small_shift hK hC hΩ hKΩ hJ hF.continuousOn + intro x hx t ht + simpa only [hzero x hx t ht, add_zero] using hboundary x hx + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarData.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarData.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d13c3ca33b2bab8bb9aa72ab7156a6f00baf803 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarData.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ScalarCollarData +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityCalibration + +namespace OAI + +/-! Obtain the scalar loop data from smooth radius and velocity coordinates, +including the extension from the admissible parameter neighborhood. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +lemma calibrated_rational_mean {R v a : ℝ} (hR : 0 < R) (hv : 0 < v) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + (1 - amplitude R v a ^ 2 / 2) / (1 + amplitude R v a ^ 2 / 2) = v / R := by + rw [← mean_density_arcX] + exact calibrated_mean hR hv hquad + +variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +theorem calibrated_collar_data {C L U Ω : Set E} + (hC : IsCompact C) (hL : IsCompact L) (hCL : C ⊆ L) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + {R u v a : E → ℝ} (hR : ContDiffOn ℝ ∞ R Ω) + (hu : ContDiffOn ℝ ∞ u Ω) (hv : ContDiffOn ℝ ∞ v Ω) + (ha : ContDiffOn ℝ ∞ a Ω) + (hRp : ∀ x ∈ Ω, 0 < R x) + (hquad : ∀ x ∈ Ω, R x ^ 2 = u x ^ 2 + v x ^ 2 + a x ^ 2) + (hup : ∀ x ∈ U, 0 < u x) (hvz : ∀ x ∈ U, v x = 0) + (hap : ∀ x ∈ L \ C, 0 < a x) : + ∃ c : E → LoopDensity.Plane, ContDiff ℝ ∞ c ∧ + ∃ V : Set E, IsOpen V ∧ L ⊆ V ∧ V ⊆ Ω ∧ + (∀ x ∈ V, c x = ![u x / R x, v x / R x]) ∧ + ∃ W : Set E, IsOpen W ∧ C ⊆ W ∧ W ⊆ U ∧ + ∃ b s : E → ℝ, ContDiff ℝ ∞ b ∧ ContDiff ℝ ∞ s ∧ + (∀ x, s x ∈ Icc (0 : ℝ) 1) ∧ + (∀ x ∈ L \ W, 0 < b x) ∧ + (∀ x ∈ W, b x = amplitude (R x) (u x) (a x) ∧ s x = 0 ∧ + c x = ![(1 - b x ^ 2 / 2) / (1 + b x ^ 2 / 2), 0]) ∧ + (∀ x ∈ L \ W, + (0 < b x ∧ 2 * Real.arctan (b x) ≤ Real.pi + 1 ∧ + s x ∈ Icc (0 : ℝ) 1 ∧ + c x = ![(1 - b x ^ 2 / 2) / (1 + b x ^ 2 / 2), 0]) ∨ + (s x = 1 ∧ Real.pi < Real.pi + 1 ∧ c x 0 ^ 2 + c x 1 ^ 2 < 1)) := by + let target : E → LoopDensity.Plane := fun x => ![u x / R x, v x / R x] + have htarget : ContDiffOn ℝ ∞ target Ω := by + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact hu.div hR (fun x hx => (hRp x hx).ne') + · exact hv.div hR (fun x hx => (hRp x hx).ne') + obtain ⟨V, hV, hLV, hVΩ, c, hc, hct⟩ := compact_smooth_extension hL hΩ hLΩ htarget + let U' := U ∩ V + have hU' : IsOpen U' := hU.inter hV + have hCU' : C ⊆ U' := fun x hx => ⟨hCU hx, hLV (hCL hx)⟩ + have hβ : ContDiffOn ℝ ∞ (fun x => amplitude (R x) (u x) (a x)) U' := by + exact (contDiffOn_const.mul (ha.mono (inter_subset_left.trans hUΩ))).div + ((hR.add hu).mono (inter_subset_left.trans hUΩ)) + (fun x hx => (add_pos (hRp x (hUΩ hx.1)) (hup x hx.1)).ne') + have hβp : ∀ x ∈ (L \ C) ∩ U', 0 < amplitude (R x) (u x) (a x) := by + intro x hx + exact div_pos (mul_pos (Real.sqrt_pos.mpr (by norm_num)) (hap x hx.1)) + (add_pos (hRp x (hUΩ hx.2.1)) (hup x hx.2.1)) + have hcal : ∀ x ∈ U', c x = + ![(1 - amplitude (R x) (u x) (a x) ^ 2 / 2) / + (1 + amplitude (R x) (u x) (a x) ^ 2 / 2), 0] := by + intro x hx + rw [hct hx.2] + have hq : R x ^ 2 = u x ^ 2 + a x ^ 2 := by + simpa [hvz x hx.1] using hquad x (hUΩ hx.1) + rw [calibrated_rational_mean (hRp x (hUΩ hx.1)) (hup x hx.1) hq] + simp [target, hvz x hx.1] + have hi : ∀ x ∈ L \ C, c x 0 ^ 2 + c x 1 ^ 2 < 1 := by + intro x hx + rw [hct (hLV hx.1)] + change (u x / R x) ^ 2 + (v x / R x) ^ 2 < 1 + have hr := hRp x (hLΩ hx.1) + have hq := hquad x (hLΩ hx.1) + have ha' := hap x hx + rw [div_pow, div_pow, ← add_div, div_lt_one (sq_pos_of_pos hr)] + nlinarith [sq_pos_of_pos ha'] + obtain ⟨W, hW, hCW, hWU', b, s, hb, hs, hsr, hbp, hw, hshape⟩ := + scalar_collar_data hC hU' hCU' hβ hβp hcal hi + exact ⟨c, hc, V, hV, hLV, hVΩ, hct, W, hW, hCW, + hWU'.trans inter_subset_left, b, s, hb, hs, hsr, hbp, hw, hshape⟩ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..67f2ad7a560372ca49f28acb0fcb69b8fce6d210 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CalibratedCollarFamily.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmallCollarAngle + +namespace OAI + +/-! The small-angle collar is chosen before the compact interior curve set +and before its turn threshold. The later translation may overlap that collar. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.CollarVelocity +open RealModes TransverseSmallFunction + +theorem calibrated_jet_collar_family {F : RField 4} (hF : ContDiff ℝ ∞ F) + {C L U Ω : Set JetBase} (hC : IsCompact C) (hL : IsCompact L) (hCL : C ⊆ L) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + {R u v a : JetBase → ℝ} (hR : ContDiffOn ℝ ∞ R Ω) + (hu : ContDiffOn ℝ ∞ u Ω) (hv : ContDiffOn ℝ ∞ v Ω) + (ha : ContDiffOn ℝ ∞ a Ω) (hRp : ∀ j ∈ Ω, 0 < R j) + (hquad : ∀ j ∈ Ω, R j ^ 2 = u j ^ 2 + v j ^ 2 + a j ^ 2) + (hup : ∀ j ∈ U, 0 < u j) (hvz : ∀ j ∈ U, v j = 0) + (hap : ∀ j ∈ L \ C, 0 < a j) (haC : ∀ j ∈ C, a j = 0) : + ∃ W : Set JetBase, IsOpen W ∧ C ⊆ W ∧ W ⊆ U ∧ + ∀ ε : ℝ, 0 < ε → ∃ V : Set JetBase, IsOpen V ∧ C ⊆ V ∧ V ⊆ W ∧ + ∀ (K O P : Set Base), IsCompact K → MapsTo (jetSection F) K L → + IsOpen O → K ⊆ O → (∀ j ∈ C, j.1 ∉ closure O) → + P.Finite → P ⊆ K → + (∀ p ∈ K \ P, ∃ N : Set Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) → + ∀ T : ℝ, ∃ Z : Set JetBase, IsOpen Z ∧ L ⊆ Z ∧ Z ⊆ Ω ∧ + ∃ α : JetBase × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ j ∈ Z, (∫ t in 0..1, ![Real.cos (α (j,t)),Real.sin (α (j,t))]) = + ![u j/R j,v j/R j]) ∧ + (∀ j ∈ V, ∀ t, |α (j,t)| < ε) ∧ + (∃ W' : Set JetBase, IsOpen W' ∧ C ⊆ W' ∧ W' ⊆ W ∧ + ∀ j ∈ W', a j = 0 → ∀ t, α (j,t) = 0) ∧ + ∃ τ : Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (jetSection F x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, + T < fderiv ℝ (fun y => α (jetSection F y,0)) x (0,1) ∧ + T < fderiv ℝ (fun y => α (jetSection F y,τ x)) x (0,1) := by + obtain ⟨c,hc,V₀,hV₀,hLV₀,hV₀Ω,hcL,W,hW,hCW,hWU,b,s,hb,hs,hsr,hbp,hw,hshape⟩ := + calibrated_collar_data hC hL hCL hU hΩ hCU hUΩ hLΩ hR hu hv ha hRp hquad hup hvz hap + have hbC : ∀ j ∈ C, b j = 0 := by + intro j hj + rw [(hw j (hCW hj)).1,haC j hj] + simp [amplitude] + have hbpos : ∀ j ∈ L \ C, 0 < b j := by + intro j hj + by_cases hjW : j ∈ W + · rw [(hw j hjW).1] + exact div_pos (mul_pos (Real.sqrt_pos.mpr (by norm_num)) (hap j hj)) + (add_pos (hRp j (hLΩ hj.1)) (hup j (hWU hjW))) + · exact hbp j ⟨hj.1,hjW⟩ + refine ⟨W,hW,hCW,hWU,?_⟩ + intro ε hε + obtain ⟨V,hV,hCV,hVW,δ,hδ,hangle⟩ := small_collar_angle_window hW hCW hb.continuous hbC hε + refine ⟨V,hV,hCV,hVW,?_⟩ + intro K O P hK hKL hO hKO hCO hP hPK hlocal T + let W' : Set JetBase := W ∩ (Prod.fst ⁻¹' closure O)ᶜ + have hW' : IsOpen W' := hW.inter (isClosed_closure.preimage continuous_fst).isOpen_compl + have hCW' : C ⊆ W' := fun j hj => ⟨hCW hj,hCO j hj⟩ + have hW'W : W' ⊆ W := inter_subset_left + have hOW' : ∀ j ∈ W', j.1 ∉ O := fun j hj ho => hj.2 (subset_closure ho) + have hbK : ∀ x ∈ K, 0 < b (jetSection F x) := by + intro x hx + apply hbpos _ ⟨hKL hx,?_⟩ + intro hxc + exact hCO _ hxc (subset_closure (hKO hx)) + have hshape' : ∀ j ∈ L \ W', + (0 < b j ∧ 2 * Real.arctan (b j) ≤ Real.pi+1 ∧ s j ∈ Icc (0 : ℝ) 1 ∧ + c j = ![(1-b j^2/2)/(1+b j^2/2),0]) ∨ + (s j = 1 ∧ Real.pi < Real.pi+1 ∧ c j 0^2+c j 1^2 < 1) := by + intro j hj + by_cases hjW : j ∈ W + · left + refine ⟨hbpos j ⟨hj.1,fun hc => hj.2 (hCW' hc)⟩,?_,hsr j,(hw j hjW).2.2⟩ + linarith [Real.arctan_lt_pi_div_two (b j)] + · exact hshape j ⟨hj.1,hjW⟩ + obtain ⟨h,_,_,hhs,hhδ,V₁,hV₁,hLV₁,ρ,_,_,_,_,_,hα,hper,hmean,hturn,hlarge⟩ := + controlled_jet_loop hF hK hL hKL hO hKO hOW' hW' hC.isClosed hCW' + hP hPK hlocal hb (A := fun _ => Real.pi+1) contDiff_const hs hc hbK + (fun j hj => ⟨(hw j (hW'W hj)).2.1,(hw j (hW'W hj)).2.2⟩) hshape' T hδ + let α := jetAngle ρ b (fun _ => Real.pi+1) s (fun j => h j.1) + have hz (j : JetBase) (hj : j ∈ W') : h j.1 = 0 := by + by_contra hn + exact hOW' j hj (hhs (subset_tsupport h (Function.mem_support.mpr hn))) + refine ⟨V₁ ∩ V₀,hV₁.inter hV₀,subset_inter hLV₁ hLV₀, + inter_subset_right.trans hV₀Ω,α,hα.mono (prod_mono inter_subset_left Subset.rfl), + (fun j hj => hper j hj.1),(fun j hj => (hmean j hj.1).trans (hcL j hj.2)),?_, + ⟨W',hW',hCW',hW'W,?_⟩,_,hturn,hlarge⟩ + · intro j hj t + exact hangle (fun _ => Real.pi+1) s (fun j => h j.1) ρ + (fun j hj => (hw j hj).2.1) (fun j => hhδ j.1) j hj t + · intro j hj haz t + have hbz : b j = 0 := by rw [(hw j (hW'W hj)).1]; simp [amplitude,haz] + simp [α,jetAngle,PositiveDensity.reparametrize,unitAngle,blendedAngle,baseAngle, + hbz,(hw j (hW'W hj)).2.1,hz j hj] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CenteredCrosscapPreparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CenteredCrosscapPreparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..2150330d397bf8e0b162521758c77746a94d79b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CenteredCrosscapPreparation.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticCrosscapPreparation + +namespace OAI + +/-! The local polynomial preparation centered at the actual chart +coordinate of a singular point. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def translatedSurface (f : Base → ProjectionTarget 3) (a : Base) : Base → ProjectionTarget 3 := + fun x => f (x+a) + +def centeredSurfaceTaylor (f : Base → ProjectionTarget 3) (a : Base) (x : Base) : ProjectionTarget 3 := + surfaceTaylorTwo (translatedSurface f a) (x-a) + +lemma surfaceDirection_translated (f : Base → ProjectionTarget 3) (a : Base) + (b : Bool) (z : Base × ℝ) : + surfaceDirection (translatedSurface f a) b z = surfaceDirection f b (z+(a,0)) := by + unfold surfaceDirection translatedSurface + rw [fderiv_comp_add_right] + simp only [Prod.fst_add,Prod.snd_add,add_zero] + +lemma surfaceDirection_translated_fderiv (f : Base → ProjectionTarget 3) (a : Base) + (b : Bool) (z : Base × ℝ) : + fderiv ℝ (surfaceDirection (translatedSurface f a) b) z = + fderiv ℝ (surfaceDirection f b) (z+(a,0)) := by + have he : surfaceDirection (translatedSurface f a) b = + fun w => surfaceDirection f b (w+(a,0)) := funext (surfaceDirection_translated f a b) + rw [he,fderiv_comp_add_right] + +theorem centered_quadratic_crosscap_preparation {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) (a : Base) (t₀ : ℝ) + (hzero : surfaceDirection f b (a,t₀) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection f b) (a,t₀))) + {ρ : ℝ} (hρ : 0 < ρ) : + ∃ (r : ℝ) (g : Base → ProjectionTarget 3), 0 < r ∧ r ≤ ρ ∧ + ContDiff ℝ ∞ g ∧ g =ᶠ[𝓝 a] centeredSurfaceTaylor f a ∧ + (∀ x, r ≤ ‖x-a‖ → g x = f x) ∧ + tsupport (g-f) ⊆ closedBall a (r/2) ∧ + ∀ x ∈ ball a r, (¬ Function.Injective (fderiv ℝ g x) ↔ x = a) := by + have htrans : ContDiff ℝ ∞ (translatedSurface f a) := hf.comp (contDiff_id.add contDiff_const) + have hzero' : surfaceDirection (translatedSurface f a) b (0,t₀) = 0 := by + simpa only [surfaceDirection_translated,Prod.mk_add_mk,zero_add,add_zero] using hzero + have hreg' : Function.Bijective (fderiv ℝ (surfaceDirection (translatedSurface f a) b) (0,t₀)) := by + simpa only [surfaceDirection_translated_fderiv,Prod.mk_add_mk,zero_add,add_zero] using hreg + obtain ⟨r,g,hr,hrρ,hg,he,hout,hsupp,hlocal⟩ := + quadratic_crosscap_preparation htrans b t₀ hzero' hreg' hρ + refine ⟨r,(fun x => g (x-a)),hr,hrρ,hg.comp (contDiff_id.sub contDiff_const),?_,?_,?_,?_⟩ + · have ht : Tendsto (fun x : Base => x-a) (𝓝 a) (𝓝 0) := by + have hc : Continuous (fun x : Base => x-a) := by fun_prop + simpa only [sub_self] using hc.tendsto a + exact he.comp_tendsto ht + · intro x hx + have h := hout (x-a) hx + simpa only [translatedSurface,sub_add_cancel] using h + · apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + have hnot : x-a ∉ tsupport (g-translatedSurface f a) := by + intro hm + apply hn + simpa only [mem_closedBall,dist_eq_norm,sub_zero] using hsupp hm + have hz := image_eq_zero_of_notMem_tsupport hnot + change g (x-a)-translatedSurface f a (x-a) = 0 at hz + have hx' : g (x-a)-f x ≠ 0 := hx + exact hx' (by simpa only [translatedSurface,sub_add_cancel] using hz) + · intro x hx + rw [fderiv_comp_sub] + have h := hlocal (x-a) (by simpa only [mem_ball,dist_eq_norm,sub_zero] using hx) + exact h.trans sub_eq_zero + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CircularBoundaryArcs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CircularBoundaryArcs.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a73d6f66c0e9c8dc5c0684630d8e82eb34ca55d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CircularBoundaryArcs.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryParam + +namespace OAI + +/-! Compact boundary portions in another phase chart have actual smooth +regular coordinate arcs, extended later only for parameter selection. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +lemma coordinateTransition_derivative_injective (q p : M) {x : CurvePlane} + (hx : x ∈ (coordinateTransition q p).source) : + Function.Injective (fderiv ℝ (coordinateTransition q p) x) := by + let e := coordinateTransition q p + have hd := (((coordinateTransition_smoothOn q p) x hx).contDiffAt + (e.open_source.mem_nhds hx)).differentiableAt (by simp) + have hi := (((coordinateTransition_symm_smoothOn q p) (e x) (e.map_source hx)).contDiffAt + (e.open_target.mem_nhds (e.map_source hx))).differentiableAt (by simp) + have he : e.symm ∘ e =ᶠ[𝓝 x] id := by + filter_upwards [e.open_source.mem_nhds hx] with y hy + exact e.left_inv hy + have hc : (fderiv ℝ e.symm (e x)).comp (fderiv ℝ e x) = ContinuousLinearMap.id ℝ CurvePlane := by + rw [← fderiv_comp x hi hd,he.fderiv_eq,fderiv_id] + intro v w hvw + have hh := congrArg (fderiv ℝ e.symm (e x)) hvw + change ((fderiv ℝ e.symm (e x)).comp (fderiv ℝ e x)) v = + ((fderiv ℝ e.symm (e x)).comp (fderiv ℝ e x)) w at hh + simpa only [hc,ContinuousLinearMap.id_apply] using hh + +end ClosedSurfaceR4.PhaseGeometry +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +def circularArcDomain (q p : M) (r : ℝ) : Set ℝ := + circularBoundaryParam p r ⁻¹' (coordinateChart q).source + +def circularArc (q p : M) (r : ℝ) : ℝ → CurvePlane := + coordinateChart q ∘ circularBoundaryParam p r + +lemma circularArcDomain_open (q p : M) {r : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + IsOpen (circularArcDomain q p r) := + (coordinateChart q).open_source.preimage (circularBoundaryParam_smooth p hreg).continuous + +lemma circularArc_smooth (q p : M) {r : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + ContDiffOn ℝ ∞ (circularArc q p r) (circularArcDomain q p r) := by + exact ((coordinateChart_smoothOn q).comp + (circularBoundaryParam_smooth p hreg).contMDiffOn (fun _ ht => ht)).contDiffOn + +lemma circularArc_regular (q p : M) {r : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + {t : ℝ} (ht : t ∈ circularArcDomain q p r) : deriv (circularArc q p r) t ≠ 0 := by + let x := circularParam (coordinateChart p p) r t + have hx : x ∈ (coordinateTransition q p).source := ⟨circularBoundaryParam_target p hreg t,ht⟩ + have hd := ((((coordinateTransition_smoothOn q p) x hx).contDiffAt + ((coordinateTransition q p).open_source.mem_nhds hx)).differentiableAt (by simp)).hasFDerivAt + have hcurve := hd.comp_hasDerivAt t (circularParam_hasDerivAt (coordinateChart p p) r t) + have he : circularArc q p r = coordinateTransition q p ∘ circularParam (coordinateChart p p) r := rfl + rw [he,hcurve.deriv] + intro hz + have hinj := coordinateTransition_derivative_injective q p hx + apply circularVelocity_ne_zero hr.ne' t + apply hinj + simpa only [map_zero] using hz + +variable [T2Space M] + +def circularArcCompact (q p : M) (r R : ℝ) : Set ℝ := + Icc (-Real.pi) Real.pi ∩ circularBoundaryParam p r ⁻¹' circularDiskClosure q R + +lemma circularArcCompact_compact (q p : M) {r R : ℝ} + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + (hQ : circularCoordinateRegion q R ⊆ (coordinateChart q).target) : + IsCompact (circularArcCompact q p r R) := + isCompact_Icc.inter_right ((circularDiskClosure_compact q R hQ).isClosed.preimage + (circularBoundaryParam_smooth p hreg).continuous) + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularArcCompact_subset (q p : M) {r R : ℝ} + (hQ : circularCoordinateRegion q R ⊆ (coordinateChart q).target) : + circularArcCompact q p r R ⊆ circularArcDomain q p r := by + intro t ht + exact circularDiskClosure_source q R hQ ht.2 + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularArcCompact_covers (q p : M) {r R : ℝ} (hr : 0 < r) + (hreg : circularCoordinateRegion p r ⊆ (coordinateChart p).target) + {x : M} (hx : x ∈ circularBoundary p r ∩ circularDiskClosure q R) : + ∃ t ∈ circularArcCompact q p r R, circularBoundaryParam p r t = x := by + rw [circularBoundary_image p hr hreg] at hx + obtain ⟨t,ht,he⟩ := hx.1 + exact ⟨t,⟨ht,by simpa only [mem_preimage,he] using hx.2⟩,he⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanCrosscapNeighborhoods.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanCrosscapNeighborhoods.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc710f85150afcb3341d54ca44d9d335ffe68ed0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanCrosscapNeighborhoods.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.PreparedCrosscapNeighborhoods +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapFiberIsolation +import OAI.Geometry.SurfaceImmersion.Whitney.CleanSurfacePairs + +namespace OAI + +/-! Frozen crosscap neighborhoods may be chosen so their internal double +pairs are transverse and involve no singular point. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem prepared_clean_crosscap_neighborhoods + {f : M → ProjectionTarget 3} + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + let S := {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)} + ∃ A : S → Set M, (∀ i, IsCompact (A i) ∧ i.val ∈ interior (A i)) ∧ + Pairwise (fun i j => Disjoint (A i) (A j)) ∧ + ∀ i, ∀ x ∈ A i, ∀ y ∈ A i, x ≠ y → (x,y) ∈ cleanSurfacePairs f S := by + classical + dsimp only + let S := {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)} + obtain ⟨A,hA,hdis,hreg⟩ := prepared_crosscap_neighborhoods hfin hrep + have hex (i : S) : ∃ B : Set M, IsCompact B ∧ i.val ∈ interior B ∧ B ⊆ A i ∧ + ∀ x ∈ B, f x = f i.val → x = i.val := by + obtain ⟨q,φ,b,t,hpq,hφ,he,hz,hR⟩ := hrep i.val i.property + obtain ⟨U,hU,hiU,hiso⟩ := prepared_crosscap_isolated_fiber i.val q hpq hφ he b t hz hR + obtain ⟨B,hB,hiB,hBU⟩ := exists_compact_subset (isOpen_interior.inter hU) ⟨(hA i).2,hiU⟩ + exact ⟨B,hB,hiB,fun x hx => interior_subset (hBU hx).1, + fun x hx => hiso x (hBU hx).2⟩ + choose B hB hiB hBA hIso using hex + have honly (i : S) (x : M) (hx : x ∈ B i) (hxS : x ∈ S) : x = i.val := by + by_contra hne + let j : S := ⟨x,hxS⟩ + have hij : i ≠ j := fun h => hne (congrArg Subtype.val h).symm + exact (Set.disjoint_left.mp (hdis hij)) (hBA i hx) (interior_subset (hA j).2) + refine ⟨B,fun i => ⟨hB i,hiB i⟩,?_,?_⟩ + · intro i j hij + exact (hdis hij).mono (hBA i) (hBA j) + · intro i x hx y hy hxy + apply mem_cleanSurfacePairs.mpr + intro heq + refine ⟨?_,?_,(hreg i x (hBA i hx) y (hBA i hy) hxy).resolve_left (not_not.mpr heq)⟩ + · intro hxS + have hxi := honly i x hx hxS + have hyi : y = i.val := hIso i y hy (heq.symm.trans (congrArg f hxi)) + exact hxy (hxi.trans hyi.symm) + · intro hyS + have hyi := honly i y hy hyS + have hxi : x = i.val := hIso i x hx (heq.trans (congrArg f hyi)) + exact hxy (hxi.trans hyi.symm) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanSurfacePairs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanSurfacePairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..22e68b3977d1749e40c57169b4b9eda8a3f092b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CleanSurfacePairs.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceRegularPairLocus +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPairAvoidance +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenPairGeometry + +namespace OAI + +/-! Regular pairs which additionally have no coincidence involving the +prescribed finite singular set form an open, stable condition. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def cleanSurfacePairs (f : M → ProjectionTarget 3) (S : Set M) : Set (M × M) := + regularSurfacePairs f ∩ {z | f z.1 ≠ f z.2 ∨ (z.1 ∉ S ∧ z.2 ∉ S)} + +lemma mem_cleanSurfacePairs {f : M → ProjectionTarget 3} {S : Set M} {z : M × M} : + z ∈ cleanSurfacePairs f S ↔ + (f z.1 = f z.2 → z.1 ∉ S ∧ z.2 ∉ S ∧ Function.Surjective (surfacePairDerivative f z.1 z.2)) := by + constructor + · rintro ⟨hr,ha⟩ he + exact ⟨(ha.resolve_left (not_not.mpr he)).1,(ha.resolve_left (not_not.mpr he)).2, + hr.resolve_left (not_not.mpr he)⟩ + · intro h + by_cases he : f z.1 = f z.2 + · have hh := h he + exact ⟨Or.inr hh.2.2,Or.inr ⟨hh.1,hh.2.1⟩⟩ + · exact ⟨Or.inl he,Or.inl he⟩ + +variable [IsManifold planeModel ∞ M] [T2Space M] +theorem cleanSurfacePairs_open {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {S : Set M} (hS : S.Finite) : + IsOpen (cleanSurfacePairs f S) := by + have he : IsOpen {z : M × M | f z.1 ≠ f z.2} := + (isClosed_eq (hf.continuous.comp continuous_fst) (hf.continuous.comp continuous_snd)).isOpen_compl + have hs : IsOpen {z : M × M | z.1 ∉ S ∧ z.2 ∉ S} := + (hS.isClosed.isOpen_compl.preimage continuous_fst).inter + (hS.isClosed.isOpen_compl.preimage continuous_snd) + exact (regularSurfacePairs_open hf).inter (he.union hs) + +variable [CompactSpace M] +theorem compact_clean_pair_stability {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {χ : M → ℝ} (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) (hb : ∀ x, χ x ∈ Icc 0 1) + {K : Set (M × M)} (hK : IsCompact K) {S : Set M} (hS : S.Finite) + (hclean : K ⊆ cleanSurfacePairs f S) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → K ⊆ cleanSurfacePairs (surfaceTranslation f χ a) S := by + have hr : ∀ z ∈ K, f z.1 = f z.2 → Function.Surjective (surfacePairDerivative f z.1 z.2) := + fun z hz he => ((mem_cleanSurfacePairs.mp (hclean hz)) he).2.2 + have ha : ∀ z ∈ K, z.1 ∈ S ∨ z.2 ∈ S → f z.1 ≠ f z.2 := by + intro z hz hS he + have hh := (mem_cleanSurfacePairs.mp (hclean hz)) he + rcases hS with h | h + · exact hh.1 h + · exact hh.2.1 h + obtain ⟨δ,hδ,hδr⟩ := compact_surface_pair_stability hf hχ hK hr + obtain ⟨η,hη,hηa⟩ := compact_finite_pair_avoidance_stability hf.continuous χ hb hK hS ha + refine ⟨min δ η,lt_min hδ hη,?_⟩ + intro a ha z hz + apply mem_cleanSurfacePairs.mpr + intro he + have hn : ¬ (z.1 ∈ S ∨ z.2 ∈ S) := + fun h => hηa a (ha.trans_le (min_le_right _ _)) z hz h he + exact ⟨(not_or.mp hn).1,(not_or.mp hn).2,hδr a (ha.trans_le (min_le_left _ _)) z hz he⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedArcHalfChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedArcHalfChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..da7d7179e9bd3100e2eb7a2cbb9eb02120f17f28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedArcHalfChart.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.EmbeddingNeighborhoodChart +import OAI.Geometry.SurfaceImmersion.Atlas.HalfIntervalChart + +namespace OAI + +/-! An embedded half-arc containing a relative neighborhood provides +an actual half-line chart of the ambient subspace. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem closed_arc_half_chart {K : Set X} {δ : ℝ} (hδ : 0 < δ) + (γ : Icc (0:ℝ) δ → X) (hγ : IsEmbedding γ) + (hmem : ∀ t, γ t ∈ K) {V : Set X} (hV : IsOpen V) + (hpV : γ ⟨0,le_rfl,hδ.le⟩ ∈ V) (hsub : K ∩ V ⊆ range γ) : + ∃ c : OpenPartialHomeomorph K (Ici (0:ℝ)), + (⟨γ ⟨0,le_rfl,hδ.le⟩,hmem _⟩ : K) ∈ c.source ∧ + c ⟨γ ⟨0,le_rfl,hδ.le⟩,hmem _⟩ = ⟨0,by simp⟩ := by + let g : Icc (0:ℝ) δ → K := K.codRestrict γ hmem + have hg : IsEmbedding g := hγ.codRestrict K hmem + let W : Set K := (↑) ⁻¹' V + have hW : IsOpen W := hV.preimage continuous_subtype_val + have hWsub : W ⊆ range g := by + intro z hz + obtain ⟨t,ht⟩ := hsub ⟨z.property,hz⟩ + exact ⟨t,Subtype.ext ht⟩ + obtain ⟨a,ha,ha0⟩ := embedding_neighborhood_chart g hg ⟨0,le_rfl,hδ.le⟩ hW hpV hWsub + obtain ⟨b,hb,hb0⟩ := half_interval_chart hδ + refine ⟨a.trans b,?_,?_⟩ + · change g ⟨0,le_rfl,hδ.le⟩ ∈ a.source ∧ a (g ⟨0,le_rfl,hδ.le⟩) ∈ b.source + exact ⟨ha,by rw [ha0]; exact hb⟩ + · change b (a (g ⟨0,le_rfl,hδ.le⟩)) = _ + rw [ha0,hb0] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedDoubleArcLift.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedDoubleArcLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cdd5b866bfa7823394d000513179f01d9c1f2f6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ClosedDoubleArcLift.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.OpenDoubleArcLift +import OAI.Geometry.SurfaceImmersion.Geometry.OpenIntervalExtension +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSingletonFiber + +namespace OAI + +/-! An ordered lift of a double arc extends continuously to its two +crosscap endpoints, since each diagonal fiber is a singleton. -/ +noncomputable section +open Set Filter Topology unitInterval +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [T2Space M] [CompactSpace M] + +theorem closed_double_arc_lift (p q : M) + (γ : Path (unorderedPair (p,p)) (unorderedPair (q,q))) + (hγ : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → γ t ∈ unorderedDistinctPairs M) : + ∃ Γ : Path (p,p) (q,q), ∀ t, unorderedPair (Γ t) = γ t := by + obtain ⟨F,hF⟩ := open_double_arc_lift γ.toContinuousMap hγ + let G := openIntervalExtension F (p,p) (q,q) + have hG0 : G 0 = (p,p) := openIntervalExtension_zero F _ _ + have hG1 : G 1 = (q,q) := openIntervalExtension_one F _ _ + have hG : ∀ t, unorderedPair (G t) = γ t := by + intro t + by_cases h0 : t = 0 + · subst t + rw [hG0,γ.source] + by_cases h1 : t = 1 + · subst t + rw [hG1,γ.target] + have ht := (intervalInteriorPoint t h0 h1).property + rw [show G t = F ⟨t.val,ht⟩ from openIntervalExtension_interior F _ _ t ht] + exact hF ⟨t.val,ht⟩ + have hbase : Continuous (unorderedPair ∘ G) := by + have he : unorderedPair ∘ G = γ := funext hG + rw [he] + exact γ.continuous + have hcont : Continuous G := by + apply continuous_iff_continuousAt.mpr + intro t + by_cases h0 : t = 0 + · subst t + change Tendsto G (𝓝 0) (𝓝 (G 0)) + rw [hG0] + apply tendsto_of_comp_singleton_fiber unorderedPair_continuous + (fun z hz => (unorderedPair_diagonal_iff z p).mp hz) + have hc : Tendsto (unorderedPair ∘ G) (𝓝 (0:I)) (𝓝 (unorderedPair (G 0))) := hbase.continuousAt + simpa only [hG0] using hc + by_cases h1 : t = 1 + · subst t + change Tendsto G (𝓝 1) (𝓝 (G 1)) + rw [hG1] + apply tendsto_of_comp_singleton_fiber unorderedPair_continuous + (fun z hz => (unorderedPair_diagonal_iff z q).mp hz) + have hc : Tendsto (unorderedPair ∘ G) (𝓝 (1:I)) (𝓝 (unorderedPair (G 1))) := hbase.continuousAt + simpa only [hG1] using hc + · have ht := (intervalInteriorPoint t h0 h1).property + have hU : IsOpen {t : I | 0 < (t:ℝ) ∧ (t:ℝ) < 1} := + isOpen_Ioo.preimage continuous_subtype_val + exact (openIntervalExtension_continuousOn F F.continuous _ _).continuousAt (hU.mem_nhds ht) + exact ⟨⟨⟨G,hcont⟩,hG0,hG1⟩,hG⟩ + +theorem embedded_closed_double_arc_lift (p q : M) + (γ : Path (unorderedPair (p,p)) (unorderedPair (q,q))) (hinj : Function.Injective γ) + (hγ : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → γ t ∈ unorderedDistinctPairs M) : + ∃ Γ : Path (p,p) (q,q), IsClosedEmbedding Γ ∧ ∀ t, unorderedPair (Γ t) = γ t := by + obtain ⟨Γ,hΓ⟩ := closed_double_arc_lift p q γ hγ + have hΓinj : Function.Injective Γ := by + intro s t h + apply hinj + rw [← hΓ s,← hΓ t,h] + exact ⟨Γ,Γ.continuous.isClosedEmbedding hΓinj,hΓ⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarDensityMoments.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarDensityMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..a55d277535697f6540d5b143f46b8245cc69efa2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarDensityMoments.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BlendedVelocityPath +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityPeriod + +namespace OAI + +/-! Exact unit-period moment equations for the prescribed collar density. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def unitDensity (a t : ℝ) : ℝ := density a (2 * Real.pi * t) + +lemma unitDensity_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => unitDensity z.1 z.2) := + density_smooth.comp (contDiff_fst.prodMk (contDiff_const.mul contDiff_snd)) + +lemma unitDensity_pos (a t : ℝ) : 0 < unitDensity a t := density_pos a _ + +lemma unitDensity_periodic (a : ℝ) : Function.Periodic (unitDensity a) 1 := by + intro t + unfold unitDensity + rw [mul_add, mul_one] + exact density_periodic a _ + +@[simp] lemma unitDensity_zero (t : ℝ) : unitDensity 0 t = 1 := density_zero _ + +lemma blendedPath_collar (a A t : ℝ) : + blendedPath a A 0 0 t = ![arcX a (2 * Real.pi * t), arcY a (2 * Real.pi * t)] := by + simp [blendedPath, blendedAngle, cos_baseAngle, sin_baseAngle] + +lemma collar_density_moments (a A : ℝ) : + (∫ t in 0..1, unitDensity a t • LoopDensity.augment (blendedPath a A 0 0 t)) = + LoopDensity.augment ![(1 - a ^ 2 / 2) / (1 + a ^ 2 / 2), 0] := by + let f : ℝ → LoopDensity.Moments := fun t => + unitDensity a t • LoopDensity.augment (blendedPath a A 0 0 t) + have hp : Continuous (blendedPath a A 0 0) := by + have hang : Continuous (blendedAngle a A 0 0) := by + unfold blendedAngle baseAngle + fun_prop + have hscaled : Continuous (fun t : ℝ => blendedAngle a A 0 0 (2 * Real.pi * t)) := + hang.comp (continuous_const.mul continuous_id) + apply continuous_pi + intro i + fin_cases i + · exact Real.continuous_cos.comp hscaled + · exact Real.continuous_sin.comp hscaled + have hρ : Continuous (unitDensity a) := + unitDensity_smooth.continuous.comp (continuous_const.prodMk continuous_id) + have hf : Continuous f := + hρ.smul (LoopDensity.augment_continuous.comp hp) + have heval (i : Fin 3) : (∫ t in 0..1, f t) i = ∫ t in 0..1, f t i := + ((ContinuousLinearMap.proj i : LoopDensity.Moments →L[ℝ] ℝ).intervalIntegral_comp_comm + (hf.intervalIntegrable 0 1)).symm + change (∫ t in 0..1, f t) = _ + ext i + rw [heval] + fin_cases i + · change (∫ t in 0..1, unitDensity a t * 1) = 1 + simp only [mul_one, unitDensity] + rw [integral_rescale, mean_density] + · change (∫ t in 0..1, unitDensity a t * (blendedPath a A 0 0 t) 0) = _ + simp only [blendedPath_collar, Matrix.cons_val_zero, unitDensity] + exact (integral_rescale (fun u => density a u * arcX a u)).trans (mean_density_arcX a) + · change (∫ t in 0..1, unitDensity a t * (blendedPath a A 0 0 t) 1) = 0 + simp only [blendedPath_collar, Matrix.cons_val_one, Matrix.cons_val_zero, unitDensity] + exact (integral_rescale (fun u => density a u * arcY a u)).trans (mean_density_arcY a) + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocity.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..95deb063f1ffbb3464a6542471d918a2241ad22e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocity.lean @@ -0,0 +1,75 @@ +import Mathlib + +namespace OAI + +/-! An explicit small circular arc and positive averaging density. This gives +an alternative collar construction without solving a squared-amplitude equation. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +/-- Rational parametrization of a small arc around `(1,0)`. -/ +def arcX (a t : ℝ) : ℝ := (1 - (a * Real.cos t) ^ 2) / (1 + (a * Real.cos t) ^ 2) +def arcY (a t : ℝ) : ℝ := (2 * (a * Real.cos t)) / (1 + (a * Real.cos t) ^ 2) + +/-- A positive density that makes the two mean constraints elementary. -/ +def density (a t : ℝ) : ℝ := (1 + (a * Real.cos t) ^ 2) / (1 + a ^ 2 / 2) + +lemma arcDen_pos (a t : ℝ) : 0 < 1 + (a * Real.cos t) ^ 2 := by positivity +lemma densityDen_pos (a : ℝ) : 0 < 1 + a ^ 2 / 2 := by positivity + +lemma arc_unit (a t : ℝ) : arcX a t ^ 2 + arcY a t ^ 2 = 1 := by + unfold arcX arcY + field_simp [(arcDen_pos a t).ne'] + ring + +lemma density_pos (a t : ℝ) : 0 < density a t := + div_pos (arcDen_pos a t) (densityDen_pos a) + +lemma density_mul_arcX (a t : ℝ) : + density a t * arcX a t = (1 - (a * Real.cos t) ^ 2) / (1 + a ^ 2 / 2) := by + unfold density arcX + field_simp [(arcDen_pos a t).ne', (densityDen_pos a).ne'] + +lemma density_mul_arcY (a t : ℝ) : + density a t * arcY a t = 2 * a * Real.cos t / (1 + a ^ 2 / 2) := by + unfold density arcY + field_simp [(arcDen_pos a t).ne', (densityDen_pos a).ne'] + +@[simp] lemma arcX_zero (t : ℝ) : arcX 0 t = 1 := by simp [arcX] +@[simp] lemma arcY_zero (t : ℝ) : arcY 0 t = 0 := by simp [arcY] +@[simp] lemma density_zero (t : ℝ) : density 0 t = 1 := by simp [density] + +lemma arcX_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => arcX z.1 z.2) := by + exact (contDiff_const.sub ((contDiff_fst.mul contDiff_snd.cos).pow 2)).div + (contDiff_const.add ((contDiff_fst.mul contDiff_snd.cos).pow 2)) + (fun z => (arcDen_pos z.1 z.2).ne') + +lemma arcY_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => arcY z.1 z.2) := by + exact (contDiff_const.mul (contDiff_fst.mul contDiff_snd.cos)).div + (contDiff_const.add ((contDiff_fst.mul contDiff_snd.cos).pow 2)) + (fun z => (arcDen_pos z.1 z.2).ne') + +lemma density_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => density z.1 z.2) := by + exact (contDiff_const.add ((contDiff_fst.mul contDiff_snd.cos).pow 2)).div + (contDiff_const.add (contDiff_fst.pow 2 |>.div_const 2)) + (fun z => (densityDen_pos z.1).ne') + +lemma arcX_periodic (a : ℝ) : Function.Periodic (arcX a) (2 * Real.pi) := by + intro t + simp only [arcX, Real.cos_add_two_pi] + +lemma arcY_periodic (a : ℝ) : Function.Periodic (arcY a) (2 * Real.pi) := by + intro t + simp only [arcY, Real.cos_add_two_pi] + +lemma density_periodic (a : ℝ) : Function.Periodic (density a) (2 * Real.pi) := by + intro t + simp only [density, Real.cos_add_two_pi] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityAngle.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityAngle.lean new file mode 100644 index 0000000000000000000000000000000000000000..06024c488f0633e7fe9fc49f60a02b1d0a2e77fa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityAngle.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityReparam + +namespace OAI + +/-! The explicit collar arc has exactly two stationary angular positions. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def baseAngle (a t : ℝ) : ℝ := 2 * Real.arctan (a * Real.cos t) +def angle (a θ : ℝ) : ℝ := baseAngle a (inverseClock a θ) + +lemma baseAngle_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => baseAngle z.1 z.2) := + contDiff_const.mul ((contDiff_fst.mul contDiff_snd.cos).arctan) + +lemma angle_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => angle z.1 z.2) := + baseAngle_smooth.comp (contDiff_fst.prodMk inverseClock_smooth) + +lemma cos_baseAngle (a t : ℝ) : Real.cos (baseAngle a t) = arcX a t := by + rw [baseAngle, Real.cos_two_mul, Real.cos_sq_arctan] + unfold arcX + field_simp [(arcDen_pos a t).ne'] + ring + +lemma sin_baseAngle (a t : ℝ) : Real.sin (baseAngle a t) = arcY a t := by + rw [baseAngle, Real.sin_two_mul, Real.sin_arctan, Real.cos_arctan] + unfold arcY + have hs : Real.sqrt (1 + (a * Real.cos t) ^ 2) ≠ 0 := + (Real.sqrt_pos.2 (arcDen_pos a t)).ne' + field_simp [hs] + rw [Real.sq_sqrt (by positivity)] + +lemma cos_angle (a θ : ℝ) : Real.cos (angle a θ) = reparamX a θ := + cos_baseAngle a (inverseClock a θ) + +lemma sin_angle (a θ : ℝ) : Real.sin (angle a θ) = reparamY a θ := + sin_baseAngle a (inverseClock a θ) + +lemma hasDerivAt_baseAngle (a t : ℝ) : + HasDerivAt (baseAngle a) (-2 * a * Real.sin t / (1 + (a * Real.cos t) ^ 2)) t := by + convert (((Real.hasDerivAt_cos t).const_mul a).arctan.const_mul 2) using 1 + · rfl + · field_simp [(arcDen_pos a t).ne'] + +lemma hasDerivAt_inverseClock (a θ : ℝ) : + HasDerivAt (inverseClock a) (density a (inverseClock a θ))⁻¹ θ := by + have hi : Differentiable ℝ (inverseClock a) := + (inverseClock_smooth.comp (contDiff_const.prodMk contDiff_id)).differentiable (by simp) + have hc := (hasDerivAt_clock a (inverseClock a θ)).comp θ (hi θ).hasDerivAt + have hid : (fun x => clock a (inverseClock a x)) = id := by funext x; simp + change HasDerivAt (fun x => clock a (inverseClock a x)) _ θ at hc + rw [hid] at hc + have heq : density a (inverseClock a θ) * deriv (inverseClock a) θ = 1 := + hc.unique (hasDerivAt_id θ) + convert (hi θ).hasDerivAt using 1 + apply mul_left_cancel₀ (density_pos a (inverseClock a θ)).ne' + rw [mul_inv_cancel₀ (density_pos a (inverseClock a θ)).ne', heq] + +lemma deriv_angle (a θ : ℝ) : + deriv (angle a) θ = + (-2 * a * Real.sin (inverseClock a θ) / + (1 + (a * Real.cos (inverseClock a θ)) ^ 2)) * + (density a (inverseClock a θ))⁻¹ := + ((hasDerivAt_baseAngle a (inverseClock a θ)).comp θ + (hasDerivAt_inverseClock a θ)).deriv + +lemma deriv_angle_eq_zero_iff {a θ : ℝ} (ha : a ≠ 0) : + deriv (angle a) θ = 0 ↔ Real.sin (inverseClock a θ) = 0 := by + rw [deriv_angle] + simp [(density_pos a (inverseClock a θ)).ne', (arcDen_pos a (inverseClock a θ)).ne', ha] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityCalibration.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityCalibration.lean new file mode 100644 index 0000000000000000000000000000000000000000..f55beed7a2972185dd63a212c5e1981ff1ed82e1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityCalibration.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityMean + +namespace OAI + +/-! Calibrate the explicit collar arc to the required tangential mean. -/ +noncomputable section + +namespace ClosedSurfaceR4.CollarVelocity + +def amplitude (R v a : ℝ) : ℝ := Real.sqrt 2 * a / (R + v) + +lemma amplitude_sq (R v a : ℝ) : amplitude R v a ^ 2 = 2 * a ^ 2 / (R + v) ^ 2 := by + unfold amplitude + rw [div_pow, mul_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] + +/-- The mean has exactly the prescribed tangential component. -/ +theorem calibrated_mean {R v a : ℝ} (hR : 0 < R) (hv : 0 < v) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + circleMean (fun t => density (amplitude R v a) t * arcX (amplitude R v a) t) = v / R := by + rw [mean_density_arcX, amplitude_sq] + have hp : R + v ≠ 0 := ne_of_gt (add_pos hR hv) + have hd : (R + v) ^ 2 + a ^ 2 ≠ 0 := by positivity + have heq : (1 - 2 * a ^ 2 / (R + v) ^ 2 / 2) / + (1 + 2 * a ^ 2 / (R + v) ^ 2 / 2) = + ((R + v) ^ 2 - a ^ 2) / ((R + v) ^ 2 + a ^ 2) := by + field_simp + rw [heq] + have hn : (R + v) ^ 2 - a ^ 2 = 2 * v * (R + v) := by nlinarith + have hd' : (R + v) ^ 2 + a ^ 2 = 2 * R * (R + v) := by nlinarith + rw [hn, hd'] + field_simp + +lemma circleMean_const_mul (c : ℝ) (f : ℝ → ℝ) : + circleMean (fun t => c * f t) = c * circleMean f := by + unfold circleMean + rw [intervalIntegral.integral_const_mul] + ring + +/-- Both weighted velocity means are exact before the positive reparametrization. -/ +theorem calibrated_velocity_means {R v a : ℝ} (hR : 0 < R) (hv : 0 < v) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + circleMean (fun t => density (amplitude R v a) t * (R * arcX (amplitude R v a) t)) = v ∧ + circleMean (fun t => density (amplitude R v a) t * (R * arcY (amplitude R v a) t)) = 0 := by + constructor + · simp_rw [mul_left_comm _ R] + rw [circleMean_const_mul, calibrated_mean hR hv hquad] + field_simp + · simp_rw [mul_left_comm _ R] + rw [circleMean_const_mul, mean_density_arcY, mul_zero] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityClock.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityClock.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef8a6c772371058ee7120fc140cd64b1e4ddf078 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityClock.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocity + +namespace OAI + +/-! The explicit positive change of angular variable for the collar arc. -/ +noncomputable section +open Filter +open scoped Topology ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def clock (a t : ℝ) : ℝ := t + a ^ 2 / (2 * (2 + a ^ 2)) * Real.sin (2 * t) + +lemma density_eq (a t : ℝ) : + density a t = 1 + a ^ 2 / (2 + a ^ 2) * Real.cos (2 * t) := by + rw [Real.cos_two_mul] + unfold density + have h : 2 + a ^ 2 ≠ 0 := by positivity + field_simp [(densityDen_pos a).ne', h] + ring + +lemma hasDerivAt_clock (a t : ℝ) : HasDerivAt (clock a) (density a t) t := by + have hs := (Real.hasDerivAt_sin (2 * t)).comp t ((hasDerivAt_id t).const_mul 2) + have h := (hasDerivAt_id t).add (hs.const_mul (a ^ 2 / (2 * (2 + a ^ 2)))) + change HasDerivAt (fun t => t + a ^ 2 / (2 * (2 + a ^ 2)) * Real.sin (2 * t)) _ t + convert h using 1 + · rfl + · rw [density_eq] + have hd : 2 + a ^ 2 ≠ 0 := by positivity + field_simp [hd] + +lemma clock_strictMono (a : ℝ) : StrictMono (clock a) := by + apply strictMono_of_deriv_pos + intro t + rw [(hasDerivAt_clock a t).deriv] + exact density_pos a t + +lemma clock_continuous (a : ℝ) : Continuous (clock a) := + (show Differentiable ℝ (clock a) from fun t => (hasDerivAt_clock a t).differentiableAt).continuous + +lemma clock_period (a t : ℝ) : clock a (t + 2 * Real.pi) = clock a t + 2 * Real.pi := by + unfold clock + rw [show 2 * (t + 2 * Real.pi) = (2 * t + 2 * Real.pi) + 2 * Real.pi by ring] + rw [Real.sin_add_two_pi, Real.sin_add_two_pi] + ring + +lemma clock_displacement_bound (a t : ℝ) : + |clock a t - t| ≤ |a ^ 2 / (2 * (2 + a ^ 2))| := by + unfold clock + rw [add_sub_cancel_left, abs_mul] + exact mul_le_of_le_one_right (abs_nonneg _) (Real.abs_sin_le_one _) + +lemma clock_surjective (a : ℝ) : Function.Surjective (clock a) := by + let C := |a ^ 2 / (2 * (2 + a ^ 2))| + have hlo (t : ℝ) : t - C ≤ clock a t := by + have h := (abs_le.mp (clock_displacement_bound a t)).1 + dsimp [C] + linarith + have hhi (t : ℝ) : clock a t ≤ t + C := by + have h := (abs_le.mp (clock_displacement_bound a t)).2 + dsimp [C] + linarith + apply (clock_continuous a).surjective + · apply tendsto_atTop_mono hlo + simpa only [sub_eq_add_neg, id_eq] using tendsto_atTop_add_const_right atTop (-C) tendsto_id + · exact tendsto_atBot_mono hhi (tendsto_atBot_add_const_right atBot C tendsto_id) + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..e106b2e5686aa49b9960299335fee88e51af3e91 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityFamily.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityVector +import OAI.Geometry.SurfaceImmersion.Geometry.FlatExtension + +namespace OAI + +/-! Smooth parameter families of the actual collar velocity. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open CovarianceCorrector +open VelocityPlane (Space) + +variable {A : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + {S : Set A} {R v a : A → ℝ} {e₁ e₂ : A → Space} + +lemma vectorLoop_family_smoothOn + (hR : ContDiffOn ℝ ∞ R S) (hv : ContDiffOn ℝ ∞ v S) + (ha : ContDiffOn ℝ ∞ a S) (h₁ : ContDiffOn ℝ ∞ e₁ S) + (h₂ : ContDiffOn ℝ ∞ e₂ S) (hn : ∀ p ∈ S, R p + v p ≠ 0) : + ContDiffOn ℝ ∞ (fun z : A × ℝ => + vectorLoop (e₁ z.1) (e₂ z.1) (R z.1) (v z.1) (a z.1) (z.2 : Period)) + (S ×ˢ Set.univ) := by + have hRf : ContDiffOn ℝ ∞ (fun z : A × ℝ => R z.1) (S ×ˢ Set.univ) := + hR.comp contDiffOn_fst (fun _ hz => hz.1) + have hvf : ContDiffOn ℝ ∞ (fun z : A × ℝ => v z.1) (S ×ˢ Set.univ) := + hv.comp contDiffOn_fst (fun _ hz => hz.1) + have haf : ContDiffOn ℝ ∞ (fun z : A × ℝ => a z.1) (S ×ˢ Set.univ) := + ha.comp contDiffOn_fst (fun _ hz => hz.1) + have h₁f : ContDiffOn ℝ ∞ (fun z : A × ℝ => e₁ z.1) (S ×ˢ Set.univ) := + h₁.comp contDiffOn_fst (fun _ hz => hz.1) + have h₂f : ContDiffOn ℝ ∞ (fun z : A × ℝ => e₂ z.1) (S ×ˢ Set.univ) := + h₂.comp contDiffOn_fst (fun _ hz => hz.1) + have hAmp : ContDiffOn ℝ ∞ (fun z : A × ℝ => amplitude (R z.1) (v z.1) (a z.1)) + (S ×ˢ Set.univ) := + (contDiffOn_const.mul haf).div (hRf.add hvf) (fun z hz => hn z.1 hz.1) + exact (hRf.mul (unitX_smooth.comp_contDiffOn (hAmp.prodMk contDiffOn_snd))).smul h₁f |>.add + ((hRf.mul (unitY_smooth.comp_contDiffOn (hAmp.prodMk contDiffOn_snd))).smul h₂f) + +lemma vectorLoop_family_smooth + (hR : ContDiff ℝ ∞ R) (hv : ContDiff ℝ ∞ v) (ha : ContDiff ℝ ∞ a) + (h₁ : ContDiff ℝ ∞ e₁) (h₂ : ContDiff ℝ ∞ e₂) (hn : ∀ p, R p + v p ≠ 0) : + ContDiff ℝ ∞ (fun z : A × ℝ => + vectorLoop (e₁ z.1) (e₂ z.1) (R z.1) (v z.1) (a z.1) (z.2 : Period)) := by + rw [← contDiffOn_univ] + simpa only [Set.univ_prod_univ] using vectorLoop_family_smoothOn (S := Set.univ) + hR.contDiffOn hv.contDiffOn ha.contDiffOn h₁.contDiffOn h₂.contDiffOn (fun p _ => hn p) + +lemma vectorLoop_eq_of_amplitude_zero (e₁ e₂ : Space) {R v a : ℝ} + (hR : 0 < R) (hv : 0 < v) (hquad : R ^ 2 = v ^ 2 + a ^ 2) (ha : a = 0) + (t : Period) : vectorLoop e₁ e₂ R v a t = v • e₁ := by + have hRv : R = v := by nlinarith + rw [ha, vectorLoop_zero_amplitude, hRv] + +/-- Every spatial derivative vanishes on the boundary of a zero-amplitude region. -/ +theorem collar_flatness + (hR : ContDiff ℝ ∞ R) (hv : ContDiff ℝ ∞ v) (ha : ContDiff ℝ ∞ a) + (h₁ : ContDiff ℝ ∞ e₁) (h₂ : ContDiff ℝ ∞ e₂) + (hRp : ∀ p, 0 < R p) (hvp : ∀ p, 0 < v p) + (hq : ∀ p, R p ^ 2 = v p ^ 2 + a p ^ 2) + {O : Set A} (hO : IsOpen O) (hz : ∀ p ∈ O, a p = 0) (t : ℝ) (n : ℕ) : + Set.EqOn (iteratedFDeriv ℝ n (fun p => + vectorLoop (e₁ p) (e₂ p) (R p) (v p) (a p) (t : Period) - v p • e₁ p)) + (fun _ => 0) (closure O) := by + have hs := vectorLoop_family_smooth hR hv ha h₁ h₂ + (fun p => (add_pos (hRp p) (hvp p)).ne') + apply iteratedFDeriv_zero_on_closure + ((hs.comp (contDiff_id.prodMk contDiff_const)).sub (hv.smul h₁)) hO + intro p hp + change vectorLoop (e₁ p) (e₂ p) (R p) (v p) (a p) (t : Period) - v p • e₁ p = 0 + rw [vectorLoop_eq_of_amplitude_zero _ _ (hRp p) (hvp p) (hq p) (hz p hp), sub_self] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..e869f6209c0acceae3d47431079f19668d5ff00b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityInverse.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityClock + +namespace OAI + +/-! Smooth parameter dependence of the explicit collar clock's inverse. -/ +noncomputable section +open Filter +open scoped Topology ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +lemma clock_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => clock z.1 z.2) := by + apply contDiff_snd.add + apply ContDiff.mul + · exact (contDiff_fst.pow 2).div + (contDiff_const.mul (contDiff_const.add (contDiff_fst.pow 2))) + (fun z => by positivity) + · exact (contDiff_const.mul contDiff_snd).sin + +def inverseClock (a θ : ℝ) : ℝ := Function.invFun (clock a) θ + +@[simp] lemma clock_inverseClock (a θ : ℝ) : clock a (inverseClock a θ) = θ := + Function.rightInverse_invFun (clock_surjective a) θ + +@[simp] lemma inverseClock_clock (a t : ℝ) : inverseClock a (clock a t) = t := + Function.leftInverse_invFun (clock_strictMono a).injective t + +@[simp] lemma clock_zero (a : ℝ) : clock a 0 = 0 := by simp [clock] +@[simp] lemma inverseClock_zero (a : ℝ) : inverseClock a 0 = 0 := by + simpa only [clock_zero] using inverseClock_clock a 0 + +lemma inverseClock_period (a θ : ℝ) : + inverseClock a (θ + 2 * Real.pi) = inverseClock a θ + 2 * Real.pi := by + apply (clock_strictMono a).injective + rw [clock_inverseClock, clock_period, clock_inverseClock] + +private def equation (z : (ℝ × ℝ) × ℝ) : ℝ := clock z.1.1 z.2 - z.1.2 + +private lemma equation_smooth : ContDiff ℝ ∞ equation := by + exact (clock_smooth.comp (contDiff_fst.fst.prodMk contDiff_snd)).sub contDiff_fst.snd + +private lemma equation_partial (a θ t : ℝ) : + fderiv ℝ equation ((a, θ), t) ∘L ContinuousLinearMap.inr ℝ (ℝ × ℝ) ℝ = + ContinuousLinearMap.toSpanSingleton ℝ (density a t) := by + have he := equation_smooth.differentiable (by norm_num) + have hi : HasFDerivAt (fun s : ℝ => ((a, θ), s)) + (ContinuousLinearMap.inr ℝ (ℝ × ℝ) ℝ) t := by + exact hasFDerivAt_prodMk_right (a, θ) t + have hcomp := he.differentiableAt.hasFDerivAt.comp t hi + have hderiv := ((hasDerivAt_clock a t).sub_const θ).hasFDerivAt + exact hcomp.unique hderiv + +private lemma equation_partial_invertible (a θ t : ℝ) : + (fderiv ℝ equation ((a, θ), t) ∘L ContinuousLinearMap.inr ℝ (ℝ × ℝ) ℝ).IsInvertible := by + rw [equation_partial] + apply ContinuousLinearMap.IsInvertible.of_inverse + (g := ContinuousLinearMap.toSpanSingleton ℝ (density a t)⁻¹) + · ext + simp [ContinuousLinearMap.toSpanSingleton_apply, (density_pos a t).ne'] + · ext + simp [ContinuousLinearMap.toSpanSingleton_apply, (density_pos a t).ne'] + +lemma inverseClock_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => inverseClock z.1 z.2) := by + rw [contDiff_iff_contDiffAt] + intro z + let u : (ℝ × ℝ) × ℝ := (z, inverseClock z.1 z.2) + have hc := equation_smooth.contDiffAt (x := u) + have hn : (∞ : ℕ∞ω) ≠ 0 := by simp + have hi := equation_partial_invertible z.1 z.2 (inverseClock z.1 z.2) + have hs := hc.contDiffAt_implicitFunction hn hi + have he := hc.eventually_apply_implicitFunction hn hi + have heq : (fun w : ℝ × ℝ => inverseClock w.1 w.2) =ᶠ[𝓝 z] + hc.implicitFunction hn hi := by + filter_upwards [he] with w hw + apply (clock_strictMono w.1).injective + rw [clock_inverseClock] + change clock w.1 (hc.implicitFunction hn hi w) - w.2 = + clock z.1 (inverseClock z.1 z.2) - z.2 at hw + rw [clock_inverseClock, sub_self] at hw + exact (sub_eq_zero.mp hw).symm + exact hs.congr_of_eventuallyEq heq + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d02e188e86d904f9e829158c5f9d7403d0db6ef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityMean.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocity + +namespace OAI + +/-! Exact mean constraints for the explicit collar velocity arc. -/ +noncomputable section +open MeasureTheory + +namespace ClosedSurfaceR4.CollarVelocity + +def circleMean (f : ℝ → ℝ) : ℝ := (2 * Real.pi)⁻¹ * ∫ t in 0..2 * Real.pi, f t + +lemma integral_cos_period : (∫ t in (0 : ℝ)..2 * Real.pi, Real.cos t) = 0 := by + rw [integral_cos] + simp + +lemma integral_cos_sq_period : (∫ t in (0 : ℝ)..2 * Real.pi, Real.cos t ^ 2) = Real.pi := by + rw [integral_cos_sq] + simp + +lemma integral_arc_den (a : ℝ) : + (∫ t in (0 : ℝ)..2 * Real.pi, 1 + (a * Real.cos t) ^ 2) = + 2 * Real.pi * (1 + a ^ 2 / 2) := by + simp only [mul_pow] + rw [intervalIntegral.integral_add (f := fun _ : ℝ => (1 : ℝ)) + (g := fun t : ℝ => a ^ 2 * Real.cos t ^ 2) intervalIntegrable_const + ((continuous_const.mul (Real.continuous_cos.pow 2)).intervalIntegrable _ _), + intervalIntegral.integral_const, intervalIntegral.integral_const_mul, + integral_cos_sq_period] + simp only [sub_zero, smul_eq_mul, mul_one] + ring + +lemma integral_arc_num (a : ℝ) : + (∫ t in (0 : ℝ)..2 * Real.pi, 1 - (a * Real.cos t) ^ 2) = + 2 * Real.pi * (1 - a ^ 2 / 2) := by + simp only [mul_pow] + rw [intervalIntegral.integral_sub (f := fun _ : ℝ => (1 : ℝ)) + (g := fun t : ℝ => a ^ 2 * Real.cos t ^ 2) intervalIntegrable_const + ((continuous_const.mul (Real.continuous_cos.pow 2)).intervalIntegrable _ _), + intervalIntegral.integral_const, intervalIntegral.integral_const_mul, + integral_cos_sq_period] + simp only [sub_zero, smul_eq_mul, mul_one] + ring + +lemma mean_density (a : ℝ) : circleMean (density a) = 1 := by + unfold circleMean density + rw [intervalIntegral.integral_div, integral_arc_den] + field_simp [(densityDen_pos a).ne', Real.pi_ne_zero] + +lemma mean_density_arcX (a : ℝ) : + circleMean (fun t => density a t * arcX a t) = (1 - a ^ 2 / 2) / (1 + a ^ 2 / 2) := by + unfold circleMean + simp_rw [density_mul_arcX] + rw [intervalIntegral.integral_div, integral_arc_num] + field_simp [(densityDen_pos a).ne', Real.pi_ne_zero] + +lemma mean_density_arcY (a : ℝ) : circleMean (fun t => density a t * arcY a t) = 0 := by + unfold circleMean + simp_rw [density_mul_arcY] + rw [intervalIntegral.integral_div, intervalIntegral.integral_const_mul, integral_cos_period] + simp + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityPeriod.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityPeriod.lean new file mode 100644 index 0000000000000000000000000000000000000000..80fe3274b34b9af4db563ea10ff6a9b6339f68c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityPeriod.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityReparam +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus + +namespace OAI + +/-! Convert the explicit collar arc to the unit period used by the corrector. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open CovarianceCorrector SmoothPeriodicCalculus + +def unitX (a t : ℝ) : ℝ := reparamX a (2 * Real.pi * t) +def unitY (a t : ℝ) : ℝ := reparamY a (2 * Real.pi * t) + +lemma unitX_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => unitX z.1 z.2) := + reparamX_smooth.comp (contDiff_fst.prodMk (contDiff_const.mul contDiff_snd)) + +lemma unitY_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => unitY z.1 z.2) := + reparamY_smooth.comp (contDiff_fst.prodMk (contDiff_const.mul contDiff_snd)) + +lemma unitX_periodic (a : ℝ) : Function.Periodic (unitX a) 1 := by + intro t + unfold unitX + rw [mul_add, mul_one] + exact reparamX_periodic a _ + +lemma unitY_periodic (a : ℝ) : Function.Periodic (unitY a) 1 := by + intro t + unfold unitY + rw [mul_add, mul_one] + exact reparamY_periodic a _ + +def loopX (a : ℝ) : C(Period, ℝ) := + bundle (unitX a) (unitX_periodic a) + ((unitX_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous) + +def loopY (a : ℝ) : C(Period, ℝ) := + bundle (unitY a) (unitY_periodic a) + ((unitY_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous) + +@[simp] lemma loopX_apply (a t : ℝ) : loopX a (t : Period) = unitX a t := rfl +@[simp] lemma loopY_apply (a t : ℝ) : loopY a (t : Period) = unitY a t := rfl + +lemma integral_rescale (f : ℝ → ℝ) : + (∫ t in 0..1, f (2 * Real.pi * t)) = circleMean f := by + rw [intervalIntegral.integral_comp_mul_left f (by positivity)] + simp only [mul_zero, mul_one, smul_eq_mul, circleMean] + +lemma average_loopX (a : ℝ) : + average (loopX a) = (1 - a ^ 2 / 2) / (1 + a ^ 2 / 2) := by + rw [average, ← PeriodicPrimitive.integral_lift_eq_haar] + change (∫ t in 0..1, reparamX a (2 * Real.pi * t)) = _ + rw [integral_rescale, mean_reparamX] + +lemma average_loopY (a : ℝ) : average (loopY a) = 0 := by + rw [average, ← PeriodicPrimitive.integral_lift_eq_haar] + change (∫ t in 0..1, reparamY a (2 * Real.pi * t)) = _ + rw [integral_rescale, mean_reparamY] + +lemma average_calibrated_loopX {R v a : ℝ} (hR : 0 < R) (hv : 0 < v) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + average (loopX (amplitude R v a)) = v / R := by + rw [average_loopX, ← mean_density_arcX] + exact calibrated_mean hR hv hquad + +lemma loop_unit (a : ℝ) (t : Period) : loopX a t ^ 2 + loopY a t ^ 2 = 1 := by + induction t using QuotientAddGroup.induction_on + exact reparam_unit a _ + +@[simp] lemma loopX_zero (t : Period) : loopX 0 t = 1 := by + induction t using QuotientAddGroup.induction_on + exact reparamX_zero _ + +@[simp] lemma loopY_zero (t : Period) : loopY 0 t = 0 := by + induction t using QuotientAddGroup.induction_on + exact reparamY_zero _ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityReparam.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityReparam.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee2b8a6ea82b7afd794b0684384ca28164494958 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityReparam.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityInverse +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityCalibration + +namespace OAI + +/-! The collar velocity has the desired uniform mean after reparametrization. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +def reparamX (a θ : ℝ) : ℝ := arcX a (inverseClock a θ) +def reparamY (a θ : ℝ) : ℝ := arcY a (inverseClock a θ) + +lemma reparamX_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => reparamX z.1 z.2) := + arcX_smooth.comp (contDiff_fst.prodMk inverseClock_smooth) + +lemma reparamY_smooth : ContDiff ℝ ∞ (fun z : ℝ × ℝ => reparamY z.1 z.2) := + arcY_smooth.comp (contDiff_fst.prodMk inverseClock_smooth) + +lemma reparam_unit (a θ : ℝ) : reparamX a θ ^ 2 + reparamY a θ ^ 2 = 1 := + arc_unit a (inverseClock a θ) + +lemma reparamX_periodic (a : ℝ) : Function.Periodic (reparamX a) (2 * Real.pi) := by + intro θ + simp only [reparamX, inverseClock_period] + exact arcX_periodic a _ + +lemma reparamY_periodic (a : ℝ) : Function.Periodic (reparamY a) (2 * Real.pi) := by + intro θ + simp only [reparamY, inverseClock_period] + exact arcY_periodic a _ + +@[simp] lemma reparamX_zero (θ : ℝ) : reparamX 0 θ = 1 := arcX_zero _ +@[simp] lemma reparamY_zero (θ : ℝ) : reparamY 0 θ = 0 := arcY_zero _ + +lemma mean_reparam (a : ℝ) {f : ℝ → ℝ} (hf : Continuous f) : + circleMean (fun θ => f (inverseClock a θ)) = + circleMean (fun t => density a t * f t) := by + have hi : Continuous (inverseClock a) := + (inverseClock_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous + have hd : Continuous (density a) := + (density_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous + have hsub := intervalIntegral.integral_comp_mul_deriv + (a := 0) (b := 2 * Real.pi) (f := clock a) (f' := density a) + (g := fun θ => f (inverseClock a θ)) + (fun t _ => hasDerivAt_clock a t) hd.continuousOn (hf.comp hi) + have hend : clock a (2 * Real.pi) = 2 * Real.pi := by + simpa using clock_period a 0 + simp only [Function.comp_apply, inverseClock_clock, clock_zero, hend] at hsub + unfold circleMean + rw [← hsub] + congr 1 + apply intervalIntegral.integral_congr + intro t _ + exact mul_comm _ _ + +lemma mean_reparamX (a : ℝ) : + circleMean (reparamX a) = (1 - a ^ 2 / 2) / (1 + a ^ 2 / 2) := by + exact (mean_reparam a + (arcX_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous).trans (mean_density_arcX a) + +lemma mean_reparamY (a : ℝ) : circleMean (reparamY a) = 0 := by + exact (mean_reparam a + (arcY_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous).trans (mean_density_arcY a) + +/-- The unweighted reparametrized velocity has exactly the required mean. -/ +theorem reparametrized_velocity_means {R v a : ℝ} (hR : 0 < R) (hv : 0 < v) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + circleMean (fun θ => R * reparamX (amplitude R v a) θ) = v ∧ + circleMean (fun θ => R * reparamY (amplitude R v a) θ) = 0 := by + constructor + · rw [circleMean_const_mul] + have h := mean_reparam (amplitude R v a) (f := arcX (amplitude R v a)) + (arcX_smooth.comp (contDiff_const.prodMk contDiff_id)).continuous + change circleMean (reparamX (amplitude R v a)) = _ at h + rw [h, calibrated_mean hR hv hquad] + field_simp + · rw [circleMean_const_mul, mean_reparamY, mul_zero] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityTurns.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityTurns.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8968f45afd7a22f87984a3c9bbbedf6fa56ded7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityTurns.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityAngle + +namespace OAI + +/-! Exact turning positions for the collar arc, including after reparametrization. -/ +noncomputable section + +namespace ClosedSurfaceR4.CollarVelocity + +lemma clock_of_sin_eq_zero (a : ℝ) {t : ℝ} (ht : Real.sin t = 0) : clock a t = t := by + simp [clock, Real.sin_two_mul, ht] + +lemma inverseClock_of_sin_eq_zero (a : ℝ) {t : ℝ} (ht : Real.sin t = 0) : + inverseClock a t = t := by + apply (clock_strictMono a).injective + rw [clock_inverseClock, clock_of_sin_eq_zero a ht] + +lemma sin_inverseClock_eq_zero_iff (a θ : ℝ) : + Real.sin (inverseClock a θ) = 0 ↔ Real.sin θ = 0 := by + constructor + · intro h + have ht := clock_of_sin_eq_zero a h + rw [clock_inverseClock] at ht + rwa [ht] + · intro h + rwa [inverseClock_of_sin_eq_zero a h] + +lemma deriv_angle_eq_zero_iff_sin {a θ : ℝ} (ha : a ≠ 0) : + deriv (angle a) θ = 0 ↔ Real.sin θ = 0 := + (deriv_angle_eq_zero_iff ha).trans (sin_inverseClock_eq_zero_iff a θ) + +/-- There are precisely two turns in one half-open period. -/ +theorem angle_two_turns {a θ : ℝ} (ha : a ≠ 0) (hθ : θ ∈ Set.Ico 0 (2 * Real.pi)) : + deriv (angle a) θ = 0 ↔ θ = 0 ∨ θ = Real.pi := by + rw [deriv_angle_eq_zero_iff_sin ha] + constructor + · intro h + by_cases hp : θ < Real.pi + · left + exact (Real.sin_eq_zero_iff_of_lt_of_lt (by linarith [Real.pi_pos, hθ.1]) hp).mp h + · right + have hs : Real.sin (θ - Real.pi) = 0 := by + simp [Real.sin_sub, h] + have hz := (Real.sin_eq_zero_iff_of_lt_of_lt + (x := θ - Real.pi) (by linarith [Real.pi_pos]) (by linarith [hθ.2])).mp hs + linarith + · rintro (rfl | rfl) <;> simp + +@[simp] lemma angle_zero (a : ℝ) : angle a 0 = 2 * Real.arctan a := by + simp [angle, baseAngle] + +lemma angle_pi (a : ℝ) : angle a Real.pi = -2 * Real.arctan a := by + rw [angle, inverseClock_of_sin_eq_zero a Real.sin_pi] + simp [baseAngle, Real.arctan_neg] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityVector.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityVector.lean new file mode 100644 index 0000000000000000000000000000000000000000..ecd5d3109534e503344247008c86aeda359ce169 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CollarVelocityVector.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityPeriod +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityPlane + +namespace OAI + +/-! The actual collar velocity in an orthonormal frame of the velocity plane. -/ +noncomputable section + +namespace ClosedSurfaceR4.CollarVelocity +open CovarianceCorrector +open VelocityPlane (Space) + +def vectorLoop (e₁ e₂ : Space) (R v a : ℝ) : C(Period, Space) := + ⟨fun t => (R * loopX (amplitude R v a) t) • e₁ + + (R * loopY (amplitude R v a) t) • e₂, + (((loopX (amplitude R v a)).continuous.const_mul R).smul continuous_const).add + (((loopY (amplitude R v a)).continuous.const_mul R).smul continuous_const)⟩ + +lemma vectorLoop_average (e₁ e₂ : Space) {R v a : ℝ} + (hR : 0 < R) (hv : 0 < v) (hquad : R ^ 2 = v ^ 2 + a ^ 2) : + average (vectorLoop e₁ e₂ R v a) = v • e₁ := by + change average (fun t => (R * loopX (amplitude R v a) t) • e₁ + + (R * loopY (amplitude R v a) t) • e₂) = _ + rw [average_add + (f := fun t => (R * loopX (amplitude R v a) t) • e₁) + (g := fun t => (R * loopY (amplitude R v a) t) • e₂) + (((loopX (amplitude R v a)).continuous.const_mul R).smul continuous_const) + (((loopY (amplitude R v a)).continuous.const_mul R).smul continuous_const)] + rw [average_smul_const, average_smul_const] + rw [show average (fun t => R * loopX (amplitude R v a) t) = + R * average (loopX (amplitude R v a)) from average_const_smul R _, + show average (fun t => R * loopY (amplitude R v a) t) = + R * average (loopY (amplitude R v a)) from average_const_smul R _] + rw [average_calibrated_loopX hR hv hquad, average_loopY, mul_zero, zero_smul, add_zero] + congr 1 + field_simp + +lemma vectorLoop_norm_sq {e₁ e₂ : Space} (h₁ : ‖e₁‖ = 1) (h₂ : ‖e₂‖ = 1) + (horth : inner ℝ e₁ e₂ = 0) (R v a : ℝ) (t : Period) : + ‖vectorLoop e₁ e₂ R v a t‖ ^ 2 = R ^ 2 := by + have h₁' : inner ℝ e₁ e₁ = 1 := by rw [real_inner_self_eq_norm_sq, h₁, one_pow] + have h₂' : inner ℝ e₂ e₂ = 1 := by rw [real_inner_self_eq_norm_sq, h₂, one_pow] + have horth' : inner ℝ e₂ e₁ = 0 := (real_inner_comm _ _).trans horth + rw [← real_inner_self_eq_norm_sq] + change inner ℝ ((R * loopX (amplitude R v a) t) • e₁ + + (R * loopY (amplitude R v a) t) • e₂) + ((R * loopX (amplitude R v a) t) • e₁ + + (R * loopY (amplitude R v a) t) • e₂) = _ + simp only [inner_add_left, inner_add_right, real_inner_smul_left, + real_inner_smul_right, h₁', h₂', horth, horth', mul_zero, zero_add, add_zero, mul_one] + calc + _ = R ^ 2 * (loopX (amplitude R v a) t ^ 2 + loopY (amplitude R v a) t ^ 2) := by ring + _ = R ^ 2 := by rw [loop_unit, mul_one] + +lemma vectorLoop_mem (P : Submodule ℝ Space) {e₁ e₂ : Space} + (h₁ : e₁ ∈ P) (h₂ : e₂ ∈ P) (R v a : ℝ) (t : Period) : + vectorLoop e₁ e₂ R v a t ∈ P := + P.add_mem (P.smul_mem _ h₁) (P.smul_mem _ h₂) + +/-- The collar loop gives the exact leading metric required by the primitive addition. -/ +theorem vectorLoop_leading_metric {X Y C e₁ e₂ : Space} {R v a : ℝ} + (h₁ : ‖e₁‖ = 1) (h₂ : ‖e₂‖ = 1) (horth : inner ℝ e₁ e₂ = 0) + (hp₁ : e₁ ∈ VelocityPlane.velocityPlane Y C) + (hp₂ : e₂ ∈ VelocityPlane.velocityPlane Y C) + (hproj : (VelocityPlane.velocityPlane Y C).starProjection X = v • e₁) + (hquad : R ^ 2 = v ^ 2 + a ^ 2) (t : Period) : + ‖X - v • e₁ + vectorLoop e₁ e₂ R v a t‖ ^ 2 = ‖X‖ ^ 2 + a ^ 2 ∧ + inner ℝ (X - v • e₁ + vectorLoop e₁ e₂ R v a t) Y = inner ℝ X Y := by + have hn : ‖(VelocityPlane.velocityPlane Y C).starProjection X‖ ^ 2 = v ^ 2 := by + rw [hproj, norm_smul, h₁, mul_one, Real.norm_eq_abs, sq_abs] + have hm := VelocityPlane.leading_metric (a := a) + (vectorLoop_mem _ hp₁ hp₂ R v a t) + (by rw [vectorLoop_norm_sq h₁ h₂ horth, hn, hquad]) + simpa only [hproj] using hm + +lemma vectorLoop_zero_amplitude (e₁ e₂ : Space) (R v : ℝ) (t : Period) : + vectorLoop e₁ e₂ R v 0 t = R • e₁ := by + simp [vectorLoop, amplitude] + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcJoin.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcJoin.lean new file mode 100644 index 0000000000000000000000000000000000000000..99870d2c926a5139d4edfc7e0917b963c0767834 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcJoin.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcJoin + +namespace OAI + +/-! Joining compact parameterized arcs preserves their precise image and +injectivity when their only shared point is the common endpoint. -/ +noncomputable section +open Set +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {N : Type*} + +theorem joinedCurve_compact_image (γ δ : ℝ → N) (e : ℝ ≃ₜ ℝ) + (he : StrictMono e) {l a d : ℝ} (hla : l ≤ a) (had : e a < d) + (hpoint : γ a = δ (e a)) : + joinedCurve a γ (δ ∘ e) '' Icc l (e.symm d) = + γ '' Icc l a ∪ δ '' Icc (e a) d := by + have haw : a < e.symm d := by + apply he.lt_iff_lt.mp + simpa only [e.apply_symm_apply] using had + apply Set.Subset.antisymm + · rintro y ⟨t,ht,rfl⟩ + by_cases hta : t ≤ a + · exact Or.inl ⟨t,⟨ht.1,hta⟩,by simp only [joinedCurve,ite_eq_left hta]⟩ + · refine Or.inr ⟨e t,⟨he.monotone (le_of_not_ge hta),?_⟩,?_⟩ + · simpa only [e.apply_symm_apply] using he.monotone ht.2 + · simp only [joinedCurve,ite_eq_right hta,Function.comp_apply] + · rintro y (⟨t,ht,rfl⟩ | ⟨t,ht,rfl⟩) + · exact ⟨t,⟨ht.1,ht.2.trans haw.le⟩,by simp only [joinedCurve,ite_eq_left ht.2]⟩ + · have hlow : a ≤ e.symm t := by + apply he.le_iff_le.mp + simpa only [e.apply_symm_apply] using ht.1 + have hhigh : e.symm t ≤ e.symm d := (he.le_iff_le).mp (by simpa using ht.2) + refine ⟨e.symm t,⟨hla.trans hlow,hhigh⟩,?_⟩ + by_cases hta : e.symm t ≤ a + · have hta' : e.symm t = a := le_antisymm hta hlow + have ht' : t = e a := by simpa only [e.apply_symm_apply] using congrArg e hta' + rw [hta',ht'] + simpa only [joinedCurve,le_refl,ite_true] using hpoint + · simp only [joinedCurve,ite_eq_right hta,Function.comp_apply,e.apply_symm_apply] + +theorem joinedCurve_compact_injective (γ δ : ℝ → N) (e : ℝ ≃ₜ ℝ) + (he : StrictMono e) {l a d : ℝ} + (hγ : (Icc l a).InjOn γ) (hδ : (Icc (e a) d).InjOn δ) + (hcross : ∀ s ∈ Icc l a, ∀ t ∈ Ioc (e a) d, γ s ≠ δ t) : + (Icc l (e.symm d)).InjOn (joinedCurve a γ (δ ∘ e)) := by + apply joinedCurve_injective_on + · intro x hx y hy hxy + exact hγ ⟨hx.1.1,hx.2⟩ ⟨hy.1.1,hy.2⟩ hxy + · intro x hx y hy hxy + apply e.injective + apply hδ _ _ hxy + · exact ⟨(he hx.2).le,by simpa only [e.apply_symm_apply] using he.monotone hx.1.2⟩ + · exact ⟨(he hy.2).le,by simpa only [e.apply_symm_apply] using he.monotone hy.1.2⟩ + · intro x hx hxa y hy hay + exact hcross x ⟨hx.1,hxa⟩ (e y) + ⟨he hay,by simpa only [e.apply_symm_apply] using he.monotone hy.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLastIntersection.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLastIntersection.lean new file mode 100644 index 0000000000000000000000000000000000000000..761dabe51cd45c9fab501064237b4a7781788fdc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLastIntersection.lean @@ -0,0 +1,52 @@ +import Mathlib.Topology.Instances.Real.Lemmas +import Mathlib.Topology.Order.Compact +import Mathlib.Topology.ContinuousOn + +namespace OAI + +/-! The last intersection of a compact curve with a closed set leaves a +terminal arc disjoint from that set. No finiteness of intersections is assumed. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem compact_curve_last_intersection {δ : ℝ → X} {c d : ℝ} {K : Set X} + (hcd : c ≤ d) (hδ : ContinuousOn δ (Icc c d)) (hK : IsClosed K) + (hc : δ c ∈ K) (hd : δ d ∉ K) : + ∃ m ∈ Ico c d, δ m ∈ K ∧ ∀ t ∈ Ioc m d, δ t ∉ K := by + let A : Set (Icc c d) := (fun t => δ t.val) ⁻¹' K + have hA : IsCompact A := (hK.preimage hδ.domRestrict).isCompact + have hne : A.Nonempty := ⟨⟨c,left_mem_Icc.mpr hcd⟩,hc⟩ + obtain ⟨m,hm,hmax⟩ := hA.exists_isGreatest hne + have hmd : m.val < d := by + refine lt_of_le_of_ne m.property.2 ?_ + intro he + apply hd + simpa only [A,mem_preimage,he] using hm + refine ⟨m.val,⟨m.property.1,hmd⟩,hm,?_⟩ + intro t ht htK + have htcd : t ∈ Icc c d := ⟨m.property.1.trans ht.1.le,ht.2⟩ + have htm : (⟨t,htcd⟩ : Icc c d) ≤ m := hmax htK + exact (not_le_of_gt ht.1) htm + +theorem compact_arc_last_intersection [T2Space X] {γ δ : ℝ → X} {a b c d : ℝ} + (hab : a ≤ b) (hcd : c ≤ d) (hγ : ContinuousOn γ (Icc a b)) + (hδ : ContinuousOn δ (Icc c d)) (hjoin : δ c = γ b) + (hend : δ d ∉ γ '' Icc a b) : + ∃ s ∈ Icc a b, ∃ m ∈ Ico c d, γ s = δ m ∧ + ∀ u ∈ Icc a s, ∀ v ∈ Ioc m d, γ u ≠ δ v := by + obtain ⟨m,hm,hmK,htail⟩ := compact_curve_last_intersection hcd hδ + (isCompact_Icc.image_of_continuousOn hγ).isClosed + (hjoin ▸ mem_image_of_mem γ (right_mem_Icc.mpr hab)) hend + obtain ⟨s,hs,hsm⟩ := hmK + refine ⟨s,hs,m,hm,hsm,?_⟩ + intro u hu v hv huv + apply htail v hv + exact ⟨u,⟨hu.1,hu.2.trans hs.2⟩,huv⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLocalNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLocalNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba91be9f1820c4bca4ec0989d45230c90bc2bf25 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcLocalNeighborhood.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCompactArc + +namespace OAI + +/-! An embedded compact arc admits source neighborhoods which capture +only parameters in any prescribed open parameter neighborhood. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} + {N : Type*} [TopologicalSpace N] [ChartedSpace H N] [T2Space N] +namespace SmoothCompactArc + +theorem local_neighborhood (P : SmoothCompactArc I N) {t : ℝ} + (ht : t ∈ Icc P.start P.finish) {U : Set ℝ} (hU : IsOpen U) (htU : t ∈ U) + {O : Set N} (hO : IsOpen O) (htO : P.curve t ∈ O) : + ∃ V : Set N, IsOpen V ∧ P.curve t ∈ V ∧ V ⊆ O ∧ + ∀ s ∈ Icc P.start P.finish, P.curve s ∈ V → s ∈ U := by + let A := Icc P.start P.finish \ U + have hA : IsCompact A := isCompact_Icc.diff hU + have hAD : A ⊆ P.domain := fun _ hx => P.interval_subset hx.1 + have hK : IsCompact (P.curve '' A) := hA.image_of_continuousOn (P.smooth.continuousOn.mono hAD) + have htK : P.curve t ∉ P.curve '' A := by + rintro ⟨s,hs,he⟩ + have hst := P.injective hs.1 ht he + exact hs.2 (hst ▸ htU) + refine ⟨O \ (P.curve '' A),hO.sdiff hK.isClosed,⟨htO,htK⟩,sdiff_subset,?_⟩ + intro s hs hsV + by_contra hn + exact hsV.2 ⟨s,⟨hs,hn⟩,rfl⟩ + +end SmoothCompactArc +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcSubdivision.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcSubdivision.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ddd591f9e3524ea239d545988ef8f475055c63e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcSubdivision.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ArcVertexCoordinates +import OAI.Geometry.SurfaceImmersion.Geometry.ConnectedOpenPieces + +namespace OAI + +/-! Subdivide a compact embedded arc at every prescribed finite vertex. +The resulting pieces are connected open sets with frontier in that set. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem subdivide_compact_arc (A : CompactCurveArc X) (V : Set X) (hV : V.Finite) + (hleft : A.map ⟨A.left,le_rfl,A.ordered.le⟩ ∈ V) + (hright : A.map ⟨A.right,A.ordered.le,le_rfl⟩ ∈ V) : + ∃ S : Finset ℝ, + (∀ t : Icc A.left A.right, (t:ℝ) ∈ S ↔ A.map t ∈ V) ∧ + (∀ r ∈ S, A.left ≤ r ∧ r ≤ A.right) ∧ + (∀ x ∈ range A.map, x ∉ V → ∃ u v, + ConsecutiveVertices S u v ∧ x ∈ A.openSubarc u v) ∧ + ∀ u v, ConsecutiveVertices S u v → + IsOpen (A.openSubarc u v) ∧ IsConnected (A.openSubarc u v) ∧ + Disjoint (A.openSubarc u v) V ∧ closure (A.openSubarc u v) \ A.openSubarc u v ⊆ V := by + classical + obtain ⟨S,hS,hbound⟩ := arc_vertex_coordinates A V hV + have hlS : A.left ∈ S := (hS ⟨A.left,le_rfl,A.ordered.le⟩).mpr hleft + have hrS : A.right ∈ S := (hS ⟨A.right,A.ordered.le,le_rfl⟩).mpr hright + refine ⟨S,hS,hbound,?_,?_⟩ + · rintro x ⟨t,rfl⟩ hx + have htS : (t:ℝ) ∉ S := fun ht => hx ((hS t).mp ht) + have hlt : A.left < (t:ℝ) := lt_of_le_of_ne t.property.1 (fun h => htS (h ▸ hlS)) + have htr : (t:ℝ) < A.right := lt_of_le_of_ne t.property.2 (fun h => htS (h.symm ▸ hrS)) + obtain ⟨u,v,huv,hu,hv⟩ := exists_consecutive_interval S htS ⟨A.left,hlS,hlt⟩ ⟨A.right,hrS,htr⟩ + exact ⟨u,v,huv,t,⟨hu,hv⟩,rfl⟩ + · intro u v huv + have hu := hbound u huv.1 + have hv := hbound v huv.2.1 + have hne := huv.2.2.1 + have huV : A.map ⟨u,hu⟩ ∈ V := (hS ⟨u,hu⟩).mp huv.1 + have hvV : A.map ⟨v,hv⟩ ∈ V := (hS ⟨v,hv⟩).mp huv.2.1 + refine ⟨A.openSubarc_open hu.1 hv.2,A.subarc_connected hu.1 hv.2 hne,?_,?_⟩ + · apply disjoint_left.mpr + rintro x ⟨t,ht,rfl⟩ hxV + exact huv.2.2.2 t ((hS t).mpr hxV) ht + · intro x hx + rcases A.subarc_frontier hu.1 hv.2 hne hx.1 hx.2 with he | he + · exact he ▸ huV + · exact he ▸ hvV + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcTimeChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcTimeChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..523adf3323c9488bdcba45047e74cfa5db0547b6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactArcTimeChart.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.JoinTimeCharts +import OAI.Geometry.SurfaceImmersion.Whitney.ArcTimeGermPartition + +namespace OAI + +/-! One actual smooth source chart around the entire compact embedded arc. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] [Nonempty M] + +theorem compact_arc_time_chart (P : SmoothCompactArc planeModel M) + {F : M → ℝ} (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) + (hFP : ∀ t ∈ Icc P.start P.finish, F (P.curve t) = t) : + ∃ c : SurfaceTimeChart F, ∀ t ∈ Icc P.start P.finish, + ∀ᶠ s in 𝓝[Icc P.start P.finish] t, + P.curve s ∈ c.coord.source ∧ c.coord (P.curve s) = ![0,s] := by + obtain ⟨τ,N,hzero,hmono,hbounds,hend,hcharts⟩ := arc_time_chart_germ_partition P hF hFP + have hγ : ∀ t ∈ Icc P.start P.finish, ContinuousAt P.curve t := by + intro t ht + exact (P.smooth.contMDiffAt (P.domain_open.mem_nhds (P.interval_subset ht))).continuousAt + have hstep : ∀ n : ℕ, ∃ c : SurfaceTimeChart F, + ∀ t ∈ Icc P.start (τ n), ∀ᶠ s in 𝓝[Icc P.start P.finish] t, + P.curve s ∈ c.coord.source ∧ c.coord (P.curve s) = ![0,s] := by + intro n + induction n with + | zero => + obtain ⟨c,hc⟩ := hcharts 0 + refine ⟨c,?_⟩ + intro t ht + have ht0 : t = P.start := le_antisymm (ht.2.trans_eq hzero) ht.1 + apply hc t + constructor + · rw [ht0,hzero] + · rw [ht0] + exact (hbounds 1).1 + | succ n ih => + obtain ⟨c,hc⟩ := ih + obtain ⟨d,hd⟩ := hcharts n + by_cases hn : τ n = P.start + · refine ⟨d,?_⟩ + intro t ht + exact hd t ⟨hn.symm ▸ ht.1,ht.2⟩ + · by_cases heq : τ (n+1) = τ n + · refine ⟨c,?_⟩ + intro t ht + exact hc t ⟨ht.1,heq ▸ ht.2⟩ + · have hsn : P.start < τ n := lt_of_le_of_ne (hbounds n).1 (Ne.symm hn) + have hns : τ n < τ (n+1) := lt_of_le_of_ne (hmono (Nat.le_succ n)) (Ne.symm heq) + apply join_time_charts hF hsn hns + (fun t ht => hγ t ⟨ht.1,ht.2.trans (hbounds (n+1)).2⟩) + (Icc_mem_nhds hsn (hns.trans_le (hbounds (n+1)).2)) + (fun t ht => ⟨ht.1,ht.2.trans (hbounds (n+1)).2⟩) c d hc hd + obtain ⟨c,hc⟩ := hstep N + refine ⟨c,?_⟩ + intro t ht + apply hc t + rwa [hend N le_rfl] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCleanPairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCleanPairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..8059008d49113eddba8c97977fc37b4deba0c344 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCleanPairRegularization.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UncleanPairPatchCover +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteCleanPairRegularization + +namespace OAI + +/-! Relative transversality on compact pair sets, including sets that +meet the frozen crosscap neighborhoods. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M ι ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] [Fintype ν] + +theorem compact_relative_clean_pair_regularization + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) (hne : ∀ z ∈ K, z.1 ≠ z.2) + (S : Set M) (hS : S.Finite) + (c : ν → M) (Q : ν → Set Base) (hQ : ∀ j, IsCompact (Q j)) + (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (B : Set M) (hB : IsCompact B) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hAreg : ∀ z ∈ K, (∃ i, z.1 ∈ A i ∧ z.2 ∈ A i) → z ∈ cleanSurfacePairs f S) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + K ⊆ cleanSurfacePairs g S := by + obtain ⟨P,T,s,J,hT,hPA,hJ,hJreg,hcover⟩ := unclean_pair_patch_cover A hA hdis hK hne S hS hf hAreg + obtain ⟨g,hg,hfg,hclose,hD,hI,hJg,hgood⟩ := finite_surface_pair_clean_relative + (fun z : {z : M × M // z ∈ K ∧ z ∉ cleanSurfacePairs f S} => z.val.1) + (fun z : {z : M × M // z ∈ K ∧ z ∉ cleanSurfacePairs f S} => z.val.2) P T + (fun z => (hT z).1) (fun z => (hT z).2) A hPA S hS J hJ c Q hQ hQT s B hB hf hIf + hJreg hε + refine ⟨g,hg,hfg,hclose,hD,hI,?_⟩ + intro z hz + rcases hcover hz with hz | hz + · exact hJg hz + · obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp hz + exact hgood i hi hzi + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1dd1853c448b42fb21a331e8d24a0dd4b45489d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarJet.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.HomotopyCollarDerivative + +namespace OAI + +/-! Uniform injectivity of collar jets near a compact family of + transverse axis frames. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem compact_collar_jet {c : ℝ → W} {V : ℝ × ℝ → W} + (hc : ContDiff ℝ ∞ c) (hV : ContDiff ℝ ∞ V) {K : Set (ℝ × ℝ)} + (hK : IsCompact K) + (hI : ∀ z ∈ K, Function.Injective (homotopyCollarJet c V z.1 z.2 0 0)) : + ∃ δ : ℝ, 0 < δ ∧ ∀ z ∈ K, ∀ u w : ℝ, |u| < δ → |w| < δ → + Function.Injective (homotopyCollarJet c V z.1 z.2 u w) := by + let O : Set ((ℝ × ℝ) × Base) := {z | Function.Injective + (homotopyCollarJet c V z.1.1 z.1.2 (z.2 0) (z.2 1))} + have hO : IsOpen O := ContinuousLinearMap.isOpen_injective.preimage + (homotopyCollarJet_continuous hc hV) + have haxis : K ×ˢ ({0} : Set Base) ⊆ O := by + rintro ⟨z,x⟩ ⟨hz,hx⟩ + obtain rfl : x = 0 := hx + exact hI z hz + obtain ⟨U,B,hU,hB,hKU,h0B,hUB⟩ := generalized_tube_lemma hK isCompact_singleton hO haxis + obtain ⟨δ,hδ,hball⟩ := Metric.isOpen_iff.mp hB 0 (h0B (by simp)) + refine ⟨δ,hδ,?_⟩ + intro z hz u w hu hw + have hn : ‖(![u,w] : Base)‖ < δ := by + apply (pi_norm_lt_iff hδ).mpr + intro i + fin_cases i + · change |u| < δ + exact hu + · change |w| < δ + exact hw + have hm : (![u,w] : Base) ∈ B := hball (by simpa only [mem_ball,dist_zero_right] using hn) + have hzO : (z,(![u,w] : Base)) ∈ O := hUB ⟨hKU hz,hm⟩ + exact hzO + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarPositivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarPositivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..16c580362ac9fba41f9b4a54e68199bb053151ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCollarPositivity.lean @@ -0,0 +1,78 @@ +import Mathlib + +namespace OAI + +/-! Strict inequalities on a compact curve set propagate to a collar, +uniformly in a compact angular parameter. -/ +noncomputable section +open Set +open scoped Topology + +namespace ClosedSurfaceR4.CollarVelocity + +variable {E A : Type*} [TopologicalSpace E] [T2Space E] + [TopologicalSpace A] + +theorem compact_collar_positive {K C Ω : Set E} {J : Set A} + (hK : IsCompact K) (hC : IsClosed C) (hΩ : IsOpen Ω) (hKΩ : K ⊆ Ω) + (hJ : IsCompact J) {F : E × A → ℝ} (hF : ContinuousOn F (Ω ×ˢ univ)) + (hpos : ∀ x ∈ K ∩ C, ∀ t ∈ J, 0 < F (x, t)) : + ∃ W : Set E, IsOpen W ∧ C ⊆ W ∧ + ∀ x ∈ K ∩ W, ∀ t ∈ J, 0 < F (x, t) := by + let O : Set (E × A) := (Ω ×ˢ univ) ∩ F ⁻¹' Ioi 0 + have hO : IsOpen O := hF.isOpen_inter_preimage (hΩ.prod isOpen_univ) isOpen_Ioi + have hKC : IsCompact (K ∩ C) := hK.inter_right hC + have hsub : (K ∩ C) ×ˢ J ⊆ O := by + intro z hz + exact ⟨⟨hKΩ hz.1.1, mem_univ _⟩, hpos z.1 hz.1 z.2 hz.2⟩ + obtain ⟨N, V, hN, _, hKN, hJV, hNV⟩ := generalized_tube_lemma hKC hJ hO hsub + let W := (K \ N)ᶜ + have hW : IsOpen W := (hK.isClosed.sdiff hN).isOpen_compl + refine ⟨W, hW, ?_, ?_⟩ + · intro x hx hbad + exact hbad.2 (hKN ⟨hbad.1, hx⟩) + · intro x hx t ht + have hxN : x ∈ N := by + by_contra hn + exact hx.2 ⟨hx.1, hn⟩ + exact (hNV ⟨hxN, hJV ht⟩).2 + +/-- The collar and allowed translation size are chosen before the eventual +angle translation function or its derivatives. -/ +theorem compact_collar_positive_small_shift {K C Ω : Set E} {J : Set A} + (hK : IsCompact K) (hC : IsClosed C) (hΩ : IsOpen Ω) (hKΩ : K ⊆ Ω) + (hJ : IsCompact J) {F : E × (A × ℝ) → ℝ} + (hF : ContinuousOn F (Ω ×ˢ univ)) + (hpos : ∀ x ∈ K ∩ C, ∀ t ∈ J, 0 < F (x, (t, 0))) : + ∃ W : Set E, IsOpen W ∧ C ⊆ W ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ x ∈ K ∩ W, ∀ t ∈ J, ∀ h : ℝ, |h| < ε → 0 < F (x, (t, h)) := by + let O : Set (E × (A × ℝ)) := (Ω ×ˢ univ) ∩ F ⁻¹' Ioi 0 + have hO : IsOpen O := hF.isOpen_inter_preimage (hΩ.prod isOpen_univ) isOpen_Ioi + have hKC : IsCompact (K ∩ C) := hK.inter_right hC + have hsub : (K ∩ C) ×ˢ (J ×ˢ ({0} : Set ℝ)) ⊆ O := by + intro z hz + have h0 : z.2.2 = 0 := hz.2.2 + refine ⟨⟨hKΩ hz.1.1, mem_univ _⟩, ?_⟩ + rw [show z = (z.1, (z.2.1, 0)) from Prod.ext rfl (Prod.ext rfl h0)] + exact hpos z.1 hz.1 z.2.1 hz.2.1 + obtain ⟨N, V, hN, hV, hKN, hJV, hNV⟩ := + generalized_tube_lemma hKC (hJ.prod isCompact_singleton) hO hsub + obtain ⟨A₀, I, _, hI, hJA, h0I, hAI⟩ := + generalized_tube_lemma hJ isCompact_singleton hV hJV + obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.mp hI 0 (h0I (mem_singleton 0)) + let W := (K \ N)ᶜ + refine ⟨W, (hK.isClosed.sdiff hN).isOpen_compl, ?_, ε, hε, ?_⟩ + · intro x hx hbad + exact hbad.2 (hKN ⟨hbad.1, hx⟩) + · intro x hx t ht h hh + have hxN : x ∈ N := by + by_contra hn + exact hx.2 ⟨hx.1, hn⟩ + have hhI : h ∈ I := hball (by simpa [Metric.mem_ball, Real.dist_eq] using hh) + exact (hNV ⟨hxN, hAI ⟨hJA ht, hhI⟩⟩).2 + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCrosscapIsolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCrosscapIsolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bd02927dfa6e2bcb862ca730130a58e8871277a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCrosscapIsolation.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactFixedJet +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapKernelCapture + +namespace OAI + +/-! A compact smooth family with one fixed nondegenerate direction jet +has a common neighborhood containing no other singularities. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem compact_crosscap_isolation {K : Set ℝ} (hK : IsCompact K) + (F : ℝ → Base → ProjectionTarget 3) + (hF : ∀ t ∈ K, ContDiff ℝ ∞ (F t)) + (hD : Continuous (fun z : ℝ × Base => fderiv ℝ (F z.1) z.2)) + (hJ : Continuous (fun z : ℝ × (Base × ℝ) => + fderiv ℝ (surfaceDirection (F z.1) true) z.2)) + (p : Base) (D : Base →L[ℝ] ProjectionTarget 3) + (J : (Base × ℝ) →L[ℝ] ProjectionTarget 3) + (hfixD : ∀ t ∈ K, fderiv ℝ (F t) p = D) + (hfixJ : ∀ t ∈ K, fderiv ℝ (surfaceDirection (F t) true) (p,0) = J) + (hzero : D (![0,1] : Base) = 0) + (htrans : D (![1,0] : Base) ≠ 0) (hreg : Function.Bijective J) : + ∃ r : ℝ, 0 < r ∧ ∀ t ∈ K, ∀ x ∈ ball p r, + (¬ Function.Injective (fderiv ℝ (F t) x) ↔ x = p) := by + let L := ContinuousLinearEquiv.ofBijective J + (LinearMap.ker_eq_bot.mpr hreg.1) (LinearMap.range_eq_top.mpr hreg.2) + obtain ⟨r₀,hr₀,hinj⟩ := compact_fixed_jet_injectivity hK + (fun t => surfaceDirection (F t) true) (fun t ht => surfaceDirection_smooth (hF t ht) true) + hJ (p,0) L hfixJ + obtain ⟨ε,hε,hcapture⟩ := kernel_capture_near D true 0 + (by simpa [tangentRay] using hzero) (by simpa [tangentRayVelocity] using htrans) + (half_pos hr₀) + obtain ⟨U,hU,hpU,hnear⟩ := compact_fixed_value_neighborhood hK hD p D hfixD hε + obtain ⟨s,hs,hsU⟩ := Metric.isOpen_iff.mp hU p hpU + let r := min s (r₀/2) + have hr : 0 < r := lt_min hs (half_pos hr₀) + refine ⟨r,hr,?_⟩ + intro t ht x hx + have hzt : surfaceDirection (F t) true (p,0) = 0 := by + simpa only [surfaceDirection,hfixD t ht,tangentRay,ite_true,zero_smul,zero_add] using hzero + constructor + · intro hbad + have hclose : ‖fderiv ℝ (F t) x-D‖ < ε := by + simpa only [dist_eq_norm] using hnear t ht x + (hsU (ball_subset_ball (min_le_left _ _) hx)) + obtain ⟨v,hv,hker⟩ := hcapture _ hclose hbad + have hball : (x,v) ∈ ball (p,(0:ℝ)) r₀ := by + rw [mem_ball,dist_eq_norm,Prod.norm_def] + apply max_lt + · exact (mem_ball.mp hx).trans_le (min_le_right _ _) |>.trans (half_lt_self hr₀) + · simpa only [Prod.snd_sub,sub_zero,Real.norm_eq_abs] using hv.trans (half_lt_self hr₀) + exact congrArg Prod.fst (hinj t ht hball (mem_ball_self hr₀) (hker.trans hzt.symm)) + · intro heq hi + subst x + have hz : fderiv ℝ (F t) p (![0,1] : Base) = fderiv ℝ (F t) p 0 := by + rw [hfixD t ht,map_zero] + exact hzero + have hh := congrFun (hi hz) 1 + norm_num at hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCurveArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCurveArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..cad715870085615f4dfcad031853826b82a76f0b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactCurveArc.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MatchedSubsetChart + +namespace OAI + +/-! Compact embedded arcs with open interior, used to reduce the +compact one-dimensional curve to finitely many interval pieces. -/ +noncomputable section +open Set Filter Metric Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable (X : Type*) [TopologicalSpace X] + +structure CompactCurveArc where + left : ℝ + right : ℝ + ordered : left < right + map : Icc left right → X + embedding : IsClosedEmbedding map + interior_open : IsOpen (map '' {t | left < (t:ℝ) ∧ (t:ℝ) < right}) + +variable {X} [T2Space X] + +theorem line_chart_compact_arc_data (c : OpenPartialHomeomorph X ℝ) {p : X} + (hp : p ∈ c.source) : + ∃ (A : CompactCurveArc X) (V : Set X), IsOpen V ∧ p ∈ V ∧ V ⊆ range A.map ∧ + ∃ t : Icc A.left A.right, A.left < (t:ℝ) ∧ (t:ℝ) < A.right ∧ A.map t = p ∧ + V = A.map '' {u | A.left < (u:ℝ) ∧ (u:ℝ) < A.right} ∧ V ⊆ c.source := by + obtain ⟨r,hr,hrt⟩ := nhds_basis_closedBall.mem_iff.mp (c.open_target.mem_nhds (c.map_source hp)) + let a := c p-r + let b := c p+r + have hab : a < b := by dsimp [a,b]; linarith + have hinterval : Icc a b ⊆ c.target := by + intro t ht + apply hrt + rw [mem_closedBall,Real.dist_eq,abs_le] + constructor <;> dsimp [a,b] at ht <;> linarith [ht.1,ht.2] + let γ : Icc a b → X := fun t => c.symm t + have hγcont : Continuous γ := by + apply continuous_iff_continuousAt.mpr + intro t + exact (c.symm.continuousAt (hinterval t.property)).comp continuous_subtype_val.continuousAt + have hγinj : Function.Injective γ := by + intro s t hst + exact Subtype.ext (c.symm.injOn (hinterval s.property) (hinterval t.property) hst) + have heq : γ '' {t | a < (t:ℝ) ∧ (t:ℝ) < b} = c.symm '' Ioo a b := by + ext z + constructor + · rintro ⟨t,ht,rfl⟩ + exact ⟨t,ht,rfl⟩ + · rintro ⟨t,ht,rfl⟩ + exact ⟨⟨t,ht.1.le,ht.2.le⟩,ht,rfl⟩ + have hV : IsOpen (c.symm '' Ioo a b) := + c.isOpen_image_symm_of_subset_target isOpen_Ioo (fun _ ht => hinterval ⟨ht.1.le,ht.2.le⟩) + let A : CompactCurveArc X := ⟨a,b,hab,γ,hγcont.isClosedEmbedding hγinj,by rw [heq]; exact hV⟩ + refine ⟨A,c.symm '' Ioo a b,hV,?_,?_,?_⟩ + · refine ⟨c p,?_,c.left_inv hp⟩ + constructor <;> dsimp [a,b] <;> linarith + · rintro z ⟨t,ht,rfl⟩ + exact ⟨⟨t,ht.1.le,ht.2.le⟩,rfl⟩ + + · have ht : a < c p ∧ c p < b := by constructor <;> dsimp [a,b] <;> linarith + refine ⟨⟨c p,ht.1.le,ht.2.le⟩,ht.1,ht.2,c.left_inv hp,heq.symm,?_⟩ + rintro z ⟨u,hu,rfl⟩ + exact c.map_target (hinterval ⟨hu.1.le,hu.2.le⟩) + +theorem line_chart_compact_arc (c : OpenPartialHomeomorph X ℝ) {p : X} + (hp : p ∈ c.source) : + ∃ (A : CompactCurveArc X) (V : Set X), IsOpen V ∧ p ∈ V ∧ V ⊆ range A.map := by + obtain ⟨A,V,hV,hpV,hAV,_⟩ := line_chart_compact_arc_data c hp + exact ⟨A,V,hV,hpV,hAV⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactDoublePairs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactDoublePairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8229dc803b7929fe59853b54ee82337e628059b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactDoublePairs.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ImmersionLocalInjectivity + +namespace OAI + +/-! The compactification of the double-pair locus can meet the diagonal +only at singular points. Removing open crosscap neighborhoods leaves a +compact set of genuine distinct double pairs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def surfaceDoublePairs (f : M → ProjectionTarget 3) : Set (M × M) := + {z | z.1 ≠ z.2 ∧ f z.1 = f z.2} + +lemma doublePairs_closure_diagonal_singular {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) (p : M) + (hp : (p,p) ∈ closure (surfaceDoublePairs f)) : + ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) := by + intro hreg + obtain ⟨U,hU,hpU,hI⟩ := surface_immersion_local_injective hf p hreg + obtain ⟨z,hzU,hzD⟩ := (_root_.mem_closure_iff.mp hp) (U ×ˢ U) (hU.prod hU) ⟨hpU,hpU⟩ + exact hzD.1 (hI hzU.1 hzU.2 hzD.2) + +omit [ChartedSpace Plane M] [IsManifold planeModel ∞ M] in +lemma doublePairs_closure_equal {f : M → ProjectionTarget 3} + (hf : Continuous f) : closure (surfaceDoublePairs f) ⊆ {z | f z.1 = f z.2} := + closure_minimal (fun _ hz => hz.2) + (isClosed_eq (hf.comp continuous_fst) (hf.comp continuous_snd)) + +theorem compact_doublePairs_exterior [CompactSpace M] {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {ι : Type*} (U : ι → Set M) (hU : ∀ i, IsOpen (U i)) + (hcover : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ i, p ∈ U i) : + IsCompact (closure (surfaceDoublePairs f) \ ⋃ i, U i ×ˢ U i) ∧ + closure (surfaceDoublePairs f) \ (⋃ i, U i ×ˢ U i) ⊆ surfaceDoublePairs f := by + refine ⟨isClosed_closure.isCompact.diff (isOpen_iUnion fun i => (hU i).prod (hU i)),?_⟩ + intro z hz + refine ⟨?_,doublePairs_closure_equal hf.continuous hz.1⟩ + intro heq + have hzdiag : (z.1,z.1) ∈ closure (surfaceDoublePairs f) := by + have he : (z.1,z.1) = z := Prod.ext rfl heq + rw [he] + exact hz.1 + obtain ⟨i,hi⟩ := hcover z.1 (doublePairs_closure_diagonal_singular hf z.1 hzdiag) + apply hz.2 + exact mem_iUnion.mpr ⟨i,hi,heq ▸ hi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactExactCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactExactCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..abb91866e7a936c4c355443b13922d780cadb743 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactExactCollar.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ExactRegularCollar + +namespace OAI + +/-! Stationary longitudinal ends turn exact collar interpolation into +an actual compactly supported replacement. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem compact_exact_collar {f g : Base → W} {V : ℝ × ℝ → W} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (hV : ContDiff ℝ ∞ V) + (hc : ∀ t, f (crosscapAxis t) = g (crosscapAxis t)) + (hV0 : ∀ t, V (0,t) = axisTransverse f t) + (hV1 : ∀ t, V (1,t) = axisTransverse g t) + {a b R : ℝ} (hR : 0 < R) + (hI : ∀ s ∈ Icc (0:ℝ) 1, ∀ t ∈ Icc a b, + Function.Injective (homotopyCollarJet (axisValue f) V s t 0 0)) + (hstation : ∀ x : Base, x 1 ∉ Ioo a b → g x = f x ∧ + ∀ s ∈ Icc (0:ℝ) 1, V (s,x 1) = axisTransverse f (x 1)) : + ∃ (r : ℝ) (F : Base → W) (K : Set Base), + 0 < r ∧ r < R ∧ ContDiff ℝ ∞ F ∧ IsCompact K ∧ + K ⊆ {x | |x 0| ≤ r/2 ∧ x 1 ∈ Icc a b} ∧ + (∀ x ∉ K, F =ᶠ[𝓝 x] f) ∧ + (∀ u : ℝ, |u| < r → ∀ t ∈ Icc a b, + Function.Injective (fderiv ℝ F ![u,t])) ∧ + ∀ t, F =ᶠ[𝓝 (crosscapAxis t)] g := by + obtain ⟨r,F,hr,hrR,hF,hFI,hinner,hstationF,houter⟩ := + exact_regular_collar hf hg hV hc hV0 hV1 hR hI + let K : Set Base := Icc (![(-r/2),a] : Base) ![r/2,b] + have hK : IsCompact K := isCompact_Icc + have hKs : K ⊆ {x | |x 0| ≤ r/2 ∧ x 1 ∈ Icc a b} := by + intro x hx + exact ⟨abs_le.mpr ⟨by simpa only [Matrix.cons_val_zero,neg_div] using hx.1 0, + by simpa only [Matrix.cons_val_zero] using hx.2 0⟩, + by simpa only [Matrix.cons_val_one,Matrix.cons_val_zero] using hx.1 1, + by simpa only [Matrix.cons_val_one,Matrix.cons_val_zero] using hx.2 1⟩ + have hsupp : tsupport (F-f) ⊆ K := by + apply closure_minimal _ isClosed_Icc + intro x hx + have hneq : F x ≠ f x := by simpa only [Function.mem_support,Pi.sub_apply,sub_ne_zero] using hx + have ht : x 1 ∈ Ioo a b := by + by_contra ht + exact hneq (hstationF x (hstation x ht).1 (hstation x ht).2) + have hu : |x 0| ≤ r/2 := le_of_not_gt fun hu => hneq (houter x hu).self_of_nhds + constructor + · intro i + fin_cases i + · change -r/2 ≤ x 0 + simpa only [neg_div] using (abs_le.mp hu).1 + · change a ≤ x 1 + exact ht.1.le + · intro i + fin_cases i + · change x 0 ≤ r/2 + exact (abs_le.mp hu).2 + · change x 1 ≤ b + exact ht.2.le + refine ⟨r,F,K,hr,hrR,hF,hK,hKs,?_,hFI,hinner⟩ + intro x hx + have he := notMem_tsupport_iff_eventuallyEq.mp (fun hm => hx (hsupp hm)) + filter_upwards [he] with y hy + exact sub_eq_zero.mp hy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactFramedCurveTube.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactFramedCurveTube.lean new file mode 100644 index 0000000000000000000000000000000000000000..113fbd3a8d8ccc3e642833f9ae38b7db70c5f7d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactFramedCurveTube.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FramedCurveTube +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! Uniform transverse width for the explicit target tube along a compact +regular segment of a smooth curve. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance compactTubeNormed : NormedAddCommGroup (Base × ℝ) := inferInstance +local instance compactTubeSpace : NormedSpace ℝ (Base × ℝ) := inferInstance + +lemma framedCurveTube_regular_neighborhood {c : ℝ → (Fin 3 → ℝ)} + (hc : ContDiff ℝ ∞ c) {a : Fin 3 → ℝ} + (ha : ∀ t r : ℝ, r • deriv c t ≠ a) {K : Set ℝ} + (hK : IsCompact K) (hreg : ∀ t ∈ K, deriv c t ≠ 0) : + ∃ (r : ℝ) (U : Set ℝ), 0 < r ∧ IsOpen U ∧ K ⊆ U ∧ + ∀ x : Base, ‖x‖ < r → ∀ t ∈ U, + Function.Bijective (fderiv ℝ (framedCurveTube c a) (x,t)) := by + by_cases hne : K.Nonempty + · obtain ⟨t₀,ht₀⟩ := hne + have hR := framedCurveTube_regular_axis hc ha t₀ (hreg t₀ ht₀) + let R : (Base × ℝ) ≃L[ℝ] (Fin 3 → ℝ) := + ContinuousLinearEquiv.ofBijective (fderiv ℝ (framedCurveTube c a) (0,t₀)) + (LinearMap.ker_eq_bot.mpr hR.1) (LinearMap.range_eq_top.mpr hR.2) + let W : Set (Base × ℝ) := + {z | IsUnit (R.symm.toContinuousLinearMap.comp (fderiv ℝ (framedCurveTube c a) z))} + have hcont : Continuous (fun z => + R.symm.toContinuousLinearMap.comp (fderiv ℝ (framedCurveTube c a) z)) := + continuous_const.clm_comp ((framedCurveTube_smooth hc a).continuous_fderiv (by simp)) + have hW : IsOpen W := Units.isOpen.preimage hcont + have haxis : ({0} : Set Base) ×ˢ K ⊆ W := by + rintro ⟨x,t⟩ ⟨hx,ht⟩ + obtain rfl : x = 0 := hx + apply ContinuousLinearMap.isUnit_iff_bijective.mpr + exact R.symm.bijective.comp (framedCurveTube_regular_axis hc ha t (hreg t ht)) + obtain ⟨V,U,hV,hU,h0V,hKU,hVU⟩ := + generalized_tube_lemma isCompact_singleton hK hW haxis + obtain ⟨r,hr,hball⟩ := Metric.isOpen_iff.mp hV 0 (h0V (by simp)) + refine ⟨r,U,hr,hU,hKU,?_⟩ + intro x hx t ht + have hxV : x ∈ V := hball (by simpa [dist_zero_right] using hx) + have hunit : IsUnit (R.symm.toContinuousLinearMap.comp + (fderiv ℝ (framedCurveTube c a) (x,t))) := hVU ⟨hxV,ht⟩ + have hbij := ContinuousLinearMap.isUnit_iff_bijective.mp hunit + have heq : (R : (Base × ℝ) → (Fin 3 → ℝ)) ∘ + (R.symm.toContinuousLinearMap.comp (fderiv ℝ (framedCurveTube c a) (x,t))) = + fderiv ℝ (framedCurveTube c a) (x,t) := by + funext v + exact R.apply_symm_apply _ + rw [← heq] + exact R.bijective.comp hbij + · refine ⟨1,∅,by norm_num,isOpen_empty,?_,?_⟩ + · simpa only [not_nonempty_iff_eq_empty.mp hne] using (empty_subset (∅ : Set ℝ)) + · intro x hx t ht + exact ht.elim + +theorem exists_framed_curve_tube {c : ℝ → (Fin 3 → ℝ)} + (hc : ContDiff ℝ ∞ c) {K : Set ℝ} (hK : IsCompact K) + (hreg : ∀ t ∈ K, deriv c t ≠ 0) : + ∃ (a : Fin 3 → ℝ) (r : ℝ) (U : Set ℝ), + 0 < r ∧ IsOpen U ∧ K ⊆ U ∧ + ContDiff ℝ ∞ (framedCurveTube c a) ∧ + (∀ t, framedCurveTube c a (0,t) = c t) ∧ + ∀ x : Base, ‖x‖ < r → ∀ t ∈ U, + Function.Bijective (fderiv ℝ (framedCurveTube c a) (x,t)) := by + obtain ⟨a,ha⟩ := exists_curve_transverse_vector (deriv c) (contDiff_infty_iff_deriv.mp hc).2 + obtain ⟨r,U,hr,hU,hKU,hI⟩ := framedCurveTube_regular_neighborhood hc ha hK hreg + refine ⟨a,r,U,hr,hU,hKU,framedCurveTube_smooth hc a,?_,hI⟩ + intro t + simp [framedCurveTube] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairC1Regularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairC1Regularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb33aaa42166d28a898e6423de812d9f05449e4b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairC1Regularization.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FinitePairC1Regularization + +namespace OAI + +/-! Regularize any compact collection of distinct pairs outside the +frozen diagonal squares, while keeping the map uniformly close and +unchanged up to translations near the frozen closed sets. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] [Fintype ν] + +theorem compact_pair_C1_regularization + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) + (hne : ∀ z ∈ K, z.1 ≠ z.2) + (hout : ∀ z ∈ K, ∀ i, ¬ (z.1 ∈ A i ∧ z.2 ∈ A i)) + (c : ν → M) (Q : ν → Set JetPolynomial.Base) + (hQ : ∀ j, IsCompact (Q j)) (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (B : Set M) (hB : IsCompact B) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + obtain ⟨P,T,s,hT,hcover,hPA⟩ := finite_pair_patch_cover A hA hdis hK hne hout + obtain ⟨g,hg,hfg,hclose,hD,hI,hgood⟩ := finite_surface_pair_regularization_C1 + (fun z : K => z.val.1) (fun z : K => z.val.2) P T + (fun z => (hT z).1) (fun z x hx => ((hT z).2 hx).2) A hPA c Q hQ hQT s B hB hf hIf hε + refine ⟨g,hg,hfg,hclose,hD,hI,?_⟩ + intro z hz + obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp (hcover hz) + exact hgood i hi z hzi + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d86772a300e63611f26bfb01e814b9a41e8584f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactPairRegularization.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteSurfacePairRegularization + +namespace OAI + +/-! Regularize any compact collection of distinct pairs outside the +frozen diagonal squares, while keeping the map uniformly close and +unchanged up to translations near the frozen closed sets. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] + +theorem compact_pair_regularization + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) + (hne : ∀ z ∈ K, z.1 ≠ z.2) + (hout : ∀ z ∈ K, ∀ i, ¬ (z.1 ∈ A i ∧ z.2 ∈ A i)) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + obtain ⟨P,T,s,hT,hcover,hPA⟩ := finite_pair_patch_cover A hA hdis hK hne hout + obtain ⟨g,hg,hfg,hclose,hgood⟩ := finite_surface_pair_regularization + (fun z : K => z.val.1) (fun z : K => z.val.2) P T + (fun z => (hT z).1) (fun z x hx => ((hT z).2 hx).2) A hPA s hf hε + refine ⟨g,hg,hfg,hclose,?_⟩ + intro z hz + obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp (hcover hz) + exact hgood i hi z hzi + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactRelativePairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactRelativePairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..ddbfae88274ae99f7ea4f16a613232dcb27c87e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactRelativePairRegularization.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BadPairPatchCover +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairRelativeRegularization + +namespace OAI + +/-! Relative transversality on compact pair sets, including sets that +meet the frozen crosscap neighborhoods. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M ι ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] [Fintype ν] + +theorem compact_relative_pair_regularization + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + {K : Set (M × M)} (hK : IsCompact K) (hne : ∀ z ∈ K, z.1 ≠ z.2) + (c : ν → M) (Q : ν → Set Base) (hQ : ∀ j, IsCompact (Q j)) + (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (B : Set M) (hB : IsCompact B) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hAreg : ∀ z ∈ K, (∃ i, z.1 ∈ A i ∧ z.2 ∈ A i) → z ∈ regularSurfacePairs f) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + obtain ⟨P,T,s,J,hT,hPA,hJ,hJreg,hcover⟩ := bad_pair_patch_cover A hA hdis hK hne hf hAreg + obtain ⟨g,hg,hfg,hclose,hD,hI,hJg,hgood⟩ := finite_surface_pair_regularization_relative + (fun z : {z : M × M // z ∈ K ∧ z ∉ regularSurfacePairs f} => z.val.1) + (fun z : {z : M × M // z ∈ K ∧ z ∉ regularSurfacePairs f} => z.val.2) P T + (fun z => (hT z).1) (fun z => (hT z).2) A hPA J hJ c Q hQ hQT s B hB hf hIf + (fun z hz he => (hJreg hz).resolve_left (not_not.mpr he)) hε + refine ⟨g,hg,hfg,hclose,hD,hI,?_⟩ + intro z hz he + rcases hcover hz with hz | hz + · exact hJg z hz he + · obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp hz + exact hgood i hi z hzi he + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactSurfacePairStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactSurfacePairStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..40dede1e20d8282cf15ae38e54ae68bc195c8a93 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactSurfacePairStability.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartPairStability +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative + +namespace OAI + +/-! Compact stability of actual surface double-point transversality +under a fixed smooth scalar-weighted translation. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem compact_surface_pair_stability + {f : M → ProjectionTarget 3} {χ : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + {K : Set (M × M)} (hK : IsCompact K) + (hreg : ∀ z ∈ K, f z.1 = f z.2 → Function.Surjective (surfacePairDerivative f z.1 z.2)) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ z ∈ K, + surfaceTranslation f χ a z.1 = surfaceTranslation f χ a z.2 → + Function.Surjective (surfacePairDerivative (surfaceTranslation f χ a) z.1 z.2) := by + classical + have hlocal (z : K) : ∃ (W : Set (M × M)) (δ : ℝ), IsOpen W ∧ (z : M × M) ∈ W ∧ + 0 < δ ∧ ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ w ∈ K ∩ W, + surfaceTranslation f χ a w.1 = surfaceTranslation f χ a w.2 → + Function.Surjective (surfacePairDerivative (surfaceTranslation f χ a) w.1 w.2) := by + obtain ⟨U₁,F,hU₁,hxU₁,hU₁s,hF,heF⟩ := surface_chart_representative hf z.val.1 + obtain ⟨U₂,ρ,hU₂,hxU₂,hU₂s,hρ,heρ⟩ := scalar_surface_chart_representative hχ z.val.1 + obtain ⟨V₁,G,hV₁,hyV₁,hV₁s,hG,heG⟩ := surface_chart_representative hf z.val.2 + obtain ⟨V₂,σ,hV₂,hyV₂,hV₂s,hσ,heσ⟩ := scalar_surface_chart_representative hχ z.val.2 + let U := U₁ ∩ U₂ + let V := V₁ ∩ V₂ + have hU : IsOpen U := hU₁.inter hU₂ + have hV : IsOpen V := hV₁.inter hV₂ + obtain ⟨T,hT,hzT,hTUV⟩ := exists_compact_subset (hU.prod hV) ⟨⟨hxU₁,hxU₂⟩,hyV₁,hyV₂⟩ + have hKT : IsCompact (K ∩ T) := hK.inter hT + obtain ⟨δ,hδ,hδreg⟩ := surface_chart_pair_stability z.val.1 z.val.2 hF hG hρ hσ hU hV + (fun x hx => hU₁s hx.1) (fun x hx => hV₁s hx.1) + (heF.mono inter_subset_left) (heG.mono inter_subset_left) + (heρ.mono inter_subset_right) (heσ.mono inter_subset_right) + hKT (fun _ hx => hTUV hx.2) (fun w hw => hreg w hw.1) + refine ⟨interior T,δ,isOpen_interior,hzT,hδ,?_⟩ + intro a ha w hw + exact hδreg a ha w ⟨hw.1,interior_subset hw.2⟩ + choose W δ hW hzW hδ hδreg using hlocal + have hcover : K ⊆ ⋃ z : K, W z := fun z hz => mem_iUnion.mpr ⟨⟨z,hz⟩,hzW ⟨z,hz⟩⟩ + obtain ⟨s,hs⟩ := hK.elim_finite_subcover W hW hcover + have hsmall : ∃ ε > 0, ∀ i ∈ s, ε ≤ δ i := by + clear hs + induction s using Finset.induction_on with + | empty => exact ⟨1,by norm_num,by simp⟩ + | @insert i s hi ih => + obtain ⟨ε,hε,hεs⟩ := ih + refine ⟨min ε (δ i),lt_min hε (hδ i),?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact min_le_right _ _ + · exact (min_le_left _ _).trans (hεs j hj) + obtain ⟨ε,hε,hεs⟩ := hsmall + refine ⟨ε,hε,?_⟩ + intro a ha z hz + obtain ⟨i,hi,hzi⟩ := mem_iUnion₂.mp (hs hz) + exact hδreg i a (ha.trans_le (hεs i hi)) z ⟨hz,hzi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactifiedDoubleCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactifiedDoubleCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..aaeef96d368a4d6e4eb376054596bff0cd9862e4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CompactifiedDoubleCurve.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.UnorderedSurfacePairs +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapDiagonalClosure + +namespace OAI + +/-! Compactifying distinct unordered double pairs retains precisely the +prepared crosscaps on the diagonal. -/ +noncomputable section +open Set Topology Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] + +def compactifiedDoubleCurve (f : M → ProjectionTarget 3) : Set (UnorderedSurfacePairs M) := + unorderedPair '' closure (surfaceDoublePairs f) + +lemma compactifiedDoubleCurve_diagonal (f : M → ProjectionTarget 3) (p : M) : + unorderedPair (p,p) ∈ compactifiedDoubleCurve f ↔ (p,p) ∈ closure (surfaceDoublePairs f) := by + constructor + · rintro ⟨z,hz,he⟩ + have hzp : z = (p,p) := by + rcases unorderedPair_eq.mp he with he | he + · exact he + · simpa only [Prod.swap_prod_mk] using he + rwa [← hzp] + · intro hp + exact ⟨(p,p),hp,rfl⟩ + +lemma compactifiedDoubleCurve_compact [CompactSpace M] (f : M → ProjectionTarget 3) : + IsCompact (compactifiedDoubleCurve f) := + isClosed_closure.isCompact.image unorderedPair_continuous + +lemma compactifiedDoubleCurve_eq_closure [CompactSpace M] [T2Space M] + (f : M → ProjectionTarget 3) : + compactifiedDoubleCurve f = closure (unorderedPair '' surfaceDoublePairs f) := by + apply Set.Subset.antisymm + · rintro z ⟨x,hx,rfl⟩ + exact mem_closure_image unorderedPair_continuous.continuousAt hx + · exact closure_minimal (Set.image_mono subset_closure) (compactifiedDoubleCurve_compact f).isClosed + +variable [ChartedSpace Plane M] [IsManifold planeModel ∞ M] + +lemma compactifiedDoubleCurve_finite_diagonal {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfinite : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) : + (compactifiedDoubleCurve f ∩ Set.range (fun p : M => unorderedPair (p,p))).Finite := by + apply (hfinite.image (fun p : M => unorderedPair (p,p))).subset + rintro z ⟨hz,⟨p,rfl⟩⟩ + exact ⟨p,doublePairs_closure_diagonal_singular hf p ((compactifiedDoubleCurve_diagonal f p).mp hz),rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ConstructedCollarFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ConstructedCollarFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ec6897bcb5aaa0c0d9e37d6d1d76341c400940b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ConstructedCollarFamily.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CalibratedCollarFamily +import OAI.Geometry.SurfaceImmersion.Primitive.ConstructedSurfaceLoop + +namespace OAI + +/-! Supported analytic loops with a small-angle collar fixed before the +interior compact set and its large turn derivative are selected. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates SurfaceJetCoordinates +open VelocityFrame NormalFrame TransverseSmallFunction + +theorem constructed_surface_collar_family {F : RField 4} (hF : ContDiff ℝ ∞ F) + {C₀ L U Ω : Set CollarVelocity.JetBase} + (hC₀ : IsCompact C₀) (hL : IsCompact L) (hCL : C₀ ⊆ L) + (hU : IsOpen U) (hΩ : IsOpen Ω) (hCU : C₀ ⊆ U) (hUΩ : U ⊆ Ω) (hLΩ : L ⊆ Ω) + {e₁ e₂ : CollarVelocity.JetBase → Vec} {a : CollarVelocity.JetBase → ℝ} + (he₁ : ContDiffOn ℝ ∞ e₁ Ω) (he₂ : ContDiffOn ℝ ∞ e₂ Ω) + (ha : ContDiffOn ℝ ∞ a Ω) (hD : ∀ j ∈ Ω, gramDet (j.2 1) (j.2 4) ≠ 0) + (hframe : ∀ j ∈ Ω, e₁ j ⬝ᵥ e₁ j = 1 ∧ e₂ j ⬝ᵥ e₂ j = 1 ∧ e₁ j ⬝ᵥ e₂ j = 0 ∧ + j.2 1 ⬝ᵥ e₁ j = 0 ∧ j.2 4 ⬝ᵥ e₁ j = 0 ∧ j.2 1 ⬝ᵥ e₂ j = 0 ∧ j.2 4 ⬝ᵥ e₂ j = 0) + (hcollar : ∀ j ∈ U, jetNormal j ≠ 0 ∧ e₁ j = normalize (jetNormal j)) + (hn : ∀ j ∈ Ω, jetNormal j ≠ 0 ∨ a j ≠ 0) + (hap : ∀ j ∈ L \ C₀, 0 < a j) (haC : ∀ j ∈ C₀, a j = 0) : + ∃ W : Set CollarVelocity.JetBase, IsOpen W ∧ C₀ ⊆ W ∧ W ⊆ U ∧ + ∀ ε : ℝ, 0 < ε → ∃ V : Set CollarVelocity.JetBase, IsOpen V ∧ C₀ ⊆ V ∧ V ⊆ W ∧ + ∀ (K O P : Set SmallModes.Base), IsCompact K → MapsTo (CollarVelocity.jetSection F) K L → + IsOpen O → K ⊆ O → (∀ j ∈ C₀, j.1 ∉ closure O) → P.Finite → P ⊆ K → + (∀ p ∈ K \ P, ∃ N : Set SmallModes.Base, IsOpen N ∧ p ∈ N ∧ + ∃ f : SmallModes.Base → ℝ, ContDiffOn ℝ ∞ f N ∧ (∀ x ∈ K ∩ N, f x = 0) ∧ + fderiv ℝ f p (0,1) ≠ 0) → + ∀ T : ℝ, ∃ Z : TopologicalSpace.Opens CollarVelocity.JetBase, + L ⊆ Z ∧ (Z : Set CollarVelocity.JetBase) ⊆ Ω ∧ + ∃ l : Loop (jetDomain Z), (∀ J, l.amplitude J = a (decode J)) ∧ + (∃ W' : Set CollarVelocity.JetBase, IsOpen W' ∧ C₀ ⊆ W' ∧ W' ⊆ W ∧ + ∀ J, decode J ∈ W' → a (decode J) = 0 → ∀ t, l.velocity (J,t) = normal J) ∧ + ∃ α : CollarVelocity.JetBase × ℝ → ℝ, ContDiffOn ℝ ∞ α (Z ×ˢ univ) ∧ + (∀ j ∈ Z, Function.Periodic (fun t => α (j,t)) 1) ∧ + (∀ J t, l.velocity (J,t) = velocityRadius (normal J) (a (decode J)) • + direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t))) ∧ + (∀ j ∈ V, ∀ t, |α (j,t)| < ε) ∧ + ∃ τ : SmallModes.Base → ℝ, + (∀ x ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => α (CollarVelocity.jetSection F x,t)) θ = 0 ↔ θ = 0 ∨ θ = τ x) ∧ + ∀ x ∈ K, T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,0)) x (0,1) ∧ + T < fderiv ℝ (fun y => α (CollarVelocity.jetSection F y,τ x)) x (0,1) := by + let R := fun j => velocityRadius (jetNormal j) (a j) + let u := fun j => jetNormal j ⬝ᵥ e₁ j + let w := fun j => jetNormal j ⬝ᵥ e₂ j + have hv := jetNormal_smooth hD + have hR := velocityRadius_smoothOn hv ha hn + have hRp : ∀ j ∈ Ω, 0 < R j := fun j hj => velocityRadius_pos (hn j hj) + have hvperp (j : CollarVelocity.JetBase) (hj : j ∈ Ω) : + j.2 1 ⬝ᵥ jetNormal j = 0 ∧ j.2 4 ⬝ᵥ jetNormal j = 0 := + realNormalPart_perp _ _ _ (hD j hj) + have hreconstruct (j : CollarVelocity.JetBase) (hj : j ∈ Ω) : + planeLift (e₁ j) (e₂ j) (VelocityFrame.planeCoordinates (e₁ j) (e₂ j) (jetNormal j)) = jetNormal j := by + obtain ⟨h1,h2,h12,hy1,hc1,hy2,hc2⟩ := hframe j hj + exact plane_coordinates_reconstruct (hD j hj) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp j hj).1 (hvperp j hj).2 + have hquad (j : CollarVelocity.JetBase) (hj : j ∈ Ω) : + R j^2 = u j^2+w j^2+a j^2 := by + obtain ⟨h1,h2,h12,hy1,hc1,hy2,hc2⟩ := hframe j hj + have hlen := plane_coordinates_length (hD j hj) h1 h2 h12 hy1 hy2 hc1 hc2 + (hvperp j hj).1 (hvperp j hj).2 + change velocityRadius (jetNormal j) (a j)^2 = _ + rw [velocityRadius_sq,← hlen] + have huc (j : CollarVelocity.JetBase) (hj : j ∈ U) : 0 < u j ∧ w j = 0 := + collar_coordinates (hcollar j hj).1 (hcollar j hj).2 (hframe j (hUΩ hj)).2.2.1 + obtain ⟨W,hW,hCW,hWU,hfamily⟩ := CollarVelocity.calibrated_jet_collar_family hF hC₀ hL hCL + hU hΩ hCU hUΩ hLΩ hR (dot_smoothOn hv he₁) (dot_smoothOn hv he₂) ha hRp hquad + (fun j hj => (huc j hj).1) (fun j hj => (huc j hj).2) hap haC + refine ⟨W,hW,hCW,hWU,?_⟩ + intro ε hε + obtain ⟨V,hV,hCV,hVW,hfamily'⟩ := hfamily ε hε + refine ⟨V,hV,hCV,hVW,?_⟩ + intro K O P hK hKL hO hKO hCO hP hPK hlocal T + obtain ⟨Z,hZ,hLZ,hZΩ,α,hα,hper,hmean,hsmall,hzero,τ,hturn,hlarge⟩ := + hfamily' K O P hK hKL hO hKO hCO hP hPK hlocal T + let V₀ : CollarVelocity.JetBase × ℝ → Vec := fun z => + R z.1 • direction (e₁ z.1) (e₂ z.1) (α z) + have hVs : ContDiffOn ℝ ∞ V₀ (Z ×ˢ univ) := + ((hR.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)).smul + ((hα.cos.smul ((he₁.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1))).add + (hα.sin.smul ((he₂.mono hZΩ).comp contDiffOn_fst (fun z hz => hz.1)))) + have hVy : ∀ j ∈ Z, ∀ t, j.2 1 ⬝ᵥ V₀ (j,t) = 0 := by + intro j hj t + simp [V₀,direction,dotProduct_smul,dotProduct_add,(hframe j (hZΩ hj)).2.2.2.1, + (hframe j (hZΩ hj)).2.2.2.2.2.1] + have hVc : ∀ j ∈ Z, ∀ t, j.2 4 ⬝ᵥ V₀ (j,t) = 0 := by + intro j hj t + simp [V₀,direction,dotProduct_smul,dotProduct_add,(hframe j (hZΩ hj)).2.2.2.2.1, + (hframe j (hZΩ hj)).2.2.2.2.2.2] + have hlen : ∀ j ∈ Z, ∀ t, V₀ (j,t) ⬝ᵥ V₀ (j,t) = jetNormal j ⬝ᵥ jetNormal j + a j^2 := by + intro j hj t + obtain ⟨h1,h2,h12,_,_,_,_⟩ := hframe j (hZΩ hj) + exact (planeLift_scaled_length (p := ![Real.cos (α (j,t)),Real.sin (α (j,t))]) + h1 h2 h12 (Real.cos_sq_add_sin_sq (α (j,t))) (R j)).trans (velocityRadius_sq _ _) + have hmean' : ∀ j ∈ Z, (∫ t in 0..1, V₀ (j,t)) = jetNormal j := by + intro j hj + have hp : Continuous (fun t => ![Real.cos (α (j,t)),Real.sin (α (j,t))]) := by + apply continuous_pi + intro i + fin_cases i + · exact Real.continuous_cos.comp (LocalPeriodicCalculus.smooth_slice hZ hα hj).continuous + · exact Real.continuous_sin.comp (LocalPeriodicCalculus.smooth_slice hZ hα hj).continuous + exact (planeLift_mean (e₁ j) (e₂ j) (R j) hp (hmean j hj)).trans + (scaled_coordinates_reconstruct (hRp j (hZΩ hj)).ne' (hreconstruct j (hZΩ hj))) + let Z' : TopologicalSpace.Opens CollarVelocity.JetBase := ⟨Z,hZ⟩ + have hVp : ∀ j ∈ Z, Function.Periodic (fun t => V₀ (j,t)) 1 := by + intro j hj + have he : (fun t => V₀ (j,t)) = + (fun θ => R j • direction (e₁ j) (e₂ j) θ) ∘ (fun t => α (j,t)) := rfl + rw [he] + exact (hper j hj).comp _ + let l : Loop (jetDomain Z') := Loop.ofGeometric (ha.mono hZΩ) hVs + hVp (fun j hj => hD j (hZΩ hj)) + (fun j hj => hn j (hZΩ hj)) hVy hVc hlen hmean' + refine ⟨Z',hLZ,hZΩ,l,(fun _ => rfl),?_,α,hα,hper,(fun _ _ => rfl),hsmall,τ,hturn,hlarge⟩ + obtain ⟨W',hW',hCW',hW'W,hzero'⟩ := hzero + refine ⟨W',hW',hCW',hW'W,?_⟩ + intro J hJ haz t + change R (decode J) • direction (e₁ (decode J)) (e₂ (decode J)) (α (decode J,t)) = _ + rw [hzero' (decode J) hJ haz t] + simp only [direction,Real.cos_zero,Real.sin_zero,one_smul,zero_smul,add_zero] + change velocityRadius (jetNormal (decode J)) (a (decode J)) • e₁ (decode J) = _ + rw [haz,(hcollar (decode J) (hWU (hW'W hJ))).2] + change velocityRadius (jetNormal (decode J)) 0 • normalize (jetNormal (decode J)) = + jetNormal (decode J) + simpa only [velocityRadius,zero_pow (by decide : 2 ≠ 0),add_zero] using + norm_smul_normalize (hcollar (decode J) (hWU (hW'W hJ))).1 + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ControlledCollarLoop.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ControlledCollarLoop.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad07b144684246a9ed82630e242f38042ef8dc8a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ControlledCollarLoop.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ShiftedCollarDensity +import OAI.Geometry.SurfaceImmersion.Primitive.ControlledInteriorLoop + +namespace OAI + +/-! Assemble the velocity angle with its prescribed collar density: a small translation with large turn +jets, an actual positive density, the exact prescribed vector mean, and exactly +two turns. No density or transverse-correction solvability is assumed. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity +open TransverseSmallFunction + +theorem controlled_collar_loop {K L O P U C : Set Base} + (hK : IsCompact K) (hL : IsCompact L) (hKL : K ⊆ L) + (hO : IsOpen O) (hKO : K ⊆ O) (hOU : Disjoint O U) + (hU : IsOpen U) (hC : IsClosed C) (hCU : C ⊆ U) + (hP : P.Finite) (hPK : P ⊆ K) + (hlocal : ∀ p ∈ K \ P, ∃ U : Set Base, IsOpen U ∧ p ∈ U ∧ + ∃ f : Base → ℝ, ContDiffOn ℝ ∞ f U ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + fderiv ℝ f p (0, 1) ≠ 0) + {a A s : Base → ℝ} {c : Base → LoopDensity.Plane} + (ha : ContDiff ℝ ∞ a) (hA : ContDiff ℝ ∞ A) + (hs : ContDiff ℝ ∞ s) (hc : ContDiff ℝ ∞ c) + (hapos : ∀ b ∈ K, 0 < a b) + (hcollar : ∀ b ∈ U, s b = 0 ∧ c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) + (hshape : ∀ b ∈ L \ U, + (0 < a b ∧ 2 * Real.arctan (a b) ≤ A b ∧ s b ∈ Icc (0 : ℝ) 1 ∧ + c b = ![(1 - a b ^ 2 / 2) / (1 + a b ^ 2 / 2), 0]) ∨ + (s b = 1 ∧ Real.pi < A b ∧ c b 0 ^ 2 + c b 1 ^ 2 < 1)) + (T : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ h : Base → ℝ, ContDiff ℝ ∞ h ∧ HasCompactSupport h ∧ tsupport h ⊆ O ∧ + (∀ x, |h x| < ε) ∧ ∃ W : Set Base, IsOpen W ∧ L ⊆ W ∧ + ∃ ρ : Base × ℝ → ℝ, ContDiffOn ℝ ∞ ρ (W ×ˢ univ) ∧ + (∀ b ∈ W, ∀ t, 0 < ρ (b, t)) ∧ + (∀ b, Function.Periodic (fun t => ρ (b, t)) 1) ∧ + (∀ b ∈ W, (∫ t in 0..1, ρ (b, t)) = 1) ∧ + (∀ b ∈ W ∩ C, ∀ t, ρ (b, t) = unitDensity (a b) t) ∧ + ContDiffOn ℝ ∞ (normalizedAngle ρ a A s h) (W ×ˢ univ) ∧ + (∀ b ∈ W, Function.Periodic (fun t => normalizedAngle ρ a A s h (b, t)) 1) ∧ + (∀ b ∈ W, (∫ t in 0..1, + ![Real.cos (normalizedAngle ρ a A s h (b, t)), + Real.sin (normalizedAngle ρ a A s h (b, t))]) = c b) ∧ + (∀ b ∈ K, ∀ θ ∈ Ico (0 : ℝ) 1, + deriv (fun t => normalizedAngle ρ a A s h (b, t)) θ = 0 ↔ + θ = 0 ∨ θ = PositiveDensity.clock ρ b (1 / 2)) ∧ + ∀ b ∈ K, + T < fderiv ℝ (fun x => normalizedAngle ρ a A s h (x, 0)) b (0, 1) ∧ + T < fderiv ℝ (fun x => normalizedAngle ρ a A s h + (x, PositiveDensity.clock ρ b (1 / 2))) b (0, 1) := by + obtain ⟨δ, hδ, hdensity⟩ := small_shift_collar_density ha hA hs hc hU hC hCU hL hcollar hshape + obtain ⟨h, hh, hhc, hhs, hhb, hhlarge⟩ := exists_small_turn_function + hK hO hKO hP hPK hlocal ha hA hs T (lt_min hε hδ) + have hhδ : ∀ b, |h b| < δ := fun b => lt_of_lt_of_le (hhb b) (min_le_right _ _) + have hzero : ∀ b ∈ U, h b = 0 := by + intro b hb + by_contra hn + exact Set.disjoint_left.mp hOU + (hhs (subset_tsupport h (Function.mem_support.mpr hn))) hb + obtain ⟨W, hW, hKW, ρ, hρ, hpos, hper, hmom, hfixed⟩ := hdensity h hh hhδ hzero + have hboth (b : Base) (hb : b ∈ W) := LoopDensity.mass_and_mean + (LocalPeriodicCalculus.smooth_slice hW hρ hb).continuous + ((blendedPath_smooth ha hA hs hh).continuous.comp + (continuous_const.prodMk continuous_id)) (hmom b hb) + have hmass : ∀ b ∈ W, (∫ t in 0..1, ρ (b, t)) = 1 := fun b hb => (hboth b hb).1 + have hmean : ∀ b ∈ W, (∫ t in 0..1, ρ (b, t) • + blendedPath (a b) (A b) (s b) (h b) t) = c b := fun b hb => (hboth b hb).2 + have hnotU (b : Base) (hb : b ∈ K) : b ∉ U := + fun hu => Set.disjoint_left.mp hOU (hKO hb) hu + have hα := PositiveDensity.reparametrize_smoothOn hW hρ hpos + (fun b _ => hper b) hmass (unitAngle_smooth ha hA hs hh).contDiffOn + have hp := blendedPath_smooth ha hA hs hh + have hqmean (b : Base) (hb : b ∈ W) : + (∫ t in 0..1, PositiveDensity.reparametrize ρ + (fun z => blendedPath (a z.1) (A z.1) (s z.1) (h z.1) z.2) (b, t)) = c b := + (PositiveDensity.reparametrize_mean hW hρ hpos (fun b _ => hper b) + hmass hp.contDiffOn hb).trans (hmean b hb) + refine ⟨h, hh, hhc, hhs, (fun x => lt_of_lt_of_le (hhb x) (min_le_left _ _)), + W, hW, hKW, ρ, hρ, hpos, hper, hmass, hfixed, hα, ?_, ?_, ?_, ?_⟩ + · intro b hb + exact PositiveDensity.reparametrize_periodic hW hρ hpos (fun b _ => hper b) + hmass (fun b _ => unitAngle_periodic (a b) (A b) (s b) (h b)) hb + · intro b hb + exact hqmean b hb + · intro b hb θ hθ + have hAb : 0 < A b := by + rcases hshape b ⟨hKL hb, hnotU b hb⟩ with hbase | hinterior + · exact lt_of_lt_of_le (mul_pos (by norm_num) (Real.arctan_pos.mpr hbase.1)) hbase.2.1 + · exact Real.pi_pos.trans hinterior.2.1 + have hsb : s b ∈ Icc (0 : ℝ) 1 := by + rcases hshape b ⟨hKL hb, hnotU b hb⟩ with hbase | hinterior + · exact hbase.2.2.1 + · rw [hinterior.1]; exact ⟨zero_le_one, le_rfl⟩ + exact reparametrized_two_turns ha hA hs hh hW hρ hpos + (fun b _ => hper b) hmass (hKW (hKL hb)) (hapos b hb) hAb hsb hθ + · exact large_turns_after_reparametrization ha hA hs hh hW (hKL.trans hKW) hρ hpos + (fun b _ => hper b) hmass hhlarge + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerArcSeparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerArcSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..983ce33a5d25106fb0a34516e80aaf920fb1b808 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerArcSeparation.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ReturningCornerArc +import OAI.Geometry.SurfaceImmersion.Whitney.AdvancingCornerArc + +namespace OAI + +/-! The rounded graph cannot meet the portions of either old branch +lying beyond its attachment points. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} +namespace RegularPathCornerChart + +theorem returning_arc_local_separation (C : RegularPathCornerChart γ t) + (P : SmoothCompactArc planeModel M) + (hl : StrictAnti C.leftParameter) (hr : StrictMono C.rightParameter) + {a b l r : ℝ} (hb : 0 < b) (hlt : l < t) (htr : t < r) + (hPs : P.start = -2) (hPf : P.finish = 2) + (hleft : C.leftParameter l = a+4*b) (hright : C.rightParameter r = a+4*b) + (hcoord : ∀ s ∈ Icc P.start P.finish, + C.chart (P.curve s) 0 = a+b*s^2) : + ∀ s ∈ Icc P.start P.finish, ∀ u ∈ Ico C.lower l ∪ Ioc r C.upper, + P.curve s ≠ γ.extend u := by + intro s hs u hu he + have hxy : C.chart (γ.extend u) 0 = a+b*s^2 := by rw [← he]; exact hcoord s hs + have hs' : s ∈ Icc (-2:ℝ) 2 := by simpa only [hPs,hPf] using hs + have hsq : s^2 ≤ 4 := by nlinarith [sq_nonneg (s+2),sq_nonneg (s-2),mul_nonneg (by linarith [hs'.1] : 0 ≤ s+2) (by linarith [hs'.2] : 0 ≤ 2-s)] + have hxbound : a+b*s^2 ≤ a+4*b := by nlinarith + rcases hu with hu | hu + · have hC := congrFun (C.left_chart u ⟨hu.1,hu.2.le.trans hlt.le⟩).2 0 + change C.chart (γ.extend u) 0 = C.leftParameter u at hC + have hm := hl hu.2 + rw [hleft,← hC,hxy] at hm + exact (not_lt_of_ge hxbound) hm + · have hC := congrFun (C.right_chart u ⟨htr.le.trans hu.1.le,hu.2⟩).2 0 + change C.chart (γ.extend u) 0 = C.rightParameter u at hC + have hm := hr hu.1 + rw [hright,← hC,hxy] at hm + exact (not_lt_of_ge hxbound) hm + +theorem advancing_arc_local_separation (C : RegularPathCornerChart γ t) + (P : SmoothCompactArc planeModel M) + (hl : StrictMono C.leftParameter) (hr : StrictMono C.rightParameter) + {a b l r : ℝ} (hb : 0 < b) (hlt : l < t) (htr : t < r) + (hPs : P.start = -2) (hPf : P.finish = 2) + (hleft : C.leftParameter l = a-2*b) (hright : C.rightParameter r = a+2*b) + (hcoord : ∀ s ∈ Icc P.start P.finish, + C.chart (P.curve s) 0 = a+b*s) : + ∀ s ∈ Icc P.start P.finish, ∀ u ∈ Ico C.lower l ∪ Ioc r C.upper, + P.curve s ≠ γ.extend u := by + intro s hs u hu he + have hxy : C.chart (γ.extend u) 0 = a+b*s := by rw [← he]; exact hcoord s hs + have hs' : s ∈ Icc (-2:ℝ) 2 := by simpa only [hPs,hPf] using hs + have hxlo : a-2*b ≤ a+b*s := by nlinarith [hs'.1] + have hxhi : a+b*s ≤ a+2*b := by nlinarith [hs'.2] + rcases hu with hu | hu + · have hC := congrFun (C.left_chart u ⟨hu.1,hu.2.le.trans hlt.le⟩).2 0 + change C.chart (γ.extend u) 0 = C.leftParameter u at hC + have hm := hl hu.2 + rw [hleft,← hC,hxy] at hm + exact (not_lt_of_ge hxlo) hm + · have hC := congrFun (C.right_chart u ⟨htr.le.trans hu.1.le,hu.2⟩).2 0 + change C.chart (γ.extend u) 0 = C.rightParameter u at hC + have hm := hr hu.1 + rw [hright,← hC,hxy] at hm + exact (not_lt_of_ge hxhi) hm + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgeEmbedding.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgeEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6fa7c0014ccff195bbef01f53fac1d8b11e455d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgeEmbedding.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CornerBridgePath + +namespace OAI + +/-! A separated corner bridge preserves the embedding of the whole path. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} {O : Set M} +namespace LocalCornerBridge + +theorem replacement_injective (B : LocalCornerBridge γ t O) (hi : Function.Injective γ) + (hsep : ∀ s ∈ Icc B.arc.start B.arc.finish, ∀ u ∈ Ico (0:ℝ) B.left ∪ Ioc B.right 1, + B.arc.curve s ≠ γ.extend u) : Function.Injective B.replacement := by + have hpi : Function.Injective B.initialPath := + injective_subpath γ hi (by intro he; have := congrArg (fun x : I => (x:ℝ)) he; exact B.left_pos.ne' this.symm) + have hsi : Function.Injective B.finalPath := + injective_subpath γ hi (by intro he; have := congrArg (fun x : I => (x:ℝ)) he; exact B.right_lt_one.ne this) + have hleft : range B.initialPath ∩ range B.path ⊆ {γ B.leftPoint} := by + rintro z ⟨hz,hz'⟩ + rw [B.initialPath_range] at hz + rw [B.path_range] at hz' + obtain ⟨u,hu,rfl⟩ := hz + obtain ⟨s,hs,he⟩ := hz' + have hu' : u = B.left := by + apply le_antisymm hu.2 + apply le_of_not_gt + intro hult + exact hsep s hs u (Or.inl ⟨hu.1,hult⟩) he + subst u + exact mem_singleton_iff.mpr (Path.extend_apply γ B.leftPoint.property) + have hjoin : Function.Injective (B.initialPath.trans B.path) := + path_trans_injective_of_range B.initialPath B.path hpi B.path_injective hleft + have hright : range (B.initialPath.trans B.path) ∩ range B.finalPath ⊆ {γ B.rightPoint} := by + rintro z ⟨hz,hz'⟩ + rw [Path.trans_range,B.initialPath_range,B.path_range] at hz + rw [B.finalPath_range] at hz' + obtain ⟨u,hu,rfl⟩ := hz' + rcases hz with hz | hz + · obtain ⟨v,hv,hve⟩ := hz + have hv01 : v ∈ Icc (0:ℝ) 1 := ⟨hv.1,hv.2.trans B.leftPoint.property.2⟩ + have hu01 : u ∈ Icc (0:ℝ) 1 := ⟨B.rightPoint.property.1.trans hu.1,hu.2⟩ + have h := embeddedPath_extend_injOn γ hi hv01 hu01 hve + have hlr := B.left_lt.trans B.lt_right + exfalso + linarith [hv.2,hu.1] + · obtain ⟨s,hs,he⟩ := hz + have hu' : u = B.right := by + apply le_antisymm _ hu.1 + apply le_of_not_gt + intro hru + exact hsep s hs u (Or.inr ⟨hru,hu.2⟩) he + subst u + exact mem_singleton_iff.mpr (Path.extend_apply γ B.rightPoint.property) + exact path_trans_injective_of_range (B.initialPath.trans B.path) B.finalPath hjoin hsi hright + +end LocalCornerBridge +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgePath.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgePath.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd170336a2ec0f209b307f90681a30ba4ae48957 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerBridgePath.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SeparatedCornerBridge + +namespace OAI + +/-! Turning a separated smooth corner bridge into an embedded replacement +path, retaining finite regular pieces and the exact unchanged trace. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} {O : Set M} +namespace LocalCornerBridge + +def leftPoint (B : LocalCornerBridge γ t O) : I := + ⟨B.left,B.left_pos.le,(B.left_lt.trans B.lt_right |>.trans B.right_lt_one).le⟩ +def rightPoint (B : LocalCornerBridge γ t O) : I := + ⟨B.right,(B.left_pos.trans B.left_lt |>.trans B.lt_right).le,B.right_lt_one.le⟩ + +lemma source_eq (B : LocalCornerBridge γ t O) : B.arc.curve B.arc.start = γ B.leftPoint := by + have he := B.left_germ.eq_of_nhds + dsimp only [Function.comp_apply] at he + rw [B.left_value] at he + exact he.trans (Path.extend_extends' γ B.leftPoint) + +lemma target_eq (B : LocalCornerBridge γ t O) : B.arc.curve B.arc.finish = γ B.rightPoint := by + have he := B.right_germ.eq_of_nhds + dsimp only [Function.comp_apply] at he + rw [B.right_value] at he + exact he.trans (Path.extend_extends' γ B.rightPoint) + +def path (B : LocalCornerBridge γ t O) : Path (γ B.leftPoint) (γ B.rightPoint) := + B.arc.path.cast B.source_eq.symm B.target_eq.symm + +lemma path_injective (B : LocalCornerBridge γ t O) : Function.Injective B.path := + B.arc.path_injective + +lemma path_range (B : LocalCornerBridge γ t O) : + range B.path = B.arc.curve '' Icc B.arc.start B.arc.finish := B.arc.path_range + +def initialPath (B : LocalCornerBridge γ t O) : Path p (γ B.leftPoint) := + (γ.subpath 0 B.leftPoint).cast γ.source.symm rfl + +def finalPath (B : LocalCornerBridge γ t O) : Path (γ B.rightPoint) q := + (γ.subpath B.rightPoint 1).cast rfl γ.target.symm + +def replacement (B : LocalCornerBridge γ t O) : Path p q := + (B.initialPath.trans B.path).trans B.finalPath + +lemma initialPath_range (B : LocalCornerBridge γ t O) : + range B.initialPath = γ.extend '' Icc (0:ℝ) B.left := by + change range (γ.subpath 0 B.leftPoint) = _ + rw [Path.range_subpath,uIcc_of_le (show (0:I) ≤ B.leftPoint from bot_le)] + apply Subset.antisymm + · rintro x ⟨u,hu,rfl⟩ + have hu' : (u:ℝ) ∈ Icc (0:ℝ) B.left := ⟨hu.1,hu.2⟩ + exact ⟨u,hu',Path.extend_extends' γ u⟩ + · rintro x ⟨u,hu,rfl⟩ + have huI : u ∈ Icc (0:ℝ) 1 := ⟨hu.1,hu.2.trans B.leftPoint.property.2⟩ + exact ⟨⟨u,huI⟩,⟨hu.1,hu.2⟩,Path.extend_apply γ huI |>.symm⟩ + +lemma finalPath_range (B : LocalCornerBridge γ t O) : + range B.finalPath = γ.extend '' Icc B.right (1:ℝ) := by + change range (γ.subpath B.rightPoint 1) = _ + rw [Path.range_subpath,uIcc_of_le (show B.rightPoint ≤ (1:I) from le_top)] + apply Subset.antisymm + · rintro x ⟨u,hu,rfl⟩ + have hu' : (u:ℝ) ∈ Icc B.right (1:ℝ) := ⟨hu.1,hu.2⟩ + exact ⟨u,hu',Path.extend_extends' γ u⟩ + · rintro x ⟨u,hu,rfl⟩ + have huI : u ∈ Icc (0:ℝ) 1 := ⟨B.rightPoint.property.1.trans hu.1,hu.2⟩ + exact ⟨⟨u,huI⟩,⟨hu.1,hu.2⟩,Path.extend_apply γ huI |>.symm⟩ + +lemma replacement_range (B : LocalCornerBridge γ t O) : + range B.replacement = (γ.extend '' Icc (0:ℝ) B.left ∪ + B.arc.curve '' Icc B.arc.start B.arc.finish) ∪ γ.extend '' Icc B.right (1:ℝ) := by + change range ((B.initialPath.trans B.path).trans B.finalPath) = _ + rw [Path.trans_range,Path.trans_range,B.initialPath_range,B.path_range,B.finalPath_range] + +lemma replacement_finite_regular (B : LocalCornerBridge γ t O) + (hγ : FiniteRegularPath planeModel γ) : FiniteRegularPath planeModel B.replacement := by + exact (((hγ.subpath 0 B.leftPoint).cast γ.source.symm rfl).trans + ((FiniteRegularPath.arc B.arc).cast B.source_eq.symm B.target_eq.symm)).trans + ((hγ.subpath B.rightPoint 1).cast rfl γ.target.symm) + +end LocalCornerBridge +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerChartReflection.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerChartReflection.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9c9cac3ba8e78736b7cf2a73720fc793034e421 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerChartReflection.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPathCornerChart + +namespace OAI + +/-! Reversing both chart coordinates interchanges the two horizontal +orientations without changing the actual surface branches. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} +namespace RegularPathCornerChart + +def reflect (C : RegularPathCornerChart γ t) : RegularPathCornerChart γ t := by + let e : Base ≃L[ℝ] Base := ContinuousLinearEquiv.neg ℝ + let q := C.chart.trans e.toHomeomorph.toOpenPartialHomeomorph + let l := C.leftParameter.trans (Homeomorph.neg ℝ) + let r := C.rightParameter.trans (Homeomorph.neg ℝ) + have hql : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ q q.source := + e.contDiff.contMDiff.comp_contMDiffOn (C.chart_smooth.mono inter_subset_left) + have hqr : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ q.symm q.target := + C.inverse_smooth.comp e.symm.contDiff.contMDiff.contMDiffOn (fun _ hx => hx.2) + have hlf : ContDiff ℝ ∞ l := contDiff_neg.comp C.left_parameter_smooth + have hrf : ContDiff ℝ ∞ r := contDiff_neg.comp C.right_parameter_smooth + have hli : ContDiff ℝ ∞ l.symm := C.left_inverse_smooth.comp contDiff_neg + have hri : ContDiff ℝ ∞ r.symm := C.right_inverse_smooth.comp contDiff_neg + have hlm : StrictMono l ∨ StrictAnti l := by + rcases C.left_monotone with h | h + · exact Or.inr (fun _ _ hxy => neg_lt_neg (h hxy)) + · exact Or.inl (fun _ _ hxy => neg_lt_neg (h hxy)) + have hrm : StrictMono r ∨ StrictAnti r := by + rcases C.right_monotone with h | h + · exact Or.inr (fun _ _ hxy => neg_lt_neg (h hxy)) + · exact Or.inl (fun _ _ hxy => neg_lt_neg (h hxy)) + refine ⟨q,hql,hqr,(fun x => -C.leftGraph (-x)),(fun x => -C.rightGraph (-x)), + (C.left_smooth.comp contDiff_neg).neg,(C.right_smooth.comp contDiff_neg).neg, + l,r,hlf,hrf,hli,hri,hlm,hrm,C.lower,C.upper,C.lower_pos,C.lower_lt,C.lt_upper,C.upper_lt_one, + ?_,?_,?_⟩ + · intro u hu + have h := C.left_chart u hu + refine ⟨⟨h.1,mem_univ _⟩,?_⟩ + change -C.chart (γ.extend u) = ![-C.leftParameter u,-C.leftGraph (- -C.leftParameter u)] + rw [h.2] + ext i + fin_cases i <;> simp + · intro u hu + have h := C.right_chart u hu + refine ⟨⟨h.1,mem_univ _⟩,?_⟩ + change -C.chart (γ.extend u) = ![-C.rightParameter u,-C.rightGraph (- -C.rightParameter u)] + rw [h.2] + ext i + fin_cases i <;> simp + · change -C.leftParameter t = -C.rightParameter t + rw [C.parameter_match] + +@[simp] lemma reflect_leftParameter_apply (C : RegularPathCornerChart γ t) (u : ℝ) : + C.reflect.leftParameter u = -C.leftParameter u := rfl + +@[simp] lemma reflect_rightParameter_apply (C : RegularPathCornerChart γ t) (u : ℝ) : + C.reflect.rightParameter u = -C.rightParameter u := rfl + +@[simp] lemma reflect_lower (C : RegularPathCornerChart γ t) : C.reflect.lower = C.lower := rfl +@[simp] lemma reflect_upper (C : RegularPathCornerChart γ t) : C.reflect.upper = C.upper := rfl + +lemma reflect_left_strictMono (C : RegularPathCornerChart γ t) (h : StrictAnti C.leftParameter) : + StrictMono C.reflect.leftParameter := fun _ _ hxy => neg_lt_neg (h hxy) +lemma reflect_left_strictAnti (C : RegularPathCornerChart γ t) (h : StrictMono C.leftParameter) : + StrictAnti C.reflect.leftParameter := fun _ _ hxy => neg_lt_neg (h hxy) +lemma reflect_right_strictMono (C : RegularPathCornerChart γ t) (h : StrictAnti C.rightParameter) : + StrictMono C.reflect.rightParameter := fun _ _ hxy => neg_lt_neg (h hxy) +lemma reflect_right_strictAnti (C : RegularPathCornerChart γ t) (h : StrictMono C.rightParameter) : + StrictAnti C.reflect.rightParameter := fun _ _ hxy => neg_lt_neg (h hxy) + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerGraphSeparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerGraphSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a79ac75b63d0cbe751515d7fbc11fd827a66e7a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerGraphSeparation.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPathCornerChart + +namespace OAI + +/-! Embeddedness forces strict separation of the two returning graph branches. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} +namespace RegularPathCornerChart + +lemma left_graph_realized (C : RegularPathCornerChart γ t) {x : ℝ} + (hx : x ∈ C.leftParameter '' Icc C.lower t) : + ![x,C.leftGraph x] ∈ C.chart.target ∧ + C.chart.symm ![x,C.leftGraph x] = γ.extend (C.leftParameter.symm x) := by + obtain ⟨u,hu,rfl⟩ := hx + have h := C.left_chart u hu + refine ⟨h.2 ▸ C.chart.map_source h.1,?_⟩ + rw [C.leftParameter.symm_apply_apply,← h.2,C.chart.left_inv h.1] + +lemma right_graph_realized (C : RegularPathCornerChart γ t) {x : ℝ} + (hx : x ∈ C.rightParameter '' Icc t C.upper) : + ![x,C.rightGraph x] ∈ C.chart.target ∧ + C.chart.symm ![x,C.rightGraph x] = γ.extend (C.rightParameter.symm x) := by + obtain ⟨u,hu,rfl⟩ := hx + have h := C.right_chart u hu + refine ⟨h.2 ▸ C.chart.map_source h.1,?_⟩ + rw [C.rightParameter.symm_apply_apply,← h.2,C.chart.left_inv h.1] + +lemma branch_graphs_ne (C : RegularPathCornerChart γ t) (hi : Function.Injective γ) + {u v : ℝ} (hu : u ∈ Ico C.lower t) (hv : v ∈ Ioc t C.upper) : + ![C.leftParameter u,C.leftGraph (C.leftParameter u)] ≠ + ![C.rightParameter v,C.rightGraph (C.rightParameter v)] := by + intro he + have hl := C.left_chart u ⟨hu.1,hu.2.le⟩ + have hr := C.right_chart v ⟨hv.1.le,hv.2⟩ + have hp : γ.extend u = γ.extend v := C.chart.injOn hl.1 hr.1 (hl.2.trans (he.trans hr.2.symm)) + have hu01 : u ∈ Icc (0:ℝ) 1 := + ⟨C.lower_pos.le.trans hu.1,hu.2.le.trans (C.lt_upper.trans C.upper_lt_one).le⟩ + have hv01 : v ∈ Icc (0:ℝ) 1 := + ⟨(C.lower_pos.trans C.lower_lt).le.trans hv.1.le,hv.2.trans C.upper_lt_one.le⟩ + rw [Path.extend_apply γ hu01,Path.extend_apply γ hv01] at hp + have huv := congrArg (fun z : I => (z:ℝ)) (hi hp) + exact (hu.2.trans hv.1).ne huv + +lemma graphs_ne_on_overlap (C : RegularPathCornerChart γ t) (hi : Function.Injective γ) + {x : ℝ} (hx : x ∈ C.leftParameter '' Ico C.lower t) + (hx' : x ∈ C.rightParameter '' Ioc t C.upper) : C.leftGraph x ≠ C.rightGraph x := by + obtain ⟨u,hu,he⟩ := hx + obtain ⟨v,hv,he'⟩ := hx' + intro hg + apply C.branch_graphs_ne hi hu hv + rw [he,he',hg] + +lemma graphs_ordered_on_interval (C : RegularPathCornerChart γ t) + (hi : Function.Injective γ) {a b : ℝ} + (hleft : Ioo a b ⊆ C.leftParameter '' Ico C.lower t) + (hright : Ioo a b ⊆ C.rightParameter '' Ioc t C.upper) : + (∀ x ∈ Ioo a b, C.leftGraph x < C.rightGraph x) ∨ + (∀ x ∈ Ioo a b, C.rightGraph x < C.leftGraph x) := by + have hn : ∀ x ∈ Ioo a b, C.rightGraph x - C.leftGraph x ≠ 0 := by + intro x hx + exact sub_ne_zero.mpr (C.graphs_ne_on_overlap hi (hleft hx) (hright hx)).symm + have hs := isPreconnected_Ioo.mapsTo_Ioi_or_Iio + (C.right_smooth.continuous.sub C.left_smooth.continuous).continuousOn hn + rcases hs with hs | hs + · exact Or.inl (fun x hx => sub_pos.mp (hs hx)) + · exact Or.inr (fun x hx => sub_neg.mp (hs hx)) + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerParameterOrientation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerParameterOrientation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cf893c07c1267107d92c75c180851d77e4146dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CornerParameterOrientation.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NonzeroGermDiffeomorphism +import Mathlib.Analysis.Calculus.Deriv.Slope + +namespace OAI + +/-! The explicit corner parameters run forward along the original path +at each joining endpoint. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma smooth_homeomorph_inverse_deriv_ne (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) (x : ℝ) : + deriv e.symm x ≠ 0 := by + have hd := ((he.differentiable (by simp) (e.symm x)).hasDerivAt).comp x + ((hei.differentiable (by simp) x).hasDerivAt) + have hd' : HasDerivAt (fun x : ℝ => x) + (deriv e (e.symm x)*deriv e.symm x) x := by simpa only [Function.comp_def,e.apply_symm_apply] using hd + have hh := hd'.unique (hasDerivAt_id x) + intro hz + rw [hz,mul_zero] at hh + norm_num at hh + +lemma smooth_homeomorph_inverse_deriv_pos (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) + (hm : StrictMono e) (x : ℝ) : 0 < deriv e.symm x := by + have hmi : StrictMono e.symm := by + intro x y hxy + apply hm.lt_iff_lt.mp + simpa only [e.apply_symm_apply] using hxy + exact lt_of_le_of_ne hmi.monotone.deriv_nonneg + (smooth_homeomorph_inverse_deriv_ne e he hei x).symm + +lemma smooth_homeomorph_inverse_deriv_neg (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) + (hm : StrictAnti e) (x : ℝ) : deriv e.symm x < 0 := by + have hmi : StrictAnti e.symm := by + intro x y hxy + apply lt_of_not_ge + intro hyx + have h := hm.antitone hyx + simp only [e.apply_symm_apply] at h + exact (not_le_of_gt hxy) h + exact lt_of_le_of_ne hmi.antitone.deriv_nonpos + (smooth_homeomorph_inverse_deriv_ne e he hei x) + +lemma returning_left_parameter_deriv_pos (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) (hm : StrictAnti e) + (a : ℝ) {b : ℝ} (hb : 0 < b) : + 0 < deriv (fun s : ℝ => e.symm (a+b*s^2)) (-2) := by + have hx : HasDerivAt (fun s : ℝ => a+b*s^2) (2*b*(-2)) (-2) := by + convert (((hasDerivAt_id (-2:ℝ)).pow 2).const_mul b).const_add a using 1 + · rfl + · dsimp only [id_eq]; ring + have hd := ((hei.differentiable (by simp) (a+b*(-2:ℝ)^2)).hasDerivAt).comp (-2) hx + have hdv := hd.deriv + dsimp only [Function.comp_def] at hdv + rw [hdv] + exact mul_pos_of_neg_of_neg (smooth_homeomorph_inverse_deriv_neg e he hei hm _) (by linarith) + +lemma returning_right_parameter_deriv_pos (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) (hm : StrictMono e) + (a : ℝ) {b : ℝ} (hb : 0 < b) : + 0 < deriv (fun s : ℝ => e.symm (a+b*s^2)) 2 := by + have hx : HasDerivAt (fun s : ℝ => a+b*s^2) (2*b*2) 2 := by + convert (((hasDerivAt_id (2:ℝ)).pow 2).const_mul b).const_add a using 1 + · rfl + · dsimp only [id_eq]; ring + have hd := ((hei.differentiable (by simp) (a+b*(2:ℝ)^2)).hasDerivAt).comp 2 hx + have hdv := hd.deriv + dsimp only [Function.comp_def] at hdv + rw [hdv] + exact mul_pos (smooth_homeomorph_inverse_deriv_pos e he hei hm _) (by linarith) + +lemma advancing_parameter_deriv_pos (e : ℝ ≃ₜ ℝ) + (he : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) (hm : StrictMono e) + (a : ℝ) {b : ℝ} (hb : 0 < b) (t : ℝ) : + 0 < deriv (fun s : ℝ => e.symm (a+b*s)) t := by + have hx : HasDerivAt (fun s : ℝ => a+b*s) b t := by + simpa only [id_eq,mul_one] using ((hasDerivAt_id t).const_mul b).const_add a + have hd := ((hei.differentiable (by simp) (a+b*t)).hasDerivAt).comp t hx + have hdv := hd.deriv + dsimp only [Function.comp_def] at hdv + rw [hdv] + exact mul_pos (smooth_homeomorph_inverse_deriv_pos e he hei hm _) hb + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..160996435c0a896eccd7e82bf38d2fa4641610c1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcCoordinates.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AxisParameterCoordinates + +namespace OAI + +/-! Actual smooth source coordinates at a crosscap which agree exactly +with the chosen source-arc parameter, retaining the full map formula. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +theorem crosscap_arc_coordinates (c : SurfaceCrosscapCoordinates f p) + {γ : ℝ → M} {a : ℝ} (e : ℝ ≃ₜ ℝ) + (hes : ContDiff ℝ ∞ e) (hei : ContDiff ℝ ∞ e.symm) (he0 : e a = 0) + (hγ : γ =ᶠ[𝓝 a] c.axisCurve ∘ e) : + ∃ d : OpenPartialHomeomorph M Base, + d.source = c.source.source ∧ + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d d.source ∧ + ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d.symm d.target ∧ + (∀ᶠ t in 𝓝 a, γ t ∈ d.source ∧ d (γ t) = crosscapAxis t) ∧ + ∀ x ∈ d.source, f x = c.target (standardCrosscap ![(d x) 0,e ((d x) 1)]) := by + let H := axisParameterCoordinates e + let d := c.source.transHomeomorph H + have hds : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d d.source := + (axisParameterCoordinates_smooth hei).contMDiff.comp_contMDiffOn c.source_smooth + have hdi : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d.symm d.target := by + apply c.source_inverse_smooth.comp + (axisParameterCoordinates_inverse_smooth hes).contMDiff.contMDiffOn + intro x hx + exact hx + have haxis0 : crosscapAxis (e a) ∈ c.source.target := by + rw [he0,map_zero,← c.source_center] + exact c.source.map_source c.source_mem + have hnear : ∀ᶠ t in 𝓝 a, crosscapAxis (e t) ∈ c.source.target := + (crosscapAxis.continuous.comp e.continuous).continuousAt.eventually (c.source.open_target.mem_nhds haxis0) + refine ⟨d,rfl,hds,hdi,?_,?_⟩ + · filter_upwards [hγ,hnear] with t ht htS + refine ⟨?_,?_⟩ + · change γ t ∈ c.source.source + rw [ht] + exact c.source.map_target htS + · change H (c.source (γ t)) = crosscapAxis t + rw [ht] + change H (c.source (c.source.symm (crosscapAxis (e t)))) = crosscapAxis t + rw [c.source.right_inv htS] + exact axisParameterCoordinates_axis e t + · intro x hx + have hrecover : ![(d x) 0,e ((d x) 1)] = c.source x := by + exact H.symm_apply_apply (c.source x) + rw [hrecover] + exact c.model_eq x hx + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcEndpoint.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..b52e27cc8341ce7c4e8a709c066b78edebbe9155 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcEndpoint.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapPairCoordinates +import Mathlib.Topology.UnitInterval + +namespace OAI + +/-! A continuous ordered double arc ending at a prepared crosscap lies +in its source chart on a full initial parameter interval. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + + theorem crosscap_arc_endpoint (c : SurfaceCrosscapCoordinates f p) + {Γ : I → M × M} (hΓ : Continuous Γ) (hzero : Γ 0 = (p,p)) + (heq : ∀ t, f (Γ t).1 = f (Γ t).2) + (hne : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) : + ∃ ε : ℝ, 0 < ε ∧ ε < 1/3 ∧ ∀ t : I, (t:ℝ) ≤ ε → + (Γ t).1 ∈ c.source.source ∧ (Γ t).2 ∈ c.source.source ∧ + c.source (Γ t).1 0 = 0 ∧ c.source (Γ t).2 0 = 0 ∧ + c.source (Γ t).1 1 = -c.source (Γ t).2 1 ∧ + (0 < (t:ℝ) → c.source (Γ t).1 1 ≠ 0) := by + let Θ : ℝ → M × M := Γ ∘ projIcc 0 1 zero_le_one + have hΘ : Continuous Θ := hΓ.comp continuous_projIcc + have hΘ0 : Θ 0 = (p,p) := by + change Γ (projIcc 0 1 zero_le_one 0) = _ + have hp : projIcc 0 1 zero_le_one 0 = (0:I) := Subtype.ext (by simp [projIcc_left]) + rw [hp] + exact hzero + have hU : IsOpen (Θ ⁻¹' (c.source.source ×ˢ c.source.source)) := + (c.source.open_source.prod c.source.open_source).preimage hΘ + have h0 : (0:ℝ) ∈ Θ ⁻¹' (c.source.source ×ˢ c.source.source) := by + change (Θ 0).1 ∈ c.source.source ∧ (Θ 0).2 ∈ c.source.source + rw [hΘ0] + exact ⟨c.source_mem,c.source_mem⟩ + obtain ⟨r,hr,hball⟩ := Metric.mem_nhds_iff.mp (hU.mem_nhds h0) + let ε : ℝ := min (r/2) (1/4) + have hε : 0 < ε := lt_min (half_pos hr) (by norm_num) + have hεsmall : ε < 1/3 := (min_le_right _ _).trans_lt (by norm_num) + have hε1 : ε < 1 := hεsmall.trans (by norm_num) + have hεr : ε < r := (min_le_left _ _).trans_lt (half_lt_self hr) + refine ⟨ε,hε,hεsmall,?_⟩ + intro t ht + have hmem : Θ (t:ℝ) ∈ c.source.source ×ˢ c.source.source := by + apply hball + rw [Metric.mem_ball,Real.dist_eq,sub_zero,abs_of_nonneg t.property.1] + exact ht.trans_lt hεr + have hΘt : Θ (t:ℝ) = Γ t := by + change Γ (projIcc 0 1 zero_le_one (t:ℝ)) = Γ t + rw [projIcc_val] + rw [hΘt] at hmem + refine ⟨hmem.1,hmem.2,?_⟩ + by_cases ht0 : (t:ℝ) = 0 + · have htz : t = 0 := Subtype.ext ht0 + rw [htz,hzero] + simp [c.source_center] + · have hp := c.double_pair hmem.1 hmem.2 + (hne t (lt_of_le_of_ne t.property.1 (Ne.symm ht0)) (ht.trans_lt hε1)) (heq t) + exact ⟨hp.1,hp.2.1,hp.2.2.1,fun _ => hp.2.2.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcGermRestriction.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcGermRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..5584b5eeab49da0a2d732a591cdb50ef77e4296c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcGermRestriction.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapGermRestriction +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapConnectingArc + +namespace OAI + +/-! The same embedded connecting arc and exact parameter germs survive + a regular-locus-preserving change fixed near its singular endpoints. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f g : M → ProjectionTarget 3} {p q : M} + +theorem CrosscapConnectingArc.restrict_germs (A : CrosscapConnectingArc f p q) + (hl : g =ᶠ[𝓝 p] f) (hr : g =ᶠ[𝓝 q] f) + (hreg : ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) : + ∃ B : CrosscapConnectingArc g p q, B.arc = A.arc := by + obtain ⟨L,hL⟩ := A.left.restrict_germ hl + obtain ⟨R,hR⟩ := A.right.restrict_germ hr + refine ⟨{ + left := L + right := R + arc := A.arc + source := A.source + target := A.target + regular := fun t ht => (hreg _).mpr (A.regular t ht) + leftParameter := A.leftParameter + rightParameter := A.rightParameter + left_smooth := A.left_smooth + left_inverse_smooth := A.left_inverse_smooth + right_smooth := A.right_smooth + right_inverse_smooth := A.right_inverse_smooth + left_zero := A.left_zero + right_zero := A.right_zero + left_germ := ?_ + right_germ := ?_ },rfl⟩ + · rw [hL] + exact A.left_germ + · rw [hR] + exact A.right_germ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfc6318dd7ca9101f3d1632c8916db86c0fecbc6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapArcNeighborhood.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCompactArc + +namespace OAI + +/-! The compact half-arc contains a whole neighborhood of its endpoint +in the compactified double curve. -/ +noncomputable section +open Set Filter Metric Manifold Topology +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] in +lemma unorderedPair_mem_square {U : Set M} {z : M × M} : + unorderedPair z ∈ unorderedPair '' (U ×ˢ U) ↔ z ∈ U ×ˢ U := by + change z ∈ unorderedPair ⁻¹' (unorderedPair '' (U ×ˢ U)) ↔ _ + rw [unorderedPair_preimage_image] + simp only [mem_union,mem_prod,mem_preimage,Prod.fst_swap,Prod.snd_swap] + tauto + +theorem crosscap_arc_contains_neighborhood {F : M → ProjectionTarget 3} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F) (p q : M) + (hp : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) + {δ : ℝ} (hδ : 0 < δ) (γ : Icc (0 : ℝ) δ → UnorderedSurfacePairs M) + (hγ : ∀ s, γ s = unorderedPair + ((chart q).symm (chart q p+(s:ℝ) • tangentRay b t), + (chart q).symm (chart q p-(s:ℝ) • tangentRay b t))) : + ∃ V : Set (UnorderedSurfacePairs M), IsOpen V ∧ unorderedPair (p,p) ∈ V ∧ + compactifiedDoubleCurve F ∩ V ⊆ Set.range γ := by + obtain ⟨r,hr,_hball,_hformula,hiso,hdouble⟩ := + surface_quadratic_crosscap_chart F p q hp hφ he b t hz hreg + let a := chart q p + let w := tangentRay b t + have hw : w ≠ 0 := tangentRay_ne_zero b t + have hwn : 0 < ‖w‖ := norm_pos_iff.mpr hw + let ρ := min r (δ*‖w‖) + have hρ : 0 < ρ := lt_min hr (mul_pos hδ hwn) + let U := (chart q).source ∩ (chart q) ⁻¹' ball a ρ + have hU : IsOpen U := (chart q).isOpen_inter_preimage isOpen_ball + have hpU : p ∈ U := ⟨hp,mem_ball_self hρ⟩ + let V := unorderedPair '' (U ×ˢ U) + refine ⟨V,unorderedPair_isOpenMap _ (hU.prod hU),⟨(p,p),⟨hpU,hpU⟩,rfl⟩,?_⟩ + rintro z ⟨⟨⟨u,v⟩,hcl,hzq⟩,hzV⟩ + rw [← hzq] at hzV ⊢ + have hUV : (u,v) ∈ U ×ˢ U := unorderedPair_mem_square.mp hzV + have huS : u ∈ (chart q).source := hUV.1.1 + have hvS : v ∈ (chart q).source := hUV.2.1 + let x := chart q u + let y := chart q v + have hxρ : x ∈ ball a ρ := hUV.1.2 + have hyρ : y ∈ ball a ρ := hUV.2.2 + have hxr : x ∈ ball a r := ball_subset_ball (min_le_left _ _) hxρ + have hyr : y ∈ ball a r := ball_subset_ball (min_le_left _ _) hyρ + by_cases huv : u = v + · have hdiag : (u,u) ∈ closure (surfaceDoublePairs F) := by simpa only [huv] using hcl + have hbad := doublePairs_closure_diagonal_singular hF u hdiag + have hxsing : ¬ Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F ((chart q).symm x)) := by + rw [show (chart q).symm x = u from (chart q).left_inv huS] + exact hbad + have hxa : x = a := (hiso x hxr).mp hxsing + have hup : u = p := (chart q).injOn huS hp hxa + refine ⟨⟨0,le_rfl,hδ.le⟩,?_⟩ + rw [hγ] + simp [hup,← huv,(chart q).left_inv hp] + · have hxy : x ≠ y := fun h => huv ((chart q).injOn huS hvS h) + have heqF : F u = F v := doublePairs_closure_equal hF.continuous hcl + have hfxy : F ((chart q).symm x) = F ((chart q).symm y) := by + rw [show (chart q).symm x = u from (chart q).left_inv huS, + show (chart q).symm y = v from (chart q).left_inv hvS] + exact heqF + obtain ⟨s,_hs,hxs,hys⟩ := (hdouble x hxr y hyr hxy).mp hfxy + have hnorm : |s| * ‖w‖ < ρ := by + have h := mem_ball.mp hxρ + change ‖x-a‖ < ρ at h + rw [hxs,add_sub_cancel_left,norm_smul,Real.norm_eq_abs] at h + exact h + have hsδ : |s| < δ := by + exact (mul_lt_mul_iff_left₀ hwn).mp (hnorm.trans_le (min_le_right _ _)) + let s' : Icc (0 : ℝ) δ := ⟨|s|,abs_nonneg s,hsδ.le⟩ + refine ⟨s',?_⟩ + have hu : u = (chart q).symm (a+s • w) := by rw [← hxs]; exact ((chart q).left_inv huS).symm + have hv : v = (chart q).symm (a-s • w) := by rw [← hys]; exact ((chart q).left_inv hvS).symm + have habs : unorderedLinePair a w s = unorderedLinePair a w |s| := by + apply (unorderedLinePair_eq_iff a w hw s |s|).mpr + rcases le_total 0 s with hs | hs + · exact Or.inl (abs_of_nonneg hs).symm + · exact Or.inr (by rw [abs_of_nonpos hs,neg_neg]) + have hmap := congrArg (unorderedPairMap (chart q).symm) habs + rw [hγ,hu,hv] + exact hmap.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..d86ccde3d46bb28f4fd077ddc8bb081401f6b1eb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCoordinates.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCurve + +namespace OAI + +/-! Exact reconstruction of the two source branches from their scalar +kernel-axis parameter in the actual crosscap chart. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} +namespace SurfaceCrosscapCoordinates + +lemma axisCurve_coordinate (c : SurfaceCrosscapCoordinates f p) {x : M} + (hx : x ∈ c.source.source) (hzero : c.source x 0 = 0) : + c.axisCurve (c.source x 1) = x := by + have he : crosscapAxis (c.source x 1) = c.source x := by + rw [crosscapAxis_apply] + ext i + fin_cases i + · exact hzero.symm + · rfl + change c.source.symm (crosscapAxis (c.source x 1)) = x + rw [he,c.source.left_inv hx] + +lemma axis_pair_coordinates (c : SurfaceCrosscapCoordinates f p) {x y : M} + (hx : x ∈ c.source.source) (hy : y ∈ c.source.source) + (h0x : c.source x 0 = 0) (h0y : c.source y 0 = 0) + (hopp : c.source x 1 = -c.source y 1) : + (x,y) = (c.axisCurve (c.source x 1),c.axisCurve (-c.source x 1)) := by + apply Prod.ext + · exact (c.axisCurve_coordinate hx h0x).symm + · have he : -c.source x 1 = c.source y 1 := by linarith + rw [he,c.axisCurve_coordinate hy h0y] + +lemma axis_parameter_injective (c : SurfaceCrosscapCoordinates f p) + {Γ : ℝ → M × M} {K : Set ℝ} (hΓ : K.InjOn Γ) + (hsource : ∀ t ∈ K, (Γ t).1 ∈ c.source.source ∧ (Γ t).2 ∈ c.source.source) + (haxis : ∀ t ∈ K, c.source (Γ t).1 0 = 0 ∧ c.source (Γ t).2 0 = 0 ∧ + c.source (Γ t).1 1 = -c.source (Γ t).2 1) : + K.InjOn (fun t => c.source (Γ t).1 1) := by + intro t ht u hu he + apply hΓ ht hu + have ht' := c.axis_pair_coordinates (hsource t ht).1 (hsource t ht).2 + (haxis t ht).1 (haxis t ht).2.1 (haxis t ht).2.2 + have hu' := c.axis_pair_coordinates (hsource u hu).1 (hsource u hu).2 + (haxis u hu).1 (haxis u hu).2.1 (haxis u hu).2.2 + change ((Γ t).1,(Γ t).2) = ((Γ u).1,(Γ u).2) + dsimp only at he + rw [ht',hu',he] + +end SurfaceCrosscapCoordinates +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..264aca1c82a144891982d7558aa5b57e3f114b33 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisCurve.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapPairCoordinates + +namespace OAI + +/-! The kernel axis of an actual crosscap chart gives a smooth regular +source curve through the singular point, even though its image velocity vanishes. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def crosscapAxis : ℝ →L[ℝ] Base := + ContinuousLinearMap.pi ![0,ContinuousLinearMap.id ℝ ℝ] + +lemma crosscapAxis_apply (t : ℝ) : crosscapAxis t = ![0,t] := by + ext i + fin_cases i <;> rfl + +lemma crosscapAxis_injective : Function.Injective crosscapAxis := by + intro x y he + simpa only [crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using congrFun he 1 + +lemma crosscapAxis_regular (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) crosscapAxis t) := by + have hd : HasMFDerivAt 𝓘(ℝ) 𝓘(ℝ,Base) crosscapAxis t crosscapAxis := + crosscapAxis.hasFDerivAt.hasMFDerivAt + exact hd.mfderiv.symm ▸ crosscapAxis_injective + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} +namespace SurfaceCrosscapCoordinates + +def axisCurve (c : SurfaceCrosscapCoordinates f p) : ℝ → M := c.source.symm ∘ crosscapAxis + +theorem axis_curve (c : SurfaceCrosscapCoordinates f p) : + ∃ U : Set ℝ, IsOpen U ∧ 0 ∈ U ∧ + ContMDiffOn 𝓘(ℝ) planeModel ∞ c.axisCurve U ∧ + (∀ t ∈ U, Function.Injective (mfderiv 𝓘(ℝ) planeModel c.axisCurve t)) ∧ + c.axisCurve 0 = p ∧ + (∀ t ∈ U, c.axisCurve t ∈ c.source.source ∧ c.source (c.axisCurve t) = ![0,t]) := by + let U := crosscapAxis ⁻¹' c.source.target + have hU : IsOpen U := c.source.open_target.preimage crosscapAxis.continuous + have h0 : (0:ℝ) ∈ U := by + change crosscapAxis 0 ∈ c.source.target + rw [map_zero,← c.source_center] + exact c.source.map_source c.source_mem + have hk : ContMDiff 𝓘(ℝ) 𝓘(ℝ,Base) ∞ crosscapAxis := crosscapAxis.contDiff.contMDiff + have hs : ContMDiffOn 𝓘(ℝ) planeModel ∞ c.axisCurve U := + c.source_inverse_smooth.comp hk.contMDiffOn (fun _ ht => ht) + have hdif : c.source.symm.MDifferentiable 𝓘(ℝ,Base) planeModel := + ⟨c.source_inverse_smooth.mdifferentiableOn (by simp),c.source_smooth.mdifferentiableOn (by simp)⟩ + refine ⟨U,hU,h0,hs,?_,?_,?_⟩ + · intro t ht + change Function.Injective (mfderiv 𝓘(ℝ) planeModel (c.source.symm ∘ crosscapAxis) t) + rw [mfderiv_comp t + ((c.source_inverse_smooth.contMDiffAt (c.source.open_target.mem_nhds ht)).mdifferentiableAt (by simp)) + (hk.mdifferentiable (by simp) t)] + exact (hdif.mfderiv_injective ht).comp (crosscapAxis_regular t) + · change c.source.symm (crosscapAxis 0) = p + rw [map_zero,← c.source_center,c.source.left_inv c.source_mem] + · intro t ht + exact ⟨c.source.map_target ht,(c.source.right_inv ht).trans (crosscapAxis_apply t)⟩ + +end SurfaceCrosscapCoordinates +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisDoublePair.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisDoublePair.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc25be200d7d7842349f554675c11d6ce3e5e9da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisDoublePair.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactDoublePairs +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCoordinates + +namespace OAI + +/-! Away from zero, the opposite kernel-axis source points form genuine +double pairs of the original surface map throughout the chart domain. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} +namespace SurfaceCrosscapCoordinates + +theorem axis_double_pair (c : SurfaceCrosscapCoordinates f p) {u : ℝ} (hu : u ≠ 0) + (hplus : crosscapAxis u ∈ c.source.target) (hminus : crosscapAxis (-u) ∈ c.source.target) : + (c.axisCurve u,c.axisCurve (-u)) ∈ surfaceDoublePairs f := by + have hp : c.axisCurve u ∈ c.source.source := c.source.map_target hplus + have hm : c.axisCurve (-u) ∈ c.source.source := c.source.map_target hminus + have hpc : c.source (c.axisCurve u) = crosscapAxis u := c.source.right_inv hplus + have hmc : c.source (c.axisCurve (-u)) = crosscapAxis (-u) := c.source.right_inv hminus + constructor + · intro he + have hv := congrArg (fun x => c.source x 1) he + rw [hpc,hmc,crosscapAxis_apply,crosscapAxis_apply] at hv + simp only [Matrix.cons_val_one,Matrix.cons_val_zero] at hv + exact hu (by linarith) + · rw [c.model_eq _ hp,c.model_eq _ hm,hpc,hmc] + congr 1 + rw [crosscapAxis_apply,crosscapAxis_apply] + apply Prod.ext + · ext i + fin_cases i <;> simp [standardCrosscap] + · simp [standardCrosscap] + +end SurfaceCrosscapCoordinates +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisEndpointGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisEndpointGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..1395274aa3c9aa5c432be53b23f4ac88f5d870d8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisEndpointGerms.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisFinishGerm + +namespace OAI + +/-! Both exterior germs of the actual compact source arc can be made +exact crosscap kernel axes simultaneously, keeping every closed-arc point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p q : M} + +theorem crosscap_axis_endpoint_germs (cp : SurfaceCrosscapCoordinates f p) + (cq : SurfaceCrosscapCoordinates f q) (P : SmoothCompactArc planeModel M) + (hPs : P.curve P.start = p) (hPf : P.curve P.finish = q) + {V W : Set M} (hV : IsOpen V) (hpV : p ∈ V) (hW : IsOpen W) (hqW : q ∈ W) + (hleft : ∀ u ∈ Icc P.start P.finish, P.curve u ∈ V → + P.curve u ∈ cp.source.source ∧ cp.source (P.curve u) 0 = 0) + (hright : ∀ u ∈ Icc P.start P.finish, P.curve u ∈ W → + P.curve u ∈ cq.source.source ∧ cq.source (P.curve u) 0 = 0) : + ∃ (R : SmoothCompactArc planeModel M) (e₀ e₁ : ℝ ≃ₜ ℝ), + R.start = P.start ∧ R.finish = P.finish ∧ + EqOn R.curve P.curve (Icc P.start P.finish) ∧ + ContDiff ℝ ∞ e₀ ∧ ContDiff ℝ ∞ e₀.symm ∧ e₀ P.start = 0 ∧ + ContDiff ℝ ∞ e₁ ∧ ContDiff ℝ ∞ e₁.symm ∧ e₁ P.finish = 0 ∧ + R.curve =ᶠ[𝓝 P.start] cp.axisCurve ∘ e₀ ∧ + R.curve =ᶠ[𝓝 P.finish] cq.axisCurve ∘ e₁ := by + obtain ⟨Q,e₀,hQs,hQf,hQP,h₀s,h₀i,h₀0,hQe,_⟩ := crosscap_axis_start_germ cp P hPs hV hpV hleft + have hQq : Q.curve Q.finish = q := by + rw [hQf,hQP (right_mem_Icc.mpr P.start_lt_finish.le),hPf] + have hQright : ∀ u ∈ Icc Q.start Q.finish, Q.curve u ∈ W → + Q.curve u ∈ cq.source.source ∧ cq.source (Q.curve u) 0 = 0 := by + intro u hu huW + rw [hQs,hQf] at hu + rw [hQP hu] at huW ⊢ + exact hright u hu huW + obtain ⟨R,e₁,hRs,hRf,hRQ,h₁s,h₁i,h₁0,hRe,hRold⟩ := crosscap_axis_finish_germ cq Q hQq hW hqW hQright + have hRP : EqOn R.curve P.curve (Icc P.start P.finish) := by + intro u hu + have huQ : u ∈ Icc Q.start Q.finish := by rwa [hQs,hQf] + exact (hRQ huQ).trans (hQP hu) + refine ⟨R,e₀,e₁,hRs.trans hQs,hRf.trans hQf,hRP,h₀s,h₀i,h₀0,h₁s,h₁i,?_,?_,?_⟩ + · rwa [hQf] at h₁0 + · rw [hQs] at hRold + exact hRold.trans hQe + · rwa [hQf] at hRe + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFactor.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc8ddc04a58f6c56dac56158be60a5620c86267b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFactor.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisNormalizedDefect + +namespace OAI + +/-! Applying the axis normalization to the actual crosscap strip. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.normal_defect_axis_factor (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (d : ℝ → Base) (W : Set ℝ), ContDiff ℝ ∞ d ∧ IsOpen W ∧ + Icc A.arc.start A.arc.finish ⊆ W ∧ (∀ t ∈ W, d t ≠ 0) ∧ + ∀ t ∈ W, axisNormalizedDefect d (normalDefect S.model a) (crosscapAxis t) = + ![(t-A.arc.start)*(t-A.arc.finish),0] := by + obtain ⟨a,δ,U,hδ,hU,_hUD,hrect,hN,hz,hDp,hDq⟩ := S.nondegenerate_normal_defect hf + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ U := by + intro t ht + rw [crosscapAxis_apply] + apply hrect 0 (by constructor <;> linarith) t + constructor <;> linarith [ht.1,ht.2] + obtain ⟨d,W,hd,hW,hKW,hn,he⟩ := two_zero_axis_factor hU hN A.arc.start_lt_finish + haxis (by simpa only [crosscapAxis_apply] using hz) + (by simpa only [crosscapAxis_apply] using hDp) + (by simpa only [crosscapAxis_apply] using hDq) + let V := W ∩ {t | d t ≠ 0} + have hV : IsOpen V := hW.inter (isOpen_ne.preimage hd.continuous) + refine ⟨a,d,V,hd,hV,?_,fun _ ht => ht.2,?_⟩ + · exact fun t ht => ⟨hKW ht,hn t ht⟩ + · intro t ht + exact axisNormalizedDefect_axis ht.2 (he t ht.1) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFinishGerm.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFinishGerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a6b9a671b87f7fc717a05984d41e0d4f2610e4b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisFinishGerm.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisStartGerm +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcReverse + +namespace OAI + +/-! The terminal exterior germ can likewise be made an exact kernel-axis +germ while preserving the closed trace and the initial germ. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {q : M} + +theorem crosscap_axis_finish_germ (c : SurfaceCrosscapCoordinates f q) + (P : SmoothCompactArc planeModel M) (hPf : P.curve P.finish = q) + {V : Set M} (hV : IsOpen V) (hqV : q ∈ V) + (haxis : ∀ u ∈ Icc P.start P.finish, P.curve u ∈ V → + P.curve u ∈ c.source.source ∧ c.source (P.curve u) 0 = 0) : + ∃ (R : SmoothCompactArc planeModel M) (e : ℝ ≃ₜ ℝ), + R.start = P.start ∧ R.finish = P.finish ∧ + EqOn R.curve P.curve (Icc P.start P.finish) ∧ + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ e P.finish = 0 ∧ + R.curve =ᶠ[𝓝 P.finish] c.axisCurve ∘ e ∧ + R.curve =ᶠ[𝓝 P.start] P.curve := by + obtain ⟨S,hSs,hSf,_,hSc,_⟩ := P.reverse_arc + have hSstart : S.curve S.start = q := by rw [hSc,hSs]; simpa using hPf + have hSaxis : ∀ u ∈ Icc S.start S.finish, S.curve u ∈ V → + S.curve u ∈ c.source.source ∧ c.source (S.curve u) 0 = 0 := by + intro u hu hUV + rw [hSs,hSf] at hu + rw [hSc] at hUV ⊢ + exact haxis (-u) ⟨by linarith [hu.2],by linarith [hu.1]⟩ hUV + obtain ⟨T,e,hTs,hTf,hTS,hes,hei,he0,hTe,hTSf⟩ := + crosscap_axis_start_germ c S hSstart hV hqV hSaxis + obtain ⟨R,hRs,hRf,_,hRc,_⟩ := T.reverse_arc + let E := (Homeomorph.neg ℝ).trans e + have hEs : ContDiff ℝ ∞ E := hes.comp contDiff_neg + have hEi : ContDiff ℝ ∞ E.symm := contDiff_neg.comp hei + have hEs0 : E P.finish = 0 := by + change e (-P.finish) = 0 + rwa [hSs] at he0 + have hRS : R.start = P.start := by rw [hRs,hTf,hSf,neg_neg] + have hRF : R.finish = P.finish := by rw [hRf,hTs,hSs,neg_neg] + have hRP : EqOn R.curve P.curve (Icc P.start P.finish) := by + intro u hu + have hneg : -u ∈ Icc S.start S.finish := by rw [hSs,hSf]; constructor <;> linarith [hu.1,hu.2] + rw [hRc] + dsimp only + rw [hTS hneg,hSc] + simp only [neg_neg] + have hnFinish : Tendsto (fun u : ℝ => -u) (𝓝 P.finish) (𝓝 S.start) := by + rw [hSs] + exact continuous_neg.continuousAt + have hnStart : Tendsto (fun u : ℝ => -u) (𝓝 P.start) (𝓝 S.finish) := by + rw [hSf] + exact continuous_neg.continuousAt + have hRgerm : R.curve =ᶠ[𝓝 P.finish] c.axisCurve ∘ E := by + filter_upwards [hnFinish.eventually hTe] with u hu + rw [hRc] + exact hu + have hRold : R.curve =ᶠ[𝓝 P.start] P.curve := by + filter_upwards [hnStart.eventually hTSf] with u hu + rw [hRc] + dsimp only + rw [hu,hSc] + simp only [neg_neg] + exact ⟨R,E,hRS,hRF,hRP,hEs,hEi,hEs0,hRgerm,hRold⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisImageVelocity.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisImageVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..bcfc1a138f7f6e8aba33cb2a3a00223500bc5c67 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisImageVelocity.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapConnectingArc + +namespace OAI + +/-! Exact endpoint axis germs force zero image velocity at each crosscap. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + {f : M → ProjectionTarget 3} {p : M} + +lemma crosscap_axis_image_velocity (c : SurfaceCrosscapCoordinates f p) + {γ : ℝ → M} {a : ℝ} (e : ℝ → ℝ) (he : ContDiff ℝ ∞ e) (he0 : e a = 0) + (hγ : γ =ᶠ[𝓝 a] c.axisCurve ∘ e) : deriv (f ∘ γ) a = 0 := by + have heD := (he.differentiable (by simp) a).hasDerivAt + have haD := crosscapAxis.hasFDerivAt.comp_hasDerivAt a heD + have hstd := (standardCrosscap_hasFDerivAt (crosscapAxis (e a))).comp_hasDerivAt a haD + have hz : standardCrosscapDerivative (crosscapAxis (e a)) + (crosscapAxis (deriv e a)) = 0 := by + rw [he0,map_zero] + apply Prod.ext + · ext i + fin_cases i <;> simp [standardCrosscapDerivative,crosscapAxis_apply] + · simp [standardCrosscapDerivative,crosscapAxis_apply] + rw [hz] at hstd + have htar := (c.target_smooth.differentiable (by simp) _).hasFDerivAt.comp_hasDerivAt a hstd + have h0 : (0:Base) ∈ c.source.target := by + rw [← c.source_center] + exact c.source.map_source c.source_mem + have hnear : ∀ᶠ t in 𝓝 a, crosscapAxis (e t) ∈ c.source.target := by + apply (c.source.open_target.preimage (crosscapAxis.continuous.comp he.continuous)).mem_nhds + change crosscapAxis (e a) ∈ c.source.target + rw [he0,map_zero] + exact h0 + have hEq : f ∘ γ =ᶠ[𝓝 a] c.target ∘ (standardCrosscap ∘ (crosscapAxis ∘ e)) := by + filter_upwards [hγ,hnear] with t ht htS + have hm := c.model_eq (c.source.symm (crosscapAxis (e t))) (c.source.map_target htS) + rw [c.source.right_inv htS] at hm + simpa only [Function.comp_apply,ht,SurfaceCrosscapCoordinates.axisCurve] using hm + rw [hEq.deriv_eq] + exact htar.deriv.trans (map_zero _) + +lemma CrosscapConnectingArc.endpoint_image_velocity [T2Space M] + {q : M} (A : CrosscapConnectingArc f p q) : + deriv (f ∘ A.arc.curve) A.arc.start = 0 ∧ + deriv (f ∘ A.arc.curve) A.arc.finish = 0 := + ⟨crosscap_axis_image_velocity A.left A.leftParameter A.left_smooth A.left_zero A.left_germ, + crosscap_axis_image_velocity A.right A.rightParameter A.right_smooth A.right_zero A.right_germ⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisStartGerm.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisStartGerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fc9a35b6e49bc8f095d1fdab72babd08e07db40 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapAxisStartGerm.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCrosscapAxisTangent +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcStartGerm +import OAI.Geometry.SurfaceImmersion.Geometry.NonzeroGermDiffeomorphism + +namespace OAI + +/-! Straighten the exterior start germ to the actual crosscap kernel +axis, without changing any point of the compact source arc. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +theorem crosscap_axis_start_germ (c : SurfaceCrosscapCoordinates f p) + (P : SmoothCompactArc planeModel M) (hPs : P.curve P.start = p) + {V : Set M} (hV : IsOpen V) (hpV : p ∈ V) + (haxis : ∀ u ∈ Icc P.start P.finish, P.curve u ∈ V → + P.curve u ∈ c.source.source ∧ c.source (P.curve u) 0 = 0) : + ∃ (R : SmoothCompactArc planeModel M) (e : ℝ ≃ₜ ℝ), + R.start = P.start ∧ R.finish = P.finish ∧ + EqOn R.curve P.curve (Icc P.start P.finish) ∧ + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ e P.start = 0 ∧ + R.curve =ᶠ[𝓝 P.start] c.axisCurve ∘ e ∧ + R.curve =ᶠ[𝓝 P.finish] P.curve := by + let g : ℝ → Base := c.source ∘ P.curve + let h : ℝ → ℝ := fun t => g t 1 + let U := P.domain ∩ P.curve ⁻¹' c.source.source + have hU : IsOpen U := P.smooth.continuousOn.isOpen_inter_preimage + P.domain_open c.source.open_source + have hsP := P.interval_subset (left_mem_Icc.mpr P.start_lt_finish.le) + have hsU : P.start ∈ U := ⟨hsP,hPs ▸ c.source_mem⟩ + have hg : ContDiffOn ℝ ∞ g U := (c.source_smooth.comp + (P.smooth.mono inter_subset_left) (fun _ ht => ht.2)).contDiffOn + have hh : ContDiffOn ℝ ∞ h U := (contDiff_apply ℝ ℝ (1:Fin 2)).comp_contDiffOn hg + have hgd := (hg.contDiffAt (hU.mem_nhds hsU)).differentiableAt (by simp) + have hd1 : HasDerivAt h (deriv g P.start 1) P.start := + (ContinuousLinearMap.proj (1:Fin 2) : Base →L[ℝ] ℝ).hasFDerivAt.comp_hasDerivAt P.start hgd.hasDerivAt + have hn : deriv h P.start ≠ 0 := by + rw [hd1.deriv] + exact (smooth_crosscap_axis_tangent c P (left_mem_Icc.mpr P.start_lt_finish.le) + hPs hV hpV haxis).2.1 + obtain ⟨e,hes,hei,_,he⟩ := nonzero_local_germ_diffeomorphism hU hh hsU hn + have he0 : e P.start = 0 := by + rw [he.eq_of_nhds] + change c.source (P.curve P.start) 1 = 0 + rw [hPs,c.source_center] + rfl + obtain ⟨A,hA,h0A,hAs,hAr,_,_⟩ := c.axis_curve + let G : ℝ → M := c.axisCurve ∘ e + let B := e ⁻¹' A + have hB : IsOpen B := hA.preimage e.continuous + have hsB : P.start ∈ B := by change e P.start ∈ A; rwa [he0] + have hGs : ContMDiffOn 𝓘(ℝ) planeModel ∞ G B := + hAs.comp hes.contMDiff.contMDiffOn (fun _ ht => ht) + have hGr : ∀ t ∈ B, Function.Injective (mfderiv 𝓘(ℝ) planeModel G t) := by + intro t ht + exact regular_curve_reparameterization e hes hei + (hAs.contMDiffAt (hA.mem_nhds ht)) (hAr _ ht) + obtain ⟨W,hEq,hW,hsW⟩ := eventually_nhds_iff.mp he + let D := P.domain ∩ P.curve ⁻¹' V + have hD : IsOpen D := P.smooth.continuousOn.isOpen_inter_preimage P.domain_open hV + have hsD : P.start ∈ D := ⟨hsP,by change P.curve P.start ∈ V; rwa [hPs]⟩ + let O := (B ∩ W) ∩ D + have hO : IsOpen O := (hB.inter hW).inter hD + have hsO : P.start ∈ O := ⟨⟨hsB,hsW⟩,hsD⟩ + have hGP : EqOn G P.curve (O ∩ Icc P.start P.finish) := by + intro t ht + change c.axisCurve (e t) = P.curve t + rw [hEq t ht.1.1.2] + exact c.axisCurve_coordinate (haxis t ht.2 ht.1.2.2).1 (haxis t ht.2 ht.1.2.2).2 + obtain ⟨R,hRs,hRf,hRP,hRG,hRPf⟩ := P.replace_start_germ hO hsO + (hGs.mono (fun _ ht => ht.1.1)) (fun t ht => hGr t ht.1.1) hGP + exact ⟨R,e,hRs,hRf,hRP,hes,hei,he0,hRG,hRPf⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCancellationHeight.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCancellationHeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..6007daceb9255f9bea5c87dd2858d3490f551718 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCancellationHeight.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TriangularSurfaceImmersion +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCutoffBounds + +namespace OAI + +/-! The third component of a compactly supported cancellation of the +standard polynomial pair, and its exact vertical derivative. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def cancellationHeight (χ : ℝ → ℝ) (R : ℝ) (x : Base) : ℝ := + (x 1)^3-3*x 1+4*χ (x 0)*χ (x 1/R)*x 1 + +lemma cancellationHeight_smooth {χ : ℝ → ℝ} (hχ : ContDiff ℝ ∞ χ) (R : ℝ) : + ContDiff ℝ ∞ (cancellationHeight χ R) := by + have h0 : ContDiff ℝ ∞ (fun x : Base => x 0) := + (ContinuousLinearMap.proj (0 : Fin 2) : Base →L[ℝ] ℝ).contDiff + have h1 : ContDiff ℝ ∞ (fun x : Base => x 1) := + (ContinuousLinearMap.proj (1 : Fin 2) : Base →L[ℝ] ℝ).contDiff + exact ((h1.pow 3).sub (contDiff_const.mul h1)).add + (((contDiff_const.mul (hχ.comp h0)).mul (hχ.comp (h1.div_const R))).mul h1) + +lemma cancellationHeight_slice_hasDerivAt {χ : ℝ → ℝ} (hχ : ContDiff ℝ ∞ χ) + (R c y : ℝ) : + HasDerivAt (fun t => cancellationHeight χ R ![c,t]) + (3*y^2-3+4*χ c*(χ (y/R)+(y/R)*deriv χ (y/R))) y := by + have hχy : HasDerivAt (fun t => χ (t/R)) (deriv χ (y/R) / R) y := by + convert ((hχ.differentiable (by simp) (y/R)).hasDerivAt).comp y + ((hasDerivAt_id y).div_const R) using 1 + · funext t + simp only [Function.comp_apply,id_eq,div_eq_mul_inv] + · simp only [div_eq_mul_inv] + ring + have hp := (((hasDerivAt_id y).pow 3).sub ((hasDerivAt_id y).const_mul 3)).add + ((hχy.const_mul (4*χ c)).mul (hasDerivAt_id y)) + convert hp using 1 + · funext t + simp only [cancellationHeight,Matrix.cons_val_one,Matrix.cons_val_zero] + rfl + · simp only [id_eq] + ring + +lemma cancellationHeight_vertical {χ : ℝ → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχ0 : χ 0 = 1) (R : ℝ) {x : Base} (hx : x 0 = 0) : + fderiv ℝ (cancellationHeight χ R) x ![0,1] = + 3*(x 1)^2-3+4*(χ (x 1/R)+(x 1/R)*deriv χ (x 1/R)) := by + let path : ℝ → Base := fun t => ![x 0,t] + have hpath : HasDerivAt path (![0,1] : Base) (x 1) := by + apply hasDerivAt_pi.mpr + intro i + fin_cases i + · exact hasDerivAt_const (x 1) (x 0) + · exact hasDerivAt_id (x 1) + have hvalue : path (x 1) = x := by + ext i + fin_cases i <;> rfl + have hder := ((cancellationHeight_smooth hχ R).differentiable (by simp) + (path (x 1))).hasFDerivAt.comp_hasDerivAt (x 1) hpath + rw [hvalue] at hder + have hs := cancellationHeight_slice_hasDerivAt hχ R (x 0) (x 1) + have hh := hder.unique hs + simpa only [hx,hχ0,mul_one] using hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapChartTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapChartTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ce48e921484adf02a40fe4078afb3db4a321945 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapChartTransition.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalFormDirectionRegularity +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCoordinateStrip + +namespace OAI + +/-! Retain the actual smooth coordinate change from a strip chart to +an endpoint's standard crosscap chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +theorem crosscap_chart_transition (C : SurfaceCrosscapCoordinates f p) + (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + (hp : p ∈ c.source) {φ : Base → ProjectionTarget 3} + (hφ : φ =ᶠ[𝓝 (c p)] f ∘ c.symm) : + ∃ g : Base → Base, ContDiff ℝ ∞ g ∧ g (c p) = 0 ∧ + Function.Bijective (fderiv ℝ g (c p)) ∧ + φ =ᶠ[𝓝 (c p)] C.target ∘ (standardCrosscap ∘ g) := by + let V := c.target ∩ c.symm ⁻¹' C.source.source + have hV : IsOpen V := c.symm.isOpen_inter_preimage C.source.open_source + have hpV : c p ∈ V := by + refine ⟨c.map_source hp,?_⟩ + change c.symm (c p) ∈ C.source.source + rw [c.left_inv hp] + exact C.source_mem + have hlocal : ContDiffOn ℝ ∞ (C.source ∘ c.symm) V := + (C.source_smooth.comp (hci.mono inter_subset_left) (fun _ hx => hx.2)).contDiffOn + obtain ⟨U,hU,h0U,hUV,g,hg,hEq⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := c p)) hV (singleton_subset_iff.mpr hpV) hlocal + have hpU : c p ∈ U := h0U (mem_singleton _) + have hEqg := hEq.eventuallyEq_of_mem (hU.mem_nhds hpU) + have hg0 : g (c p) = 0 := by + rw [hEqg.eq_of_nhds] + change C.source (c.symm (c p)) = 0 + rw [c.left_inv hp,C.source_center] + have hDc : c.symm.MDifferentiable 𝓘(ℝ,Base) planeModel := + ⟨hci.mdifferentiableOn (by simp),hcs.mdifferentiableOn (by simp)⟩ + have hDC : C.source.MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨C.source_smooth.mdifferentiableOn (by simp),C.source_inverse_smooth.mdifferentiableOn (by simp)⟩ + have hgD : Function.Bijective (fderiv ℝ g (c p)) := by + rw [hEqg.fderiv_eq,← mfderiv_eq_fderiv,mfderiv_comp (c p) + (hDC.mdifferentiableAt hpV.2) (hDc.mdifferentiableAt hpV.1)] + exact (hDC.mfderiv_bijective hpV.2).comp (hDc.mfderiv_bijective hpV.1) + refine ⟨g,hg,hg0,hgD,?_⟩ + filter_upwards [hφ,hEqg,hV.mem_nhds hpV] with x hφx hgx hx + change φ x = C.target (standardCrosscap (g x)) + calc + φ x = f (c.symm x) := hφx + _ = C.target (standardCrosscap (C.source (c.symm x))) := C.model_eq _ hx.2 + _ = C.target (standardCrosscap (g x)) := by rw [hgx]; rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCompactArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCompactArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..00b36b8bc9e75f98261c5264de7e8ce8d6e825f3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCompactArc.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.PreparedDoubleCurve +import OAI.Geometry.SurfaceImmersion.Geometry.UnorderedPairMap + +namespace OAI + +/-! An embedded compact half-arc in the actual unordered double curve, +with its endpoint at the prepared crosscap. -/ +noncomputable section +open Set Filter Metric Manifold Topology +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +theorem crosscap_compact_half_arc (F : M → ProjectionTarget 3) (p q : M) + (hp : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∃ δ : ℝ, ∃ hδ : 0 < δ, ∃ γ : Icc (0 : ℝ) δ → UnorderedSurfacePairs M, + IsClosedEmbedding γ ∧ + (∀ s, γ s = unorderedPair + ((chart q).symm (chart q p+(s:ℝ) • tangentRay b t), + (chart q).symm (chart q p-(s:ℝ) • tangentRay b t))) ∧ + γ ⟨0,le_rfl,hδ.le⟩ = unorderedPair (p,p) ∧ + ∀ s, γ s ∈ compactifiedDoubleCurve F := by + obtain ⟨r,hr,hball,hformula,_hsing,_hdouble⟩ := + surface_quadratic_crosscap_chart F p q hp hφ he b t hz hreg + let a := chart q p + let w := tangentRay b t + let δ := r/(2*(‖w‖+1)) + have hden : 0 < 2*(‖w‖+1) := by positivity + have hδ : 0 < δ := div_pos hr hden + have hδr : δ*‖w‖ < r := by + have heq : δ*(2*(‖w‖+1)) = r := div_mul_cancel₀ r hden.ne' + have hlt : ‖w‖ < 2*(‖w‖+1) := by linarith [norm_nonneg w] + exact (mul_lt_mul_of_pos_left hlt hδ).trans_eq heq + have hcoords (s : Icc (0 : ℝ) δ) : a+(s:ℝ) • w ∈ ball a r ∧ a-(s:ℝ) • w ∈ ball a r := by + have hn : ‖(s:ℝ) • w‖ < r := by + rw [norm_smul,Real.norm_of_nonneg s.property.1] + exact (mul_le_mul_of_nonneg_right s.property.2 (norm_nonneg w)).trans_lt hδr + constructor + · simpa only [mem_ball,dist_eq_norm,add_sub_cancel_left] using hn + · simpa only [mem_ball,dist_eq_norm,sub_sub_cancel_left,norm_neg] using hn + let γ : Icc (0 : ℝ) δ → UnorderedSurfacePairs M := fun s => + unorderedPair ((chart q).symm (a+(s:ℝ) • w),(chart q).symm (a-(s:ℝ) • w)) + have hγcont : Continuous γ := by + apply unorderedPair_continuous.comp + apply Continuous.prodMk + · apply continuous_iff_continuousAt.mpr + intro s + have hc : ContinuousAt (fun u : Icc (0 : ℝ) δ => a+(u:ℝ) • w) s := by fun_prop + exact ContinuousAt.comp (f := fun u : Icc (0 : ℝ) δ => a+(u:ℝ) • w) + ((chart q).symm.continuousAt (hball (ball_subset_closedBall (hcoords s).1))) hc + · apply continuous_iff_continuousAt.mpr + intro s + have hc : ContinuousAt (fun u : Icc (0 : ℝ) δ => a-(u:ℝ) • w) s := by fun_prop + exact ContinuousAt.comp (f := fun u : Icc (0 : ℝ) δ => a-(u:ℝ) • w) + ((chart q).symm.continuousAt (hball (ball_subset_closedBall (hcoords s).2))) hc + have hchart (s : Icc (0 : ℝ) δ) : + unorderedPairMap (chart q) (γ s) = unorderedLinePair a w s := by + change unorderedPair (chart q ((chart q).symm (a+(s:ℝ) • w)), + chart q ((chart q).symm (a-(s:ℝ) • w))) = _ + rw [(chart q).right_inv (hball (ball_subset_closedBall (hcoords s).1)), + (chart q).right_inv (hball (ball_subset_closedBall (hcoords s).2))] + rfl + have hγinj : Function.Injective γ := by + intro s u hsu + apply Subtype.ext + apply unorderedLinePair_injOn_nonneg a w (tangentRay_ne_zero b t) s.property.1 u.property.1 + rw [← hchart s,← hchart u,hsu] + refine ⟨δ,hδ,γ,hγcont.isClosedEmbedding hγinj,(fun _ => rfl),?_,?_⟩ + · simp [γ,a,(chart q).left_inv hp] + · intro s + by_cases hs : (s:ℝ) = 0 + · have hγs : γ s = unorderedPair (p,p) := by simp [γ,hs,a,(chart q).left_inv hp] + rw [hγs,compactifiedDoubleCurve_diagonal] + exact crosscap_diagonal_mem_closure F p q hp hφ he b t hz hreg + · have hsp := (hcoords s).1 + have hsm := (hcoords s).2 + have hneq : (chart q).symm (a+(s:ℝ) • w) ≠ (chart q).symm (a-(s:ℝ) • w) := by + intro hsame + have hcoord := (chart q).symm.injOn (hball (ball_subset_closedBall hsp)) + (hball (ball_subset_closedBall hsm)) hsame + have htwo : (2 : ℝ) • ((s:ℝ) • w) = 0 := by + calc + _ = (a+(s:ℝ) • w)-(a-(s:ℝ) • w) := by module + _ = 0 := sub_eq_zero.mpr hcoord + have hsw : (s:ℝ) • w = 0 := (smul_eq_zero.mp htwo).resolve_left (by norm_num) + exact hs ((smul_eq_zero.mp hsw).resolve_right (tangentRay_ne_zero b t)) + have hEq : F ((chart q).symm (a+(s:ℝ) • w)) = F ((chart q).symm (a-(s:ℝ) • w)) := by + rw [hformula _ hsp,hformula _ hsm] + apply (centeredSurfaceTaylor_reflected_eq_iff hφ a _).mpr + rw [map_smul] + change (s:ℝ) • surfaceDirection φ b (a,t) = 0 + rw [hz,smul_zero] + exact ⟨_,subset_closure ⟨hneq,hEq⟩,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapComposedDirection.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapComposedDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea57db5b8c1f8d5d5259598e2ee42d149bd994b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapComposedDirection.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisDirectionJet + +namespace OAI + +/-! A source coordinate change preserves the regular direction zero of +the standard crosscap when the vertical direction is its kernel. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma crosscap_composed_direction_bijective {g : Base → Base} (hg : ContDiff ℝ ∞ g) + (p : Base) (hp : g p = 0) (hD : Function.Bijective (fderiv ℝ g p)) + (hy : fderiv ℝ g p (![0,1] : Base) 0 = 0) : + Function.Bijective (axisDirectionJet (standardCrosscap ∘ g) p) := by + have hc := bijective_base_vertical_columns (fderiv ℝ g p) hD hy + have hfirst : ∀ v : Base, fderiv ℝ (standardCrosscap ∘ g) p v = + standardCrosscapDerivative 0 (fderiv ℝ g p v) := by + intro v + rw [fderiv_comp p (standardCrosscap_smooth.differentiable (by simp) _) + (hg.differentiable (by simp) p),hp,(standardCrosscap_hasFDerivAt 0).fderiv] + rfl + have hsecond : ∀ v w : Base, + fderiv ℝ (fderiv ℝ (standardCrosscap ∘ g)) p v w = + (![fderiv ℝ g p v 1 * fderiv ℝ g p w 0 + fderiv ℝ g p v 0 * fderiv ℝ g p w 1, + 2 * fderiv ℝ g p v 1 * fderiv ℝ g p w 1],(0:ℝ)) + + standardCrosscapDerivative 0 (fderiv ℝ (fderiv ℝ g) p v w) := by + intro v w + rw [SphericalJets.secondDerivative_comp hg isOpen_univ standardCrosscap_smooth.contDiffOn + (mem_univ _) v w,hp,standardCrosscap_second,(standardCrosscap_hasFDerivAt 0).fderiv] + have hker : ∀ z : Base × ℝ, axisDirectionJet (standardCrosscap ∘ g) p z = 0 → z = 0 := by + intro z hz + rw [axisDirectionJet_apply,hfirst,hsecond] at hz + simp only [standardCrosscapDerivative_zero_apply] at hz + have hz0 := congrFun (congrArg Prod.fst hz) 0 + have hz1 := congrFun (congrArg Prod.fst hz) 1 + have hz2 := congrArg Prod.snd hz + have hb0 : fderiv ℝ g p z.1 0 = 0 := by + have hh : fderiv ℝ g p z.1 0 * fderiv ℝ g p (![0,1] : Base) 1 = 0 := by + simpa [hy] using hz0 + exact (mul_eq_zero.mp hh).resolve_right hc.1 + have hb1 : fderiv ℝ g p z.1 1 = 0 := by + have hh : 2 * fderiv ℝ g p z.1 1 * fderiv ℝ g p (![0,1] : Base) 1 = 0 := by + simpa using hz1 + have hmul := (mul_eq_zero.mp hh).resolve_right hc.1 + exact (mul_eq_zero.mp hmul).resolve_left (by norm_num) + have hzfirst : z.1 = 0 := by + apply hD.1 + rw [map_zero] + ext i + fin_cases i + · exact hb0 + · exact hb1 + have hzlast : z.2 = 0 := by + have hh : z.2 * fderiv ℝ g p (![1,0] : Base) 0 = 0 := by + simpa [hzfirst] using hz2 + exact (mul_eq_zero.mp hh).resolve_right hc.2 + exact Prod.ext hzfirst hzlast + have hi : Function.Injective (axisDirectionJet (standardCrosscap ∘ g) p) := by + intro z w he + apply sub_eq_zero.mp + apply hker + rw [map_sub,he,sub_self] + exact ⟨hi,(LinearMap.injective_iff_surjective_of_finrank_eq_finrank rfl).mp hi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapConnectingArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapConnectingArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..c387091776d366600df4ff92fe286db9fbaa040f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapConnectingArc.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisEndpointGerms +import OAI.Geometry.SurfaceImmersion.Whitney.PreparedSmoothCrosscapArc + +namespace OAI + +/-! Actual geometric data for transporting the crosscap-pair replacement. +The arc is embedded and smooth through both endpoint kernel axes. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +structure CrosscapConnectingArc (f : M → ProjectionTarget 3) (p q : M) where + left : SurfaceCrosscapCoordinates f p + right : SurfaceCrosscapCoordinates f q + arc : SmoothCompactArc planeModel M + source : arc.curve arc.start = p + target : arc.curve arc.finish = q + regular : ∀ t ∈ Ioo arc.start arc.finish, + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (arc.curve t)) + leftParameter : ℝ ≃ₜ ℝ + rightParameter : ℝ ≃ₜ ℝ + left_smooth : ContDiff ℝ ∞ leftParameter + left_inverse_smooth : ContDiff ℝ ∞ leftParameter.symm + right_smooth : ContDiff ℝ ∞ rightParameter + right_inverse_smooth : ContDiff ℝ ∞ rightParameter.symm + left_zero : leftParameter arc.start = 0 + right_zero : rightParameter arc.finish = 0 + left_germ : arc.curve =ᶠ[𝓝 arc.start] left.axisCurve ∘ leftParameter + right_germ : arc.curve =ᶠ[𝓝 arc.finish] right.axisCurve ∘ rightParameter + +theorem exists_crosscap_connecting_arc [CompactSpace M] {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (hsimple : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∀ q, f q = f p → q = p) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) + (p : M) (hp : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ q : M, q ≠ p ∧ ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f q) ∧ + Nonempty (CrosscapConnectingArc f p q) := by + obtain ⟨q,cp,cq,P,V,W,hqp,hq,hV,hpV,hW,hqW,hPs,hPf,hPr,hleft,hright⟩ := + prepared_smooth_crosscap_arc hf hfin hreg hsimple hrep p hp + obtain ⟨R,e₀,e₁,hRs,hRf,hRP,h₀s,h₀i,h₀0,h₁s,h₁i,h₁0,hleft',hright'⟩ := + crosscap_axis_endpoint_germs cp cq P hPs hPf hV hpV hW hqW hleft hright + refine ⟨q,hqp,hq,⟨⟨cp,cq,R,?_,?_,?_,e₀,e₁,h₀s,h₀i,h₁s,h₁i,?_,?_,?_,?_⟩⟩⟩ + · rw [hRs,hRP (left_mem_Icc.mpr P.start_lt_finish.le),hPs] + · rw [hRf,hRP (right_mem_Icc.mpr P.start_lt_finish.le),hPf] + · intro t ht + rw [hRs,hRf] at ht + rw [hRP ⟨ht.1.le,ht.2.le⟩] + exact hPr t ht + · rwa [hRs] + · rwa [hRf] + · rwa [hRs] + · rwa [hRf] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..9199a89e44051415a2363399428f66b06647fbfa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateRegularity.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapChartTransition +import OAI.Geometry.SurfaceImmersion.Geometry.NormalDefectDomain + +namespace OAI + +/-! Nondegenerate direction zeros are retained in the actual full-arc +coordinates, at both singular endpoints. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +lemma crosscap_coordinate_direction_regularity (C : SurfaceCrosscapCoordinates f p) + (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + (hp : p ∈ c.source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (hEq : φ =ᶠ[𝓝 (c p)] f ∘ c.symm) + (hv : fderiv ℝ φ (c p) (![0,1] : Base) = 0) : + Function.Bijective (fderiv ℝ (surfaceDirection φ true) (c p,0)) := by + obtain ⟨g,hg,hgp,hgD,hgEq⟩ := crosscap_chart_transition C c hcs hci hp hEq + have htD : C.target.MDifferentiable 𝓘(ℝ,Base × ℝ) 𝓘(ℝ,ProjectionTarget 3) := + ⟨C.target_smooth.contMDiff.contMDiffOn.mdifferentiableOn (by simp), + C.target_inverse_smooth.contMDiffOn.mdifferentiableOn (by simp)⟩ + have htbij : Function.Bijective (fderiv ℝ C.target 0) := by + rw [← mfderiv_eq_fderiv] + exact htD.mfderiv_bijective C.target_mem + exact normal_form_direction_regularity hφ hg C.target_smooth (c p) hgp hgD htbij hgEq hv + +variable {q : M} {A : CrosscapConnectingArc f p q} + +lemma CrosscapCoordinateStrip.endpoint_direction_regular (S : CrosscapCoordinateStrip A) : + Function.Bijective (fderiv ℝ (surfaceDirection S.model true) (![0,A.arc.start],0)) ∧ + Function.Bijective (fderiv ℝ (surfaceDirection S.model true) (![0,A.arc.finish],0)) := by + have hpsource : p ∈ S.chart.source := + (congrArg (fun y => y ∈ S.chart.source) A.source).mp + (S.axis _ (left_mem_Icc.mpr A.arc.start_lt_finish.le)).1 + have hqsource : q ∈ S.chart.source := + (congrArg (fun y => y ∈ S.chart.source) A.target).mp + (S.axis _ (right_mem_Icc.mpr A.arc.start_lt_finish.le)).1 + have hpchart : S.chart p = ![0,A.arc.start] := + (congrArg S.chart A.source).symm.trans + (S.axis _ (left_mem_Icc.mpr A.arc.start_lt_finish.le)).2 + have hqchart : S.chart q = ![0,A.arc.finish] := + (congrArg S.chart A.target).symm.trans + (S.axis _ (right_mem_Icc.mpr A.arc.start_lt_finish.le)).2 + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ S.domain := by + intro t ht + apply S.rectangle 0 ⟨by linarith [S.width_pos],by linarith [S.width_pos]⟩ t + constructor <;> linarith [S.width_pos,ht.1,ht.2] + have hpdom : S.chart p ∈ S.domain := by rw [hpchart]; exact haxis _ (left_mem_Icc.mpr A.arc.start_lt_finish.le) + have hqdom : S.chart q ∈ S.domain := by rw [hqchart]; exact haxis _ (right_mem_Icc.mpr A.arc.start_lt_finish.le) + have hpV : fderiv ℝ S.model (S.chart p) (![0,1] : Base) = 0 := by rw [hpchart]; exact S.left_vertical + have hqV : fderiv ℝ S.model (S.chart q) (![0,1] : Base) = 0 := by rw [hqchart]; exact S.right_vertical + constructor + · simpa only [hpchart] using crosscap_coordinate_direction_regularity A.left S.chart + S.chart_smooth S.inverse_smooth hpsource S.model_smooth + (S.model_eq.eventuallyEq_of_mem (S.domain_open.mem_nhds hpdom)) hpV + · simpa only [hqchart] using crosscap_coordinate_direction_regularity A.right S.chart + S.chart_smooth S.inverse_smooth hqsource S.model_smooth + (S.model_eq.eventuallyEq_of_mem (S.domain_open.mem_nhds hqdom)) hqV + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateStrip.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateStrip.lean new file mode 100644 index 0000000000000000000000000000000000000000..169fb733084e80dbb3e118b6b90ea8efd94c8bf5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCoordinateStrip.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTransverseDerivative + +namespace OAI + +/-! The actual map on a rectangular source strip through two crosscaps, +with a nonzero transverse derivative along the entire central arc. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] +variable {f : M → ProjectionTarget 3} {p q : M} + +structure CrosscapCoordinateStrip (A : CrosscapConnectingArc f p q) where + chart : OpenPartialHomeomorph M Base + width : ℝ + width_pos : 0 < width + chart_smooth : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ chart chart.source + inverse_smooth : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ chart.symm chart.target + model : Base → ProjectionTarget 3 + model_smooth : ContDiff ℝ ∞ model + domain : Set Base + domain_open : IsOpen domain + domain_target : domain ⊆ chart.target + model_eq : EqOn model (f ∘ chart.symm) domain + axis : ∀ t ∈ Icc A.arc.start A.arc.finish, + A.arc.curve t ∈ chart.source ∧ chart (A.arc.curve t) = ![0,t] + rectangle : ∀ x ∈ Icc (-width) width, + ∀ t ∈ Icc (A.arc.start-width) (A.arc.finish+width), (![x,t] : Base) ∈ domain + transverse : ∀ t ∈ Icc A.arc.start A.arc.finish, + fderiv ℝ model (![0,t] : Base) (![1,0] : Base) ≠ 0 + interior_regular : ∀ t ∈ Ioo A.arc.start A.arc.finish, + Function.Injective (fderiv ℝ model (![0,t] : Base)) + left_vertical : fderiv ℝ model (![0,A.arc.start] : Base) (![0,1] : Base) = 0 + right_vertical : fderiv ℝ model (![0,A.arc.finish] : Base) (![0,1] : Base) = 0 + +theorem exists_crosscap_coordinate_strip + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (A : CrosscapConnectingArc f p q) : Nonempty (CrosscapCoordinateStrip A) := by + obtain ⟨c,δ,φ,U,hδ,hcs,hci,hφ,hU,hUt,hEq,haxis,hrect⟩ := source_map_representative A.arc hf + have hUaxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := by + intro t ht + apply hrect 0 ⟨by linarith,by linarith⟩ t + constructor <;> linarith [ht.1,ht.2] + have hrecover : ∀ t ∈ Icc A.arc.start A.arc.finish, c.symm (![0,t] : Base) = A.arc.curve t := by + intro t ht + rw [← (haxis t ht).2,c.left_inv (haxis t ht).1] + have hleft : fderiv ℝ φ (![0,A.arc.start] : Base) (![0,1] : Base) = 0 := + (coordinate_axis_derivative A.arc c hf hφ hEq haxis hUaxis + (left_mem_Icc.mpr A.arc.start_lt_finish.le)).trans A.endpoint_image_velocity.1 + have hright : fderiv ℝ φ (![0,A.arc.finish] : Base) (![0,1] : Base) = 0 := + (coordinate_axis_derivative A.arc c hf hφ hEq haxis hUaxis + (right_mem_Icc.mpr A.arc.start_lt_finish.le)).trans A.endpoint_image_velocity.2 + have hregular : ∀ t ∈ Ioo A.arc.start A.arc.finish, + Function.Injective (fderiv ℝ φ (![0,t] : Base)) := by + intro t ht + apply (coordinate_representative_immersion_iff c hcs hci hf hU hUt hEq (hUaxis t ⟨ht.1.le,ht.2.le⟩)).mpr + rw [hrecover t ⟨ht.1.le,ht.2.le⟩] + exact A.regular t ht + refine ⟨⟨c,δ,hδ,hcs,hci,φ,hφ,U,hU,hUt,hEq,haxis,hrect,?_,hregular,hleft,hright⟩⟩ + intro t ht + by_cases hl : t = A.arc.start + · subst t + apply horizontal_ne_zero_of_vertical_zero _ ?_ hleft + apply coordinate_representative_derivative_ne_zero c hcs hci hf hU hUt hEq (hUaxis _ ht) + rw [hrecover _ ht,A.source] + exact A.left.derivative_ne_zero hf + · by_cases hr : t = A.arc.finish + · subst t + apply horizontal_ne_zero_of_vertical_zero _ ?_ hright + apply coordinate_representative_derivative_ne_zero c hcs hci hf hU hUt hEq (hUaxis _ ht) + rw [hrecover _ ht,A.target] + exact A.right.derivative_ne_zero hf + · have hreg := hregular t ⟨lt_of_le_of_ne ht.1 (Ne.symm hl),lt_of_le_of_ne ht.2 hr⟩ + intro hz + have hh := hreg (hz.trans (map_zero _).symm) + have h0 := congrFun hh 0 + norm_num at h0 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCutoffBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCutoffBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..df2dbde5323b5a23a32a78e07cb4151aa3e6d52c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapCutoffBounds.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A smooth compact cutoff with the derivative bound needed to remove a +polynomial pair of crosscaps on a fixed rectangle. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem exists_crosscap_cutoff : + ∃ (χ : ℝ → ℝ) (C : ℝ), ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ 0 ≤ C ∧ + (∀ t, |t| ≤ 1 → χ t = 1 ∧ deriv χ t = 0) ∧ + ∀ t, |χ t+t*deriv χ t| ≤ C := by + obtain ⟨χ,hχ,hcompact,_hvalues,_hsupp,hone⟩ := CollarVelocity.compact_cutoff + (K := Icc (-2 : ℝ) 2) (U := Ioo (-3 : ℝ) 3) isCompact_Icc isOpen_Ioo + (fun x hx => ⟨by linarith [hx.1],by linarith [hx.2]⟩) + have hcont : Continuous (fun t => χ t+t*deriv χ t) := + hχ.continuous.add (continuous_id.mul (hχ.continuous_deriv (by simp))) + obtain ⟨D,hD⟩ := hcompact.exists_bound_of_continuousOn hcont.continuousOn + refine ⟨χ,1+|D|,hχ,hcompact,by positivity,?_,?_⟩ + · intro t ht + have hI : t ∈ Ioo (-2 : ℝ) 2 := by + obtain ⟨hl,hr⟩ := abs_le.mp ht + exact ⟨by linarith,by linarith⟩ + have he : χ =ᶠ[𝓝 t] fun _ => (1 : ℝ) := by + filter_upwards [isOpen_Ioo.mem_nhds hI] with y hy + exact hone y ⟨hy.1.le,hy.2.le⟩ + exact ⟨he.self_of_nhds,by rw [he.deriv_eq]; simp⟩ + · intro t + by_cases ht : t ∈ tsupport χ + · exact (hD t ht).trans (by linarith [le_abs_self D]) + · rw [image_eq_zero_of_notMem_tsupport ht,deriv_of_notMem_tsupport ht] + simp only [mul_zero, add_zero, abs_zero] + positivity + +theorem exists_crosscap_cutoff_scale : + ∃ (χ : ℝ → ℝ) (R : ℝ), ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ 0 < R ∧ + χ 0 = 1 ∧ ∀ y : ℝ, + 0 < 3*y^2-3+4*(χ (y/R)+(y/R)*deriv χ (y/R)) := by + obtain ⟨χ,C,hχ,hcompact,hC,hone,hbound⟩ := exists_crosscap_cutoff + let R := C+2 + have hR : 0 < R := by dsimp [R]; linarith + refine ⟨χ,R,hχ,hcompact,hR,(hone 0 (by norm_num)).1,?_⟩ + intro y + by_cases hy : |y/R| ≤ 1 + · obtain ⟨hχy,hdy⟩ := hone (y/R) hy + rw [hχy,hdy] + nlinarith [sq_nonneg y] + · have hRy : R < |y| := by + have hh : 1 < |y| / R := by simpa only [abs_div,abs_of_pos hR] using lt_of_not_ge hy + simpa only [one_mul] using (lt_div_iff₀ hR).mp hh + have hsq : R^2 ≤ y^2 := by + have hh := mul_self_le_mul_self hR.le hRy.le + simpa only [← pow_two,sq_abs] using hh + have hl := (abs_le.mp (hbound (y/R))).1 + have hmargin : 0 < 3*R^2-3-4*C := by + dsimp [R] + nlinarith [sq_nonneg C] + nlinarith + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDerivativeNonzero.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDerivativeNonzero.lean new file mode 100644 index 0000000000000000000000000000000000000000..a29e03de9dad3cecaeed45c2cbcd6501f044f3d7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDerivativeNonzero.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisImageVelocity + +namespace OAI + +/-! The derivative at an actual crosscap has rank at least one. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + {f : M → ProjectionTarget 3} {p : M} + +lemma SurfaceCrosscapCoordinates.derivative_ne_zero (c : SurfaceCrosscapCoordinates f p) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p ≠ 0 := by + intro hzero + have h0 : (0:Base) ∈ c.source.target := by + rw [← c.source_center] + exact c.source.map_source c.source_mem + have hinv : c.source.symm 0 = p := by + rw [← c.source_center,c.source.left_inv c.source_mem] + have hstd0 : standardCrosscap (0:Base) = 0 := by + apply Prod.ext + · ext i; fin_cases i <;> simp [standardCrosscap] + · simp [standardCrosscap] + have heq : f ∘ c.source.symm =ᶠ[𝓝 (0:Base)] c.target ∘ standardCrosscap := by + filter_upwards [c.source.open_target.mem_nhds h0] with x hx + have h := c.model_eq (c.source.symm x) (c.source.map_target hx) + rwa [c.source.right_inv hx] at h + have hcomp0 : fderiv ℝ (f ∘ c.source.symm) 0 = 0 := by + rw [← mfderiv_eq_fderiv,mfderiv_comp 0 (hf.mdifferentiable (by simp) _) + ((c.source_inverse_smooth.contMDiffAt (c.source.open_target.mem_nhds h0)).mdifferentiableAt (by simp)), + ] + have hz : mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (c.source.symm 0) = 0 := + hinv.symm ▸ hzero + rw [hz] + exact ContinuousLinearMap.zero_comp _ + have htD : c.target.MDifferentiable 𝓘(ℝ,Base × ℝ) 𝓘(ℝ,ProjectionTarget 3) := + ⟨c.target_smooth.contMDiff.contMDiffOn.mdifferentiableOn (by simp), + c.target_inverse_smooth.contMDiffOn.mdifferentiableOn (by simp)⟩ + have htI : Function.Injective (fderiv ℝ c.target 0) := by + rw [← mfderiv_eq_fderiv] + exact htD.mfderiv_injective c.target_mem + have hv := congrArg (fun L : Base →L[ℝ] ProjectionTarget 3 => L (![1,0] : Base)) + (heq.fderiv_eq.symm.trans hcomp0) + rw [fderiv_comp 0 (c.target_smooth.differentiable (by simp) _) + (standardCrosscap_hasFDerivAt 0).differentiableAt, + (standardCrosscap_hasFDerivAt 0).fderiv,hstd0] at hv + have hval : standardCrosscapDerivative 0 (![1,0] : Base) = (0,1) := by + apply Prod.ext + · ext i; fin_cases i <;> simp [standardCrosscapDerivative] + · simp [standardCrosscapDerivative] + change fderiv ℝ c.target 0 (standardCrosscapDerivative 0 (![1,0] : Base)) = 0 at hv + rw [hval] at hv + have hh := htI (hv.trans (map_zero _).symm) + have hs := congrArg Prod.snd hh + norm_num at hs + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDiagonalClosure.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDiagonalClosure.lean new file mode 100644 index 0000000000000000000000000000000000000000..53b623601529070f5d4872f81b50b86e84e5ccf5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDiagonalClosure.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactDoublePairs +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceQuadraticDoubleChart + +namespace OAI + +/-! A prepared crosscap is an actual endpoint of the compactified +unordered double curve: distinct double pairs approach its diagonal. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem crosscap_diagonal_mem_closure (F : M → ProjectionTarget 3) (p q : M) + (hp : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + (p,p) ∈ closure (surfaceDoublePairs F) := by + obtain ⟨r,hr,hball,hformula,_hsing,_hdouble⟩ := + surface_quadratic_crosscap_chart F p q hp hφ he b t hz hreg + let a := chart q p + let w := tangentRay b t + have haT : a ∈ (chart q).target := (chart q).map_source hp + have hs := (chart q).symm.continuousAt haT + have hplus : Tendsto (fun s : ℝ => a+s • w) (𝓝 0) (𝓝 a) := by + have hc : ContinuousAt (fun s : ℝ => a+s • w) 0 := by fun_prop + simpa only [zero_smul,add_zero] using hc.tendsto + have hminus : Tendsto (fun s : ℝ => a-s • w) (𝓝 0) (𝓝 a) := by + have hc : ContinuousAt (fun s : ℝ => a-s • w) 0 := by fun_prop + simpa only [zero_smul,sub_zero] using hc.tendsto + have hnear : ∀ᶠ s in 𝓝 (0 : ℝ), a+s • w ∈ ball a r ∧ a-s • w ∈ ball a r := + (hplus.eventually (ball_mem_nhds a hr)).and (hminus.eventually (ball_mem_nhds a hr)) + obtain ⟨δ,hδ,hδnear⟩ := Metric.eventually_nhds_iff.mp hnear + let σ : ℝ → M × M := fun s => ((chart q).symm (a+s • w),(chart q).symm (a-s • w)) + have hlim : Tendsto σ (𝓝 0) (𝓝 (p,p)) := by + have h1 := hs.tendsto.comp hplus + have h2 := hs.tendsto.comp hminus + have h1' : Tendsto (fun s : ℝ => (chart q).symm (a+s • w)) (𝓝 0) (𝓝 p) := by + simpa only [Function.comp_def,a,(chart q).left_inv hp] using h1 + have h2' : Tendsto (fun s : ℝ => (chart q).symm (a-s • w)) (𝓝 0) (𝓝 p) := by + simpa only [Function.comp_def,a,(chart q).left_inv hp] using h2 + exact h1'.prodMk_nhds h2' + have hσ0 : σ 0 = (p,p) := by simp [σ,a,(chart q).left_inv hp] + have hσ : ContinuousAt σ 0 := by rw [ContinuousAt,hσ0]; exact hlim + have h0 : (0 : ℝ) ∈ closure (Ioo 0 δ) := by + rw [closure_Ioo hδ.ne] + exact ⟨le_rfl,hδ.le⟩ + have himage : σ '' Ioo 0 δ ⊆ surfaceDoublePairs F := by + rintro z ⟨s,hsδ,rfl⟩ + have hsabs : dist s 0 < δ := by rw [dist_zero_right,Real.norm_eq_abs,abs_of_pos hsδ.1]; exact hsδ.2 + obtain ⟨hsp,hsm⟩ := hδnear hsabs + have hpT := hball (ball_subset_closedBall hsp) + have hmT := hball (ball_subset_closedBall hsm) + refine ⟨?_,?_⟩ + · intro hsame + have hcoord : a+s • w = a-s • w := (chart q).symm.injOn hpT hmT hsame + have htwo : (2 : ℝ) • (s • w) = 0 := by + calc + _ = (a+s • w)-(a-s • w) := by module + _ = 0 := sub_eq_zero.mpr hcoord + have hsw : s • w = 0 := (smul_eq_zero.mp htwo).resolve_left (by norm_num) + have hs0 : s = 0 := (smul_eq_zero.mp hsw).resolve_right (tangentRay_ne_zero b t) + exact hsδ.1.ne' hs0 + · change F ((chart q).symm (a+s • w)) = F ((chart q).symm (a-s • w)) + rw [hformula _ hsp,hformula _ hsm] + apply (centeredSurfaceTaylor_reflected_eq_iff hφ a (s • w)).mpr + rw [map_smul] + change s • surfaceDirection φ b (a,t) = 0 + rw [hz,smul_zero] + have hcl := closure_mono himage (mem_closure_image hσ h0) + rwa [hσ0] at hcl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDisjointCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDisjointCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..9af639547489b9870666ac1a761e80c77fc82259 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDisjointCharts.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularCrosscapRepresentatives + +namespace OAI + +/-! Disjoint coordinate neighborhoods for the finite crosscap set. -/ +noncomputable section +open Set Filter Metric +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem finite_crosscap_chart_balls {M : Type*} [TopologicalSpace M] [T2Space M] + (P : Finset M) (e : P → OpenPartialHomeomorph M Base) + (he : ∀ p, (p : M) ∈ (e p).source) (O : P → Set Base) + (hO : ∀ p, IsOpen (O p)) (hpO : ∀ p, e p p ∈ O p) : + ∃ r : P → ℝ, (∀ p, 0 < r p ∧ + closedBall (e p p) (r p) ⊆ (e p).target ∩ O p) ∧ + Pairwise (fun p q => Disjoint ((e p).symm '' closedBall (e p p) (r p)) + ((e q).symm '' closedBall (e q q) (r q))) := by + classical + obtain ⟨V,hV,hdisj⟩ := P.finite_toSet.t2_separation + have hex (p : P) : ∃ r : ℝ, 0 < r ∧ + closedBall (e p p) r ⊆ ((e p).target ∩ O p) ∩ (e p).symm ⁻¹' V p := by + have ho : IsOpen (((e p).target ∩ O p) ∩ (e p).symm ⁻¹' V p) := by + have hv := (e p).isOpen_inter_preimage_symm (hV p).2 + have heq : ((e p).target ∩ O p) ∩ (e p).symm ⁻¹' V p = + ((e p).target ∩ (e p).symm ⁻¹' V p) ∩ O p := by + ext x + simp only [mem_inter_iff,mem_preimage] + tauto + rw [heq] + exact hv.inter (hO p) + have hp : e p p ∈ ((e p).target ∩ O p) ∩ (e p).symm ⁻¹' V p := by + refine ⟨⟨(e p).map_source (he p),hpO p⟩,?_⟩ + change (e p).symm (e p p) ∈ V p + rw [(e p).left_inv (he p)] + exact (hV p).1 + exact nhds_basis_closedBall.mem_iff.mp (ho.mem_nhds hp) + choose r hr hrsub using hex + refine ⟨r,fun p => ⟨hr p,fun x hx => (hrsub p hx).1⟩,?_⟩ + intro p q hpq + apply Set.disjoint_left.mpr + rintro x ⟨y,hy,rfl⟩ ⟨z,hz,heq⟩ + have hpV := (hrsub p hy).2 + have hqV := (hrsub q hz).2 + exact Set.disjoint_left.mp (hdisj p.property q.property + (fun hpq' => hpq (Subtype.ext hpq'))) hpV (heq ▸ hqV) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDoubleRay.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDoubleRay.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa78c2d46c61739fa07066dae3840bffbeaa3f14 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapDoubleRay.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticCrosscapIsolation + +namespace OAI + +/-! The image of the local double curve is an actual regular half-ray. +Its acceleration is forced to be nonzero by the regular direction jet. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma crosscap_kernel_acceleration_ne_zero {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) (z : Base × ℝ) + (hreg : Function.Injective (fderiv ℝ (surfaceDirection f b) z)) : + fderiv ℝ (fderiv ℝ f) z.1 (tangentRay b z.2) (tangentRay b z.2) ≠ 0 := by + intro hz + rw [(surfaceDirection_hasFDerivAt hf b z).fderiv] at hreg + have he : surfaceDirectionLinearization f b z (tangentRay b z.2,0) = + surfaceDirectionLinearization f b z 0 := by + change fderiv ℝ f z.1 ((0:ℝ) • tangentRayVelocity b)+ + fderiv ℝ (fderiv ℝ f) z.1 (tangentRay b z.2) (tangentRay b z.2) = _ + simp only [hz,zero_smul,map_zero,add_zero] + have hzero := congrArg Prod.fst (hreg he) + exact tangentRay_ne_zero b z.2 hzero + +lemma centeredSurfaceTaylor_value {f : Base → ProjectionTarget 3} + (a v : Base) : + centeredSurfaceTaylor f a (a+v) = + f a+fderiv ℝ f a v+(1/2 : ℝ) • fderiv ℝ (fderiv ℝ f) a v v := by + have hfirst : fderiv ℝ (translatedSurface f a) = fun y => fderiv ℝ f (y+a) := by + funext y + exact fderiv_comp_add_right a + unfold centeredSurfaceTaylor surfaceTaylorTwo surfaceQuadratic + rw [hfirst,fderiv_comp_add_right] + simp only [translatedSurface,zero_add,add_sub_cancel_left] + +lemma crosscap_kernel_image {f : Base → ProjectionTarget 3} + (a : Base) (b : Bool) (t : ℝ) + (hz : surfaceDirection f b (a,t) = 0) (s : ℝ) : + centeredSurfaceTaylor f a (a+s • tangentRay b t) = + f a+((s*s)/2) • fderiv ℝ (fderiv ℝ f) a (tangentRay b t) (tangentRay b t) := by + rw [centeredSurfaceTaylor_value] + have hker : fderiv ℝ f a (tangentRay b t) = 0 := hz + simp only [map_smul,hker,smul_zero,add_zero,smul_apply,smul_smul] + congr 1 + congr 1 + ring + +lemma crosscap_double_ray_injective {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (a : Base) (b : Bool) (t : ℝ) + (hreg : Function.Injective (fderiv ℝ (surfaceDirection f b) (a,t))) : + Function.Injective (fun u : ℝ => + f a+u • fderiv ℝ (fderiv ℝ f) a (tangentRay b t) (tangentRay b t)) := by + intro u v he + have hn := crosscap_kernel_acceleration_ne_zero hf b (a,t) hreg + have hs : (u-v) • fderiv ℝ (fderiv ℝ f) a (tangentRay b t) (tangentRay b t) = 0 := by + rw [sub_smul,sub_eq_zero] + exact add_left_cancel he + exact sub_eq_zero.mp ((smul_eq_zero.mp hs).resolve_right hn) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndArcs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndArcs.lean new file mode 100644 index 0000000000000000000000000000000000000000..a597994939e8c7f6030ab95e48d0a12fd3a6b392 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndArcs.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapEndpointSmoothArc +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcReverse +import OAI.Geometry.SurfaceImmersion.Geometry.RegularCurveGerms + +namespace OAI + +/-! Choose disjoint initial and terminal smooth pieces of the actual +crosscap-connecting arc, retaining genuine double-locus germs at their inner ends. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p q : M} + +theorem crosscap_end_arcs_regular (cp : SurfaceCrosscapCoordinates f p) (cq : SurfaceCrosscapCoordinates f q) + {Γ : I → M × M} (hΓ : Continuous Γ) (hinj : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (hone : Γ 1 = (q,q)) + (heq : ∀ t, f (Γ t).1 = f (Γ t).2) + (hne : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) : + ∃ (a b : ℝ) (P Q : SmoothCompactArc (planeModel.prod planeModel) (M × M)), + 0 < a ∧ a < b ∧ b < 1 ∧ + P.curve '' Icc P.start P.finish = Γ '' {t : I | (t:ℝ) ≤ a} ∧ + Q.curve '' Icc Q.start Q.finish = Γ '' {t : I | b ≤ (t:ℝ)} ∧ + P.curve P.start = (p,p) ∧ Q.curve Q.finish = (q,q) ∧ + (∀ u : I, (u:ℝ) = a → P.curve P.finish = Γ u) ∧ + (∀ u : I, (u:ℝ) = b → Q.curve Q.start = Γ u) ∧ + (∀ᶠ t in 𝓝 P.finish, P.curve t ∈ surfaceDoublePairs f) ∧ + (∀ᶠ t in 𝓝 Q.start, Q.curve t ∈ surfaceDoublePairs f) ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel (fun t => (P.curve t).1) P.start) ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel (fun t => (Q.curve t).1) Q.finish) := by + obtain ⟨a,P,ha,ha3,hPstart,hPi,hP0,hPa,hPg,hPreg⟩ := + crosscap_endpoint_smooth_arc cp hΓ hinj hzero heq hne + have hrev : Continuous (Γ ∘ unitInterval.symm) := hΓ.comp continuous_symm + have hrevInj : Function.Injective (Γ ∘ unitInterval.symm) := hinj.comp symm_bijective.injective + have hrev0 : (Γ ∘ unitInterval.symm) 0 = (q,q) := by simpa using hone + have hrevEq : ∀ t, f ((Γ ∘ unitInterval.symm) t).1 = f ((Γ ∘ unitInterval.symm) t).2 := + fun t => heq (unitInterval.symm t) + have hrevNe : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → + ((Γ ∘ unitInterval.symm) t).1 ≠ ((Γ ∘ unitInterval.symm) t).2 := by + intro t ht0 ht1 + apply hne + · change 0 < 1-(t:ℝ) + linarith + · change 1-(t:ℝ) < 1 + linarith + obtain ⟨d,R,hd,hd3,hRstart,hRi,hR0,hRd,hRg,hRreg⟩ := + crosscap_endpoint_smooth_arc cq hrev hrevInj hrev0 hrevEq hrevNe + obtain ⟨Q,hQs,hQf,hQdom,hQc,hQi⟩ := R.reverse_arc + have hQimage : Q.curve '' Icc Q.start Q.finish = Γ '' {t : I | 1-d ≤ (t:ℝ)} := by + rw [hQi,hRi] + apply Set.Subset.antisymm + · rintro y ⟨t,ht,rfl⟩ + refine ⟨unitInterval.symm t,?_,rfl⟩ + change (t:ℝ) ≤ d at ht + change 1-d ≤ 1-(t:ℝ) + linarith + · rintro y ⟨t,ht,rfl⟩ + refine ⟨unitInterval.symm t,?_,?_⟩ + · change 1-d ≤ (t:ℝ) at ht + change 1-(t:ℝ) ≤ d + linarith + · change Γ (unitInterval.symm (unitInterval.symm t)) = Γ t + rw [symm_symm] + have hQend : Q.curve Q.finish = (q,q) := by + rw [hQc,hQf] + dsimp only + rw [neg_neg] + exact hR0 + have hQbegin : ∀ u : I, (u:ℝ) = 1-d → Q.curve Q.start = Γ u := by + intro u hu + rw [hQc,hQs] + dsimp only + rw [neg_neg] + have hd' : (unitInterval.symm u : ℝ) = d := by change 1-(u:ℝ) = d; linarith + have hh := hRd (unitInterval.symm u) hd' + simpa only [Function.comp_apply,symm_symm] using hh + have hPgood : ∀ᶠ t in 𝓝 P.finish, P.curve t ∈ surfaceDoublePairs f := by + filter_upwards [P.domain_open.mem_nhds (P.interval_subset (right_mem_Icc.mpr P.start_lt_finish.le)), + eventually_ne_nhds (ne_of_gt P.start_lt_finish)] with t ht htn + exact hPg t ht htn + have hRgood : ∀ᶠ t in 𝓝 R.finish, R.curve t ∈ surfaceDoublePairs f := by + filter_upwards [R.domain_open.mem_nhds (R.interval_subset (right_mem_Icc.mpr R.start_lt_finish.le)), + eventually_ne_nhds (ne_of_gt R.start_lt_finish)] with t ht htn + exact hRg t ht htn + have hQgood : ∀ᶠ t in 𝓝 Q.start, Q.curve t ∈ surfaceDoublePairs f := by + rw [hQc,hQs] + have ht : Tendsto (fun t : ℝ => -t) (𝓝 (-R.finish)) (𝓝 R.finish) := by + simpa only [ContinuousAt,neg_neg] using (continuous_neg.continuousAt (x := -R.finish)) + exact ht.eventually hRgood + refine ⟨a,1-d,P,Q,ha,by linarith,by linarith,hPi,hQimage,hP0,hQend,hPa,hQbegin,hPgood,hQgood,?_,?_⟩ + · exact (hPreg _ (P.interval_subset (left_mem_Icc.mpr P.start_lt_finish.le))).1 + · have hfun : (fun t => (Q.curve t).1) = (fun t => (R.curve t).1) ∘ Homeomorph.neg ℝ := by + funext t + rw [hQc] + rfl + rw [hfun,hQf] + have ht := R.interval_subset (left_mem_Icc.mpr R.start_lt_finish.le) + apply regular_curve_reparameterization (Homeomorph.neg ℝ) contDiff_neg contDiff_neg + · change ContMDiffAt 𝓘(ℝ) planeModel ∞ (fun t => (R.curve t).1) (- -R.start) + rw [neg_neg] + exact contMDiffAt_fst.comp R.start (R.smooth.contMDiffAt (R.domain_open.mem_nhds ht)) + · change Function.Injective (mfderiv 𝓘(ℝ) planeModel (fun t => (R.curve t).1) (- -R.start)) + rw [neg_neg] + exact (hRreg R.start ht).1 + +theorem crosscap_end_arcs (cp : SurfaceCrosscapCoordinates f p) (cq : SurfaceCrosscapCoordinates f q) + {Γ : I → M × M} (hΓ : Continuous Γ) (hinj : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (hone : Γ 1 = (q,q)) + (heq : ∀ t, f (Γ t).1 = f (Γ t).2) + (hne : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) : + ∃ (a b : ℝ) (P Q : SmoothCompactArc (planeModel.prod planeModel) (M × M)), + 0 < a ∧ a < b ∧ b < 1 ∧ + P.curve '' Icc P.start P.finish = Γ '' {t : I | (t:ℝ) ≤ a} ∧ + Q.curve '' Icc Q.start Q.finish = Γ '' {t : I | b ≤ (t:ℝ)} ∧ + P.curve P.start = (p,p) ∧ Q.curve Q.finish = (q,q) ∧ + (∀ u : I, (u:ℝ) = a → P.curve P.finish = Γ u) ∧ + (∀ u : I, (u:ℝ) = b → Q.curve Q.start = Γ u) ∧ + (∀ᶠ t in 𝓝 P.finish, P.curve t ∈ surfaceDoublePairs f) ∧ + (∀ᶠ t in 𝓝 Q.start, Q.curve t ∈ surfaceDoublePairs f) := by + obtain ⟨a,b,P,Q,ha,hab,hb,hPi,hQi,hP0,hQ1,hPa,hQb,hPg,hQg,_,_⟩ := + crosscap_end_arcs_regular cp cq hΓ hinj hzero hone heq hne + exact ⟨a,b,P,Q,ha,hab,hb,hPi,hQi,hP0,hQ1,hPa,hQb,hPg,hQg⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpoint.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab2e7f62514d931c0a907458fe5ab9600f1dd8f1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpoint.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapArcNeighborhood + +namespace OAI + +/-! Each prepared crosscap has a genuine embedded half-interval +neighborhood in the compactified unordered double curve. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +theorem crosscap_half_arc_neighborhood {F : M → ProjectionTarget 3} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F) (p q : M) + (hp : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∃ δ : ℝ, ∃ hδ : 0 < δ, ∃ γ : Icc (0 : ℝ) δ → UnorderedSurfacePairs M, + IsClosedEmbedding γ ∧ γ ⟨0,le_rfl,hδ.le⟩ = unorderedPair (p,p) ∧ + (∀ s, γ s ∈ compactifiedDoubleCurve F) ∧ + ∃ V : Set (UnorderedSurfacePairs M), IsOpen V ∧ unorderedPair (p,p) ∈ V ∧ + compactifiedDoubleCurve F ∩ V ⊆ Set.range γ := by + obtain ⟨δ,hδ,γ,hγ,hformula,hzero,hmem⟩ := + crosscap_compact_half_arc F p q hp hφ he b t hz hreg + obtain ⟨V,hV,hpV,hsub⟩ := + crosscap_arc_contains_neighborhood hF p q hp hφ he b t hz hreg hδ γ hformula + exact ⟨δ,hδ,γ,hγ,hzero,hmem,V,hV,hpV,hsub⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5cb1e308e26cb8d2a6a2126bed5522de803c68c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointParameter.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapArcEndpoint +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCoordinates +import Mathlib.Topology.Order.IntermediateValue + +namespace OAI + +/-! A whole initial segment of the chosen embedded double arc is traced +by the explicit pair of opposite kernel-axis curves, in one orientation. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +theorem crosscap_endpoint_parameter (c : SurfaceCrosscapCoordinates f p) + {Γ : I → M × M} (hΓ : Continuous Γ) (hinj : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (heq : ∀ t, f (Γ t).1 = f (Γ t).2) + (hne : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) : + ∃ (ε s d : ℝ), 0 < ε ∧ ε < 1/3 ∧ (s = 1 ∨ s = -1) ∧ 0 < d ∧ + (fun t => (c.axisCurve (s*t),c.axisCurve (-(s*t)))) '' Icc 0 d = + Γ '' {t : I | (t:ℝ) ≤ ε} ∧ + (∀ t ∈ Icc 0 d, crosscapAxis (s*t) ∈ c.source.target ∧ + crosscapAxis (-(s*t)) ∈ c.source.target) ∧ + (∀ u : I, (u:ℝ) = ε → (c.axisCurve (s*d),c.axisCurve (-(s*d))) = Γ u) := by + obtain ⟨ε,hε,hεsmall,hcoords⟩ := crosscap_arc_endpoint c hΓ hzero heq hne + have hε1 : ε < 1 := hεsmall.trans (by norm_num) + let θ : ℝ → I := projIcc 0 1 zero_le_one + let A : ℝ → M × M := Γ ∘ θ + let v : ℝ → ℝ := fun t => c.source (A t).1 1 + have hθ : Continuous θ := continuous_projIcc + have hA : Continuous A := hΓ.comp hθ + have hθval : ∀ t ∈ Icc 0 ε, (θ t : ℝ) = t := by + intro t ht + exact congrArg Subtype.val (projIcc_of_mem zero_le_one ⟨ht.1,ht.2.trans hε1.le⟩) + have hdata : ∀ t ∈ Icc 0 ε, + (A t).1 ∈ c.source.source ∧ (A t).2 ∈ c.source.source ∧ + c.source (A t).1 0 = 0 ∧ c.source (A t).2 0 = 0 ∧ + c.source (A t).1 1 = -c.source (A t).2 1 := by + intro t ht + have h := hcoords (θ t) (by rw [hθval t ht]; exact ht.2) + exact ⟨h.1,h.2.1,h.2.2.1,h.2.2.2.1,h.2.2.2.2.1⟩ + have hAi : InjOn A (Icc 0 ε) := by + intro t ht u hu he + have hh := congrArg Subtype.val (hinj he) + change (θ t:ℝ) = (θ u:ℝ) at hh + rwa [hθval t ht,hθval u hu] at hh + have hvi : InjOn v (Icc 0 ε) := c.axis_parameter_injective hAi + (fun t ht => ⟨(hdata t ht).1,(hdata t ht).2.1⟩) + (fun t ht => ⟨(hdata t ht).2.2.1,(hdata t ht).2.2.2.1,(hdata t ht).2.2.2.2⟩) + have hvc : ContinuousOn v (Icc 0 ε) := (continuous_apply 1).comp_continuousOn + (c.source.continuousOn.comp hA.fst.continuousOn (fun t ht => (hdata t ht).1)) + have hv0 : v 0 = 0 := by + have hz : θ 0 = 0 := Subtype.ext (hθval 0 (left_mem_Icc.mpr hε.le)) + change c.source (Γ (θ 0)).1 1 = 0 + rw [hz,hzero] + exact congrFun c.source_center 1 + have hs : ∃ s : ℝ, (s = 1 ∨ s = -1) ∧ StrictMonoOn (fun t => s*v t) (Icc 0 ε) := by + rcases hvc.strictMonoOn_of_injOn_Icc' hε.le hvi with hm | hm + · exact ⟨1,Or.inl rfl,by simpa only [one_mul] using hm⟩ + · refine ⟨-1,Or.inr rfl,?_⟩ + intro x hx y hy hxy + simpa only [neg_one_mul,neg_lt_neg_iff] using hm hx hy hxy + obtain ⟨s,hs,hm⟩ := hs + have hss : s*s = 1 := by rcases hs with rfl | rfl <;> norm_num + let d := s*v ε + have hd : 0 < d := by + have h := hm (left_mem_Icc.mpr hε.le) (right_mem_Icc.mpr hε.le) hε + simpa only [hv0,mul_zero] using h + have himage : (fun t => s*v t) '' Icc 0 ε = Icc 0 d := by + have hc : ContinuousOn (fun t => s*v t) (Icc 0 ε) := continuousOn_const.mul hvc + simpa only [hv0,mul_zero] using hc.image_Icc_of_monotoneOn hε.le hm.monotoneOn + have hpair : ∀ t ∈ Icc 0 ε, A t = (c.axisCurve (v t),c.axisCurve (-(v t))) := by + intro t ht + exact c.axis_pair_coordinates (hdata t ht).1 (hdata t ht).2.1 + (hdata t ht).2.2.1 (hdata t ht).2.2.2.1 (hdata t ht).2.2.2.2 + have hAiimage : A '' Icc 0 ε = Γ '' {t : I | (t:ℝ) ≤ ε} := by + apply Set.Subset.antisymm + · rintro y ⟨t,ht,rfl⟩ + refine ⟨θ t,?_,rfl⟩ + change (θ t:ℝ) ≤ ε + rw [hθval t ht] + exact ht.2 + · rintro y ⟨t,ht,rfl⟩ + refine ⟨(t:ℝ),⟨t.property.1,ht⟩,?_⟩ + change Γ (θ (t:ℝ)) = Γ t + congr 1 + exact Subtype.ext (hθval t ⟨t.property.1,ht⟩) + refine ⟨ε,s,d,hε,hεsmall,hs,hd,?_,?_,?_⟩ + · rw [← hAiimage] + apply Set.Subset.antisymm + · rintro y ⟨t,ht,rfl⟩ + obtain ⟨u,hu,rfl⟩ := himage.symm.subset ht + refine ⟨u,hu,?_⟩ + dsimp only + rw [← mul_assoc,hss,one_mul] + exact hpair u hu + · rintro y ⟨u,hu,rfl⟩ + refine ⟨s*v u,himage.subset ⟨u,hu,rfl⟩,?_⟩ + dsimp only + rw [← mul_assoc,hss,one_mul] + exact (hpair u hu).symm + · intro t ht + obtain ⟨u,hu,rfl⟩ := himage.symm.subset ht + dsimp only + rw [← mul_assoc,hss,one_mul] + have hx : crosscapAxis (v u) = c.source (A u).1 := by + rw [crosscapAxis_apply] + ext i + fin_cases i + · exact (hdata u hu).2.2.1.symm + · rfl + have hy : crosscapAxis (-(v u)) = c.source (A u).2 := by + rw [crosscapAxis_apply] + ext i + fin_cases i + · exact (hdata u hu).2.2.2.1.symm + · have h := (hdata u hu).2.2.2.2 + change -(c.source (A u).1 1) = c.source (A u).2 1 + linarith + rw [hx,hy] + exact ⟨c.source.map_source (hdata u hu).1,c.source.map_source (hdata u hu).2.1⟩ + + · intro u hu + change (c.axisCurve (s*(s*v ε)),c.axisCurve (-(s*(s*v ε)))) = Γ u + rw [← mul_assoc,hss,one_mul,← hpair ε (right_mem_Icc.mpr hε.le)] + change Γ (θ ε) = Γ u + apply congrArg Γ + apply Subtype.ext + exact (hθval ε (right_mem_Icc.mpr hε.le)).trans hu.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointSmoothArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointSmoothArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..98f3e0dd8a422d94558be66bbc42d76ea558e927 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapEndpointSmoothArc.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisDoublePair +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapEndpointParameter +import OAI.Geometry.SurfaceImmersion.Whitney.SignedCrosscapAxis +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCompactArc + +namespace OAI + +/-! The actual initial crosscap branch has a smooth regular embedded +parameterization including its singular endpoint, with both source projections regular. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} + +theorem crosscap_endpoint_smooth_arc (c : SurfaceCrosscapCoordinates f p) + {Γ : I → M × M} (hΓ : Continuous Γ) (hinj : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (heq : ∀ t, f (Γ t).1 = f (Γ t).2) + (hne : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) : + ∃ (ε : ℝ) (P : SmoothCompactArc (planeModel.prod planeModel) (M × M)), + 0 < ε ∧ ε < 1/3 ∧ P.start = 0 ∧ + P.curve '' Icc P.start P.finish = Γ '' {t : I | (t:ℝ) ≤ ε} ∧ + P.curve P.start = (p,p) ∧ + (∀ u : I, (u:ℝ) = ε → P.curve P.finish = Γ u) ∧ + (∀ t ∈ P.domain, t ≠ P.start → P.curve t ∈ surfaceDoublePairs f) ∧ + ∀ t ∈ P.domain, + Function.Injective (mfderiv 𝓘(ℝ) planeModel (fun u => (P.curve u).1) t) ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel (fun u => (P.curve u).2) t) := by + obtain ⟨ε,s,d,hε,hε1,hs,hd,himage,htarget,hend⟩ := + crosscap_endpoint_parameter c hΓ hinj hzero heq hne + have hs0 : s ≠ 0 := by rcases hs with rfl | rfl <;> norm_num + let A : ℝ → M := fun t => c.axisCurve (s*t) + let B : ℝ → M := fun t => c.axisCurve (-(s*t)) + let V : Set ℝ := {t | crosscapAxis (s*t) ∈ c.source.target} + let W : Set ℝ := {t | crosscapAxis (-(s*t)) ∈ c.source.target} + let U := V ∩ W + have hV : IsOpen V := c.source.open_target.preimage + (crosscapAxis.continuous.comp (continuous_const.mul continuous_id)) + have hW : IsOpen W := c.source.open_target.preimage + (crosscapAxis.continuous.comp ((continuous_const.mul continuous_id).neg)) + obtain ⟨hAs,hAi,hAj⟩ := c.signed_axis_curve hs0 + have hBs : ContMDiffOn 𝓘(ℝ) planeModel ∞ B W := by + simpa only [neg_mul] using (c.signed_axis_curve (neg_ne_zero.mpr hs0)).1 + have hBi : ∀ t ∈ W, Function.Injective (mfderiv 𝓘(ℝ) planeModel B t) := by + intro t ht + change crosscapAxis (-(s*t)) ∈ c.source.target at ht + have hb := (c.signed_axis_curve (neg_ne_zero.mpr hs0)).2.1 t (by simpa only [neg_mul] using ht) + have he : (fun u => c.axisCurve (-s*u)) = B := by + funext u + dsimp only [B] + rw [neg_mul] + rw [he] at hb + exact hb + have hpair : ∀ t ∈ U, Function.Injective + (mfderiv 𝓘(ℝ) (planeModel.prod planeModel) (fun u => (A u,B u)) t) := by + intro t ht + have hAt := hAs.contMDiffAt (hV.mem_nhds ht.1) + have hBt := hBs.contMDiffAt (hW.mem_nhds ht.2) + have he := mfderiv_prodMk (hAt.mdifferentiableAt (by simp)) (hBt.mdifferentiableAt (by simp)) + have hj : Function.Injective + ((mfderiv 𝓘(ℝ) planeModel A t).prod (mfderiv 𝓘(ℝ) planeModel B t)) := by + intro x y hxy + exact hAi t ht.1 (congrArg Prod.fst hxy) + exact he.symm ▸ hj + have hPi : InjOn (fun t => (A t,B t)) (Icc 0 d) := by + intro x hx y hy hxy + exact hAj (htarget x hx).1 (htarget y hy).1 (congrArg Prod.fst hxy) + let P : SmoothCompactArc (planeModel.prod planeModel) (M × M) := + ⟨(fun t => (A t,B t)),0,d,hd,U,hV.inter hW,htarget, + (hAs.mono inter_subset_left).prodMk (hBs.mono inter_subset_right),hpair,hPi⟩ + obtain ⟨_,_,_,_,_,hK0,_⟩ := c.axis_curve + refine ⟨ε,P,hε,hε1,rfl,himage,?_,hend,?_,?_⟩ + · change (c.axisCurve (s*0),c.axisCurve (-(s*0))) = (p,p) + simp only [mul_zero,neg_zero,hK0] + · intro t ht htn + exact c.axis_double_pair (mul_ne_zero hs0 htn) ht.1 ht.2 + · intro t ht + exact ⟨hAi t ht.1,hBi t ht.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFiberIsolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFiberIsolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..abd5331005afc7e1489439260ea1af53201016df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFiberIsolation.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticCrosscapIsolation +import OAI.Geometry.SurfaceImmersion.Atlas.ChartGermImmersion + +namespace OAI + +/-! A prepared quadratic crosscap is isolated in the fiber of its own image. -/ +noncomputable section +open Set Filter Manifold Topology Metric +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem quadratic_crosscap_isolated_fiber {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) (a : Base) (b : Bool) (t : ℝ) + (hz : surfaceDirection φ b (a,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (a,t))) : + ∃ r : ℝ, 0 < r ∧ ∀ x ∈ ball a r, + centeredSurfaceTaylor φ a x = centeredSurfaceTaylor φ a a → x = a := by + obtain ⟨r,hr,hiso⟩ := centeredSurfaceTaylor_isolated_crosscap hφ a b t hz hreg + refine ⟨r,hr,?_⟩ + intro x hx heq + by_contra hne + have he := centeredSurfaceTaylor_double_reflection hφ a + (fun z hz h => (hiso z hz).mp h) hx (mem_ball_self hr) hne heq + apply hne + calc + x = (2 : ℝ) • a-((2 : ℝ) • a-x) := by module + _ = (2 : ℝ) • a-a := by rw [← he] + _ = a := by module + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +theorem chart_isolated_fiber {f : M → ProjectionTarget 3} (p q : M) + (hq : p ∈ (chart q).source) {F : Base → ProjectionTarget 3} + (he : f =ᶠ[𝓝 p] F ∘ chart q) + {r : ℝ} (hr : 0 < r) + (hiso : ∀ x ∈ ball (chart q p) r, F x = F (chart q p) → x = chart q p) : + ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ ∀ x ∈ U, f x = f p → x = p := by + have hbase : f p = F (chart q p) := he.self_of_nhds + have hball := ((chart q).continuousAt hq).preimage_mem_nhds + (ball_mem_nhds (chart q p) hr) + have hlocal : {x | f x = f p → x = p} ∈ 𝓝 p := by + filter_upwards [he,hball,(chart q).open_source.mem_nhds hq] with x hx hxball hxsrc + intro hfx + apply (chart q).injOn hxsrc hq + apply hiso _ hxball + exact hx.symm.trans (hfx.trans hbase) + obtain ⟨U,hU,hopen,hp⟩ := _root_.mem_nhds_iff.mp hlocal + exact ⟨U,hopen,hp,fun x hx => hU hx⟩ + +theorem prepared_crosscap_isolated_fiber {f : M → ProjectionTarget 3} (p q : M) + (hq : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ ∀ x ∈ U, f x = f p → x = p := by + obtain ⟨r,hr,hiso⟩ := quadratic_crosscap_isolated_fiber hφ (chart q p) b t hz hreg + exact chart_isolated_fiber p q hq he hr hiso + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFormalPair.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFormalPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..f82eb71b2ea81f8241145ef3869ef64d8cebd0d6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFormalPair.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ActualRelativeFrame +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapFramedRectangle +import OAI.Geometry.SurfaceImmersion.Whitney.NormalizedPairFilling + +namespace OAI + +/-! The compact formal differential is constructed from the actual map and +its crosscap strip. All exterior derivatives remain exact. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.formal_pair (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (V : Set Base) (B : Base → Base →L[ℝ] ProjectionTarget 3) (K : Set Base), + IsOpen V ∧ V ⊆ S.domain ∧ + (∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ V) ∧ + ContDiff ℝ ∞ B ∧ IsCompact K ∧ K ⊆ V ∧ tsupport (B-fderiv ℝ S.model) ⊆ K ∧ + (∀ x ∈ V, Function.Injective (B x)) ∧ + ∀ x ∈ V, Function.Injective (fderiv ℝ S.model x) ↔ + x ≠ crosscapAxis A.arc.start ∧ x ≠ crosscapAxis A.arc.finish := by + obtain ⟨a,d,r,O,hd,hr,hO,hOD,hrect,hN,haxis,hzeros,hIp,hIq,_hvp,_hvq,hdn,hOF⟩ := + S.normalized_defect_rectangle_framed hf + let N := axisNormalizedDefect d (normalDefect S.model a) + have hAO : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ O := by + intro t ht + rw [crosscapAxis_apply] + exact hrect 0 ⟨by linarith,by linarith⟩ t ⟨by linarith [ht.1],by linarith [ht.2]⟩ + have hK : IsCompact (crosscapAxis '' Icc A.arc.start A.arc.finish) := + isCompact_Icc.image crosscapAxis.continuous + obtain ⟨W,hW,hKW,hWO,G,hG,hGW⟩ := CollarVelocity.compact_smooth_extension hK hO + (by rintro x ⟨t,ht,rfl⟩; exact hAO t ht) hN + have hAW : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ W := + fun t ht => hKW ⟨t,ht,rfl⟩ + have hDG : ∀ x ∈ W, fderiv ℝ G x = fderiv ℝ N x := + fun x hx => (hGW.eventuallyEq_of_mem (hW.mem_nhds hx)).fderiv_eq + have hIpG : Function.Bijective (fderiv ℝ G (crosscapAxis A.arc.start)) := by + rw [hDG _ (hAW _ (left_mem_Icc.mpr A.arc.start_lt_finish.le))] + exact hIp + have hIqG : Function.Bijective (fderiv ℝ G (crosscapAxis A.arc.finish)) := by + rw [hDG _ (hAW _ (right_mem_Icc.mpr A.arc.start_lt_finish.le))] + exact hIq + obtain ⟨V,hV,hVW,hAV,hfill⟩ := normalized_pair_frame_filling hG A.arc.start_lt_finish + (hW.preimage crosscapAxis.continuous) hAW + (fun t ht => (hGW ht).trans (haxis t (hWO ht))) hIpG hIqG hW hAW + have hVO : V ⊆ O := hVW.trans hWO + obtain ⟨B,K,hB,hK,hKV,hBs,hBI⟩ := actual_relative_frame S.model_smooth a hd hV + (hVO.trans hOF) (fun x hx => hdn x (hVO hx)) (hGW.mono hVW) hfill + refine ⟨V,B,K,hV,hVO.trans hOD,hAV,hB,hK,hKV,hBs,hBI,?_⟩ + intro x hx + have hF := hOF (hVO hx) + have hbase := normalDefect_immersion_iff S.model a x (normalFrameDomain_nonzero hF) + (normalFrameDomain_transverse hF) + have he : N x = 0 ↔ normalDefect S.model a x = 0 := by + change (planeComplexFrame (d (x 1))).inverse (normalDefect S.model a x) = 0 ↔ _ + constructor + · intro he + exact (planeComplexFrame_invertible (hdn x (hVO hx))).inverse.injective + (he.trans (map_zero _).symm) + · intro he + rw [he,map_zero] + exact hbase.trans ((not_congr he).symm.trans ((not_congr (hzeros x (hVO hx))).trans not_or)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFrameHomotopy.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFrameHomotopy.lean new file mode 100644 index 0000000000000000000000000000000000000000..3321cfa52f7bec6fe09dd0412605a31abaaf18de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFrameHomotopy.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.StandardCrosscapDerivative + +namespace OAI + +/-! A concrete formal homotopy reduces the derivative of one standard +crosscap to its planar normal-defect frame. The homotopy is injective +away from the original singular point at every parameter. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def crosscapFrameHomotopy (s : ℝ) (x : Base) : Base →L[ℝ] (Base × ℝ) := + (ContinuousLinearMap.proj 0).smulRight ((![s*x 1,0],1) : Base × ℝ) + + (ContinuousLinearMap.proj 1).smulRight ((![x 0,2*x 1],0) : Base × ℝ) + +lemma crosscapFrameHomotopy_smooth : + ContDiff ℝ ∞ (fun z : ℝ × Base => crosscapFrameHomotopy z.1 z.2) := by + have hA : ContDiff ℝ ∞ (fun z : ℝ × Base => (![z.1*z.2 1,0] : Base)) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun z : ℝ × Base => z.1*z.2 1) + exact contDiff_fst.mul ((contDiff_apply ℝ ℝ 1).comp contDiff_snd) + · exact contDiff_const + have hB : ContDiff ℝ ∞ (fun z : ℝ × Base => (![z.2 0,2*z.2 1] : Base)) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · change ContDiff ℝ ∞ (fun z : ℝ × Base => z.2 0) + exact (contDiff_apply ℝ ℝ 0).comp contDiff_snd + · change ContDiff ℝ ∞ (fun z : ℝ × Base => 2*z.2 1) + exact contDiff_const.mul ((contDiff_apply ℝ ℝ 1).comp contDiff_snd) + exact (contDiff_const.smulRight (hA.prodMk contDiff_const)).add + (contDiff_const.smulRight (hB.prodMk contDiff_const)) + +lemma crosscapFrameHomotopy_one (x : Base) : + crosscapFrameHomotopy 1 x = fderiv ℝ standardCrosscap x := by + rw [(standardCrosscap_hasFDerivAt x).fderiv] + ext v : 1 + apply Prod.ext + · ext i + fin_cases i <;> simp [crosscapFrameHomotopy,standardCrosscapDerivative] <;> ring + · simp [crosscapFrameHomotopy,standardCrosscapDerivative] + +lemma crosscapFrameHomotopy_zero (x v : Base) : + crosscapFrameHomotopy 0 x v = (v 1 • (![x 0,2*x 1] : Base),v 0) := by + apply Prod.ext + · ext i + fin_cases i <;> simp [crosscapFrameHomotopy] + · simp [crosscapFrameHomotopy] + +lemma crosscapFrameHomotopy_injective_iff (s : ℝ) (x : Base) : + Function.Injective (crosscapFrameHomotopy s x) ↔ x ≠ 0 := by + constructor + · intro hi hx + have he : crosscapFrameHomotopy s x (![0,1] : Base) = + crosscapFrameHomotopy s x 0 := by + subst x + simp [crosscapFrameHomotopy] + have hh := congrFun (hi he) 1 + norm_num at hh + · intro hx u v he + have h0 : u 0 = v 0 := by + have h := congrArg Prod.snd he + simpa [crosscapFrameHomotopy] using h + have h1 : s*x 1*u 0+x 0*u 1 = s*x 1*v 0+x 0*v 1 := by + have h := congrFun (congrArg Prod.fst he) 0 + simpa [crosscapFrameHomotopy,mul_comm,mul_left_comm,mul_assoc] using h + have h2 : (2*x 1)*u 1 = (2*x 1)*v 1 := by + have h := congrFun (congrArg Prod.fst he) 1 + simpa [crosscapFrameHomotopy,mul_comm,mul_left_comm,mul_assoc] using h + have huv : u 1 = v 1 := by + by_cases hx0 : x 0 = 0 + · have hx1 : x 1 ≠ 0 := by + intro h + apply hx + ext i + fin_cases i + · exact hx0 + · exact h + exact mul_left_cancel₀ (mul_ne_zero (by norm_num) hx1) h2 + · rw [h0] at h1 + exact mul_left_cancel₀ hx0 (add_left_cancel h1) + ext i + fin_cases i + · exact h0 + · exact huv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFramedRectangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFramedRectangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4fa5bfba57ff8a81f41c8ccbe1d7b3776ece319 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapFramedRectangle.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.NormalizedFramedAxis +import OAI.Geometry.SurfaceImmersion.Whitney.FramedCrosscapDefect + +namespace OAI + +/-! The normalized rectangle is constructed from the actual crosscap strip. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.normalized_defect_rectangle_framed (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (d : ℝ → Base) (r : ℝ) (O : Set Base), + ContDiff ℝ ∞ d ∧ 0 < r ∧ IsOpen O ∧ O ⊆ S.domain ∧ + (∀ x ∈ Icc (-r) r, ∀ t ∈ Icc (A.arc.start-r) (A.arc.finish+r), (![x,t] : Base) ∈ O) ∧ + ContDiffOn ℝ ∞ (axisNormalizedDefect d (normalDefect S.model a)) O ∧ + (∀ t, crosscapAxis t ∈ O → + axisNormalizedDefect d (normalDefect S.model a) (crosscapAxis t) = + ![(t-A.arc.start)*(t-A.arc.finish),0]) ∧ + (∀ x ∈ O, axisNormalizedDefect d (normalDefect S.model a) x = 0 ↔ + x = crosscapAxis A.arc.start ∨ x = crosscapAxis A.arc.finish) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.start)) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.finish)) ∧ + (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.start) (![1,0] : Base)) 1 ≠ 0 ∧ + (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.finish) (![1,0] : Base)) 1 ≠ 0 ∧ + (∀ x ∈ O, d (x 1) ≠ 0) ∧ O ⊆ normalFrameDomain S.model a := by + obtain ⟨a,δ,U,hδ,hU,hUD,hrect,hN,hz,hDp,hDq,hUF⟩ := S.nondegenerate_normal_defect_framed hf + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ U := by + intro t ht + rw [crosscapAxis_apply] + apply hrect 0 (by constructor <;> linarith) t + constructor <;> linarith [ht.1,ht.2] + obtain ⟨d,V,W,hd,hV,hVU,hW,hKW,hWa,hGV,hGa,hGz,hDpG,hDqG,hvp,hvq,hdn⟩ := + normalized_two_zero_axis_framed hU hN A.arc.start_lt_finish haxis + (by simpa only [crosscapAxis_apply] using hz) + (by simpa only [crosscapAxis_apply] using hDp) + (by simpa only [crosscapAxis_apply] using hDq) + let O := V ∩ {x : Base | x 1 ∈ W} + have hO : IsOpen O := hV.inter (hW.preimage (continuous_apply 1)) + have hKO : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ O := by + intro t ht + refine ⟨hWa t (hKW ht),?_⟩ + simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using hKW ht + obtain ⟨r,hr,hrrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hO + (by simpa only [crosscapAxis_apply] using hKO) + refine ⟨a,d,r,O,hd,hr,hO,inter_subset_left.trans (hVU.trans hUD),hrrect, + hGV.mono inter_subset_left,?_,fun x hx => hGz x hx.1,hDpG,hDqG,hvp,hvq,fun x hx => hdn x hx.1, + inter_subset_left.trans (hVU.trans hUF)⟩ + intro t ht + apply hGa t + simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using ht.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGeometricCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGeometricCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8e10f48c0be75bfcbe335a43d57269d8dbf2b75 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGeometricCancellation.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapFormalPair +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceFormalImmersion + +namespace OAI + +/-! Actual supported cancellation of the two singularities on a crosscap +connecting arc, obtained from the constructed relative differential. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] + +theorem cancel_crosscap_pair {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {p q : M} (A : CrosscapConnectingArc f p q) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + x = p ∨ x = q ∨ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + ∀ x, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) → + x ≠ p → x ≠ q → g =ᶠ[𝓝 x] f := by + obtain ⟨S⟩ := exists_crosscap_coordinate_strip hf A + obtain ⟨V,B,K,hV,hVD,hAV,hB,hK,hKV,hBs,hBI,hregV⟩ := S.formal_pair hf + let Z := crosscapAxis '' Icc A.arc.start A.arc.finish + have hZ : IsCompact Z := isCompact_Icc.image crosscapAxis.continuous + have hZV : Z ⊆ V := by rintro x ⟨t,ht,rfl⟩; exact hAV t ht + obtain ⟨U₀,hU₀,hKU₀,hK₀,hK₀V⟩ := + CollarVelocity.compact_open_thickening (hK.union hZ) hV (union_subset hKV hZV) + obtain ⟨U₁,hU₁,hK₀U₁,hK₁,hK₁V⟩ := CollarVelocity.compact_open_thickening hK₀ hV hK₀V + have hU₀i : U₀ ⊆ interior (closure U₀) := hU₀.subset_interior_iff.mpr subset_closure + have hU₁i : U₁ ⊆ interior (closure U₁) := hU₁.subset_interior_iff.mpr subset_closure + have h01 : closure U₀ ⊆ interior (closure U₁) := hK₀U₁.trans hU₁i + have hsup : tsupport (B-fderiv ℝ S.model) ⊆ interior (closure U₀) := + hBs.trans ((subset_union_left.trans hKU₀).trans hU₀i) + obtain ⟨g,hg,hout,hIg⟩ := surface_formal_immersion S.chart S.chart_smooth S.inverse_smooth hf + S.model_smooth S.domain_open S.domain_target S.model_eq hB hK₀ hK₁ h01 + (hK₁V.trans hVD) hsup (fun x hx => hBI x (hK₁V hx)) + have hrec : ∀ t ∈ Icc A.arc.start A.arc.finish, + S.chart.symm (crosscapAxis t) = A.arc.curve t := by + intro t ht + rw [crosscapAxis_apply,←(S.axis t ht).2,S.chart.left_inv (S.axis t ht).1] + have hzK : Z ⊆ closure U₁ := + ((subset_union_right.trans hKU₀).trans subset_closure).trans (h01.trans interior_subset) + have hpimage : p ∈ S.chart.symm '' closure U₁ := by + refine ⟨crosscapAxis A.arc.start,hzK ⟨A.arc.start,left_mem_Icc.mpr A.arc.start_lt_finish.le,rfl⟩,?_⟩ + rw [hrec _ (left_mem_Icc.mpr A.arc.start_lt_finish.le),A.source] + have hqimage : q ∈ S.chart.symm '' closure U₁ := by + refine ⟨crosscapAxis A.arc.finish,hzK ⟨A.arc.finish,right_mem_Icc.mpr A.arc.start_lt_finish.le,rfl⟩,?_⟩ + rw [hrec _ (right_mem_Icc.mpr A.arc.start_lt_finish.le),A.target] + have hbad : ∀ x ∈ S.chart.symm '' closure U₁, + ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) → x = p ∨ x = q := by + rintro x ⟨z,hz,rfl⟩ hx + have hzV := hK₁V hz + have hn : ¬ Function.Injective (fderiv ℝ S.model z) := by + intro hi + exact hx ((coordinate_representative_immersion_iff S.chart S.chart_smooth S.inverse_smooth hf + S.domain_open S.domain_target S.model_eq (hVD hzV)).mp hi) + have he : z = crosscapAxis A.arc.start ∨ z = crosscapAxis A.arc.finish := by + have hh : ¬ (z ≠ crosscapAxis A.arc.start ∧ z ≠ crosscapAxis A.arc.finish) := + fun hh => hn ((hregV z hzV).mpr hh) + simpa only [not_and_or,not_not] using hh + rcases he with rfl | rfl + · left + rw [hrec _ (left_mem_Icc.mpr A.arc.start_lt_finish.le),A.source] + · right + rw [hrec _ (right_mem_Icc.mpr A.arc.start_lt_finish.le),A.target] + refine ⟨g,hg,?_,?_⟩ + · intro x + rw [hIg x] + constructor + · rintro (hx | hx) + · by_cases hr : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) + · exact Or.inr (Or.inr hr) + · rcases hbad x hx hr with he | he + · exact Or.inl he + · exact Or.inr (Or.inl he) + · exact Or.inr (Or.inr hx) + · rintro (rfl | rfl | hx) + · exact Or.inl hpimage + · exact Or.inl hqimage + · exact Or.inr hx + · intro x hx hxp hxq + apply hout x + intro hi + exact (hbad x hi hx).elim hxp hxq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGermRestriction.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGermRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..75dc22f7785804179e83a8f2f7039c79dbffc7d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapGermRestriction.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCurve + +namespace OAI + +/-! An unchanged endpoint germ retains its actual crosscap chart after + restricting the source neighborhood. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f g : M → ProjectionTarget 3} {p : M} + + theorem SurfaceCrosscapCoordinates.restrict_germ (C : SurfaceCrosscapCoordinates f p) + (he : g =ᶠ[𝓝 p] f) : + ∃ D : SurfaceCrosscapCoordinates g p, D.axisCurve = C.axisCurve := by + obtain ⟨V,hV,hVO,hpV⟩ := mem_nhds_iff.mp he + let c := C.source.restrOpen V hVO + have hcp : p ∈ c.source := ⟨C.source_mem,hpV⟩ + have hcsub : c.source ⊆ C.source.source := inter_subset_left + have hct : c.target ⊆ C.source.target := by + intro x hx + have hs : c.symm x ∈ c.source := c.map_target hx + have heq : C.source (c.symm x) = x := c.right_inv hx + rw [← heq] + exact C.source.map_source (hcsub hs) + let D : SurfaceCrosscapCoordinates g p := { + source := c + target := C.target + source_mem := hcp + source_center := C.source_center + target_mem := C.target_mem + target_center := C.target_center.trans he.self_of_nhds.symm + source_smooth := C.source_smooth.mono hcsub + source_inverse_smooth := C.source_inverse_smooth.mono hct + target_smooth := C.target_smooth + target_inverse_smooth := C.target_inverse_smooth + model_mem := fun x hx => C.model_mem x (hcsub hx) + model_eq := fun x hx => (hV hx.2).trans (C.model_eq x (hcsub hx)) } + exact ⟨D,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapHalfLineChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapHalfLineChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..8884280d6b8beb5e474268111bb03037bf725179 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapHalfLineChart.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ClosedArcHalfChart +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapEndpoint + +namespace OAI + +/-! Prepared crosscaps are genuine boundary points of the compactified +unordered double curve. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] + +theorem crosscap_half_line_chart {F : M → ProjectionTarget 3} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F) (p q : M) + (hp : p ∈ (chart q).source) {φ : Base → ProjectionTarget 3} + (hφ : ContDiff ℝ ∞ φ) + (he : F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q) + (b : Bool) (t : ℝ) (hz : surfaceDirection φ b (chart q p,t) = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∃ c : OpenPartialHomeomorph (compactifiedDoubleCurve F) (Ici (0:ℝ)), + ∃ hpK : unorderedPair (p,p) ∈ compactifiedDoubleCurve F, + (⟨unorderedPair (p,p),hpK⟩ : compactifiedDoubleCurve F) ∈ c.source ∧ + c ⟨unorderedPair (p,p),hpK⟩ = ⟨0,by simp⟩ := by + obtain ⟨δ,hδ,γ,hγ,hγ0,hmem,V,hV,hpV,hsub⟩ := + crosscap_half_arc_neighborhood hF p q hp hφ he b t hz hreg + have hpγ : γ ⟨0,le_rfl,hδ.le⟩ ∈ V := by rwa [hγ0] + obtain ⟨c,hc,hc0⟩ := closed_arc_half_chart hδ γ hγ.isEmbedding hmem hV hpγ hsub + have hpK : unorderedPair (p,p) ∈ compactifiedDoubleCurve F := by + rw [← hγ0] + exact hmem _ + refine ⟨c,hpK,?_,?_⟩ + · simpa only [hγ0] using hc + · simpa only [hγ0] using hc0 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapJetStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapJetStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..14d8fc00f593978580b8d921c7a71b52b3d3212f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapJetStability.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionEstimates + +namespace OAI + +/-! A nondegenerate crosscap direction remains the only zero in a fixed +neighborhood after a sufficiently small second-jet change fixing its first jet. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem crosscap_jet_stability {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) (z : Base × ℝ) + (hzero : surfaceDirection f b z = 0) + (hreg : Function.Bijective (fderiv ℝ (surfaceDirection f b) z)) : + ∃ r δ : ℝ, 0 < r ∧ 0 < δ ∧ + ∀ g : Base → ProjectionTarget 3, ContDiff ℝ ∞ g → + fderiv ℝ g z.1 = fderiv ℝ f z.1 → + (∀ x ∈ Metric.ball z.1 r, + ‖fderiv ℝ g x-fderiv ℝ f x‖ ≤ δ ∧ + ‖fderiv ℝ (fderiv ℝ g) x-fderiv ℝ (fderiv ℝ f) x‖ ≤ δ) → + ∀ w ∈ Metric.ball z r, surfaceDirection g b w = 0 ↔ w = z := by + obtain ⟨r₀,ε,hr₀,hε,hstable⟩ := + local_linearization_stability_on (surfaceDirection_smooth hf b) z hreg + let r := min r₀ 1 + let δ := ε/(|z.2|+3) + have hr : 0 < r := lt_min hr₀ zero_lt_one + have hδ : 0 < δ := by dsimp [δ]; positivity + refine ⟨r,δ,hr,hδ,?_⟩ + intro g hg hfix hnear + have hzeroG : surfaceDirection g b z = 0 := by + simpa only [surfaceDirection,hfix] using hzero + have hclose : ∀ w ∈ Metric.ball z r, + ‖fderiv ℝ (surfaceDirection g b) w-fderiv ℝ (surfaceDirection f b) w‖ ≤ ε := by + intro w hw + have hw' : ‖w-z‖ < r := by simpa only [Metric.mem_ball,dist_eq_norm] using hw + have hwbase : w.1 ∈ Metric.ball z.1 r := by + rw [Metric.mem_ball,dist_eq_norm] + exact (norm_fst_le (w-z)).trans_lt hw' + have hθ : |w.2| ≤ |z.2|+1 := by + have hd : |w.2-z.2| ≤ 1 := by + have hh := (norm_snd_le (w-z)).trans hw'.le + change |w.2-z.2| ≤ r at hh + exact hh.trans (min_le_right _ _) + calc + _ ≤ |w.2-z.2|+|z.2| := by simpa using abs_add_le (w.2-z.2) z.2 + _ ≤ |z.2|+1 := by linarith + obtain ⟨h₁,h₂⟩ := hnear w.1 hwbase + calc + _ ≤ ‖fderiv ℝ g w.1-fderiv ℝ f w.1‖*‖tangentRayVelocity b‖ + + ‖fderiv ℝ (fderiv ℝ g) w.1-fderiv ℝ (fderiv ℝ f) w.1‖*‖tangentRay b w.2‖ := + norm_surfaceDirection_fderiv_sub hf hg b w + _ ≤ δ*1+δ*(|z.2|+2) := by + rw [tangentRayVelocity_norm] + gcongr + exact (tangentRay_norm_le b w.2).trans (by linarith) + _ = ε := by dsimp [δ]; field_simp; ring + have hinj : (Metric.ball z r).InjOn (surfaceDirection g b) := by + exact hstable _ (convex_ball z r) (Metric.ball_subset_ball (min_le_left _ _)) + _ (surfaceDirection_smooth hg b) hclose + intro w hw + constructor + · intro h + exact hinj hw (Metric.mem_ball_self hr) (h.trans hzeroG.symm) + · rintro rfl + exact hzeroG + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelCapture.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelCapture.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d08cdc54de4ab7d39fea18e235ea3eec8cc26f1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelCapture.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionEstimates + +namespace OAI + +/-! A kernel near a crosscap is captured in the same affine direction +chart, with an explicit bound on its direction parameter. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma tangentRay_sub (b : Bool) (s t : ℝ) : + tangentRay b s-tangentRay b t = (s-t) • tangentRayVelocity b := by + cases b <;> ext i <;> fin_cases i <;> simp [tangentRay,tangentRayVelocity] + +lemma exists_fixed_tangentRay_kernel (L : Base →L[ℝ] ProjectionTarget 3) + (b : Bool) (hL : ¬ Function.Injective L) (hv : L (tangentRayVelocity b) ≠ 0) : + ∃ t : ℝ, L (tangentRay b t) = 0 := by + change ¬ (∀ u v : Base, L u = L v → u = v) at hL + push Not at hL + obtain ⟨u,v,he,hne⟩ := hL + have hn : u-v ≠ 0 := sub_ne_zero.mpr hne + have hz : L (u-v) = 0 := by rw [map_sub,he,sub_self] + let w := u-v + have hw : w ≠ 0 := hn + change L w = 0 at hz + cases b + · have h0 : w 0 ≠ 0 := by + intro h0 + have hew : w = w 1 • tangentRayVelocity false := by + ext i + fin_cases i <;> simp [tangentRayVelocity,h0] + rw [hew,map_smul] at hz + have h1 := (smul_eq_zero.mp hz).resolve_right hv + apply hw + ext i + fin_cases i <;> simp [h0,h1] + refine ⟨w 1/w 0,?_⟩ + have hew : w = w 0 • tangentRay false (w 1/w 0) := by + ext i + fin_cases i + · simp [tangentRay] + · change w 1 = w 0*(w 1/w 0) + field_simp + rw [hew,map_smul] at hz + exact (smul_eq_zero.mp hz).resolve_left h0 + · have h1 : w 1 ≠ 0 := by + intro h1 + have hew : w = w 0 • tangentRayVelocity true := by + ext i + fin_cases i <;> simp [tangentRayVelocity,h1] + rw [hew,map_smul] at hz + have h0 := (smul_eq_zero.mp hz).resolve_right hv + apply hw + ext i + fin_cases i <;> simp [h0,h1] + refine ⟨w 0/w 1,?_⟩ + have hew : w = w 1 • tangentRay true (w 0/w 1) := by + ext i + fin_cases i + · change w 0 = w 1*(w 0/w 1) + field_simp + · simp [tangentRay] + rw [hew,map_smul] at hz + exact (smul_eq_zero.mp hz).resolve_left h1 + +lemma exists_near_tangentRay_kernel (L : Base →L[ℝ] ProjectionTarget 3) + (b : Bool) (t₀ η : ℝ) (hL : ¬ Function.Injective L) + (hv : L (tangentRayVelocity b) ≠ 0) + (hsmall : ‖L (tangentRay b t₀)‖ < η*‖L (tangentRayVelocity b)‖) : + ∃ t : ℝ, |t-t₀| < η ∧ L (tangentRay b t) = 0 := by + obtain ⟨t,ht⟩ := exists_fixed_tangentRay_kernel L b hL hv + refine ⟨t,?_,ht⟩ + have he : L (tangentRay b t₀) = (t₀-t) • L (tangentRayVelocity b) := by + calc + _ = L (tangentRay b t₀)-L (tangentRay b t) := by rw [ht,sub_zero] + _ = L (tangentRay b t₀-tangentRay b t) := (map_sub L _ _).symm + _ = _ := by rw [tangentRay_sub,map_smul] + rw [he,norm_smul,Real.norm_eq_abs,abs_sub_comm] at hsmall + exact (mul_lt_mul_iff_left₀ (norm_pos_iff.mpr hv)).mp hsmall + +theorem kernel_capture_near (L : Base →L[ℝ] ProjectionTarget 3) + (b : Bool) (t₀ : ℝ) (hzero : L (tangentRay b t₀) = 0) + (hv : L (tangentRayVelocity b) ≠ 0) {η : ℝ} (hη : 0 < η) : + ∃ δ : ℝ, 0 < δ ∧ ∀ H : Base →L[ℝ] ProjectionTarget 3, + ‖H-L‖ < δ → ¬ Function.Injective H → + ∃ t : ℝ, |t-t₀| < η ∧ H (tangentRay b t) = 0 := by + let U := {H : Base →L[ℝ] ProjectionTarget 3 | + ‖H (tangentRay b t₀)‖ < η*‖H (tangentRayVelocity b)‖} + have hU : IsOpen U := isOpen_lt + (ContinuousLinearMap.apply ℝ (ProjectionTarget 3) (tangentRay b t₀)).continuous.norm + (continuous_const.mul + (ContinuousLinearMap.apply ℝ (ProjectionTarget 3) (tangentRayVelocity b)).continuous.norm) + have hL : L ∈ U := by + change ‖L (tangentRay b t₀)‖ < η*‖L (tangentRayVelocity b)‖ + rw [hzero,norm_zero] + exact mul_pos hη (norm_pos_iff.mpr hv) + obtain ⟨δ,hδ,hδU⟩ := Metric.mem_nhds_iff.mp (hU.mem_nhds hL) + refine ⟨δ,hδ,?_⟩ + intro H hnear hH + have hHU : H ∈ U := hδU (by simpa only [mem_ball,dist_eq_norm] using hnear) + have hHv : H (tangentRayVelocity b) ≠ 0 := by + intro hn + change ‖H (tangentRay b t₀)‖ < η*‖H (tangentRayVelocity b)‖ at hHU + rw [hn,norm_zero,mul_zero] at hHU + exact (not_lt_of_ge (norm_nonneg _)) hHU + exact exists_near_tangentRay_kernel H b t₀ η hH hHv hHU + +lemma crosscap_transverse_derivative_ne_zero {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (b : Bool) (z : Base × ℝ) + (hreg : Function.Injective (fderiv ℝ (surfaceDirection f b) z)) : + fderiv ℝ f z.1 (tangentRayVelocity b) ≠ 0 := by + intro hn + rw [(surfaceDirection_hasFDerivAt hf b z).fderiv] at hreg + have hval : surfaceDirectionLinearization f b z ((0 : Base),1) = 0 := by + change fderiv ℝ f z.1 ((1:ℝ) • tangentRayVelocity b)+ + fderiv ℝ (fderiv ℝ f) z.1 0 (tangentRay b z.2) = 0 + simp [hn] + have he := hreg (hval.trans (map_zero _).symm) + have hh := congrArg Prod.snd he + exact one_ne_zero hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelLine.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelLine.lean new file mode 100644 index 0000000000000000000000000000000000000000..cedbc8d2fc9ac47f653d0684d729dc7e06365c93 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapKernelLine.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapKernelCapture + +namespace OAI + +/-! Explicit coordinates for the kernel line of a regular crosscap. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def tangentRayCoefficient (b : Bool) (x : Base) : ℝ := if b then x 1 else x 0 + +def tangentTransverseCoefficient (b : Bool) (t : ℝ) (x : Base) : ℝ := + if b then x 0-t*x 1 else x 1-t*x 0 + +lemma tangentRay_decomposition (b : Bool) (t : ℝ) (x : Base) : + x = tangentTransverseCoefficient b t x • tangentRayVelocity b + + tangentRayCoefficient b x • tangentRay b t := by + cases b <;> ext i <;> fin_cases i <;> + simp [tangentTransverseCoefficient,tangentRayCoefficient,tangentRayVelocity,tangentRay] <;> ring + +lemma kernel_eq_tangentRay_line (L : Base →L[ℝ] ProjectionTarget 3) + (b : Bool) (t : ℝ) (hz : L (tangentRay b t) = 0) + (hv : L (tangentRayVelocity b) ≠ 0) (x : Base) : + L x = 0 ↔ x = tangentRayCoefficient b x • tangentRay b t := by + constructor + · intro hx + have h := congrArg L (tangentRay_decomposition b t x) + simp only [hx,map_add,map_smul,hz,smul_zero,add_zero] at h + have ht : tangentTransverseCoefficient b t x = 0 := + (smul_eq_zero.mp h.symm).resolve_right hv + simpa only [ht,zero_smul,zero_add] using tangentRay_decomposition b t x + · intro hx + rw [hx,map_smul,hz,smul_zero] + +lemma crosscap_kernel_line {f : Base → ProjectionTarget 3} (hf : ContDiff ℝ ∞ f) + (b : Bool) (z : Base × ℝ) (hz : surfaceDirection f b z = 0) + (hreg : Function.Injective (fderiv ℝ (surfaceDirection f b) z)) (x : Base) : + fderiv ℝ f z.1 x = 0 ↔ x = tangentRayCoefficient b x • tangentRay b z.2 := + kernel_eq_tangentRay_line _ b z.2 hz (crosscap_transverse_derivative_ne_zero hf b z hreg) x + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf75fac8b8afcdc941fec8b7f68433f716b3523e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearCoordinates.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapDoubleRay + +namespace OAI + +/-! Explicit invertible linear coordinates adapted to the kernel of a crosscap. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def crosscapSourceLinear (b : Bool) (t : ℝ) : Base →L[ℝ] Base := + (ContinuousLinearMap.proj (0 : Fin 2)).smulRight (tangentRayVelocity b) + + (ContinuousLinearMap.proj (1 : Fin 2)).smulRight (tangentRay b t) + +lemma crosscapSourceLinear_apply (b : Bool) (t : ℝ) (x : Base) : + crosscapSourceLinear b t x = x 0 • tangentRayVelocity b + x 1 • tangentRay b t := rfl + +lemma crosscapSourceLinear_coordinates (b : Bool) (t : ℝ) (x : Base) : + tangentTransverseCoefficient b t (crosscapSourceLinear b t x) = x 0 ∧ + tangentRayCoefficient b (crosscapSourceLinear b t x) = x 1 := by + cases b <;> simp [crosscapSourceLinear_apply,tangentTransverseCoefficient, + tangentRayCoefficient,tangentRayVelocity,tangentRay] <;> ring + +lemma crosscapSourceLinear_bijective (b : Bool) (t : ℝ) : + Function.Bijective (crosscapSourceLinear b t) := by + constructor + · intro x y h + have h0 := congrArg (tangentTransverseCoefficient b t) h + have h1 := congrArg (tangentRayCoefficient b) h + rw [(crosscapSourceLinear_coordinates b t x).1, + (crosscapSourceLinear_coordinates b t y).1] at h0 + rw [(crosscapSourceLinear_coordinates b t x).2, + (crosscapSourceLinear_coordinates b t y).2] at h1 + ext i + fin_cases i + · exact h0 + · exact h1 + · intro x + refine ⟨![tangentTransverseCoefficient b t x,tangentRayCoefficient b x],?_⟩ + simpa only [crosscapSourceLinear_apply,Matrix.cons_val_zero,Matrix.cons_val_one] using + (tangentRay_decomposition b t x).symm + +def crosscapSourceEquiv (b : Bool) (t : ℝ) : Base ≃L[ℝ] Base := + ContinuousLinearEquiv.ofBijective (crosscapSourceLinear b t) + (LinearMap.ker_eq_bot.mpr (crosscapSourceLinear_bijective b t).1) + (LinearMap.range_eq_top.mpr (crosscapSourceLinear_bijective b t).2) + +/-- Reorder the linearized direction variables into the standard crosscap target coordinates. -/ +def crosscapParameterLinear (b : Bool) (t : ℝ) : + (Base × ℝ) →L[ℝ] (Base × ℝ) := + (((ContinuousLinearMap.proj (0 : Fin 2)).comp (ContinuousLinearMap.fst ℝ Base ℝ)).smulRight + (tangentRayVelocity b) + + ((1/2 : ℝ) • ((ContinuousLinearMap.proj (1 : Fin 2)).comp + (ContinuousLinearMap.fst ℝ Base ℝ))).smulRight (tangentRay b t)).prod + (ContinuousLinearMap.snd ℝ Base ℝ) + +lemma crosscapParameterLinear_apply (b : Bool) (t : ℝ) (z : Base × ℝ) : + crosscapParameterLinear b t z = + (z.1 0 • tangentRayVelocity b + (z.1 1/2) • tangentRay b t,z.2) := by + change (z.1 0 • tangentRayVelocity b + ((1/2 : ℝ)*z.1 1) • tangentRay b t,z.2) = _ + congr 2 + congr 1 + ring + +lemma crosscapParameterLinear_bijective (b : Bool) (t : ℝ) : + Function.Bijective (crosscapParameterLinear b t) := by + have hcoord (z : Base × ℝ) : + tangentTransverseCoefficient b t (crosscapParameterLinear b t z).1 = z.1 0 ∧ + tangentRayCoefficient b (crosscapParameterLinear b t z).1 = z.1 1/2 := by + have h := crosscapSourceLinear_coordinates b t (![z.1 0,z.1 1/2] : Base) + simpa only [crosscapParameterLinear_apply,crosscapSourceLinear_apply, + Matrix.cons_val_zero,Matrix.cons_val_one] using h + constructor + · intro z w h + have he := congrArg Prod.fst h + have h0 := congrArg (tangentTransverseCoefficient b t) he + have h1 := congrArg (tangentRayCoefficient b) he + rw [(hcoord z).1,(hcoord w).1] at h0 + rw [(hcoord z).2,(hcoord w).2] at h1 + apply Prod.ext + · ext i + fin_cases i + · exact h0 + · change z.1 1 = w.1 1 + linarith + · simpa only [crosscapParameterLinear_apply] using congrArg Prod.snd h + · intro z + refine ⟨(![tangentTransverseCoefficient b t z.1,2*tangentRayCoefficient b z.1],z.2),?_⟩ + rw [crosscapParameterLinear_apply] + simp only [Matrix.cons_val_zero,Matrix.cons_val_one,mul_div_cancel_left₀ _ (by norm_num : (2:ℝ) ≠ 0)] + apply Prod.ext + · convert (tangentRay_decomposition b t z.1).symm using 1 + · rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea6502913ffb97c099ee77260b418a43d6eb543d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapLinearStability.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionJet + +namespace OAI + +/-! A uniform local injectivity estimate for a nondegenerate direction map. +It will allow the quadratic jet to replace the original map near a crosscap. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance : ContinuousSMul ℝ (Base × ℝ) := Prod.continuousSMul + +lemma near_equiv_derivative_injOn (L : (Base × ℝ) ≃L[ℝ] ProjectionTarget 3) + {g : Base × ℝ → ProjectionTarget 3} {S : Set (Base × ℝ)} + (hg : ∀ x ∈ S, DifferentiableAt ℝ g x) (hS : Convex ℝ S) + {c : ℝ} (_hc : 0 ≤ c) (hsmall : ‖L.symm.toContinuousLinearMap‖*c < 1) + (hbound : ∀ x ∈ S, ‖fderiv ℝ g x-L.toContinuousLinearMap‖ ≤ c) : + S.InjOn g := by + intro x hx y hy heq + have hd : ∀ z ∈ S, DifferentiableAt ℝ (fun z => g z-L z) z := + fun z hz => (hg z hz).sub L.differentiableAt + have hb : ∀ z ∈ S, ‖fderiv ℝ (fun z => g z-L z) z‖ ≤ c := by + intro z hz + rw [fderiv_fun_sub (hg z hz) L.differentiableAt,L.fderiv] + exact hbound z hz + have herr := hS.norm_image_sub_le_of_norm_fderiv_le hd hb hx hy + have hL : ‖L (y-x)‖ ≤ c*‖y-x‖ := by + have he : (g y-L y)-(g x-L x) = -L (y-x) := by + rw [← heq,map_sub] + abel + rw [he,norm_neg] at herr + exact herr + have hback : ‖y-x‖ ≤ ‖L.symm.toContinuousLinearMap‖*‖L (y-x)‖ := by + simpa only [ContinuousLinearEquiv.coe_coe,L.symm_apply_apply] using + L.symm.toContinuousLinearMap.le_opNorm (L (y-x)) + have hn : ‖y-x‖ = 0 := by + have hh := hback.trans (mul_le_mul_of_nonneg_left hL (norm_nonneg _)) + nlinarith [norm_nonneg (y-x)] + exact (sub_eq_zero.mp (norm_eq_zero.mp hn)).symm + +theorem local_linearization_stability_on + {f : Base × ℝ → ProjectionTarget 3} (hf : ContDiff ℝ ∞ f) (z : Base × ℝ) + (hreg : Function.Bijective (fderiv ℝ f z)) : + ∃ r ε : ℝ, 0 < r ∧ 0 < ε ∧ + ∀ S : Set (Base × ℝ), Convex ℝ S → S ⊆ Metric.ball z r → + ∀ g : Base × ℝ → ProjectionTarget 3, ContDiff ℝ ∞ g → + (∀ x ∈ S, ‖fderiv ℝ g x-fderiv ℝ f x‖ ≤ ε) → S.InjOn g := by + let L := ContinuousLinearEquiv.ofBijective (fderiv ℝ f z) + (LinearMap.ker_eq_bot.mpr hreg.1) (LinearMap.range_eq_top.mpr hreg.2) + let c := (2*(‖L.symm.toContinuousLinearMap‖+1))⁻¹ + have hc : 0 < c := by dsimp [c]; positivity + have hsmall : ‖L.symm.toContinuousLinearMap‖*c < 1 := by + dsimp [c] + rw [← div_eq_mul_inv] + apply (div_lt_iff₀ (by positivity)).mpr + linarith [norm_nonneg L.symm.toContinuousLinearMap] + have hcont : ContinuousAt (fderiv ℝ f) z := (hf.continuous_fderiv (by simp)).continuousAt + have hevent : ∀ᶠ x in 𝓝 z, ‖fderiv ℝ f x-fderiv ℝ f z‖ < c/2 := by + simpa only [Metric.mem_ball,dist_eq_norm] using + hcont.eventually (Metric.ball_mem_nhds _ (half_pos hc)) + obtain ⟨r,hr,hclose⟩ := Metric.eventually_nhds_iff.mp hevent + refine ⟨r,c/2,hr,half_pos hc,?_⟩ + intro S hS hsub g hg hnear + apply near_equiv_derivative_injOn L + (fun x _ => hg.differentiable (by simp) x) hS hc.le hsmall + intro x hx + have hx' : dist x z < r := hsub hx + change ‖fderiv ℝ g x-fderiv ℝ f z‖ ≤ c + calc + _ ≤ ‖fderiv ℝ g x-fderiv ℝ f x‖+‖fderiv ℝ f x-fderiv ℝ f z‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ c/2+c/2 := add_le_add (hnear x hx) (hclose hx').le + _ = c := by ring + + +theorem local_linearization_stability + {f : Base × ℝ → ProjectionTarget 3} (hf : ContDiff ℝ ∞ f) (z : Base × ℝ) + (hreg : Function.Bijective (fderiv ℝ f z)) : + ∃ r ε : ℝ, 0 < r ∧ 0 < ε ∧ + ∀ g : Base × ℝ → ProjectionTarget 3, ContDiff ℝ ∞ g → + (∀ x ∈ Metric.ball z r, ‖fderiv ℝ g x-fderiv ℝ f x‖ ≤ ε) → + (Metric.ball z r).InjOn g := by + obtain ⟨r,ε,hr,hε,h⟩ := local_linearization_stability_on hf z hreg + exact ⟨r,ε,hr,hε,h _ (convex_ball z r) Subset.rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..d720900ccc81f5d75b27ac01e19cfd64a4545cce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalDefect.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalDefectDomain +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapStripRegularNeighborhood + +namespace OAI + +/-! The actual crosscap pair is exactly the zero set of a smooth +normal-defect map on one open rectangle. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.normal_defect_two_zeros (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (δ : ℝ) (U : Set Base), 0 < δ ∧ IsOpen U ∧ U ⊆ S.domain ∧ + (∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (A.arc.start-δ) (A.arc.finish+δ), (![x,t] : Base) ∈ U) ∧ + ContDiffOn ℝ ∞ (normalDefect S.model a) U ∧ + ∀ x ∈ U, normalDefect S.model a x = 0 ↔ + x = ![0,A.arc.start] ∨ x = ![0,A.arc.finish] := by + classical + obtain ⟨a,r,V,hr,hV,hVD,hrect,hN,hNI⟩ := S.normal_defect_rectangle + obtain ⟨W,hW,hWD,hWaxis,hWI⟩ := S.regular_neighborhood hf + let U := V ∩ W + have hU : IsOpen U := hV.inter hW + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := by + intro t ht + refine ⟨?_,hWaxis t ht⟩ + apply hrect 0 ⟨by linarith,by linarith⟩ t + constructor <;> linarith [ht.1,ht.2] + obtain ⟨δ,hδ,hδrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hU haxis + refine ⟨a,δ,U,hδ,hU,inter_subset_left.trans hVD,hδrect,hN.mono inter_subset_left,?_⟩ + intro x hx + have hh : normalDefect S.model a x ≠ 0 ↔ + x ≠ ![0,A.arc.start] ∧ x ≠ ![0,A.arc.finish] := + (hNI x hx.1).symm.trans (hWI x hx.2) + simpa only [not_not,not_and_or] using not_congr hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalizedRectangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalizedRectangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..faac95bef83b4d79e492ff04b37d448d3510c2e4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapNormalizedRectangle.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedTwoZeroAxis + +namespace OAI + +/-! The normalized rectangle is constructed from the actual crosscap strip. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.normalized_defect_rectangle (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (d : ℝ → Base) (r : ℝ) (O : Set Base), + ContDiff ℝ ∞ d ∧ 0 < r ∧ IsOpen O ∧ O ⊆ S.domain ∧ + (∀ x ∈ Icc (-r) r, ∀ t ∈ Icc (A.arc.start-r) (A.arc.finish+r), (![x,t] : Base) ∈ O) ∧ + ContDiffOn ℝ ∞ (axisNormalizedDefect d (normalDefect S.model a)) O ∧ + (∀ t, crosscapAxis t ∈ O → + axisNormalizedDefect d (normalDefect S.model a) (crosscapAxis t) = + ![(t-A.arc.start)*(t-A.arc.finish),0]) ∧ + (∀ x ∈ O, axisNormalizedDefect d (normalDefect S.model a) x = 0 ↔ + x = crosscapAxis A.arc.start ∨ x = crosscapAxis A.arc.finish) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.start)) ∧ + Function.Bijective (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.finish)) ∧ + (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.start) (![1,0] : Base)) 1 ≠ 0 ∧ + (fderiv ℝ (axisNormalizedDefect d (normalDefect S.model a)) + (crosscapAxis A.arc.finish) (![1,0] : Base)) 1 ≠ 0 := by + obtain ⟨a,δ,U,hδ,hU,hUD,hrect,hN,hz,hDp,hDq⟩ := S.nondegenerate_normal_defect hf + have haxis : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ U := by + intro t ht + rw [crosscapAxis_apply] + apply hrect 0 (by constructor <;> linarith) t + constructor <;> linarith [ht.1,ht.2] + obtain ⟨d,V,W,hd,hV,hVU,hW,hKW,hWa,hGV,hGa,hGz,hDpG,hDqG,hvp,hvq⟩ := + normalized_two_zero_axis hU hN A.arc.start_lt_finish haxis + (by simpa only [crosscapAxis_apply] using hz) + (by simpa only [crosscapAxis_apply] using hDp) + (by simpa only [crosscapAxis_apply] using hDq) + let O := V ∩ {x : Base | x 1 ∈ W} + have hO : IsOpen O := hV.inter (hW.preimage (continuous_apply 1)) + have hKO : ∀ t ∈ Icc A.arc.start A.arc.finish, crosscapAxis t ∈ O := by + intro t ht + refine ⟨hWa t (hKW ht),?_⟩ + simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using hKW ht + obtain ⟨r,hr,hrrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hO + (by simpa only [crosscapAxis_apply] using hKO) + refine ⟨a,d,r,O,hd,hr,hO,inter_subset_left.trans (hVU.trans hUD),hrrect, + hGV.mono inter_subset_left,?_,fun x hx => hGz x hx.1,hDpG,hDqG,hvp,hvq⟩ + intro t ht + apply hGa t + simpa only [mem_ofPred_eq,crosscapAxis_apply,Matrix.cons_val_one,Matrix.cons_val_zero] using ht.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapOrderedArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapOrderedArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..f1f6f5b0b6ac3b98656f48f54d3221869c942f83 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapOrderedArc.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveBoundaryArc +import OAI.Geometry.SurfaceImmersion.Whitney.ClosedDoubleArcLift + +namespace OAI + +/-! The prepared surface map has a continuously parametrized ordered +double arc connecting each crosscap to a distinct crosscap. -/ +noncomputable section +open Set Filter Manifold Topology unitInterval +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem prepared_crosscap_ordered_arc {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) + (p : M) (hp : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ q : M, q ≠ p ∧ ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f q) ∧ + ∃ Γ : Path (p,p) (q,q), IsClosedEmbedding Γ ∧ + (∀ t, f (Γ t).1 = f (Γ t).2) ∧ + (∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) := by + obtain ⟨c,φ,b,s,hpc,hφ,he,hz,hR⟩ := hrep p hp + have hpK : unorderedPair (p,p) ∈ compactifiedDoubleCurve f := + (compactifiedDoubleCurve_diagonal f p).mpr (crosscap_diagonal_mem_closure f p c hpc hφ he b s hz hR) + let P : doubleCurveBoundary f := ⟨⟨unorderedPair (p,p),hpK⟩,p,rfl⟩ + obtain ⟨Q,hQP,γ,hγ,hinter⟩ := prepared_double_curve_boundary_arc hf hfin hreg hrep P + obtain ⟨q,hqeq⟩ := Q.property + have hqp : q ≠ p := by + intro h + apply hQP + apply Subtype.ext + apply Subtype.ext + exact hqeq.symm.trans (congrArg (fun x => unorderedPair (x,x)) h) + have hqK : unorderedPair (q,q) ∈ compactifiedDoubleCurve f := hqeq.symm ▸ Q.val.property + have hq : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f q) := + doublePairs_closure_diagonal_singular hf q ((compactifiedDoubleCurve_diagonal f q).mp hqK) + let γU : Path (unorderedPair (p,p)) (unorderedPair (q,q)) := + (γ.map continuous_subtype_val).cast rfl hqeq + have hγU : Function.Injective γU := Subtype.val_injective.comp hγ.injective + have hgood : ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → γU t ∈ unorderedDistinctPairs M := by + intro t ht0 ht1 hbad + exact hinter t ht0 ht1 hbad + obtain ⟨Γ,hΓ,hΓeq⟩ := embedded_closed_double_arc_lift p q γU hγU hgood + refine ⟨q,hqp,hq,Γ,hΓ,?_,?_⟩ + · intro t + apply compactifiedDoubleCurve_pair_equality hf + rw [hΓeq] + exact (γ t).property + · intro t ht0 ht1 + apply (unorderedPair_mem_distinct_iff (Γ t)).mp + rw [hΓeq] + exact hgood t ht0 ht1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f9df7f0786a97d459fc59a33c8df62c72c72e82 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairCoordinates.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.StandardPreparedCrosscaps +import OAI.Geometry.SurfaceImmersion.Whitney.StandardCrosscapDerivative + +namespace OAI + +/-! The two branches of a double point near an actual prepared crosscap +are exactly the two opposite nonzero kernel-axis coordinates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p : M} +namespace SurfaceCrosscapCoordinates + +theorem double_pair (c : SurfaceCrosscapCoordinates f p) {x y : M} + (hx : x ∈ c.source.source) (hy : y ∈ c.source.source) + (hne : x ≠ y) (heq : f x = f y) : + c.source x 0 = 0 ∧ c.source y 0 = 0 ∧ + c.source x 1 = -c.source y 1 ∧ c.source x 1 ≠ 0 := by + have hcne : c.source x ≠ c.source y := fun h => hne (c.source.injOn hx hy h) + apply (standardCrosscap_double_iff hcne).mp + apply c.target.injOn (c.model_mem x hx) (c.model_mem y hy) + rw [← c.model_eq x hx,← c.model_eq y hy] + exact heq + +end SurfaceCrosscapCoordinates +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..f420ec01f1e319a517cfef848a7496ff3068e373 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPairModel.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectionSingularDirection + +namespace OAI + +/-! The polynomial birth-and-death model for a pair of surface crosscaps. +For a negative parameter it is an immersion on the whole coordinate plane. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def crosscapPairCoordinates (s : ℝ) (x : Base) : Fin 3 → ℝ := + ![x 0,x 0 * x 1,(x 1)^3-s*x 1] + +def crosscapPairDerivative (s : ℝ) (x : Base) : Base →L[ℝ] (Fin 3 → ℝ) := + ContinuousLinearMap.pi ![ContinuousLinearMap.proj 0, + x 0 • ContinuousLinearMap.proj 1 + x 1 • ContinuousLinearMap.proj 0, + (3*(x 1)^2-s) • ContinuousLinearMap.proj 1] + +lemma crosscapPairCoordinates_smooth (s : ℝ) : ContDiff ℝ ∞ (crosscapPairCoordinates s) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [crosscapPairCoordinates] <;> fun_prop + +lemma crosscapPairCoordinates_hasFDerivAt (s : ℝ) (x : Base) : + HasFDerivAt (crosscapPairCoordinates s) (crosscapPairDerivative s x) x := by + have h0 := hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) x + have h1 := hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) x + apply hasFDerivAt_pi.mpr + intro i + fin_cases i + · exact h0 + · exact h0.mul h1 + · change HasFDerivAt (fun y : Base => (y 1)^3-s*y 1) + ((3*(x 1)^2-s) • ContinuousLinearMap.proj 1) x + convert (h1.pow 3).sub (h1.const_mul s) using 1 + apply ContinuousLinearMap.ext + intro v + simp + ring + +lemma crosscapPairDerivative_injective_iff (s : ℝ) (x : Base) : + Function.Injective (crosscapPairDerivative s x) ↔ x 0 ≠ 0 ∨ 3*(x 1)^2-s ≠ 0 := by + constructor + · intro h + by_contra hn + push Not at hn + have he : crosscapPairDerivative s x (![0,1] : Base) = crosscapPairDerivative s x 0 := by + ext i + fin_cases i <;> simp [crosscapPairDerivative,hn.1,hn.2] + have hh := congrFun (h he) 1 + norm_num at hh + · intro h v w he + have h0 : v 0 = w 0 := congrFun he 0 + have h1 : x 0 * v 1 + x 1 * v 0 = x 0 * w 1 + x 1 * w 0 := congrFun he 1 + have h2 : (3*(x 1)^2-s)*v 1 = (3*(x 1)^2-s)*w 1 := congrFun he 2 + have hvw : v 1 = w 1 := by + rcases h with h | h + · rw [h0] at h1 + exact mul_left_cancel₀ h (add_right_cancel h1) + · exact mul_left_cancel₀ h h2 + ext i + fin_cases i + · exact h0 + · exact hvw + +lemma crosscapPairCoordinates_singular_iff (s : ℝ) (x : Base) : + ¬ Function.Injective (fderiv ℝ (crosscapPairCoordinates s) x) ↔ + x 0 = 0 ∧ 3*(x 1)^2 = s := by + rw [(crosscapPairCoordinates_hasFDerivAt s x).fderiv,crosscapPairDerivative_injective_iff] + push Not + exact and_congr Iff.rfl sub_eq_zero + +def crosscapPair (s : ℝ) : Base → ProjectionTarget 3 := + (EuclideanSpace.equiv (Fin 3) ℝ).symm ∘ crosscapPairCoordinates s + +lemma crosscapPair_smooth (s : ℝ) : ContDiff ℝ ∞ (crosscapPair s) := + (EuclideanSpace.equiv (Fin 3) ℝ).symm.contDiff.comp (crosscapPairCoordinates_smooth s) + +theorem crosscapPair_immersion_of_negative {s : ℝ} (hs : s < 0) (x : Base) : + Function.Injective (fderiv ℝ (crosscapPair s) x) := by + have hI : Function.Injective (crosscapPairDerivative s x) := + (crosscapPairDerivative_injective_iff s x).mpr (Or.inr (by nlinarith [sq_nonneg (x 1)])) + rw [crosscapPair,fderiv_comp x + (EuclideanSpace.equiv (Fin 3) ℝ).symm.differentiableAt + ((crosscapPairCoordinates_smooth s).differentiable (by simp) x), + (EuclideanSpace.equiv (Fin 3) ℝ).symm.fderiv, + (crosscapPairCoordinates_hasFDerivAt s x).fderiv] + exact (EuclideanSpace.equiv (Fin 3) ℝ).symm.injective.comp hI + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPathInterior.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPathInterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..9fde61809de4ed941ca8c116e3930324c7845415 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapPathInterior.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapSourceEmbeddedPath + +namespace OAI + +/-! The embedded source path obtained by loop removal meets no other +singular point: every interior point belongs to a regular original sheet. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} + +theorem crosscap_source_embedded_path_regular + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (cp : SurfaceCrosscapCoordinates f p) (cq : SurfaceCrosscapCoordinates f q) + {Γ : I → M × M} (hΓ : Continuous Γ) (hi : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (hone : Γ 1 = (q,q)) + (heq : ∀ u, f (Γ u).1 = f (Γ u).2) + (hgood : ∀ u : I, 0 < (u:ℝ) → (u:ℝ) < 1 → (Γ u).1 ≠ (Γ u).2 ∧ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ u).1) ∧ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ u).2)) + (hsing : ∀ x, f x = f p → x = p) : + ∃ P : Path p q, FiniteRegularPath planeModel P ∧ Function.Injective P ∧ + range P ⊆ Prod.fst '' range Γ ∧ + ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (P t)) := by + obtain ⟨P,hPp,hPi,hPr⟩ := crosscap_source_embedded_path hf hreg cp cq hΓ hi hzero hone heq hgood hsing + refine ⟨P,hPp,hPi,hPr,?_⟩ + intro t ht0 ht1 + obtain ⟨z,⟨u,hu⟩,hz⟩ := hPr (mem_range_self t) + have hpnt : (Γ u).1 = P t := by rw [hu]; exact hz + have hu0 : u ≠ 0 := by + intro he + have htzero : t = 0 := hPi (by rw [Path.source,← hpnt,he,hzero]) + have hval := congrArg (fun s : I => (s:ℝ)) htzero + change (t:ℝ) = 0 at hval + linarith + have hu1 : u ≠ 1 := by + intro he + have htone : t = 1 := hPi (by rw [Path.target,← hpnt,he,hone]) + have hval := congrArg (fun s : I => (s:ℝ)) htone + change (t:ℝ) = 1 at hval + linarith + have hu0' : 0 < (u:ℝ) := lt_of_le_of_ne u.property.1 (fun he => hu0 (Subtype.ext he.symm)) + have hu1' : (u:ℝ) < 1 := lt_of_le_of_ne u.property.2 (fun he => hu1 (Subtype.ext he)) + rw [← hpnt] + exact (hgood u hu0' hu1').2.1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapRegularLocus.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapRegularLocus.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c2c1d0cae549be1c492af9ac16e6834e2bb970c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapRegularLocus.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTransverseDerivative + +namespace OAI + +/-! A genuine crosscap chart contains exactly one nonimmersed point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + {f : M → ProjectionTarget 3} {p : M} + +lemma SurfaceCrosscapCoordinates.regular_iff (c : SurfaceCrosscapCoordinates f p) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {x : M} (hx : x ∈ c.source.source) : + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) ↔ x ≠ p := by + have hEq : EqOn (c.target ∘ standardCrosscap) (f ∘ c.source.symm) c.source.target := by + intro y hy + have hm := c.model_eq (c.source.symm y) (c.source.map_target hy) + rw [c.source.right_inv hy] at hm + exact hm.symm + have hbridge := coordinate_representative_immersion_iff c.source c.source_smooth + c.source_inverse_smooth hf c.source.open_target (subset_refl _) hEq (c.source.map_source hx) + rw [c.source.left_inv hx] at hbridge + rw [← hbridge] + have htD : c.target.MDifferentiable 𝓘(ℝ,Base × ℝ) 𝓘(ℝ,ProjectionTarget 3) := + ⟨c.target_smooth.contMDiff.contMDiffOn.mdifferentiableOn (by simp), + c.target_inverse_smooth.contMDiffOn.mdifferentiableOn (by simp)⟩ + have htI : Function.Injective (fderiv ℝ c.target (standardCrosscap (c.source x))) := by + rw [← mfderiv_eq_fderiv] + exact htD.mfderiv_injective (c.model_mem x hx) + rw [fderiv_comp (c.source x) (c.target_smooth.differentiable (by simp) _) + (standardCrosscap_hasFDerivAt _).differentiableAt] + have hcomp : Function.Injective ((fderiv ℝ c.target (standardCrosscap (c.source x))).comp + (fderiv ℝ standardCrosscap (c.source x))) ↔ + Function.Injective (fderiv ℝ standardCrosscap (c.source x)) := by + constructor + · intro h u v huv + exact h (congrArg (fderiv ℝ c.target (standardCrosscap (c.source x))) huv) + · intro h + exact htI.comp h + rw [hcomp,standardCrosscap_immersion_iff] + constructor + · intro hn he + apply hn + rw [he,c.source_center] + · intro hn hz + apply hn + exact c.source.injOn hx c.source_mem (hz.trans c.source_center.symm) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSecondDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSecondDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d946a11302d431561fe64f0ce4bcebe0b44a359 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSecondDerivative.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.StandardCrosscapDerivative +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection + +namespace OAI + +/-! The exact second derivative of the standard crosscap and the chain +rule in a kernel direction. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma standardCrosscapDerivative_zero_apply (v : Base) : + standardCrosscapDerivative 0 v = ((0:Base),v 0) := by + apply Prod.ext + · ext i + fin_cases i <;> simp [standardCrosscapDerivative] + · simp [standardCrosscapDerivative] + +lemma standardCrosscap_second (p v w : Base) : + fderiv ℝ (fderiv ℝ standardCrosscap) p v w = + (![v 1*w 0+v 0*w 1,2*v 1*w 1],(0:ℝ)) := by + have he : (fun x => fderiv ℝ standardCrosscap x w) = + fun x : Base => (x 1*w 0+x 0*w 1) • ((![1,0],0) : Base × ℝ) + + (2*x 1*w 1) • ((![0,1],0) : Base × ℝ) + ((0,w 0) : Base × ℝ) := by + funext x + rw [(standardCrosscap_hasFDerivAt x).fderiv] + apply Prod.ext + · ext i + fin_cases i <;> simp [standardCrosscapDerivative] + · simp [standardCrosscapDerivative] + have h0 := hasFDerivAt_apply (𝕜 := ℝ) (0:Fin 2) p + have h1 := hasFDerivAt_apply (𝕜 := ℝ) (1:Fin 2) p + have hd := ((((h1.mul_const (w 0)).add (h0.mul_const (w 1))).smul_const + ((![1,0],0) : Base × ℝ)).add + (((h1.const_mul 2).mul_const (w 1)).smul_const ((![0,1],0) : Base × ℝ))).add_const + ((0,w 0) : Base × ℝ) + change HasFDerivAt (fun x : Base => (x 1*w 0+x 0*w 1) • ((![1,0],0) : Base × ℝ) + + (2*x 1*w 1) • ((![0,1],0) : Base × ℝ) + ((0,w 0) : Base × ℝ)) _ p at hd + rw [← SphericalJets.secondDerivative_apply standardCrosscap_smooth.contDiffAt v w,he,hd.fderiv] + apply Prod.ext + · ext i + fin_cases i <;> simp <;> ring + · simp + +lemma kernel_secondDerivative_comp {E H Z : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup H] [NormedSpace ℝ H] [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : E → H} {g : H → Z} (hf : ContDiff ℝ ∞ f) {U : Set H} + (hU : IsOpen U) (hg : ContDiffOn ℝ ∞ g U) {p : E} (hp : f p ∈ U) + (v w : E) (hw : fderiv ℝ f p w = 0) : + fderiv ℝ (fderiv ℝ (g ∘ f)) p v w = + fderiv ℝ g (f p) (fderiv ℝ (fderiv ℝ f) p v w) := by + rw [SphericalJets.secondDerivative_comp hf hU hg hp v w,hw,map_zero,zero_add] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEmbeddedPath.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEmbeddedPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..19b57f235f080e3bd4512e78b54932ca6dea85c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEmbeddedPath.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPairedArcProjection +import OAI.Geometry.SurfaceImmersion.Whitney.OrderedArcEndpointUnique +import OAI.Geometry.SurfaceImmersion.Primitive.RegularCurveLoopRemoval + +namespace OAI + +/-! An actual ordered crosscap connection gives an embedded source path +made from finitely many regular smooth pieces, inside the original source image. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} + +theorem crosscap_source_embedded_path + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (cp : SurfaceCrosscapCoordinates f p) (cq : SurfaceCrosscapCoordinates f q) + {Γ : I → M × M} (hΓ : Continuous Γ) (hi : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (hone : Γ 1 = (q,q)) + (heq : ∀ u, f (Γ u).1 = f (Γ u).2) + (hgood : ∀ u : I, 0 < (u:ℝ) → (u:ℝ) < 1 → (Γ u).1 ≠ (Γ u).2 ∧ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ u).1) ∧ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ u).2)) + (hsing : ∀ x, f x = f p → x = p) : + ∃ P : Path p q, FiniteRegularPath planeModel P ∧ Function.Injective P ∧ + range P ⊆ Prod.fst '' range Γ := by + obtain ⟨S,hSi,hS0,hS1,hr0,hr1⟩ := smooth_crosscap_connecting_arc_endpoint_regular hf hreg + cp cq hΓ hi hzero hone heq (fun u h0 h1 => (hgood u h0 h1).1) + let γ : ℝ → M := fun t => (S.curve t).1 + have hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ S.domain := contMDiff_fst.comp_contMDiffOn S.smooth + let U : Set ℝ := {t | t ∈ S.domain ∧ Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)} + have hU : IsOpen U := curve_regular_locus_open S.domain_open hγ + have hclosed : Icc S.start S.finish ⊆ U := by + intro t ht + exact ⟨S.interval_subset ht,regular_paired_arc_projection hf hzero hone heq + (fun u h0 h1 => (hgood u h0 h1).2) S hSi hS0 hS1 hr0 hr1 t ht⟩ + have hγ0 : γ S.start = p := congrArg Prod.fst hS0 + have hγ1 : γ S.finish = q := congrArg Prod.fst hS1 + have havoid : ∀ t ∈ Ioc S.start S.finish, γ t ≠ γ S.start := by + intro t ht he + obtain ⟨u,hu⟩ := hSi.subset ⟨t,⟨ht.1.le,ht.2⟩,rfl⟩ + have hup : (Γ u).1 = p := (congrArg Prod.fst hu).trans (he.trans hγ0) + have hu0 := ordered_arc_source_start_unique hi hzero hone heq + (fun u h0 h1 => (hgood u h0 h1).1) hsing u hup + have heS : S.curve t = S.curve S.start := by rw [← hu,hu0,hzero,hS0] + exact (ne_of_gt ht.1) (S.injective ⟨ht.1.le,ht.2⟩ + (left_mem_Icc.mpr S.start_lt_finish.le) heS) + obtain ⟨P,hPp,hPi,hPr⟩ := regular_curve_loop_removal hU (hγ.mono (fun _ ht => ht.1)) + (fun _ ht => ht.2) S.start_lt_finish hclosed havoid + let Q : Path p q := P.cast hγ0.symm hγ1.symm + refine ⟨Q,hPp.cast _ _,hPi,hPr.trans ?_⟩ + rintro x ⟨t,ht,rfl⟩ + exact ⟨S.curve t,hSi.subset ⟨t,ht,rfl⟩,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEndpoint.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b9cfc860a02cdb967f96bd7123364f6cf8d7ab0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapSourceEndpoint.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCurveEndpoint +import OAI.Geometry.SurfaceImmersion.Whitney.OrderedArcEndpointUnique +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapArcEndpoint + +namespace OAI + +/-! Compact regular insertions do not change the kernel-axis geometry +of an actual crosscap connection near its singular endpoint. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [T2Space M] +variable {f : M → ProjectionTarget 3} {p q : M} + +theorem crosscap_source_endpoint_neighborhood (c : SurfaceCrosscapCoordinates f p) + {Γ : I → M × M} (hΓ : Continuous Γ) (hi : Function.Injective Γ) + (hzero : Γ 0 = (p,p)) (hone : Γ 1 = (q,q)) + (heq : ∀ u, f (Γ u).1 = f (Γ u).2) + (hne : ∀ u : I, 0 < (u:ℝ) → (u:ℝ) < 1 → (Γ u).1 ≠ (Γ u).2) + (hsing : ∀ x, f x = f p → x = p) + {K : Set M} (hK : IsCompact K) (hpK : p ∉ K) : + ∃ V : Set M, IsOpen V ∧ p ∈ V ∧ + ∀ x ∈ V, x ∈ Prod.fst '' range Γ ∪ K → + x ∈ c.source.source ∧ c.source x 0 = 0 := by + obtain ⟨ε,hε,_,hcoords⟩ := crosscap_arc_endpoint c hΓ hzero heq hne + obtain ⟨V,hV,hpV,hsmall⟩ := compact_curve_endpoint_neighborhood hΓ.fst + (ordered_arc_source_start_unique hi hzero hone heq hne hsing) hK hpK hε + refine ⟨V,hV,hpV,?_⟩ + intro x hx hxi + have hxrange : x ∈ range (fun t => (Γ t).1) ∪ K := by + rcases hxi with ⟨z,⟨u,hu⟩,hz⟩ | hk + · exact Or.inl ⟨u,(congrArg Prod.fst hu).trans hz⟩ + · exact Or.inr hk + obtain ⟨u,hu,rfl⟩ := hsmall x hx hxrange + exact ⟨(hcoords u hu.le).1,(hcoords u hu.le).2.2.1⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..59074ad0661f729731a66879525671f63046d3cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripFrame.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCoordinateStrip +import OAI.Geometry.SurfaceImmersion.Geometry.CurveNormalFrame + +namespace OAI + +/-! A smooth invertible target frame on a neighborhood of the actual strip axis. -/ +noncomputable section +open Set Filter Matrix Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +def CrosscapCoordinateStrip.transverseVector (S : CrosscapCoordinateStrip A) (t : ℝ) : Fin 3 → ℝ := + EuclideanSpace.equiv (Fin 3) ℝ (fderiv ℝ S.model (crosscapAxis t) (![1,0] : Base)) + +omit [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] in +lemma CrosscapCoordinateStrip.transverseVector_smooth (S : CrosscapCoordinateStrip A) : + ContDiff ℝ ∞ S.transverseVector := by + have hD := S.model_smooth.fderiv_right (m := ∞) (by simp) + exact (EuclideanSpace.equiv (Fin 3) ℝ).contDiff.comp + ((hD.comp crosscapAxis.contDiff).clm_apply contDiff_const) + +omit [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] in +lemma CrosscapCoordinateStrip.transverseVector_ne_zero (S : CrosscapCoordinateStrip A) + {t : ℝ} (ht : t ∈ Icc A.arc.start A.arc.finish) : S.transverseVector t ≠ 0 := by + intro hz + apply S.transverse t ht + apply (EuclideanSpace.equiv (Fin 3) ℝ).injective + simpa only [CrosscapCoordinateStrip.transverseVector,map_zero,crosscapAxis_apply] using hz + +lemma curveNormalLinear_smooth {v : ℝ → Fin 3 → ℝ} (hv : ContDiff ℝ ∞ v) (a : Fin 3 → ℝ) : + ContDiff ℝ ∞ (fun t => curveNormalLinear (v t) a) := by + have hcross : ContDiff ℝ ∞ (fun t => v t ⨯₃ a) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [cross_apply] <;> fun_prop + exact ((contDiff_const.smulRight hv).add contDiff_const).add (contDiff_const.smulRight hcross) + +omit [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] in +theorem CrosscapCoordinateStrip.exists_frame (S : CrosscapCoordinateStrip A) : + ∃ (a : Fin 3 → ℝ) (J : Set ℝ), IsOpen J ∧ Icc A.arc.start A.arc.finish ⊆ J ∧ + ContDiff ℝ ∞ (fun t => curveNormalLinear (S.transverseVector t) a) ∧ + ∀ t ∈ J, Function.Bijective (curveNormalLinear (S.transverseVector t) a) := by + obtain ⟨a,ha⟩ := exists_curve_transverse_vector S.transverseVector S.transverseVector_smooth + let J := {t | S.transverseVector t ≠ 0} + have hJ : IsOpen J := isOpen_ne.preimage S.transverseVector_smooth.continuous + refine ⟨a,J,hJ,fun t ht => S.transverseVector_ne_zero ht, + curveNormalLinear_smooth S.transverseVector_smooth a,?_⟩ + intro t ht + exact curveNormalLinear_bijective ht (ha t) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripRegularNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripRegularNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..118df0100652a0b27509fe99ce34edaf13feeaa8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CrosscapStripRegularNeighborhood.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapRegularLocus +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCoordinateStrip + +namespace OAI + +/-! A thin actual source rectangle has no singularities except the two +specified endpoint crosscaps. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.regular_neighborhood (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ U : Set Base, IsOpen U ∧ U ⊆ S.domain ∧ + (∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U) ∧ + ∀ x ∈ U, Function.Injective (fderiv ℝ S.model x) ↔ + x ≠ ![0,A.arc.start] ∧ x ≠ ![0,A.arc.finish] := by + let R := {y | Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f y)} + let O := A.left.source.source ∪ A.right.source.source ∪ R + have hO : IsOpen O := (A.left.source.open_source.union A.right.source.open_source).union + (surface_regular_locus_open hf) + let U := S.domain ∩ (S.chart.target ∩ S.chart.symm ⁻¹' O) + have hU : IsOpen U := S.domain_open.inter (S.chart.symm.isOpen_inter_preimage hO) + have haxisU : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := by + intro t ht + have hs := S.axis t ht + have hx : (![0,t] : Base) ∈ S.domain := by + apply S.rectangle 0 ⟨by linarith [S.width_pos],by linarith [S.width_pos]⟩ t + constructor <;> linarith [S.width_pos,ht.1,ht.2] + refine ⟨hx,S.domain_target hx,?_⟩ + change S.chart.symm (![0,t] : Base) ∈ O + rw [← hs.2,S.chart.left_inv hs.1] + by_cases hts : t = A.arc.start + · rw [hts,A.source] + exact Or.inl (Or.inl A.left.source_mem) + · by_cases htf : t = A.arc.finish + · rw [htf,A.target] + exact Or.inl (Or.inr A.right.source_mem) + · exact Or.inr (A.regular t ⟨lt_of_le_of_ne ht.1 (Ne.symm hts),lt_of_le_of_ne ht.2 htf⟩) + have hpsource : p ∈ S.chart.source := + (congrArg (fun y => y ∈ S.chart.source) A.source).mp + (S.axis _ (left_mem_Icc.mpr A.arc.start_lt_finish.le)).1 + have hqsource : q ∈ S.chart.source := + (congrArg (fun y => y ∈ S.chart.source) A.target).mp + (S.axis _ (right_mem_Icc.mpr A.arc.start_lt_finish.le)).1 + have hpchart : S.chart p = ![0,A.arc.start] := + (congrArg S.chart A.source).symm.trans + (S.axis _ (left_mem_Icc.mpr A.arc.start_lt_finish.le)).2 + have hqchart : S.chart q = ![0,A.arc.finish] := + (congrArg S.chart A.target).symm.trans + (S.axis _ (right_mem_Icc.mpr A.arc.start_lt_finish.le)).2 + have hprecover : S.chart.symm (![0,A.arc.start] : Base) = p := + (congrArg S.chart.symm hpchart).symm.trans (S.chart.left_inv hpsource) + have hqrecover : S.chart.symm (![0,A.arc.finish] : Base) = q := + (congrArg S.chart.symm hqchart).symm.trans (S.chart.left_inv hqsource) + refine ⟨U,hU,inter_subset_left,haxisU,?_⟩ + intro x hx + have hbridge := coordinate_representative_immersion_iff S.chart S.chart_smooth S.inverse_smooth hf + S.domain_open S.domain_target S.model_eq hx.1 + rw [hbridge] + constructor + · intro h + constructor + · intro he + rw [he,hprecover] at h + exact ((A.left.regular_iff hf A.left.source_mem).mp h) rfl + · intro he + rw [he,hqrecover] at h + exact ((A.right.regular_iff hf A.right.source_mem).mp h) rfl + · rintro ⟨hxp,hxq⟩ + have hyp : S.chart.symm x ≠ p := by + intro h + apply hxp + calc + x = S.chart (S.chart.symm x) := (S.chart.right_inv hx.2.1).symm + _ = S.chart p := congrArg S.chart h + _ = ![0,A.arc.start] := hpchart + have hyq : S.chart.symm x ≠ q := by + intro h + apply hxq + calc + x = S.chart (S.chart.symm x) := (S.chart.right_inv hx.2.1).symm + _ = S.chart q := congrArg S.chart h + _ = ![0,A.arc.finish] := hqchart + rcases hx.2.2 with (hleft | hright) | hreg + · exact (A.left.regular_iff hf hleft).mpr hyp + · exact (A.right.regular_iff hf hright).mpr hyq + · exact hreg + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/CurveBoundaryEmbeddedArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CurveBoundaryEmbeddedArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bb12e8fb9817a010f3956ffabcef6e42a6125fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/CurveBoundaryEmbeddedArc.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EmbeddedCurveGraphPath +import OAI.Geometry.SurfaceImmersion.Geometry.CurveIncidenceBoundaryPair + +namespace OAI + +/-! An actual embedded interval joins two boundary points and has no +other boundary point in its interior. -/ +noncomputable section +open Set Topology unitInterval +attribute [local instance] Classical.propDecidable +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem curve_boundary_embedded_arc (D V : Set X) (hDV : D ⊆ V) (hV : V.Finite) + (P : Finset (Set X)) + (hP : ∀ E ∈ P, IsOpen E ∧ Disjoint E V ∧ closure E \ E ⊆ V) + (hdis : ∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) + (hcover : Vᶜ = ⋃ E ∈ P, E) (hwitness : ∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) + (hline : ∀ p ∉ D, ∃ c : OpenPartialHomeomorph X ℝ, p ∈ c.source) + (hhalf : ∀ p ∈ D, ∃ c : OpenPartialHomeomorph X (Ici (0:ℝ)), + p ∈ c.source ∧ c p = ⟨0,by simp⟩) + (p : D) : ∃ q : D, q ≠ p ∧ ∃ γ : Path p.val q.val, IsClosedEmbedding γ ∧ + ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → γ t ∉ D := by + classical + let : Fintype V := hV.fintype + let G := curveIncidenceGraph V P + let a : V := ⟨p.val,hDV p.property⟩ + obtain ⟨q,hqp,⟨r⟩⟩ := curve_boundary_pair D V hDV hV P hP hdis hcover hwitness hline hhalf p + let b : V := ⟨q.val,hDV q.property⟩ + let w (E : P) := Classical.choice (hwitness E.val E.property) + obtain ⟨ρ⟩ := realize_simple_curve_walk (fun E hE => (hP E hE).2.1) hdis w r.val r.property + have hab : a ≠ b := by + intro he + exact hqp (Subtype.ext (congrArg (fun v : V => v.val) he).symm) + have hρ := ρ.injective hab + obtain ⟨hl,_⟩ := curve_incidence_degrees D V hV P hP hdis hcover hwitness hline hhalf + refine ⟨q,hqp,ρ.path,ρ.path.continuous.isClosedEmbedding hρ,?_⟩ + intro t ht0 ht1 htD + let v : V := ⟨ρ.path t,hDV htD⟩ + have hva : v ≠ a := by + intro he + have hx : ρ.path t = ρ.path 0 := by simpa using congrArg (fun v : V => v.val) he + have ht : (t:ℝ) = 0 := congrArg (fun t : I => (t:ℝ)) (hρ hx) + linarith + have hvb : v ≠ b := by + intro he + have hx : ρ.path t = ρ.path 1 := by simpa using congrArg (fun v : V => v.val) he + have ht : (t:ℝ) = 1 := congrArg (fun t : I => (t:ℝ)) (hρ hx) + linarith + have hdeg : G.degree (Sum.inl v) = 1 := by + rw [hl] + change (if ρ.path t ∈ D then 1 else 2) = 1 + simp only [htD,↓reduceIte] + obtain ⟨z,hz,hunique⟩ := SimpleGraph.degree_eq_one_iff_existsUnique_adj.mp hdeg + have hsub : (G.neighborSet (Sum.inl v)).Subsingleton := by + intro x hx y hy + exact (hunique x hx).trans (hunique y hy).symm + have hnot := r.property.isTrail.not_mem_support_of_subsingleton_neighborSet + (fun he => hva (Sum.inl.inj he)) (fun he => hvb (Sum.inl.inj he)) hsub + exact hnot (ρ.vertex v (mem_range_self t)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcChartPartition.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcChartPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..0276506e59f10b7d3fcf098a9ed0139083fda1dc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcChartPartition.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.OrientedDoubleChartArc +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusSmoothStructure +import Mathlib.Topology.UnitInterval + +namespace OAI + +/-! A compact embedded arc in the actual transverse double locus has a +finite ordered subdivision into the smooth regular chart arcs constructed above. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} + +theorem double_arc_chart_partition + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + {γ : ℝ → surfaceDoublePairs f} {a b : ℝ} (hab : a ≤ b) + (hγ : ContinuousOn γ (Icc a b)) : + ∃ (τ : ℕ → ℝ) (N : ℕ), τ 0 = a ∧ Monotone τ ∧ + (∀ n, a ≤ τ n ∧ τ n ≤ b) ∧ (∀ n ≥ N, τ n = b) ∧ + ∀ n, ∃ c : SmoothDoubleChart f, + MapsTo γ (Icc (τ n) (τ (n+1))) c.coord.source := by + let C : surfaceDoublePairs f → Set (Icc a b) := fun p => + (fun t : Icc a b => γ t) ⁻¹' (transverseDoubleChart hf hreg p).coord.source + have hC : ∀ p, IsOpen (C p) := fun p => + (transverseDoubleChart hf hreg p).coord.open_source.preimage hγ.domRestrict + have hcover : univ ⊆ ⋃ p, C p := by + intro t _ + refine mem_iUnion.mpr ⟨γ t,?_⟩ + exact transverseDoubleChart_mem hf hreg (γ t) + obtain ⟨τ,hzero,hmono,⟨N,hend⟩,hsub⟩ := + exists_monotone_Icc_subset_open_cover_Icc hab hC hcover + refine ⟨fun n => (τ n).val,N,hzero,fun _ _ h => hmono h, + fun n => (τ n).property,hend,?_⟩ + intro n + obtain ⟨p,hp⟩ := hsub n + refine ⟨transverseDoubleChart hf hreg p,?_⟩ + intro r hr + have hrab : r ∈ Icc a b := ⟨(τ n).property.1.trans hr.1,hr.2.trans (τ (n+1)).property.2⟩ + exact hp (show (⟨r,hrab⟩ : Icc a b) ∈ Icc (τ n) (τ (n+1)) from hr) + +theorem finite_smooth_double_arc_pieces + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + {γ : ℝ → surfaceDoublePairs f} {a b : ℝ} (hab : a < b) + (hγ : ContinuousOn γ (Icc a b)) (hinj : InjOn γ (Icc a b)) : + ∃ (τ : ℕ → ℝ) (N : ℕ), τ 0 = a ∧ Monotone τ ∧ + (∀ n, a ≤ τ n ∧ τ n ≤ b) ∧ (∀ n ≥ N, τ n = b) ∧ + ∀ n, τ n < τ (n+1) → + ∃ P : SmoothCompactArc (planeModel.prod planeModel) (M × M), + P.curve '' Icc P.start P.finish = + (fun t => (γ t).val) '' Icc (τ n) (τ (n+1)) ∧ + P.curve P.start = (γ (τ n)).val ∧ + P.curve P.finish = (γ (τ (n+1))).val := by + obtain ⟨τ,N,hzero,hmono,hbounds,hend,hcharts⟩ := + double_arc_chart_partition hf hreg hab.le hγ + refine ⟨τ,N,hzero,hmono,hbounds,hend,?_⟩ + intro n hn + obtain ⟨c,hc⟩ := hcharts n + have hsub : Icc (τ n) (τ (n+1)) ⊆ Icc a b := Icc_subset_Icc (hbounds n).1 (hbounds (n+1)).2 + obtain ⟨P,s,hs,hP,hstart,hfinish,himage,hleft,hright⟩ := + c.oriented_arc hn (hγ.mono hsub) (hinj.mono hsub) hc + exact ⟨P,himage,hleft,hright⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcExceptionalTimes.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcExceptionalTimes.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c28bcc7346c07337d2048693c8475db3e9be992 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleArcExceptionalTimes.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteExceptionalDoublePairs +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapOrderedArc + +namespace OAI + +/-! Along an embedded ordered double arc, only finitely many parameter +values can meet any of the finitely many singular points of the prepared map. -/ +noncomputable section +open Set Filter Manifold Topology unitInterval +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma double_arc_exceptional_times_finite {X Y T : Type*} (f : X → Y) + (hfin : ∀ y, {x | f x = y}.Finite) {S : Set X} (hS : S.Finite) + (Γ : T → X × X) (hΓ : Function.Injective Γ) + (heq : ∀ t, f (Γ t).1 = f (Γ t).2) : + {t | (Γ t).1 ∈ S ∨ (Γ t).2 ∈ S}.Finite := by + have hbad := finite_exceptional_double_pairs f hfin hS + have hpre := hbad.preimage hΓ.injOn + exact hpre.subset (fun t ht => ⟨ht,heq t⟩) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem prepared_crosscap_ordered_arc_regular {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) + (p : M) (hp : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ q : M, q ≠ p ∧ ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f q) ∧ + ∃ Γ : Path (p,p) (q,q), IsClosedEmbedding Γ ∧ + (∀ t, f (Γ t).1 = f (Γ t).2) ∧ + (∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → (Γ t).1 ≠ (Γ t).2) ∧ + {t : I | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ t).1) ∨ + ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (Γ t).2)}.Finite := by + obtain ⟨q,hqp,hq,Γ,hΓ,hΓeq,hΓne⟩ := prepared_crosscap_ordered_arc hf hfin hreg hrep p hp + refine ⟨q,hqp,hq,Γ,hΓ,hΓeq,hΓne,?_⟩ + exact double_arc_exceptional_times_finite f (prepared_surface_finite_fiber hf hrep) + hfin Γ hΓ.injective hΓeq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleChartReparametrization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleChartReparametrization.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f8625e5339d9f503b816e01603ee0b5e22bc993 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleChartReparametrization.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalMonotoneTransition +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleTransitions + +namespace OAI + +/-! Actual double-locus chart changes admit global oriented smooth +reparametrizations retaining both surface-sheet germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothDoubleChart +variable {f : M → ProjectionTarget 3} + +theorem oriented_reparametrization (a b : SmoothDoubleChart f) {t : ℝ} + (ht : t ∈ a.overlap b) : + ∃ (s : ℝ) (e : ℝ ≃ₜ ℝ), (s = 1 ∨ s = -1) ∧ + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ StrictMono e ∧ + (fun u => a.coord.symm (s * e u)) =ᶠ[𝓝 t] b.coord.symm := by + have hn := a.transition_derivative_ne_zero b ht + have hs : ∃ s : ℝ, (s = 1 ∨ s = -1) ∧ + 0 < deriv (fun u => s * a.transition b u) t := by + by_cases hp : 0 < deriv (a.transition b) t + · refine ⟨1,Or.inl rfl,?_⟩ + simpa only [one_mul] using hp + · have hneg : deriv (a.transition b) t < 0 := lt_of_le_of_ne (le_of_not_gt hp) hn + refine ⟨-1,Or.inr rfl,?_⟩ + simpa only [neg_one_mul,deriv.fun_neg] using neg_pos.mpr hneg + obtain ⟨s,hs,hpos⟩ := hs + have hss : s*s = 1 := by rcases hs with rfl | rfl <;> norm_num + have hsmooth : ContDiffOn ℝ ∞ (fun u => s * a.transition b u) (a.overlap b) := + contDiffOn_const.mul (a.transition_smooth b) + obtain ⟨e,hes,hei,hem,he⟩ := local_increasing_diffeomorphism + (a.overlap_open b) hsmooth ht hpos + refine ⟨s,e,hs,hes,hei,hem,?_⟩ + filter_upwards [he,(a.overlap_open b).mem_nhds ht] with u hu hU + rw [hu,← mul_assoc,hss,one_mul] + exact a.coord.left_inv hU.2 + +end SmoothDoubleChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..b27215b854a0a3782e3c1bfd7915b689ebeedff8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryArc.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveBoundaryPaths +import OAI.Geometry.SurfaceImmersion.Whitney.CurveBoundaryEmbeddedArc + +namespace OAI + +/-! Every actual crosscap endpoint is joined to another one by an +embedded arc of the compactified double curve, with regular interior. -/ +noncomputable section +open Set Filter Manifold Topology unitInterval +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem prepared_double_curve_boundary_arc {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∀ p : doubleCurveBoundary f, ∃ q : doubleCurveBoundary f, q ≠ p ∧ + ∃ γ : Path p.val q.val, IsClosedEmbedding γ ∧ + ∀ t : I, 0 < (t:ℝ) → (t:ℝ) < 1 → γ t ∉ doubleCurveBoundary f := by + obtain ⟨V,P,hV,hDV,hP,hdis,hcover,hw,_⟩ := prepared_double_curve_boundary_paths hf hfin hreg hrep + exact curve_boundary_embedded_arc (doubleCurveBoundary f) V hDV hV P + (fun E hE => ⟨(hP E hE).1,(hP E hE).2.2⟩) hdis hcover hw + (transverse_double_curve_interior_chart hf hreg) + (transverse_double_curve_boundary_chart hf hrep) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryPaths.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0f6fc500e2d8333eca8bea951294deb8e7d81b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveBoundaryPaths.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteDoubleCurvePieces +import OAI.Geometry.SurfaceImmersion.Geometry.CurveIncidenceBoundaryPair + +namespace OAI + +/-! The prepared self-transverse surface map has actual finite paths +joining every crosscap endpoint to another crosscap endpoint. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem prepared_double_curve_boundary_paths {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (hrep : ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t))) : + ∃ (V : Set (compactifiedDoubleCurve f)) (P : Finset (Set (compactifiedDoubleCurve f))), + V.Finite ∧ doubleCurveBoundary f ⊆ V ∧ + (∀ E ∈ P, IsOpen E ∧ IsConnected E ∧ Disjoint E V ∧ closure E \ E ⊆ V) ∧ + (∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) ∧ Vᶜ = ⋃ E ∈ P, E ∧ + (∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) ∧ + ∀ p : doubleCurveBoundary f, ∃ q : doubleCurveBoundary f, q ≠ p ∧ + ∃ (hp : p.val ∈ V) (hq : q.val ∈ V), Nonempty + ((curveIncidenceGraph V P).Path (Sum.inl ⟨p.val,hp⟩) (Sum.inl ⟨q.val,hq⟩)) := by + let : CompactSpace (compactifiedDoubleCurve f) := + isCompact_iff_compactSpace.mp (compactifiedDoubleCurve_compact f) + have hline := transverse_double_curve_interior_chart hf hreg + have hhalf := transverse_double_curve_boundary_chart hf hrep + obtain ⟨V,P,hV,hDV,hP,hdis,hcover,hw⟩ := compact_curve_pieces (doubleCurveBoundary f) + (doubleCurveBoundary_finite hf hfin) (fun p => by + by_cases hp : p ∈ doubleCurveBoundary f + · exact Or.inr (hhalf p hp) + · exact Or.inl (hline p hp)) + refine ⟨V,P,hV,hDV,hP,hdis,hcover,hw,?_⟩ + intro p + obtain ⟨q,hqp,hpath⟩ := curve_boundary_pair (doubleCurveBoundary f) V hDV hV P + (fun E hE => ⟨(hP E hE).1,(hP E hE).2.2⟩) hdis hcover hw hline hhalf p + exact ⟨q,hqp,hDV p.property,hDV q.property,hpath⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveMembership.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveMembership.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e184085ca51b6413fb576723454726e59d2d5a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveMembership.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactifiedDoubleCurve + +namespace OAI + +/-! Off the diagonal, membership in the compactified curve is exactly +membership in the actual double-pair locus. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +theorem compactifiedDoubleCurve_pair_equality {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {z : M × M} + (hz : unorderedPair z ∈ compactifiedDoubleCurve f) : f z.1 = f z.2 := by + obtain ⟨w,hw,he⟩ := hz + have hwf := doublePairs_closure_equal hf.continuous hw + change f w.1 = f w.2 at hwf + rcases unorderedPair_eq.mp he with he | he + · simpa only [he] using hwf + · rw [he] at hwf + exact hwf.symm + +theorem compactifiedDoubleCurve_off_diagonal {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {z : M × M} + (hne : z.1 ≠ z.2) : + unorderedPair z ∈ compactifiedDoubleCurve f ↔ z ∈ surfaceDoublePairs f := by + constructor + · intro hz + exact ⟨hne,compactifiedDoubleCurve_pair_equality hf hz⟩ + · intro hz + exact ⟨z,subset_closure hz,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc31714ff0071fc027af7413fd533d483bd08e48 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveParameter.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleAtlas + +namespace OAI + +/-! A regular smooth curve lying in an actual double-locus chart has a +smooth local scalar parameter with nonzero derivative. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothDoubleChart +variable {f : M → ProjectionTarget 3} + +theorem curve_parameter (c : SmoothDoubleChart f) {γ : ℝ → surfaceDoublePairs f} {x : ℝ} + (hc : ContinuousAt γ x) (hx : γ x ∈ c.coord.source) + (hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ (fun t => (γ t).val.1) x) + (hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ (fun t => (γ t).val.2) x) + (hpair : Function.Injective + ((mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.1) x).prod + (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.2) x))) : + ∃ h : ℝ → ℝ, ContDiffAt ℝ ∞ h x ∧ deriv h x ≠ 0 ∧ + h x = c.coord (γ x) ∧ γ =ᶠ[𝓝 x] c.coord.symm ∘ h := by + let h : ℝ → ℝ := fun t => c.expression + (chart c.left (γ t).val.1,chart c.right (γ t).val.2) + have hsource := c.source_formula (γ x) hx + have hleft := ((chart_smooth c.left).contMDiffAt + ((chart c.left).open_source.mem_nhds hsource.1)).comp x hA + have hright := ((chart_smooth c.right).contMDiffAt + ((chart c.right).open_source.mem_nhds hsource.2.1)).comp x hB + have hh : ContDiffAt ℝ ∞ h x := c.expression_smooth.contDiffAt.comp x + (hleft.contDiffAt.prodMk hright.contDiffAt) + have hnear : ∀ᶠ t in 𝓝 x, γ t ∈ c.coord.source := hc.eventually (c.coord.open_source.mem_nhds hx) + have he : h =ᶠ[𝓝 x] c.coord ∘ γ := by + filter_upwards [hnear] with t ht + exact (c.source_formula (γ t) ht).2.2.symm + have hval : h x = c.coord (γ x) := he.eq_of_nhds + have hinv : γ =ᶠ[𝓝 x] c.coord.symm ∘ h := by + filter_upwards [hnear,he] with t ht ht' + change γ t = c.coord.symm (h t) + rw [ht'] + exact (c.coord.left_inv ht).symm + have htarget : h x ∈ c.coord.target := hval ▸ c.coord.map_source hx + have hDA := c.inverse_left_smooth.contMDiffAt (c.coord.open_target.mem_nhds htarget) + have hDB := c.inverse_right_smooth.contMDiffAt (c.coord.open_target.mem_nhds htarget) + have heA : (fun t => (γ t).val.1) =ᶠ[𝓝 x] (fun t => (c.coord.symm t).val.1) ∘ h := + hinv.mono fun _ ht => congrArg (fun p => p.val.1) ht + have heB : (fun t => (γ t).val.2) =ᶠ[𝓝 x] (fun t => (c.coord.symm t).val.2) ∘ h := + hinv.mono fun _ ht => congrArg (fun p => p.val.2) ht + have hDiffeo := hh.contMDiffAt.mdifferentiableAt (by simp) + have hAD := heA.mfderiv_eq (I := 𝓘(ℝ)) (I' := planeModel) + have hBD := heB.mfderiv_eq (I := 𝓘(ℝ)) (I' := planeModel) + rw [mfderiv_comp x (hDA.mdifferentiableAt (by simp)) hDiffeo] at hAD + rw [mfderiv_comp x (hDB.mdifferentiableAt (by simp)) hDiffeo] at hBD + refine ⟨h,hh,?_,hval,hinv⟩ + intro hz + have hhz : HasDerivAt h 0 x := by + simpa only [hz] using (hh.differentiableAt (by simp)).hasDerivAt + have hmf : HasMFDerivAt 𝓘(ℝ) 𝓘(ℝ) h x (0 : ℝ →L[ℝ] ℝ) := by + simpa using hhz.hasFDerivAt.hasMFDerivAt + have hDz := hmf.mfderiv + rw [hDz] at hAD hBD + have hA1 := congrArg (fun L => L (1:ℝ)) hAD + have hB1 := congrArg (fun L => L (1:ℝ)) hBD + change (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.1) x) 1 = + (mfderiv 𝓘(ℝ) planeModel (fun t => (c.coord.symm t).val.1) (h x)) 0 at hA1 + change (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.2) x) 1 = + (mfderiv 𝓘(ℝ) planeModel (fun t => (c.coord.symm t).val.2) (h x)) 0 at hB1 + rw [map_zero] at hA1 hB1 + have h10 : + ((mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.1) x).prod + (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.2) x)) 1 = + ((mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.1) x).prod + (mfderiv 𝓘(ℝ) planeModel (fun t => (γ t).val.2) x)) 0 := by + apply Prod.ext + · exact hA1.trans (map_zero _).symm + · exact hB1.trans (map_zero _).symm + have hn := hpair h10 + change (1:ℝ) = 0 at hn + exact one_ne_zero hn + +end SmoothDoubleChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveVelocities.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveVelocities.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0a9e84d0043ff985e74d777c92eda72fed833a0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleCurveVelocities.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothSurfaceDoubleChart + +namespace OAI + +/-! At two regular sheets the smooth paired double curve projects to +regular curves on both sheets. Equal image velocities supply the key relation. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma equal_image_curve_derivatives {f : M → ProjectionTarget 3} {A B : ℝ → M} {t : ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ A t) + (hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ B t) + (heq : f ∘ A =ᶠ[𝓝 t] f ∘ B) : + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A t)).comp + (mfderiv 𝓘(ℝ) planeModel A t) = + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B t)).comp + (mfderiv 𝓘(ℝ) planeModel B t) := by + have he := heq.mfderiv_eq (I := 𝓘(ℝ)) (I' := 𝓘(ℝ,ProjectionTarget 3)) + rw [mfderiv_comp t (hf.mdifferentiable (by simp)).mdifferentiableAt + (hA.mdifferentiableAt (by simp)), + mfderiv_comp t (hf.mdifferentiable (by simp)).mdifferentiableAt + (hB.mdifferentiableAt (by simp))] at he + exact he + +lemma paired_injective_of_equal_images + {W : Type*} {E : Type*} {F : Type*} {G : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + (A : W →L[ℝ] E) (B : W →L[ℝ] F) (P : E →L[ℝ] G) (Q : F →L[ℝ] G) + (hpair : Function.Injective (A.prod B)) + (hP : Function.Injective P) (hQ : Function.Injective Q) + (heq : P.comp A = Q.comp B) : Function.Injective A ∧ Function.Injective B := by + constructor + · intro u v huv + apply hpair + apply Prod.ext huv + change B u = B v + apply hQ + have hh := congrArg P huv + change (P.comp A) u = (P.comp A) v at hh + simpa only [heq,ContinuousLinearMap.comp_apply] using hh + · intro u v huv + apply hpair + apply Prod.ext _ huv + change A u = A v + apply hP + have hh := congrArg Q huv + change (Q.comp B) u = (Q.comp B) v at hh + simpa only [← heq,ContinuousLinearMap.comp_apply] using hh + +theorem regular_double_curve_velocities {f : M → ProjectionTarget 3} + {A B : ℝ → M} {t : ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ A t) + (hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ B t) + (heq : f ∘ A =ᶠ[𝓝 t] f ∘ B) + (hpair : Function.Injective + ((mfderiv 𝓘(ℝ) planeModel A t).prod (mfderiv 𝓘(ℝ) planeModel B t))) + (hAf : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A t))) + (hBf : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B t))) : + Function.Injective (mfderiv 𝓘(ℝ) planeModel A t) ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel B t) := +by + have hrel := equal_image_curve_derivatives hf hA hB heq + constructor + · intro u v huv + apply hpair + apply Prod.ext huv + change mfderiv 𝓘(ℝ) planeModel B t u = mfderiv 𝓘(ℝ) planeModel B t v + apply hBf + have hh := congrArg (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A t)) huv + change ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A t)).comp + (mfderiv 𝓘(ℝ) planeModel A t)) u = + ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (A t)).comp + (mfderiv 𝓘(ℝ) planeModel A t)) v at hh + rw [hrel] at hh + exact hh + · intro u v huv + apply hpair + apply Prod.ext _ huv + change mfderiv 𝓘(ℝ) planeModel A t u = mfderiv 𝓘(ℝ) planeModel A t v + apply hAf + have hh := congrArg (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B t)) huv + change ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B t)).comp + (mfderiv 𝓘(ℝ) planeModel B t)) u = + ((mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (B t)).comp + (mfderiv 𝓘(ℝ) planeModel B t)) v at hh + rw [← hrel] at hh + exact hh + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleImageCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleImageCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..05d90ae4d51615f902ec2673657cdf1ed8e5435e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleImageCoordinates.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RegularCurveCoordinates +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleAtlas +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleCurveVelocities + +namespace OAI + +/-! Straight target coordinates for the common image of two actual +regular sheets in a smooth double-locus chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +namespace SmoothDoubleChart +variable {f : M → ProjectionTarget 3} + +theorem common_image_coordinates (c : SmoothDoubleChart f) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {t : ℝ} + (ht : t ∈ c.coord.target) + (hA : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (c.coord.symm t).val.1)) + (hB : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f (c.coord.symm t).val.2)) : + ∃ (e : OpenPartialHomeomorph (Base × ℝ) (Fin 3 → ℝ)) (U : Set ℝ), + IsOpen U ∧ t ∈ U ∧ U ⊆ c.coord.target ∧ ContDiff ℝ ∞ e ∧ + ContDiffOn ℝ ∞ e.symm e.target ∧ + ∀ s ∈ U, (0,s) ∈ e.source ∧ + (EuclideanSpace.equiv (Fin 3) ℝ).symm (e (0,s)) = f (c.coord.symm s).val.1 := by + let A : ℝ → M := fun s => (c.coord.symm s).val.1 + let B : ℝ → M := fun s => (c.coord.symm s).val.2 + have hAs := c.inverse_left_smooth.contMDiffAt (c.coord.open_target.mem_nhds ht) + have hBs := c.inverse_right_smooth.contMDiffAt (c.coord.open_target.mem_nhds ht) + have hEq : f ∘ A =ᶠ[𝓝 t] f ∘ B := + Filter.Eventually.of_forall fun s => (c.coord.symm s).property.2 + have hAI := (regular_double_curve_velocities hf hAs hBs hEq (c.inverse_regular t ht) hA hB).1 + have hC : ContDiffOn ℝ ∞ (f ∘ A) c.coord.target := + (hf.comp_contMDiffOn c.inverse_left_smooth).contDiffOn + have hDI : Function.Injective (fderiv ℝ (f ∘ A) t) := by + rw [← mfderiv_eq_fderiv, mfderiv_comp t (hf.mdifferentiable (by simp) (A t)) + (hAs.mdifferentiableAt (by simp))] + exact hA.comp hAI + obtain ⟨W,hW,htW,hWT,F,hF,hFC⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := t)) c.coord.open_target (singleton_subset_iff.mpr ht) hC + have hFe : F =ᶠ[𝓝 t] f ∘ A := hFC.eventuallyEq_of_mem (hW.mem_nhds (htW (by simp))) + have hFI : Function.Injective (fderiv ℝ F t) := by rw [hFe.fderiv_eq]; exact hDI + let E := EuclideanSpace.equiv (Fin 3) ℝ + let C : ℝ → (Fin 3 → ℝ) := E ∘ F + have hCs : ContDiff ℝ ∞ C := E.contDiff.comp hF + have hCI : Function.Injective (fderiv ℝ C t) := by + rw [fderiv_comp t E.differentiableAt (hF.differentiable (by simp) t),E.fderiv] + exact E.injective.comp hFI + have hCv : deriv C t ≠ 0 := by + intro hz + have he : fderiv ℝ C t 1 = fderiv ℝ C t 0 := by + rw [fderiv_apply_one_eq_deriv,hz,map_zero] + have hn := hCI he + norm_num at hn + obtain ⟨e,U,hU,htU,hes,hei,haxis⟩ := regular_curve_target_coordinates hCs t hCv + refine ⟨e,U ∩ W,hU.inter hW,⟨htU,htW (by simp)⟩, + inter_subset_right.trans hWT,hes,hei,?_⟩ + intro s hs + refine ⟨(haxis s hs.1).1,?_⟩ + rw [(haxis s hs.1).2] + change E.symm (E (F s)) = f (A s) + rw [E.symm_apply_apply] + exact hFC hs.2 + +end SmoothDoubleChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..05e075e3c8cba8a8412b0fd59d15b311ad7b1061 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusArc.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusChart + +namespace OAI + +/-! A regular zero of the pair-chart difference map has an actual smooth, +injective interval parametrization of its local zero set. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem double_locus_local_arc {f : Base × Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (p : Base × Base) (hp : f p = 0) + (hsurj : Function.Surjective (fderiv ℝ f p)) : + ∃ (U : Set (Base × Base)) (ε : ℝ) (γ : ℝ → Base × Base), + IsOpen U ∧ p ∈ U ∧ 0 < ε ∧ γ 0 = p ∧ + ContDiffOn ℝ ∞ γ (Ioo (-ε) ε) ∧ (Ioo (-ε) ε).InjOn γ ∧ + γ '' Ioo (-ε) ε = U ∩ f ⁻¹' {0} := by + obtain ⟨e,hpe,hef,he,heinv⟩ := double_locus_submersion_chart hf p hsurj + let c := (e p).2 + let τ : ℝ → ProjectionTarget 3 × ℝ := fun t => (0,c+t) + have hτ : ContDiff ℝ ∞ τ := contDiff_const.prodMk (contDiff_const.add contDiff_id) + have hτ0 : τ 0 = e p := by + apply Prod.ext + · exact (hef p).trans hp |>.symm + · simp [τ,c] + have hpre : ∀ᶠ t in 𝓝 (0 : ℝ), τ t ∈ e.target := + hτ.continuous.continuousAt.preimage_mem_nhds (by rw [hτ0]; exact e.open_target.mem_nhds (e.map_source hpe)) + obtain ⟨ε,hε,hεtarget⟩ := Metric.eventually_nhds_iff.mp hpre + let J := Ioo (-ε) ε + have hJ (t : ℝ) (ht : t ∈ J) : τ t ∈ e.target := by + apply hεtarget + rw [dist_zero_right,Real.norm_eq_abs,abs_lt] + exact ht + let U := e.source ∩ e ⁻¹' {z | z.2 ∈ Ioo (c-ε) (c+ε)} + let γ : ℝ → Base × Base := e.symm ∘ τ + have hU : IsOpen U := e.isOpen_inter_preimage (isOpen_Ioo.preimage continuous_snd) + have hpU : p ∈ U := by + refine ⟨hpe,?_⟩ + change c ∈ Ioo (c-ε) (c+ε) + constructor <;> linarith + have hγ0 : γ 0 = p := by + change e.symm (τ 0) = p + rw [hτ0,e.left_inv hpe] + have hγ : ContDiffOn ℝ ∞ γ J := heinv.comp hτ.contDiffOn hJ + have hinj : J.InjOn γ := by + intro s hs t ht hst + have hh := e.symm.injOn (hJ s hs) (hJ t ht) hst + have hsec := congrArg Prod.snd hh + exact add_left_cancel hsec + refine ⟨U,ε,γ,hU,hpU,hε,hγ0,hγ,hinj,?_⟩ + apply Set.Subset.antisymm + · rintro x ⟨t,ht,rfl⟩ + have htT := hJ t ht + have hback : e (γ t) = τ t := e.right_inv htT + refine ⟨⟨e.map_target htT,?_⟩,?_⟩ + · change (e (γ t)).2 ∈ Ioo (c-ε) (c+ε) + rw [hback] + change c+t ∈ Ioo (c-ε) (c+ε) + constructor <;> have := ht.1 <;> have := ht.2 <;> linarith + · change f (γ t) = 0 + rw [← hef,hback] + · intro x hx + have hxt : (e x).2 ∈ Ioo (c-ε) (c+ε) := hx.1.2 + let t := (e x).2-c + have ht : t ∈ J := by + constructor <;> dsimp [t] <;> have := hxt.1 <;> have := hxt.2 <;> linarith + refine ⟨t,ht,?_⟩ + change e.symm (τ t) = x + have hτt : τ t = e x := by + apply Prod.ext + · exact ((hef x).trans hx.2).symm + · change c+((e x).2-c) = (e x).2 + ring + rw [hτt,e.left_inv hx.1.1] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusAugmentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f815a2878319018580e0b4ed8b51a0b490898916 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusAugmentation.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticDoubleTransverse +import Mathlib.LinearAlgebra.Projection + +namespace OAI + +/-! A three-dimensional submersion on the four-dimensional pair chart +admits one additional linear coordinate with invertible derivative. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem double_locus_linear_augmentation (K : (Base × Base) →L[ℝ] ProjectionTarget 3) + (hK : Function.Surjective K) : + ∃ ℓ : (Base × Base) →L[ℝ] ℝ, Function.Bijective (K.prod ℓ) := by + have hdim : Module.finrank ℝ K.ker = 1 := by + have h := K.toLinearMap.finrank_range_add_finrank_ker + rw [LinearMap.range_eq_top.mpr hK,finrank_top] at h + have hE : Module.finrank ℝ (Base × Base) = 4 := by simp [Base] + have hF : Module.finrank ℝ (ProjectionTarget 3) = 3 := by simp [ProjectionTarget] + rw [hE,hF] at h + omega + let e : K.ker ≃L[ℝ] ℝ := ContinuousLinearEquiv.ofFinrankEq (by simpa using hdim) + obtain ⟨P,hP⟩ := K.ker.exists_isCompl + let π : (Base × Base) →L[ℝ] K.ker := (K.ker.projectionOnto P hP).toContinuousLinearMap + let ℓ : (Base × Base) →L[ℝ] ℝ := e.toContinuousLinearMap.comp π + have hzero (x : Base × Base) (hx : K x = 0) (hℓ : ℓ x = 0) : x = 0 := by + have hmem : x ∈ K.ker := hx + have hπ : π x = ⟨x,hmem⟩ := by + exact Submodule.projectionOnto_apply_of_mem_left hP hmem + have he : e (⟨x,hmem⟩ : K.ker) = e 0 := by + simpa only [ℓ,ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,hπ,map_zero] using hℓ + exact congrArg Subtype.val (e.injective he) + have hi : Function.Injective (K.prod ℓ) := by + intro x y hxy + apply sub_eq_zero.mp + apply hzero + · rw [map_sub] + exact sub_eq_zero.mpr (congrArg Prod.fst hxy) + · rw [map_sub] + exact sub_eq_zero.mpr (congrArg Prod.snd hxy) + refine ⟨ℓ,hi,?_⟩ + apply (LinearMap.injective_iff_surjective_of_finrank_eq_finrank (f := (K.prod ℓ).toLinearMap) _).mp hi + simp [Base,ProjectionTarget] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f854b25a29f06156cd63784e858efad4345e61d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusChart.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusAugmentation + +namespace OAI + +/-! Smooth submersion coordinates for the three-component difference +map on a pair of surface charts. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem double_locus_submersion_chart {f : Base × Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (p : Base × Base) + (hsurj : Function.Surjective (fderiv ℝ f p)) : + ∃ e : OpenPartialHomeomorph (Base × Base) (ProjectionTarget 3 × ℝ), p ∈ e.source ∧ + (∀ x, (e x).1 = f x) ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + obtain ⟨ℓ,hℓ⟩ := double_locus_linear_augmentation (fderiv ℝ f p) hsurj + let L := ContinuousLinearEquiv.ofBijective ((fderiv ℝ f p).prod ℓ) + (LinearMap.ker_eq_bot.mpr hℓ.1) (LinearMap.range_eq_top.mpr hℓ.2) + let g : Base × Base → ProjectionTarget 3 × ℝ := fun x => (f x,ℓ x) + have hg : ContDiff ℝ ∞ g := hf.prodMk ℓ.contDiff + have hd : HasFDerivAt g L.toContinuousLinearMap p := + (hf.differentiable (by simp) p).hasFDerivAt.prodMk ℓ.hasFDerivAt + let e₀ := hg.contDiffAt.toOpenPartialHomeomorph g hd (by simp) + let W : Set (Base × Base) := {x | IsUnit (L.symm.toContinuousLinearMap.comp (fderiv ℝ g x))} + have hcont : Continuous (fun x => L.symm.toContinuousLinearMap.comp (fderiv ℝ g x)) := + continuous_const.clm_comp (hg.continuous_fderiv (by simp)) + have hW : IsOpen W := Units.isOpen.preimage hcont + have hpW : p ∈ W := by + change IsUnit (L.symm.toContinuousLinearMap.comp (fderiv ℝ g p)) + rw [hd.fderiv] + have heq : L.symm.toContinuousLinearMap.comp L.toContinuousLinearMap = + ContinuousLinearMap.id ℝ (Base × Base) := by + apply ContinuousLinearMap.ext + intro v + exact L.symm_apply_apply v + rw [heq] + exact isUnit_one + let e := e₀.restrOpen W hW + have he : (e : Base × Base → ProjectionTarget 3 × ℝ) = g := rfl + refine ⟨e,⟨hg.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),hpW⟩, + (fun _ => rfl),?_,?_⟩ + · simpa only [he] using hg + · intro y hy + have hunit : IsUnit (L.symm.toContinuousLinearMap.comp (fderiv ℝ g (e.symm y))) := + (e.map_target hy).2 + obtain ⟨u,hu⟩ := hunit + let D := (ContinuousLinearEquiv.ofUnit u).trans L + have heq : D.toContinuousLinearMap = fderiv ℝ g (e.symm y) := by + apply ContinuousLinearMap.ext + intro v + change L ((u : (Base × Base) →L[ℝ] (Base × Base)) v) = _ + rw [hu] + exact L.apply_symm_apply _ + have hdy : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he,heq] + exact (hg.differentiable (by simp) _).hasFDerivAt + exact (e.contDiffAt_symm hy hdy (by rw [he]; exact hg.contDiffAt)).contDiffWithinAt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..a723995ed07051c3b5cf17aaecac7624f594a7a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusImmersion.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusProjections + +namespace OAI + +/-! The natural inclusion of the smooth double locus into the pair of +surfaces has injective differential. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} + +theorem doubleLocus_inclusion_immersion + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (p : surfaceDoublePairs f) : + let := doubleLocusChartedSpace hf hreg + Function.Injective + ((mfderiv 𝓘(ℝ) planeModel (fun q : surfaceDoublePairs f => q.val.1) p).prod + (mfderiv 𝓘(ℝ) planeModel (fun q : surfaceDoublePairs f => q.val.2) p)) := by + let := doubleLocusChartedSpace hf hreg + let := doubleLocus_isManifold hf hreg + let c := transverseDoubleChart hf hreg p + have hp : p ∈ c.coord.source := transverseDoubleChart_mem hf hreg p + have hcp : c.coord p ∈ c.coord.target := c.coord.map_source hp + have hc : ContMDiffAt 𝓘(ℝ) 𝓘(ℝ) ∞ c.coord p := + contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas p) hp + let A : ℝ → M := fun t => (c.coord.symm t).val.1 + let B : ℝ → M := fun t => (c.coord.symm t).val.2 + have hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ A (c.coord p) := + c.inverse_left_smooth.contMDiffAt (c.coord.open_target.mem_nhds hcp) + have hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ B (c.coord p) := + c.inverse_right_smooth.contMDiffAt (c.coord.open_target.mem_nhds hcp) + have heA : (fun q : surfaceDoublePairs f => q.val.1) =ᶠ[𝓝 p] A ∘ c.coord := by + filter_upwards [c.coord.open_source.mem_nhds hp] with q hq + change q.val.1 = (c.coord.symm (c.coord q)).val.1 + rw [c.coord.left_inv hq] + have heB : (fun q : surfaceDoublePairs f => q.val.2) =ᶠ[𝓝 p] B ∘ c.coord := by + filter_upwards [c.coord.open_source.mem_nhds hp] with q hq + change q.val.2 = (c.coord.symm (c.coord q)).val.2 + rw [c.coord.left_inv hq] + have hDA : mfderiv 𝓘(ℝ) planeModel (fun q : surfaceDoublePairs f => q.val.1) p = + (mfderiv 𝓘(ℝ) planeModel A (c.coord p)).comp (mfderiv 𝓘(ℝ) 𝓘(ℝ) c.coord p) := by + rw [heA.mfderiv_eq,mfderiv_comp p (hA.mdifferentiableAt (by simp)) (hc.mdifferentiableAt (by simp))] + rfl + have hDB : mfderiv 𝓘(ℝ) planeModel (fun q : surfaceDoublePairs f => q.val.2) p = + (mfderiv 𝓘(ℝ) planeModel B (c.coord p)).comp (mfderiv 𝓘(ℝ) 𝓘(ℝ) c.coord p) := by + rw [heB.mfderiv_eq,mfderiv_comp p (hB.mdifferentiableAt (by simp)) (hc.mdifferentiableAt (by simp))] + rfl + have hci : Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ) c.coord p) := + (mdifferentiable_chart (I := 𝓘(ℝ)) p).mfderiv_injective hp + have hi := c.inverse_regular (c.coord p) hcp + dsimp only + intro u v huv + apply hci + apply hi + rw [hDA,hDB] at huv + exact huv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusProjections.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusProjections.lean new file mode 100644 index 0000000000000000000000000000000000000000..182dc7dcf18dfd87b1761c39e5e33c23b2629d94 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusProjections.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusSmoothStructure + +namespace OAI + +/-! The actual two projections from the smooth double locus to the surface +are smooth; their combined derivative is injective. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} + +theorem doubleLocus_projections_smooth + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) : + let := doubleLocusChartedSpace hf hreg + ContMDiff 𝓘(ℝ) planeModel ∞ (fun p : surfaceDoublePairs f => p.val.1) ∧ + ContMDiff 𝓘(ℝ) planeModel ∞ (fun p : surfaceDoublePairs f => p.val.2) := by + let := doubleLocusChartedSpace hf hreg + let := doubleLocus_isManifold hf hreg + constructor + · intro p + let c := transverseDoubleChart hf hreg p + have hp : p ∈ c.coord.source := transverseDoubleChart_mem hf hreg p + have hcp : c.coord p ∈ c.coord.target := c.coord.map_source hp + have hc : ContMDiffAt 𝓘(ℝ) 𝓘(ℝ) ∞ c.coord p := + contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas p) hp + have hA := c.inverse_left_smooth.contMDiffAt (c.coord.open_target.mem_nhds hcp) + apply (hA.comp p hc).congr_of_eventuallyEq + filter_upwards [c.coord.open_source.mem_nhds hp] with q hq + change q.val.1 = (c.coord.symm (c.coord q)).val.1 + rw [c.coord.left_inv hq] + · intro p + let c := transverseDoubleChart hf hreg p + have hp : p ∈ c.coord.source := transverseDoubleChart_mem hf hreg p + have hcp : c.coord p ∈ c.coord.target := c.coord.map_source hp + have hc : ContMDiffAt 𝓘(ℝ) 𝓘(ℝ) ∞ c.coord p := + contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas p) hp + have hA := c.inverse_right_smooth.contMDiffAt (c.coord.open_target.mem_nhds hcp) + apply (hA.comp p hc).congr_of_eventuallyEq + filter_upwards [c.coord.open_source.mem_nhds hp] with q hq + change q.val.2 = (c.coord.symm (c.coord q)).val.2 + rw [c.coord.left_inv hq] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusSmoothStructure.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusSmoothStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..aedb87e48bd1f38970d9fbb357c70e623d21e517 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleLocusSmoothStructure.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleTransitions + +namespace OAI + +/-! The transverse ordered double locus carries its actual smooth +one-dimensional manifold structure, built from the proved submersion charts. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] +variable {f : M → ProjectionTarget 3} + +def transverseDoubleChart + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (p : surfaceDoublePairs f) : SmoothDoubleChart f := + (exists_smooth_double_chart hf p (hreg _ _ p.property.1 p.property.2)).choose + +lemma transverseDoubleChart_mem + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (p : surfaceDoublePairs f) : p ∈ (transverseDoubleChart hf hreg p).coord.source := + (exists_smooth_double_chart hf p (hreg _ _ p.property.1 p.property.2)).choose_spec + +@[instance_reducible] +def doubleLocusChartedSpace + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) : + ChartedSpace ℝ (surfaceDoublePairs f) where + atlas := range fun p => (transverseDoubleChart hf hreg p).coord + chartAt := fun p => (transverseDoubleChart hf hreg p).coord + mem_chart_source := transverseDoubleChart_mem hf hreg + chart_mem_atlas := fun p => ⟨p,rfl⟩ + +theorem doubleLocus_isManifold + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) : + let := doubleLocusChartedSpace hf hreg + IsManifold 𝓘(ℝ) ∞ (surfaceDoublePairs f) := by + let := doubleLocusChartedSpace hf hreg + apply isManifold_of_contDiffOn 𝓘(ℝ) ∞ (surfaceDoublePairs f) + intro e e' he he' + obtain ⟨p,rfl⟩ := he + obtain ⟨q,rfl⟩ := he' + have h := (transverseDoubleChart hf hreg q).transition_smooth (transverseDoubleChart hf hreg p) + simpa [SmoothDoubleChart.transition,SmoothDoubleChart.overlap,OpenPartialHomeomorph.trans_source] + using h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleRotationFilling.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleRotationFilling.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3da85fbef7a63f3281772fe57a34ccecb280a2c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/DoubleRotationFilling.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialRotationFrame +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! An explicit relative filling of the twice-winding planar frame. +The third quaternion coordinate is a compact bump; no square-root choice +or topological extension assumption is needed. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def doubleRotationFrame (x : Base) : Base →L[ℝ] FrameTarget := + polynomialRotationFrame (x 0) (x 1) 0 + +def filledDoubleRotation (χ : Base → ℝ) (x : Base) : Base →L[ℝ] FrameTarget := + polynomialRotationFrame (x 0) (x 1) (χ x) + +lemma filledDoubleRotation_smooth {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) : + ContDiff ℝ ∞ (filledDoubleRotation χ) := by + have hu : ContDiff ℝ ∞ (fun x : Base => rotationFirst (x 0) (x 1) (χ x)) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [rotationFirst] <;> fun_prop + have hv : ContDiff ℝ ∞ (fun x : Base => rotationSecond (x 0) (x 1) (χ x)) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [rotationSecond] <;> fun_prop + exact (contDiff_const.smulRight hu).add (contDiff_const.smulRight hv) + +lemma filledDoubleRotation_injective {χ : Base → ℝ} (hχ : χ 0 ≠ 0) (x : Base) : + Function.Injective (filledDoubleRotation χ x) := by + apply polynomialRotationFrame_injective + by_cases hx : x = 0 + · subst x + simpa using sq_pos_of_ne_zero hχ + · have hn : (x 0)^2+(x 1)^2 > 0 := by + by_cases h0 : x 0 = 0 + · have h1 : x 1 ≠ 0 := by + intro h1 + apply hx + ext i + fin_cases i + · exact h0 + · exact h1 + simpa [h0] using sq_pos_of_ne_zero h1 + · exact add_pos_of_pos_of_nonneg (sq_pos_of_ne_zero h0) (sq_nonneg _) + exact add_pos_of_pos_of_nonneg hn (sq_nonneg _) + +lemma filledDoubleRotation_exterior {χ : Base → ℝ} {x : Base} + (hx : x ∉ tsupport χ) : + filledDoubleRotation χ =ᶠ[𝓝 x] doubleRotationFrame := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy + change χ y = 0 at hy + simp only [filledDoubleRotation,doubleRotationFrame,hy] + +/-- The first column is allowed to move in the interior. On the exterior +both columns are exactly those of the squared planar direction. -/ +theorem compact_double_rotation_filling {U : Set Base} (hU : IsOpen U) (h0 : 0 ∈ U) : + ∃ (A : Base → Base →L[ℝ] FrameTarget) (K : Set Base), + ContDiff ℝ ∞ A ∧ (∀ x, Function.Injective (A x)) ∧ IsCompact K ∧ K ⊆ U ∧ + ∀ x ∉ K, A =ᶠ[𝓝 x] doubleRotationFrame := by + obtain ⟨χ,hχ,hχc,_hχrange,hχsupp,hχone⟩ := + CollarVelocity.compact_cutoff (isCompact_singleton (x := (0 : Base))) hU + (singleton_subset_iff.mpr h0) + refine ⟨filledDoubleRotation χ,tsupport χ,filledDoubleRotation_smooth hχ, + filledDoubleRotation_injective ?_,hχc,hχsupp,fun x hx => filledDoubleRotation_exterior hx⟩ + rw [hχone 0 (mem_singleton 0)] + norm_num + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/EmbeddedAxisCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EmbeddedAxisCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7a9a46a8bf9b95f1bcdb1e05543fd395e532a5f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EmbeddedAxisCollar.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAxisRectangle +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalInjectivity +import OAI.Geometry.SurfaceImmersion.Geometry.ImmersionLocalInjectivity + +namespace OAI + +/-! A regular collar of an embedded compact boundary arc is embedded +on a uniform thinner rectangle. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem embedded_axis_collar {F : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) {a b : ℝ} (hab : a ≤ b) + (hreg : ∀ t ∈ Icc a b, Function.Injective (fderiv ℝ F (crosscapAxis t))) + (hinj : (Icc a b).InjOn (fun t => F (crosscapAxis t))) : + ∃ r : ℝ, 0 < r ∧ + {x : Base | |x 0| ≤ r ∧ x 1 ∈ Icc a b}.InjOn F := by + let K := crosscapAxis '' Icc a b + have hK : IsCompact K := isCompact_Icc.image crosscapAxis.continuous + have hKI : K.InjOn F := by + rintro x ⟨t,ht,rfl⟩ y ⟨s,hs,rfl⟩ h + exact congrArg crosscapAxis (hinj ht hs h) + have hlocal : ∀ x ∈ K, ∃ U : Set Base, IsOpen U ∧ x ∈ U ∧ U.InjOn F := by + rintro x ⟨t,ht,rfl⟩ + exact euclidean_surface_local_injective hF _ (hreg t ht) + obtain ⟨U,hU,hKU,hUI⟩ := compact_local_injectivity hF.continuous hK hKI hlocal + obtain ⟨r,hr,hrect⟩ := compact_axis_rectangle hab hU (fun t ht => by + simpa only [crosscapAxis_apply] using hKU (mem_image_of_mem crosscapAxis ht)) + have hsub : {x : Base | |x 0| ≤ r ∧ x 1 ∈ Icc a b} ⊆ U := by + intro x hx + have hh := hrect (x 0) (abs_le.mp hx.1) (x 1) + ⟨by linarith [hx.2.1],by linarith [hx.2.2]⟩ + have he : (![x 0,x 1] : Base) = x := by ext i; fin_cases i <;> rfl + simpa only [he] using hh + exact ⟨r,hr,hUI.mono hsub⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointRegularArcs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointRegularArcs.lean new file mode 100644 index 0000000000000000000000000000000000000000..c50f907778a25afac29658452438d8a7ce90f773 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointRegularArcs.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPathEndpointPieces +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteRegularPathSmooth +import OAI.Geometry.SurfaceImmersion.Whitney.PathCornerNeighborhood + +namespace OAI + +/-! Genuine smooth compact arcs at both ends of the finite source path, +with unchanged interior germs for later attachment. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} + +lemma affine_arc_smooth_regular (A : SmoothCompactArc planeModel M) {a b : ℝ} (ha : a ≠ 0) : + ContMDiffOn 𝓘(ℝ) planeModel ∞ (fun u : ℝ => A.curve (a*u+b)) + ((fun u : ℝ => a*u+b) ⁻¹' A.domain) ∧ + ∀ u, a*u+b ∈ A.domain → Function.Injective + (mfderiv 𝓘(ℝ) planeModel (fun v : ℝ => A.curve (a*v+b)) u) := by + have hparam : ContDiff ℝ ∞ (fun u : ℝ => a*u+b) := by fun_prop + refine ⟨A.smooth.comp hparam.contMDiff.contMDiffOn (fun _ hu => hu),?_⟩ + intro u hu + change Function.Injective (mfderiv 𝓘(ℝ) planeModel (A.curve ∘ fun v : ℝ => a*v+b) u) + rw [mfderiv_comp u ((A.smooth.contMDiffAt (A.domain_open.mem_nhds hu)).mdifferentiableAt (by simp)) + (hparam.contMDiff.mdifferentiable (by simp) u)] + exact (A.regular _ hu).comp (affine_parameter_regular ha u) + +theorem first_regular_arc (hγ : FiniteRegularPath planeModel γ) (hi : Function.Injective γ) + {η : ℝ} (hη : 0 < η) (hη1 : η ≤ 1) : + ∃ (P : SmoothCompactArc planeModel M) (r : ℝ), + 0 < r ∧ r < η ∧ P.start = 0 ∧ P.finish = r ∧ + (∀ u ∈ Icc 0 r, P.curve u = γ.extend u) ∧ P.curve P.start = p ∧ + P.curve =ᶠ[𝓝 P.finish] γ.extend := by + obtain ⟨A,a,b,r₀,hr₀,ha,hpiece⟩ := hγ.cover.some.first_regular_piece hi + let r := min (r₀/2) (η/2) + have hr : 0 < r := lt_min (half_pos hr₀) (half_pos hη) + have hrr₀ : r < r₀ := (min_le_left _ _).trans_lt (half_lt_self hr₀) + have hrη : r < η := (min_le_right _ _).trans_lt (half_lt_self hη) + let U := (fun u : ℝ => a*u+b) ⁻¹' A.domain + have hU : IsOpen U := A.domain_open.preimage (by fun_prop) + have hmatch : ∀ u ∈ Icc 0 r, A.curve (a*u+b) = γ.extend u := + fun u hu => (hpiece u ⟨hu.1,hu.2.trans hrr₀.le⟩).2.symm + have hsub : Icc 0 r ⊆ U := fun u hu => (hpiece u ⟨hu.1,hu.2.trans hrr₀.le⟩).1 + have hd := affine_arc_smooth_regular A (b := b) ha + have hinj : InjOn (fun u : ℝ => A.curve (a*u+b)) (Icc 0 r) := by + intro u hu v hv he + apply embeddedPath_extend_injOn γ hi ⟨hu.1,hu.2.trans (hrη.le.trans hη1)⟩ + ⟨hv.1,hv.2.trans (hrη.le.trans hη1)⟩ + rwa [← hmatch u hu,← hmatch v hv] + let P : SmoothCompactArc planeModel M := + ⟨fun u => A.curve (a*u+b),0,r,hr,U,hU,hsub,hd.1,fun u hu => hd.2 u hu,hinj⟩ + refine ⟨P,r,hr,hrη,rfl,rfl,hmatch,?_,?_⟩ + · change A.curve (a*0+b) = p + rw [hmatch 0 ⟨le_rfl,hr.le⟩] + exact γ.extend_zero + · filter_upwards [Ioo_mem_nhds hr hrr₀] with u hu + exact (hpiece u ⟨hu.1.le,hu.2.le⟩).2.symm + +theorem last_regular_arc (hγ : FiniteRegularPath planeModel γ) (hi : Function.Injective γ) + {η : ℝ} (hη : 0 < η) (hη1 : η ≤ 1) : + ∃ (P : SmoothCompactArc planeModel M) (l : ℝ), + 1-η < l ∧ l < 1 ∧ P.start = l ∧ P.finish = 1 ∧ + (∀ u ∈ Icc l 1, P.curve u = γ.extend u) ∧ P.curve P.finish = q ∧ + P.curve =ᶠ[𝓝 P.start] γ.extend := by + obtain ⟨A,a,b,l₀,hl₀,ha,hpiece⟩ := hγ.cover.some.last_regular_piece hi + let d := min ((1-l₀)/2) (η/2) + let l := 1-d + have hdpos : 0 < d := lt_min (half_pos (sub_pos.mpr hl₀)) (half_pos hη) + have hdl : d < 1-l₀ := (min_le_left _ _).trans_lt (half_lt_self (sub_pos.mpr hl₀)) + have hdη : d < η := (min_le_right _ _).trans_lt (half_lt_self hη) + have hll₀ : l₀ < l := by dsimp only [l]; linarith + have hl1 : l < 1 := by dsimp only [l]; linarith + have hηl : 1-η < l := by dsimp only [l]; linarith + have hl0 : 0 < l := lt_of_le_of_lt (sub_nonneg.mpr hη1) hηl + let U := (fun u : ℝ => a*u+b) ⁻¹' A.domain + have hU : IsOpen U := A.domain_open.preimage (by fun_prop) + have hmatch : ∀ u ∈ Icc l 1, A.curve (a*u+b) = γ.extend u := + fun u hu => (hpiece u ⟨hll₀.le.trans hu.1,hu.2⟩).2.symm + have hsub : Icc l 1 ⊆ U := fun u hu => (hpiece u ⟨hll₀.le.trans hu.1,hu.2⟩).1 + have hdata := affine_arc_smooth_regular A (b := b) ha + have hinj : InjOn (fun u : ℝ => A.curve (a*u+b)) (Icc l 1) := by + intro u hu v hv he + apply embeddedPath_extend_injOn γ hi ⟨hl0.le.trans hu.1,hu.2⟩ ⟨hl0.le.trans hv.1,hv.2⟩ + rwa [← hmatch u hu,← hmatch v hv] + let P : SmoothCompactArc planeModel M := + ⟨fun u => A.curve (a*u+b),l,1,hl1,U,hU,hsub,hdata.1,fun u hu => hdata.2 u hu,hinj⟩ + refine ⟨P,l,hηl,hl1,rfl,rfl,hmatch,?_,?_⟩ + · change A.curve (a*1+b) = q + rw [hmatch 1 ⟨hl1.le,le_rfl⟩] + exact γ.extend_one + · filter_upwards [Ioo_mem_nhds hll₀ hl1] with u hu + exact (hpiece u ⟨hu.1.le,hu.2.le⟩).2.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointSignModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointSignModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6c73c630ff6d795a777d0468ac469ebe93f449e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EndpointSignModel.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseJetConvexity + +namespace OAI + +/-! The simplest affine coefficient with the two prescribed endpoint signs. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +def nonzeroSign (r : ℝ) : ℝ := if 0 < r then 1 else -1 + +def endpointSignModel (p q a b t : ℝ) : ℝ := + ((q-t)/(q-p))*nonzeroSign a+((t-p)/(q-p))*nonzeroSign b + +lemma nonzeroSign_mul_pos {r : ℝ} (hr : r ≠ 0) : 0 < r*nonzeroSign r := by + by_cases hp : 0 < r + · simp [nonzeroSign,hp] + · have hn : r < 0 := lt_of_le_of_ne (le_of_not_gt hp) hr + simp [nonzeroSign,hp,hn] + +lemma endpointSignModel_left {p q a b : ℝ} (hpq : p ≠ q) : + endpointSignModel p q a b p = nonzeroSign a := by + simp [endpointSignModel,sub_ne_zero.mpr hpq.symm] + +lemma endpointSignModel_right {p q a b : ℝ} (hpq : p ≠ q) : + endpointSignModel p q a b q = nonzeroSign b := by + simp [endpointSignModel,sub_ne_zero.mpr hpq.symm] + +lemma endpointSignModel_smooth (p q a b : ℝ) : + ContDiff ℝ ∞ (endpointSignModel p q a b) := by + unfold endpointSignModel + fun_prop + +lemma endpointSignModel_left_mul_pos {p q a b : ℝ} (hpq : p ≠ q) (ha : a ≠ 0) : + 0 < a*endpointSignModel p q a b p := by + rw [endpointSignModel_left hpq] + exact nonzeroSign_mul_pos ha + +lemma endpointSignModel_right_mul_pos {p q a b : ℝ} (hpq : p ≠ q) (hb : b ≠ 0) : + 0 < b*endpointSignModel p q a b q := by + rw [endpointSignModel_right hpq] + exact nonzeroSign_mul_pos hb + +lemma endpointSignModel_same {p q a b : ℝ} (hpq : p ≠ q) + (hsame : nonzeroSign a = nonzeroSign b) (t : ℝ) : + endpointSignModel p q a b t = nonzeroSign a := by + unfold endpointSignModel + rw [←hsame] + field_simp [sub_ne_zero.mpr hpq.symm] + ring + +lemma endpointSignModel_opposite {p q a b : ℝ} (hpq : p ≠ q) + (hopp : nonzeroSign b = -nonzeroSign a) (t : ℝ) : + endpointSignModel p q a b t = ((p+q-2*t)/(q-p))*nonzeroSign a := by + unfold endpointSignModel + rw [hopp] + field_simp [sub_ne_zero.mpr hpq.symm] + ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/EqualIndexFrameFilling.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EqualIndexFrameFilling.lean new file mode 100644 index 0000000000000000000000000000000000000000..5004e1c4955c00113b85cbf11aede02b0709066e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EqualIndexFrameFilling.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizeFrameColumn +import OAI.Geometry.SurfaceImmersion.Whitney.ShiftedRotationFilling + +namespace OAI + +/-! The equal-index polynomial pair has a genuine compact relative frame filling. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def equalIndexFrame (x : Base) : Base →L[ℝ] FrameTarget := + axisNormalFrame 1 ((x 0)^2-(x 1)^2-1) (2*x 0*x 1) + +theorem compact_equal_index_frame_filling_radius {R : ℝ} (hR : 1 < R) : + ∃ (B : Base → Base →L[ℝ] FrameTarget) (K : Set Base), + ContDiff ℝ ∞ B ∧ (∀ x, Function.Injective (B x)) ∧ IsCompact K ∧ + K ⊆ ball (0:Base) R ∧ ∀ x ∉ K, B =ᶠ[𝓝 x] equalIndexFrame := by + obtain ⟨A,K,hA,hAI,hK,hKB,hAe⟩ := compact_shifted_double_filling_radius hR + refine ⟨fun x => normalizeFrameColumn (A x),K,normalizeFrameColumn_smooth hA hAI, + fun x => normalizeFrameColumn_injective (hAI x),hK,hKB,?_⟩ + intro x hx + filter_upwards [hAe x hx] with y hy + have he : shiftedDoubleFrame y = + axisNormalFrame ((y 0)^2+(y 1)^2) ((y 0)^2-(y 1)^2-1) (2*y 0*y 1) := + shiftedRotationFrame_zero_c _ _ _ + have hr : 0 < (y 0)^2+(y 1)^2 := by + have hp := firstColumnLength_pos (hAI y) + rwa [hy,he,firstColumnLength_axisNormalFrame _ _ _ (by positivity)] at hp + change normalizeFrameColumn (A y) = _ + rw [hy,he,normalizeFrameColumn_axisNormalFrame _ _ _ hr] + rfl + +theorem compact_equal_index_frame_filling : + ∃ (B : Base → Base →L[ℝ] FrameTarget) (K : Set Base), + ContDiff ℝ ∞ B ∧ (∀ x, Function.Injective (B x)) ∧ IsCompact K ∧ + K ⊆ ball (0:Base) 3 ∧ ∀ x ∉ K, B =ᶠ[𝓝 x] equalIndexFrame := + compact_equal_index_frame_filling_radius (by norm_num) + +lemma equalIndexFrame_singular_iff (x : Base) : + ¬ Function.Injective (equalIndexFrame x) ↔ x = ![1,0] ∨ x = ![-1,0] := by + have hi : Function.Injective (equalIndexFrame x) ↔ + (x 0)^2-(x 1)^2-1 ≠ 0 ∨ 2*x 0*x 1 ≠ 0 := by + constructor + · intro hi + by_contra hn + push Not at hn + have he : equalIndexFrame x (![0,1] : Base) = equalIndexFrame x 0 := by + simp [equalIndexFrame,axisNormalFrame,hn.1,hn.2] + have hh := congrFun (hi he) 1 + norm_num at hh + · exact fun h => axisNormalFrame_injective (by norm_num) h + rw [hi] + constructor + · intro hn + push Not at hn + have hab : x 0*x 1 = 0 := by nlinarith [hn.2] + have h1 : x 1 = 0 := by + rcases mul_eq_zero.mp hab with h0 | h1 + · nlinarith [hn.1,sq_nonneg (x 1)] + · exact h1 + have h0 : x 0 = 1 ∨ x 0 = -1 := by + have hs : (x 0-1)*(x 0+1) = 0 := by nlinarith [hn.1,h1] + rcases mul_eq_zero.mp hs with h | h + · exact Or.inl (by linarith) + · exact Or.inr (by linarith) + rcases h0 with h0 | h0 + · left + ext i + fin_cases i + · exact h0 + · exact h1 + · right + ext i + fin_cases i + · exact h0 + · exact h1 + · rintro (rfl | rfl) <;> norm_num + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/EuclideanImmersionReduction.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EuclideanImmersionReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b4c5269bfd7f87f3e1b641809e7c7dfe00d1861 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/EuclideanImmersionReduction.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LinearProjectionImmersion + +namespace OAI + +/-! Dimension reduction of the ordinary Whitney embedding to a smooth +immersion of a compact surface in four-dimensional Euclidean space. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +def euclideanPad (n m : ℕ) : ProjectionTarget n →L[ℝ] ProjectionTarget m := + (EuclideanSpace.equiv (Fin m) ℝ).symm.toContinuousLinearMap.comp + (ContinuousLinearMap.pi fun i : Fin m => + if hi : i.val < n then + (ContinuousLinearMap.proj (⟨i.val,hi⟩ : Fin n)).comp + (EuclideanSpace.equiv (Fin n) ℝ).toContinuousLinearMap + else 0) + +lemma euclideanPad_injective {n m : ℕ} (hn : n ≤ m) : + Function.Injective (euclideanPad n m) := by + intro v w he + ext i + have h := congrArg (fun z : ProjectionTarget m => z ⟨i.val,lt_of_lt_of_le i.isLt hn⟩) he + simpa [euclideanPad,i.isLt] using h + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] + +lemma smooth_immersion_postcompose (L : V →L[ℝ] W) (hL : Function.Injective L) + {F : M → V} (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) F p)) : + ContMDiff planeModel 𝓘(ℝ,W) ∞ (L ∘ F) ∧ + ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,W) (L ∘ F) p) := by + have hLc : ContMDiff 𝓘(ℝ,V) 𝓘(ℝ,W) ∞ L := L.contDiff.contMDiff + refine ⟨hLc.comp hF,?_⟩ + intro p + rw [mfderiv_comp p (hLc.mdifferentiable (by simp)).mdifferentiableAt + (hF.mdifferentiable (by simp)).mdifferentiableAt,mfderiv_eq_fderiv,L.fderiv] + exact hL.comp (hI p) + +variable [IsManifold planeModel ∞ M] [CompactSpace M] + +theorem SmoothingAtlas.reduce_immersion_dimension (A : SmoothingAtlas M) (n : ℕ) : + (∃ F : M → ProjectionTarget n, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget n) ∞ F ∧ + ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget n) F p)) → + ∃ G : M → ProjectionTarget 4, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 4) ∞ G ∧ + ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 4) G p) := by + induction n using Nat.strong_induction_on with + | h n ih => + rintro ⟨F,hF,hI⟩ + by_cases hn : n ≤ 4 + · exact ⟨euclideanPad n 4 ∘ F, + smooth_immersion_postcompose (euclideanPad n 4) (euclideanPad_injective hn) hF hI⟩ + · have hn0 : n ≠ 0 := by omega + obtain ⟨k,rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn0 + let e : ProjectionTarget (k+1) ≃L[ℝ] ProjectionTarget k × ℝ := + ContinuousLinearEquiv.ofFinrankEq (by simp) + obtain ⟨he,heI⟩ := smooth_immersion_postcompose e.toContinuousLinearMap e.injective hF hI + obtain ⟨a,hg,hgI⟩ := A.exists_projected_immersion (show 4 ≤ k by omega) he heI + exact ih k (Nat.lt_succ_self k) ⟨graphProjection a ∘ (e ∘ F),hg,hgI⟩ + +variable [T2Space M] + +/-- The ordinary four-dimensional immersion is proved without the +three-dimensional Whitney input used in the conditional isometric theorem. -/ +theorem exists_smooth_euclidean_four_immersion : + ∃ F : M → ProjectionTarget 4, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 4) ∞ F ∧ + ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 4) F p) := by + obtain ⟨A⟩ := exists_smoothingAtlas (M := M) + obtain ⟨n,F,hF,_hclosed,hI⟩ := exists_embedding_euclidean_of_compact (I := planeModel) (M := M) + exact A.reduce_immersion_dimension n ⟨F,hF,hI⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarInterpolation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..c388d8271c4dac2e801838c883a26e48f7ceed5d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarInterpolation.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.HomotopyCollarDerivative +import OAI.Geometry.SurfaceImmersion.Whitney.TransverseRuledSurface + +namespace OAI + +/-! Exact interpolation of two surface germs with the same boundary +curve; their flat remainders are retained rather than discarded. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +def collarRemainder (f : Base → W) : Base → W := f - transverseRuling f + +def exactCollarInterpolation (f g : Base → W) (V : ℝ × ℝ → W) + (χ : ℝ → ℝ) (x : Base) : W := + homotopyCollar (fun t => f (crosscapAxis t)) V χ x + collarRemainder f x + + χ (x 0) • (collarRemainder g x - collarRemainder f x) + +lemma collarRemainder_smooth {f : Base → W} (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (collarRemainder f) := hf.sub (transverseRuling_smooth hf) + +lemma collarRemainder_axis (f : Base → W) (t : ℝ) : + collarRemainder f (crosscapAxis t) = 0 := by + simp [collarRemainder,transverseRuling_axis] + +lemma collarRemainder_first_jet {f : Base → W} (hf : ContDiff ℝ ∞ f) (t : ℝ) : + fderiv ℝ (collarRemainder f) (crosscapAxis t) = 0 := by + rw [show collarRemainder f = f - transverseRuling f from rfl, + fderiv_sub (hf.differentiable (by simp) _) + ((transverseRuling_smooth hf).differentiable (by simp) _), + transverseRuling_first_jet hf,sub_self] + +lemma exactCollarInterpolation_smooth {f g : Base → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (hV : ContDiff ℝ ∞ V) (hχ : ContDiff ℝ ∞ χ) : + ContDiff ℝ ∞ (exactCollarInterpolation f g V χ) := + ((homotopyCollar_smooth (hf.comp crosscapAxis.contDiff) hV hχ).add + (collarRemainder_smooth hf)).add + ((hχ.comp (contDiff_apply ℝ ℝ 0)).smul + ((collarRemainder_smooth hg).sub (collarRemainder_smooth hf))) + +lemma exactCollarInterpolation_zero {f g : Base → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + (hV : ∀ t, V (0,t) = fderiv ℝ f (crosscapAxis t) ![1,0]) + {x : Base} (hx : χ (x 0) = 0) : exactCollarInterpolation f g V χ x = f x := by + simp only [exactCollarInterpolation,homotopyCollar,hx,hV,zero_smul,add_zero, + collarRemainder,Pi.sub_apply,transverseRuling,axisValue,axisTransverse] + abel + +lemma exactCollarInterpolation_one {f g : Base → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + (hc : ∀ t, f (crosscapAxis t) = g (crosscapAxis t)) + (hV : ∀ t, V (1,t) = fderiv ℝ g (crosscapAxis t) ![1,0]) + {x : Base} (hx : χ (x 0) = 1) : exactCollarInterpolation f g V χ x = g x := by + simp only [exactCollarInterpolation,homotopyCollar,hx,hV,one_smul,hc, + collarRemainder,Pi.sub_apply,transverseRuling,axisValue,axisTransverse] + abel + +lemma exactCollarInterpolation_stationary {f g : Base → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + {x : Base} (hx : g x = f x) + (hc : g (crosscapAxis (x 1)) = f (crosscapAxis (x 1))) + (ht : axisTransverse g (x 1) = axisTransverse f (x 1)) + (hV : V (χ (x 0),x 1) = axisTransverse f (x 1)) : + exactCollarInterpolation f g V χ x = f x := by + simp only [exactCollarInterpolation, homotopyCollar, hV, collarRemainder, + Pi.sub_apply, transverseRuling, ht, axisValue, hc, hx] + module + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarRemainderBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarRemainderBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..184303b439cd83f415cc3ec52de14d66a67b10e9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactCollarRemainderBounds.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ExactCollarInterpolation +import OAI.Geometry.SurfaceImmersion.Geometry.SlowFlatRemainder + +namespace OAI + +/-! Uniform first-derivative control for the retained collar remainders. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +def collarInterpolationRemainder (f g : Base → W) (χ : ℝ → ℝ) (x : Base) : W := + collarRemainder f x + χ (x 0) • (collarRemainder g x - collarRemainder f x) + +lemma collarInterpolationRemainder_smooth {f g : Base → W} {χ : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (hχ : ContDiff ℝ ∞ χ) : + ContDiff ℝ ∞ (collarInterpolationRemainder f g χ) := + (collarRemainder_smooth hf).add ((hχ.comp (contDiff_apply ℝ ℝ 0)).smul + ((collarRemainder_smooth hg).sub (collarRemainder_smooth hf))) + +theorem collarInterpolationRemainder_bound {f g : Base → W} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (ρ : ℝ) : + ∃ D : ℝ, 0 < D ∧ ∀ χ : ℝ → ℝ, ContDiff ℝ ∞ χ → + (∀ t, |χ t| ≤ 1) → (∀ t, |t*deriv χ t| ≤ 1) → + ∀ x ∈ closedBall (0 : Base) ρ, + ‖fderiv ℝ (collarInterpolationRemainder f g χ) x‖ ≤ D*|x 0| := by + let R := collarRemainder f + let S := collarRemainder g - collarRemainder f + have hR : ContDiff ℝ ∞ R := collarRemainder_smooth hf + have hS : ContDiff ℝ ∞ S := (collarRemainder_smooth hg).sub hR + have hS0 : ∀ t, S (crosscapAxis t) = 0 := by + intro t + simp only [S,Pi.sub_apply,collarRemainder_axis,sub_zero] + have hSD : ∀ t, fderiv ℝ S (crosscapAxis t) = 0 := by + intro t + rw [show S = collarRemainder g - collarRemainder f from rfl, + fderiv_sub ((collarRemainder_smooth hg).differentiable (by simp) _) + (hR.differentiable (by simp) _),collarRemainder_first_jet hg, + collarRemainder_first_jet hf,sub_zero] + obtain ⟨C,hC⟩ := (isCompact_closedBall (0 : Base) ρ).exists_bound_of_continuousOn + ((hR.fderiv_right (m := ∞) (by simp)).continuous_fderiv (by simp)).continuousOn + obtain ⟨B,hB⟩ := (isCompact_closedBall (0 : Base) ρ).exists_bound_of_continuousOn + ((hS.fderiv_right (m := ∞) (by simp)).continuous_fderiv (by simp)).continuousOn + let P := ‖(ContinuousLinearMap.proj 0 : Base →L[ℝ] ℝ)‖ + let D := |C| + (1+P)*|B| + 1 + have hP : 0 ≤ P := norm_nonneg _ + have hD : 0 < D := by dsimp [D]; positivity + refine ⟨D,hD,?_⟩ + intro χ hχ hχb hχd x hx + have hfirst : ‖fderiv ℝ R x‖ ≤ |C| * |x 0| := + axis_flat_first_bound hR (collarRemainder_first_jet hf) + (fun y hy => (hC y hy).trans (le_abs_self C)) hx + have hsecond := slow_flat_remainder_bound hS hχ hS0 hSD (abs_nonneg B) + (fun y hy => (hB y hy).trans (le_abs_self B)) hχb hχd hx + have hd := fderiv_add (hR.differentiable (by simp) x) + (((hχ.comp (contDiff_apply ℝ ℝ 0)).smul hS).differentiable (by simp) x) + change fderiv ℝ (collarInterpolationRemainder f g χ) x = _ at hd + rw [hd] + calc + _ ≤ ‖fderiv ℝ R x‖ + ‖fderiv ℝ (fun y => χ (y 0) • S y) x‖ := norm_add_le _ _ + _ ≤ |C| * |x 0| + (1+P)*|B| * |x 0| := add_le_add hfirst hsecond + _ ≤ D*|x 0| := by dsimp [D]; nlinarith [abs_nonneg (x 0)] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactRegularCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactRegularCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5d108d586e7b278000cadb46111c55292b40c10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/ExactRegularCollar.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ExactCollarRemainderBounds +import OAI.Geometry.SurfaceImmersion.Whitney.PerturbedCollarJets + +namespace OAI + +/-! A regular collar interpolating the actual inner and outer surface +maps, with exact agreement on open neighborhoods of both sides. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +theorem exact_regular_collar {f g : Base → W} {V : ℝ × ℝ → W} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (hV : ContDiff ℝ ∞ V) + (hc : ∀ t, f (crosscapAxis t) = g (crosscapAxis t)) + (hV0 : ∀ t, V (0,t) = axisTransverse f t) + (hV1 : ∀ t, V (1,t) = axisTransverse g t) + {a b R : ℝ} (hR : 0 < R) + (hI : ∀ s ∈ Icc (0:ℝ) 1, ∀ t ∈ Icc a b, + Function.Injective (homotopyCollarJet (axisValue f) V s t 0 0)) : + ∃ (r : ℝ) (F : Base → W), 0 < r ∧ r < R ∧ ContDiff ℝ ∞ F ∧ + (∀ u : ℝ, |u| < r → ∀ t ∈ Icc a b, + Function.Injective (fderiv ℝ F ![u,t])) ∧ + (∀ t, F =ᶠ[𝓝 (crosscapAxis t)] g) ∧ + (∀ x : Base, g x = f x → + (∀ s ∈ Icc (0:ℝ) 1, V (s,x 1) = axisTransverse f (x 1)) → F x = f x) ∧ + ∀ x : Base, r/2 < |x 0| → F =ᶠ[𝓝 x] f := by + obtain ⟨δ,hδ,hstable⟩ := perturbed_collar_jets (axisValue_smooth hf) hV + (isCompact_Icc.prod isCompact_Icc) + (by rintro ⟨s,t⟩ ⟨hs,ht⟩; exact hI s hs t ht) + let ρ := |a|+|b|+2 + obtain ⟨D,hD,hbound⟩ := collarInterpolationRemainder_bound hf hg ρ + let r := min R (min 1 (min δ (δ/(D+1)))) / 2 + have hr : 0 < r := half_pos (lt_min hR (lt_min zero_lt_one + (lt_min hδ (div_pos hδ (by positivity))))) + have hrR : r < R := (half_lt_self (lt_min hR (lt_min zero_lt_one + (lt_min hδ (div_pos hδ (by positivity)))))).trans_le (min_le_left _ _) + have hr1 : r < 1 := (half_lt_self (lt_min hR (lt_min zero_lt_one + (lt_min hδ (div_pos hδ (by positivity)))))).trans_le + ((min_le_right _ _).trans (min_le_left _ _)) + have hrδ : r < δ := (half_lt_self (lt_min hR (lt_min zero_lt_one + (lt_min hδ (div_pos hδ (by positivity)))))).trans_le + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have hrdiv : r < δ/(D+1) := (half_lt_self (lt_min hR (lt_min zero_lt_one + (lt_min hδ (div_pos hδ (by positivity)))))).trans_le + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + have hDr : D*r < δ := by + have ht := (lt_div_iff₀ (by positivity : 0 < D+1)).mp hrdiv + nlinarith + obtain ⟨χ,hχ,_hcomp,hχg,hχs,hχrange,hχsmall⟩ := + exists_slow_collar_cutoff (half_pos hr) (lt_min hδ zero_lt_one) + have hχb : ∀ t, |χ t| ≤ 1 := fun t => by + rw [abs_of_nonneg (hχrange t).1] + exact (hχrange t).2 + have hχd : ∀ t, |t*deriv χ t| ≤ 1 := fun t => + (hχsmall t).le.trans (min_le_right _ _) + let F := exactCollarInterpolation f g V χ + refine ⟨r,F,hr,hrR,exactCollarInterpolation_smooth hf hg hV hχ,?_,?_,?_,?_⟩ + · intro u hu t ht + have hx : (![u,t] : Base) ∈ closedBall 0 ρ := by + rw [mem_closedBall,dist_zero_right] + apply (pi_norm_le_iff_of_nonneg (by dsimp [ρ]; positivity)).mpr + intro i + fin_cases i + · change |u| ≤ ρ + have hρ : 1 ≤ ρ := by dsimp [ρ]; linarith [abs_nonneg a, abs_nonneg b] + exact (hu.trans hr1).le.trans hρ + · change |t| ≤ ρ + apply abs_le.mpr + constructor + · have ha := neg_abs_le a + dsimp [ρ] + linarith [abs_nonneg b, ht.1] + · have hb := le_abs_self b + dsimp [ρ] + linarith [abs_nonneg a, ht.2] + have hE : ‖fderiv ℝ (collarInterpolationRemainder f g χ) ![u,t]‖ < δ := by + have hb := hbound χ hχ hχb hχd ![u,t] hx + change ‖fderiv ℝ (collarInterpolationRemainder f g χ) ![u,t]‖ ≤ D*|u| at hb + exact hb.trans_lt ((mul_lt_mul_of_pos_left hu hD).trans hDr) + have hF : F = homotopyCollar (axisValue f) V χ + collarInterpolationRemainder f g χ := by + funext x + change homotopyCollar (axisValue f) V χ x + collarRemainder f x + + χ (x 0) • (collarRemainder g x - collarRemainder f x) = + homotopyCollar (axisValue f) V χ x + + (collarRemainder f x + χ (x 0) • (collarRemainder g x - collarRemainder f x)) + exact add_assoc _ _ _ + rw [hF,fderiv_add ((homotopyCollar_smooth (axisValue_smooth hf) hV hχ).differentiable (by simp) _) + ((collarInterpolationRemainder_smooth hf hg hχ).differentiable (by simp) _), + homotopyCollar_fderiv (axisValue_smooth hf) hV hχ] + exact hstable (χ u,t) ⟨hχrange u,ht⟩ u (u*deriv χ u) _ + (hu.trans hrδ) ((hχsmall u).trans_le (min_le_left _ _)) hE + · intro t + have hp : Tendsto (fun x : Base => x 0) (𝓝 (crosscapAxis t)) (𝓝 0) := by + simpa [crosscapAxis_apply] using (continuous_apply (0 : Fin 2)).continuousAt.tendsto (x := crosscapAxis t) + filter_upwards [hχg.comp_tendsto hp] with x hx + change χ (x 0) = 1 at hx + exact exactCollarInterpolation_one hc hV1 hx + · intro x hx hVx + exact exactCollarInterpolation_stationary hx (hc (x 1)).symm + ((hV1 (x 1)).symm.trans (hVx 1 ⟨zero_le_one,le_rfl⟩)) + (hVx (χ (x 0)) (hχrange _)) + · intro x hx + have hn : x 0 ∉ tsupport χ := by + intro hh + exact hx.not_ge (abs_le.mpr (hχs hh)) + have hp : Tendsto (fun y : Base => y 0) (𝓝 x) (𝓝 (x 0)) := + (continuous_apply (0 : Fin 2)).continuousAt.tendsto + filter_upwards [(notMem_tsupport_iff_eventuallyEq.mp hn).comp_tendsto hp] with y hy + change χ (y 0) = 0 at hy + exact exactCollarInterpolation_zero hV0 hy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteArcPieces.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteArcPieces.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ebdf8d774a61acad21a5d76d808d6c4b072c24c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteArcPieces.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactArcSubdivision +import OAI.Geometry.SurfaceImmersion.Geometry.CurveEdgeWitness + +namespace OAI + +/-! A finite compact arc cover yields finitely many pairwise disjoint +connected open pieces after its finite vertices are deleted. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X ι : Type*} [TopologicalSpace X] [T2Space X] [Fintype ι] + +theorem finite_arc_pieces (A : ι → CompactCurveArc X) (V : Set X) (hV : V.Finite) + (hleft : ∀ i, (A i).map ⟨(A i).left,le_rfl,(A i).ordered.le⟩ ∈ V) + (hright : ∀ i, (A i).map ⟨(A i).right,(A i).ordered.le,le_rfl⟩ ∈ V) + (hcover : (univ : Set X) ⊆ ⋃ i, range (A i).map) : + ∃ P : Finset (Set X), + (∀ E ∈ P, IsOpen E ∧ IsConnected E ∧ Disjoint E V ∧ closure E \ E ⊆ V) ∧ + (∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) ∧ + Vᶜ = ⋃ E ∈ P, E ∧ (∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) := by + classical + choose S hS hbound hlocal hp using fun i => subdivide_compact_arc (A i) V hV (hleft i) (hright i) + let L (i : ι) := ((S i) ×ˢ (S i)).filter (fun uv => ConsecutiveVertices (S i) uv.1 uv.2) + let P := Finset.univ.biUnion fun i => (L i).image (fun uv => (A i).openSubarc uv.1 uv.2) + have hmem (E : Set X) : E ∈ P ↔ ∃ i u v, + ConsecutiveVertices (S i) u v ∧ E = (A i).openSubarc u v := by + constructor + · intro he + obtain ⟨i,_,hei⟩ := Finset.mem_biUnion.mp he + obtain ⟨uv,huv,heq⟩ := Finset.mem_image.mp hei + exact ⟨i,uv.1,uv.2,(Finset.mem_filter.mp huv).2,heq.symm⟩ + · rintro ⟨i,u,v,huv,rfl⟩ + apply Finset.mem_biUnion.mpr + refine ⟨i,Finset.mem_univ _,Finset.mem_image.mpr ⟨(u,v),?_,rfl⟩⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨huv.1,huv.2.1⟩,huv⟩ + have hprop : ∀ E ∈ P, IsOpen E ∧ IsConnected E ∧ Disjoint E V ∧ closure E \ E ⊆ V := by + intro E he + obtain ⟨i,u,v,huv,rfl⟩ := (hmem E).mp he + exact hp i u v huv + refine ⟨P,hprop,?_,?_,?_⟩ + · intro E he F hf hne + have eprop := hprop E he + have fprop := hprop F hf + exact (connected_open_pieces_equal_or_disjoint eprop.1 fprop.1 + eprop.2.1.isPreconnected fprop.2.1.isPreconnected eprop.2.2.2 fprop.2.2.2 + eprop.2.2.1 fprop.2.2.1).resolve_left hne + · apply Subset.antisymm + · intro x hx + obtain ⟨i,hi⟩ := mem_iUnion.mp (hcover (mem_univ x)) + obtain ⟨u,v,huv,hxuv⟩ := hlocal i x hi hx + exact mem_iUnion₂.mpr ⟨(A i).openSubarc u v,(hmem _).mpr ⟨i,u,v,huv,rfl⟩,hxuv⟩ + · intro x hx + obtain ⟨E,hE,hxE⟩ := mem_iUnion₂.mp hx + exact fun hxV => disjoint_left.mp (hprop E hE).2.2.1 hxE hxV + + · intro E he + obtain ⟨i,u,v,huv,rfl⟩ := (hmem E).mp he + have hu := hbound i u huv.1 + have hv := hbound i v huv.2.1 + exact ⟨⟨A i,u,v,hu.1,hv.2,huv.2.2.1,rfl, + (hS i _).mp huv.1,(hS i _).mp huv.2.1⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCleanPairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCleanPairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba2019c3411065c54f5b24cab5ea4b9fa4edcdfc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCleanPairRegularization.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteChartTranslationBound +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSurfaceImmersionStability +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover +import OAI.Geometry.SurfaceImmersion.Whitney.FixedPairPointAvoidance +import OAI.Geometry.SurfaceImmersion.Whitney.CleanSurfacePairs + +namespace OAI + +/-! Finite regularization with both transversality and finite-point avoidance, +including preservation on an initially good compact set and C1 control. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_clean_relative + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + (S : Set M) (hS : S.Finite) (J : Set (M × M)) (hJ : IsCompact J) + [Fintype ν] (c : ν → M) (Q : ν → Set JetPolynomial.Base) + (hQ : ∀ j, IsCompact (Q j)) (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (s : Finset ι) (B : Set M) (hB : IsCompact B) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hJreg : J ⊆ cleanSurfacePairs f S) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + (J ⊆ cleanSurfacePairs g S) ∧ + ∀ i ∈ s, T i ⊆ cleanSurfacePairs g S := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,by intro j x hx; simpa using hε,hIf,hJreg,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hDc,hIg,hJg,hgood⟩ := ih (half_pos hε) + let K := J ∪ ⋃ j ∈ s, T j + have hK : IsCompact K := hJ.union (s.isCompact_biUnion (fun j _ => hT j)) + have hKreg : K ⊆ cleanSurfacePairs g S := by + intro z hz + rcases hz with hz | hz + · exact hJg hz + · obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact hgood j hj hzj + obtain ⟨δ,hδ,hstable⟩ := compact_clean_pair_stability hg (P i).smooth (P i).bounds hK hS hKreg + obtain ⟨η,hη,hηI⟩ := compact_surface_immersion_stability hg (P i).smooth hB hIg + obtain ⟨ζ,hζ,hζD⟩ := finite_chart_translation_bound c Q hQ hQT (P i).smooth (half_pos hε) + obtain ⟨a,ha,hnew⟩ := (P i).regularize_avoiding_points hg S S hS hS (lt_min hδ (lt_min hη (lt_min hζ (half_pos hε)))) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haη : ‖a‖ < η := ha.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have haζ : ‖a‖ < ζ := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have haε : ‖a‖ < ε/2 := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,?_,hηI a haη,?_,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j x hx + have hd := hζD hg a haζ j x hx + calc + _ ≤ ‖fderiv ℝ (G ∘ (chart (c j)).symm) x-fderiv ℝ (g ∘ (chart (c j)).symm) x‖+ + ‖fderiv ℝ (g ∘ (chart (c j)).symm) x-fderiv ℝ (f ∘ (chart (c j)).symm) x‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hd (hDc j x hx) + _ = ε := by ring + · intro z hz + exact hstable a haδ (Or.inl hz) + · intro j hj z hz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact mem_cleanSurfacePairs.mpr (hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2) + · exact hstable a haδ (Or.inr (mem_iUnion₂.mpr ⟨j,hj,hz⟩)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerBridges.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerBridges.lean new file mode 100644 index 0000000000000000000000000000000000000000..6715e70b4d2bd8079f5d5ba901ac7c97934fa93a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerBridges.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CornerBridgeEmbedding +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePointNeighborhoods + +namespace OAI + +/-! Simultaneous separated smooth bridges at finitely many path corners, +with attachment points inside prescribed parameter windows. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [Finite ι] +variable {p q : M} {γ : Path p q} + +theorem finite_corner_bridges (hγ : FiniteRegularPath planeModel γ) + (hi : Function.Injective γ) (T : ι → ℝ) (hT : Function.Injective T) + (a b : ι → ℝ) (ha : ∀ i, 0 ≤ a i) (haT : ∀ i, a i < T i) + (hTb : ∀ i, T i < b i) (hb : ∀ i, b i ≤ 1) + {O : Set M} (hO : IsOpen O) (hTO : ∀ i, γ.extend (T i) ∈ O) : + ∃ B : ∀ i, LocalCornerBridge γ (T i) O, + (∀ i, a i < (B i).left ∧ (B i).right < b i) ∧ + (∀ i, ∀ s ∈ Icc (B i).arc.start (B i).arc.finish, + ∀ u ∈ Ico (0:ℝ) (B i).left ∪ Ioc (B i).right 1, + (B i).arc.curve s ≠ γ.extend u) ∧ + Pairwise (fun i j => Disjoint + ((B i).arc.curve '' Icc (B i).arc.start (B i).arc.finish) + ((B j).arc.curve '' Icc (B j).arc.start (B j).arc.finish)) := by + classical + have hTi : ∀ i, T i ∈ Ioo (0:ℝ) 1 := fun i => + ⟨lt_of_le_of_lt (ha i) (haT i),lt_of_lt_of_le (hTb i) (hb i)⟩ + choose U hU hTU hUO hUavoid using fun i => + embedded_path_corner_neighborhood γ hi (ha i) (haT i) (hTb i) (hb i) hO (hTO i) + have hp : Function.Injective (fun i => γ.extend (T i)) := by + intro i j hij + exact hT (embeddedPath_extend_injOn γ hi ⟨(hTi i).1.le,(hTi i).2.le⟩ + ⟨(hTi j).1.le,(hTi j).2.le⟩ hij) + obtain ⟨V,hV,hVdis⟩ := finite_disjoint_open_neighborhoods (fun i => γ.extend (T i)) hp U hU hTU + choose B hBsep using fun i => separated_corner_bridge hγ hi (hTi i) (hV i).1 (hV i).2.1 + let B' : ∀ i, LocalCornerBridge γ (T i) O := fun i => (B i).mono ((hV i).2.2.trans (hUO i)) + have hbounds : ∀ i, a i < (B i).left ∧ (B i).right < b i := by + intro i + constructor + · apply lt_of_not_ge + intro hle + apply hUavoid i (B i).left (Or.inl ⟨(B i).left_pos.le,hle⟩) + have hm := (hV i).2.2 ((B i).image_subset + (left_mem_Icc.mpr (B i).arc.start_lt_finish.le)) + have he := (B i).source_eq + rw [he] at hm + have he' : γ.extend (B i).left = γ (B i).leftPoint := Path.extend_extends' γ (B i).leftPoint + rwa [he'] + · apply lt_of_not_ge + intro hle + apply hUavoid i (B i).right (Or.inr ⟨hle,(B i).right_lt_one.le⟩) + have hm := (hV i).2.2 ((B i).image_subset + (right_mem_Icc.mpr (B i).arc.start_lt_finish.le)) + have he := (B i).target_eq + rw [he] at hm + have he' : γ.extend (B i).right = γ (B i).rightPoint := Path.extend_extends' γ (B i).rightPoint + rwa [he'] + refine ⟨B',hbounds,hBsep,?_⟩ + intro i j hij + apply disjoint_left.mpr + rintro x ⟨s,hs,hxs⟩ ⟨u,hu,hxu⟩ + have hxVi : x ∈ V i := by + rw [← hxs] + exact (B i).image_subset hs + have hxVj : x ∈ V j := by + rw [← hxu] + exact (B j).image_subset hu + exact disjoint_left.mp (hVdis hij) hxVi hxVj + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerWindows.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9fdfa338c5bfc38c0412e83197cac6bfc625ee0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCornerWindows.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePointNeighborhoods +import Mathlib.Topology.Instances.Real.Lemmas + +namespace OAI + +/-! Finite distinct interior parameters have disjoint compact interval +windows, in their original order. -/ +noncomputable section +open Set Filter +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {ι : Type*} [Finite ι] + +theorem finite_corner_windows (T : ι → ℝ) (hi : Function.Injective T) + (hT : ∀ i, T i ∈ Ioo (0:ℝ) 1) : + ∃ a b : ι → ℝ, (∀ i, 0 < a i ∧ a i < T i ∧ T i < b i ∧ b i < 1) ∧ + Pairwise (fun i j => Disjoint (Icc (a i) (b i)) (Icc (a j) (b j))) ∧ + ∀ i j, T i < T j → b i < a j := by + obtain ⟨U,hU,hdis⟩ := finite_disjoint_open_neighborhoods T hi + (fun _ => Ioo (0:ℝ) 1) (fun _ => isOpen_Ioo) hT + have hchoice : ∀ i, ∃ a b : ℝ, 0 < a ∧ a < T i ∧ T i < b ∧ b < 1 ∧ Icc a b ⊆ U i := by + intro i + obtain ⟨l,r,⟨hlt,htr⟩,hsub⟩ := mem_nhds_iff_exists_Ioo_subset.mp ((hU i).1.mem_nhds (hU i).2.1) + obtain ⟨a,hla,hat⟩ := exists_between hlt + obtain ⟨b,htb,hbr⟩ := exists_between htr + have hs : Icc a b ⊆ U i := fun _ hx => hsub ⟨hla.trans_le hx.1,hx.2.trans_lt hbr⟩ + have hab : a ≤ b := (hat.trans htb).le + exact ⟨a,b,((hU i).2.2 (hs (left_mem_Icc.mpr hab))).1,hat,htb, + ((hU i).2.2 (hs (right_mem_Icc.mpr hab))).2,hs⟩ + choose a b ha haT hTb hb hsub using hchoice + have hd : Pairwise (fun i j => Disjoint (Icc (a i) (b i)) (Icc (a j) (b j))) := + fun i j hij => (hdis hij).mono (hsub i) (hsub j) + refine ⟨a,b,fun i => ⟨ha i,haT i,hTb i,hb i⟩,hd,?_⟩ + intro i j hij + have hne : i ≠ j := fun he => (ne_of_lt hij) (congrArg T he) + by_contra hn + have hji : a j ≤ b i := le_of_not_gt hn + by_cases haij : a i ≤ a j + · exact disjoint_left.mp (hd hne) ⟨haij,hji⟩ ⟨le_rfl,(haT j).le.trans (hTb j).le⟩ + · have haj : a j ≤ a i := (lt_of_not_ge haij).le + have hai : a i ≤ b i := (haT i).le.trans (hTb i).le + have hbaj : a i ≤ b j := ((haT i).trans hij |>.trans (hTb j)).le + exact disjoint_left.mp (hd hne) ⟨le_rfl,hai⟩ ⟨haj,hbaj⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b706660942d513a60b688a55c04bb616858b74f7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCancellation.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteCrosscapCleanup +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapGeometricCancellation + +namespace OAI + +/-! Reprepare the double points between genuine cancellations. The singular +set strictly decreases, while all remaining quadratic germs are retained. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem cancel_finite_quadratic_pair {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hrep : QuadraticCrosscapGerms f) (p : M) + (hp : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)} ⊂ + {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)} ∧ + QuadraticCrosscapGerms g := by + classical + obtain ⟨F,hF,hI,hreg,hsimple,hrepF⟩ := clean_finite_quadratic_map hf hfin hrep + have hfinF : {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F x)}.Finite := + hfin.subset (fun x hx => (hI x).not.mp hx) + have hpF := (hI p).not.mpr hp + obtain ⟨q,_hqp,_hqF,⟨A⟩⟩ := exists_crosscap_connecting_arc hF hfinF hreg hsimple hrepF p hpF + obtain ⟨g,hg,hIg,hgerm⟩ := cancel_crosscap_pair hF A + have hsub : {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)} ⊆ + {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)} := by + intro x hx + apply (hI x).not.mp + intro hFx + exact hx ((hIg x).mpr (Or.inr (Or.inr hFx))) + have hpG : Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g p) := + (hIg p).mpr (Or.inl rfl) + refine ⟨g,hg,Set.ssubset_iff_subset_ne.mpr ⟨hsub,?_⟩,?_⟩ + · intro he + have hpin : p ∈ {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)} := by + rw [he] + exact hp + exact hpin hpG + · intro x hx + have hFx : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F x) := by + intro hi + exact hx ((hIg x).mpr (Or.inr (Or.inr hi))) + have hxp : x ≠ p := fun he => hx ((hIg x).mpr (Or.inl he)) + have hxq : x ≠ q := fun he => hx ((hIg x).mpr (Or.inr (Or.inl he))) + obtain ⟨c,φ,b,t,hxc,hφ,he,hz,hR⟩ := hrepF x hFx + exact ⟨c,φ,b,t,hxc,hφ,(hgerm x hFx hxp hxq).trans he,hz,hR⟩ + +theorem remove_finite_quadratic_crosscaps {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hrep : QuadraticCrosscapGerms f) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) := by + classical + have h : ∀ n : ℕ, ∀ f : M → ProjectionTarget 3, + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f → + {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite → + QuadraticCrosscapGerms f → + {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.ncard = n → + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) := by + intro n + induction n using Nat.strong_induction_on with + | h n ih => + intro f hf hfin hrep hn + by_cases he : {x | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)} = ∅ + · refine ⟨f,hf,?_⟩ + intro x + by_contra hx + have : x ∈ (∅ : Set M) := by + rw [←he] + exact hx + exact this.elim + · obtain ⟨p,hp⟩ := Set.nonempty_iff_ne_empty.mpr he + obtain ⟨g,hg,hsub,hrepG⟩ := cancel_finite_quadratic_pair hf hfin hrep p hp + have hfinG := hfin.subset hsub.subset + have hlt := Set.ncard_lt_ncard hsub hfin + rw [hn] at hlt + exact ih _ hlt g hg hfinG hrepG rfl + exact h _ f hf hfin hrep rfl + +/-- Whitney's compact surface immersion, with smoothness retained. -/ +theorem smooth_three_space_immersion : + ∃ f : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f ∧ + ∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) := by + obtain ⟨f,hf,hfin,hrep⟩ := exists_finite_quadratic_crosscap_map (M := M) + exact remove_finite_quadratic_crosscaps hf hfin hrep + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCleanup.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCleanup.lean new file mode 100644 index 0000000000000000000000000000000000000000..7250309b071f9e76c14c7f586bc5beb9cdf1e2c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCrosscapCleanup.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RelativeGlobalCleanPairs +import OAI.Geometry.SurfaceImmersion.Whitney.CleanCrosscapNeighborhoods +import OAI.Geometry.SurfaceImmersion.Geometry.TaylorTargetTranslation + +namespace OAI + +/-! A prepared finite-crosscap map with global self-transversality and no +additional preimage of any singular point image, preserving every quadratic germ. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +def QuadraticCrosscapGerms (f : M → ProjectionTarget 3) : Prop := + ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + f =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t)) + +theorem clean_finite_quadratic_map {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) + (hrep : QuadraticCrosscapGerms f) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + (∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g p) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)) ∧ + (∀ x y, x ≠ y → g x = g y → Function.Surjective (surfacePairDerivative g x y)) ∧ + (∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g p) → + ∀ q, g q = g p → q = p) ∧ QuadraticCrosscapGerms g := by + classical + let S := {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)} + let : Fintype S := hfin.fintype + obtain ⟨A,hA,hdis,hAreg⟩ := prepared_clean_crosscap_neighborhoods hfin hrep + let U : S → Set M := fun i => interior (A i) + have hIf : ∀ x, x ∉ ⋃ i : S, U i → + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) := by + intro x hx + by_contra hbad + exact hx (mem_iUnion.mpr ⟨⟨x,hbad⟩,(hA ⟨x,hbad⟩).2⟩) + obtain ⟨g,hg,hfg,_,hI,hreg⟩ := relative_global_clean_pairs hf A U + (fun i => (hA i).1.isClosed) hdis (fun _ => isOpen_interior) + (fun _ => interior_subset) hIf S hfin hAreg zero_lt_one + refine ⟨g,hg,hI,?_,?_,?_⟩ + · intro x y hxy heq + exact ((mem_cleanSurfacePairs.mp (hreg x y hxy)) heq).2.2 + · intro p hp q heq + by_contra hqp + have hpf : p ∈ S := (hI p).not.mp hp + exact ((mem_cleanSurfacePairs.mp (hreg q p hqp)) heq).2.1 hpf + · intro p hp + have hpf : p ∈ S := by exact (hI p).not.mp hp + obtain ⟨q,φ,b,t,hpq,hφ,he,hz,hr⟩ := hrep p hpf + obtain ⟨a,ha⟩ := hfg ⟨p,hpf⟩ + have hpa : p ∈ A ⟨p,hpf⟩ := interior_subset (hA ⟨p,hpf⟩).2 + have htrans : g =ᶠ[𝓝 p] (fun x => f x+a) := ha.filter_mono (nhds_le_nhdsSet hpa) + refine ⟨q,(fun x => φ x+a),b,t,hpq,hφ.add contDiff_const,?_,?_,?_⟩ + · rw [centeredSurfaceTaylor_add_const] + filter_upwards [htrans,he] with x hx hex + change g x = centeredSurfaceTaylor φ (chart q p) (chart q x)+a + rw [hx,hex] + rfl + · rwa [surfaceDirection_add_const] + · rwa [surfaceDirection_add_const] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCurveArcCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCurveArcCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e2a1850fe8563615d5442ad4a9136307d662d7e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteCurveArcCover.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.HalfLineCompactArc + +namespace OAI + +/-! Compactness reduces the actual local line and half-line charts to a +finite cover by compact embedded arcs with open interiors. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] [CompactSpace X] + +theorem finite_curve_arc_cover + (hchart : ∀ x : X, + (∃ c : OpenPartialHomeomorph X ℝ, x ∈ c.source) ∨ + (∃ c : OpenPartialHomeomorph X (Ici (0:ℝ)), x ∈ c.source ∧ c x = ⟨0,by simp⟩)) : + ∃ (A : X → CompactCurveArc X) (V : X → Set X) (s : Finset X), + (∀ x, IsOpen (V x) ∧ x ∈ V x ∧ V x ⊆ range (A x).map) ∧ + (univ : Set X) ⊆ ⋃ x ∈ s, V x := by + classical + have hex (x : X) : ∃ (A : CompactCurveArc X) (V : Set X), + IsOpen V ∧ x ∈ V ∧ V ⊆ range A.map := by + rcases hchart x with ⟨c,hc⟩ | ⟨c,hc,hc0⟩ + · exact line_chart_compact_arc c hc + · exact half_line_compact_arc c hc hc0 + choose A V hV hxV hsub using hex + obtain ⟨s,hs⟩ := isCompact_univ.elim_finite_subcover V hV + (fun x _ => mem_iUnion.mpr ⟨x,hxV x⟩) + exact ⟨A,V,s,fun x => ⟨hV x,hxV x,hsub x⟩,hs⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteDoubleCurvePieces.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteDoubleCurvePieces.lean new file mode 100644 index 0000000000000000000000000000000000000000..84216ae34d4cbc02a9ebe80866e35e07b0f104a7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteDoubleCurvePieces.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCurvePieces +import OAI.Geometry.SurfaceImmersion.Atlas.TransverseCompactCurveCharts + +namespace OAI + +/-! The actual compactified surface double curve has a finite vertex/ +open-edge decomposition; no graph decomposition is assumed. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem exists_finite_double_curve_pieces : + ∃ f : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f ∧ + ∃ (V : Set (compactifiedDoubleCurve f)) (P : Finset (Set (compactifiedDoubleCurve f))), + V.Finite ∧ doubleCurveBoundary f ⊆ V ∧ + (∀ E ∈ P, IsOpen E ∧ IsConnected E ∧ Disjoint E V ∧ closure E \ E ⊆ V) ∧ + (∀ E ∈ P, ∀ F ∈ P, E ≠ F → Disjoint E F) ∧ Vᶜ = ⋃ E ∈ P, E ∧ (∀ E ∈ P, Nonempty (CurveEdgeWitness V E)) := by + obtain ⟨f,hf,hK,hD,hline,hhalf⟩ := exists_compact_double_curve_charts (M := M) + have : CompactSpace (compactifiedDoubleCurve f) := isCompact_iff_compactSpace.mp hK + obtain ⟨V,P,hV,hDV,hP,hd,hc,hE⟩ := compact_curve_pieces (doubleCurveBoundary f) hD + (fun x => by + by_cases hx : x ∈ doubleCurveBoundary f + · exact Or.inr (hhalf x hx) + · exact Or.inl (hline x hx)) + exact ⟨f,hf,V,P,hV,hDV,hP,hd,hc,hE⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteExceptionalDoublePairs.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteExceptionalDoublePairs.lean new file mode 100644 index 0000000000000000000000000000000000000000..577ebf8c143ec6fc389c156ffd9384c5e9c9a606 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteExceptionalDoublePairs.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedSurfaceFiniteFibers + +namespace OAI + +/-! Only finitely many double pairs involve a point in a prescribed finite set. -/ +noncomputable section +open Set Filter Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma finite_exceptional_double_pairs {X Y : Type*} (f : X → Y) + (hfin : ∀ y, {x | f x = y}.Finite) {S : Set X} (hS : S.Finite) : + {z : X × X | (z.1 ∈ S ∨ z.2 ∈ S) ∧ f z.1 = f z.2}.Finite := by + let L : Set (X × X) := ⋃ p ∈ S, (Prod.mk p) '' {q | f q = f p} + have hL : L.Finite := hS.biUnion (fun p _ => (hfin (f p)).image (Prod.mk p)) + apply (hL.union (hL.image Prod.swap)).subset + rintro ⟨p,q⟩ ⟨hS,hpq⟩ + rcases hS with hp | hq + · left + exact mem_iUnion₂.mpr ⟨p,hp,q,hpq.symm,rfl⟩ + · right + refine ⟨(q,p),?_,rfl⟩ + exact mem_iUnion₂.mpr ⟨q,hq,p,hpq,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairC1Regularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairC1Regularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f3ea1206269216a4211dca15e5da97661b65bff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairC1Regularization.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteChartTranslationBound +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSurfaceImmersionStability +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover + +namespace OAI + +/-! Finite regularization of prescribed compact pair pieces, with +arbitrarily small uniform displacement and frozen translation germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_regularization_C1 + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + [Fintype ν] (c : ν → M) (Q : ν → Set JetPolynomial.Base) + (hQ : ∀ j, IsCompact (Q j)) (hQT : ∀ j, Q j ⊆ (chart (c j)).target) + (s : Finset ι) (B : Set M) (hB : IsCompact B) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ChartDerivativeClose c Q f g ε ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + ∀ i ∈ s, ∀ z ∈ T i, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,by intro j x hx; simpa using hε,hIf,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hDc,hIg,hgood⟩ := ih (half_pos hε) + let K := ⋃ j ∈ s, T j + have hK : IsCompact K := s.isCompact_biUnion (fun j _ => hT j) + have hKreg : ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + intro z hz + obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact hgood j hj z hzj + obtain ⟨δ,hδ,hstable⟩ := compact_surface_pair_stability hg (P i).smooth hK hKreg + obtain ⟨η,hη,hηI⟩ := compact_surface_immersion_stability hg (P i).smooth hB hIg + obtain ⟨ζ,hζ,hζD⟩ := finite_chart_translation_bound c Q hQ hQT (P i).smooth (half_pos hε) + obtain ⟨a,ha,hnew⟩ := (P i).regularize hg (lt_min hδ (lt_min hη (lt_min hζ (half_pos hε)))) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haη : ‖a‖ < η := ha.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have haζ : ‖a‖ < ζ := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have haε : ‖a‖ < ε/2 := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,?_,hηI a haη,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j x hx + have hd := hζD hg a haζ j x hx + calc + _ ≤ ‖fderiv ℝ (G ∘ (chart (c j)).symm) x-fderiv ℝ (g ∘ (chart (c j)).symm) x‖+ + ‖fderiv ℝ (g ∘ (chart (c j)).symm) x-fderiv ℝ (f ∘ (chart (c j)).symm) x‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hd (hDc j x hx) + _ = ε := by ring + · intro j hj z hz hzz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2 hzz + · exact hstable a haδ z (mem_iUnion₂.mpr ⟨j,hj,hz⟩) hzz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairPointRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairPointRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..91843db15289d327ce7cea5d8052de55dc3eee3b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairPointRegularization.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSurfaceImmersionStability +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover +import OAI.Geometry.SurfaceImmersion.Whitney.FixedPairPointAvoidance +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPairAvoidance + +namespace OAI + +/-! Finite pair regularization also eliminates coincidences at a prescribed finite +set, while preserving earlier pieces, regularity, and frozen crosscap germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_regularization_avoiding_points + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + (S : Set M) (hS : S.Finite) (s : Finset ι) (B : Set M) (hB : IsCompact B) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + ∀ i ∈ s, ∀ z ∈ T i, g z.1 = g z.2 → + z.1 ∉ S ∧ z.2 ∉ S ∧ Function.Surjective (surfacePairDerivative g z.1 z.2) := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,hIf,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hIg,hgood⟩ := ih (half_pos hε) + let K := ⋃ j ∈ s, T j + have hK : IsCompact K := s.isCompact_biUnion (fun j _ => hT j) + have hKavoid : ∀ z ∈ K, z.1 ∈ S ∨ z.2 ∈ S → g z.1 ≠ g z.2 := by + intro z hz hzS heq + obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + have hh := hgood j hj z hzj heq + rcases hzS with hz1 | hz2 + · exact hh.1 hz1 + · exact hh.2.1 hz2 + have hKreg : ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + intro z hz + obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact fun heq => (hgood j hj z hzj heq).2.2 + obtain ⟨δ,hδ,hstable⟩ := compact_surface_pair_stability hg (P i).smooth hK hKreg + obtain ⟨ζ,hζ,havoid⟩ := compact_finite_pair_avoidance_stability hg.continuous + (P i).χ (P i).bounds hK hS hKavoid + obtain ⟨η,hη,hηI⟩ := compact_surface_immersion_stability hg (P i).smooth hB hIg + obtain ⟨a,ha,hnew⟩ := (P i).regularize_avoiding_points hg S S hS hS + (lt_min hδ (lt_min hζ (lt_min hη (half_pos hε)))) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haζ : ‖a‖ < ζ := ha.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have haη : ‖a‖ < η := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have haε : ‖a‖ < ε/2 := ha.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,hηI a haη,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j hj z hz hzz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2 hzz + · have hzK : z ∈ K := mem_iUnion₂.mpr ⟨j,hj,hz⟩ + have hn : ¬ (z.1 ∈ S ∨ z.2 ∈ S) := fun h => havoid a haζ z hzK h hzz + exact ⟨(not_or.mp hn).1,(not_or.mp hn).2,hstable a haδ z hzK hzz⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairProtectedRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairProtectedRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..79feb247510b91b5fd756cd00e311399f45e3ac8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FinitePairProtectedRegularization.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSurfaceImmersionStability +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover + +namespace OAI + +/-! Finite regularization of prescribed compact pair pieces, with +arbitrarily small uniform displacement and frozen translation germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_regularization_preserving_immersion + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + (s : Finset ι) (B : Set M) (hB : IsCompact B) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hIf : ∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x ∈ B, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x)) ∧ + ∀ i ∈ s, ∀ z ∈ T i, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,hIf,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hIg,hgood⟩ := ih (half_pos hε) + let K := ⋃ j ∈ s, T j + have hK : IsCompact K := s.isCompact_biUnion (fun j _ => hT j) + have hKreg : ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + intro z hz + obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact hgood j hj z hzj + obtain ⟨δ,hδ,hstable⟩ := compact_surface_pair_stability hg (P i).smooth hK hKreg + obtain ⟨η,hη,hηI⟩ := compact_surface_immersion_stability hg (P i).smooth hB hIg + obtain ⟨a,ha,hnew⟩ := (P i).regularize hg (lt_min hδ (lt_min hη (half_pos hε))) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haη : ‖a‖ < η := ha.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have haε : ‖a‖ < ε/2 := ha.trans_le ((min_le_right _ _).trans (min_le_right _ _)) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,hηI a haη,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j hj z hz hzz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2 hzz + · exact hstable a haδ z (mem_iUnion₂.mpr ⟨j,hj,hz⟩) hzz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteQuadraticCrosscaps.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteQuadraticCrosscaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f2495ab8e5e8dc8ae13f047f04e1b3508de0182 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteQuadraticCrosscaps.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSurfaceReplacement +import OAI.Geometry.SurfaceImmersion.Whitney.RegularCrosscapRepresentatives + +namespace OAI + +/-! The generic finite singular set can be prepared simultaneously: every +singularity is represented by its genuine second Taylor polynomial, and +no additional singularity is introduced anywhere on the surface. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem exists_finite_quadratic_crosscap_map : + ∃ F : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ F ∧ + {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F p)}.Finite ∧ + ∀ p, ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F p) → + ∃ (q : M) (φ : Base → ProjectionTarget 3) (b : Bool) (t : ℝ), + p ∈ (chart q).source ∧ ContDiff ℝ ∞ φ ∧ + F =ᶠ[𝓝 p] (centeredSurfaceTaylor φ (chart q p)) ∘ chart q ∧ + surfaceDirection φ b (chart q p,t) = 0 ∧ + Function.Bijective (fderiv ℝ (surfaceDirection φ b) (chart q p,t)) := by + classical + obtain ⟨f,hf,hfin,hrep⟩ := exists_regular_crosscap_map (M := M) + let S : Set M := {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)} + let : Fintype S := hfin.fintype + choose q φ b t hp hφ he hz hr using (fun p : S => hrep p p.property) + obtain ⟨V,hV,hd⟩ := hfin.t2_separation + have hprep (p : S) := prepare_surface_crosscap hf p (q p) (hp p) p.property + (hφ p) (he p) (b p) (t p) (hz p) (hr p) (hV p).2 (hV p).1 + choose g hg hs hsub hbad hlocal using hprep + have hd' : Pairwise fun p r : S => Disjoint (V p) (V r) := by + intro p r hpr + exact hd p.property r.property (fun h => hpr (Subtype.ext h)) + obtain ⟨F,hF,hFi,hFe⟩ := finite_disjoint_surface_replacement f hf g hg + (fun p : S => V p) hs hd' + have hsing (x : M) : + (¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F x)) ↔ x ∈ S := by + constructor + · intro hx + by_cases h : ∃ p : S, x ∈ V p + · obtain ⟨p,hpV⟩ := h + apply hsub p + change ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (g p) x) + intro hgood + exact hx (by rw [(hFi p x hpV).mfderiv_eq]; exact hgood) + · have hh : ∀ p : S, x ∉ V p := by simpa only [not_exists] using h + change ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x) + intro hgood + exact hx (by rw [(hFe x hh).mfderiv_eq]; exact hgood) + · intro hx + let p : S := ⟨x,hx⟩ + rw [(hFi p x (hV p).1).mfderiv_eq] + exact hbad p + refine ⟨F,hF,?_,?_⟩ + · have heq : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) F p)} = S := + Set.ext hsing + rw [heq] + exact hfin + · intro x hx + let p : S := ⟨x,(hsing x).mp hx⟩ + refine ⟨q p,φ p,b p,t p,hp p,hφ p,?_,hz p,hr p⟩ + exact (hFi p x (hV p).1).trans (hlocal p) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..319290c8693a8a4a576ad88ba8722b2ae0f73e2b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathCover.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPathCoverConcat + +namespace OAI + +/-! Every finite expression of regular smooth path pieces has a finite +closed-interval cover by its actual affine-parametrized smooth pieces. -/ +noncomputable section +open Set Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {H : Type*} [TopologicalSpace H] {J : ModelWithCorners ℝ E H} + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] +variable {x y : M} {γ : Path x y} + +theorem FiniteRegularPath.cover (hγ : FiniteRegularPath J γ) : + Nonempty (RegularPathCover (J := J) γ) := by + induction hγ with + | arc P => exact ⟨RegularPathCover.ofArc P⟩ + | subpath hγ s t ih => exact ⟨ih.some.subpath s t⟩ + | trans hγ hδ ihγ ihδ => exact ⟨ihγ.some.trans ihδ.some⟩ + | cast hγ hx hy ih => exact ⟨ih.some.cast hx hy⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathSmooth.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathSmooth.lean new file mode 100644 index 0000000000000000000000000000000000000000..d84dc5699050a35cff48211a9e4bbba833e7a795 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteRegularPathSmooth.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RegularPathCoverGerms + +namespace OAI + +/-! Away from finitely many corners, an embedded finite regular path is +an actual smooth immersion of the real parameter. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {H : Type*} [TopologicalSpace H] {J : ModelWithCorners ℝ E H} + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] +variable {x y : M} {γ : Path x y} + +lemma affine_parameter_regular {a b : ℝ} (ha : a ≠ 0) (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ) (fun u : ℝ => a*u+b) t) := by + have hA : HasDerivAt (fun u : ℝ => a*u+b) a t := by simpa only [id_eq,mul_one] using ((hasDerivAt_id t).const_mul a).add_const b + have hD := hA.hasFDerivAt.hasMFDerivAt.mfderiv + rw [hD] + intro u v huv + change ℝ at u v + change u*a = v*a at huv + exact (mul_right_cancel₀ ha huv : (u:ℝ) = (v:ℝ)) + +theorem FiniteRegularPath.smooth_outside_finite (hP : FiniteRegularPath J γ) + (hi : Function.Injective γ) : + ∃ S : Set ℝ, S.Finite ∧ ∀ t ∈ Ioo (0:ℝ) 1, t ∉ S → + ContMDiffAt 𝓘(ℝ) J ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) J γ.extend t) := by + obtain ⟨S,hS,hgerms⟩ := hP.cover.some.regular_germs_outside_finite hi + refine ⟨S,hS,?_⟩ + intro t ht htS + obtain ⟨A,a,b,ha,hab,he⟩ := hgerms t ht htS + have hA := A.smooth.contMDiffAt (A.domain_open.mem_nhds hab) + have hparam : ContDiff ℝ ∞ (fun u : ℝ => a*u+b) := by fun_prop + have hC : ContMDiffAt 𝓘(ℝ) J ∞ (fun u : ℝ => A.curve (a*u+b)) t := + hA.comp t hparam.contMDiff.contMDiffAt + refine ⟨hC.congr_of_eventuallyEq he,?_⟩ + have hreg : Function.Injective (mfderiv 𝓘(ℝ) J (fun u : ℝ => A.curve (a*u+b)) t) := by + change Function.Injective (mfderiv 𝓘(ℝ) J (A.curve ∘ fun u : ℝ => a*u+b) t) + rw [mfderiv_comp t (hA.mdifferentiableAt (by simp)) (hparam.contMDiff.mdifferentiable (by simp) t)] + exact (A.regular _ hab).comp (affine_parameter_regular ha t) + have hD := ((hC.mdifferentiableAt (by simp)).hasMFDerivAt.congr_of_eventuallyEq_abuse he).mfderiv + exact hD.symm ▸ hreg + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSingularProjection.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSingularProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c10c22b01b3b5507503ab2349f3c05d4fdfec7de --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSingularProjection.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularProjectionParameter +import OAI.Geometry.SurfaceImmersion.Geometry.BoundedProjectionDirections +import OAI.Geometry.SurfaceImmersion.Whitney.EuclideanImmersionReduction + +namespace OAI + +/-! An actual smooth map of every compact surface into three-space with +only finitely many singular points. The regularity of its direction +parameter maps is retained for the subsequent local analysis. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def projectionJet (F : M → ProjectionTarget 3 × ℝ) (i : A.centers) : + Base → Base →L[ℝ] ProjectionTarget 3 × ℝ := + weightedJet (localizedWeight (i : M) (A.weight i)) (localize (i : M) (A.weight i) F) + +lemma projectionJet_smooth {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) (i : A.centers) : + ContDiff ℝ ∞ (A.projectionJet F i) := + weightedJet_smooth + (localizedWeight_smooth (i : M) (A.weight_smooth i) (A.weight_support i)) + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF) + +theorem finite_singular_projection {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) F p)) + (a : ProjectionTarget 3) + (hreg : ∀ i b z, z ∈ tangentSlopeDomain (A.projectionJet F i) b → + tangentSlope (A.projectionJet F i) b z = a → + Function.Surjective (fderiv ℝ (tangentSlope (A.projectionJet F i) b) z)) : + {p | ¬ Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (graphProjection a ∘ F) p)}.Finite := by + classical + have hg : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ (graphProjection a ∘ F) := + (graphProjection a).contDiff.contMDiff.comp hF + have hji (i : A.centers) (x : Base) (hx : x ∈ A.coordinateCore i) : + Function.Injective (A.projectionJet F i x) := + (localized_weightedJet_injective_iff (hF.of_le (by simp)) (i : M) + (A.weight_smooth i) (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mpr (hI _) + let D (i : A.centers) (b : Bool) := + compactProjectionDirections a (A.projectionJet F i) (A.coordinateCore i) b + have hD (i : A.centers) (b : Bool) : (D i b).Finite := + finite_compact_projection_directions (A.projectionJet_smooth hF i) + (A.coordinateCore_compact i) (hji i) a b (hreg i b) + have hfinite : (⋃ i : A.centers, ⋃ b : Bool, + (fun z : Base × ℝ => (chart (i : M)).symm z.1) '' D i b).Finite := + Set.finite_iUnion (fun i => Set.finite_iUnion (fun b => (hD i b).image _)) + apply hfinite.subset + intro p hp + obtain ⟨i,hi⟩ := A.mem_some_weightCore p + let x := chart (i : M) p + have hx : x ∈ A.coordinateCore i := mem_image_of_mem _ hi + have hbad : ¬ Function.Injective ((graphProjection a).comp (A.projectionJet F i x)) := by + intro hinj + have hnew : Function.Injective (weightedJet (localizedWeight (i : M) (A.weight i)) + (localize (i : M) (A.weight i) (graphProjection a ∘ F)) x) := by + rw [localize_clm,weightedJet_comp _ _ + ((localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).differentiable + (by simp) x)] + exact hinj + have hImm := (localized_weightedJet_injective_iff (hg.of_le (by simp)) (i : M) + (A.weight_smooth i) (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mp hnew + apply hp + change Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) + (graphProjection a ∘ F) ((chart (i : M)).symm (chart (i : M) p))) at hImm + rwa [(chart (i : M)).left_inv (A.weightCore_source i hi)] at hImm + obtain ⟨b,t,ht,hker⟩ := exists_bounded_tangentRay_in_kernel _ hbad + apply mem_iUnion.mpr + refine ⟨i,mem_iUnion.mpr ⟨b,?_⟩⟩ + refine ⟨(x,t),⟨⟨hx,ht⟩,hker⟩,?_⟩ + exact (chart (i : M)).left_inv (A.weightCore_source i hi) + +theorem exists_finite_singular_projection {F : M → ProjectionTarget 3 × ℝ} + (hF : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) ∞ F) + (hI : ∀ p, Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3 × ℝ) F p)) : + ∃ a : ProjectionTarget 3, + (∀ i b z, z ∈ tangentSlopeDomain (A.projectionJet F i) b → + tangentSlope (A.projectionJet F i) b z = a → + Function.Surjective (fderiv ℝ (tangentSlope (A.projectionJet F i) b) z)) ∧ + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ (graphProjection a ∘ F) ∧ + {p | ¬ Function.Injective + (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (graphProjection a ∘ F) p)}.Finite := by + obtain ⟨a,_ha,hreg⟩ := exists_regular_projection_parameter + (A.projectionJet F) (A.projectionJet_smooth hF) univ isOpen_univ Set.univ_nonempty + exact ⟨a,hreg,(graphProjection a).contDiff.contMDiff.comp hF, + A.finite_singular_projection hF hI a hreg⟩ + +end SmoothingAtlas + +variable [T2Space M] + +theorem exists_smooth_three_map_finite_singular : + ∃ f : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f ∧ + {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite := by + obtain ⟨A⟩ := exists_smoothingAtlas (M := M) + obtain ⟨F,hF,hI⟩ := exists_smooth_euclidean_four_immersion (M := M) + let e : ProjectionTarget 4 ≃L[ℝ] ProjectionTarget 3 × ℝ := + ContinuousLinearEquiv.ofFinrankEq (by simp) + obtain ⟨he,heI⟩ := smooth_immersion_postcompose e.toContinuousLinearMap e.injective hF hI + obtain ⟨a,_hreg,hg,hfin⟩ := A.exists_finite_singular_projection he heI + exact ⟨graphProjection a ∘ (e ∘ F),hg,hfin⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSurfacePairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSurfacePairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..570fb4d15571fb26835f5ec23a67ebfce8271548 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FiniteSurfacePairRegularization.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenTranslationGerms +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover + +namespace OAI + +/-! Finite regularization of prescribed compact pair pieces, with +arbitrarily small uniform displacement and frozen translation germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M ι κ : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem finite_surface_pair_regularization + (p q : ι → M) (P : ∀ i, SurfacePairTranslationPatch (p i) (q i)) + (T : ι → Set (M × M)) (hT : ∀ i, IsCompact (T i)) + (hTP : ∀ i, T i ⊆ (P i).U ×ˢ (P i).V) + (A : κ → Set M) + (hPA : ∀ i j, ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 0)) ∨ + ((P i).χ =ᶠ[𝓝ˢ (A j)] (fun _ => 1))) + (s : Finset ι) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + ∀ i ∈ s, ∀ z ∈ T i, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + classical + induction s using Finset.induction_on generalizing ε with + | empty => + exact ⟨f,hf,frozenTranslationGerms_refl A f,by simpa using fun _ : M => hε,by simp⟩ + | @insert i s hi ih => + obtain ⟨g,hg,hfg,hclose,hgood⟩ := ih (half_pos hε) + let K := ⋃ j ∈ s, T j + have hK : IsCompact K := s.isCompact_biUnion (fun j _ => hT j) + have hKreg : ∀ z ∈ K, g z.1 = g z.2 → Function.Surjective (surfacePairDerivative g z.1 z.2) := by + intro z hz + obtain ⟨j,hj,hzj⟩ := mem_iUnion₂.mp hz + exact hgood j hj z hzj + obtain ⟨δ,hδ,hstable⟩ := compact_surface_pair_stability hg (P i).smooth hK hKreg + obtain ⟨a,ha,hnew⟩ := (P i).regularize hg (lt_min hδ (half_pos hε)) + let G := surfaceTranslation g (P i).χ a + have haδ : ‖a‖ < δ := ha.trans_le (min_le_left _ _) + have haε : ‖a‖ < ε/2 := ha.trans_le (min_le_right _ _) + refine ⟨G,surfaceTranslation_smooth hg (P i).smooth a, + hfg.trans (frozenTranslationGerms_translate (hPA i) g a),?_,?_⟩ + · intro x + have hx : ‖G x-g x‖ < ε/2 := by + change ‖g x+(P i).χ x • a-g x‖ < ε/2 + rw [add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg ((P i).bounds x).1] + exact (mul_le_mul_of_nonneg_right ((P i).bounds x).2 (norm_nonneg a)).trans_lt (by simpa using haε) + calc + ‖G x-f x‖ ≤ ‖G x-g x‖+‖g x-f x‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hx (hclose x) + _ = ε := by ring + · intro j hj z hz hzz + rcases Finset.mem_insert.mp hj with rfl | hj + · exact hnew z.1 (hTP j hz).1 z.2 (hTP j hz).2 hzz + · exact hstable a haδ z (mem_iUnion₂.mpr ⟨j,hj,hz⟩) hzz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedPairPointAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedPairPointAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..252863fc7db9c17ba64b527d9aef78d7bda9882d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedPairPointAvoidance.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FixedSurfacePairPatch +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairPointAvoidance + +namespace OAI + +/-! The fixed cutoff patches also remove coincidences at prescribed finite points. -/ +noncomputable section +open Set Filter Manifold Topology +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SurfacePairTranslationPatch + +theorem regularize_avoiding_points {p q : M} (P : SurfacePairTranslationPatch p q) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (S T : Set M) (hS : S.Finite) (hT : T.Finite) {ε : ℝ} (hε : 0 < ε) : + ∃ a : ProjectionTarget 3, ‖a‖ < ε ∧ ∀ x ∈ P.U, ∀ y ∈ P.V, + surfaceTranslation f P.χ a x = surfaceTranslation f P.χ a y → + x ∉ S ∧ y ∉ T ∧ Function.Surjective (surfacePairDerivative (surfaceTranslation f P.χ a) x y) := by + obtain ⟨F,hF,heF⟩ := surface_compact_representative hf p isClosed_closure.isCompact P.sourceU + obtain ⟨G,hG,heG⟩ := surface_compact_representative hf q isClosed_closure.isCompact P.sourceV + exact surface_pair_patch_translation_avoiding_points p q hF hG P.openU P.openV + (fun x hx => P.sourceU (subset_closure hx)) (fun y hy => P.sourceV (subset_closure hy)) + (heF.mono subset_closure) (heG.mono subset_closure) P.oneOn P.zeroOn S T hS hT hε + +end SurfacePairTranslationPatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedSurfacePairPatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedSurfacePairPatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..389a180ba43bd26ee164284a20179753bf4ab0ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FixedSurfacePairPatch.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ClosedFamilySeparator +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceCompactRepresentative +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairPatchTranslation + +namespace OAI + +/-! Pair patches and their cutoffs are fixed before the surface map or +perturbation size. Whole closed crosscap neighborhoods may be frozen. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +structure SurfacePairTranslationPatch (p q : M) where + χ : M → ℝ + smooth : ContMDiff planeModel 𝓘(ℝ) ∞ χ + bounds : ∀ x, χ x ∈ Icc 0 1 + U : Set M + V : Set M + openU : IsOpen U + openV : IsOpen V + memU : p ∈ U + memV : q ∈ V + sourceU : closure U ⊆ (chart p).source + sourceV : closure V ⊆ (chart q).source + oneOn : EqOn χ 1 U + zeroOn : EqOn χ 0 V + +theorem exists_fixed_surface_pair_patch {ι : Type*} [Fintype ι] + (A : ι → Set M) (hA : ∀ i, IsClosed (A i)) (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + (p q : M) (hpq : p ≠ q) (hpair : ∀ i, ¬ (p ∈ A i ∧ q ∈ A i)) : + ∃ P : SurfacePairTranslationPatch p q, ∀ i, + (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ (P.χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1)) := by + obtain ⟨χ,hχ,hχbounds,hpχ,hqχ,hAχ⟩ := closed_family_separator A hA hdis p q hpq hpair + obtain ⟨Wp,hχWp,hWp,hpWp⟩ := _root_.mem_nhds_iff.mp hpχ + obtain ⟨Wq,hχWq,hWq,hqWq⟩ := _root_.mem_nhds_iff.mp hqχ + have hpS : p ∈ (chart p).source := by simpa only [chart_source] using mem_chart_source Plane p + have hqS : q ∈ (chart q).source := by simpa only [chart_source] using mem_chart_source Plane q + have hpO : ({p} : Set M) ⊆ Wp ∩ (chart p).source := singleton_subset_iff.mpr ⟨hpWp,hpS⟩ + have hqO : ({q} : Set M) ⊆ Wq ∩ (chart q).source := singleton_subset_iff.mpr ⟨hqWq,hqS⟩ + obtain ⟨U,hU,hpU,hclU⟩ := (isCompact_singleton (x := p)).exists_isOpen_closure_subset + ((hWp.inter (chart p).open_source).mem_nhdsSet.mpr hpO) + obtain ⟨V,hV,hqV,hclV⟩ := (isCompact_singleton (x := q)).exists_isOpen_closure_subset + ((hWq.inter (chart q).open_source).mem_nhdsSet.mpr hqO) + refine ⟨{ + χ := χ + smooth := hχ + bounds := hχbounds + U := U + V := V + openU := hU + openV := hV + memU := hpU (mem_singleton p) + memV := hqV (mem_singleton q) + sourceU := fun x hx => (hclU hx).2 + sourceV := fun x hx => (hclV hx).2 + oneOn := fun x hx => hχWp ((hclU (subset_closure hx)).1) + zeroOn := fun x hx => hχWq ((hclV (subset_closure hx)).1) + },hAχ⟩ + +namespace SurfacePairTranslationPatch + +omit [T2Space M] in +theorem regularize {p q : M} (P : SurfacePairTranslationPatch p q) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {ε : ℝ} (hε : 0 < ε) : + ∃ a : ProjectionTarget 3, ‖a‖ < ε ∧ ∀ x ∈ P.U, ∀ y ∈ P.V, + surfaceTranslation f P.χ a x = surfaceTranslation f P.χ a y → + Function.Surjective (surfacePairDerivative (surfaceTranslation f P.χ a) x y) := by + obtain ⟨F,hF,heF⟩ := surface_compact_representative hf p isClosed_closure.isCompact P.sourceU + obtain ⟨G,hG,heG⟩ := surface_compact_representative hf q isClosed_closure.isCompact P.sourceV + exact surface_pair_patch_translation p q hF hG P.openU P.openV + (fun x hx => P.sourceU (subset_closure hx)) (fun y hy => P.sourceV (subset_closure hy)) + (heF.mono subset_closure) (heG.mono subset_closure) P.oneOn P.zeroOn hε + +end SurfacePairTranslationPatch +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCrosscapDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCrosscapDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ae2d893ce5b509852f8d7ee1ea72a2034700e27 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCrosscapDefect.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCoordinateRegularity +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapNormalDefect + +namespace OAI + +/-! The actual pair has exactly two nondegenerate normal-defect zeros +in a single rectangular coordinate neighborhood. -/ +noncomputable section +open Set Filter Matrix Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.nondegenerate_normal_defect_framed (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (δ : ℝ) (U : Set Base), 0 < δ ∧ IsOpen U ∧ U ⊆ S.domain ∧ + (∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (A.arc.start-δ) (A.arc.finish+δ), (![x,t] : Base) ∈ U) ∧ + ContDiffOn ℝ ∞ (normalDefect S.model a) U ∧ + (∀ x ∈ U, normalDefect S.model a x = 0 ↔ + x = ![0,A.arc.start] ∨ x = ![0,A.arc.finish]) ∧ + Function.Bijective (fderiv ℝ (normalDefect S.model a) (![0,A.arc.start] : Base)) ∧ + Function.Bijective (fderiv ℝ (normalDefect S.model a) (![0,A.arc.finish] : Base)) ∧ + U ⊆ normalFrameDomain S.model a := by + classical + obtain ⟨a,ha⟩ := exists_curve_transverse_vector S.transverseVector S.transverseVector_smooth + obtain ⟨V,hV,hVD,hVaxis,hVI⟩ := S.regular_neighborhood hf + let U := V ∩ normalFrameDomain S.model a + have hU : IsOpen U := hV.inter (normalFrameDomain_open S.model_smooth a) + have hframe : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ normalFrameDomain S.model a := by + intro t ht + change transverseDerivative S.model (![0,t] : Base) ⨯₃ a ≠ 0 + rw [S.transverseDerivative_axis] + exact curve_transverse_cross_ne_zero (S.transverseVector_ne_zero ht) (ha t) + have hUaxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := + fun t ht => ⟨hVaxis t ht,hframe t ht⟩ + obtain ⟨δ,hδ,hrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hU hUaxis + have hl := hframe A.arc.start (left_mem_Icc.mpr A.arc.start_lt_finish.le) + have hr := hframe A.arc.finish (right_mem_Icc.mpr A.arc.start_lt_finish.le) + refine ⟨a,δ,U,hδ,hU,inter_subset_left.trans hVD,hrect,?_,?_,?_,?_,inter_subset_right⟩ + · exact normalDefect_smooth S.model_smooth (fun _ hx => normalFrameDomain_nonzero hx.2) + (fun _ hx => normalFrameDomain_transverse hx.2) + · intro x hx + have hh : normalDefect S.model a x ≠ 0 ↔ + x ≠ ![0,A.arc.start] ∧ x ≠ ![0,A.arc.finish] := + (normalDefect_immersion_iff S.model a x (normalFrameDomain_nonzero hx.2) + (normalFrameDomain_transverse hx.2)).symm.trans (hVI x hx.1) + simpa only [not_not,not_and_or] using not_congr hh + · exact normalDefect_nondegenerate_of_direction S.model_smooth a _ + (normalFrameDomain_nonzero hl) (normalFrameDomain_transverse hl) S.left_vertical + S.endpoint_direction_regular.1 + · exact normalDefect_nondegenerate_of_direction S.model_smooth a _ + (normalFrameDomain_nonzero hr) (normalFrameDomain_transverse hr) S.right_vertical + S.endpoint_direction_regular.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCurveTube.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCurveTube.lean new file mode 100644 index 0000000000000000000000000000000000000000..e86428f8b282636f3e9ee7cd75f5c8ff8aa08737 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/FramedCurveTube.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveNormalFrame + +namespace OAI + +/-! Explicit smooth target tubes around regular curves. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def framedCurveTube (c : ℝ → (Fin 3 → ℝ)) (a : Fin 3 → ℝ) + (z : Base × ℝ) : Fin 3 → ℝ := + c z.2 + z.1 0 • a + z.1 1 • (deriv c z.2 ⨯₃ a) + +lemma curve_cross_velocity_smooth {c : ℝ → (Fin 3 → ℝ)} (hc : ContDiff ℝ ∞ c) + (a : Fin 3 → ℝ) : ContDiff ℝ ∞ (fun t => deriv c t ⨯₃ a) := by + have hv : ContDiff ℝ ∞ (deriv c) := (contDiff_infty_iff_deriv.mp hc).2 + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [cross_apply] <;> fun_prop + +lemma framedCurveTube_smooth {c : ℝ → (Fin 3 → ℝ)} (hc : ContDiff ℝ ∞ c) + (a : Fin 3 → ℝ) : ContDiff ℝ ∞ (framedCurveTube c a) := by + have hw := curve_cross_velocity_smooth hc a + exact ((hc.comp contDiff_snd).add + (((contDiff_apply ℝ ℝ 0).comp contDiff_fst).smul contDiff_const)).add + (((contDiff_apply ℝ ℝ 1).comp contDiff_fst).smul (hw.comp contDiff_snd)) + +lemma framedCurveTube_fderiv {c : ℝ → (Fin 3 → ℝ)} (hc : ContDiff ℝ ∞ c) + (a : Fin 3 → ℝ) (t : ℝ) : + fderiv ℝ (framedCurveTube c a) (0,t) = curveNormalLinear (deriv c t) a := by + let z : Base × ℝ := (0,t) + have hC := ((hc.differentiable (by simp) t).hasFDerivAt).comp z + (hasFDerivAt_snd (𝕜 := ℝ) (p := z)) + have h0 := (hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) (0 : Base)).comp z + (hasFDerivAt_fst (𝕜 := ℝ) (p := z)) + have h1 := (hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) (0 : Base)).comp z + (hasFDerivAt_fst (𝕜 := ℝ) (p := z)) + have hW := (((curve_cross_velocity_smooth hc a).differentiable (by simp) t).hasFDerivAt).comp z + (hasFDerivAt_snd (𝕜 := ℝ) (p := z)) + have hd := (hC.add (h0.smul_const a)).add (h1.smul hW) + change HasFDerivAt (framedCurveTube c a) _ (0,t) at hd + rw [hd.fderiv] + apply ContinuousLinearMap.ext + intro w + simp [curveNormalLinear_apply,z,fderiv_eq_smul_deriv] + +lemma framedCurveTube_regular_axis {c : ℝ → (Fin 3 → ℝ)} (hc : ContDiff ℝ ∞ c) + {a : Fin 3 → ℝ} (ha : ∀ t r : ℝ, r • deriv c t ≠ a) (t : ℝ) + (ht : deriv c t ≠ 0) : + Function.Bijective (fderiv ℝ (framedCurveTube c a) (0,t)) := by + rw [framedCurveTube_fderiv hc] + exact curveNormalLinear_bijective ht (ha t) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/GeometricBoundaryCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GeometricBoundaryCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a47fc12882ebcfbf4f9d380d71dcac6f77dc10c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GeometricBoundaryCollar.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryNormalMatch +import OAI.Geometry.SurfaceImmersion.Whitney.BoundaryInvariantCollar + +namespace OAI + +/-! The collar inequality from the old immersion's boundary inequality. +Its collar and shift window are fixed before selecting large turn jets. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes CollarVelocity + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem geometric_boundary_collar {K C₀ O Ω : Set E} {J : Set ℝ} + (hK : IsCompact K) (hC₀ : IsClosed C₀) (hO : IsOpen O) (hΩ : IsOpen Ω) + (hKΩ : K ⊆ Ω) (hOΩ : O ⊆ Ω) (hCcl : C₀ ⊆ closure O) (hJ : IsCompact J) + {Q X Y C e₁ e₂ : E → Vec} {R b c k : E → ℝ} {β : E × ℝ → ℝ} + (hQ : ContDiffOn ℝ ∞ Q Ω) (hX : ContDiffOn ℝ ∞ X Ω) + (hY : ContDiffOn ℝ ∞ Y Ω) (hC : ContDiffOn ℝ ∞ C Ω) + (hR : ContDiffOn ℝ ∞ R Ω) (h₁ : ContDiffOn ℝ ∞ e₁ Ω) + (h₂ : ContDiffOn ℝ ∞ e₂ Ω) (hβ : ContDiffOn ℝ ∞ β (Ω ×ˢ univ)) + (hb : ContDiffOn ℝ ∞ b Ω) (hc : ContDiffOn ℝ ∞ c Ω) (hk : ContDiffOn ℝ ∞ k Ω) + (hD : ∀ x ∈ Ω, gramDet (Y x) (C x) ≠ 0) + (hframe : ∀ x ∈ Ω, e₁ x ⬝ᵥ e₁ x = 1 ∧ e₂ x ⬝ᵥ e₂ x = 1 ∧ e₁ x ⬝ᵥ e₂ x = 0 ∧ + Y x ⬝ᵥ e₁ x = 0 ∧ C x ⬝ᵥ e₁ x = 0 ∧ Y x ⬝ᵥ e₂ x = 0 ∧ C x ⬝ᵥ e₂ x = 0) + (hR0 : ∀ x ∈ Ω, R x ≠ 0) + (hproj : ∀ x ∈ Ω, Q x = X x - realNormalPart (Y x) (C x) (X x)) + (hext : ∀ x ∈ O, Q x + R x • direction (e₁ x) (e₂ x) 0 = X x) + (hzero : ∀ x ∈ K ∩ C₀, ∀ t ∈ J, β (x, t) = 0) (d : E) + (hboundary : ∀ x ∈ K ∩ C₀, + 0 < ((fderiv ℝ X x d ⬝ᵥ normalize (realNormalPart (X x) (Y x) (C x))) * b x + + Real.sqrt (realNormalPart (X x) (Y x) (C x) ⬝ᵥ + realNormalPart (X x) (Y x) (C x)) * c x) ^ 2 + k x * b x ^ 2) : + ∃ W : Set E, IsOpen W ∧ C₀ ⊆ W ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ x ∈ K ∩ W, ∀ t ∈ J, ∀ h : ℝ, |h| < ε → + 0 < normalInvariant (frozenFirst Q X Y C R e₁ e₂ d) + (frozenSize X Y C R e₁ e₂) b c k (x, β (x, t) + h) := by + obtain ⟨hfirst, hsize⟩ := frozen_coefficients_smoothOn hΩ hQ hX hY hC hR h₁ h₂ hD hframe hR0 d + apply boundary_invariant_collar hK hC₀ hΩ hKΩ hJ hfirst hsize hβ hb hc hk hzero + intro x hx + obtain ⟨hfirst0, hsize0⟩ := boundary_normal_match (α := fun _ => 0) + hΩ hO hOΩ hQ hX hR h₁ h₂ contDiffOn_const hproj hext + ⟨hCcl hx.2, hKΩ hx.1⟩ d (hframe x (hKΩ hx.1)) + change 0 < (frozenFirst Q X Y C R e₁ e₂ d (x, 0) * b x + + frozenSize X Y C R e₁ e₂ (x, 0) * c x) ^ 2 + k x * b x ^ 2 + rw [hfirst0, hsize0] + exact hboundary x hx + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalCleanPairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalCleanPairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..906a2cd9a50179aba519f818c74919e61a306777 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalCleanPairRegularization.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactCleanPairRegularization +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenCleanPairs +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteInjectivityCover +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenPairGeometry + +namespace OAI + +/-! Global regularization with a fixed injectivity cover and frozen +crosscap neighborhoods. No distinct double pair is left uncontrolled. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M ι ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] [Fintype ν] + +theorem global_clean_pair_regularization_with_cover + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (A U : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + (hU : ∀ i, IsOpen (U i)) (hUA : ∀ i, U i ⊆ A i) + (hIf : ∀ x, x ∉ ⋃ i, U i → Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (S : Set M) (hS : S.Finite) + (hAclean : ∀ i, ∀ x ∈ A i, ∀ y ∈ A i, x ≠ y → (x,y) ∈ cleanSurfacePairs f S) + (c : ν → M) (P : ∀ j, SurfaceInjectivityPatch f (c j)) + (hcover : (⋃ i, U i) ∪ (⋃ j, (P j).region) = univ) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + ∀ x y, x ≠ y → (x,y) ∈ cleanSurfacePairs g S := by + classical + let B : Set M := (⋃ i, U i)ᶜ + have hB : IsCompact B := (isOpen_iUnion hU).isClosed_compl.isCompact + let W : Set (M × M) := (⋃ i, U i ×ˢ U i) ∪ (⋃ j, (P j).region ×ˢ (P j).region) + let K : Set (M × M) := Wᶜ + have hW : IsOpen W := (isOpen_iUnion fun i => (hU i).prod (hU i)).union + (isOpen_iUnion fun j => (P j).region_open.prod (P j).region_open) + have hK : IsCompact K := hW.isClosed_compl.isCompact + have hne : ∀ z ∈ K, z.1 ≠ z.2 := by + rintro ⟨x,y⟩ hz hxy + have hx : x ∈ (⋃ i, U i) ∪ ⋃ j, (P j).region := by rw [hcover]; trivial + apply hz + rcases hx with hx | hx + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx + exact Or.inl (mem_iUnion.mpr ⟨i,hi,hxy ▸ hi⟩) + · obtain ⟨j,hj⟩ := mem_iUnion.mp hx + exact Or.inr (mem_iUnion.mpr ⟨j,hj,hxy ▸ hj⟩) + let Q : ν → Set Base := fun j => Metric.closedBall (chart (c j) (c j)) (P j).radius + have hsmall (s : Finset ν) : ∃ η > 0, η ≤ ε ∧ ∀ j ∈ s, η ≤ 1/(4*((P j).K:ℝ)) := by + induction s using Finset.induction_on with + | empty => exact ⟨ε,hε,le_rfl,by simp⟩ + | @insert j s hj ih => + obtain ⟨η,hη,hηε,hηs⟩ := ih + have hp : 0 < 1/(4*((P j).K:ℝ)) := by have := (P j).K_pos; positivity + refine ⟨min η (1/(4*((P j).K:ℝ))),lt_min hη hp,(min_le_left _ _).trans hηε,?_⟩ + intro k hk + rcases Finset.mem_insert.mp hk with rfl | hk + · exact min_le_right _ _ + · exact (min_le_left _ _).trans (hηs k hk) + obtain ⟨η,hη,hηε,hηP⟩ := hsmall Finset.univ + obtain ⟨g,hg,hfg,hclose,hD,hIg,hgood⟩ := compact_relative_clean_pair_regularization A hA hdis hK hne S hS + c Q (fun j => isCompact_closedBall _ _) (fun j => (P j).target) + B hB hf hIf + (by rintro z hz ⟨i,hix,hiy⟩; exact hAclean i z.1 hix z.2 hiy (hne z hz)) hη + have hIpatch (j : ν) : InjOn g (P j).region := (P j).injective_of_close hg + (fun y hy => (hD j y hy).trans_le (hηP j (Finset.mem_univ j))) + have hBA : B ∪ ⋃ i, A i = univ := by + apply eq_univ_of_forall + intro x + by_cases hx : x ∈ ⋃ i, U i + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx + exact Or.inr (mem_iUnion.mpr ⟨i,hUA i hi⟩) + · exact Or.inl hx + refine ⟨g,hg,hfg,fun x => (hclose x).trans_le hηε, + frozen_immersion_equivalence hBA hf hfg hIf hIg,?_⟩ + intro x y hxy + by_cases hxyK : (x,y) ∈ K + · exact hgood hxyK + have hxyW : (x,y) ∈ W := by simpa only [K,mem_compl_iff,not_not] using hxyK + rcases hxyW with hu | hp + · obtain ⟨i,hxi,hyi⟩ := mem_iUnion.mp hu + exact hfg.clean_pair hf S i (hUA i hxi) (hUA i hyi) + (hAclean i x (hUA i hxi) y (hUA i hyi) hxy) + · obtain ⟨j,hxj,hyj⟩ := mem_iUnion.mp hp + apply mem_cleanSurfacePairs.mpr + intro hgeq + exact False.elim (hxy (hIpatch j hxj hyj hgeq)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalPairRegularization.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalPairRegularization.lean new file mode 100644 index 0000000000000000000000000000000000000000..6af8c4c913e4aeab689bbee247e7a80af9ff16ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GlobalPairRegularization.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactRelativePairRegularization +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteInjectivityCover +import OAI.Geometry.SurfaceImmersion.Geometry.FrozenPairGeometry + +namespace OAI + +/-! Global regularization with a fixed injectivity cover and frozen +crosscap neighborhoods. No distinct double pair is left uncontrolled. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M ι ν : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] [Fintype ι] [Fintype ν] + +theorem global_pair_regularization_with_cover + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (A U : ι → Set M) (hA : ∀ i, IsClosed (A i)) + (hdis : Pairwise (fun i j => Disjoint (A i) (A j))) + (hU : ∀ i, IsOpen (U i)) (hUA : ∀ i, U i ⊆ A i) + (hIf : ∀ x, x ∉ ⋃ i, U i → Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) + (hAreg : ∀ i, ∀ x ∈ A i, ∀ y ∈ A i, x ≠ y → (x,y) ∈ regularSurfacePairs f) + (c : ν → M) (P : ∀ j, SurfaceInjectivityPatch f (c j)) + (hcover : (⋃ i, U i) ∪ (⋃ j, (P j).region) = univ) + {ε : ℝ} (hε : 0 < ε) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + FrozenTranslationGerms A f g ∧ (∀ x, ‖g x-f x‖ < ε) ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + ∀ x y, x ≠ y → g x = g y → Function.Surjective (surfacePairDerivative g x y) := by + classical + let B : Set M := (⋃ i, U i)ᶜ + have hB : IsCompact B := (isOpen_iUnion hU).isClosed_compl.isCompact + let W : Set (M × M) := (⋃ i, U i ×ˢ U i) ∪ (⋃ j, (P j).region ×ˢ (P j).region) + let K : Set (M × M) := Wᶜ + have hW : IsOpen W := (isOpen_iUnion fun i => (hU i).prod (hU i)).union + (isOpen_iUnion fun j => (P j).region_open.prod (P j).region_open) + have hK : IsCompact K := hW.isClosed_compl.isCompact + have hne : ∀ z ∈ K, z.1 ≠ z.2 := by + rintro ⟨x,y⟩ hz hxy + have hx : x ∈ (⋃ i, U i) ∪ ⋃ j, (P j).region := by rw [hcover]; trivial + apply hz + rcases hx with hx | hx + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx + exact Or.inl (mem_iUnion.mpr ⟨i,hi,hxy ▸ hi⟩) + · obtain ⟨j,hj⟩ := mem_iUnion.mp hx + exact Or.inr (mem_iUnion.mpr ⟨j,hj,hxy ▸ hj⟩) + let Q : ν → Set Base := fun j => Metric.closedBall (chart (c j) (c j)) (P j).radius + have hsmall (s : Finset ν) : ∃ η > 0, η ≤ ε ∧ ∀ j ∈ s, η ≤ 1/(4*((P j).K:ℝ)) := by + induction s using Finset.induction_on with + | empty => exact ⟨ε,hε,le_rfl,by simp⟩ + | @insert j s hj ih => + obtain ⟨η,hη,hηε,hηs⟩ := ih + have hp : 0 < 1/(4*((P j).K:ℝ)) := by have := (P j).K_pos; positivity + refine ⟨min η (1/(4*((P j).K:ℝ))),lt_min hη hp,(min_le_left _ _).trans hηε,?_⟩ + intro k hk + rcases Finset.mem_insert.mp hk with rfl | hk + · exact min_le_right _ _ + · exact (min_le_left _ _).trans (hηs k hk) + obtain ⟨η,hη,hηε,hηP⟩ := hsmall Finset.univ + obtain ⟨g,hg,hfg,hclose,hD,hIg,hgood⟩ := compact_relative_pair_regularization A hA hdis hK hne + c Q (fun j => isCompact_closedBall _ _) (fun j => (P j).target) + B hB hf hIf + (by rintro z hz ⟨i,hix,hiy⟩; exact hAreg i z.1 hix z.2 hiy (hne z hz)) hη + have hIpatch (j : ν) : InjOn g (P j).region := (P j).injective_of_close hg + (fun y hy => (hD j y hy).trans_le (hηP j (Finset.mem_univ j))) + have hBA : B ∪ ⋃ i, A i = univ := by + apply eq_univ_of_forall + intro x + by_cases hx : x ∈ ⋃ i, U i + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx + exact Or.inr (mem_iUnion.mpr ⟨i,hUA i hi⟩) + · exact Or.inl hx + refine ⟨g,hg,hfg,fun x => (hclose x).trans_le hηε, + frozen_immersion_equivalence hBA hf hfg hIf hIg,?_⟩ + intro x y hxy hgeq + by_cases hxyK : (x,y) ∈ K + · exact hgood (x,y) hxyK hgeq + have hxyW : (x,y) ∈ W := by simpa only [K,mem_compl_iff,not_not] using hxyK + rcases hxyW with hu | hp + · obtain ⟨i,hxi,hyi⟩ := mem_iUnion.mp hu + exact (hfg.regular_pair hf i (hUA i hxi) (hUA i hyi) + (hAreg i x (hUA i hxi) y (hUA i hyi) hxy)).resolve_left (not_not.mpr hgeq) + · obtain ⟨j,hxj,hyj⟩ := mem_iUnion.mp hp + exact False.elim (hxy (hIpatch j hxj hyj hgeq)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/GraphJoinArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GraphJoinArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..21abe310259d2b8e71bef2f1e4f31916d8b4cab6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/GraphJoinArc.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RoundedReturnRegular +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothCompactArc + +namespace OAI + +/-! Smooth graph interpolation rounds corners whose two oriented branches +both advance in the same coordinate direction. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def graphJoinCurve (f g : ℝ → ℝ) (t : ℝ) : Base := + ![t,(1-centeredSmoothStep t)*f t+centeredSmoothStep t*g t] + +lemma graphJoinCurve_smooth {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) : + ContDiff ℝ ∞ (graphJoinCurve f g) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · exact contDiff_id + · exact ((contDiff_const.sub centeredSmoothStep_smooth).mul hf).add + (centeredSmoothStep_smooth.mul hg) + +lemma graphJoinCurve_injective (f g : ℝ → ℝ) : Function.Injective (graphJoinCurve f g) := by + intro x y h + exact congrFun h 0 + +lemma graphJoinCurve_regular {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (t : ℝ) : + Function.Injective (mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (graphJoinCurve f g) t) := by + have hC := (graphJoinCurve_smooth hf hg).differentiable (by simp) t + have hc0 := hasDerivAt_pi.mp hC.hasDerivAt 0 + have hd : deriv (graphJoinCurve f g) t 0 = 1 := hc0.unique (hasDerivAt_id t) + apply plane_curve_regular_of_hasDerivAt hC.hasDerivAt (i := 0) + rw [hd] + norm_num + +theorem graph_join_arc {f g : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) : + ∃ P : SmoothCompactArc 𝓘(ℝ,Base) Base, + P.start = -2 ∧ P.finish = 2 ∧ P.curve = graphJoinCurve f g ∧ + P.curve =ᶠ[𝓝 P.start] (fun t => ![t,f t]) ∧ + P.curve =ᶠ[𝓝 P.finish] (fun t => ![t,g t]) := by + let P : SmoothCompactArc 𝓘(ℝ,Base) Base := + ⟨graphJoinCurve f g,-2,2,by norm_num,univ,isOpen_univ,subset_univ _, + (graphJoinCurve_smooth hf hg).contMDiff.contMDiffOn, + fun t _ => graphJoinCurve_regular hf hg t,(graphJoinCurve_injective f g).injOn⟩ + refine ⟨P,rfl,rfl,rfl,?_,?_⟩ + · filter_upwards [eventually_lt_nhds (show (-2:ℝ) < -1 by norm_num)] with t ht + simp [P,graphJoinCurve,centeredSmoothStep_zero ht.le] + · filter_upwards [eventually_gt_nhds (show (1:ℝ) < 2 by norm_num)] with t ht + simp [P,graphJoinCurve,centeredSmoothStep_one ht.le] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/HalfLineCompactArc.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/HalfLineCompactArc.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fcb143aa99e854f998d5b5f83c15215bbc2b3fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/HalfLineCompactArc.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EmbeddedOpenSubset + +namespace OAI + +/-! Compact arcs at a half-line chart, including the boundary point in +an open neighborhood of the ambient curve. -/ +noncomputable section +open Set Filter Metric Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem half_line_compact_arc_data (c : OpenPartialHomeomorph X (Ici (0:ℝ))) {p : X} + (hp : p ∈ c.source) (hzero : c p = ⟨0,by simp⟩) : + ∃ (A : CompactCurveArc X) (V : Set X), IsOpen V ∧ p ∈ V ∧ V ⊆ range A.map ∧ + A.map ⟨A.left,le_rfl,A.ordered.le⟩ = p ∧ + V \ {p} = A.openSubarc A.left A.right ∧ V ⊆ c.source := by + let z : Ici (0:ℝ) := ⟨0,by simp⟩ + have hcz : c p = z := hzero + have hz : z ∈ c.target := by rw [← hcz]; exact c.map_source hp + obtain ⟨r,hr,hrt⟩ := nhds_basis_closedBall.mem_iff.mp (c.open_target.mem_nhds hz) + have hT (t : Ici (0:ℝ)) (ht : (t:ℝ) ≤ r) : t ∈ c.target := by + apply hrt + change dist (t:ℝ) (0:ℝ) ≤ r + have ht0 : 0 ≤ (t:ℝ) := t.property + simpa only [Real.dist_eq,sub_zero,abs_of_nonneg ht0] using ht + let j : Icc (0:ℝ) r → Ici (0:ℝ) := fun t => ⟨t.val,t.property.1⟩ + have hj : Continuous j := continuous_subtype_val.subtype_mk _ + let γ : Icc (0:ℝ) r → X := fun t => c.symm (j t) + have hγcont : Continuous γ := by + apply continuous_iff_continuousAt.mpr + intro t + exact (c.symm.continuousAt (hT (j t) t.property.2)).comp hj.continuousAt + have hγinj : Function.Injective γ := by + intro s t hst + have he := c.symm.injOn (hT (j s) s.property.2) (hT (j t) t.property.2) hst + exact Subtype.ext (congrArg (fun u : Ici (0:ℝ) => (u:ℝ)) he) + let O : Set (Ici (0:ℝ)) := {t | 0 < (t:ℝ) ∧ (t:ℝ) < r} + have hO : IsOpen O := isOpen_Ioo.preimage continuous_subtype_val + have hOT : O ⊆ c.target := fun t ht => hT t ht.2.le + have heq : γ '' {t | 0 < (t:ℝ) ∧ (t:ℝ) < r} = c.symm '' O := by + ext x + constructor + · rintro ⟨t,ht,rfl⟩ + exact ⟨j t,ht,rfl⟩ + · rintro ⟨t,ht,rfl⟩ + exact ⟨⟨t.val,ht.1.le,ht.2.le⟩,ht,rfl⟩ + let A : CompactCurveArc X := ⟨0,r,hr,γ,hγcont.isClosedEmbedding hγinj, + by rw [heq]; exact c.isOpen_image_symm_of_subset_target hO hOT⟩ + let W : Set (Ici (0:ℝ)) := {t | (t:ℝ) < r} + have hW : IsOpen W := isOpen_Iio.preimage continuous_subtype_val + have hWT : W ⊆ c.target := fun t ht => hT t ht.le + refine ⟨A,c.symm '' W,c.isOpen_image_symm_of_subset_target hW hWT,?_,?_,?_,?_,?_⟩ + · refine ⟨z,hr,?_⟩ + rw [← hcz,c.left_inv hp] + · rintro x ⟨t,ht,rfl⟩ + exact ⟨⟨t.val,t.property,ht.le⟩,rfl⟩ + + · change c.symm (j ⟨0,le_rfl,hr.le⟩) = p + change c.symm z = p + rw [← hcz,c.left_inv hp] + · apply Subset.antisymm + · rintro x ⟨⟨t,ht,rfl⟩,hne⟩ + have htpos : 0 < (t:ℝ) := by + have ht0 : 0 ≤ (t:ℝ) := t.property + apply lt_of_le_of_ne ht0 + intro he + have htz : t = z := Subtype.ext he.symm + apply hne + change c.symm t = p + rw [htz,← hcz,c.left_inv hp] + exact ⟨⟨t.val,t.property,ht.le⟩,⟨htpos,ht⟩,rfl⟩ + · rintro x ⟨t,ht,rfl⟩ + refine ⟨⟨j t,ht.2,rfl⟩,?_⟩ + intro he + change c.symm (j t) = p at he + have heq : j t = z := c.symm.injOn (hT (j t) t.property.2) hz (by + rw [he,← hcz,c.left_inv hp]) + have hv := congrArg (fun s : Ici (0:ℝ) => (s:ℝ)) heq + have ht0 : (t:ℝ) = 0 := hv + exact (ne_of_gt ht.1) ht0 + · rintro x ⟨t,ht,rfl⟩ + exact c.map_target (hWT ht) + +theorem half_line_compact_arc (c : OpenPartialHomeomorph X (Ici (0:ℝ))) {p : X} + (hp : p ∈ c.source) (hzero : c p = ⟨0,by simp⟩) : + ∃ (A : CompactCurveArc X) (V : Set X), IsOpen V ∧ p ∈ V ∧ V ⊆ range A.map := by + obtain ⟨A,V,hV,hpV,hAV,_,_,_⟩ := half_line_compact_arc_data c hp hzero + exact ⟨A,V,hV,hpV,hAV⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/HomotopyCollarDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/HomotopyCollarDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..33895172d57dcdd7b49ab3f3c27371a6f4c5d5f2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/HomotopyCollarDerivative.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SlowCollarCutoff +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! The exact derivative of a collar whose transverse vector follows a + prescribed smooth homotopy; only u and u times the cutoff derivative + enter as perturbation parameters. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +def homotopyCollar (c : ℝ → W) (V : ℝ × ℝ → W) (χ : ℝ → ℝ) (x : Base) : W := + c (x 1) + x 0 • V (χ (x 0),x 1) + +def homotopyCollarJet (c : ℝ → W) (V : ℝ × ℝ → W) (s t u w : ℝ) : Base →L[ℝ] W := + (ContinuousLinearMap.proj 1).smulRight (deriv c t) + + (ContinuousLinearMap.proj 0).smulRight (V (s,t)) + + (ContinuousLinearMap.proj 0).smulRight (w • fderiv ℝ V (s,t) (1,0)) + + (ContinuousLinearMap.proj 1).smulRight (u • fderiv ℝ V (s,t) (0,1)) + +lemma homotopyCollar_smooth {c : ℝ → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + (hc : ContDiff ℝ ∞ c) (hV : ContDiff ℝ ∞ V) (hχ : ContDiff ℝ ∞ χ) : + ContDiff ℝ ∞ (homotopyCollar c V χ) := by + exact (hc.comp (contDiff_apply ℝ ℝ 1)).add + ((contDiff_apply ℝ ℝ 0).smul (hV.comp + ((hχ.comp (contDiff_apply ℝ ℝ 0)).prodMk (contDiff_apply ℝ ℝ 1)))) + +lemma homotopyCollarJet_continuous {c : ℝ → W} {V : ℝ × ℝ → W} + (hc : ContDiff ℝ ∞ c) (hV : ContDiff ℝ ∞ V) : + Continuous (fun z : (ℝ × ℝ) × Base => homotopyCollarJet c V z.1.1 z.1.2 (z.2 0) (z.2 1)) := by + have hdc' : ContDiff ℝ ∞ (deriv c) := hc.deriv' + have hdc : Continuous (deriv c) := hdc'.continuous + have hdV : Continuous (fderiv ℝ V) := hV.continuous_fderiv (by simp) + unfold homotopyCollarJet + fun_prop + +lemma homotopyCollar_fderiv {c : ℝ → W} {V : ℝ × ℝ → W} {χ : ℝ → ℝ} + (hc : ContDiff ℝ ∞ c) (hV : ContDiff ℝ ∞ V) (hχ : ContDiff ℝ ∞ χ) (x : Base) : + fderiv ℝ (homotopyCollar c V χ) x = + homotopyCollarJet c V (χ (x 0)) (x 1) (x 0) (x 0*deriv χ (x 0)) := by + have h0 := hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) x + have h1 := hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) x + have hC := ((hc.differentiable (by simp) _).hasDerivAt.hasFDerivAt).comp x h1 + have hX := ((hχ.differentiable (by simp) _).hasDerivAt.hasFDerivAt).comp x h0 + have hp := hX.prodMk h1 + have hvec := ((hV.differentiable (by simp) _).hasFDerivAt).comp x hp + have hd := hC.add (h0.smul hvec) + change HasFDerivAt (homotopyCollar c V χ) _ x at hd + rw [hd.fderiv] + apply ContinuousLinearMap.ext + intro v + have hv : (v 0*deriv χ (x 0),v 1) = + (v 0*deriv χ (x 0)) • ((1,0) : ℝ × ℝ) + v 1 • ((0,1) : ℝ × ℝ) := by + ext <;> simp + simp only [homotopyCollarJet, add_apply, + smul_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.proj_apply, ContinuousLinearMap.prod_apply, + ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.toSpanSingleton_apply, + Function.comp_apply, smul_eq_mul] + change v 1 • deriv c (x 1) + + (x 0 • fderiv ℝ V (χ (x 0),x 1) (v 0 * deriv χ (x 0),v 1) + + v 0 • V (χ (x 0),x 1)) = + v 1 • deriv c (x 1) + v 0 • V (χ (x 0),x 1) + + v 0 • ((x 0 * deriv χ (x 0)) • fderiv ℝ V (χ (x 0),x 1) (1,0)) + + v 1 • (x 0 • fderiv ℝ V (χ (x 0),x 1) (0,1)) + rw [hv,map_add,map_smul,map_smul] + module + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/InteriorRulingSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/InteriorRulingSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..202a6bd74fa6c8df58396fe704f19a99b0fce708 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/InteriorRulingSupport.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RuledCrosscapStrip +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSupport + +namespace OAI + +/-! A compact longitudinal cutoff in the regular interior has a fixed +compact regular rectangle containing all sufficiently narrow corrections. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.interior_ruling_support (S : CrosscapCoordinateStrip A) + {η : ℝ → ℝ} (hc : HasCompactSupport η) + (hs : tsupport η ⊆ Ioo A.arc.start A.arc.finish) : + ∃ (δ : ℝ) (K : Set Base), 0 < δ ∧ IsCompact K ∧ K ⊆ S.domain ∧ + (∀ x ∈ K, Function.Injective (fderiv ℝ S.model x)) ∧ + ∀ r : ℝ, 0 < r → r ≤ δ → tsupport (narrowedRuling S.model η r) ⊆ K := by + obtain ⟨δ,hδ,hrect⟩ := S.ruled_rectangle + let T : ℝ × ℝ → Base := fun z => ![z.1,z.2] + let K := T '' (Icc (-δ) δ ×ˢ tsupport η) + have hT : Continuous T := by + apply continuous_pi + intro i + fin_cases i + · exact continuous_fst + · exact continuous_snd + have hK : IsCompact K := (isCompact_Icc.prod hc).image hT + have hpoints : ∀ x ∈ K, x ∈ S.domain ∧ Function.Injective (fderiv ℝ S.model x) := by + rintro x ⟨⟨u,t⟩,⟨hu,ht⟩,rfl⟩ + have hti := hs ht + have htb : t ∈ Icc (A.arc.start-δ) (A.arc.finish+δ) := + ⟨by linarith [hti.1],by linarith [hti.2]⟩ + obtain ⟨hdom,hI⟩ := hrect 0 (by norm_num) u hu t htb + have hneq : (![u,t] : Base) ≠ ![0,A.arc.start] ∧ (![u,t] : Base) ≠ ![0,A.arc.finish] := by + constructor <;> intro he + · have hh := congrFun he 1 + exact hti.1.ne' hh + · have hh := congrFun he 1 + exact hti.2.ne hh + have hnew := hI.mpr hneq + have he : rulingHomotopy S.model 0 = S.model := by + funext y + simp [rulingHomotopy,linearMapHomotopy] + rw [he] at hnew + exact ⟨hdom,hnew⟩ + refine ⟨δ,K,hδ,hK,fun x hx => (hpoints x hx).1,fun x hx => (hpoints x hx).2,?_⟩ + intro r hr hrδ x hx + obtain ⟨h0,h1⟩ := narrowedRuling_support S.model η hr hx + refine ⟨(x 0,x 1),⟨?_,h1⟩,?_⟩ + · exact abs_le.mp (h0.trans hrδ) + · ext i; fin_cases i <;> rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridge.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c0d8d9a06f92a45456ed3c7c3104488b42b5b77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridge.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.ReturningCornerArc +import OAI.Geometry.SurfaceImmersion.Whitney.AdvancingCornerArc +import OAI.Geometry.SurfaceImmersion.Whitney.CornerChartReflection +import OAI.Geometry.SurfaceImmersion.Whitney.CornerParameterOrientation + +namespace OAI + +/-! Every actual corner of the finite embedded source path admits a +small regular embedded bridge with oriented smooth attachment germs. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} (γ : Path p q) (t : ℝ) (O : Set M) + +structure LocalCornerBridge where + arc : SmoothCompactArc planeModel M + left : ℝ + right : ℝ + left_pos : 0 < left + left_lt : left < t + lt_right : t < right + right_lt_one : right < 1 + leftParameter : ℝ → ℝ + rightParameter : ℝ → ℝ + left_smooth : ContDiff ℝ ∞ leftParameter + right_smooth : ContDiff ℝ ∞ rightParameter + left_value : leftParameter arc.start = left + right_value : rightParameter arc.finish = right + left_forward : 0 < deriv leftParameter arc.start + right_forward : 0 < deriv rightParameter arc.finish + left_germ : arc.curve =ᶠ[𝓝 arc.start] γ.extend ∘ leftParameter + right_germ : arc.curve =ᶠ[𝓝 arc.finish] γ.extend ∘ rightParameter + image_subset : MapsTo arc.curve (Icc arc.start arc.finish) O + +variable {γ t O} +namespace RegularPathCornerChart + +theorem returning_bridge (C : RegularPathCornerChart γ t) (hi : Function.Injective γ) + (hl : StrictAnti C.leftParameter) (hr : StrictMono C.rightParameter) + (hO : IsOpen O) (htO : γ.extend t ∈ O) : Nonempty (LocalCornerBridge γ t O) := by + obtain ⟨P,a,b,l,r,hPs,hPf,hb,hLl,hlt,htr,hrU,hPleft,hPright,hPO,hPc,hPL,hPR⟩ := + C.returning_corner_arc hi hl hr hO htO + have hlx : C.leftParameter l = a+b*P.start^2 := by + have H := (hPc P.start (left_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPleft,(C.left_chart l ⟨hLl.le,hlt.le⟩).2] at H + exact congrFun H 0 + have hrx : C.rightParameter r = a+b*P.finish^2 := by + have H := (hPc P.finish (right_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPright,(C.right_chart r ⟨htr.le,hrU.le⟩).2] at H + exact congrFun H 0 + let L : ℝ → ℝ := fun s => C.leftParameter.symm (a+b*s^2) + let R : ℝ → ℝ := fun s => C.rightParameter.symm (a+b*s^2) + have hLs : ContDiff ℝ ∞ L := C.left_inverse_smooth.comp (by fun_prop) + have hRs : ContDiff ℝ ∞ R := C.right_inverse_smooth.comp (by fun_prop) + refine ⟨⟨P,l,r,C.lower_pos.trans hLl,hlt,htr,hrU.trans C.upper_lt_one, + L,R,hLs,hRs,?_,?_,?_,?_,hPL,hPR,hPO⟩⟩ + · change C.leftParameter.symm (a+b*P.start^2) = l + rw [← hlx,C.leftParameter.symm_apply_apply] + · change C.rightParameter.symm (a+b*P.finish^2) = r + rw [← hrx,C.rightParameter.symm_apply_apply] + · rw [hPs] + exact returning_left_parameter_deriv_pos C.leftParameter C.left_parameter_smooth + C.left_inverse_smooth hl a hb + · rw [hPf] + exact returning_right_parameter_deriv_pos C.rightParameter C.right_parameter_smooth + C.right_inverse_smooth hr a hb + +theorem advancing_bridge (C : RegularPathCornerChart γ t) + (hl : StrictMono C.leftParameter) (hr : StrictMono C.rightParameter) + (hO : IsOpen O) (htO : γ.extend t ∈ O) : Nonempty (LocalCornerBridge γ t O) := by + obtain ⟨P,a,b,l,r,hPs,hPf,hb,hLl,hlt,htr,hrU,hPleft,hPright,hPO,hPc,hPL,hPR⟩ := + C.advancing_corner_arc hl hr hO htO + have hlx : C.leftParameter l = a+b*P.start := by + have H := (hPc P.start (left_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPleft,(C.left_chart l ⟨hLl.le,hlt.le⟩).2] at H + exact congrFun H 0 + have hrx : C.rightParameter r = a+b*P.finish := by + have H := (hPc P.finish (right_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPright,(C.right_chart r ⟨htr.le,hrU.le⟩).2] at H + exact congrFun H 0 + let L : ℝ → ℝ := fun s => C.leftParameter.symm (a+b*s) + let R : ℝ → ℝ := fun s => C.rightParameter.symm (a+b*s) + have hLs : ContDiff ℝ ∞ L := C.left_inverse_smooth.comp (by fun_prop) + have hRs : ContDiff ℝ ∞ R := C.right_inverse_smooth.comp (by fun_prop) + refine ⟨⟨P,l,r,C.lower_pos.trans hLl,hlt,htr,hrU.trans C.upper_lt_one, + L,R,hLs,hRs,?_,?_,?_,?_,hPL,hPR,hPO⟩⟩ + · change C.leftParameter.symm (a+b*P.start) = l + rw [← hlx,C.leftParameter.symm_apply_apply] + · change C.rightParameter.symm (a+b*P.finish) = r + rw [← hrx,C.rightParameter.symm_apply_apply] + · exact advancing_parameter_deriv_pos C.leftParameter C.left_parameter_smooth + C.left_inverse_smooth hl a hb P.start + · exact advancing_parameter_deriv_pos C.rightParameter C.right_parameter_smooth + C.right_inverse_smooth hr a hb P.finish + +end RegularPathCornerChart + +variable [IsManifold planeModel ∞ M] + +theorem local_corner_bridge (hγ : FiniteRegularPath planeModel γ) (hi : Function.Injective γ) + (ht : t ∈ Ioo (0:ℝ) 1) (hO : IsOpen O) (htO : γ.extend t ∈ O) : + Nonempty (LocalCornerBridge γ t O) := by + obtain ⟨C⟩ := regular_path_corner_chart hγ hi ht + rcases C.left_monotone with hl | hl <;> rcases C.right_monotone with hr | hr + · exact C.advancing_bridge hl hr hO htO + · exact C.reflect.returning_bridge hi (C.reflect_left_strictAnti hl) + (C.reflect_right_strictMono hr) hO htO + · exact C.returning_bridge hi hl hr hO htO + · exact C.reflect.advancing_bridge (C.reflect_left_strictMono hl) + (C.reflect_right_strictMono hr) hO htO + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridgeSeparation.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridgeSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dff3d7d2803e2ce0d7e79bd9036289c4c9f0bc0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalCornerBridgeSeparation.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.LocalCornerBridge +import OAI.Geometry.SurfaceImmersion.Whitney.CornerArcSeparation + +namespace OAI + +/-! Retaining actual old-branch separation with the constructed corner bridge. -/ +noncomputable section +open Set Filter Manifold unitInterval +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {p q : M} {γ : Path p q} {t : ℝ} {O : Set M} +namespace RegularPathCornerChart + +theorem returning_bridge_local_separation (C : RegularPathCornerChart γ t) (hi : Function.Injective γ) + (hl : StrictAnti C.leftParameter) (hr : StrictMono C.rightParameter) + (hO : IsOpen O) (htO : γ.extend t ∈ O) : + ∃ B : LocalCornerBridge γ t O, C.lower < B.left ∧ B.right < C.upper ∧ + ∀ s ∈ Icc B.arc.start B.arc.finish, ∀ u ∈ Ico C.lower B.left ∪ Ioc B.right C.upper, + B.arc.curve s ≠ γ.extend u := by + obtain ⟨P,a,b,l,r,hPs,hPf,hb,hLl,hlt,htr,hrU,hPleft,hPright,hPO,hPc,hPL,hPR⟩ := + C.returning_corner_arc hi hl hr hO htO + have hlx : C.leftParameter l = a+b*P.start^2 := by + have H := (hPc P.start (left_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPleft,(C.left_chart l ⟨hLl.le,hlt.le⟩).2] at H + exact congrFun H 0 + have hrx : C.rightParameter r = a+b*P.finish^2 := by + have H := (hPc P.finish (right_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPright,(C.right_chart r ⟨htr.le,hrU.le⟩).2] at H + exact congrFun H 0 + let L : ℝ → ℝ := fun s => C.leftParameter.symm (a+b*s^2) + let R : ℝ → ℝ := fun s => C.rightParameter.symm (a+b*s^2) + have hLs : ContDiff ℝ ∞ L := C.left_inverse_smooth.comp (by fun_prop) + have hRs : ContDiff ℝ ∞ R := C.right_inverse_smooth.comp (by fun_prop) + refine ⟨⟨P,l,r,C.lower_pos.trans hLl,hlt,htr,hrU.trans C.upper_lt_one, + L,R,hLs,hRs,?_,?_,?_,?_,hPL,hPR,hPO⟩,hLl,hrU,?_⟩ + · change C.leftParameter.symm (a+b*P.start^2) = l + rw [← hlx,C.leftParameter.symm_apply_apply] + · change C.rightParameter.symm (a+b*P.finish^2) = r + rw [← hrx,C.rightParameter.symm_apply_apply] + · rw [hPs] + exact returning_left_parameter_deriv_pos C.leftParameter C.left_parameter_smooth + C.left_inverse_smooth hl a hb + · rw [hPf] + exact returning_right_parameter_deriv_pos C.rightParameter C.right_parameter_smooth + C.right_inverse_smooth hr a hb + + · apply C.returning_arc_local_separation P hl hr hb hlt htr hPs hPf + · rw [hlx,hPs] + ring + · rw [hrx,hPf] + ring + · intro s hs + exact congrFun (hPc s hs).2 0 + +theorem advancing_bridge_local_separation (C : RegularPathCornerChart γ t) + (hl : StrictMono C.leftParameter) (hr : StrictMono C.rightParameter) + (hO : IsOpen O) (htO : γ.extend t ∈ O) : + ∃ B : LocalCornerBridge γ t O, C.lower < B.left ∧ B.right < C.upper ∧ + ∀ s ∈ Icc B.arc.start B.arc.finish, ∀ u ∈ Ico C.lower B.left ∪ Ioc B.right C.upper, + B.arc.curve s ≠ γ.extend u := by + obtain ⟨P,a,b,l,r,hPs,hPf,hb,hLl,hlt,htr,hrU,hPleft,hPright,hPO,hPc,hPL,hPR⟩ := + C.advancing_corner_arc hl hr hO htO + have hlx : C.leftParameter l = a+b*P.start := by + have H := (hPc P.start (left_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPleft,(C.left_chart l ⟨hLl.le,hlt.le⟩).2] at H + exact congrFun H 0 + have hrx : C.rightParameter r = a+b*P.finish := by + have H := (hPc P.finish (right_mem_Icc.mpr P.start_lt_finish.le)).2 + rw [hPright,(C.right_chart r ⟨htr.le,hrU.le⟩).2] at H + exact congrFun H 0 + let L : ℝ → ℝ := fun s => C.leftParameter.symm (a+b*s) + let R : ℝ → ℝ := fun s => C.rightParameter.symm (a+b*s) + have hLs : ContDiff ℝ ∞ L := C.left_inverse_smooth.comp (by fun_prop) + have hRs : ContDiff ℝ ∞ R := C.right_inverse_smooth.comp (by fun_prop) + refine ⟨⟨P,l,r,C.lower_pos.trans hLl,hlt,htr,hrU.trans C.upper_lt_one, + L,R,hLs,hRs,?_,?_,?_,?_,hPL,hPR,hPO⟩,hLl,hrU,?_⟩ + · change C.leftParameter.symm (a+b*P.start) = l + rw [← hlx,C.leftParameter.symm_apply_apply] + · change C.rightParameter.symm (a+b*P.finish) = r + rw [← hrx,C.rightParameter.symm_apply_apply] + · exact advancing_parameter_deriv_pos C.leftParameter C.left_parameter_smooth + C.left_inverse_smooth hl a hb P.start + · exact advancing_parameter_deriv_pos C.rightParameter C.right_parameter_smooth + C.right_inverse_smooth hr a hb P.finish + + · apply C.advancing_arc_local_separation P hl hr hb hlt htr hPs hPf + · rw [hlx,hPs] + ring + · rw [hrx,hPf] + ring + · intro s hs + exact congrFun (hPc s hs).2 0 + +end RegularPathCornerChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalDoubleCurveLift.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalDoubleCurveLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f123c8b1682df6fc3dcf264dec3246bd6b0712a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LocalDoubleCurveLift.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothDoubleAtlas + +namespace OAI + +/-! A curve locally in the double locus has a continuous local lift to +its actual subtype, with an arbitrary fixed continuation outside the germ. -/ +noncomputable section +open Set Filter +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] +variable {f : M → ProjectionTarget 3} + +theorem local_double_curve_lift {C : ℝ → M × M} {x : ℝ} + (hC : ContinuousAt C x) (p : surfaceDoublePairs f) (hp : p.val = C x) + (hgood : ∀ᶠ t in 𝓝 x, C t ∈ surfaceDoublePairs f) : + ∃ γ : ℝ → surfaceDoublePairs f, ContinuousAt γ x ∧ γ x = p ∧ + (fun t => (γ t).val) =ᶠ[𝓝 x] C := by + classical + let γ : ℝ → surfaceDoublePairs f := fun t => + if ht : C t ∈ surfaceDoublePairs f then ⟨C t,ht⟩ else p + have he : (fun t => (γ t).val) =ᶠ[𝓝 x] C := by + filter_upwards [hgood] with t ht + dsimp only [γ] + rw [dite_eq_left ht] + have hcont : ContinuousAt (fun t => (γ t).val) x := hC.congr_of_eventuallyEq he + have hγ : ContinuousAt γ x := (Topology.IsInducing.subtypeVal.continuousAt_iff).mpr hcont + refine ⟨γ,hγ,?_,he⟩ + apply Subtype.ext + exact he.eq_of_nhds.trans hp.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/LoopDensityArcTriangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LoopDensityArcTriangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a1d502527d90c771232b39a6a2bde6b1c7cf07b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/LoopDensityArcTriangle.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityBumpSelection + +namespace OAI + +/-! A nondegenerate three-point barycenter inside a symmetric circular arc. -/ +noncomputable section +open scoped Matrix BigOperators + +namespace ClosedSurfaceR4.LoopDensity + +def arcTriangle (q s : ℝ) : Fin 3 → Plane := ![![1, 0], ![q, s], ![q, -s]] + +def arcWeights (q m : ℝ) : Moments := + ![(m - q) / (1 - q), (1 - m) / (2 * (1 - q)), (1 - m) / (2 * (1 - q))] + +lemma arcWeights_pos {q m : ℝ} (hqm : q < m) (hm : m < 1) (i : Fin 3) : + 0 < arcWeights q m i := by + have hq : 0 < 1 - q := by linarith + have hnum : 0 < m - q := sub_pos.mpr hqm + have hm' : 0 < 1 - m := sub_pos.mpr hm + fin_cases i + · exact div_pos hnum hq + · exact div_pos hm' (mul_pos (by norm_num) hq) + · exact div_pos hm' (mul_pos (by norm_num) hq) + +lemma arcTriangle_barycenter {q m : ℝ} (hq : q ≠ 1) (s : ℝ) : + columnOperator (fun i => augment (arcTriangle q s i)) (arcWeights q m) = augment ![m, 0] := by + have hd : 1 - q ≠ 0 := sub_ne_zero.mpr (Ne.symm hq) + ext i + fin_cases i <;> simp [columnOperator, arcTriangle, arcWeights, augment, Fin.sum_univ_three] <;> + field_simp [hd] <;> ring + +lemma arcTriangle_invertible {q s : ℝ} (hq : q ≠ 1) (hs : s ≠ 0) : + (columnOperator (fun i => augment (arcTriangle q s i))).IsInvertible := by + let M : Matrix (Fin 3) (Fin 3) ℝ := + Matrix.of (fun i j => augment (arcTriangle q s j) i) + have hdet : M.det = 2 * s * (1 - q) := by + rw [Matrix.det_fin_three M] + norm_num [M, arcTriangle, augment] + ring + have hd : M.det ≠ 0 := by + rw [hdet] + exact mul_ne_zero (mul_ne_zero (by norm_num) hs) (sub_ne_zero.mpr (Ne.symm hq)) + have hunit : IsUnit M := (Matrix.isUnit_iff_isUnit_det M).mpr (isUnit_iff_ne_zero.mpr hd) + have heval (x : Moments) : M.mulVec x = columnOperator (fun i => augment (arcTriangle q s i)) x := by + ext i + simp [M, Matrix.mulVec, dotProduct, columnOperator, mul_comm] + have hi : Function.Injective (columnOperator (fun i => augment (arcTriangle q s i))) := by + intro x y h + apply (Matrix.mulVec_injective_iff_isUnit.mpr hunit) + simpa only [heval] using h + have hsurj := LinearMap.surjective_of_injective + (f := (columnOperator (fun i => augment (arcTriangle q s i))).toLinearMap) hi + exact ⟨(LinearEquiv.ofBijective _ ⟨hi, hsurj⟩).toContinuousLinearEquiv, rfl⟩ + +end ClosedSurfaceR4.LoopDensity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..27d1015211265ce50571cf2df145e994f3287afc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingBounds.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSupport +import OAI.Geometry.SurfaceImmersion.Atlas.FlatTransverseCutoff + +namespace OAI + +/-! The supported ruled correction tends to zero globally in C1. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem narrowedRuling_C1_bound {f : Base → ProjectionTarget 3} {η : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hη : ContDiff ℝ ∞ η) (hc : HasCompactSupport η) : + ∃ D : ℝ, 0 < D ∧ ∀ r : ℝ, 0 < r → r ≤ 1 → ∀ x : Base, + ‖narrowedRuling f η r x‖ ≤ D*r ∧ ‖fderiv ℝ (narrowedRuling f η r) x‖ ≤ D*r := by + obtain ⟨ρ,hρ,hsupp⟩ := narrowedRuling_fixed_ball f hc + let R := rulingRemainder f η + have hR : ContDiff ℝ ∞ R := rulingRemainder_smooth hf hη + obtain ⟨C,hC⟩ := (isCompact_closedBall (0 : Base) ρ).exists_bound_of_continuousOn + ((hR.fderiv_right (m := ∞) (by simp)).continuous_fderiv (by simp)).continuousOn + have hbound : ∀ x ∈ closedBall (0 : Base) ρ, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ |C| := + fun x hx => (hC x hx).trans (le_abs_self C) + obtain ⟨B,hB,hcut⟩ := flat_transverse_cutoff_bound + let D := (B+1)*(|C|+1) + have hD : 0 < D := by dsimp [D]; positivity + have hCD : |C| ≤ D := by dsimp [D]; nlinarith [abs_nonneg C] + have hBCD : (B+1)*|C| ≤ D := by dsimp [D]; nlinarith + refine ⟨D,hD,?_⟩ + intro r hr hr1 x + by_cases hx : x ∈ closedBall (0 : Base) ρ + · obtain ⟨hv,hd⟩ := hcut R hR (rulingRemainder_axis f η) + (rulingRemainder_first_jet hf hη) ρ |C| (abs_nonneg C) hbound r hr x hx + constructor + · exact hv.trans (by nlinarith [mul_nonneg (abs_nonneg C) hr.le]) + · exact hd.trans (mul_le_mul_of_nonneg_right hBCD hr.le) + · have hn : x ∉ tsupport (narrowedRuling f η r) := fun ht => hx (hsupp r hr hr1 ht) + have he := notMem_tsupport_iff_eventuallyEq.mp hn + rw [he.self_of_nhds,he.fderiv_eq] + simp only [Pi.zero_apply,norm_zero,fderiv_zero] + exact ⟨mul_nonneg hD.le hr.le,mul_nonneg hD.le hr.le⟩ + +theorem narrowedRuling_small {f : Base → ProjectionTarget 3} {η : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hη : ContDiff ℝ ∞ η) (hc : HasCompactSupport η) + {ε ρ : ℝ} (hε : 0 < ε) (hρ : 0 < ρ) : + ∃ r : ℝ, 0 < r ∧ r ≤ ρ ∧ r ≤ 1 ∧ + ∀ x : Base, ‖narrowedRuling f η r x‖ < ε ∧ + ‖fderiv ℝ (narrowedRuling f η r) x‖ < ε := by + obtain ⟨D,hD,hbound⟩ := narrowedRuling_C1_bound hf hη hc + let r := min (min ρ 1) (ε/(2*D)) + have hr : 0 < r := lt_min (lt_min hρ zero_lt_one) (div_pos hε (by positivity)) + have hrρ : r ≤ ρ := (min_le_left _ _).trans (min_le_left _ _) + have hr1 : r ≤ 1 := (min_le_left _ _).trans (min_le_right _ _) + have hDr : D*r < ε := by + have he := (mul_le_mul_of_nonneg_left (min_le_right (min ρ 1) (ε/(2*D))) hD.le) + have hid : D*(ε/(2*D)) = ε/2 := by field_simp + rw [hid] at he + linarith + exact ⟨r,hr,hrρ,hr1,fun x => ⟨((hbound r hr hr1 x).1).trans_lt hDr, + ((hbound r hr hr1 x).2).trans_lt hDr⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4ee6b9669e1102e22d2af26022a6a9ada29b7a0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NarrowedRulingJets.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisFlatSecondJet +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSupport + +namespace OAI + +/-! The supported ruled correction retains the actual axis and all + first and longitudinal second derivatives, for every cutoff width. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma narrowedRuling_axis (f : Base → ProjectionTarget 3) (η : ℝ → ℝ) (r t : ℝ) : + narrowedRuling f η r (crosscapAxis t) = 0 := by + simp [narrowedRuling,rulingRemainder_axis] + +lemma narrowedRuling_first_jet {f : Base → ProjectionTarget 3} {η : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hη : ContDiff ℝ ∞ η) (r t : ℝ) : + fderiv ℝ (narrowedRuling f η r) (crosscapAxis t) = 0 := by + have hd := ((transverseCutoff_smooth r).differentiable (by simp) (crosscapAxis t)).hasFDerivAt.smul + ((rulingRemainder_smooth hf hη).differentiable (by simp) (crosscapAxis t)).hasFDerivAt + change HasFDerivAt (narrowedRuling f η r) _ (crosscapAxis t) at hd + rw [hd.fderiv,rulingRemainder_first_jet hf hη,rulingRemainder_axis] + simp + +lemma narrowedRuling_retained_jets {f : Base → ProjectionTarget 3} {η : ℝ → ℝ} + (hf : ContDiff ℝ ∞ f) (hη : ContDiff ℝ ∞ η) (r t : ℝ) : + (f+narrowedRuling f η r) (crosscapAxis t) = f (crosscapAxis t) ∧ + fderiv ℝ (f+narrowedRuling f η r) (crosscapAxis t) = fderiv ℝ f (crosscapAxis t) ∧ + axisDirectionJet (f+narrowedRuling f η r) (crosscapAxis t) = axisDirectionJet f (crosscapAxis t) := by + exact ⟨by simp only [Pi.add_apply,narrowedRuling_axis,add_zero], + axis_flat_add_first hf (narrowedRuling_smooth hf hη r) (narrowedRuling_first_jet hf hη r) t, + axis_flat_add_direction hf (narrowedRuling_smooth hf hη r) (narrowedRuling_first_jet hf hη r) t⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/NondegenerateCrosscapDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NondegenerateCrosscapDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..11a99e6eee6da453c15ad3c86e143b2789f6016e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NondegenerateCrosscapDefect.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapCoordinateRegularity +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapNormalDefect + +namespace OAI + +/-! The actual pair has exactly two nondegenerate normal-defect zeros +in a single rectangular coordinate neighborhood. -/ +noncomputable section +open Set Filter Matrix Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {f : M → ProjectionTarget 3} {p q : M} {A : CrosscapConnectingArc f p q} + +theorem CrosscapCoordinateStrip.nondegenerate_normal_defect (S : CrosscapCoordinateStrip A) + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) : + ∃ (a : Fin 3 → ℝ) (δ : ℝ) (U : Set Base), 0 < δ ∧ IsOpen U ∧ U ⊆ S.domain ∧ + (∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (A.arc.start-δ) (A.arc.finish+δ), (![x,t] : Base) ∈ U) ∧ + ContDiffOn ℝ ∞ (normalDefect S.model a) U ∧ + (∀ x ∈ U, normalDefect S.model a x = 0 ↔ + x = ![0,A.arc.start] ∨ x = ![0,A.arc.finish]) ∧ + Function.Bijective (fderiv ℝ (normalDefect S.model a) (![0,A.arc.start] : Base)) ∧ + Function.Bijective (fderiv ℝ (normalDefect S.model a) (![0,A.arc.finish] : Base)) := by + classical + obtain ⟨a,ha⟩ := exists_curve_transverse_vector S.transverseVector S.transverseVector_smooth + obtain ⟨V,hV,hVD,hVaxis,hVI⟩ := S.regular_neighborhood hf + let U := V ∩ normalFrameDomain S.model a + have hU : IsOpen U := hV.inter (normalFrameDomain_open S.model_smooth a) + have hframe : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ normalFrameDomain S.model a := by + intro t ht + change transverseDerivative S.model (![0,t] : Base) ⨯₃ a ≠ 0 + rw [S.transverseDerivative_axis] + exact curve_transverse_cross_ne_zero (S.transverseVector_ne_zero ht) (ha t) + have hUaxis : ∀ t ∈ Icc A.arc.start A.arc.finish, (![0,t] : Base) ∈ U := + fun t ht => ⟨hVaxis t ht,hframe t ht⟩ + obtain ⟨δ,hδ,hrect⟩ := compact_axis_rectangle A.arc.start_lt_finish.le hU hUaxis + have hl := hframe A.arc.start (left_mem_Icc.mpr A.arc.start_lt_finish.le) + have hr := hframe A.arc.finish (right_mem_Icc.mpr A.arc.start_lt_finish.le) + refine ⟨a,δ,U,hδ,hU,inter_subset_left.trans hVD,hrect,?_,?_,?_,?_⟩ + · exact normalDefect_smooth S.model_smooth (fun _ hx => normalFrameDomain_nonzero hx.2) + (fun _ hx => normalFrameDomain_transverse hx.2) + · intro x hx + have hh : normalDefect S.model a x ≠ 0 ↔ + x ≠ ![0,A.arc.start] ∧ x ≠ ![0,A.arc.finish] := + (normalDefect_immersion_iff S.model a x (normalFrameDomain_nonzero hx.2) + (normalFrameDomain_transverse hx.2)).symm.trans (hVI x hx.1) + simpa only [not_not,not_and_or] using not_congr hh + · exact normalDefect_nondegenerate_of_direction S.model_smooth a _ + (normalFrameDomain_nonzero hl) (normalFrameDomain_transverse hl) S.left_vertical + S.endpoint_direction_regular.1 + · exact normalDefect_nondegenerate_of_direction S.model_smooth a _ + (normalFrameDomain_nonzero hr) (normalFrameDomain_transverse hr) S.right_vertical + S.endpoint_direction_regular.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Whitney/NormalBoundaryCollar.lean b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NormalBoundaryCollar.lean new file mode 100644 index 0000000000000000000000000000000000000000..eff167dfb6a9ce14a51b09e4b5f5a0eaa4f4d1f9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Whitney/NormalBoundaryCollar.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalFromCover + +namespace OAI + +/-! Strict normal conditions on the disk boundary determine an open collar +that works simultaneously for every later curve. -/ +noncomputable section +open Set Manifold +open scoped ContDiff +namespace ClosedSurfaceR4 +variable {M κ : Type*} [TopologicalSpace M] [Fintype κ] + +lemma normal_boundary_collar {D U V : Set M} (hD : IsOpen D) (hU : IsOpen U) (hV : IsOpen V) + (hDU : closure D ⊆ U) (hDV : Dᶜ ⊆ V) + {a b : M → Space} (ha : ContinuousOn a U) (hb : ContinuousOn b V) + (hne : ∀ p ∈ frontier D, b p ≠ -a p) + (C : κ → Set M) (hC : ∀ k, IsClosed (C k)) (B : κ → M → Space) + (hB : ∀ k, ContinuousOn (B k) (U ∩ V)) + (hpositive : ∀ k p, p ∈ C k → p ∈ frontier D → + 0 < inner ℝ (B k p) (a p) ∧ 0 < inner ℝ (B k p) (b p)) : + ∃ W : Set M, IsOpen W ∧ frontier D ⊆ W ∧ W ⊆ U ∩ V ∧ + (∀ p ∈ W, b p ≠ -a p) ∧ + ∀ k p, p ∈ C k → p ∈ W → + 0 < inner ℝ (B k p) (a p) ∧ 0 < inner ℝ (B k p) (b p) := by + classical + have hfUV : frontier D ⊆ U ∩ V := by + intro p hp + refine ⟨hDU (frontier_subset_closure hp),hDV ?_⟩ + change p ∉ D + simpa only [hD.interior_eq] using hp.2 + let Ω := U ∩ V + have hΩ : IsOpen Ω := hU.inter hV + let O := Ω ∩ (fun p => b p-(-a p)) ⁻¹' ({0} : Set Space)ᶜ + have hO : IsOpen O := ((hb.mono inter_subset_right).sub + (ha.mono inter_subset_left).neg).isOpen_inter_preimage hΩ isClosed_singleton.isOpen_compl + let P : κ → Set M := fun k => Ω ∩ + (fun p => (inner ℝ (B k p) (a p),inner ℝ (B k p) (b p))) ⁻¹' (Ioi 0 ×ˢ Ioi 0) + have hP (k : κ) : IsOpen (P k) := + (((hB k).inner (ha.mono inter_subset_left)).prodMk + ((hB k).inner (hb.mono inter_subset_right))).isOpen_inter_preimage hΩ + (isOpen_Ioi.prod isOpen_Ioi) + let W := O ∩ ⋂ k : κ, (C k)ᶜ ∪ P k + refine ⟨W,hO.inter (isOpen_iInter_of_finite (fun k => (hC k).isOpen_compl.union (hP k))),?_,?_,?_,?_⟩ + · intro p hp + refine ⟨⟨hfUV hp,sub_ne_zero.mpr (hne p hp)⟩,mem_iInter.mpr ?_⟩ + intro k + by_cases hpk : p ∈ C k + · exact Or.inr ⟨hfUV hp,hpositive k p hpk hp⟩ + · exact Or.inl hpk + · exact fun _ hp => hp.1.1 + · intro p hp + exact sub_ne_zero.mp hp.1.2 + · intro k p hpC hpW + exact (Or.resolve_left (mem_iInter.mp hpW.2 k) (not_not.mpr hpC)).2 + +end ClosedSurfaceR4 + +end + +end OAI